|
Chris PeBenito |
eac818 |
## <summary>SELinux troubleshooting service</summary>
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Connect to setroubleshootd over an unix stream socket.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
interface(`setroubleshoot_stream_connect',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type setroubleshootd_t, setroubleshoot_var_run_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
files_search_pids($1)
|
|
Chris PeBenito |
bcc6e6 |
stream_connect_pattern($1, setroubleshoot_var_run_t, setroubleshoot_var_run_t, setroubleshootd_t)
|
|
Chris PeBenito |
bcc6e6 |
allow $1 setroubleshoot_var_run_t:sock_file read;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
0a0b80 |
|
|
Chris PeBenito |
0a0b80 |
########################################
|
|
Chris PeBenito |
0a0b80 |
## <summary>
|
|
Chris PeBenito |
0a0b80 |
## Dontaudit attempts to connect to setroubleshootd
|
|
Chris PeBenito |
0a0b80 |
## over an unix stream socket.
|
|
Chris PeBenito |
0a0b80 |
## </summary>
|
|
Chris PeBenito |
0a0b80 |
## <param name="domain">
|
|
Chris PeBenito |
0a0b80 |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain to not audit.
|
|
Chris PeBenito |
0a0b80 |
## </summary>
|
|
Chris PeBenito |
0a0b80 |
## </param>
|
|
Chris PeBenito |
0a0b80 |
#
|
|
Chris PeBenito |
0a0b80 |
interface(`setroubleshoot_dontaudit_stream_connect',`
|
|
Chris PeBenito |
0a0b80 |
gen_require(`
|
|
Chris PeBenito |
0a0b80 |
type setroubleshootd_t, setroubleshoot_var_run_t;
|
|
Chris PeBenito |
0a0b80 |
')
|
|
Chris PeBenito |
0a0b80 |
|
|
Chris PeBenito |
bcc6e6 |
dontaudit $1 setroubleshoot_var_run_t:sock_file rw_sock_file_perms;
|
|
Chris PeBenito |
0a0b80 |
dontaudit $1 setroubleshootd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
0a0b80 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
########################################
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Send and receive messages from
|
|
Chris PeBenito |
bcc6e6 |
## setroubleshoot over dbus.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## <param name="domain">
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Domain allowed access.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## </param>
|
|
Chris PeBenito |
bcc6e6 |
#
|
|
Chris PeBenito |
bcc6e6 |
interface(`setroubleshoot_dbus_chat',`
|
|
Chris PeBenito |
bcc6e6 |
gen_require(`
|
|
Chris PeBenito |
bcc6e6 |
type setroubleshootd_t;
|
|
Chris PeBenito |
bcc6e6 |
class dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
allow $1 setroubleshootd_t:dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
allow setroubleshootd_t $1:dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
########################################
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Do not audit send and receive messages from
|
|
Chris PeBenito |
bcc6e6 |
## setroubleshoot over dbus.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## <param name="domain">
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Domain to not audit.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## </param>
|
|
Chris PeBenito |
bcc6e6 |
#
|
|
Chris PeBenito |
bcc6e6 |
interface(`setroubleshoot_dontaudit_dbus_chat',`
|
|
Chris PeBenito |
bcc6e6 |
gen_require(`
|
|
Chris PeBenito |
bcc6e6 |
type setroubleshootd_t;
|
|
Chris PeBenito |
bcc6e6 |
class dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
dontaudit $1 setroubleshootd_t:dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
dontaudit setroubleshootd_t $1:dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
########################################
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Send and receive messages from
|
|
Chris PeBenito |
bcc6e6 |
## setroubleshoot over dbus.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## <param name="domain">
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Domain allowed access.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## </param>
|
|
Chris PeBenito |
bcc6e6 |
#
|
|
Chris PeBenito |
bcc6e6 |
interface(`setroubleshoot_dbus_chat_fixit',`
|
|
Chris PeBenito |
bcc6e6 |
gen_require(`
|
|
Chris PeBenito |
bcc6e6 |
type setroubleshoot_fixit_t;
|
|
Chris PeBenito |
bcc6e6 |
class dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
allow $1 setroubleshoot_fixit_t:dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
allow setroubleshoot_fixit_t $1:dbus send_msg;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
########################################
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Dontaudit read/write to a setroubleshoot leaked sockets.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`setroubleshoot_fixit_dontaudit_leaks',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type setroubleshoot_fixit_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
dontaudit $1 setroubleshoot_fixit_t:unix_dgram_socket { read write };
|
|
Dan Walsh |
3eaa99 |
dontaudit $1 setroubleshoot_fixit_t:unix_stream_socket { read write };
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## All of the rules required to administrate
|
|
Chris PeBenito |
bcc6e6 |
## an setroubleshoot environment
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## <param name="domain">
|
|
Chris PeBenito |
bcc6e6 |
## <summary>
|
|
Chris PeBenito |
bcc6e6 |
## Domain allowed access.
|
|
Chris PeBenito |
bcc6e6 |
## </summary>
|
|
Chris PeBenito |
bcc6e6 |
## </param>
|
|
Chris PeBenito |
bcc6e6 |
## <rolecap/>
|
|
Chris PeBenito |
bcc6e6 |
#
|
|
Chris PeBenito |
bcc6e6 |
interface(`setroubleshoot_admin',`
|
|
Chris PeBenito |
bcc6e6 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type setroubleshootd_t, setroubleshoot_var_log_t;
|
|
Chris PeBenito |
bcc6e6 |
type setroubleshoot_var_lib_t, setroubleshoot_var_run_t;
|
|
Chris PeBenito |
bcc6e6 |
')
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
allow $1 setroubleshootd_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
bcc6e6 |
ps_process_pattern($1, setroubleshootd_t)
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
logging_list_logs($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, setroubleshoot_var_log_t)
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
files_list_var_lib($1)
|
|
Chris PeBenito |
bcc6e6 |
admin_pattern($1, setroubleshoot_var_lib_t)
|
|
Chris PeBenito |
bcc6e6 |
|
|
Chris PeBenito |
bcc6e6 |
files_list_pids($1)
|
|
Chris PeBenito |
bcc6e6 |
admin_pattern($1, setroubleshoot_var_run_t)
|
|
Chris PeBenito |
bcc6e6 |
')
|