Syslog fixes from Gentoo.

This commit is contained in:
Chris PeBenito 2010-02-17 20:33:53 -05:00
parent 8b8501991e
commit 2f84a77d22
4 changed files with 24 additions and 3 deletions

View File

@ -239,6 +239,25 @@ interface(`term_read_console',`
allow $1 console_device_t:chr_file read_chr_file_perms; allow $1 console_device_t:chr_file read_chr_file_perms;
') ')
########################################
## <summary>
## Do not audit attempts to read from the console.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`term_dontaudit_read_console',`
gen_require(`
type console_device_t;
')
dontaudit $1 console_device_t:chr_file read_chr_file_perms;
')
######################################## ########################################
## <summary> ## <summary>
## Read from and write to the console. ## Read from and write to the console.

View File

@ -1,5 +1,5 @@
policy_module(terminal, 1.7.1) policy_module(terminal, 1.7.2)
######################################## ########################################
# #

View File

@ -450,6 +450,7 @@ interface(`logging_send_syslog_msg',`
# If syslog is down, the glibc syslog() function # If syslog is down, the glibc syslog() function
# will write to the console. # will write to the console.
term_write_console($1) term_write_console($1)
term_dontaudit_read_console($1)
') ')
######################################## ########################################

View File

@ -1,5 +1,5 @@
policy_module(logging, 1.15.0) policy_module(logging, 1.15.1)
######################################## ########################################
# #
@ -332,7 +332,8 @@ optional_policy(`
allow syslogd_t self:capability { dac_override sys_resource sys_tty_config net_admin sys_admin chown fsetid }; allow syslogd_t self:capability { dac_override sys_resource sys_tty_config net_admin sys_admin chown fsetid };
dontaudit syslogd_t self:capability sys_tty_config; dontaudit syslogd_t self:capability sys_tty_config;
# setpgid for metalog # setpgid for metalog
allow syslogd_t self:process { signal_perms setpgid }; # setrlimit for syslog-ng
allow syslogd_t self:process { signal_perms setpgid setrlimit };
# receive messages to be logged # receive messages to be logged
allow syslogd_t self:unix_dgram_socket create_socket_perms; allow syslogd_t self:unix_dgram_socket create_socket_perms;
allow syslogd_t self:unix_stream_socket create_stream_socket_perms; allow syslogd_t self:unix_stream_socket create_stream_socket_perms;