* policy patch
@ 2004-11-25 13:27 Russell Coker
2004-11-25 16:32 ` Luke Kenneth Casson Leighton
` (3 more replies)
0 siblings, 4 replies; 27+ messages in thread
From: Russell Coker @ 2004-11-25 13:27 UTC (permalink / raw)
To: SELinux List
[-- Attachment #1: Type: text/plain, Size: 2559 bytes --]
The attached patch makes some trivial policy changes.
Allows Debian systems to touch /etc from an init script.
Only Red Hat needs initrc_t to be able to stat all files from an init script.
$1_login_t should not inherit a file handle from init (maybe a bug that has to
be fixed - it certainly needs something other than a dontaudit).
Updated policy for the latest version of asterisk and postgrey.
No domain should have both auth and auth_chkpwd attributes. If the domain has
auth then it will never have a need to run unix_chkpwd.
Removed some duplicate rules and needless {}.
Allow kudzu to do everything it wants.
Mailman should not have a dontaudit for access to src_t. Any access to src_t
is a bug. The bug that caused this to be added is supposed to be fixed in
Fedora now. If it turns out that /usr/src is accessed for other reasons then
it's more bugs we need to fix and we don't want it hidden.
Don't use a dontaudit rule for rhgb_t access to /tmp, that will cause us pain
later on if rhgb is changed to need such access.
Don't use the root_dir_type attribute for type tftpdir_t, it's usually not the
root of a file system, and there's no good reason for using it. Maybe we can
do as the comment suggests and remove that attribute entirely?
Put in a dontaudit rule to stop some annoying messages on sighup.
Removed the CVS comment line from amanda.fc. We don't seem to be using CVS in
a way that makes sense of that line and it just makes for needless file
changes on every update. Best to be consistent with the other files and
remove that line.
/var/spool/mqueue is part of Sendmail. It should not be referenced apart from
through the sendmail policy.
$1_tty_device_t is not a file, the attribute file_type does not belong. Also
updated types/file.te to allow the terminal devices to be associated with the
root fs without this attribute.
mozilla should not be permitted to write to random devices (this means append
too). Now that we aren't labelling a /usr/tmp sym-link as tmp_t we can
remove the access to tmp_t:lnk_file.
gam_server seems to run wild and want to explore every part of the file
system. I put in a ifdef(`distro_redhat' as Fedora is the only distribution
currently relying on gam. I think that some changes need to be made to gam.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff.trivial --]
[-- Type: text/x-diff, Size: 20103 bytes --]
diff -ru /usr/src/se/policy/domains/program/initrc.te ./domains/program/initrc.te
--- /usr/src/se/policy/domains/program/initrc.te 2004-11-21 21:51:11.000000000 +1100
+++ ./domains/program/initrc.te 2004-11-25 23:20:31.000000000 +1100
@@ -12,7 +12,7 @@
# initrc_exec_t is the type of the init program.
#
# do not use privmail for sendmail as it creates a type transition conflict
-type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') sysctl_kernel_writer;
+type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') ifdef(`distro_debian', `etc_writer, ') sysctl_kernel_writer;
ifdef(`sendmail.te', `
allow system_mail_t initrc_t:fd use;
allow system_mail_t initrc_t:fifo_file write;
@@ -36,6 +36,7 @@
# Read system information files in /proc.
allow initrc_t proc_t:dir r_dir_perms;
allow initrc_t proc_t:{ file lnk_file } r_file_perms;
+allow initrc_t proc_mdstat_t:file { getattr read };
# Allow IPC with self
allow initrc_t self:unix_dgram_socket create_socket_perms;
@@ -63,6 +64,14 @@
allow initrc_t var_run_t:{ file sock_file lnk_file } unlink;
allow initrc_t var_run_t:dir { create rmdir };
+ifdef(`distro_debian', `
+allow initrc_t etc_t:dir setattr;
+
+# for storing state under /dev/shm
+file_type_auto_trans(initrc_t, tmpfs_t, initrc_var_run_t, dir)
+allow initrc_var_run_t tmpfs_t:filesystem associate;
+')
+
allow initrc_t framebuf_device_t:chr_file r_file_perms;
# Use capabilities.
@@ -330,7 +338,9 @@
r_dir_file(initrc_t,selinux_config_t)
+ifdef(`distro_redhat', `
allow initrc_t file_type:{ dir_file_class_set socket_class_set } getattr;
+')
ifdef(`unlimitedRC', `
unconfined_domain(initrc_t)
diff -ru /usr/src/se/policy/domains/program/login.te ./domains/program/login.te
--- /usr/src/se/policy/domains/program/login.te 2004-11-21 21:51:11.000000000 +1100
+++ ./domains/program/login.te 2004-11-22 03:14:43.000000000 +1100
@@ -126,7 +126,7 @@
r_dir_file($1_login_t, selinux_config_t)
allow $1_login_t mouse_device_t:chr_file { getattr setattr };
-dontaudit $1_login_t init_t:fd use;
+
')dnl end login_domain macro
#################################
#
diff -ru /usr/src/se/policy/domains/program/unused/asterisk.te ./domains/program/unused/asterisk.te
--- /usr/src/se/policy/domains/program/unused/asterisk.te 2004-10-20 09:31:06.000000000 +1000
+++ ./domains/program/unused/asterisk.te 2004-11-13 04:12:14.000000000 +1100
@@ -15,6 +15,10 @@
allow asterisk_t proc_t:file { getattr read };
+allow asterisk_t { bin_t sbin_t }:dir search;
+allow asterisk_t bin_t:lnk_file read;
+can_exec(asterisk_t, bin_t)
+
etcdir_domain(asterisk)
logdir_domain(asterisk)
var_lib_domain(asterisk)
@@ -47,5 +51,8 @@
# for /var/run/asterisk
allow asterisk_t self:capability dac_override;
+# for shutdown
+dontaudit asterisk_t self:capability sys_tty_config;
+
tmpfs_domain(asterisk)
tmp_domain(asterisk)
diff -ru /usr/src/se/policy/domains/program/unused/consoletype.te ./domains/program/unused/consoletype.te
--- /usr/src/se/policy/domains/program/unused/consoletype.te 2004-11-21 21:51:13.000000000 +1100
+++ ./domains/program/unused/consoletype.te 2004-11-22 03:14:43.000000000 +1100
@@ -52,7 +52,7 @@
allow consoletype_t pam_var_run_t:file { getattr read };
')
ifdef(`distro_redhat', `
-allow consoletype_t tmpfs_t:chr_file { getattr ioctl read write };
+allow consoletype_t tmpfs_t:chr_file rw_file_perms;
')
ifdef(`firstboot.te', `
allow consoletype_t firstboot_t:fifo_file write;
diff -ru /usr/src/se/policy/domains/program/unused/cups.te ./domains/program/unused/cups.te
--- /usr/src/se/policy/domains/program/unused/cups.te 2004-11-21 21:51:13.000000000 +1100
+++ ./domains/program/unused/cups.te 2004-11-25 21:09:23.000000000 +1100
@@ -184,7 +184,7 @@
allow cupsd_config_t cupsd_var_run_t:file { getattr read };
allow cupsd_config_t cupsd_t:process { signal };
allow cupsd_config_t cupsd_t:{ file lnk_file } { getattr read };
-r_dir_file(cupsd_config_t, cupsd_t)
+can_ps(cupsd_config_t, cupsd_t)
allow cupsd_config_t self:capability chown;
diff -ru /usr/src/se/policy/domains/program/unused/dovecot.te ./domains/program/unused/dovecot.te
--- /usr/src/se/policy/domains/program/unused/dovecot.te 2004-11-20 01:18:15.000000000 +1100
+++ ./domains/program/unused/dovecot.te 2004-11-22 03:14:43.000000000 +1100
@@ -38,7 +38,7 @@
allow dovecot_t mail_spool_t:lnk_file read;
allow dovecot_t var_spool_t:dir { search };
-daemon_sub_domain(dovecot_t, dovecot_auth, `, auth, auth_chkpwd')
+daemon_sub_domain(dovecot_t, dovecot_auth, `, auth_chkpwd')
allow dovecot_auth_t self:process { fork signal_perms };
allow dovecot_auth_t dovecot_t:unix_stream_socket { getattr accept read write ioctl };
allow dovecot_auth_t self:unix_dgram_socket create_socket_perms;
diff -ru /usr/src/se/policy/domains/program/unused/gpm.te ./domains/program/unused/gpm.te
--- /usr/src/se/policy/domains/program/unused/gpm.te 2004-11-25 20:37:11.000000000 +1100
+++ ./domains/program/unused/gpm.te 2004-11-25 21:11:40.000000000 +1100
@@ -32,8 +32,6 @@
allow gpm_t self:unix_dgram_socket create_socket_perms;
allow gpm_t self:unix_stream_socket create_stream_socket_perms;
-allow gpm_t mouse_device_t:chr_file rw_file_perms;
-
# Read and write ttys.
allow gpm_t tty_device_t:chr_file rw_file_perms;
diff -ru /usr/src/se/policy/domains/program/unused/hald.te ./domains/program/unused/hald.te
--- /usr/src/se/policy/domains/program/unused/hald.te 2004-11-25 20:37:11.000000000 +1100
+++ ./domains/program/unused/hald.te 2004-11-25 21:12:51.000000000 +1100
@@ -54,7 +54,7 @@
allow hald_t udev_tbl_t:file { getattr read };
')
-ifdef(`udev.te', `
+ifdef(`hotplug.te', `
r_dir_file(hald_t, hotplug_etc_t)
')
allow hald_t usbdevfs_t:dir search;
diff -ru /usr/src/se/policy/domains/program/unused/iptables.te ./domains/program/unused/iptables.te
--- /usr/src/se/policy/domains/program/unused/iptables.te 2004-11-25 20:37:11.000000000 +1100
+++ ./domains/program/unused/iptables.te 2004-11-25 23:18:50.000000000 +1100
@@ -54,7 +54,7 @@
ifdef(`gnome-pty-helper.te', `allow iptables_t sysadm_gph_t:fd use;')
allow iptables_t proc_t:file { getattr read };
-allow iptables_t proc_net_t:dir { search };
+allow iptables_t proc_net_t:dir search;
allow iptables_t proc_net_t:file { read getattr };
# system-config-network appends to /var/log
diff -ru /usr/src/se/policy/domains/program/unused/kudzu.te ./domains/program/unused/kudzu.te
--- /usr/src/se/policy/domains/program/unused/kudzu.te 2004-11-21 21:51:13.000000000 +1100
+++ ./domains/program/unused/kudzu.te 2004-11-25 21:14:19.000000000 +1100
@@ -3,13 +3,17 @@
# Author: Russell Coker <russell@coker.com.au>
#
-daemon_base_domain(kudzu, `, etc_writer, privmodule, sysctl_kernel_writer, fs_domain')
+daemon_base_domain(kudzu, `, etc_writer, privmodule, sysctl_kernel_writer, fs_domain, privmem')
read_locale(kudzu_t)
# for /etc/sysconfig/hwconf - probably need a new type
allow kudzu_t etc_runtime_t:file rw_file_perms;
+# for kmodule
+allow kudzu_t zero_device_t:chr_file rx_file_perms;
+allow kudzu_t memory_device_t:chr_file { read write execute };
+
allow kudzu_t ramfs_t:dir search;
allow kudzu_t ramfs_t:sock_file write;
allow kudzu_t etc_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/unused/mailman.te ./domains/program/unused/mailman.te
--- /usr/src/se/policy/domains/program/unused/mailman.te 2004-11-20 01:18:16.000000000 +1100
+++ ./domains/program/unused/mailman.te 2004-11-25 21:14:51.000000000 +1100
@@ -71,8 +71,7 @@
domain_auto_trans({ httpd_t httpd_suexec_t }, mailman_cgi_exec_t, mailman_cgi_t)
# should have separate types for public and private archives
r_dir_file(httpd_t, mailman_archive_t)
-rw_dir_file(mailman_cgi_t, mailman_archive_t)
-allow mailman_cgi_t mailman_archive_t:lnk_file create_lnk_perms;
+rw_dir_create_file(mailman_cgi_t, mailman_archive_t)
allow httpd_t mailman_data_t:dir { getattr search };
dontaudit mailman_cgi_t httpd_log_t:file append;
@@ -84,7 +83,6 @@
allow mailman_cgi_t devtty_t:chr_file { read write };
allow mailman_cgi_t self:process { fork sigchld };
allow mailman_cgi_t var_spool_t:dir search;
-dontaudit mailman_cgi_t src_t:dir search;
')
allow mta_delivery_agent mailman_data_t:dir search;
diff -ru /usr/src/se/policy/domains/program/unused/ping.te ./domains/program/unused/ping.te
--- /usr/src/se/policy/domains/program/unused/ping.te 2004-11-20 01:18:16.000000000 +1100
+++ ./domains/program/unused/ping.te 2004-11-22 03:14:43.000000000 +1100
@@ -55,5 +55,5 @@
# it tries to access /var/run
dontaudit ping_t var_t:dir search;
dontaudit ping_t devtty_t:chr_file { read write };
-dontaudit ping_t ping_t:capability sys_tty_config;
+dontaudit ping_t self:capability sys_tty_config;
diff -ru /usr/src/se/policy/domains/program/unused/postgresql.te ./domains/program/unused/postgresql.te
--- /usr/src/se/policy/domains/program/unused/postgresql.te 2004-11-25 20:37:12.000000000 +1100
+++ ./domains/program/unused/postgresql.te 2004-11-25 22:35:08.000000000 +1100
@@ -34,7 +34,7 @@
# capability kill is for shutdown script
allow postgresql_t self:capability { kill dac_override dac_read_search chown fowner fsetid setuid setgid sys_nice sys_tty_config };
-dontaudit postgresql_t postgresql_t:capability { sys_admin };
+dontaudit postgresql_t self:capability sys_admin;
etcdir_domain(postgresql)
typealias postgresql_etc_t alias etc_postgresql_t;
diff -ru /usr/src/se/policy/domains/program/unused/postgrey.te ./domains/program/unused/postgrey.te
--- /usr/src/se/policy/domains/program/unused/postgrey.te 2004-08-28 12:05:04.000000000 +1000
+++ ./domains/program/unused/postgrey.te 2004-11-13 01:02:26.000000000 +1100
@@ -20,10 +20,11 @@
can_network(postgrey_t)
can_ypbind(postgrey_t)
allow postgrey_t postgrey_port_t:tcp_socket name_bind;
+allow postgrey_t self:unix_dgram_socket create_socket_perms;
allow postgrey_t self:unix_stream_socket create_stream_socket_perms;
allow postgrey_t proc_t:file { getattr read };
-allow postgrey_t self:capability { chown setuid };
+allow postgrey_t self:capability { chown setgid setuid };
dontaudit postgrey_t self:capability sys_tty_config;
var_lib_domain(postgrey)
diff -ru /usr/src/se/policy/domains/program/unused/rhgb.te ./domains/program/unused/rhgb.te
--- /usr/src/se/policy/domains/program/unused/rhgb.te 2004-11-13 03:56:03.000000000 +1100
+++ ./domains/program/unused/rhgb.te 2004-11-22 03:14:43.000000000 +1100
@@ -22,7 +22,7 @@
allow rhgb_t proc_t:file { getattr read };
allow rhgb_t devtty_t:chr_file { read write };
-allow rhgb_t tty_device_t:chr_file { ioctl read write };
+allow rhgb_t tty_device_t:chr_file rw_file_perms;
read_locale(rhgb_t)
allow rhgb_t { etc_t etc_runtime_t }:file { getattr read };
@@ -85,7 +85,7 @@
ifdef(`firstboot.te', `
allow rhgb_t firstboot_rw_t:file r_file_perms;
')
-dontaudit rhgb_t tmp_t:dir search;
+allow rhgb_t tmp_t:dir search;
allow rhgb_t xdm_xserver_t:process sigkill;
allow domain rhgb_devpts_t:chr_file { read write };
ifdef(`fsadm.te', `
diff -ru /usr/src/se/policy/domains/program/unused/sendmail.te ./domains/program/unused/sendmail.te
--- /usr/src/se/policy/domains/program/unused/sendmail.te 2004-11-13 03:56:04.000000000 +1100
+++ ./domains/program/unused/sendmail.te 2004-11-25 22:43:05.000000000 +1100
@@ -99,5 +99,7 @@
allow system_mail_t sysctl_kernel_t:file read;
dontaudit system_mail_t system_crond_tmp_t:file append;
dontaudit sendmail_t admin_tty_type:chr_file { getattr ioctl };
+
+# sendmail wants to read /var/run/utmp if the controlling tty is /dev/console
allow sendmail_t initrc_var_run_t:file { getattr read };
dontaudit sendmail_t initrc_var_run_t:file { lock write };
diff -ru /usr/src/se/policy/domains/program/unused/sxid.te ./domains/program/unused/sxid.te
--- /usr/src/se/policy/domains/program/unused/sxid.te 2004-08-19 17:10:37.000000000 +1000
+++ ./domains/program/unused/sxid.te 2004-11-13 04:00:22.000000000 +1100
@@ -29,6 +29,7 @@
allow sxid_t file_type:notdevfile_class_set getattr;
allow sxid_t { device_t device_type }:{ chr_file blk_file } getattr;
+allow sxid_t ttyfile:chr_file getattr;
allow sxid_t file_type:dir { getattr read search };
allow sxid_t sysadmfile:file read;
allow sxid_t root_dir_type:dir { getattr read search };
diff -ru /usr/src/se/policy/domains/program/unused/tftpd.te ./domains/program/unused/tftpd.te
--- /usr/src/se/policy/domains/program/unused/tftpd.te 2004-10-20 09:31:10.000000000 +1000
+++ ./domains/program/unused/tftpd.te 2004-11-13 04:00:39.000000000 +1100
@@ -16,7 +16,7 @@
type tftp_port_t, port_type, reserved_port_type;
# tftpdir_t is the type of files in the /tftpboot directories.
-type tftpdir_t, file_type, root_dir_type, sysadmfile;
+type tftpdir_t, file_type, sysadmfile;
r_dir_file(tftpd_t, tftpdir_t)
domain_auto_trans(inetd_t, tftpd_exec_t, tftpd_t)
diff -ru /usr/src/se/policy/domains/user.te ./domains/user.te
--- /usr/src/se/policy/domains/user.te 2004-11-25 20:37:08.000000000 +1100
+++ ./domains/user.te 2004-11-25 22:46:14.000000000 +1100
@@ -48,6 +48,8 @@
allow $1_r $2_r;
type_change $2_t $1_devpts_t:chr_file $2_devpts_t;
type_change $2_t $1_tty_device_t:chr_file $2_tty_device_t;
+# avoid annoying messages on terminal hangup
+dontaudit $1_t { $2_devpts_t $2_tty_device_t }:chr_file ioctl;
')
# Reach sysadm_t via programs like userhelper/sudo/su
diff -ru /usr/src/se/policy/file_contexts/program/amanda.fc ./file_contexts/program/amanda.fc
--- /usr/src/se/policy/file_contexts/program/amanda.fc 2004-11-13 03:56:05.000000000 +1100
+++ ./file_contexts/program/amanda.fc 2004-11-13 04:03:15.000000000 +1100
@@ -1,8 +1,6 @@
#
# Author: Carsten Grohmann <carstengrohmann@gmx.de>
#
-# $Id: amanda.fc,v 1.3 2004/03/03 20:55:53 sds Exp $
-#
# amanda
/etc/amanda(/.*)? system_u:object_r:amanda_config_t
diff -ru /usr/src/se/policy/file_contexts/program/sendmail.fc ./file_contexts/program/sendmail.fc
--- /usr/src/se/policy/file_contexts/program/sendmail.fc 2004-11-21 21:51:16.000000000 +1100
+++ ./file_contexts/program/sendmail.fc 2004-11-22 02:45:31.000000000 +1100
@@ -1,5 +1,6 @@
# sendmail
/etc/mail(/.*)? system_u:object_r:etc_mail_t
+/var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t
/var/log/sendmail\.st -- system_u:object_r:sendmail_log_t
/var/log/mail(/.*)? system_u:object_r:sendmail_log_t
/var/run/sendmail\.pid -- system_u:object_r:sendmail_var_run_t
diff -ru /usr/src/se/policy/file_contexts/types.fc ./file_contexts/types.fc
--- /usr/src/se/policy/file_contexts/types.fc 2004-11-25 20:37:14.000000000 +1100
+++ ./file_contexts/types.fc 2004-11-22 03:14:43.000000000 +1100
@@ -399,7 +396,6 @@
#
/var/spool(/.*)? system_u:object_r:var_spool_t
/var/spool/texmf(/.*)? system_u:object_r:tetex_data_t
-/var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t
#
# /var/log
diff -ru /usr/src/se/policy/macros/admin_macros.te ./macros/admin_macros.te
--- /usr/src/se/policy/macros/admin_macros.te 2004-11-25 20:37:20.000000000 +1100
+++ ./macros/admin_macros.te 2004-11-25 22:57:58.000000000 +1100
@@ -25,7 +25,7 @@
tmp_domain($1)
# Type for tty devices.
-type $1_tty_device_t, file_type, sysadmfile, ttyfile, dev_fs;
+type $1_tty_device_t, sysadmfile, ttyfile, dev_fs;
# Inherit rules for ordinary users.
base_user_domain($1)
diff -ru /usr/src/se/policy/macros/base_user_macros.te ./macros/base_user_macros.te
--- /usr/src/se/policy/macros/base_user_macros.te 2004-11-25 20:37:20.000000000 +1100
+++ ./macros/base_user_macros.te 2004-11-25 23:01:56.000000000 +1100
@@ -349,7 +344,7 @@
#
# Running ifconfig as a user generates the following
#
-dontaudit $1_t $1_t:socket create;
+dontaudit $1_t self:socket create;
dontaudit $1_t sysctl_net_t:dir search;
dontaudit $1_t default_context_t:dir search;
diff -ru /usr/src/se/policy/macros/program/crontab_macros.te ./macros/program/crontab_macros.te
--- /usr/src/se/policy/macros/program/crontab_macros.te 2004-11-13 03:56:11.000000000 +1100
+++ ./macros/program/crontab_macros.te 2004-11-22 03:14:43.000000000 +1100
@@ -55,6 +55,7 @@
allow $1_crontab_t self:process { fork signal_perms };
ifdef(`fcron.te', `
# fcron wants an instant update of a crontab change for the administrator
+# also crontab does a security check for crontab -u
ifelse(`$1', `sysadm', `
allow $1_crontab_t crond_t:process signal;
can_setfscreate($1_crontab_t)
@@ -63,6 +64,9 @@
')dnl end ifelse
')dnl end ifdef fcron
+# for the checks used by crontab -u
+dontaudit $1_crontab_t security_t:dir search;
+
# crontab signals crond by updating the mtime on the spooldir
allow $1_crontab_t cron_spool_t:dir setattr;
# Allow crond to read those crontabs in cron spool.
diff -ru /usr/src/se/policy/macros/program/mozilla_macros.te ./macros/program/mozilla_macros.te
--- /usr/src/se/policy/macros/program/mozilla_macros.te 2004-11-25 20:37:21.000000000 +1100
+++ ./macros/program/mozilla_macros.te 2004-11-25 23:07:56.000000000 +1100
@@ -29,8 +30,7 @@
allow $1_mozilla_t usr_t:{ lnk_file file } { getattr read };
allow $1_mozilla_t var_lib_t:file { getattr read };
-allow $1_mozilla_t { random_device_t urandom_device_t }:chr_file { getattr ioctl read append };
-
+allow $1_mozilla_t { random_device_t urandom_device_t }:chr_file { getattr ioctl read };
allow $1_mozilla_t self:socket create_socket_perms;
allow $1_mozilla_t self:file { getattr read };
@@ -71,8 +71,6 @@
dontaudit $1_lpr_t $1_mozilla_t:unix_stream_socket { read write };
')
-dontaudit $1_mozilla_t tmp_t:lnk_file read;
-
#
# This is another place where I sould like to allow system customization.
# We need to allow the admin to select whether then want to allow mozilla
diff -ru /usr/src/se/policy/macros/program/screen_macros.te ./macros/program/screen_macros.te
--- /usr/src/se/policy/macros/program/screen_macros.te 2004-11-20 01:18:25.000000000 +1100
+++ ./macros/program/screen_macros.te 2004-11-22 03:18:59.000000000 +1100
@@ -88,7 +88,6 @@
# get stats
allow $1_screen_t proc_t:dir search;
allow $1_screen_t proc_t:lnk_file read;
-dontaudit $1_screen_t device_t:chr_file getattr;
allow $1_screen_t etc_t:{ file lnk_file } { read getattr };
allow $1_screen_t self:dir { search read };
allow $1_screen_t self:lnk_file read;
diff -ru /usr/src/se/policy/macros/program/userhelper_macros.te ./macros/program/userhelper_macros.te
--- /usr/src/se/policy/macros/program/userhelper_macros.te 2004-11-25 20:37:21.000000000 +1100
+++ ./macros/program/userhelper_macros.te 2004-11-22 03:14:43.000000000 +1100
@@ -38,9 +38,6 @@
# Inherit descriptors from the current session.
allow $1_userhelper_t { init_t privfd }:fd use;
-# Execute /sbin/unix_chkpwd to check the password.
-allow $1_userhelper_t sbin_t:dir r_dir_perms;
-
can_exec($1_userhelper_t, { bin_t sbin_t userhelper_exec_t })
# Execute shells
diff -ru /usr/src/se/policy/macros/user_macros.te ./macros/user_macros.te
--- /usr/src/se/policy/macros/user_macros.te 2004-11-20 01:18:25.000000000 +1100
+++ ./macros/user_macros.te 2004-11-22 03:14:43.000000000 +1100
@@ -197,8 +197,10 @@
dontaudit $1_t sysadm_home_t:dir { read search getattr };
dontaudit $1_t sysadm_home_t:file { read getattr append };
+ifdef(`distro_redhat', `
# gam_server fires off these when exploring with mozilla/nautilous
dontaudit $1_t file_type:dir getattr;
+')
ifdef(`syslogd.te', `
# Some programs that are left in $1_t will try to connect
diff -ru /usr/src/se/policy/types/file.te ./types/file.te
--- /usr/src/se/policy/types/file.te 2004-11-13 03:56:14.000000000 +1100
+++ ./types/file.te 2004-11-22 03:14:43.000000000 +1100
@@ -256,7 +256,7 @@
# Allow each file type to be associated with
# the default file system type.
#
-allow { file_type device_type } fs_t:filesystem associate;
+allow { file_type device_type ttyfile } fs_t:filesystem associate;
ifdef(`distro_redhat', `
allow { dev_fs ttyfile } tmpfs_t:filesystem associate;
')
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-11-25 13:27 policy patch Russell Coker
@ 2004-11-25 16:32 ` Luke Kenneth Casson Leighton
2004-11-25 19:05 ` Russell Coker
2004-11-29 19:23 ` James Carter
` (2 subsequent siblings)
3 siblings, 1 reply; 27+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-11-25 16:32 UTC (permalink / raw)
To: Russell Coker; +Cc: SELinux List
On Fri, Nov 26, 2004 at 12:27:39AM +1100, Russell Coker wrote:
> The attached patch makes some trivial policy changes.
>
> Allows Debian systems to touch /etc from an init script.
i fixed the /etc/init.d script which does the /etc touching,
sent a patch to the maintainer of initscripts.
lessavalook.... yes: mountvirtfs - it calls a bash function
dir_writable on /etc/ in order to determine whether /etc/mtab
is writeable, which is a bit of a daft way to do it.
the patch version, iirc, attempts to touch /etc/mtab instead
(if it's not a symlink).
afaik, this is the only reason for allowing debian init
scripts to write to /etc and it's not a very good one!
l.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-11-25 16:32 ` Luke Kenneth Casson Leighton
@ 2004-11-25 19:05 ` Russell Coker
2004-11-25 20:34 ` Luke Kenneth Casson Leighton
0 siblings, 1 reply; 27+ messages in thread
From: Russell Coker @ 2004-11-25 19:05 UTC (permalink / raw)
To: Luke Kenneth Casson Leighton; +Cc: SELinux List
On Friday 26 November 2004 03:32, Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:
> On Fri, Nov 26, 2004 at 12:27:39AM +1100, Russell Coker wrote:
> > The attached patch makes some trivial policy changes.
> >
> > Allows Debian systems to touch /etc from an init script.
>
> i fixed the /etc/init.d script which does the /etc touching,
> sent a patch to the maintainer of initscripts.
Great! Now when will that patch go into Debian/main?
> afaik, this is the only reason for allowing debian init
> scripts to write to /etc and it's not a very good one!
I agree. But until the script gets fixed I think I have to do this to stop
systems failing to correctly boot.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
2004-11-25 19:05 ` Russell Coker
@ 2004-11-25 20:34 ` Luke Kenneth Casson Leighton
0 siblings, 0 replies; 27+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-11-25 20:34 UTC (permalink / raw)
To: Russell Coker; +Cc: SELinux List, 270919
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
On Fri, Nov 26, 2004 at 06:05:09AM +1100, Russell Coker wrote:
> On Friday 26 November 2004 03:32, Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> wrote:
> > On Fri, Nov 26, 2004 at 12:27:39AM +1100, Russell Coker wrote:
> > > The attached patch makes some trivial policy changes.
> > >
> > > Allows Debian systems to touch /etc from an init script.
> >
> > i fixed the /etc/init.d script which does the /etc touching,
> > sent a patch to the maintainer of initscripts.
>
> Great! Now when will that patch go into Debian/main?
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=270919
except duh it looks like i missed the attachment.
> > afaik, this is the only reason for allowing debian init
> > scripts to write to /etc and it's not a very good one!
>
> I agree. But until the script gets fixed I think I have to do this to stop
> systems failing to correctly boot.
well um i have been installing initscripts se2 version off of
http://selinux.lemuria.org/newselinux/ .debs and then updating that.
do i need to do that? [use the initscripts .deb off lemuria.org]
l.
[-- Attachment #2: mountvirtfs --]
[-- Type: text/plain, Size: 5010 bytes --]
#! /bin/sh
#
# mountvirtfs Mount all the virtual filesystems the kernel
# provides and that are required by default.
#
# This script can be called several times without
# damage; it tries to mount the virtual filesystems
# only if not mounted yet, and only updates /etc/mtab
# if it is writable and there is a need to.
#
# This functionality was previously provided by
# mountkernfs from the glibc package.
# lkcl: 2004sep09 -
#
# Version: @(#)mountvirtfs 2.85-21 18-Jun-2004 miquels
#
# Script needs to be robust and continue when parts fail,
# so we're not setting the "-e" flag.
#set -e
PATH=/lib/init:/bin:/sbin
TTYGRP=5
TTYMODE=620
if [ -f /etc/default/devpts ]
then
. /etc/default/devpts
fi
TMPFS_SIZE=
if [ -f /etc/default/tmpfs ]
then
. /etc/default/tmpfs
fi
KERNEL=`uname -s`
umask 022
dir_writable () {
if [ -d "$1/" ] && [ -w "$1/" ] && touch -a "$1/" 2>/dev/null
then
return 0
fi
return 1
}
domount () {
# Directory present ?
if [ ! -d $3 ]
then
return
fi
# Do we support this filesystem type ?
TYPE=
if [ $1 = proc ]
then
case "$KERNEL" in
Linux|GNU)
TYPE=proc
;;
*)
TYPE=procfs
;;
esac
elif egrep -qs "$1\$" /proc/filesystems
then
TYPE=$1
elif egrep -qs "$2\$" /proc/filesystems
then
TYPE=$2
fi
if [ "$TYPE" = "" ]
then
return
fi
#
# Get the options from /etc/fstab.
#
OPTS=
if [ -f /etc/fstab ]
then
exec 9<&0 0</etc/fstab
while read FDEV FDIR FTYPE FOPTS REST
do
case "$FDEV" in
""|\#*)
continue
;;
esac
if [ "$3" != "$FDIR" ] || [ "$TYPE" != "$FTYPE" ]
then
continue
fi
case "$FOPTS" in
noauto|*,noauto|noauto,*|*,noauto,*)
return
;;
?*)
OPTS="-o$FOPTS"
;;
esac
break
done
exec 0<&9 9<&-
fi
# See if anything is mounted yet
if ! mountpoint -q $3
then
# No, do it now
mount $MOUNT_N -t $TYPE $OPTS $4 $TYPE $3
else
# Need to update mtab only ?
if [ -n "$DO_MTAB" ] &&
! egrep -sq "^([^ ]+) +$3 +" /etc/mtab
then
mount -f -t $TYPE $OPTS $4 $TYPE $3
fi
fi
}
#
# If /etc/mtab is a symlink into /proc/
# then we assume it is not writable.
#
DO_MTAB=
MOUNT_N=-n
MTAB_PATH="`readlink -f /etc/mtab || :`"
case "$MTAB_PATH" in
/proc/*)
;;
/*)
DO_MTAB=Yes
MOUNT_N=
;;
esac
# really important on selinux to restore file context of /etc/mtab
# otherwise mount and other programs will fail.
if [ -n "$DO_MTAB" ] && [ ! -f /etc/mtab ]
then
:> /etc/mtab
if [ -x /sbin/restorecon ]; then /sbin/restorecon /etc/mtab; fi
fi
# Mount standard /proc and /sys.
domount proc "" /proc
domount sysfs "" /sys
# Mount /dev/pts. Create master ptmx node if needed.
#
# As of 2.5.68, devpts is not automounted when using devfs. So we
# mount devpts if it is compiled in (older devfs didn't require it
# to be compiled in at all).
#
if [ "$KERNEL" = Linux ]
then
#
# Since kernel 2.5.something, devfs doesn't include
# a standard /dev/pts directory anymore. So if devfs
# is mounted on /dev we need to create that directory
# manually.
#
if grep -qs '/dev devfs' /proc/mounts
then
if [ ! -d /dev/pts ]
then
mkdir /dev/pts
fi
fi
if [ -d /dev/pts ]
then
if dir_writable /dev && [ ! -c /dev/ptmx ]
then
mknod --mode=666 /dev/ptmx c 5 2
fi
umount -l -f devpts
domount devpts "" /dev/pts -ofscontext=system_u:object_r:devpts_t,gid=$TTYGRP,mode=$TTYMODE
fi
fi
# Mount tmpfs.
#
# Around kernel version 2.3.3x, a memory based filesystem was
# introduced to support POSIX shared memory, called shmfs.
# Later this filesystem was extended for general usage -
# provided you set the CONFIG_TMPFS compile option and mount
# it as type tmpfs.
#
# Early in the 2.4 kernel series, shmfs was renamed to tmpfs, but
# you could mount it using both type shmfs and tmpfs. Starting
# at kernel version 2.5.44, the shmfs alias was dropped.
#
# Confusingly, in kernels 2.3.x - 2.5.43 where both shmfs and
# tmpfs are present, disabling CONFIG_TMPFS actually removes
# support for shmfs, but tmpfs is still listed in /proc/filesystems
# to support SYSV and POSIX shared memory, and it should still be
# mounted under /dev/shm.
#
# Recommendation: always enable CONFIG_TMPFS and always mount
# using the tmpfs type. Forget about shmfs.
#
# Tmpfs can be used as memory filesystem, so you can limit tmpfs
# max size using /etc/default/tmpfs to prevent tmpfs from using
# up all system memory.
#
if [ -n "$TMPFS_SIZE" ]
then
tmpfs_opt="-osize=${TMPFS_SIZE}"
fi
domount tmpfs shmfs /dev/shm $tmpfs_opt
# Mount usbfs/usbdevfs if /proc/bus/usb is present.
#
# Usbfs/usbdevfs is used for USB related binaries/libraries.
# "usbfs" and "usbdevfs" are the exact same filesystem.
# "usbdevfs" was renamed to "usbfs" by linux usb developers,
# because people sometimes mistook it as a part of devfs. Usbfs
# will be superseded by other filesystems (e.g. sysfs), and when
# it becomes obsolete the mount action below should be removed.
#
if [ -d /proc/bus/usb ]
then
domount usbfs usbdevfs /proc/bus/usb
fi
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
2004-11-25 13:27 policy patch Russell Coker
2004-11-25 16:32 ` Luke Kenneth Casson Leighton
@ 2004-11-29 19:23 ` James Carter
2004-11-29 21:47 ` Daniel J Walsh
2004-11-30 16:42 ` Daniel J Walsh
3 siblings, 0 replies; 27+ messages in thread
From: James Carter @ 2004-11-29 19:23 UTC (permalink / raw)
To: Russell Coker; +Cc: SELinux List
Merged.
On Thu, 2004-11-25 at 08:27, Russell Coker wrote:
> The attached patch makes some trivial policy changes.
>
> Allows Debian systems to touch /etc from an init script.
>
> Only Red Hat needs initrc_t to be able to stat all files from an init script.
>
> $1_login_t should not inherit a file handle from init (maybe a bug that has to
> be fixed - it certainly needs something other than a dontaudit).
>
> Updated policy for the latest version of asterisk and postgrey.
>
> No domain should have both auth and auth_chkpwd attributes. If the domain has
> auth then it will never have a need to run unix_chkpwd.
>
> Removed some duplicate rules and needless {}.
>
> Allow kudzu to do everything it wants.
>
> Mailman should not have a dontaudit for access to src_t. Any access to src_t
> is a bug. The bug that caused this to be added is supposed to be fixed in
> Fedora now. If it turns out that /usr/src is accessed for other reasons then
> it's more bugs we need to fix and we don't want it hidden.
>
> Don't use a dontaudit rule for rhgb_t access to /tmp, that will cause us pain
> later on if rhgb is changed to need such access.
>
> Don't use the root_dir_type attribute for type tftpdir_t, it's usually not the
> root of a file system, and there's no good reason for using it. Maybe we can
> do as the comment suggests and remove that attribute entirely?
>
> Put in a dontaudit rule to stop some annoying messages on sighup.
>
> Removed the CVS comment line from amanda.fc. We don't seem to be using CVS in
> a way that makes sense of that line and it just makes for needless file
> changes on every update. Best to be consistent with the other files and
> remove that line.
>
> /var/spool/mqueue is part of Sendmail. It should not be referenced apart from
> through the sendmail policy.
>
> $1_tty_device_t is not a file, the attribute file_type does not belong. Also
> updated types/file.te to allow the terminal devices to be associated with the
> root fs without this attribute.
>
> mozilla should not be permitted to write to random devices (this means append
> too). Now that we aren't labelling a /usr/tmp sym-link as tmp_t we can
> remove the access to tmp_t:lnk_file.
>
> gam_server seems to run wild and want to explore every part of the file
> system. I put in a ifdef(`distro_redhat' as Fedora is the only distribution
> currently relying on gam. I think that some changes need to be made to gam.
--
James Carter <jwcart2@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-11-25 13:27 policy patch Russell Coker
2004-11-25 16:32 ` Luke Kenneth Casson Leighton
2004-11-29 19:23 ` James Carter
@ 2004-11-29 21:47 ` Daniel J Walsh
2004-11-30 16:42 ` Daniel J Walsh
3 siblings, 0 replies; 27+ messages in thread
From: Daniel J Walsh @ 2004-11-29 21:47 UTC (permalink / raw)
To: russell; +Cc: SELinux List
Russell Coker wrote:
>The attached patch makes some trivial policy changes.
>
>Allows Debian systems to touch /etc from an init script.
>
>Only Red Hat needs initrc_t to be able to stat all files from an init script.
>
>$1_login_t should not inherit a file handle from init (maybe a bug that has to
>be fixed - it certainly needs something other than a dontaudit).
>
>Updated policy for the latest version of asterisk and postgrey.
>
>No domain should have both auth and auth_chkpwd attributes. If the domain has
>auth then it will never have a need to run unix_chkpwd.
>
>Removed some duplicate rules and needless {}.
>
>Allow kudzu to do everything it wants.
>
>Mailman should not have a dontaudit for access to src_t. Any access to src_t
>is a bug. The bug that caused this to be added is supposed to be fixed in
>Fedora now. If it turns out that /usr/src is accessed for other reasons then
>it's more bugs we need to fix and we don't want it hidden.
>
>Don't use a dontaudit rule for rhgb_t access to /tmp, that will cause us pain
>later on if rhgb is changed to need such access.
>
>Don't use the root_dir_type attribute for type tftpdir_t, it's usually not the
>root of a file system, and there's no good reason for using it. Maybe we can
>do as the comment suggests and remove that attribute entirely?
>
>Put in a dontaudit rule to stop some annoying messages on sighup.
>
>Removed the CVS comment line from amanda.fc. We don't seem to be using CVS in
>a way that makes sense of that line and it just makes for needless file
>changes on every update. Best to be consistent with the other files and
>remove that line.
>
>/var/spool/mqueue is part of Sendmail. It should not be referenced apart from
>through the sendmail policy.
>
>
>
/var/spool/mqueue is needed for targeted policy which does not include
sendmail.te.
Targeted policy uses mta.te and squirrelmail to access this directory.
>$1_tty_device_t is not a file, the attribute file_type does not belong. Also
>updated types/file.te to allow the terminal devices to be associated with the
>root fs without this attribute.
>
>mozilla should not be permitted to write to random devices (this means append
>too). Now that we aren't labelling a /usr/tmp sym-link as tmp_t we can
>remove the access to tmp_t:lnk_file.
>
>gam_server seems to run wild and want to explore every part of the file
>system. I put in a ifdef(`distro_redhat' as Fedora is the only distribution
>currently relying on gam. I think that some changes need to be made to gam.
>
>
>
>------------------------------------------------------------------------
>
>diff -ru /usr/src/se/policy/domains/program/initrc.te ./domains/program/initrc.te
>--- /usr/src/se/policy/domains/program/initrc.te 2004-11-21 21:51:11.000000000 +1100
>+++ ./domains/program/initrc.te 2004-11-25 23:20:31.000000000 +1100
>@@ -12,7 +12,7 @@
> # initrc_exec_t is the type of the init program.
> #
> # do not use privmail for sendmail as it creates a type transition conflict
>-type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') sysctl_kernel_writer;
>+type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') ifdef(`distro_debian', `etc_writer, ') sysctl_kernel_writer;
> ifdef(`sendmail.te', `
> allow system_mail_t initrc_t:fd use;
> allow system_mail_t initrc_t:fifo_file write;
>@@ -36,6 +36,7 @@
> # Read system information files in /proc.
> allow initrc_t proc_t:dir r_dir_perms;
> allow initrc_t proc_t:{ file lnk_file } r_file_perms;
>+allow initrc_t proc_mdstat_t:file { getattr read };
>
> # Allow IPC with self
> allow initrc_t self:unix_dgram_socket create_socket_perms;
>@@ -63,6 +64,14 @@
> allow initrc_t var_run_t:{ file sock_file lnk_file } unlink;
> allow initrc_t var_run_t:dir { create rmdir };
>
>+ifdef(`distro_debian', `
>+allow initrc_t etc_t:dir setattr;
>+
>+# for storing state under /dev/shm
>+file_type_auto_trans(initrc_t, tmpfs_t, initrc_var_run_t, dir)
>+allow initrc_var_run_t tmpfs_t:filesystem associate;
>+')
>+
> allow initrc_t framebuf_device_t:chr_file r_file_perms;
>
> # Use capabilities.
>@@ -330,7 +338,9 @@
>
> r_dir_file(initrc_t,selinux_config_t)
>
>+ifdef(`distro_redhat', `
> allow initrc_t file_type:{ dir_file_class_set socket_class_set } getattr;
>+')
>
> ifdef(`unlimitedRC', `
> unconfined_domain(initrc_t)
>diff -ru /usr/src/se/policy/domains/program/login.te ./domains/program/login.te
>--- /usr/src/se/policy/domains/program/login.te 2004-11-21 21:51:11.000000000 +1100
>+++ ./domains/program/login.te 2004-11-22 03:14:43.000000000 +1100
>@@ -126,7 +126,7 @@
> r_dir_file($1_login_t, selinux_config_t)
>
> allow $1_login_t mouse_device_t:chr_file { getattr setattr };
>-dontaudit $1_login_t init_t:fd use;
>+
> ')dnl end login_domain macro
> #################################
> #
>diff -ru /usr/src/se/policy/domains/program/unused/asterisk.te ./domains/program/unused/asterisk.te
>--- /usr/src/se/policy/domains/program/unused/asterisk.te 2004-10-20 09:31:06.000000000 +1000
>+++ ./domains/program/unused/asterisk.te 2004-11-13 04:12:14.000000000 +1100
>@@ -15,6 +15,10 @@
>
> allow asterisk_t proc_t:file { getattr read };
>
>+allow asterisk_t { bin_t sbin_t }:dir search;
>+allow asterisk_t bin_t:lnk_file read;
>+can_exec(asterisk_t, bin_t)
>+
> etcdir_domain(asterisk)
> logdir_domain(asterisk)
> var_lib_domain(asterisk)
>@@ -47,5 +51,8 @@
> # for /var/run/asterisk
> allow asterisk_t self:capability dac_override;
>
>+# for shutdown
>+dontaudit asterisk_t self:capability sys_tty_config;
>+
> tmpfs_domain(asterisk)
> tmp_domain(asterisk)
>diff -ru /usr/src/se/policy/domains/program/unused/consoletype.te ./domains/program/unused/consoletype.te
>--- /usr/src/se/policy/domains/program/unused/consoletype.te 2004-11-21 21:51:13.000000000 +1100
>+++ ./domains/program/unused/consoletype.te 2004-11-22 03:14:43.000000000 +1100
>@@ -52,7 +52,7 @@
> allow consoletype_t pam_var_run_t:file { getattr read };
> ')
> ifdef(`distro_redhat', `
>-allow consoletype_t tmpfs_t:chr_file { getattr ioctl read write };
>+allow consoletype_t tmpfs_t:chr_file rw_file_perms;
> ')
> ifdef(`firstboot.te', `
> allow consoletype_t firstboot_t:fifo_file write;
>diff -ru /usr/src/se/policy/domains/program/unused/cups.te ./domains/program/unused/cups.te
>--- /usr/src/se/policy/domains/program/unused/cups.te 2004-11-21 21:51:13.000000000 +1100
>+++ ./domains/program/unused/cups.te 2004-11-25 21:09:23.000000000 +1100
>@@ -184,7 +184,7 @@
> allow cupsd_config_t cupsd_var_run_t:file { getattr read };
> allow cupsd_config_t cupsd_t:process { signal };
> allow cupsd_config_t cupsd_t:{ file lnk_file } { getattr read };
>-r_dir_file(cupsd_config_t, cupsd_t)
>+can_ps(cupsd_config_t, cupsd_t)
>
> allow cupsd_config_t self:capability chown;
>
>diff -ru /usr/src/se/policy/domains/program/unused/dovecot.te ./domains/program/unused/dovecot.te
>--- /usr/src/se/policy/domains/program/unused/dovecot.te 2004-11-20 01:18:15.000000000 +1100
>+++ ./domains/program/unused/dovecot.te 2004-11-22 03:14:43.000000000 +1100
>@@ -38,7 +38,7 @@
> allow dovecot_t mail_spool_t:lnk_file read;
> allow dovecot_t var_spool_t:dir { search };
>
>-daemon_sub_domain(dovecot_t, dovecot_auth, `, auth, auth_chkpwd')
>+daemon_sub_domain(dovecot_t, dovecot_auth, `, auth_chkpwd')
> allow dovecot_auth_t self:process { fork signal_perms };
> allow dovecot_auth_t dovecot_t:unix_stream_socket { getattr accept read write ioctl };
> allow dovecot_auth_t self:unix_dgram_socket create_socket_perms;
>diff -ru /usr/src/se/policy/domains/program/unused/gpm.te ./domains/program/unused/gpm.te
>--- /usr/src/se/policy/domains/program/unused/gpm.te 2004-11-25 20:37:11.000000000 +1100
>+++ ./domains/program/unused/gpm.te 2004-11-25 21:11:40.000000000 +1100
>@@ -32,8 +32,6 @@
> allow gpm_t self:unix_dgram_socket create_socket_perms;
> allow gpm_t self:unix_stream_socket create_stream_socket_perms;
>
>-allow gpm_t mouse_device_t:chr_file rw_file_perms;
>-
> # Read and write ttys.
> allow gpm_t tty_device_t:chr_file rw_file_perms;
>
>diff -ru /usr/src/se/policy/domains/program/unused/hald.te ./domains/program/unused/hald.te
>--- /usr/src/se/policy/domains/program/unused/hald.te 2004-11-25 20:37:11.000000000 +1100
>+++ ./domains/program/unused/hald.te 2004-11-25 21:12:51.000000000 +1100
>@@ -54,7 +54,7 @@
> allow hald_t udev_tbl_t:file { getattr read };
> ')
>
>-ifdef(`udev.te', `
>+ifdef(`hotplug.te', `
> r_dir_file(hald_t, hotplug_etc_t)
> ')
> allow hald_t usbdevfs_t:dir search;
>diff -ru /usr/src/se/policy/domains/program/unused/iptables.te ./domains/program/unused/iptables.te
>--- /usr/src/se/policy/domains/program/unused/iptables.te 2004-11-25 20:37:11.000000000 +1100
>+++ ./domains/program/unused/iptables.te 2004-11-25 23:18:50.000000000 +1100
>@@ -54,7 +54,7 @@
> ifdef(`gnome-pty-helper.te', `allow iptables_t sysadm_gph_t:fd use;')
>
> allow iptables_t proc_t:file { getattr read };
>-allow iptables_t proc_net_t:dir { search };
>+allow iptables_t proc_net_t:dir search;
> allow iptables_t proc_net_t:file { read getattr };
>
> # system-config-network appends to /var/log
>diff -ru /usr/src/se/policy/domains/program/unused/kudzu.te ./domains/program/unused/kudzu.te
>--- /usr/src/se/policy/domains/program/unused/kudzu.te 2004-11-21 21:51:13.000000000 +1100
>+++ ./domains/program/unused/kudzu.te 2004-11-25 21:14:19.000000000 +1100
>@@ -3,13 +3,17 @@
> # Author: Russell Coker <russell@coker.com.au>
> #
>
>-daemon_base_domain(kudzu, `, etc_writer, privmodule, sysctl_kernel_writer, fs_domain')
>+daemon_base_domain(kudzu, `, etc_writer, privmodule, sysctl_kernel_writer, fs_domain, privmem')
>
> read_locale(kudzu_t)
>
> # for /etc/sysconfig/hwconf - probably need a new type
> allow kudzu_t etc_runtime_t:file rw_file_perms;
>
>+# for kmodule
>+allow kudzu_t zero_device_t:chr_file rx_file_perms;
>+allow kudzu_t memory_device_t:chr_file { read write execute };
>+
> allow kudzu_t ramfs_t:dir search;
> allow kudzu_t ramfs_t:sock_file write;
> allow kudzu_t etc_t:file { getattr read };
>diff -ru /usr/src/se/policy/domains/program/unused/mailman.te ./domains/program/unused/mailman.te
>--- /usr/src/se/policy/domains/program/unused/mailman.te 2004-11-20 01:18:16.000000000 +1100
>+++ ./domains/program/unused/mailman.te 2004-11-25 21:14:51.000000000 +1100
>@@ -71,8 +71,7 @@
> domain_auto_trans({ httpd_t httpd_suexec_t }, mailman_cgi_exec_t, mailman_cgi_t)
> # should have separate types for public and private archives
> r_dir_file(httpd_t, mailman_archive_t)
>-rw_dir_file(mailman_cgi_t, mailman_archive_t)
>-allow mailman_cgi_t mailman_archive_t:lnk_file create_lnk_perms;
>+rw_dir_create_file(mailman_cgi_t, mailman_archive_t)
> allow httpd_t mailman_data_t:dir { getattr search };
>
> dontaudit mailman_cgi_t httpd_log_t:file append;
>@@ -84,7 +83,6 @@
> allow mailman_cgi_t devtty_t:chr_file { read write };
> allow mailman_cgi_t self:process { fork sigchld };
> allow mailman_cgi_t var_spool_t:dir search;
>-dontaudit mailman_cgi_t src_t:dir search;
> ')
>
> allow mta_delivery_agent mailman_data_t:dir search;
>diff -ru /usr/src/se/policy/domains/program/unused/ping.te ./domains/program/unused/ping.te
>--- /usr/src/se/policy/domains/program/unused/ping.te 2004-11-20 01:18:16.000000000 +1100
>+++ ./domains/program/unused/ping.te 2004-11-22 03:14:43.000000000 +1100
>@@ -55,5 +55,5 @@
> # it tries to access /var/run
> dontaudit ping_t var_t:dir search;
> dontaudit ping_t devtty_t:chr_file { read write };
>-dontaudit ping_t ping_t:capability sys_tty_config;
>+dontaudit ping_t self:capability sys_tty_config;
>
>diff -ru /usr/src/se/policy/domains/program/unused/postgresql.te ./domains/program/unused/postgresql.te
>--- /usr/src/se/policy/domains/program/unused/postgresql.te 2004-11-25 20:37:12.000000000 +1100
>+++ ./domains/program/unused/postgresql.te 2004-11-25 22:35:08.000000000 +1100
>@@ -34,7 +34,7 @@
>
> # capability kill is for shutdown script
> allow postgresql_t self:capability { kill dac_override dac_read_search chown fowner fsetid setuid setgid sys_nice sys_tty_config };
>-dontaudit postgresql_t postgresql_t:capability { sys_admin };
>+dontaudit postgresql_t self:capability sys_admin;
>
> etcdir_domain(postgresql)
> typealias postgresql_etc_t alias etc_postgresql_t;
>diff -ru /usr/src/se/policy/domains/program/unused/postgrey.te ./domains/program/unused/postgrey.te
>--- /usr/src/se/policy/domains/program/unused/postgrey.te 2004-08-28 12:05:04.000000000 +1000
>+++ ./domains/program/unused/postgrey.te 2004-11-13 01:02:26.000000000 +1100
>@@ -20,10 +20,11 @@
> can_network(postgrey_t)
> can_ypbind(postgrey_t)
> allow postgrey_t postgrey_port_t:tcp_socket name_bind;
>+allow postgrey_t self:unix_dgram_socket create_socket_perms;
> allow postgrey_t self:unix_stream_socket create_stream_socket_perms;
> allow postgrey_t proc_t:file { getattr read };
>
>-allow postgrey_t self:capability { chown setuid };
>+allow postgrey_t self:capability { chown setgid setuid };
> dontaudit postgrey_t self:capability sys_tty_config;
>
> var_lib_domain(postgrey)
>diff -ru /usr/src/se/policy/domains/program/unused/rhgb.te ./domains/program/unused/rhgb.te
>--- /usr/src/se/policy/domains/program/unused/rhgb.te 2004-11-13 03:56:03.000000000 +1100
>+++ ./domains/program/unused/rhgb.te 2004-11-22 03:14:43.000000000 +1100
>@@ -22,7 +22,7 @@
> allow rhgb_t proc_t:file { getattr read };
>
> allow rhgb_t devtty_t:chr_file { read write };
>-allow rhgb_t tty_device_t:chr_file { ioctl read write };
>+allow rhgb_t tty_device_t:chr_file rw_file_perms;
>
> read_locale(rhgb_t)
> allow rhgb_t { etc_t etc_runtime_t }:file { getattr read };
>@@ -85,7 +85,7 @@
> ifdef(`firstboot.te', `
> allow rhgb_t firstboot_rw_t:file r_file_perms;
> ')
>-dontaudit rhgb_t tmp_t:dir search;
>+allow rhgb_t tmp_t:dir search;
> allow rhgb_t xdm_xserver_t:process sigkill;
> allow domain rhgb_devpts_t:chr_file { read write };
> ifdef(`fsadm.te', `
>diff -ru /usr/src/se/policy/domains/program/unused/sendmail.te ./domains/program/unused/sendmail.te
>--- /usr/src/se/policy/domains/program/unused/sendmail.te 2004-11-13 03:56:04.000000000 +1100
>+++ ./domains/program/unused/sendmail.te 2004-11-25 22:43:05.000000000 +1100
>@@ -99,5 +99,7 @@
> allow system_mail_t sysctl_kernel_t:file read;
> dontaudit system_mail_t system_crond_tmp_t:file append;
> dontaudit sendmail_t admin_tty_type:chr_file { getattr ioctl };
>+
>+# sendmail wants to read /var/run/utmp if the controlling tty is /dev/console
> allow sendmail_t initrc_var_run_t:file { getattr read };
> dontaudit sendmail_t initrc_var_run_t:file { lock write };
>diff -ru /usr/src/se/policy/domains/program/unused/sxid.te ./domains/program/unused/sxid.te
>--- /usr/src/se/policy/domains/program/unused/sxid.te 2004-08-19 17:10:37.000000000 +1000
>+++ ./domains/program/unused/sxid.te 2004-11-13 04:00:22.000000000 +1100
>@@ -29,6 +29,7 @@
>
> allow sxid_t file_type:notdevfile_class_set getattr;
> allow sxid_t { device_t device_type }:{ chr_file blk_file } getattr;
>+allow sxid_t ttyfile:chr_file getattr;
> allow sxid_t file_type:dir { getattr read search };
> allow sxid_t sysadmfile:file read;
> allow sxid_t root_dir_type:dir { getattr read search };
>diff -ru /usr/src/se/policy/domains/program/unused/tftpd.te ./domains/program/unused/tftpd.te
>--- /usr/src/se/policy/domains/program/unused/tftpd.te 2004-10-20 09:31:10.000000000 +1000
>+++ ./domains/program/unused/tftpd.te 2004-11-13 04:00:39.000000000 +1100
>@@ -16,7 +16,7 @@
> type tftp_port_t, port_type, reserved_port_type;
>
> # tftpdir_t is the type of files in the /tftpboot directories.
>-type tftpdir_t, file_type, root_dir_type, sysadmfile;
>+type tftpdir_t, file_type, sysadmfile;
> r_dir_file(tftpd_t, tftpdir_t)
>
> domain_auto_trans(inetd_t, tftpd_exec_t, tftpd_t)
>diff -ru /usr/src/se/policy/domains/user.te ./domains/user.te
>--- /usr/src/se/policy/domains/user.te 2004-11-25 20:37:08.000000000 +1100
>+++ ./domains/user.te 2004-11-25 22:46:14.000000000 +1100
>@@ -48,6 +48,8 @@
> allow $1_r $2_r;
> type_change $2_t $1_devpts_t:chr_file $2_devpts_t;
> type_change $2_t $1_tty_device_t:chr_file $2_tty_device_t;
>+# avoid annoying messages on terminal hangup
>+dontaudit $1_t { $2_devpts_t $2_tty_device_t }:chr_file ioctl;
> ')
>
> # Reach sysadm_t via programs like userhelper/sudo/su
>diff -ru /usr/src/se/policy/file_contexts/program/amanda.fc ./file_contexts/program/amanda.fc
>--- /usr/src/se/policy/file_contexts/program/amanda.fc 2004-11-13 03:56:05.000000000 +1100
>+++ ./file_contexts/program/amanda.fc 2004-11-13 04:03:15.000000000 +1100
>@@ -1,8 +1,6 @@
> #
> # Author: Carsten Grohmann <carstengrohmann@gmx.de>
> #
>-# $Id: amanda.fc,v 1.3 2004/03/03 20:55:53 sds Exp $
>-#
>
> # amanda
> /etc/amanda(/.*)? system_u:object_r:amanda_config_t
>diff -ru /usr/src/se/policy/file_contexts/program/sendmail.fc ./file_contexts/program/sendmail.fc
>--- /usr/src/se/policy/file_contexts/program/sendmail.fc 2004-11-21 21:51:16.000000000 +1100
>+++ ./file_contexts/program/sendmail.fc 2004-11-22 02:45:31.000000000 +1100
>@@ -1,5 +1,6 @@
> # sendmail
> /etc/mail(/.*)? system_u:object_r:etc_mail_t
>+/var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t
> /var/log/sendmail\.st -- system_u:object_r:sendmail_log_t
> /var/log/mail(/.*)? system_u:object_r:sendmail_log_t
> /var/run/sendmail\.pid -- system_u:object_r:sendmail_var_run_t
>diff -ru /usr/src/se/policy/file_contexts/types.fc ./file_contexts/types.fc
>--- /usr/src/se/policy/file_contexts/types.fc 2004-11-25 20:37:14.000000000 +1100
>+++ ./file_contexts/types.fc 2004-11-22 03:14:43.000000000 +1100
>@@ -399,7 +396,6 @@
> #
> /var/spool(/.*)? system_u:object_r:var_spool_t
> /var/spool/texmf(/.*)? system_u:object_r:tetex_data_t
>-/var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t
>
> #
> # /var/log
>diff -ru /usr/src/se/policy/macros/admin_macros.te ./macros/admin_macros.te
>--- /usr/src/se/policy/macros/admin_macros.te 2004-11-25 20:37:20.000000000 +1100
>+++ ./macros/admin_macros.te 2004-11-25 22:57:58.000000000 +1100
>@@ -25,7 +25,7 @@
> tmp_domain($1)
>
> # Type for tty devices.
>-type $1_tty_device_t, file_type, sysadmfile, ttyfile, dev_fs;
>+type $1_tty_device_t, sysadmfile, ttyfile, dev_fs;
>
> # Inherit rules for ordinary users.
> base_user_domain($1)
>diff -ru /usr/src/se/policy/macros/base_user_macros.te ./macros/base_user_macros.te
>--- /usr/src/se/policy/macros/base_user_macros.te 2004-11-25 20:37:20.000000000 +1100
>+++ ./macros/base_user_macros.te 2004-11-25 23:01:56.000000000 +1100
>@@ -349,7 +344,7 @@
> #
> # Running ifconfig as a user generates the following
> #
>-dontaudit $1_t $1_t:socket create;
>+dontaudit $1_t self:socket create;
> dontaudit $1_t sysctl_net_t:dir search;
>
> dontaudit $1_t default_context_t:dir search;
>diff -ru /usr/src/se/policy/macros/program/crontab_macros.te ./macros/program/crontab_macros.te
>--- /usr/src/se/policy/macros/program/crontab_macros.te 2004-11-13 03:56:11.000000000 +1100
>+++ ./macros/program/crontab_macros.te 2004-11-22 03:14:43.000000000 +1100
>@@ -55,6 +55,7 @@
> allow $1_crontab_t self:process { fork signal_perms };
> ifdef(`fcron.te', `
> # fcron wants an instant update of a crontab change for the administrator
>+# also crontab does a security check for crontab -u
> ifelse(`$1', `sysadm', `
> allow $1_crontab_t crond_t:process signal;
> can_setfscreate($1_crontab_t)
>@@ -63,6 +64,9 @@
> ')dnl end ifelse
> ')dnl end ifdef fcron
>
>+# for the checks used by crontab -u
>+dontaudit $1_crontab_t security_t:dir search;
>+
> # crontab signals crond by updating the mtime on the spooldir
> allow $1_crontab_t cron_spool_t:dir setattr;
> # Allow crond to read those crontabs in cron spool.
>diff -ru /usr/src/se/policy/macros/program/mozilla_macros.te ./macros/program/mozilla_macros.te
>--- /usr/src/se/policy/macros/program/mozilla_macros.te 2004-11-25 20:37:21.000000000 +1100
>+++ ./macros/program/mozilla_macros.te 2004-11-25 23:07:56.000000000 +1100
>@@ -29,8 +30,7 @@
>
> allow $1_mozilla_t usr_t:{ lnk_file file } { getattr read };
> allow $1_mozilla_t var_lib_t:file { getattr read };
>-allow $1_mozilla_t { random_device_t urandom_device_t }:chr_file { getattr ioctl read append };
>-
>+allow $1_mozilla_t { random_device_t urandom_device_t }:chr_file { getattr ioctl read };
> allow $1_mozilla_t self:socket create_socket_perms;
> allow $1_mozilla_t self:file { getattr read };
>
>@@ -71,8 +71,6 @@
> dontaudit $1_lpr_t $1_mozilla_t:unix_stream_socket { read write };
> ')
>
>-dontaudit $1_mozilla_t tmp_t:lnk_file read;
>-
> #
> # This is another place where I sould like to allow system customization.
> # We need to allow the admin to select whether then want to allow mozilla
>diff -ru /usr/src/se/policy/macros/program/screen_macros.te ./macros/program/screen_macros.te
>--- /usr/src/se/policy/macros/program/screen_macros.te 2004-11-20 01:18:25.000000000 +1100
>+++ ./macros/program/screen_macros.te 2004-11-22 03:18:59.000000000 +1100
>@@ -88,7 +88,6 @@
> # get stats
> allow $1_screen_t proc_t:dir search;
> allow $1_screen_t proc_t:lnk_file read;
>-dontaudit $1_screen_t device_t:chr_file getattr;
> allow $1_screen_t etc_t:{ file lnk_file } { read getattr };
> allow $1_screen_t self:dir { search read };
> allow $1_screen_t self:lnk_file read;
>diff -ru /usr/src/se/policy/macros/program/userhelper_macros.te ./macros/program/userhelper_macros.te
>--- /usr/src/se/policy/macros/program/userhelper_macros.te 2004-11-25 20:37:21.000000000 +1100
>+++ ./macros/program/userhelper_macros.te 2004-11-22 03:14:43.000000000 +1100
>@@ -38,9 +38,6 @@
> # Inherit descriptors from the current session.
> allow $1_userhelper_t { init_t privfd }:fd use;
>
>-# Execute /sbin/unix_chkpwd to check the password.
>-allow $1_userhelper_t sbin_t:dir r_dir_perms;
>-
> can_exec($1_userhelper_t, { bin_t sbin_t userhelper_exec_t })
>
> # Execute shells
>diff -ru /usr/src/se/policy/macros/user_macros.te ./macros/user_macros.te
>--- /usr/src/se/policy/macros/user_macros.te 2004-11-20 01:18:25.000000000 +1100
>+++ ./macros/user_macros.te 2004-11-22 03:14:43.000000000 +1100
>@@ -197,8 +197,10 @@
>
> dontaudit $1_t sysadm_home_t:dir { read search getattr };
> dontaudit $1_t sysadm_home_t:file { read getattr append };
>+ifdef(`distro_redhat', `
> # gam_server fires off these when exploring with mozilla/nautilous
> dontaudit $1_t file_type:dir getattr;
>+')
>
> ifdef(`syslogd.te', `
> # Some programs that are left in $1_t will try to connect
>diff -ru /usr/src/se/policy/types/file.te ./types/file.te
>--- /usr/src/se/policy/types/file.te 2004-11-13 03:56:14.000000000 +1100
>+++ ./types/file.te 2004-11-22 03:14:43.000000000 +1100
>@@ -256,7 +256,7 @@
> # Allow each file type to be associated with
> # the default file system type.
> #
>-allow { file_type device_type } fs_t:filesystem associate;
>+allow { file_type device_type ttyfile } fs_t:filesystem associate;
> ifdef(`distro_redhat', `
> allow { dev_fs ttyfile } tmpfs_t:filesystem associate;
> ')
>
>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-11-25 13:27 policy patch Russell Coker
` (2 preceding siblings ...)
2004-11-29 21:47 ` Daniel J Walsh
@ 2004-11-30 16:42 ` Daniel J Walsh
3 siblings, 0 replies; 27+ messages in thread
From: Daniel J Walsh @ 2004-11-30 16:42 UTC (permalink / raw)
To: Jim Carter; +Cc: SELinux List
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
Remove root_type_dir totally from package
Change many can_network calls to can_network_server, can_network_client
or more specific.
Removing alot of code from anaconda.te (It just runs unconfined_t
anyways, in permissive mode).
Added some proc_net_t fixes.
Cleanup and fixes for kudzu
Minor fixes for postgres
Other minor fixes and some changes to make Targeted policy work...
[-- Attachment #2: policy-20041130.patch --]
[-- Type: text/x-patch, Size: 88394 bytes --]
diff --exclude-from=exclude -N -u -r nsapolicy/attrib.te policy-1.19.7/attrib.te
--- nsapolicy/attrib.te 2004-11-18 08:13:57.000000000 -0500
+++ policy-1.19.7/attrib.te 2004-11-30 11:29:15.963154568 -0500
@@ -225,14 +225,6 @@
# overall filesystem statistics.
attribute fs_type;
-# The root_dir_type attribute identifies all types assigned to
-# root directories of filesystems (not limited to persistent
-# filesystems).
-# XXX This attribute was used to grant mountassociate permission,
-# XXX but this permission is no longer defined. We can likely
-# XXX remove this attribute.
-attribute root_dir_type;
-
# The exec_type attribute identifies all types assigned
# to entrypoint executables for domains. This attribute is
# used in TE rules and assertions that should be applied to all
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/crond.te policy-1.19.7/domains/program/crond.te
--- nsapolicy/domains/program/crond.te 2004-11-18 08:13:57.000000000 -0500
+++ policy-1.19.7/domains/program/crond.te 2004-11-30 11:28:52.772764771 -0500
@@ -147,7 +147,7 @@
')
# Stat any file and search any directory for find.
-allow system_crond_t { root_dir_type file_type fs_type }:notdevfile_class_set getattr;
+allow system_crond_t { file_type fs_type }:notdevfile_class_set getattr;
allow system_crond_t device_type:{ chr_file blk_file } getattr;
allow system_crond_t file_type:dir { read search getattr };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ldconfig.te policy-1.19.7/domains/program/ldconfig.te
--- nsapolicy/domains/program/ldconfig.te 2004-11-20 22:29:08.000000000 -0500
+++ policy-1.19.7/domains/program/ldconfig.te 2004-11-30 06:18:45.000000000 -0500
@@ -42,3 +42,4 @@
allow ldconfig_t { var_lib_t bin_t }:dir search;
')
+allow ldconfig_t proc_t:file read;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/modutil.te policy-1.19.7/domains/program/modutil.te
--- nsapolicy/domains/program/modutil.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/modutil.te 2004-11-30 06:18:45.000000000 -0500
@@ -77,7 +77,6 @@
ifdef(`unlimitedUtils', `
unconfined_domain(insmod_t)
')
-can_network(insmod_t)
can_ypbind(insmod_t)
uses_shlib(insmod_t)
read_locale(insmod_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/mount.te policy-1.19.7/domains/program/mount.te
--- nsapolicy/domains/program/mount.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/mount.te 2004-11-30 06:18:45.000000000 -0500
@@ -64,7 +64,7 @@
ifdef(`portmap.te', `
# for nfs
-can_network(mount_t)
+can_network_server(mount_t)
can_ypbind(mount_t)
allow mount_t port_t:{ tcp_socket udp_socket } name_bind;
allow mount_t reserved_port_t:{ tcp_socket udp_socket } name_bind;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ssh.te policy-1.19.7/domains/program/ssh.te
--- nsapolicy/domains/program/ssh.te 2004-11-18 08:13:57.000000000 -0500
+++ policy-1.19.7/domains/program/ssh.te 2004-11-30 06:18:45.000000000 -0500
@@ -68,7 +68,7 @@
# Read /dev/urandom
allow $1_t urandom_device_t:chr_file { getattr read };
-can_network($1_t)
+can_network_client($1_t)
allow $1_t self:capability { kill sys_chroot sys_resource chown dac_override fowner fsetid setgid setuid sys_tty_config };
allow $1_t { home_root_t home_dir_type }:dir { search getattr };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/syslogd.te policy-1.19.7/domains/program/syslogd.te
--- nsapolicy/domains/program/syslogd.te 2004-11-20 22:29:08.000000000 -0500
+++ policy-1.19.7/domains/program/syslogd.te 2004-11-30 06:18:45.000000000 -0500
@@ -20,7 +20,7 @@
')
# can_network is for the UDP socket
-can_network(syslogd_t)
+can_network_udp(syslogd_t)
can_ypbind(syslogd_t)
r_dir_file(syslogd_t, sysfs_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/amanda.te policy-1.19.7/domains/program/unused/amanda.te
--- nsapolicy/domains/program/unused/amanda.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/amanda.te 2004-11-30 06:18:45.000000000 -0500
@@ -170,7 +170,7 @@
# Network and process communication
###################################
-can_network(amanda_t);
+can_network_server(amanda_t);
can_ypbind(amanda_t);
allow amanda_t self:fifo_file { getattr read write ioctl lock };
@@ -247,7 +247,7 @@
# amrecover network and process communication
#############################################
-can_network(amanda_recover_t);
+can_network_server(amanda_recover_t);
can_ypbind(amanda_recover_t);
allow amanda_recover_t self:fifo_file { getattr ioctl read write };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/anaconda.te policy-1.19.7/domains/program/unused/anaconda.te
--- nsapolicy/domains/program/unused/anaconda.te 2004-11-18 08:13:57.000000000 -0500
+++ policy-1.19.7/domains/program/unused/anaconda.te 2004-11-30 07:09:53.000000000 -0500
@@ -12,241 +12,36 @@
#
type anaconda_t, admin, etc_writer, fs_domain, privmem, auth_write, domain, privlog, privowner, privmodule, sysctl_kernel_writer, unrestricted;
role system_r types anaconda_t;
-uses_shlib(anaconda_t);
+unconfined_domain(anaconda_t);
-# for halt to down interfaces
-allow anaconda_t self:udp_socket create_socket_perms;
-
-# read files in /etc/init.d
-allow anaconda_t etc_t:lnk_file r_file_perms;
-
-allow anaconda_t self:passwd rootok;
-read_locale(anaconda_t)
-
-r_dir_file(anaconda_t, usr_t)
-
-# Read system information files in /proc.
-allow anaconda_t proc_t:dir r_dir_perms;
-allow anaconda_t proc_t:{ file lnk_file } r_file_perms;
-
-# Allow IPC with self
-allow anaconda_t self:unix_dgram_socket create_socket_perms;
-allow anaconda_t self:unix_stream_socket { connectto create_stream_socket_perms };
-allow anaconda_t self:fifo_file rw_file_perms;
-
-# Read the root directory of a usbdevfs filesystem, and
-# the devices and drivers files. Permit stating of the
-# device nodes, but nothing else.
-allow anaconda_t usbdevfs_t:dir r_dir_perms;
-allow anaconda_t usbdevfs_t:lnk_file r_file_perms;
-allow anaconda_t usbdevfs_t:file getattr;
-
-# allow anaconda to fork and renice itself
-allow anaconda_t self:process { fork sigchld setsched setpgid };
-
-# Can create ptys for open_init_pty
-can_create_pty(anaconda)
-
-tmp_domain(anaconda)
-
-var_run_domain(anaconda)
-allow anaconda_t var_run_t:{ file sock_file lnk_file } unlink;
-allow anaconda_t var_run_t:dir { create rmdir };
-
-allow anaconda_t framebuf_device_t:chr_file r_file_perms;
-
-# Use capabilities.
-allow anaconda_t self:capability ~{ sys_admin sys_module };
-
-# Use system operations.
-allow anaconda_t kernel_t:system *;
-
-# Run helper programs in the anaconda_t domain.
-allow anaconda_t { bin_t sbin_t }:dir r_dir_perms;
-allow anaconda_t { bin_t sbin_t }:lnk_file read;
-can_exec(anaconda_t, etc_t)
-can_exec(anaconda_t, lib_t)
-can_exec(anaconda_t, bin_t)
-can_exec(anaconda_t, sbin_t)
-can_exec(anaconda_t, exec_type)
-#
-# These rules are here to allow init scripts to su
-#
role system_r types ldconfig_t;
domain_auto_trans(anaconda_t, ldconfig_exec_t, ldconfig_t)
role system_r types sysadm_su_t;
domain_auto_trans(anaconda_t, su_exec_t, sysadm_su_t)
-allow anaconda_t self:passwd rootok;
-
-# read /lib/modules
-allow anaconda_t modules_object_t:dir { search read };
-
-# Read conf.modules.
-allow anaconda_t modules_conf_t:file r_file_perms;
# Run other rc scripts in the anaconda_t domain.
domain_auto_trans(anaconda_t, initrc_exec_t, initrc_t)
-# Run init (telinit) in the anaconda_t domain.
-can_exec(anaconda_t, init_exec_t)
-
-# Communicate with the init process.
-allow anaconda_t initctl_t:fifo_file rw_file_perms;
-
-# Read /proc/PID directories for all domains.
-can_ps(anaconda_t, domain)
-allow anaconda_t domain:process getsession;
-
-# Mount and unmount file systems.
-allow anaconda_t fs_type:filesystem mount_fs_perms;
-allow anaconda_t file_t:dir { read search getattr mounton };
-
-# Update /etc/ld.so.cache.
-allow anaconda_t ld_so_cache_t:file rw_file_perms;
-
-ifdef(`sendmail.te', `
-# Update /etc/mail.
-allow anaconda_t etc_mail_t:file { setattr rw_file_perms };
-')
-
-# Update /var/log/wtmp and /var/log/dmesg.
-allow anaconda_t wtmp_t:file { setattr rw_file_perms };
-allow anaconda_t var_log_t:file { setattr rw_file_perms };
-allow anaconda_t lastlog_t:file { setattr rw_file_perms };
domain_auto_trans(anaconda_t, dmesg_exec_t, dmesg_t)
-# remove old locks
-allow anaconda_t lockfile:dir rw_dir_perms;
-allow anaconda_t lockfile:file { getattr unlink };
-
-# Access /var/lib/random-seed.
-allow anaconda_t var_lib_t:file rw_file_perms;
-allow anaconda_t var_lib_t:file unlink;
-
-# Create lock file.
-allow anaconda_t var_lock_t:dir create_dir_perms;
-allow anaconda_t var_lock_t:file create_file_perms;
-
-# Set the clock.
-allow anaconda_t clock_device_t:devfile_class_set rw_file_perms;
-
-# Kill all processes.
-allow anaconda_t domain:process signal_perms;
-
-# Write to /dev/urandom.
-allow anaconda_t urandom_device_t:chr_file rw_file_perms;
-
-# Set device ownerships/modes.
-allow anaconda_t framebuf_device_t:lnk_file read;
-allow anaconda_t framebuf_device_t:devfile_class_set setattr;
-allow anaconda_t misc_device_t:devfile_class_set setattr;
-allow anaconda_t device_t:devfile_class_set setattr;
-allow anaconda_t fixed_disk_device_t:devfile_class_set setattr;
-allow anaconda_t removable_device_t:devfile_class_set setattr;
-
-# Stat any file.
-allow anaconda_t file_type:file_class_set getattr;
-allow anaconda_t file_type:dir { search getattr };
-
-# Read and write console and ttys.
-allow anaconda_t devtty_t:chr_file rw_file_perms;
-allow anaconda_t console_device_t:chr_file rw_file_perms;
-allow anaconda_t tty_device_t:chr_file rw_file_perms;
-allow anaconda_t ttyfile:chr_file rw_file_perms;
-allow anaconda_t ptyfile:chr_file rw_file_perms;
-
-# Reset tty labels.
-allow anaconda_t ttyfile:chr_file relabelfrom;
-allow anaconda_t tty_device_t:chr_file relabelto;
-
ifdef(`distro_redhat', `
-# Create and read /boot/kernel.h and /boot/System.map.
-# Redhat systems typically create this file at boot time.
-allow anaconda_t boot_t:lnk_file rw_file_perms;
file_type_auto_trans(anaconda_t, boot_t, boot_runtime_t, file)
')
-allow anaconda_t system_map_t:{ file lnk_file } r_file_perms;
-
-# Unlink /halt.
-allow anaconda_t root_t:dir { search write remove_name };
-allow anaconda_t root_t:file { unlink write };
-
-allow anaconda_t var_spool_t:file rw_file_perms;
-
-# Allow access to the sysadm TTYs. Note that this will give access to the
-# TTYs to any process in the anaconda_t domain. Therefore, daemons and such
-# started from init should be placed in their own domain.
-allow anaconda_t admin_tty_type:chr_file rw_file_perms;
-
-# Access sound device and files.
-allow anaconda_t sound_device_t:chr_file { setattr ioctl read write };
-ifdef(`sound.te', `allow anaconda_t sound_file_t:file { setattr write };')
-
-ifdef(`distro_redhat', `
ifdef(`rpm.te', `
# Access /var/lib/rpm.
-allow anaconda_t rpm_var_lib_t:dir rw_dir_perms;
-allow anaconda_t rpm_var_lib_t:file create_file_perms;
domain_auto_trans(anaconda_t, rpm_exec_t, rpm_t)
')
-')
-# Update /var/log/ksyms.*.
-# badly named type, /var/log/boot gets the same name too which is confusing
file_type_auto_trans(anaconda_t, var_log_t, var_log_ksyms_t, file)
-ifdef(`apmd.te', `
-# Access /dev/apm_bios.
-allow anaconda_t apm_bios_t:chr_file { setattr getattr };')
-
-ifdef(`lpd.te', `
-# Read printconf files.
-allow anaconda_t printconf_t:dir r_dir_perms;
-allow anaconda_t printconf_t:file r_file_perms;')
-
-# Create and delete /.autofsck
-allow anaconda_t root_t:dir { search write add_name };
-allow anaconda_t root_t:file { create setattr unlink getattr };
-allow anaconda_t file_t:file { unlink getattr };
-
-# Read user home directories.
-allow anaconda_t { home_root_t home_type }:dir r_dir_perms;
-allow anaconda_t home_type:file r_file_perms;
-
-# for system start scripts
-allow anaconda_t pidfile:dir rw_dir_perms;
-allow anaconda_t pidfile:sock_file unlink;
-rw_dir_create_file(anaconda_t, var_lib_t)
-
-# allow start scripts to clean /tmp
-allow anaconda_t { unlabeled_t tmpfile }:dir { rw_dir_perms rmdir };
-allow anaconda_t { unlabeled_t tmpfile }:notdevfile_class_set { getattr unlink };
-
-# for lsof which is used by alsa shutdown
-dontaudit anaconda_t domain:{ udp_socket tcp_socket fifo_file unix_dgram_socket } getattr;
-dontaudit anaconda_t proc_kmsg_t:file getattr;
-
-# Rsync
-dontaudit anaconda_t mail_spool_t:lnk_file read;
-
-allow anaconda_t sysfs_t:dir { getattr read search };
-allow anaconda_t sysfs_t:file { getattr read };
-allow anaconda_t sysfs_t:lnk_file { getattr read };
-allow anaconda_t udev_runtime_t:file rw_file_perms;
-allow anaconda_t device_type:chr_file setattr;
-
-# for lsof in shutdown scripts
-allow anaconda_t security_t:dir getattr;
ifdef(`udev.te', `
domain_auto_trans(anaconda_t, udev_exec_t, udev_t)
')
-can_kerberos(anaconda_t)
ifdef(`ssh-agent.te', `
role system_r types sysadm_ssh_agent_t;
domain_auto_trans(anaconda_t, ssh_agent_exec_t, sysadm_ssh_agent_t)
')
domain_auto_trans(anaconda_t , admin_passwd_exec_t, sysadm_passwd_t)
-unconfined_domain(anaconda_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/arpwatch.te policy-1.19.7/domains/program/unused/arpwatch.te
--- nsapolicy/domains/program/unused/arpwatch.te 2004-11-20 22:29:08.000000000 -0500
+++ policy-1.19.7/domains/program/unused/arpwatch.te 2004-11-30 06:18:45.000000000 -0500
@@ -18,7 +18,7 @@
allow arpwatch_t self:capability { net_admin net_raw setgid setuid };
-can_network(arpwatch_t)
+can_network_server(arpwatch_t)
allow arpwatch_t self:netlink_route_socket r_netlink_socket_perms;
allow arpwatch_t self:udp_socket create_socket_perms;
allow arpwatch_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/asterisk.te policy-1.19.7/domains/program/unused/asterisk.te
--- nsapolicy/domains/program/unused/asterisk.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/asterisk.te 2004-11-30 06:18:45.000000000 -0500
@@ -39,7 +39,7 @@
# are labeled usr_t
allow asterisk_t usr_t:file r_file_perms;
-can_network(asterisk_t)
+can_network_server(asterisk_t)
can_ypbind(asterisk_t)
allow asterisk_t etc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/automount.te policy-1.19.7/domains/program/unused/automount.te
--- nsapolicy/domains/program/unused/automount.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/automount.te 2004-11-30 06:18:45.000000000 -0500
@@ -33,7 +33,7 @@
# because config files can be shell scripts
can_exec(automount_t, { etc_t automount_etc_t })
-can_network(automount_t)
+can_network_server(automount_t)
can_ypbind(automount_t)
ifdef(`fsadm.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/backup.te policy-1.19.7/domains/program/unused/backup.te
--- nsapolicy/domains/program/unused/backup.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/backup.te 2004-11-30 06:18:45.000000000 -0500
@@ -26,7 +26,7 @@
# for SSP
allow backup_t urandom_device_t:chr_file read;
-can_network(backup_t)
+can_network_server(backup_t)
can_ypbind(backup_t)
uses_shlib(backup_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/bluetooth.te policy-1.19.7/domains/program/unused/bluetooth.te
--- nsapolicy/domains/program/unused/bluetooth.te 2004-11-18 08:13:57.000000000 -0500
+++ policy-1.19.7/domains/program/unused/bluetooth.te 2004-11-30 06:18:45.000000000 -0500
@@ -20,7 +20,7 @@
rw_dir_create_file(bluetooth_t, var_lock_t)
# Use the network.
-can_network(bluetooth_t)
+can_network_server(bluetooth_t)
can_ypbind(bluetooth_t)
ifdef(`dbusd.te', `
dbusd_client(system, bluetooth)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/calamaris.te policy-1.19.7/domains/program/unused/calamaris.te
--- nsapolicy/domains/program/unused/calamaris.te 2004-11-05 23:24:16.000000000 -0500
+++ policy-1.19.7/domains/program/unused/calamaris.te 2004-11-30 06:18:45.000000000 -0500
@@ -59,7 +59,7 @@
allow calamaris_t etc_t:lnk_file read;
dontaudit calamaris_t etc_t:file ioctl;
dontaudit calamaris_t sysadm_home_dir_t:dir { getattr search };
-can_network(calamaris_t)
+can_network_server(calamaris_t)
can_ypbind(calamaris_t)
ifdef(`named.te', `
can_udp_send(calamaris_t, named_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/canna.te policy-1.19.7/domains/program/unused/canna.te
--- nsapolicy/domains/program/unused/canna.te 2004-10-19 16:03:06.000000000 -0400
+++ policy-1.19.7/domains/program/unused/canna.te 2004-11-30 06:18:45.000000000 -0500
@@ -28,7 +28,7 @@
rw_dir_create_file(canna_t, canna_var_lib_t)
-can_network(canna_t)
+can_network_tcp(canna_t)
can_ypbind(canna_t)
allow userdomain canna_var_run_t:dir search;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ciped.te policy-1.19.7/domains/program/unused/ciped.te
--- nsapolicy/domains/program/unused/ciped.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/ciped.te 2004-11-30 06:18:45.000000000 -0500
@@ -7,7 +7,7 @@
type cipe_port_t, port_type;
-can_network(ciped_t)
+can_network_server(ciped_t)
can_ypbind(ciped_t)
allow ciped_t cipe_port_t:udp_socket name_bind;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/clamav.te policy-1.19.7/domains/program/unused/clamav.te
--- nsapolicy/domains/program/unused/clamav.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/clamav.te 2004-11-30 06:18:45.000000000 -0500
@@ -22,7 +22,7 @@
allow freshclam_t sysctl_kernel_t:dir search;
allow freshclam_t sysctl_kernel_t:file { getattr read };
-can_network(freshclam_t)
+can_network_server(freshclam_t)
can_ypbind(freshclam_t)
# Access virus signatures
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/courier.te policy-1.19.7/domains/program/unused/courier.te
--- nsapolicy/domains/program/unused/courier.te 2004-11-18 08:13:57.000000000 -0500
+++ policy-1.19.7/domains/program/unused/courier.te 2004-11-30 06:18:45.000000000 -0500
@@ -46,7 +46,7 @@
allow courier_$1_t self:capability dac_override;
# Use the network.
-can_network(courier_$1_t)
+can_network_server(courier_$1_t)
allow courier_$1_t self:fifo_file { read write getattr };
allow courier_$1_t self:unix_stream_socket create_stream_socket_perms;
allow courier_$1_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/cups.te policy-1.19.7/domains/program/unused/cups.te
--- nsapolicy/domains/program/unused/cups.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/cups.te 2004-11-30 06:20:21.000000000 -0500
@@ -191,7 +191,7 @@
rw_dir_create_file(cupsd_config_t, cupsd_etc_t)
rw_dir_create_file(cupsd_config_t, cupsd_rw_etc_t)
-can_network(cupsd_config_t)
+can_network_server_tcp(cupsd_config_t)
can_tcp_connect(cupsd_config_t, cupsd_t)
allow cupsd_config_t self:fifo_file rw_file_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dante.te policy-1.19.7/domains/program/unused/dante.te
--- nsapolicy/domains/program/unused/dante.te 2004-11-19 14:25:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/dante.te 2004-11-30 06:18:45.000000000 -0500
@@ -7,7 +7,7 @@
type socks_port_t, port_type;
daemon_domain(dante)
-can_network(dante_t)
+can_network_server(dante_t)
allow dante_t self:fifo_file { read write };
allow dante_t self:capability { setuid };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ddclient.te policy-1.19.7/domains/program/unused/ddclient.te
--- nsapolicy/domains/program/unused/ddclient.te 2004-10-29 14:33:17.000000000 -0400
+++ policy-1.19.7/domains/program/unused/ddclient.te 2004-11-30 06:18:45.000000000 -0500
@@ -29,7 +29,7 @@
allow ddclient_t sysctl_net_t:dir { search };
# network-related goodies
-can_network(ddclient_t)
+can_network_server(ddclient_t)
allow ddclient_t self:unix_dgram_socket create_socket_perms;
# allow access to ddclient.conf and ddclient.cache
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ddt-client.te policy-1.19.7/domains/program/unused/ddt-client.te
--- nsapolicy/domains/program/unused/ddt-client.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/ddt-client.te 2004-11-30 06:18:45.000000000 -0500
@@ -23,7 +23,7 @@
file_type_trans(ddt_client_t, var_lib_t, var_lib_ddt_client_t)
# Use the network.
-can_network(ddt_client_t)
+can_network_server(ddt_client_t)
can_ypbind(ddt_client_t)
allow ddt_client_t self:unix_stream_socket create_socket_perms;
allow ddt_client_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/devfsd.te policy-1.19.7/domains/program/unused/devfsd.te
--- nsapolicy/domains/program/unused/devfsd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/devfsd.te 2004-11-30 06:18:45.000000000 -0500
@@ -89,6 +89,5 @@
allow kernel_t device_t:filesystem mount;
# for nss-ldap etc
-can_network(devfsd_t)
+can_network_client_tcp(devfsd_t)
can_ypbind(devfsd_t)
-allow devfsd_t self:tcp_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dhcpc.te policy-1.19.7/domains/program/unused/dhcpc.te
--- nsapolicy/domains/program/unused/dhcpc.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/dhcpc.te 2004-11-30 06:18:45.000000000 -0500
@@ -22,7 +22,7 @@
# for SSP
allow dhcpc_t urandom_device_t:chr_file read;
-can_network(dhcpc_t)
+can_network_client(dhcpc_t, `{ dhcpc_port_t dhcpd_port_t }')
can_ypbind(dhcpc_t)
allow dhcpc_t self:unix_dgram_socket create_socket_perms;
allow dhcpc_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dhcpd.te policy-1.19.7/domains/program/unused/dhcpd.te
--- nsapolicy/domains/program/unused/dhcpd.te 2004-11-24 07:00:50.000000000 -0500
+++ policy-1.19.7/domains/program/unused/dhcpd.te 2004-11-30 06:18:45.000000000 -0500
@@ -29,7 +29,7 @@
typealias dhcp_etc_t alias { etc_dhcp_t etc_dhcpc_t etc_dhcpd_t };
# Use the network.
-can_network(dhcpd_t)
+can_network_client(dhcpd_t)
can_ypbind(dhcpd_t)
allow dhcpd_t self:unix_dgram_socket create_socket_perms;
allow dhcpd_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dictd.te policy-1.19.7/domains/program/unused/dictd.te
--- nsapolicy/domains/program/unused/dictd.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/dictd.te 2004-11-30 06:18:45.000000000 -0500
@@ -42,7 +42,7 @@
allow dictd_t self:unix_stream_socket create_stream_socket_perms;
-can_network(dictd_t)
+can_network_server(dictd_t)
can_ypbind(dictd_t)
can_tcp_connect(userdomain, dictd_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/distcc.te policy-1.19.7/domains/program/unused/distcc.te
--- nsapolicy/domains/program/unused/distcc.te 2004-11-05 23:24:16.000000000 -0500
+++ policy-1.19.7/domains/program/unused/distcc.te 2004-11-30 06:18:45.000000000 -0500
@@ -4,7 +4,7 @@
#
daemon_domain(distccd)
-can_network(distccd_t)
+can_network_server(distccd_t)
can_ypbind(distccd_t)
log_domain(distccd)
tmp_domain(distccd)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dnsmasq.te policy-1.19.7/domains/program/unused/dnsmasq.te
--- nsapolicy/domains/program/unused/dnsmasq.te 2004-09-29 07:36:46.000000000 -0400
+++ policy-1.19.7/domains/program/unused/dnsmasq.te 2004-11-30 06:18:45.000000000 -0500
@@ -16,7 +16,7 @@
allow dnsmasq_t urandom_device_t:chr_file read;
# network-related goodies
-can_network(dnsmasq_t)
+can_network_server(dnsmasq_t)
can_ypbind(dnsmasq_t)
allow dnsmasq_t self:packet_socket create_socket_perms;
allow dnsmasq_t self:rawip_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dovecot.te policy-1.19.7/domains/program/unused/dovecot.te
--- nsapolicy/domains/program/unused/dovecot.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/dovecot.te 2004-11-30 06:21:01.000000000 -0500
@@ -13,7 +13,7 @@
allow dovecot_t self:capability { dac_override dac_read_search chown net_bind_service setgid setuid sys_chroot };
allow dovecot_t self:process setrlimit;
-can_network(dovecot_t)
+can_network_client_tcp(dovecot_t)
can_ypbind(dovecot_t)
allow dovecot_t self:unix_dgram_socket create_socket_perms;
allow dovecot_t self:unix_stream_socket create_stream_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/dpkg.te policy-1.19.7/domains/program/unused/dpkg.te
--- nsapolicy/domains/program/unused/dpkg.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/dpkg.te 2004-11-30 11:27:40.181935261 -0500
@@ -297,7 +297,7 @@
allow dpkg_t device_type:{ chr_file blk_file } getattr;
dontaudit dpkg_t domain:{ socket unix_dgram_socket udp_socket unix_stream_socket tcp_socket fifo_file rawip_socket packet_socket } getattr;
allow dpkg_t proc_kmsg_t:file getattr;
-allow dpkg_t root_dir_type:dir getattr;
+allow dpkg_t fs_type:dir getattr;
# allow compiling and loading new policy
create_dir_file(dpkg_t, { policy_src_t policy_config_t })
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/fingerd.te policy-1.19.7/domains/program/unused/fingerd.te
--- nsapolicy/domains/program/unused/fingerd.te 2004-10-09 21:06:14.000000000 -0400
+++ policy-1.19.7/domains/program/unused/fingerd.te 2004-11-30 06:18:45.000000000 -0500
@@ -47,7 +47,7 @@
allow fingerd_t { ttyfile ptyfile }:chr_file getattr;
# Use the network.
-can_network(fingerd_t)
+can_network_server(fingerd_t)
can_ypbind(fingerd_t)
allow fingerd_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/firstboot.te policy-1.19.7/domains/program/unused/firstboot.te
--- nsapolicy/domains/program/unused/firstboot.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/firstboot.te 2004-11-30 06:18:45.000000000 -0500
@@ -114,7 +114,7 @@
allow iptables_t firstboot_t:fd use;
allow iptables_t firstboot_t:fifo_file write;
')
-can_network(firstboot_t)
+can_network_server(firstboot_t)
can_ypbind(firstboot_t)
ifdef(`printconf.te', `
can_exec(firstboot_t, printconf_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/gatekeeper.te policy-1.19.7/domains/program/unused/gatekeeper.te
--- nsapolicy/domains/program/unused/gatekeeper.te 2004-11-05 23:24:16.000000000 -0500
+++ policy-1.19.7/domains/program/unused/gatekeeper.te 2004-11-30 06:18:45.000000000 -0500
@@ -22,7 +22,7 @@
logdir_domain(gatekeeper)
# Use the network.
-can_network(gatekeeper_t)
+can_network_server(gatekeeper_t)
can_ypbind(gatekeeper_t)
allow gatekeeper_t gatekeeper_port_t:{ udp_socket tcp_socket } name_bind;
allow gatekeeper_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/hald.te policy-1.19.7/domains/program/unused/hald.te
--- nsapolicy/domains/program/unused/hald.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/hald.te 2004-11-30 06:18:45.000000000 -0500
@@ -33,7 +33,7 @@
allow hald_t bin_t:file getattr;
allow hald_t self:netlink_route_socket r_netlink_socket_perms;
allow hald_t self:capability { net_admin sys_admin dac_override dac_read_search mknod };
-can_network(hald_t)
+can_network_server(hald_t)
can_ypbind(hald_t)
allow hald_t device_t:lnk_file read;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/hotplug.te policy-1.19.7/domains/program/unused/hotplug.te
--- nsapolicy/domains/program/unused/hotplug.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/hotplug.te 2004-11-30 11:41:09.943792198 -0500
@@ -149,7 +149,7 @@
file_type_auto_trans(hotplug_t, etc_t, etc_runtime_t, file)
-can_network(hotplug_t)
+can_network_server(hotplug_t)
can_ypbind(hotplug_t)
dbusd_client(system, hotplug)
@@ -165,3 +165,4 @@
unconfined_domain(hotplug_t)
')
+ allow kernel_t hotplug_etc_t:dir search;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/howl.te policy-1.19.7/domains/program/unused/howl.te
--- nsapolicy/domains/program/unused/howl.te 2004-10-13 22:41:57.000000000 -0400
+++ policy-1.19.7/domains/program/unused/howl.te 2004-11-30 06:18:45.000000000 -0500
@@ -5,7 +5,7 @@
daemon_domain(howl)
allow howl_t proc_t:file { getattr read };
-can_network(howl_t)
+can_network_server(howl_t)
can_ypbind(howl_t)
allow howl_t self:capability { kill net_admin };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/i18n_input.te policy-1.19.7/domains/program/unused/i18n_input.te
--- nsapolicy/domains/program/unused/i18n_input.te 2004-10-13 22:41:57.000000000 -0400
+++ policy-1.19.7/domains/program/unused/i18n_input.te 2004-11-30 06:18:45.000000000 -0500
@@ -9,7 +9,7 @@
daemon_domain(i18n_input)
can_exec(i18n_input_t, i18n_input_exec_t)
-can_network(i18n_input_t)
+can_network_client(i18n_input_t)
can_ypbind(i18n_input_t)
can_tcp_connect(userdomain, i18n_input_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/imazesrv.te policy-1.19.7/domains/program/unused/imazesrv.te
--- nsapolicy/domains/program/unused/imazesrv.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/imazesrv.te 2004-11-30 06:18:45.000000000 -0500
@@ -21,7 +21,7 @@
create_append_log_file(imazesrv_t,imazesrv_log_t)
-can_network(imazesrv_t)
+can_network_server(imazesrv_t)
allow imazesrv_t self:capability net_bind_service;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/inetd.te policy-1.19.7/domains/program/unused/inetd.te
--- nsapolicy/domains/program/unused/inetd.te 2004-11-05 23:24:16.000000000 -0500
+++ policy-1.19.7/domains/program/unused/inetd.te 2004-11-30 06:18:45.000000000 -0500
@@ -20,7 +20,8 @@
daemon_domain(inetd, `ifdef(`unlimitedInetd', `,admin, etc_writer, fs_domain, auth_write, privmem')' )
-can_network(inetd_t)
+can_network_client(inetd_t)
+
allow inetd_t self:unix_dgram_socket create_socket_perms;
allow inetd_t self:unix_stream_socket create_socket_perms;
allow inetd_t self:fifo_file rw_file_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ipsec.te policy-1.19.7/domains/program/unused/ipsec.te
--- nsapolicy/domains/program/unused/ipsec.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/ipsec.te 2004-11-30 06:18:45.000000000 -0500
@@ -167,7 +167,7 @@
allow ipsec_t self:unix_stream_socket {create setopt bind listen accept read write };
# Pluto needs network access
-can_network(ipsec_t)
+can_network_server(ipsec_t)
can_ypbind(ipsec_t)
allow ipsec_t self:unix_dgram_socket { create connect write };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/iptables.te policy-1.19.7/domains/program/unused/iptables.te
--- nsapolicy/domains/program/unused/iptables.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/iptables.te 2004-11-30 06:18:45.000000000 -0500
@@ -36,7 +36,7 @@
# for iptables -L
allow iptables_t self:unix_stream_socket create_socket_perms;
-can_network(iptables_t)
+can_network_server(iptables_t)
can_ypbind(iptables_t)
allow iptables_t bin_t:file { execute execute_no_trans };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ircd.te policy-1.19.7/domains/program/unused/ircd.te
--- nsapolicy/domains/program/unused/ircd.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/ircd.te 2004-11-30 06:18:45.000000000 -0500
@@ -23,7 +23,7 @@
var_lib_domain(ircd)
# Use the network.
-can_network(ircd_t)
+can_network_server(ircd_t)
can_ypbind(ircd_t)
#allow ircd_t self:fifo_file { read write };
allow ircd_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/jabberd.te policy-1.19.7/domains/program/unused/jabberd.te
--- nsapolicy/domains/program/unused/jabberd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/jabberd.te 2004-11-30 06:18:45.000000000 -0500
@@ -19,7 +19,7 @@
# For SSL
allow jabberd_t random_device_t:file r_file_perms;
-can_network(jabberd_t)
+can_network_server(jabberd_t)
can_ypbind(jabberd_t)
allow jabberd_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/kerberos.te policy-1.19.7/domains/program/unused/kerberos.te
--- nsapolicy/domains/program/unused/kerberos.te 2004-11-24 07:00:50.000000000 -0500
+++ policy-1.19.7/domains/program/unused/kerberos.te 2004-11-30 06:18:45.000000000 -0500
@@ -16,10 +16,6 @@
#
# Rules for the krb5kdc_t,kadmind_t domains.
#
-type kerberos_port_t, port_type, reserved_port_type;
-type kerberos_admin_port_t, port_type, reserved_port_type;
-type kerberos_master_port_t, port_type;
-
daemon_domain(krb5kdc)
daemon_domain(kadmind)
@@ -38,7 +34,7 @@
allow kadmind_t self:capability { setuid setgid net_bind_service chown fowner dac_override sys_nice };
# krb5kdc and kadmind can use network
-can_network( { krb5kdc_t kadmind_t } )
+can_network_server( { krb5kdc_t kadmind_t } )
can_ypbind( { krb5kdc_t kadmind_t } )
# allow UDP transfer to/from any program
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/kudzu.te policy-1.19.7/domains/program/unused/kudzu.te
--- nsapolicy/domains/program/unused/kudzu.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/kudzu.te 2004-11-30 06:22:11.000000000 -0500
@@ -22,7 +22,8 @@
allow kudzu_t modules_object_t:dir r_dir_perms;
allow kudzu_t { modules_object_t modules_dep_t }:file { getattr read };
allow kudzu_t mouse_device_t:chr_file { read write };
-allow kudzu_t proc_t:file { getattr read };
+allow kudzu_t proc_net_t:dir r_dir_perms;
+allow kudzu_t { proc_net_t proc_t }:file { getattr read };
allow kudzu_t { fixed_disk_device_t removable_device_t }:blk_file rw_file_perms;
allow kudzu_t scsi_generic_device_t:chr_file r_file_perms;
allow kudzu_t { bin_t sbin_t }:dir { getattr search };
@@ -92,4 +93,5 @@
ifdef(`lpd.te', `
allow kudzu_t printconf_t:file { getattr read };
')
-allow kudzu_t zero_device_t:chr_file r_file_perms;
+allow kudzu_t cupsd_rw_etc_t:dir r_dir_perms;
+dontaudit kudzu_t src_t:dir search;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/lpd.te policy-1.19.7/domains/program/unused/lpd.te
--- nsapolicy/domains/program/unused/lpd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/lpd.te 2004-11-30 06:18:45.000000000 -0500
@@ -36,7 +36,7 @@
type checkpc_t, domain, privlog;
role system_r types checkpc_t;
uses_shlib(checkpc_t)
-can_network(checkpc_t)
+can_network_server(checkpc_t)
can_ypbind(checkpc_t)
log_domain(checkpc)
type checkpc_exec_t, file_type, sysadmfile, exec_type;
@@ -103,7 +103,7 @@
allow lpd_t self:capability { setgid setuid net_bind_service dac_read_search dac_override chown fowner };
# Use the network.
-can_network(lpd_t)
+can_network_server(lpd_t)
can_ypbind(lpd_t)
allow lpd_t self:fifo_file rw_file_perms;
allow lpd_t self:unix_stream_socket create_stream_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/lrrd.te policy-1.19.7/domains/program/unused/lrrd.te
--- nsapolicy/domains/program/unused/lrrd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/lrrd.te 2004-11-30 06:18:45.000000000 -0500
@@ -58,7 +58,7 @@
can_unix_connect(sysadm_t, lrrd_t)
can_unix_connect(lrrd_t, lrrd_t)
can_unix_send(lrrd_t, lrrd_t)
-can_network(lrrd_t)
+can_network_server(lrrd_t)
can_ypbind(lrrd_t)
ifdef(`logrotate.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/monopd.te policy-1.19.7/domains/program/unused/monopd.te
--- nsapolicy/domains/program/unused/monopd.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/monopd.te 2004-11-30 06:18:45.000000000 -0500
@@ -15,7 +15,7 @@
type share_monopd_t, file_type, sysadmfile;
# Use the network.
-can_network(monopd_t)
+can_network_server(monopd_t)
can_ypbind(monopd_t)
type monopd_port_t, port_type;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/mrtg.te policy-1.19.7/domains/program/unused/mrtg.te
--- nsapolicy/domains/program/unused/mrtg.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/mrtg.te 2004-11-30 06:18:45.000000000 -0500
@@ -31,7 +31,7 @@
r_dir_file(mrtg_t, lib_t)
# Use the network.
-can_network(mrtg_t)
+can_network_server(mrtg_t)
can_ypbind(mrtg_t)
allow mrtg_t self:fifo_file { getattr read write ioctl };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/mysqld.te policy-1.19.7/domains/program/unused/mysqld.te
--- nsapolicy/domains/program/unused/mysqld.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/mysqld.te 2004-11-30 06:18:45.000000000 -0500
@@ -44,7 +44,7 @@
create_dir_file(mysqld_t, mysqld_db_t)
allow mysqld_t var_lib_t:dir { getattr search };
-can_network(mysqld_t)
+can_network_server(mysqld_t)
can_ypbind(mysqld_t)
# read config files
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/nagios.te policy-1.19.7/domains/program/unused/nagios.te
--- nsapolicy/domains/program/unused/nagios.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/nagios.te 2004-11-30 06:18:45.000000000 -0500
@@ -41,7 +41,7 @@
allow nagios_t proc_t:file { getattr read };
-can_network(nagios_t)
+can_network_server(nagios_t)
can_ypbind(nagios_t)
# read config files
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/named.te policy-1.19.7/domains/program/unused/named.te
--- nsapolicy/domains/program/unused/named.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/domains/program/unused/named.te 2004-11-30 06:18:45.000000000 -0500
@@ -49,8 +49,9 @@
allow named_t etc_runtime_t:{ file lnk_file } { getattr read };
#Named can use network
-can_network(named_t)
+can_network_client(named_t)
can_ypbind(named_t)
+
# allow UDP transfer to/from any program
can_udp_send(domain, named_t)
can_udp_send(named_t, domain)
@@ -100,8 +101,9 @@
type ndc_exec_t, file_type,sysadmfile, exec_type;
domain_auto_trans({ sysadm_t initrc_t }, ndc_exec_t, ndc_t)
uses_shlib(ndc_t)
-can_network(ndc_t)
+can_network_client_tcp(ndc_t)
can_ypbind(ndc_t)
+can_resolve(ndc_t)
read_locale(ndc_t)
can_tcp_connect(ndc_t, named_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/nessusd.te policy-1.19.7/domains/program/unused/nessusd.te
--- nsapolicy/domains/program/unused/nessusd.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/nessusd.te 2004-11-30 06:18:45.000000000 -0500
@@ -22,7 +22,7 @@
#tmp_domain(nessusd)
# Use the network.
-can_network(nessusd_t)
+can_network_server(nessusd_t)
can_ypbind(nessusd_t)
allow nessusd_t self:unix_stream_socket create_socket_perms;
#allow nessusd_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/nscd.te policy-1.19.7/domains/program/unused/nscd.te
--- nsapolicy/domains/program/unused/nscd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/nscd.te 2004-11-30 06:18:45.000000000 -0500
@@ -22,7 +22,7 @@
allow nscd_t etc_t:file r_file_perms;
allow nscd_t etc_t:lnk_file read;
-can_network(nscd_t)
+can_network_client(nscd_t)
can_ypbind(nscd_t)
file_type_auto_trans(nscd_t, var_run_t, nscd_var_run_t, sock_file)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/nsd.te policy-1.19.7/domains/program/unused/nsd.te
--- nsapolicy/domains/program/unused/nsd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/nsd.te 2004-11-30 06:18:45.000000000 -0500
@@ -19,7 +19,7 @@
type nsd_crond_t, domain, privlog;
role system_r types nsd_crond_t;
uses_shlib(nsd_crond_t)
-can_network(nsd_crond_t)
+can_network_server(nsd_crond_t)
can_ypbind(nsd_crond_t)
allow nsd_crond_t self:unix_dgram_socket create_socket_perms;
allow nsd_crond_t self:process { fork signal_perms };
@@ -78,7 +78,7 @@
allow nsd_t etc_t:{ file lnk_file } { getattr read };
# nsd can use network
-can_network(nsd_t)
+can_network_server(nsd_t)
can_ypbind(nsd_t)
# allow client access from caching BIND
ifdef(`named.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ntpd.te policy-1.19.7/domains/program/unused/ntpd.te
--- nsapolicy/domains/program/unused/ntpd.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/domains/program/unused/ntpd.te 2004-11-30 06:18:45.000000000 -0500
@@ -37,7 +37,7 @@
allow ntpd_t etc_t:file { read getattr };
# Use the network.
-can_network(ntpd_t)
+can_network_client(ntpd_t)
can_ypbind(ntpd_t)
allow ntpd_t ntp_port_t:udp_socket name_bind;
allow ntpd_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/oav-update.te policy-1.19.7/domains/program/unused/oav-update.te
--- nsapolicy/domains/program/unused/oav-update.te 2003-08-14 08:37:36.000000000 -0400
+++ policy-1.19.7/domains/program/unused/oav-update.te 2004-11-30 06:18:45.000000000 -0500
@@ -35,4 +35,4 @@
allow oav_update_t oav_update_var_lib_t:lnk_file r_file_perms;
# Can download via network
-can_network(oav_update_t)
+can_network_server(oav_update_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/openvpn.te policy-1.19.7/domains/program/unused/openvpn.te
--- nsapolicy/domains/program/unused/openvpn.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/openvpn.te 2004-11-30 06:18:45.000000000 -0500
@@ -24,7 +24,7 @@
allow openvpn_t self:capability net_admin;
r_dir_file(openvpn_t, sysctl_net_t)
-can_network(openvpn_t)
+can_network_server(openvpn_t)
allow openvpn_t openvpn_port_t:udp_socket name_bind;
# OpenVPN executes a lot of helper programs and scripts
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/perdition.te policy-1.19.7/domains/program/unused/perdition.te
--- nsapolicy/domains/program/unused/perdition.te 2004-03-23 15:58:08.000000000 -0500
+++ policy-1.19.7/domains/program/unused/perdition.te 2004-11-30 06:18:45.000000000 -0500
@@ -16,7 +16,7 @@
typealias perdition_etc_t alias etc_perdition_t;
# Use the network.
-can_network(perdition_t)
+can_network_server(perdition_t)
allow perdition_t self:unix_stream_socket create_socket_perms;
allow perdition_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ping.te policy-1.19.7/domains/program/unused/ping.te
--- nsapolicy/domains/program/unused/ping.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/program/unused/ping.te 2004-11-30 06:18:45.000000000 -0500
@@ -31,7 +31,7 @@
domain_auto_trans(initrc_t, ping_exec_t, ping_t)
uses_shlib(ping_t)
-can_network(ping_t)
+can_network_client(ping_t)
can_ypbind(ping_t)
allow ping_t etc_t:file { getattr read };
allow ping_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/portmap.te policy-1.19.7/domains/program/unused/portmap.te
--- nsapolicy/domains/program/unused/portmap.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/portmap.te 2004-11-30 06:18:45.000000000 -0500
@@ -13,7 +13,7 @@
#
daemon_domain(portmap, `, nscd_client_domain')
-can_network(portmap_t)
+can_network_server(portmap_t)
can_ypbind(portmap_t)
allow portmap_t self:unix_dgram_socket create_socket_perms;
allow portmap_t self:unix_stream_socket create_stream_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/portslave.te policy-1.19.7/domains/program/unused/portslave.te
--- nsapolicy/domains/program/unused/portslave.te 2004-10-14 23:25:18.000000000 -0400
+++ policy-1.19.7/domains/program/unused/portslave.te 2004-11-30 06:18:45.000000000 -0500
@@ -38,7 +38,7 @@
allow portslave_t pppd_secret_t:file r_file_perms;
-can_network(portslave_t)
+can_network_server(portslave_t)
allow portslave_t fs_t:filesystem getattr;
ifdef(`radius.te', `
can_udp_send(portslave_t, radiusd_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/postfix.te policy-1.19.7/domains/program/unused/postfix.te
--- nsapolicy/domains/program/unused/postfix.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/domains/program/unused/postfix.te 2004-11-30 06:18:45.000000000 -0500
@@ -117,8 +117,9 @@
allow postfix_master_t postfix_private_t:dir rw_dir_perms;
allow postfix_master_t postfix_private_t:sock_file create_file_perms;
allow postfix_master_t postfix_private_t:fifo_file create_file_perms;
-can_network(postfix_master_t)
+can_network_client(postfix_master_t)
can_ypbind(postfix_master_t)
+
allow postfix_master_t smtp_port_t:tcp_socket name_bind;
allow postfix_master_t postfix_spool_maildrop_t:dir rw_dir_perms;
allow postfix_master_t postfix_spool_maildrop_t:file { unlink rename getattr };
@@ -156,7 +157,7 @@
domain_auto_trans(postfix_master_t, postfix_$1_exec_t, postfix_$1_t)
allow postfix_$1_t postfix_master_t:unix_stream_socket { connectto rw_stream_socket_perms };
allow postfix_$1_t self:capability { setuid setgid dac_override };
-can_network(postfix_$1_t)
+can_network_client(postfix_$1_t)
can_ypbind(postfix_$1_t)
')
@@ -349,6 +350,6 @@
allow postfix_map_t self:capability setgid;
allow postfix_map_t self:unix_dgram_socket create_socket_perms;
dontaudit postfix_map_t var_t:dir search;
-can_network(postfix_map_t)
+can_network_server(postfix_map_t)
allow postfix_local_t mail_spool_t:dir { remove_name };
allow postfix_local_t mail_spool_t:file { unlink };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/postgresql.te policy-1.19.7/domains/program/unused/postgresql.te
--- nsapolicy/domains/program/unused/postgresql.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/domains/program/unused/postgresql.te 2004-11-30 06:18:45.000000000 -0500
@@ -52,7 +52,7 @@
file_type_auto_trans(postgresql_t, tmpfs_t, postgresql_tmp_t)
# Use the network.
-can_network(postgresql_t)
+can_network_server(postgresql_t)
allow postgresql_t self:fifo_file { getattr read write ioctl };
allow postgresql_t self:unix_stream_socket create_stream_socket_perms;
can_unix_connect(postgresql_t, self)
@@ -126,3 +126,6 @@
dontaudit initrc_su_t sysadm_devpts_t:chr_file rw_file_perms;
')
+dontaudit postgresql_t home_root_t:dir search;
+can_kerberos(postgresql_t)
+allow postgresql_t urandom_device_t:chr_file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/postgrey.te policy-1.19.7/domains/program/unused/postgrey.te
--- nsapolicy/domains/program/unused/postgrey.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/domains/program/unused/postgrey.te 2004-11-30 06:24:17.000000000 -0500
@@ -17,7 +17,7 @@
allow postgrey_t { etc_t etc_runtime_t }:file { getattr read };
etcdir_domain(postgrey)
-can_network(postgrey_t)
+can_network_server_tcp(postgrey_t)
can_ypbind(postgrey_t)
allow postgrey_t postgrey_port_t:tcp_socket name_bind;
allow postgrey_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/pppd.te policy-1.19.7/domains/program/unused/pppd.te
--- nsapolicy/domains/program/unused/pppd.te 2004-10-14 23:25:18.000000000 -0400
+++ policy-1.19.7/domains/program/unused/pppd.te 2004-11-30 06:18:45.000000000 -0500
@@ -30,7 +30,7 @@
log_domain(pppd)
# Use the network.
-can_network(pppd_t)
+can_network_server(pppd_t)
can_ypbind(pppd_t)
# Use capabilities.
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/privoxy.te policy-1.19.7/domains/program/unused/privoxy.te
--- nsapolicy/domains/program/unused/privoxy.te 2004-03-17 13:26:05.000000000 -0500
+++ policy-1.19.7/domains/program/unused/privoxy.te 2004-11-30 06:18:45.000000000 -0500
@@ -16,7 +16,7 @@
allow privoxy_t self:capability net_bind_service;
# Use the network.
-can_network(privoxy_t)
+can_network_server(privoxy_t)
allow privoxy_t port_t:{ tcp_socket udp_socket } name_bind;
allow privoxy_t etc_t:file { getattr read };
allow privoxy_t self:capability { setgid setuid };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/procmail.te policy-1.19.7/domains/program/unused/procmail.te
--- nsapolicy/domains/program/unused/procmail.te 2004-11-18 08:13:58.000000000 -0500
+++ policy-1.19.7/domains/program/unused/procmail.te 2004-11-30 06:18:45.000000000 -0500
@@ -18,7 +18,7 @@
uses_shlib(procmail_t)
allow procmail_t device_t:dir search;
-can_network(procmail_t)
+can_network_server(procmail_t)
can_ypbind(procmail_t)
allow procmail_t self:capability { sys_nice chown setuid setgid dac_override };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/qmail.te policy-1.19.7/domains/program/unused/qmail.te
--- nsapolicy/domains/program/unused/qmail.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/domains/program/unused/qmail.te 2004-11-30 06:18:45.000000000 -0500
@@ -84,7 +84,7 @@
qmaild_sub_domain(qmail_rspawn_t, qmail_remote)
allow qmail_rspawn_t qmail_remote_exec_t:file read;
-can_network(qmail_remote_t)
+can_network_server(qmail_remote_t)
can_ypbind(qmail_remote_t)
allow qmail_remote_t qmail_spool_t:dir search;
allow qmail_remote_t qmail_spool_t:file rw_file_perms;
@@ -125,12 +125,12 @@
allow qmail_tcp_env_t inetd_t:tcp_socket { read write getattr };
allow qmail_tcp_env_t inetd_t:process sigchld;
allow qmail_tcp_env_t sbin_t:dir search;
-can_network(qmail_tcp_env_t)
+can_network_server(qmail_tcp_env_t)
can_ypbind(qmail_tcp_env_t)
qmaild_sub_domain(qmail_tcp_env_t, qmail_smtpd)
allow qmail_tcp_env_t qmail_smtpd_exec_t:file read;
-can_network(qmail_smtpd_t)
+can_network_server(qmail_smtpd_t)
can_ypbind(qmail_smtpd_t)
allow qmail_smtpd_t inetd_t:fd use;
allow qmail_smtpd_t inetd_t:tcp_socket { read write };
@@ -181,7 +181,7 @@
qmaild_sub_domain(user_crond_t, qmail_serialmail)
in_user_role(qmail_serialmail_t)
-can_network(qmail_serialmail_t)
+can_network_server(qmail_serialmail_t)
can_ypbind(qmail_serialmail_t)
can_exec(qmail_serialmail_t, qmail_serialmail_exec_t)
allow qmail_serialmail_t self:process { fork signal_perms };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/radius.te policy-1.19.7/domains/program/unused/radius.te
--- nsapolicy/domains/program/unused/radius.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/radius.te 2004-11-30 06:18:45.000000000 -0500
@@ -50,7 +50,7 @@
# gzip also needs chown access to preserve GID for radwtmp files
allow radiusd_t self:capability { chown dac_override fsetid kill setgid setuid sys_resource sys_tty_config };
-can_network(radiusd_t)
+can_network_server(radiusd_t)
can_ypbind(radiusd_t)
allow radiusd_t { radius_port_t radacct_port_t }:udp_socket name_bind;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/radvd.te policy-1.19.7/domains/program/unused/radvd.te
--- nsapolicy/domains/program/unused/radvd.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.19.7/domains/program/unused/radvd.te 2004-11-30 06:18:45.000000000 -0500
@@ -19,7 +19,7 @@
allow radvd_t self:{ unix_dgram_socket rawip_socket } create;
allow radvd_t self:unix_stream_socket create_socket_perms;
-can_network(radvd_t)
+can_network_server(radvd_t)
allow radvd_t proc_t:dir r_dir_perms;
allow radvd_t proc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/rhgb.te policy-1.19.7/domains/program/unused/rhgb.te
--- nsapolicy/domains/program/unused/rhgb.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/domains/program/unused/rhgb.te 2004-11-30 06:18:45.000000000 -0500
@@ -39,7 +39,7 @@
allow rhgb_t self:capability { sys_admin sys_tty_config };
dontaudit rhgb_t var_run_t:dir search;
-can_network(rhgb_t)
+can_network_server(rhgb_t)
can_ypbind(rhgb_t)
# for fonts
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/rlogind.te policy-1.19.7/domains/program/unused/rlogind.te
--- nsapolicy/domains/program/unused/rlogind.te 2004-11-18 08:13:58.000000000 -0500
+++ policy-1.19.7/domains/program/unused/rlogind.te 2004-11-30 06:18:45.000000000 -0500
@@ -13,7 +13,7 @@
type rlogind_t, domain, privlog, auth_chkpwd, privfd;
role system_r types rlogind_t;
uses_shlib(rlogind_t)
-can_network(rlogind_t)
+can_network_server(rlogind_t)
type rlogind_exec_t, file_type, sysadmfile, exec_type;
domain_auto_trans(inetd_t, rlogind_exec_t, rlogind_t)
ifdef(`tcpd.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/rpcd.te policy-1.19.7/domains/program/unused/rpcd.te
--- nsapolicy/domains/program/unused/rpcd.te 2004-11-29 10:24:17.000000000 -0500
+++ policy-1.19.7/domains/program/unused/rpcd.te 2004-11-30 06:18:45.000000000 -0500
@@ -12,7 +12,7 @@
#
define(`rpc_domain', `
daemon_base_domain($1)
-can_network($1_t)
+can_network_client($1_t)
can_ypbind($1_t)
allow $1_t etc_t:file { getattr read };
read_locale($1_t)
@@ -62,7 +62,7 @@
# nfs kernel server needs kernel UDP access. It is less risky and painful
# to just give it everything.
-can_network(kernel_t)
+can_network_server(kernel_t)
#can_udp_send(kernel_t, rpcd_t)
#can_udp_send(rpcd_t, kernel_t)
@@ -125,3 +125,4 @@
r_dir_file(rpcd_t, rpc_pipefs_t)
allow rpcd_t rpc_pipefs_t:sock_file { read write };
dontaudit rpcd_t selinux_config_t:dir { search };
+allow rpcd_t proc_net_t:dir search;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/rshd.te policy-1.19.7/domains/program/unused/rshd.te
--- nsapolicy/domains/program/unused/rshd.te 2004-11-18 08:13:58.000000000 -0500
+++ policy-1.19.7/domains/program/unused/rshd.te 2004-11-30 06:18:45.000000000 -0500
@@ -23,7 +23,7 @@
allow rshd_t self:capability { net_bind_service setuid setgid fowner fsetid chown dac_override};
# Use the network.
-can_network(rshd_t)
+can_network_server(rshd_t)
can_ypbind(rshd_t)
allow rshd_t etc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/samba.te policy-1.19.7/domains/program/unused/samba.te
--- nsapolicy/domains/program/unused/samba.te 2004-11-18 08:13:58.000000000 -0500
+++ policy-1.19.7/domains/program/unused/samba.te 2004-11-30 06:18:45.000000000 -0500
@@ -48,7 +48,7 @@
allow smbd_t self:capability { setgid setuid sys_resource net_bind_service lease };
# Use the network.
-can_network(smbd_t)
+can_network_server(smbd_t)
allow smbd_t urandom_device_t:chr_file { getattr read };
@@ -96,7 +96,7 @@
allow nmbd_t self:capability net_bind_service;
# Use the network.
-can_network(nmbd_t)
+can_network_server(nmbd_t)
# Permissions for Samba files in /etc/samba
allow nmbd_t samba_etc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/scannerdaemon.te policy-1.19.7/domains/program/unused/scannerdaemon.te
--- nsapolicy/domains/program/unused/scannerdaemon.te 2004-03-17 13:26:05.000000000 -0500
+++ policy-1.19.7/domains/program/unused/scannerdaemon.te 2004-11-30 06:18:45.000000000 -0500
@@ -12,7 +12,7 @@
#networking
daemon_domain(scannerdaemon)
-can_network(scannerdaemon_t)
+can_network_server(scannerdaemon_t)
ifdef(`postfix.te',
`can_tcp_connect(postfix_bounce_t,scannerdaemon_t);')
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/sendmail.te policy-1.19.7/domains/program/unused/sendmail.te
--- nsapolicy/domains/program/unused/sendmail.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/domains/program/unused/sendmail.te 2004-11-30 06:18:45.000000000 -0500
@@ -25,7 +25,7 @@
allow sendmail_t self:capability { setuid setgid net_bind_service sys_nice chown sys_tty_config };
# Use the network.
-can_network(sendmail_t)
+can_network_client(sendmail_t)
can_ypbind(sendmail_t)
allow sendmail_t self:unix_stream_socket create_stream_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/slapd.te policy-1.19.7/domains/program/unused/slapd.te
--- nsapolicy/domains/program/unused/slapd.te 2004-10-19 16:03:06.000000000 -0400
+++ policy-1.19.7/domains/program/unused/slapd.te 2004-11-30 06:18:45.000000000 -0500
@@ -23,7 +23,7 @@
tmp_domain(slapd)
# Use the network.
-can_network(slapd_t)
+can_network_client(slapd_t)
can_ypbind(slapd_t)
allow slapd_t self:fifo_file { read write };
allow slapd_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/slocate.te policy-1.19.7/domains/program/unused/slocate.te
--- nsapolicy/domains/program/unused/slocate.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/domains/program/unused/slocate.te 2004-11-30 11:25:41.171330546 -0500
@@ -23,9 +23,9 @@
allow locate_t { userpty_type admin_tty_type }:chr_file rw_file_perms;
-allow locate_t { root_dir_type file_type }:dir r_dir_perms;
+allow locate_t { fs_type file_type }:dir r_dir_perms;
allow locate_t file_type:lnk_file r_file_perms;
-allow locate_t { root_dir_type file_type -shadow_t }:{ lnk_file sock_file fifo_file file } getattr;
+allow locate_t { file_type -shadow_t }:{ lnk_file sock_file fifo_file file } getattr;
dontaudit locate_t { file_type -shadow_t }:{ lnk_file sock_file fifo_file file } read;
dontaudit locate_t security_t:dir getattr;
dontaudit locate_t shadow_t:file getattr;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/snmpd.te policy-1.19.7/domains/program/unused/snmpd.te
--- nsapolicy/domains/program/unused/snmpd.te 2004-11-29 10:24:17.000000000 -0500
+++ policy-1.19.7/domains/program/unused/snmpd.te 2004-11-30 06:18:45.000000000 -0500
@@ -13,7 +13,7 @@
#temp
allow snmpd_t var_t:dir getattr;
-can_network(snmpd_t)
+can_network_client(snmpd_t)
can_ypbind(snmpd_t)
type snmp_port_t, port_type, reserved_port_type;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/snort.te policy-1.19.7/domains/program/unused/snort.te
--- nsapolicy/domains/program/unused/snort.te 2004-11-19 11:20:43.000000000 -0500
+++ policy-1.19.7/domains/program/unused/snort.te 2004-11-30 06:18:45.000000000 -0500
@@ -9,7 +9,7 @@
logdir_domain(snort)
allow snort_t snort_log_t:dir create;
-can_network(snort_t)
+can_network_server(snort_t)
type snort_etc_t, file_type, sysadmfile;
# Create temporary files.
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/sound-server.te policy-1.19.7/domains/program/unused/sound-server.te
--- nsapolicy/domains/program/unused/sound-server.te 2004-03-17 13:26:05.000000000 -0500
+++ policy-1.19.7/domains/program/unused/sound-server.te 2004-11-30 06:18:45.000000000 -0500
@@ -24,7 +24,7 @@
allow soundd_t device_t:lnk_file read;
# Use the network.
-can_network(soundd_t)
+can_network_server(soundd_t)
allow soundd_t self:unix_stream_socket create_stream_socket_perms;
allow soundd_t self:unix_dgram_socket create_socket_perms;
# allow any domain to connect to the sound server
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/spamd.te policy-1.19.7/domains/program/unused/spamd.te
--- nsapolicy/domains/program/unused/spamd.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/domains/program/unused/spamd.te 2004-11-30 06:18:45.000000000 -0500
@@ -23,7 +23,7 @@
dontaudit spamd_t initrc_var_run_t:file { read write lock };
dontaudit spamd_t sysadm_home_dir_t:dir getattr;
-can_network(spamd_t)
+can_network_server(spamd_t)
allow spamd_t self:capability net_bind_service;
allow spamd_t proc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/squid.te policy-1.19.7/domains/program/unused/squid.te
--- nsapolicy/domains/program/unused/squid.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/domains/program/unused/squid.te 2004-11-30 06:18:45.000000000 -0500
@@ -62,7 +62,7 @@
# to allow running programs from /usr/lib/squid (IE unlinkd)
# also allow exec()ing itself
-can_exec(squid_t, { lib_t squid_exec_t bin_t sbin_t } )
+can_exec(squid_t, { lib_t squid_exec_t bin_t sbin_t shell_exec_t } )
allow squid_t { bin_t sbin_t }:dir search;
allow squid_t { bin_t sbin_t }:lnk_file read;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/sxid.te policy-1.19.7/domains/program/unused/sxid.te
--- nsapolicy/domains/program/unused/sxid.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/domains/program/unused/sxid.te 2004-11-30 11:28:08.388760430 -0500
@@ -32,10 +32,10 @@
allow sxid_t ttyfile:chr_file getattr;
allow sxid_t file_type:dir { getattr read search };
allow sxid_t sysadmfile:file read;
-allow sxid_t root_dir_type:dir { getattr read search };
+allow sxid_t fs_type:dir { getattr read search };
# Use the network.
-can_network(sxid_t)
+can_network_server(sxid_t)
allow sxid_t self:fifo_file rw_file_perms;
allow sxid_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/sysstat.te policy-1.19.7/domains/program/unused/sysstat.te
--- nsapolicy/domains/program/unused/sysstat.te 2004-06-16 13:33:36.000000000 -0400
+++ policy-1.19.7/domains/program/unused/sysstat.te 2004-11-30 06:18:45.000000000 -0500
@@ -51,8 +51,8 @@
allow sysstat_t fs_t:filesystem getattr;
# get info from /proc
-allow sysstat_t { proc_t sysctl_kernel_t sysctl_t sysctl_fs_t sysctl_rpc_t }:dir r_dir_perms;
-allow sysstat_t { proc_t sysctl_kernel_t sysctl_t sysctl_fs_t sysctl_rpc_t }:file { read getattr };
+allow sysstat_t { proc_t proc_net_t sysctl_kernel_t sysctl_t sysctl_fs_t sysctl_rpc_t }:dir r_dir_perms;
+allow sysstat_t { proc_t proc_net_t sysctl_kernel_t sysctl_t sysctl_fs_t sysctl_rpc_t }:file { read getattr };
domain_auto_trans(initrc_t, sysstat_exec_t, sysstat_t)
allow sysstat_t init_t:fd use;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/tcpd.te policy-1.19.7/domains/program/unused/tcpd.te
--- nsapolicy/domains/program/unused/tcpd.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/tcpd.te 2004-11-30 06:18:45.000000000 -0500
@@ -21,7 +21,7 @@
# no good reason for this, probably nscd
dontaudit tcpd_t var_t:dir search;
-can_network(tcpd_t)
+can_network_server(tcpd_t)
can_ypbind(tcpd_t)
allow tcpd_t self:unix_dgram_socket create_socket_perms;
allow tcpd_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/tftpd.te policy-1.19.7/domains/program/unused/tftpd.te
--- nsapolicy/domains/program/unused/tftpd.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/domains/program/unused/tftpd.te 2004-11-30 11:17:39.333563985 -0500
@@ -22,7 +22,7 @@
domain_auto_trans(inetd_t, tftpd_exec_t, tftpd_t)
# Use the network.
-can_network(tftpd_t)
+can_network_udp(tftpd_t)
allow tftpd_t tftp_port_t:udp_socket name_bind;
ifdef(`inetd.te', `
allow inetd_t tftp_port_t:udp_socket name_bind;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/timidity.te policy-1.19.7/domains/program/unused/timidity.te
--- nsapolicy/domains/program/unused/timidity.te 2004-10-29 14:33:17.000000000 -0400
+++ policy-1.19.7/domains/program/unused/timidity.te 2004-11-30 06:18:45.000000000 -0500
@@ -5,7 +5,7 @@
# Note: You only need this policy if you want to run timidity as a server
daemon_base_domain(timidity)
-can_network(timidity_t)
+can_network_server(timidity_t)
allow timidity_t device_t:lnk_file read;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/tinydns.te policy-1.19.7/domains/program/unused/tinydns.te
--- nsapolicy/domains/program/unused/tinydns.te 2004-07-07 16:46:41.000000000 -0400
+++ policy-1.19.7/domains/program/unused/tinydns.te 2004-11-30 06:18:45.000000000 -0500
@@ -30,7 +30,7 @@
allow tinydns_t etc_runtime_t:{ file lnk_file } { getattr read };
#tinydns can use network
-can_network(tinydns_t)
+can_network_server(tinydns_t)
allow tinydns_t dns_port_t:{ udp_socket tcp_socket } name_bind;
# allow UDP transfer to/from any program
can_udp_send(domain, tinydns_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/traceroute.te policy-1.19.7/domains/program/unused/traceroute.te
--- nsapolicy/domains/program/unused/traceroute.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/traceroute.te 2004-11-30 06:18:45.000000000 -0500
@@ -18,7 +18,7 @@
# for user_ping:
in_user_role(traceroute_t)
uses_shlib(traceroute_t)
-can_network(traceroute_t)
+can_network_client(traceroute_t)
can_ypbind(traceroute_t)
allow traceroute_t node_t:rawip_socket node_bind;
type traceroute_exec_t, file_type, sysadmfile, exec_type;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/transproxy.te policy-1.19.7/domains/program/unused/transproxy.te
--- nsapolicy/domains/program/unused/transproxy.te 2004-03-23 15:58:08.000000000 -0500
+++ policy-1.19.7/domains/program/unused/transproxy.te 2004-11-30 06:18:45.000000000 -0500
@@ -15,7 +15,7 @@
type transproxy_port_t, port_type;
# Use the network.
-can_network(transproxy_t)
+can_network_server_tcp(transproxy_t)
allow transproxy_t transproxy_port_t:tcp_socket name_bind;
#allow transproxy_t self:fifo_file { read write };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/uwimapd.te policy-1.19.7/domains/program/unused/uwimapd.te
--- nsapolicy/domains/program/unused/uwimapd.te 2004-11-18 08:13:58.000000000 -0500
+++ policy-1.19.7/domains/program/unused/uwimapd.te 2004-11-30 06:18:45.000000000 -0500
@@ -8,7 +8,7 @@
daemon_domain(imapd, `, auth_chkpwd, privhome')
tmp_domain(imapd)
-can_network(imapd_t)
+can_network_server_tcp(imapd_t)
#declare our own services
allow imapd_t self:capability { dac_override net_bind_service setgid setuid sys_resource };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/vpnc.te policy-1.19.7/domains/program/unused/vpnc.te
--- nsapolicy/domains/program/unused/vpnc.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/domains/program/unused/vpnc.te 2004-11-30 06:18:45.000000000 -0500
@@ -15,7 +15,7 @@
allow vpnc_t { random_device_t urandom_device_t }:chr_file read;
# Use the network.
-can_network(vpnc_t)
+can_network_client(vpnc_t)
can_ypbind(vpnc_t)
allow vpnc_t self:socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/webalizer.te policy-1.19.7/domains/program/unused/webalizer.te
--- nsapolicy/domains/program/unused/webalizer.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/domains/program/unused/webalizer.te 2004-11-30 06:18:45.000000000 -0500
@@ -40,7 +40,7 @@
allow webalizer_t proc_t:file r_file_perms;
# network
-can_network(webalizer_t)
+can_network_server(webalizer_t)
#process communication inside webalizer itself
general_domain_access(webalizer_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/xprint.te policy-1.19.7/domains/program/unused/xprint.te
--- nsapolicy/domains/program/unused/xprint.te 2004-08-27 16:51:30.000000000 -0400
+++ policy-1.19.7/domains/program/unused/xprint.te 2004-11-30 06:18:45.000000000 -0500
@@ -30,7 +30,7 @@
')
# Use the network.
-can_network(xprint_t)
+can_network_server(xprint_t)
can_ypbind(xprint_t)
allow xprint_t self:fifo_file rw_file_perms;
allow xprint_t self:unix_stream_socket create_stream_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ypserv.te policy-1.19.7/domains/program/unused/ypserv.te
--- nsapolicy/domains/program/unused/ypserv.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/domains/program/unused/ypserv.te 2004-11-30 06:28:40.000000000 -0500
@@ -16,8 +16,7 @@
allow ypserv_t self:capability { net_admin net_bind_service };
# Use the network.
-can_network(ypserv_t)
-allow ypserv_t port_t:{ tcp_socket udp_socket } name_bind;
+can_network_server(ypserv_t)
allow ypserv_t self:fifo_file rw_file_perms;
@@ -39,5 +38,5 @@
ifdef(`rpcd.te', `
allow rpcd_t ypserv_conf_t:file { getattr read };
')
-allow ypserv_t reserved_port_t:{ udp_socket tcp_socket } { name_bind };
+allow ypserv_t reserved_port_t:{ udp_socket tcp_socket } name_bind;
dontaudit ypserv_t reserved_port_type:{ tcp_socket udp_socket } name_bind;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/zebra.te policy-1.19.7/domains/program/unused/zebra.te
--- nsapolicy/domains/program/unused/zebra.te 2004-08-27 09:30:29.000000000 -0400
+++ policy-1.19.7/domains/program/unused/zebra.te 2004-11-30 06:18:45.000000000 -0500
@@ -9,7 +9,7 @@
type zebra_conf_t, file_type, sysadmfile;
r_dir_file({ initrc_t zebra_t }, zebra_conf_t)
-can_network(zebra_t)
+can_network_server(zebra_t)
can_ypbind(zebra_t)
allow zebra_t { etc_t etc_runtime_t }:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/user.te policy-1.19.7/domains/user.te
--- nsapolicy/domains/user.te 2004-11-30 05:59:38.000000000 -0500
+++ policy-1.19.7/domains/user.te 2004-11-30 06:29:22.000000000 -0500
@@ -55,6 +55,7 @@
# Reach sysadm_t via programs like userhelper/sudo/su
undefine(`reach_sysadm')
define(`reach_sysadm', `
+ifdef(`userhelper.te', `userhelper_domain($1)')
ifdef(`sudo.te', `sudo_domain($1)')
ifdef(`su.te', `
su_domain($1)
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/hotplug.fc policy-1.19.7/file_contexts/program/hotplug.fc
--- nsapolicy/file_contexts/program/hotplug.fc 2004-11-24 07:00:50.000000000 -0500
+++ policy-1.19.7/file_contexts/program/hotplug.fc 2004-11-30 11:40:10.595472171 -0500
@@ -10,3 +10,4 @@
/etc/hotplug/hotplug\.functions -- system_u:object_r:sbin_t
/var/run/usb(/.*)? system_u:object_r:hotplug_var_run_t
/var/run/hotplug(/.*)? system_u:object_r:hotplug_var_run_t
+/etc/hotplug/firmware.agent -- system_u:object_r:hotplug_exec_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/sendmail.fc policy-1.19.7/file_contexts/program/sendmail.fc
--- nsapolicy/file_contexts/program/sendmail.fc 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/file_contexts/program/sendmail.fc 2004-11-30 06:18:45.000000000 -0500
@@ -1,6 +1,5 @@
# sendmail
/etc/mail(/.*)? system_u:object_r:etc_mail_t
-/var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t
/var/log/sendmail\.st -- system_u:object_r:sendmail_log_t
/var/log/mail(/.*)? system_u:object_r:sendmail_log_t
/var/run/sendmail\.pid -- system_u:object_r:sendmail_var_run_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/types.fc policy-1.19.7/file_contexts/types.fc
--- nsapolicy/file_contexts/types.fc 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/file_contexts/types.fc 2004-11-30 06:18:45.000000000 -0500
@@ -334,9 +334,6 @@
/usr(/.*)? system_u:object_r:usr_t
/usr(/.*)?/lib(64)?(/.*)? system_u:object_r:lib_t
/usr(/.*)?/lib(64)?/.*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
-/usr(/.*)?/java/.*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
-/usr(/.*)?/java/.*\.jar -- system_u:object_r:shlib_t
-/usr(/.*)?/java/.*\.jsa -- system_u:object_r:shlib_t
/usr(/.*)?/lib(64)?(/.*)?/ld-[^/]*\.so(\.[^/]*)* system_u:object_r:ld_so_t
/usr(/.*)?/bin(/.*)? system_u:object_r:bin_t
/usr(/.*)?/Bin(/.*)? system_u:object_r:bin_t
@@ -399,6 +396,7 @@
#
/var/spool(/.*)? system_u:object_r:var_spool_t
/var/spool/texmf(/.*)? system_u:object_r:tetex_data_t
+/var/spool/(client)?mqueue(/.*)? system_u:object_r:mqueue_spool_t
#
# /var/log
diff --exclude-from=exclude -N -u -r nsapolicy/macros/admin_macros.te policy-1.19.7/macros/admin_macros.te
--- nsapolicy/macros/admin_macros.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/macros/admin_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -33,6 +33,7 @@
allow $1_t self:capability setuid;
ifdef(`su.te', `su_domain($1)')
+ifdef(`userhelper.te', `userhelper_domain($1)')
ifdef(`sudo.te', `sudo_domain($1)')
# Violates the goal of limiting write access to checkpolicy.
diff --exclude-from=exclude -N -u -r nsapolicy/macros/base_user_macros.te policy-1.19.7/macros/base_user_macros.te
--- nsapolicy/macros/base_user_macros.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/macros/base_user_macros.te 2004-11-30 11:26:55.861923717 -0500
@@ -43,7 +43,7 @@
# for eject
allow $1_t fixed_disk_device_t:blk_file getattr;
-allow $1_t root_dir_type:dir { getattr };
+allow $1_t fs_type:dir { getattr };
# open office is looking for the following
allow $1_t dri_device_t:chr_file getattr;
@@ -160,7 +160,6 @@
ifdef(`screen.te', `screen_domain($1)')
ifdef(`tvtime.te', `tvtime_domain($1)')
-ifdef(`userhelper.te', `userhelper_domain($1)')
ifdef(`mozilla.te', `mozilla_domain($1)')
ifdef(`games.te', `games_domain($1)')
ifdef(`gpg.te', `gpg_domain($1)')
@@ -207,7 +206,7 @@
# Grant permissions to access the system DBus
ifdef(`dbusd.te', `
dbusd_client(system, $1)
-can_network($1_dbusd_t)
+can_network_server_tcp($1_dbusd_t)
allow $1_dbusd_t reserved_port_t:tcp_socket name_bind;
allow $1_t system_dbusd_t:dbus { send_msg acquire_svc };
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/games_domain.te policy-1.19.7/macros/program/games_domain.te
--- nsapolicy/macros/program/games_domain.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/macros/program/games_domain.te 2004-11-30 06:18:45.000000000 -0500
@@ -46,5 +46,13 @@
allow $1_games_t event_device_t:chr_file getattr;
allow $1_games_t mouse_device_t:chr_file getattr;
allow $1_games_t self:file { getattr read };
+
+# kpat spews errors
+dontaudit $1_games_t bin_t:dir getattr;
+dontaudit $1_games_t var_run_t:dir search;
+ifdef(`xdm.te', `
+dontaudit $1_games_t xdm_xserver_tmp_t:dir getattr;
+')
+
')dnl end macro definition
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/gph_macros.te policy-1.19.7/macros/program/gph_macros.te
--- nsapolicy/macros/program/gph_macros.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/macros/program/gph_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -55,7 +55,7 @@
allow $1_t $1_gph_t:fd use;
# Use the network, e.g. for NIS lookups.
-can_network($1_gph_t)
+can_resolve($1_gph_t)
can_ypbind($1_gph_t)
allow $1_gph_t etc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/inetd_macros.te policy-1.19.7/macros/program/inetd_macros.te
--- nsapolicy/macros/program/inetd_macros.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/macros/program/inetd_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -14,7 +14,7 @@
domain_auto_trans(inetd_t, $1_exec_t, $1_t)
allow inetd_t $1_t:process sigkill;
-can_network($1_t)
+can_network_server($1_t)
can_ypbind($1_t)
uses_shlib($1_t)
allow $1_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/irc_macros.te policy-1.19.7/macros/program/irc_macros.te
--- nsapolicy/macros/program/irc_macros.te 2004-11-18 08:13:59.000000000 -0500
+++ policy-1.19.7/macros/program/irc_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -47,7 +47,7 @@
allow $1_t $1_irc_t:process signal;
# Use the network.
-can_network($1_irc_t)
+can_network_client($1_irc_t)
can_ypbind($1_irc_t)
allow $1_irc_t usr_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/kerberos_macros.te policy-1.19.7/macros/program/kerberos_macros.te
--- nsapolicy/macros/program/kerberos_macros.te 2004-11-29 10:24:17.000000000 -0500
+++ policy-1.19.7/macros/program/kerberos_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -3,8 +3,8 @@
if (allow_kerberos) {
can_network_client($1, `kerberos_port_t')
can_resolve($1)
-dontaudit $1 krb5_conf_t:file write;
-allow $1 krb5_conf_t:file { getattr read };
}
') dnl kerberos.te
+dontaudit $1 krb5_conf_t:file write;
+allow $1 krb5_conf_t:file { getattr read };
')
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/lpr_macros.te policy-1.19.7/macros/program/lpr_macros.te
--- nsapolicy/macros/program/lpr_macros.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/macros/program/lpr_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -34,7 +34,7 @@
role $1_r types $1_lpr_t;
# This domain is granted permissions common to most domains (including can_net)
-can_network($1_lpr_t)
+can_network_client($1_lpr_t)
can_ypbind($1_lpr_t)
# Use capabilities.
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/mozilla_macros.te policy-1.19.7/macros/program/mozilla_macros.te
--- nsapolicy/macros/program/mozilla_macros.te 2004-11-30 05:59:39.000000000 -0500
+++ policy-1.19.7/macros/program/mozilla_macros.te 2004-11-30 06:19:08.000000000 -0500
@@ -48,6 +48,7 @@
allow $1_mozilla_t device_t:dir r_dir_perms;
allow $1_mozilla_t devpts_t:dir r_dir_perms;
allow $1_mozilla_t proc_t:file { getattr read };
+r_dir_file($1_mozilla_t, proc_net_t)
dontaudit $1_mozilla_t tty_device_t:chr_file getattr;
dontaudit $1_mozilla_t proc_t:dir read;
@@ -115,6 +116,20 @@
dontaudit $1_mozilla_t file_type:dir getattr;
allow $1_mozilla_t self:sem create_sem_perms;
+ifdef(`userhelper.te', `
+domain_auto_trans($1_mozilla_t, userhelper_exec_t, $1_userhelper_t)
+')
+dontaudit $1_mozilla_t selinux_config_t:dir search;
+
+#
+# Rules needed to run java apps
+#
+allow $1_mozilla_t ld_so_cache_t:file execute;
+allow $1_mozilla_t locale_t:file execute;
+dontaudit $1_mozilla_t *:{ chr_file file } execute;
+dontaudit $1_t ld_so_cache_t:file execute;
+dontaudit $1_t locale_t:file execute;
+
dontaudit $1_mozilla_t selinux_config_t:dir search;
ifdef(`xdm.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/mta_macros.te policy-1.19.7/macros/program/mta_macros.te
--- nsapolicy/macros/program/mta_macros.te 2004-11-20 22:29:09.000000000 -0500
+++ policy-1.19.7/macros/program/mta_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -33,7 +33,7 @@
role $1_r types $1_mail_t;
uses_shlib($1_mail_t)
-can_network($1_mail_t)
+can_network_client_tcp($1_mail_t)
can_ypbind($1_mail_t)
allow $1_mail_t self:unix_dgram_socket create_socket_perms;
allow $1_mail_t self:unix_stream_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/slocate_macros.te policy-1.19.7/macros/program/slocate_macros.te
--- nsapolicy/macros/program/slocate_macros.te 2004-11-30 05:59:40.000000000 -0500
+++ policy-1.19.7/macros/program/slocate_macros.te 2004-11-30 11:26:11.101961692 -0500
@@ -57,8 +57,8 @@
base_file_read_access($1_locate_t)
r_dir_file($1_locate_t, { etc_t lib_t var_t })
-dontaudit $1_locate_t { root_dir_type file_type }:dir r_dir_perms;
-dontaudit $1_locate_t { root_dir_type file_type -shadow_t}:file { getattr read };
+dontaudit $1_locate_t { fs_type file_type }:dir r_dir_perms;
+dontaudit $1_locate_t { fs_type file_type -shadow_t}:file { getattr read };
')
', `
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/ssh_macros.te policy-1.19.7/macros/program/ssh_macros.te
--- nsapolicy/macros/program/ssh_macros.te 2004-11-30 05:59:40.000000000 -0500
+++ policy-1.19.7/macros/program/ssh_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -82,7 +82,7 @@
# Grant permissions needed to create TCP and UDP sockets and
# to access the network.
-can_network($1_ssh_t)
+can_network_client_tcp($1_ssh_t)
can_ypbind($1_ssh_t)
# Use capabilities.
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/userhelper_macros.te policy-1.19.7/macros/program/userhelper_macros.te
--- nsapolicy/macros/program/userhelper_macros.te 2004-11-30 05:59:40.000000000 -0500
+++ policy-1.19.7/macros/program/userhelper_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -140,4 +140,8 @@
allow $1_userhelper_t pam_var_console_t:dir { search };
')
+ifdef(`mozilla.te', `
+domain_auto_trans($1_mozilla_t, userhelper_exec_t, $1_userhelper_t)
+')
+
')dnl end userhelper macro
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/xauth_macros.te policy-1.19.7/macros/program/xauth_macros.te
--- nsapolicy/macros/program/xauth_macros.te 2004-11-30 05:59:40.000000000 -0500
+++ policy-1.19.7/macros/program/xauth_macros.te 2004-11-30 06:18:45.000000000 -0500
@@ -54,7 +54,7 @@
uses_shlib($1_xauth_t)
# allow DNS lookups...
-can_network($1_xauth_t)
+can_resolve($1_xauth_t)
can_ypbind($1_xauth_t)
ifdef(`named.te', `
can_udp_send($1_xauth_t, named_t)
diff --exclude-from=exclude -N -u -r nsapolicy/net_contexts policy-1.19.7/net_contexts
--- nsapolicy/net_contexts 2004-11-09 13:35:11.000000000 -0500
+++ policy-1.19.7/net_contexts 2004-11-30 06:18:45.000000000 -0500
@@ -113,7 +113,6 @@
portcon tcp 631 system_u:object_r:ipp_port_t
portcon udp 631 system_u:object_r:ipp_port_t
')
-ifdef(`kerberos.te', `
portcon tcp 88 system_u:object_r:kerberos_port_t
portcon udp 88 system_u:object_r:kerberos_port_t
portcon tcp 749 system_u:object_r:kerberos_admin_port_t
@@ -121,7 +120,6 @@
portcon udp 750 system_u:object_r:kerberos_port_t
portcon tcp 4444 system_u:object_r:kerberos_master_port_t
portcon udp 4444 system_u:object_r:kerberos_master_port_t
-')
ifdef(`spamd.te', `portcon tcp 783 system_u:object_r:spamd_port_t')
ifdef(`rsync.te', `
portcon tcp 873 system_u:object_r:rsync_port_t
diff --exclude-from=exclude -N -u -r nsapolicy/tunables/distro.tun policy-1.19.7/tunables/distro.tun
--- nsapolicy/tunables/distro.tun 2004-08-20 13:57:29.000000000 -0400
+++ policy-1.19.7/tunables/distro.tun 2004-11-30 06:18:45.000000000 -0500
@@ -5,7 +5,7 @@
# appropriate ifdefs.
-dnl define(`distro_redhat')
+define(`distro_redhat')
dnl define(`distro_suse')
diff --exclude-from=exclude -N -u -r nsapolicy/tunables/tunable.tun policy-1.19.7/tunables/tunable.tun
--- nsapolicy/tunables/tunable.tun 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/tunables/tunable.tun 2004-11-30 06:31:15.000000000 -0500
@@ -2,10 +2,10 @@
dnl define(`user_can_mount')
# Allow rpm to run unconfined.
-dnl define(`unlimitedRPM')
+define(`unlimitedRPM')
# Allow privileged utilities like hotplug and insmod to run unconfined.
-dnl define(`unlimitedUtils')
+define(`unlimitedUtils')
# Allow rc scripts to run unconfined, including any daemon
# started by an rc script that does not have a domain transition
@@ -17,11 +17,11 @@
# Do not audit things that we know to be broken but which
# are not security risks
-dnl define(`hide_broken_symptoms')
+define(`hide_broken_symptoms')
# Allow user_r to reach sysadm_r via su, sudo, or userhelper.
# Otherwise, only staff_r can do so.
-dnl define(`user_canbe_sysadm')
+define(`user_canbe_sysadm')
# Allow xinetd to run unconfined, including any services it starts
# that do not have a domain transition explicitly defined.
diff --exclude-from=exclude -N -u -r nsapolicy/types/devpts.te policy-1.19.7/types/devpts.te
--- nsapolicy/types/devpts.te 2004-09-22 16:19:14.000000000 -0400
+++ policy-1.19.7/types/devpts.te 2004-11-30 11:31:48.561978748 -0500
@@ -16,6 +16,6 @@
# devpts_t is the type of the devpts file system and
# the type of the root directory of the file system.
#
-type devpts_t, fs_type, root_dir_type;
+type devpts_t, fs_type;
diff --exclude-from=exclude -N -u -r nsapolicy/types/file.te policy-1.19.7/types/file.te
--- nsapolicy/types/file.te 2004-11-30 05:59:40.000000000 -0500
+++ policy-1.19.7/types/file.te 2004-11-30 11:31:55.151237091 -0500
@@ -33,12 +33,12 @@
# assigned an extended attribute (EA) value (when using a filesystem
# that supports EAs).
#
-type file_t, file_type, root_dir_type, sysadmfile;
+type file_t, file_type, sysadmfile;
# default_t is the default type for files that do not
# match any specification in the file_contexts configuration
# other than the generic /.* specification.
-type default_t, file_type, root_dir_type, sysadmfile;
+type default_t, file_type, sysadmfile;
#
# root_t is the type for the root directory.
@@ -64,7 +64,7 @@
# boot_t is the type for files in /boot,
# including the kernel.
#
-type boot_t, file_type, root_dir_type, sysadmfile;
+type boot_t, file_type, sysadmfile;
# system_map_t is for the system.map files in /boot
type system_map_t, file_type, sysadmfile;
@@ -157,7 +157,7 @@
#
# usr_t is the type for /usr.
#
-type usr_t, file_type, root_dir_type, sysadmfile;
+type usr_t, file_type, sysadmfile;
#
# src_t is the type of files in the system src directories.
@@ -167,7 +167,7 @@
#
# var_t is the type for /var.
#
-type var_t, file_type, root_dir_type, sysadmfile;
+type var_t, file_type, sysadmfile;
#
# Types for subdirectories of /var.
@@ -264,28 +264,28 @@
# Allow the pty to be associated with the file system.
allow devpts_t self:filesystem associate;
-type tmpfs_t, file_type, sysadmfile, fs_type, root_dir_type;
+type tmpfs_t, file_type, sysadmfile, fs_type;
allow { tmpfs_t tmp_t } tmpfs_t:filesystem associate;
-type autofs_t, fs_type, root_dir_type, noexattrfile, sysadmfile;
+type autofs_t, fs_type, noexattrfile, sysadmfile;
allow autofs_t self:filesystem associate;
-type usbdevfs_t, fs_type, root_dir_type, noexattrfile, sysadmfile;
+type usbdevfs_t, fs_type, noexattrfile, sysadmfile;
allow usbdevfs_t self:filesystem associate;
-type sysfs_t, fs_type, root_dir_type, sysadmfile;
+type sysfs_t, fs_type, sysadmfile;
allow sysfs_t self:filesystem associate;
-type iso9660_t, fs_type, root_dir_type, noexattrfile, sysadmfile;
+type iso9660_t, fs_type, noexattrfile, sysadmfile;
allow iso9660_t self:filesystem associate;
-type romfs_t, fs_type, root_dir_type, sysadmfile;
+type romfs_t, fs_type, sysadmfile;
allow romfs_t self:filesystem associate;
-type ramfs_t, fs_type, root_dir_type, sysadmfile;
+type ramfs_t, fs_type, sysadmfile;
allow ramfs_t self:filesystem associate;
-type dosfs_t, fs_type, root_dir_type, noexattrfile, sysadmfile;
+type dosfs_t, fs_type, noexattrfile, sysadmfile;
allow dosfs_t self:filesystem associate;
# udev_runtime_t is the type of the udev table file
@@ -294,7 +294,7 @@
# krb5_conf_t is the type of the /etc/krb5.conf file
type krb5_conf_t, file_type, sysadmfile;
-type cifs_t, fs_type, root_dir_type, noexattrfile, sysadmfile;
+type cifs_t, fs_type, noexattrfile, sysadmfile;
allow cifs_t self:filesystem associate;
typealias cifs_t alias sambafs_t;
diff --exclude-from=exclude -N -u -r nsapolicy/types/network.te policy-1.19.7/types/network.te
--- nsapolicy/types/network.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.19.7/types/network.te 2004-11-30 06:18:45.000000000 -0500
@@ -64,6 +64,13 @@
type mail_port_t, port_type;
#
+# Ports used to communicate with kerberos server
+#
+type kerberos_port_t, port_type, reserved_port_type;
+type kerberos_admin_port_t, port_type, reserved_port_type;
+type kerberos_master_port_t, port_type;
+
+#
# port_t is the default type of INET port numbers.
# The *_port_t types are used for specific port
# numbers in net_contexts or net_contexts.mls.
diff --exclude-from=exclude -N -u -r nsapolicy/types/nfs.te policy-1.19.7/types/nfs.te
--- nsapolicy/types/nfs.te 2004-09-22 16:19:14.000000000 -0400
+++ policy-1.19.7/types/nfs.te 2004-11-30 11:31:36.421345241 -0500
@@ -13,7 +13,7 @@
# The nfs_*_t types are used for specific NFS
# servers in net_contexts or net_contexts.mls.
#
-type nfs_t, fs_type, root_dir_type;
+type nfs_t, fs_type;
#
# Allow NFS files to be associated with an NFS file system.
diff --exclude-from=exclude -N -u -r nsapolicy/types/procfs.te policy-1.19.7/types/procfs.te
--- nsapolicy/types/procfs.te 2004-11-29 10:24:18.000000000 -0500
+++ policy-1.19.7/types/procfs.te 2004-11-30 11:32:00.668616080 -0500
@@ -14,7 +14,7 @@
# proc_mdstat_t is the type of /proc/mdstat.
# proc_net_t is the type of /proc/net.
#
-type proc_t, fs_type, proc_fs, root_dir_type;
+type proc_t, fs_type, proc_fs;
type proc_kmsg_t, proc_fs;
type proc_kcore_t, proc_fs;
type proc_mdstat_t, proc_fs;
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2005-08-18 7:31 Russell Coker
0 siblings, 0 replies; 27+ messages in thread
From: Russell Coker @ 2005-08-18 7:31 UTC (permalink / raw)
To: SE-Linux
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
Attached is a policy patch for some minor things that are missing. The most
important patches are the ones for postfix.fc and dhcpd.fc as they are the
most likely to break systems.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 9941 bytes --]
--- selinux-policy-strict-1.24.orig/domains/program/restorecon.te
+++ selinux-policy-strict-1.24/domains/program/restorecon.te
@@ -45,6 +45,9 @@
ifdef(`distro_redhat', `
allow restorecon_t tmpfs_t:{ chr_file blk_file } { rw_file_perms relabelfrom relabelto };
')
+ifdef(`dpkg.te', `
+domain_auto_trans(dpkg_t, restorecon_exec_t, restorecon_t)
+')
allow restorecon_t ptyfile:chr_file getattr;
--- selinux-policy-strict-1.24.orig/domains/program/ssh.te
+++ selinux-policy-strict-1.24/domains/program/ssh.te
@@ -113,6 +113,14 @@
can_create_pty($1, `, server_pty')
allow $1_t $1_devpts_t:chr_file { setattr getattr relabelfrom };
dontaudit sshd_t userpty_type:chr_file relabelfrom;
+
+allow $1_t faillog_t:file { append getattr };
+allow $1_t sbin_t:file getattr;
+
+# Allow checking users mail at login
+allow $1_t { var_spool_t mail_spool_t }:dir search;
+allow $1_t mail_spool_t:lnk_file read;
+allow $1_t mail_spool_t:file getattr;
')dnl end sshd_program_domain
# macro for defining which domains a sshd can spawn
@@ -161,11 +169,6 @@
# for when the network connection breaks after running newrole -r sysadm_r
dontaudit sshd_t sysadm_devpts_t:chr_file setattr;
-# Allow checking users mail at login
-allow sshd_t { var_spool_t mail_spool_t }:dir search;
-allow sshd_t mail_spool_t:lnk_file read;
-allow sshd_t mail_spool_t:file getattr;
-
ifdef(`inetd.te', `
if (run_ssh_inetd) {
allow inetd_t ssh_port_t:tcp_socket name_bind;
@@ -229,5 +232,3 @@
allow ssh_keygen_t self:unix_stream_socket create_stream_socket_perms;
allow ssh_keygen_t sysadm_tty_device_t:chr_file { read write };
allow ssh_keygen_t urandom_device_t:chr_file { getattr read };
-allow sshd_t faillog_t:file { append getattr };
-allow sshd_t sbin_t:file getattr;
--- selinux-policy-strict-1.24.orig/domains/program/unused/acct.te
+++ selinux-policy-strict-1.24/domains/program/unused/acct.te
@@ -23,10 +23,11 @@
type acct_data_t, file_type, sysadmfile;
-allow acct_t self:capability sys_pacct;
+# not sure why we need this, the command "last" is reported as using it
+dontaudit acct_t self:capability kill;
# gzip needs chown capability for some reason
-allow acct_t self:capability chown;
+allow acct_t self:capability { chown fsetid sys_pacct };
allow acct_t var_t:dir { getattr search };
rw_dir_create_file(acct_t, acct_data_t)
@@ -37,14 +38,13 @@
read_locale(acct_t)
-allow acct_t self:capability fsetid;
allow acct_t fs_t:filesystem getattr;
allow acct_t self:unix_stream_socket create_socket_perms;
allow acct_t self:fifo_file { read write getattr };
-allow acct_t proc_t:file { read getattr };
+allow acct_t { self proc_t }:file { read getattr };
read_sysctl(acct_t)
@@ -53,8 +53,6 @@
# for nscd
dontaudit acct_t var_run_t:dir search;
-# not sure why we need this, the command "last" is reported as using it
-dontaudit acct_t self:capability kill;
allow acct_t devtty_t:chr_file { read write };
--- selinux-policy-strict-1.24.orig/domains/program/unused/dpkg.te
+++ selinux-policy-strict-1.24/domains/program/unused/dpkg.te
@@ -178,6 +178,9 @@
type apt_rw_etc_t, file_type, sysadmfile;
tmp_domain(apt, `', `{ dir file lnk_file }')
can_exec(apt_t, apt_tmp_t)
+ifdef(`crond.te', `
+allow system_crond_t apt_etc_t:file { getattr read };
+')
rw_dir_create_file(apt_t, apt_rw_etc_t)
--- selinux-policy-strict-1.24.orig/domains/program/unused/fs_daemon.te
+++ selinux-policy-strict-1.24/domains/program/unused/fs_daemon.te
@@ -15,6 +15,8 @@
allow fsdaemon_t self:capability { setgid sys_rawio sys_admin };
allow fsdaemon_t etc_runtime_t:file { getattr read };
+allow fsdaemon_t proc_mdstat_t:file { getattr read };
+
can_exec_any(fsdaemon_t)
allow fsdaemon_t self:fifo_file rw_file_perms;
can_network_udp(fsdaemon_t)
--- selinux-policy-strict-1.24.orig/domains/program/unused/lvm.te
+++ selinux-policy-strict-1.24/domains/program/unused/lvm.te
@@ -101,6 +101,7 @@
dontaudit lvm_t ttyfile:chr_file getattr;
dontaudit lvm_t device_t:{ fifo_file dir chr_file blk_file } getattr;
dontaudit lvm_t devpts_t:dir { getattr read };
+dontaudit lvm_t xconsole_device_t:fifo_file getattr;
ifdef(`gpm.te', `
dontaudit lvm_t gpmctl_t:sock_file getattr;
--- selinux-policy-strict-1.24.orig/domains/program/unused/mailman.te
+++ selinux-policy-strict-1.24/domains/program/unused/mailman.te
@@ -91,6 +91,8 @@
allow mta_delivery_agent mailman_data_t:dir search;
allow mta_delivery_agent mailman_data_t:lnk_file read;
+allow initrc_t mailman_data_t:lnk_file read;
+allow initrc_t mailman_data_t:dir r_dir_perms;
domain_auto_trans({ mta_delivery_agent initrc_t }, mailman_mail_exec_t, mailman_mail_t)
ifdef(`direct_sysadm_daemon', `
domain_auto_trans(sysadm_t, mailman_mail_exec_t, mailman_mail_t)
--- selinux-policy-strict-1.24.orig/domains/program/unused/mysqld.te
+++ selinux-policy-strict-1.24/domains/program/unused/mysqld.te
@@ -89,3 +89,6 @@
}
')
+ifdef(`crond.te', `
+allow system_crond_t mysqld_etc_t:file { getattr read };
+')
--- selinux-policy-strict-1.24.orig/domains/program/unused/ntpd.te
+++ selinux-policy-strict-1.24/domains/program/unused/ntpd.te
@@ -27,7 +27,7 @@
# for SSP
allow ntpd_t urandom_device_t:chr_file { getattr read };
-allow ntpd_t self:capability { kill setgid setuid sys_time net_bind_service ipc_lock sys_chroot };
+allow ntpd_t self:capability { chown dac_override kill setgid setuid sys_time net_bind_service ipc_lock sys_chroot };
dontaudit ntpd_t self:capability { net_admin };
allow ntpd_t self:process { setcap setsched };
# ntpdate wants sys_nice
--- selinux-policy-strict-1.24.orig/domains/program/unused/sxid.te
+++ selinux-policy-strict-1.24/domains/program/unused/sxid.te
@@ -32,6 +32,7 @@
allow sxid_t ttyfile:chr_file getattr;
allow sxid_t file_type:dir { getattr read search };
allow sxid_t sysadmfile:file { getattr read };
+dontaudit sxid_t devpts_t:dir r_dir_perms;
allow sxid_t fs_type:dir { getattr read search };
# Use the network.
--- selinux-policy-strict-1.24.orig/file_contexts/program/apache.fc
+++ selinux-policy-strict-1.24/file_contexts/program/apache.fc
@@ -26,15 +26,17 @@
/var/log/cgiwrap\.log.* -- system_u:object_r:httpd_log_t
/var/cache/ssl.*\.sem -- system_u:object_r:httpd_cache_t
/var/cache/mod_ssl(/.*)? system_u:object_r:httpd_cache_t
-/var/run/apache(2)?\.pid.* -- system_u:object_r:httpd_var_run_t
+/var/run/apache.* system_u:object_r:httpd_var_run_t
/var/lib/httpd(/.*)? system_u:object_r:httpd_var_lib_t
/var/lib/php/session(/.*)? system_u:object_r:httpd_var_run_t
/etc/apache-ssl(2)?(/.*)? system_u:object_r:httpd_config_t
/usr/lib/apache-ssl/.+ -- system_u:object_r:httpd_exec_t
/usr/sbin/apache-ssl(2)? -- system_u:object_r:httpd_exec_t
/var/log/apache-ssl(2)?(/.*)? system_u:object_r:httpd_log_t
-/var/run/apache-ssl(2)?\.pid.* -- system_u:object_r:httpd_var_run_t
/var/run/gcache_port -s system_u:object_r:httpd_var_run_t
+ifdef(`distro_debian', `
+/var/log/horde2(/.*)? system_u:object_r:httpd_log_t
+')
ifdef(`distro_suse', `
# suse puts shell scripts there :-(
/usr/share/apache2/[^/]* -- system_u:object_r:bin_t
--- selinux-policy-strict-1.24.orig/file_contexts/program/clamav.fc
+++ selinux-policy-strict-1.24/file_contexts/program/clamav.fc
@@ -12,4 +12,4 @@
/var/run/clamd\.ctl -s system_u:object_r:clamd_sock_t
/var/run/clamd\.pid -- system_u:object_r:clamd_var_run_t
/var/run/clamav(/.*)? system_u:object_r:clamd_var_run_t
-/var/run/clamav/clamd.sock -s system_u:object_r:clamd_sock_t
+/var/run/clamav/clamd\.sock -s system_u:object_r:clamd_sock_t
--- selinux-policy-strict-1.24.orig/file_contexts/program/dhcpd.fc
+++ selinux-policy-strict-1.24/file_contexts/program/dhcpd.fc
@@ -3,7 +3,7 @@
/etc/dhcp3(/.*)? system_u:object_r:dhcp_etc_t
/usr/sbin/dhcpd.* -- system_u:object_r:dhcpd_exec_t
/var/lib/dhcp(3)?/dhcpd\.leases.* -- system_u:object_r:dhcpd_state_t
-/var/run/dhcpd\.pid -d system_u:object_r:dhcpd_var_run_t
+/var/run/dhcpd\.pid -- system_u:object_r:dhcpd_var_run_t
ifdef(`dhcp_defined', `', `
/var/lib/dhcp(3)? -d system_u:object_r:dhcp_state_t
define(`dhcp_defined')
--- selinux-policy-strict-1.24.orig/file_contexts/program/postfix.fc
+++ selinux-policy-strict-1.24/file_contexts/program/postfix.fc
@@ -10,6 +10,7 @@
/usr/libexec/postfix/(n)?qmgr -- system_u:object_r:postfix_qmgr_exec_t
/usr/libexec/postfix/showq -- system_u:object_r:postfix_showq_exec_t
/usr/libexec/postfix/smtp -- system_u:object_r:postfix_smtp_exec_t
+/usr/libexec/postfix/scache -- system_u:object_r:postfix_smtp_exec_t
/usr/libexec/postfix/smtpd -- system_u:object_r:postfix_smtpd_exec_t
/usr/libexec/postfix/bounce -- system_u:object_r:postfix_bounce_exec_t
/usr/libexec/postfix/pipe -- system_u:object_r:postfix_pipe_exec_t
@@ -22,6 +23,7 @@
/usr/lib/postfix/(n)?qmgr -- system_u:object_r:postfix_qmgr_exec_t
/usr/lib/postfix/showq -- system_u:object_r:postfix_showq_exec_t
/usr/lib/postfix/smtp -- system_u:object_r:postfix_smtp_exec_t
+/usr/lib/postfix/scache -- system_u:object_r:postfix_smtp_exec_t
/usr/lib/postfix/smtpd -- system_u:object_r:postfix_smtpd_exec_t
/usr/lib/postfix/bounce -- system_u:object_r:postfix_bounce_exec_t
/usr/lib/postfix/pipe -- system_u:object_r:postfix_pipe_exec_t
--- selinux-policy-strict-1.24.orig/file_contexts/program/radvd.fc
+++ selinux-policy-strict-1.24/file_contexts/program/radvd.fc
@@ -2,3 +2,4 @@
/etc/radvd\.conf -- system_u:object_r:radvd_etc_t
/usr/sbin/radvd -- system_u:object_r:radvd_exec_t
/var/run/radvd\.pid -- system_u:object_r:radvd_var_run_t
+/var/run/radvd/saved-settings -- system_u:object_r:radvd_var_run_t
--- selinux-policy-strict-1.24.orig/macros/program/gpg_macros.te
+++ selinux-policy-strict-1.24/macros/program/gpg_macros.te
@@ -61,7 +61,7 @@
allow { $1_t $1_gpg_t } $1_gpg_t:process signal;
# setrlimit is for ulimit -c 0
-allow $1_gpg_t self:process { setrlimit setcap };
+allow $1_gpg_t self:process { setrlimit setcap setpgid };
# allow ps to show gpg
can_ps($1_t, $1_gpg_t)
^ permalink raw reply [flat|nested] 27+ messages in thread* [Fwd: New policy patch]
@ 2005-01-12 18:46 Daniel J Walsh
2005-01-21 20:36 ` James Carter
0 siblings, 1 reply; 27+ messages in thread
From: Daniel J Walsh @ 2005-01-12 18:46 UTC (permalink / raw)
To: SE Linux
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: New policy patch --]
[-- Type: message/rfc822, Size: 39682 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 342 bytes --]
Add customizable types.
Add samba_home_dir support.
Fix postgresql to run on ypbind platform
Begin adding support for NFSV4 with Kerberos keys
Add execmod to users for ld_so_t
add execmem for mozilla
Add unrestricted attribute to indicate domains using unconfined_t.
Also began using typeattribute.
[-- Attachment #2.1.2: policy-20050112.patch --]
[-- Type: text/x-patch, Size: 38466 bytes --]
diff --exclude-from=exclude -N -u -r nsapolicy/attrib.te policy-1.21.1/attrib.te
--- nsapolicy/attrib.te 2004-12-21 10:59:56.000000000 -0500
+++ policy-1.21.1/attrib.te 2005-01-12 09:19:59.141059592 -0500
@@ -393,3 +393,8 @@
# For labeling of domains whos transition can be disabled
attribute transitionbool;
+# For labeling of file_context domains which users can change files to rather
+# then the default file context. These file_context can survive a relabeling
+# of the file system.
+attribute customizable;
+
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/initrc.te policy-1.21.1/domains/program/initrc.te
--- nsapolicy/domains/program/initrc.te 2005-01-12 08:14:47.039693689 -0500
+++ policy-1.21.1/domains/program/initrc.te 2005-01-12 09:18:27.139390056 -0500
@@ -12,7 +12,7 @@
# initrc_exec_t is the type of the init program.
#
# do not use privmail for sendmail as it creates a type transition conflict
-type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, unrestricted, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') ifdef(`distro_debian', `etc_writer, ') sysctl_kernel_writer, nscd_client_domain;
+type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, auth_write, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', `', `privmail,') ifdef(`distro_debian', `etc_writer, ') sysctl_kernel_writer, nscd_client_domain;
role system_r types initrc_t;
uses_shlib(initrc_t);
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/init.te policy-1.21.1/domains/program/init.te
--- nsapolicy/domains/program/init.te 2005-01-12 08:14:47.017696186 -0500
+++ policy-1.21.1/domains/program/init.te 2005-01-12 09:18:27.140389944 -0500
@@ -14,7 +14,7 @@
# by init during initialization. This pipe is used
# to communicate with init.
#
-type init_t, domain, privlog, mlstrustedreader, mlstrustedwriter, sysctl_kernel_writer, nscd_client_domain ifdef(`targeted_policy', `, unrestricted');
+type init_t, domain, privlog, mlstrustedreader, mlstrustedwriter, sysctl_kernel_writer, nscd_client_domain;
role system_r types init_t;
uses_shlib(init_t);
type init_exec_t, file_type, sysadmfile, exec_type;
@@ -141,3 +141,7 @@
# file descriptors inherited from the rootfs.
dontaudit init_t root_t:{ file chr_file } { read write };
+ifdef(`targeted_policy', `
+typeattribute init_t unrestricted;
+')
+
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ldconfig.te policy-1.21.1/domains/program/ldconfig.te
--- nsapolicy/domains/program/ldconfig.te 2005-01-12 08:14:47.055691874 -0500
+++ policy-1.21.1/domains/program/ldconfig.te 2005-01-12 09:18:27.140389944 -0500
@@ -8,7 +8,7 @@
#
# Rules for the ldconfig_t domain.
#
-type ldconfig_t, domain, privlog, etc_writer ifdef(`targeted_policy', `, unrestricted' );
+type ldconfig_t, domain, privlog, etc_writer;
type ldconfig_exec_t, file_type, sysadmfile, exec_type;
role sysadm_r types ldconfig_t;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/login.te policy-1.21.1/domains/program/login.te
--- nsapolicy/domains/program/login.te 2004-12-11 06:31:18.000000000 -0500
+++ policy-1.21.1/domains/program/login.te 2005-01-12 09:18:27.141389832 -0500
@@ -84,6 +84,10 @@
r_dir_file($1_login_t, nfs_t)
}
+if (use_samba_home_dirs) {
+r_dir_file($1_login_t, cifs_t)
+}
+
# FIXME: what is this for?
ifdef(`xdm.te', `
allow xdm_t $1_login_t:process signull;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/modutil.te policy-1.21.1/domains/program/modutil.te
--- nsapolicy/domains/program/modutil.te 2005-01-12 08:14:47.086688356 -0500
+++ policy-1.21.1/domains/program/modutil.te 2005-01-12 09:18:27.142389719 -0500
@@ -69,7 +69,7 @@
# Rules for the insmod_t domain.
#
-type insmod_t, domain, privlog, sysctl_kernel_writer, privmem ifdef(`unlimitedUtils', `, admin, etc_writer, fs_domain, auth_write, privowner, privmodule, unrestricted' )
+type insmod_t, domain, privlog, sysctl_kernel_writer, privmem ifdef(`unlimitedUtils', `, admin, etc_writer, fs_domain, auth_write, privowner, privmodule' )
;
role system_r types insmod_t;
role sysadm_r types insmod_t;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ssh.te policy-1.21.1/domains/program/ssh.te
--- nsapolicy/domains/program/ssh.te 2005-01-12 08:14:47.150681092 -0500
+++ policy-1.21.1/domains/program/ssh.te 2005-01-12 09:18:27.143389607 -0500
@@ -80,6 +80,11 @@
allow $1_t nfs_t:file { getattr read };
}
+if (use_samba_home_dirs) {
+allow $1_t cifs_t:dir { search getattr };
+allow $1_t cifs_t:file { getattr read };
+}
+
# Set exec context.
can_setexec($1_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unconfined.te policy-1.21.1/domains/program/unconfined.te
--- nsapolicy/domains/program/unconfined.te 2004-08-24 15:35:26.000000000 -0400
+++ policy-1.21.1/domains/program/unconfined.te 2005-01-12 09:18:27.144389495 -0500
@@ -6,7 +6,7 @@
# chcon -t unconfined_exec_t /usr/local/bin/appsrv
# Or alternatively add it to /etc/security/selinux/src/policy/file_contexts/program/unconfined.fc
-type unconfined_t, domain, privlog, admin, privmem, fs_domain, auth_write, unrestricted;
+type unconfined_t, domain, privlog, admin, privmem, fs_domain, auth_write;
type unconfined_exec_t, file_type, sysadmfile, exec_type;
role sysadm_r types unconfined_t;
domain_auto_trans(sysadm_t, unconfined_exec_t, unconfined_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/anaconda.te policy-1.21.1/domains/program/unused/anaconda.te
--- nsapolicy/domains/program/unused/anaconda.te 2004-12-09 10:26:08.000000000 -0500
+++ policy-1.21.1/domains/program/unused/anaconda.te 2005-01-12 09:18:27.144389495 -0500
@@ -10,7 +10,7 @@
#
# anaconda_t is the domain of the installation program
#
-type anaconda_t, admin, etc_writer, fs_domain, privmem, auth_write, domain, privlog, privowner, privmodule, sysctl_kernel_writer, unrestricted;
+type anaconda_t, admin, etc_writer, fs_domain, privmem, auth_write, domain, privlog, privowner, privmodule, sysctl_kernel_writer;
role system_r types anaconda_t;
unconfined_domain(anaconda_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/apache.te policy-1.21.1/domains/program/unused/apache.te
--- nsapolicy/domains/program/unused/apache.te 2005-01-12 08:14:47.372655899 -0500
+++ policy-1.21.1/domains/program/unused/apache.te 2005-01-12 09:18:27.145389382 -0500
@@ -19,6 +19,13 @@
# the user CGI scripts, then relabel rule for user_r should be removed.
#
###############################################################################
+
+define(`httpd_home_dirs', `
+r_dir_file(httpd_t, $1)
+r_dir_file(httpd_suexec_t, $1)
+can_exec(httpd_suexec_t, $1)
+')
+
type http_port_t, port_type, reserved_port_type;
bool httpd_unified false;
@@ -262,9 +269,10 @@
allow httpd_suexec_t autofs_t:dir { search getattr };
')
if (use_nfs_home_dirs && httpd_enable_homedirs) {
-r_dir_file(httpd_t, nfs_t)
-r_dir_file(httpd_suexec_t, nfs_t)
-can_exec(httpd_suexec_t, nfs_t)
+httpd_home_dirs(nfs_t)
+}
+if (use_samba_home_dirs && httpd_enable_homedirs) {
+httpd_home_dirs(cifs_t)
}
r_dir_file(httpd_t, fonts_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/cups.te policy-1.21.1/domains/program/unused/cups.te
--- nsapolicy/domains/program/unused/cups.te 2005-01-12 08:14:47.490642507 -0500
+++ policy-1.21.1/domains/program/unused/cups.te 2005-01-12 09:18:27.146389270 -0500
@@ -248,3 +248,6 @@
allow cupsd_t initrc_t:dbus send_msg;
')
+ifdef(`targeted_policy', `
+allow cupsd_t unconfined_t:dbus send_msg;
+')
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/firstboot.te policy-1.21.1/domains/program/unused/firstboot.te
--- nsapolicy/domains/program/unused/firstboot.te 2004-12-02 14:11:41.000000000 -0500
+++ policy-1.21.1/domains/program/unused/firstboot.te 2005-01-12 09:18:27.147389158 -0500
@@ -10,7 +10,7 @@
#
# firstboot_exec_t is the type of the firstboot executable.
#
-application_domain(firstboot,`, admin, etc_writer, fs_domain, privmem, auth_write, privlog, privowner, privmodule, sysctl_kernel_writer, unrestricted')
+application_domain(firstboot,`, admin, etc_writer, fs_domain, privmem, auth_write, privlog, privowner, privmodule, sysctl_kernel_writer')
type firstboot_rw_t, file_type, sysadmfile;
role system_r types firstboot_t;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/ftpd.te policy-1.21.1/domains/program/unused/ftpd.te
--- nsapolicy/domains/program/unused/ftpd.te 2005-01-05 14:37:26.000000000 -0500
+++ policy-1.21.1/domains/program/unused/ftpd.te 2005-01-12 09:18:27.148389046 -0500
@@ -100,14 +100,15 @@
# allow access to /home
allow ftpd_t home_root_t:dir { getattr search };
}
-
-if (ftp_home_dir && use_nfs_home_dirs) {
-allow ftpd_t nfs_t:dir r_dir_perms;
-allow ftpd_t nfs_t:file r_file_perms;
+if (use_nfs_home_dirs && ftp_home_dir) {
+ r_dir_file(ftpd_t, nfs_t)
+}
+if (use_samba_home_dirs && ftp_home_dir) {
+ r_dir_file(ftpd_t, cifs_t)
}
dontaudit ftpd_t selinux_config_t:dir search;
#
# Type for access to anon ftp
#
-type ftpd_anon_t, file_type, sysadmfile;
+type ftpd_anon_t, file_type, sysadmfile, customizable;
r_dir_file(ftpd_t,ftpd_anon_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/hotplug.te policy-1.21.1/domains/program/unused/hotplug.te
--- nsapolicy/domains/program/unused/hotplug.te 2004-12-09 10:26:09.000000000 -0500
+++ policy-1.21.1/domains/program/unused/hotplug.te 2005-01-12 09:18:27.149388933 -0500
@@ -11,7 +11,7 @@
# hotplug_exec_t is the type of the hotplug executable.
#
ifdef(`unlimitedUtils', `
-daemon_domain(hotplug, `, admin, etc_writer, fs_domain, privmem, auth_write, privowner, privmodule, domain, privlog, sysctl_kernel_writer, unrestricted')
+daemon_domain(hotplug, `, admin, etc_writer, fs_domain, privmem, auth_write, privowner, privmodule, domain, privlog, sysctl_kernel_writer')
', `
daemon_domain(hotplug, `, privmodule')
')
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/inetd.te policy-1.21.1/domains/program/unused/inetd.te
--- nsapolicy/domains/program/unused/inetd.te 2005-01-12 08:14:47.700618675 -0500
+++ policy-1.21.1/domains/program/unused/inetd.te 2005-01-12 09:18:27.150388821 -0500
@@ -18,7 +18,7 @@
# Rules for the inetd_t domain.
#
-daemon_domain(inetd, `ifdef(`unlimitedInetd', `,admin, etc_writer, fs_domain, auth_write, privmem, unrestricted')' )
+daemon_domain(inetd, `ifdef(`unlimitedInetd', `,admin, etc_writer, fs_domain, auth_write, privmem')' )
can_network(inetd_t)
allow inetd_t self:unix_dgram_socket create_socket_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/pamconsole.te policy-1.21.1/domains/program/unused/pamconsole.te
--- nsapolicy/domains/program/unused/pamconsole.te 2004-11-09 13:35:12.000000000 -0500
+++ policy-1.21.1/domains/program/unused/pamconsole.te 2005-01-12 09:18:27.150388821 -0500
@@ -41,3 +41,4 @@
allow pam_console_t xdm_var_run_t:file { getattr read };
')
allow initrc_t pam_var_console_t:dir r_dir_perms;
+allow pam_console_t file_context_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/postgresql.te policy-1.21.1/domains/program/unused/postgresql.te
--- nsapolicy/domains/program/unused/postgresql.te 2005-01-12 08:14:47.980586899 -0500
+++ policy-1.21.1/domains/program/unused/postgresql.te 2005-01-12 09:18:27.151388709 -0500
@@ -53,6 +53,7 @@
# Use the network.
can_network_server(postgresql_t)
+can_ypbind(postgresql_t)
allow postgresql_t self:fifo_file { getattr read write ioctl };
allow postgresql_t self:unix_stream_socket create_stream_socket_perms;
can_unix_connect(postgresql_t, self)
@@ -84,6 +85,7 @@
# Allow access to the postgresql databases
create_dir_file(postgresql_t, postgresql_db_t)
+file_type_auto_trans(postgresql_t, var_lib_t, postgresql_db_t)
allow postgresql_t var_lib_t:dir { getattr search };
# because postgresql start scripts are broken and put the pid file in the DB
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/rpcd.te policy-1.21.1/domains/program/unused/rpcd.te
--- nsapolicy/domains/program/unused/rpcd.te 2004-12-09 10:26:09.000000000 -0500
+++ policy-1.21.1/domains/program/unused/rpcd.te 2005-01-12 09:18:27.152388597 -0500
@@ -126,3 +126,15 @@
allow rpcd_t rpc_pipefs_t:sock_file { read write };
dontaudit rpcd_t selinux_config_t:dir { search };
allow rpcd_t proc_net_t:dir search;
+
+
+rpc_domain(gssd)
+can_kerberos(gssd_t)
+allow gssd_t krb5_keytab_t:file r_file_perms;
+allow gssd_t urandom_device_t:chr_file { getattr read };
+r_dir_file(gssd_t, tmp_t)
+tmp_domain(gssd)
+allow gssd_t self:fifo_file { read write };
+r_dir_file(gssd_t, proc_net_t)
+allow gssd_t rpc_pipefs_t:dir r_dir_perms;
+allow gssd_t rpc_pipefs_t:sock_file { read write };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/rpm.te policy-1.21.1/domains/program/unused/rpm.te
--- nsapolicy/domains/program/unused/rpm.te 2005-01-12 08:14:48.024581906 -0500
+++ policy-1.21.1/domains/program/unused/rpm.te 2005-01-12 09:18:27.153388484 -0500
@@ -10,7 +10,7 @@
# var_log_rpm_t is the type for rpm log files (/var/log/rpmpkgs*)
# var_lib_rpm_t is the type for rpm files in /var/lib
#
-type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd ifdef(`unlimitedRPM', `, unrestricted, auth_write');
+type rpm_t, domain, admin, etc_writer, privlog, privowner, privmem, priv_system_role, fs_domain, privfd;
role system_r types rpm_t;
uses_shlib(rpm_t)
type rpm_exec_t, file_type, sysadmfile, exec_type;
@@ -115,7 +115,7 @@
allow { insmod_t depmod_t } rpm_t:fifo_file rw_file_perms;
-type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role ifdef(`unlimitedRPM', `, unrestricted, auth_write');
+type rpm_script_t, domain, admin, etc_writer, privlog, privowner, privmodule, privmem, fs_domain, privfd, priv_system_role;
# policy for rpm scriptlet
role system_r types rpm_script_t;
uses_shlib(rpm_script_t)
@@ -249,7 +249,9 @@
allow initrc_t rpm_var_lib_t:file create_file_perms;
ifdef(`unlimitedRPM', `
+typeattribute rpm_t auth_write;
unconfined_domain(rpm_t)
+typeattribute rpm_script_t auth_write;
unconfined_domain(rpm_script_t)
')
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/samba.te policy-1.21.1/domains/program/unused/samba.te
--- nsapolicy/domains/program/unused/samba.te 2004-12-11 06:31:19.000000000 -0500
+++ policy-1.21.1/domains/program/unused/samba.te 2005-01-12 09:18:27.154388372 -0500
@@ -7,14 +7,14 @@
#################################
#
# Declarations for Samba
-#
+#n
daemon_domain(smbd, `, privhome, auth_chkpwd')
daemon_domain(nmbd)
type samba_etc_t, file_type, sysadmfile, usercanread;
type samba_log_t, file_type, sysadmfile, logfile;
type samba_var_t, file_type, sysadmfile;
-type samba_share_t, file_type, sysadmfile;
+type samba_share_t, file_type, sysadmfile, customizable;
type samba_secrets_t, file_type, sysadmfile;
typealias samba_var_t alias samba_spool_t;
@@ -73,8 +73,7 @@
allow smbd_t usr_t:file { getattr read };
# Access Samba shares.
-allow smbd_t samba_share_t:dir create_dir_perms;
-allow smbd_t samba_share_t:file create_file_perms;
+create_dir_file(smbd_t, samba_share_t)
ifdef(`logrotate.te', `
# the application should be changed
@@ -117,3 +116,14 @@
')
# Needed for winbindd
allow smbd_t { samba_var_t smbd_var_run_t }:sock_file create_file_perms;
+
+# Support Samba sharing of home directories
+bool samba_enable_home_dirs false;
+
+if ( samba_enable_home_dirs ) {
+allow smbd_t home_root_t:dir { getattr search };
+allow smbd_t home_dir_type:dir { getattr search };
+allow smbd_t home_type:dir create_dir_perms;
+dontaudit smbd_t home_type:{ sock_file fifo_file chr_file blk_file } r_file_perms;
+}
+
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/spamd.te policy-1.21.1/domains/program/unused/spamd.te
--- nsapolicy/domains/program/unused/spamd.te 2004-12-02 14:11:43.000000000 -0500
+++ policy-1.21.1/domains/program/unused/spamd.te 2005-01-12 09:18:27.155388260 -0500
@@ -64,5 +64,10 @@
allow spamd_t nfs_t:file create_file_perms;
}
+if (use_samba_home_dirs) {
+allow spamd_t cifs_t:dir rw_dir_perms;
+allow spamd_t cifs_t:file create_file_perms;
+}
+
allow spamd_t home_root_t:dir getattr;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/xdm.te policy-1.21.1/domains/program/unused/xdm.te
--- nsapolicy/domains/program/unused/xdm.te 2005-01-05 14:37:26.000000000 -0500
+++ policy-1.21.1/domains/program/unused/xdm.te 2005-01-12 09:18:27.156388147 -0500
@@ -290,6 +290,12 @@
can_exec(xdm_t, nfs_t)
}
+if (use_samba_home_dirs) {
+allow { xdm_t xdm_xserver_t } cifs_t:dir create_dir_perms;
+allow { xdm_t xdm_xserver_t } cifs_t:{file lnk_file} create_file_perms;
+can_exec(xdm_t, cifs_t)
+}
+
# for .dmrc
allow xdm_t user_home_dir_type:dir { getattr search };
allow xdm_t user_home_type:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/user.te policy-1.21.1/domains/user.te
--- nsapolicy/domains/user.te 2004-12-21 10:59:57.000000000 -0500
+++ policy-1.21.1/domains/user.te 2005-01-12 09:18:27.156388147 -0500
@@ -10,6 +10,9 @@
# Support NFS home directories
bool use_nfs_home_dirs false;
+# Support SAMBA home directories
+bool use_samba_home_dirs false;
+
# Allow users to run TCP servers (bind to ports and accept connection from
# the same domain and outside users) disabling this forces FTP passive mode
# and may change other protocols
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/innd.fc policy-1.21.1/file_contexts/program/innd.fc
--- nsapolicy/file_contexts/program/innd.fc 2004-11-19 11:20:43.000000000 -0500
+++ policy-1.21.1/file_contexts/program/innd.fc 2005-01-12 09:18:27.157388035 -0500
@@ -1,5 +1,7 @@
# innd
/usr/sbin/innd.* -- system_u:object_r:innd_exec_t
+/usr/bin/rpost -- system_u:object_r:innd_exec_t
+/usr/bin/suck -- system_u:object_r:innd_exec_t
/var/run/innd(/.*)? system_u:object_r:innd_var_run_t
/etc/news(/.*)? system_u:object_r:innd_etc_t
/etc/news/boot -- system_u:object_r:innd_exec_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/mysqld.fc policy-1.21.1/file_contexts/program/mysqld.fc
--- nsapolicy/file_contexts/program/mysqld.fc 2004-11-19 11:20:44.000000000 -0500
+++ policy-1.21.1/file_contexts/program/mysqld.fc 2005-01-12 09:18:27.158387923 -0500
@@ -1,5 +1,5 @@
# mysql database server
-/usr/sbin/mysqld -- system_u:object_r:mysqld_exec_t
+/usr/sbin/mysqld(-max)? -- system_u:object_r:mysqld_exec_t
/usr/libexec/mysqld -- system_u:object_r:mysqld_exec_t
/var/run/mysqld(/.*)? system_u:object_r:mysqld_var_run_t
/var/log/mysql.* -- system_u:object_r:mysqld_log_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/postgresql.fc policy-1.21.1/file_contexts/program/postgresql.fc
--- nsapolicy/file_contexts/program/postgresql.fc 2005-01-12 08:14:48.738500877 -0500
+++ policy-1.21.1/file_contexts/program/postgresql.fc 2005-01-12 09:18:27.159387811 -0500
@@ -13,8 +13,8 @@
/usr/bin/pg_id -- system_u:object_r:postgresql_exec_t
/usr/bin/pg_restore -- system_u:object_r:postgresql_exec_t
-/var/lib/postgres(ql)?(/.*)? system_u:object_r:postgresql_db_t
-/var/lib/pgsql(/.*)? system_u:object_r:postgresql_db_t
+/var/lib/postgres(ql)?(/.*)? system_u:object_r:postgresql_db_t
+/var/lib/pgsql/data(/.*)? system_u:object_r:postgresql_db_t
/var/run/postgresql(/.*)? system_u:object_r:postgresql_var_run_t
/etc/postgresql(/.*)? system_u:object_r:postgresql_etc_t
/var/log/postgres\.log.* -- system_u:object_r:postgresql_log_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/rpcd.fc policy-1.21.1/file_contexts/program/rpcd.fc
--- nsapolicy/file_contexts/program/rpcd.fc 2004-11-19 11:20:44.000000000 -0500
+++ policy-1.21.1/file_contexts/program/rpcd.fc 2005-01-12 09:18:27.159387811 -0500
@@ -3,6 +3,8 @@
/usr/sbin/rpc\..* -- system_u:object_r:rpcd_exec_t
/usr/sbin/rpc\.nfsd -- system_u:object_r:nfsd_exec_t
/usr/sbin/exportfs -- system_u:object_r:nfsd_exec_t
+/usr/sbin/rpc\.gssd -- system_u:object_r:gssd_exec_t
+/usr/sbin/rpc\.svcgssd -- system_u:object_r:gssd_exec_t
/usr/sbin/rpc\.mountd -- system_u:object_r:nfsd_exec_t
/var/run/rpc\.statd\.pid -- system_u:object_r:rpcd_var_run_t
/var/run/rpc\.statd(/.*)? system_u:object_r:rpcd_var_run_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/udev.fc policy-1.21.1/file_contexts/program/udev.fc
--- nsapolicy/file_contexts/program/udev.fc 2005-01-12 08:14:48.813492366 -0500
+++ policy-1.21.1/file_contexts/program/udev.fc 2005-01-12 09:18:27.204382758 -0500
@@ -8,5 +8,5 @@
/etc/udev/scripts/.+ -- system_u:object_r:udev_helper_exec_t
/etc/hotplug\.d/default/udev.* -- system_u:object_r:udev_helper_exec_t
/dev/udev\.tbl -- system_u:object_r:udev_tbl_t
-/dev/\.udev\.tdb -- system_u:object_r:udev_tdb_t
+/dev/\.udev\.tdb/.* -- system_u:object_r:udev_tdb_t
/sbin/wait_for_sysfs -- system_u:object_r:udev_exec_t
diff --exclude-from=exclude -N -u -r nsapolicy/macros/base_user_macros.te policy-1.21.1/macros/base_user_macros.te
--- nsapolicy/macros/base_user_macros.te 2004-12-09 10:26:10.000000000 -0500
+++ policy-1.21.1/macros/base_user_macros.te 2005-01-12 09:18:27.205382646 -0500
@@ -2,6 +2,12 @@
# Macros for all user login domains.
#
+define(`network_home_dir', `
+create_dir_file($1, $2)
+can_exec($1, $2)
+allow $1 $2:{ sock_file fifo_file } create_file_perms;
+')
+
#
# base_user_domain(domain_prefix)
#
@@ -38,6 +44,7 @@
# Allow text relocations on system shared libraries, e.g. libGL.
allow $1_t shlib_t:file execmod;
+allow $1_t ld_so_t:file execmod;
#
# kdeinit wants this access
@@ -70,11 +77,15 @@
ifdef(`automount.te', `
allow $1_t autofs_t:dir { search getattr };
')dnl end if automount.te
+
if (use_nfs_home_dirs) {
-create_dir_file($1_t, nfs_t)
-can_exec($1_t, nfs_t)
-allow $1_t nfs_t:{ sock_file fifo_file } create_file_perms;
+network_home_dir($1_t, nfs_t)
}
+
+if (use_samba_home_dirs) {
+network_home_dir($1_t, cifs_t)
+}
+
if (user_rw_noexattrfile) {
create_dir_file($1_t, noexattrfile)
create_dir_file($1_t, removable_t)
@@ -167,6 +178,7 @@
ifdef(`screen.te', `screen_domain($1)')
ifdef(`tvtime.te', `tvtime_domain($1)')
ifdef(`mozilla.te', `mozilla_domain($1)')
+ifdef(`samba.te', `samba_domain($1)')
ifdef(`games.te', `games_domain($1)')
ifdef(`gpg.te', `gpg_domain($1)')
ifdef(`xauth.te', `xauth_domain($1)')
diff --exclude-from=exclude -N -u -r nsapolicy/macros/global_macros.te policy-1.21.1/macros/global_macros.te
--- nsapolicy/macros/global_macros.te 2005-01-12 08:14:48.985472846 -0500
+++ policy-1.21.1/macros/global_macros.te 2005-01-12 09:18:27.206382534 -0500
@@ -504,6 +504,8 @@
#
define(`unconfined_domain', `
+typeattribute $1 unrestricted;
+
# Mount/unmount any filesystem.
allow $1 fs_type:filesystem *;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/apache_macros.te policy-1.21.1/macros/program/apache_macros.te
--- nsapolicy/macros/program/apache_macros.te 2005-01-12 08:14:49.097460136 -0500
+++ policy-1.21.1/macros/program/apache_macros.te 2005-01-12 09:18:27.207382421 -0500
@@ -3,7 +3,7 @@
#This type is for webpages
#
-type httpd_$1_content_t, file_type, ifelse($1, sys, `', `$1_file_type, ') httpdcontent, sysadmfile;
+type httpd_$1_content_t, file_type, ifelse($1, sys, `', `$1_file_type, ') httpdcontent, sysadmfile, customizable;
ifelse($1, sys, `
typealias httpd_sys_content_t alias httpd_sysadm_content_t;
')
@@ -14,7 +14,7 @@
# This type is used for executable scripts files
#
-type httpd_$1_script_exec_t, file_type, sysadmfile;
+type httpd_$1_script_exec_t, file_type, sysadmfile, customizable;
# Type that CGI scripts run as
type httpd_$1_script_t, domain, privmail, nscd_client_domain;
@@ -41,6 +41,7 @@
read_locale(httpd_$1_script_t)
allow httpd_$1_script_t fs_t:filesystem getattr;
allow httpd_$1_script_t self:unix_stream_socket create_socket_perms;
+allow httpd_$1_script_t httpd_t:unix_stream_socket { read write };
allow httpd_$1_script_t { self proc_t }:file { getattr read };
allow httpd_$1_script_t { self proc_t }:dir r_dir_perms;
@@ -57,9 +58,9 @@
# The following are the only areas that
# scripts can read, read/write, or append to
#
-type httpd_$1_script_ro_t, file_type, httpdcontent, sysadmfile;
-type httpd_$1_script_rw_t, file_type, httpdcontent, sysadmfile;
-type httpd_$1_script_ra_t, file_type, httpdcontent, sysadmfile;
+type httpd_$1_script_ro_t, file_type, httpdcontent, sysadmfile, customizable;
+type httpd_$1_script_rw_t, file_type, httpdcontent, sysadmfile, customizable;
+type httpd_$1_script_ra_t, file_type, httpdcontent, sysadmfile, customizable;
file_type_auto_trans(httpd_$1_script_t, tmp_t, httpd_$1_script_rw_t)
ifdef(`slocate.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/cdrecord_macros.te policy-1.21.1/macros/program/cdrecord_macros.te
--- nsapolicy/macros/program/cdrecord_macros.te 2004-12-21 10:59:58.000000000 -0500
+++ policy-1.21.1/macros/program/cdrecord_macros.te 2005-01-12 09:18:27.208382309 -0500
@@ -35,6 +35,9 @@
if (use_nfs_home_dirs) {
r_dir_file($1_cdrecord_t, nfs_t)
}
+if (use_samba_home_dirs) {
+r_dir_file($1_cdrecord_t, cifs_t)
+}
allow $1_cdrecord_t etc_t:file { getattr read };
# allow searching for cdrom-drive
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/gpg_agent_macros.te policy-1.21.1/macros/program/gpg_agent_macros.te
--- nsapolicy/macros/program/gpg_agent_macros.te 2004-12-11 06:31:21.000000000 -0500
+++ policy-1.21.1/macros/program/gpg_agent_macros.te 2005-01-12 09:18:27.209382197 -0500
@@ -51,6 +51,9 @@
if (use_nfs_home_dirs) {
create_dir_file($1_gpg_agent_t, nfs_t)
}
+if (use_samba_home_dirs) {
+create_dir_file($1_gpg_agent_t, cifs_t)
+}
allow $1_gpg_agent_t self:unix_stream_socket create_stream_socket_perms;
allow $1_gpg_agent_t self:fifo_file { getattr read write };
@@ -111,6 +114,12 @@
dontaudit $1_gpg_pinentry_t nfs_t:dir { read write };
dontaudit $1_gpg_pinentry_t nfs_t:file write;
}
+if (use_samba_home_dirs) {
+allow $1_gpg_pinentry_t cifs_t:dir { getattr search };
+allow $1_gpg_pinentry_t cifs_t:file { getattr read };
+dontaudit $1_gpg_pinentry_t cifs_t:dir { read write };
+dontaudit $1_gpg_pinentry_t cifs_t:file write;
+}
# read /etc/X11/qtrc
allow $1_gpg_pinentry_t etc_t:file { getattr read };
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/gpg_macros.te policy-1.21.1/macros/program/gpg_macros.te
--- nsapolicy/macros/program/gpg_macros.te 2004-12-16 11:38:03.000000000 -0500
+++ policy-1.21.1/macros/program/gpg_macros.te 2005-01-12 09:18:27.210382085 -0500
@@ -79,6 +79,9 @@
if (use_nfs_home_dirs) {
create_dir_file($1_gpg_t, nfs_t)
}
+if (use_samba_home_dirs) {
+create_dir_file($1_gpg_t, cifs_t)
+}
allow $1_gpg_t self:capability { ipc_lock setuid };
allow $1_gpg_t devtty_t:chr_file rw_file_perms;
@@ -111,6 +114,9 @@
if (use_nfs_home_dirs) {
dontaudit $1_gpg_helper_t nfs_t:file { read write };
}
+if (use_samba_home_dirs) {
+dontaudit $1_gpg_helper_t cifs_t:file { read write };
+}
# communicate with the user
allow $1_gpg_helper_t $1_t:fd use;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/lpr_macros.te policy-1.21.1/macros/program/lpr_macros.te
--- nsapolicy/macros/program/lpr_macros.te 2004-12-02 14:11:43.000000000 -0500
+++ policy-1.21.1/macros/program/lpr_macros.te 2005-01-12 09:18:27.210382085 -0500
@@ -81,6 +81,10 @@
r_dir_file($1_lpr_t, nfs_t)
}
+if (use_samba_home_dirs) {
+r_dir_file($1_lpr_t, cifs_t)
+}
+
# Read and write shared files in the spool directory.
allow $1_lpr_t print_spool_t:file rw_file_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/mozilla_macros.te policy-1.21.1/macros/program/mozilla_macros.te
--- nsapolicy/macros/program/mozilla_macros.te 2004-12-21 10:59:59.000000000 -0500
+++ policy-1.21.1/macros/program/mozilla_macros.te 2005-01-12 09:18:27.211381972 -0500
@@ -25,7 +25,7 @@
allow $1_mozilla_t $1_t:process signull;
# Set resource limits and scheduling info.
-allow $1_mozilla_t self:process { setrlimit setsched };
+allow $1_mozilla_t self:process { execmem setrlimit setsched };
allow $1_mozilla_t usr_t:{ lnk_file file } { getattr read };
allow $1_mozilla_t var_lib_t:file { getattr read };
@@ -40,6 +40,9 @@
if (use_nfs_home_dirs) {
create_dir_file($1_mozilla_t, nfs_t)
}
+if (use_samba_home_dirs) {
+create_dir_file($1_mozilla_t, cifs_t)
+}
ifdef(`automount.te', `
allow $1_mozilla_t autofs_t:dir { search getattr };
')dnl end if automount
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/mta_macros.te policy-1.21.1/macros/program/mta_macros.te
--- nsapolicy/macros/program/mta_macros.te 2004-12-11 06:31:21.000000000 -0500
+++ policy-1.21.1/macros/program/mta_macros.te 2005-01-12 09:18:27.212381860 -0500
@@ -99,8 +99,8 @@
# Create dead.letter in user home directories.
file_type_auto_trans($1_mail_t, $1_home_dir_t, $1_home_t, file)
-if (use_nfs_home_dirs) {
-rw_dir_create_file($1_mail_t, nfs_t)
+if (use_samba_home_dirs) {
+rw_dir_create_file($1_mail_t, cifs_t)
}
# if you do not want to allow dead.letter then use the following instead
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/samba_macros.te policy-1.21.1/macros/program/samba_macros.te
--- nsapolicy/macros/program/samba_macros.te 1969-12-31 19:00:00.000000000 -0500
+++ policy-1.21.1/macros/program/samba_macros.te 2005-01-12 09:18:27.213381748 -0500
@@ -0,0 +1,28 @@
+#
+# Macros for samba domains.
+#
+
+#
+# Authors: Dan Walsh <dwalsh@redhat.com>
+#
+
+#
+# samba_domain(domain_prefix)
+#
+# Define a derived domain for the samba program when executed
+# by a user domain.
+#
+# The type declaration for the executable type for this program is
+# provided separately in domains/program/samba.te.
+#
+undefine(`samba_domain')
+ifdef(`samba.te', `
+define(`samba_domain',`
+if ( samba_enable_home_dirs ) {
+file_type_auto_trans(smbd_t, $1_home_dir_t, $1_home_t)
+}
+')
+', `
+define(`samba_domain',`')
+
+')dnl end if samba.te
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/screen_macros.te policy-1.21.1/macros/program/screen_macros.te
--- nsapolicy/macros/program/screen_macros.te 2005-01-05 14:37:27.000000000 -0500
+++ policy-1.21.1/macros/program/screen_macros.te 2005-01-12 09:18:27.214381636 -0500
@@ -43,6 +43,9 @@
if (use_nfs_home_dirs) {
domain_auto_trans($1_screen_t, nfs_t, $1_t)
}
+if (use_samba_home_dirs) {
+domain_auto_trans($1_screen_t, cifs_t, $1_t)
+}
# Inherit and use descriptors from gnome-pty-helper.
ifdef(`gnome-pty-helper.te', `allow $1_screen_t $1_gph_t:fd use;')
@@ -53,6 +56,9 @@
if (use_nfs_home_dirs) {
r_dir_file($1_screen_t, nfs_t)
}
+if (use_samba_home_dirs) {
+r_dir_file($1_screen_t, cifs_t)
+}
allow $1_screen_t privfd:fd use;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/ssh_agent_macros.te policy-1.21.1/macros/program/ssh_agent_macros.te
--- nsapolicy/macros/program/ssh_agent_macros.te 2004-11-09 13:35:13.000000000 -0500
+++ policy-1.21.1/macros/program/ssh_agent_macros.te 2005-01-12 09:18:27.215381523 -0500
@@ -43,6 +43,9 @@
')
rw_dir_create_file($1_ssh_agent_t, nfs_t)
}
+if (use_samba_home_dirs) {
+rw_dir_create_file($1_ssh_agent_t, cifs_t)
+}
uses_shlib($1_ssh_agent_t)
read_locale($1_ssh_agent_t)
@@ -73,6 +76,9 @@
if (use_nfs_home_dirs) {
domain_auto_trans($1_ssh_agent_t, nfs_t, $1_t)
}
+if (use_samba_home_dirs) {
+domain_auto_trans($1_ssh_agent_t, cifs_t, $1_t)
+}
allow $1_ssh_agent_t bin_t:dir search;
# allow reading of /usr/bin/X11 (is a symlink)
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/ssh_macros.te policy-1.21.1/macros/program/ssh_macros.te
--- nsapolicy/macros/program/ssh_macros.te 2004-12-11 06:31:21.000000000 -0500
+++ policy-1.21.1/macros/program/ssh_macros.te 2005-01-12 09:18:27.216381411 -0500
@@ -30,6 +30,9 @@
if (use_nfs_home_dirs) {
create_dir_file($1_ssh_t, nfs_t)
}
+if (use_samba_home_dirs) {
+create_dir_file($1_ssh_t, cifs_t)
+}
# Transition from the user domain to the derived domain.
domain_auto_trans($1_t, ssh_exec_t, $1_ssh_t)
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/su_macros.te policy-1.21.1/macros/program/su_macros.te
--- nsapolicy/macros/program/su_macros.te 2004-11-18 08:13:59.000000000 -0500
+++ policy-1.21.1/macros/program/su_macros.te 2005-01-12 09:18:27.216381411 -0500
@@ -139,6 +139,9 @@
if (use_nfs_home_dirs) {
allow $1_su_t nfs_t:dir search;
}
+if (use_samba_home_dirs) {
+allow $1_su_t cifs_t:dir search;
+}
# Modify .Xauthority file (via xauth program).
ifdef(`xauth.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/xauth_macros.te policy-1.21.1/macros/program/xauth_macros.te
--- nsapolicy/macros/program/xauth_macros.te 2004-12-02 14:11:43.000000000 -0500
+++ policy-1.21.1/macros/program/xauth_macros.te 2005-01-12 09:18:27.217381299 -0500
@@ -86,6 +86,12 @@
')
rw_dir_create_file($1_xauth_t, nfs_t)
}
+if (use_samba_home_dirs) {
+rw_dir_create_file($1_xauth_t, cifs_t)
+}
+if (use_samba_home_dirs) {
+rw_dir_create_file($1_xauth_t, cifs_t)
+}
')dnl end xauth_domain macro
', `
diff --exclude-from=exclude -N -u -r nsapolicy/Makefile policy-1.21.1/Makefile
--- nsapolicy/Makefile 2005-01-12 08:14:46.613742034 -0500
+++ policy-1.21.1/Makefile 2005-01-12 09:18:27.218381186 -0500
@@ -53,7 +53,7 @@
FCFILES=tmp/program_used_flags.te file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) file_contexts/distros.fc $(wildcard file_contexts/misc/*.fc)
APPDIR=$(CONTEXTPATH)
-APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts) $(CONTEXTPATH)/files/media
+APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts customizable_types) $(CONTEXTPATH)/files/media
$(USERPATH)/system.users: $(ALL_TUNABLES) $(USER_FILES) policy.conf
@mkdir -p $(USERPATH)
@@ -75,6 +75,7 @@
tmp/valid_fc: $(APPFILES) $(ROOTFILES) $(LOADPATH) $(FCPATH) $(USERPATH)/system.users $(USERPATH)/local.users
@echo "Validating file_contexts ..."
$(SETFILES) -q -c $(LOADPATH) $(FCPATH)
+ @touch tmp/valid_fc
install: tmp/valid_fc
@@ -90,6 +91,11 @@
mkdir -p $(APPDIR)
install -m 644 $< $@
+$(APPDIR)/customizable_types: policy.conf
+ mkdir -p $(APPDIR)
+ @grep "^type .*customizable" $< | cut -d',' -f1 | cut -d' ' -f2 > tmp/customizable_types
+ install -m 644 tmp/customizable_types $@
+
$(APPDIR)/default_type: appconfig/default_type
mkdir -p $(APPDIR)
install -m 644 $< $@
diff --exclude-from=exclude -N -u -r nsapolicy/targeted/domains/unconfined.te policy-1.21.1/targeted/domains/unconfined.te
--- nsapolicy/targeted/domains/unconfined.te 2005-01-12 08:14:49.606402372 -0500
+++ policy-1.21.1/targeted/domains/unconfined.te 2005-01-12 09:18:27.219381074 -0500
@@ -4,7 +4,7 @@
# is not explicitly confined. It has no restrictions.
# It needs to be carefully protected from the confined domains.
-type unconfined_t, domain, privuser, privrole, privowner, admin, auth_write, fs_domain, privmem, unrestricted;
+type unconfined_t, domain, privuser, privrole, privowner, admin, auth_write, fs_domain, privmem;
role system_r types unconfined_t;
role user_r types unconfined_t;
role sysadm_r types unconfined_t;
@@ -20,8 +20,8 @@
type system_dbusd_var_run_t, file_type, sysadmfile;
# User home directory type.
-type user_home_t, file_type, sysadmfile;
-type user_home_dir_t, file_type, sysadmfile;
+type user_home_t, file_type, sysadmfile, home_type;
+type user_home_dir_t, file_type, sysadmfile, home_dir_type;
file_type_auto_trans(unconfined_t, home_root_t, user_home_dir_t, dir)
file_type_auto_trans(unconfined_t, user_home_dir_t, user_home_t)
@@ -43,6 +43,11 @@
# Support NFS home directories
bool use_nfs_home_dirs false;
+# Support SAMBA home directories
+bool use_samba_home_dirs false;
+
+ifdef(`samba.te', `samba_domain(user)')
+
# Allow system to run with NIS
bool allow_ypbind false;
diff --exclude-from=exclude -N -u -r nsapolicy/targeted/types/apache.te policy-1.21.1/targeted/types/apache.te
--- nsapolicy/targeted/types/apache.te 2004-05-27 14:52:37.000000000 -0400
+++ policy-1.21.1/targeted/types/apache.te 1969-12-31 19:00:00.000000000 -0500
@@ -1,5 +0,0 @@
-#
-# Rules required by apache for targeted policy
-#
-define(`admin_tty_type', `{ tty_device_t devpts_t }')
-
diff --exclude-from=exclude -N -u -r nsapolicy/tunables/distro.tun policy-1.21.1/tunables/distro.tun
--- nsapolicy/tunables/distro.tun 2004-08-20 13:57:29.000000000 -0400
+++ policy-1.21.1/tunables/distro.tun 2005-01-12 09:18:27.220380962 -0500
@@ -5,7 +5,7 @@
# appropriate ifdefs.
-dnl define(`distro_redhat')
+define(`distro_redhat')
dnl define(`distro_suse')
diff --exclude-from=exclude -N -u -r nsapolicy/tunables/tunable.tun policy-1.21.1/tunables/tunable.tun
--- nsapolicy/tunables/tunable.tun 2004-12-11 06:31:22.000000000 -0500
+++ policy-1.21.1/tunables/tunable.tun 2005-01-12 09:18:27.221380850 -0500
@@ -1,27 +1,24 @@
-# Allow users to execute the mount command
-dnl define(`user_can_mount')
-
# Allow rpm to run unconfined.
-dnl define(`unlimitedRPM')
+define(`unlimitedRPM')
# Allow privileged utilities like hotplug and insmod to run unconfined.
-dnl define(`unlimitedUtils')
+define(`unlimitedUtils')
# Allow rc scripts to run unconfined, including any daemon
# started by an rc script that does not have a domain transition
# explicitly defined.
-dnl define(`unlimitedRC')
+define(`unlimitedRC')
# Allow sysadm_t to directly start daemons
define(`direct_sysadm_daemon')
# Do not audit things that we know to be broken but which
# are not security risks
-dnl define(`hide_broken_symptoms')
+define(`hide_broken_symptoms')
# Allow user_r to reach sysadm_r via su, sudo, or userhelper.
# Otherwise, only staff_r can do so.
-dnl define(`user_canbe_sysadm')
+define(`user_canbe_sysadm')
# Allow xinetd to run unconfined, including any services it starts
# that do not have a domain transition explicitly defined.
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [Fwd: New policy patch]
2005-01-12 18:46 [Fwd: New policy patch] Daniel J Walsh
@ 2005-01-21 20:36 ` James Carter
2005-03-29 16:47 ` Policy Patch Daniel J Walsh
0 siblings, 1 reply; 27+ messages in thread
From: James Carter @ 2005-01-21 20:36 UTC (permalink / raw)
To: Daniel J Walsh; +Cc: SE Linux
Finally merged. Some comments below.
On Wed, 2005-01-12 at 10:44, Daniel J Walsh wrote:
>
> ______________________________________________________________________
> diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/udev.fc policy-1.21.1/file_contexts/program/udev.fc
> --- nsapolicy/file_contexts/program/udev.fc 2005-01-12 08:14:48.813492366 -0500
> +++ policy-1.21.1/file_contexts/program/udev.fc 2005-01-12 09:18:27.204382758 -0500
> @@ -8,5 +8,5 @@
> /etc/udev/scripts/.+ -- system_u:object_r:udev_helper_exec_t
> /etc/hotplug\.d/default/udev.* -- system_u:object_r:udev_helper_exec_t
> /dev/udev\.tbl -- system_u:object_r:udev_tbl_t
> -/dev/\.udev\.tdb -- system_u:object_r:udev_tdb_t
> +/dev/\.udev\.tdb/.* -- system_u:object_r:udev_tdb_t
> /sbin/wait_for_sysfs -- system_u:object_r:udev_exec_t
This is a directory on Rawhide but a file on FC3, so I would prefer to
keep it more general for now.
> diff --exclude-from=exclude -N -u -r nsapolicy/macros/base_user_macros.te policy-1.21.1/macros/base_user_macros.te
> --- nsapolicy/macros/base_user_macros.te 2004-12-09 10:26:10.000000000 -0500
> +++ policy-1.21.1/macros/base_user_macros.te 2005-01-12 09:18:27.205382646 -0500
> @@ -38,6 +44,7 @@
>
> # Allow text relocations on system shared libraries, e.g. libGL.
> allow $1_t shlib_t:file execmod;
> +allow $1_t ld_so_t:file execmod;
>
> #
> # kdeinit wants this access
We don't want to do this
> diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/mozilla_macros.te policy-1.21.1/macros/program/mozilla_macros.te
> --- nsapolicy/macros/program/mozilla_macros.te 2004-12-21 10:59:59.000000000 -0500
> +++ policy-1.21.1/macros/program/mozilla_macros.te 2005-01-12 09:18:27.211381972 -0500
> @@ -25,7 +25,7 @@
> allow $1_mozilla_t $1_t:process signull;
>
> # Set resource limits and scheduling info.
> -allow $1_mozilla_t self:process { setrlimit setsched };
> +allow $1_mozilla_t self:process { execmem setrlimit setsched };
>
> allow $1_mozilla_t usr_t:{ lnk_file file } { getattr read };
> allow $1_mozilla_t var_lib_t:file { getattr read };
We don't want to do this either.
> diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/samba_macros.te policy-1.21.1/macros/program/samba_macros.te
> --- nsapolicy/macros/program/samba_macros.te 1969-12-31 19:00:00.000000000 -0500
> +++ policy-1.21.1/macros/program/samba_macros.te 2005-01-12 09:18:27.213381748 -0500
> @@ -0,0 +1,28 @@
> +#
> +# Macros for samba domains.
> +#
> +
> +#
> +# Authors: Dan Walsh <dwalsh@redhat.com>
> +#
> +
> +#
> +# samba_domain(domain_prefix)
> +#
> +# Define a derived domain for the samba program when executed
> +# by a user domain.
> +#
> +# The type declaration for the executable type for this program is
> +# provided separately in domains/program/samba.te.
> +#
> +undefine(`samba_domain')
> +ifdef(`samba.te', `
> +define(`samba_domain',`
> +if ( samba_enable_home_dirs ) {
> +file_type_auto_trans(smbd_t, $1_home_dir_t, $1_home_t)
> +}
> +')
> +', `
> +define(`samba_domain',`')
> +
> +')dnl end if samba.te
The file_type_auto_trans rule conflicts with the following rule in the
user_domain macro in user_macros.te:
file_type_auto_trans(privhome, $1_home_dir_t, $1_home_t)
There is a conflict because smbd_t has the privhome attribute.
For now I removed the privhome attribute from smbd_t. Does it really
need it? NFS doesn't have that attribute.
--
James Carter <jwcart2@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread* Policy Patch
2005-01-21 20:36 ` James Carter
@ 2005-03-29 16:47 ` Daniel J Walsh
2005-04-01 20:28 ` James Carter
0 siblings, 1 reply; 27+ messages in thread
From: Daniel J Walsh @ 2005-03-29 16:47 UTC (permalink / raw)
To: jwcart2; +Cc: SE Linux
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
Major cleanup of Makefile. Probably still needs some sanity checks to
it. Added better echo messages, made sure
customizable file gets replaced on make load.
Added policy ssh_keysign_exec_t for /usr/libexec/openssh/ssh-keysign
Better handling of syslog-ng
Whole bunch of changes from Ivan, for desktop apps.
Allow named and nscd to write logs to /var/log
Lots of name_connect fixes.
New bool for squid to connect to any port or just http ports.
--
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 39570 bytes --]
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/ssh.te policy-1.23.5/domains/program/ssh.te
--- nsapolicy/domains/program/ssh.te 2005-03-24 08:58:25.000000000 -0500
+++ policy-1.23.5/domains/program/ssh.te 2005-03-28 10:21:45.000000000 -0500
@@ -220,6 +220,7 @@
# Type for the ssh executable.
type ssh_exec_t, file_type, exec_type, sysadmfile;
+type ssh_keysign_exec_t, file_type, exec_type, sysadmfile;
# Everything else is in the ssh_domain macro in
# macros/program/ssh_macros.te.
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/syslogd.te policy-1.23.5/domains/program/syslogd.te
--- nsapolicy/domains/program/syslogd.te 2005-03-21 22:32:18.000000000 -0500
+++ policy-1.23.5/domains/program/syslogd.te 2005-03-28 10:21:45.000000000 -0500
@@ -79,16 +79,10 @@
dontaudit syslogd_t initrc_var_run_t:file write;
allow syslogd_t ttyfile:chr_file { getattr write };
-ifdef(`klogd.te', `', `
-# Allow access to /proc/kmsg for syslog-ng
-allow syslogd_t proc_t:dir search;
-allow syslogd_t proc_kmsg_t:file { getattr read };
-allow syslogd_t kernel_t:system { syslog_mod syslog_console };
-')
#
# Special case to handle crashes
#
-allow syslogd_t { device_t file_t }:sock_file unlink;
+allow syslogd_t { device_t file_t }:sock_file { getattr unlink };
# Allow syslog to a terminal
allow syslogd_t tty_device_t:chr_file { getattr write ioctl append };
@@ -111,6 +105,10 @@
bool use_syslogng false;
if (use_syslogng) {
-allow syslogd_t proc_kmsg_t:file write;
-allow syslogd_t self:capability { sys_admin chown };
+# Allow access to /proc/kmsg for syslog-ng
+allow syslogd_t proc_t:dir search;
+allow syslogd_t proc_kmsg_t:file { getattr read };
+allow syslogd_t kernel_t:system { syslog_mod syslog_console };
+allow syslogd_t self:capability { sys_admin chown fsetid };
+allow syslogd_t var_log_t:dir { create setattr };
}
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/apache.te policy-1.23.5/domains/program/unused/apache.te
--- nsapolicy/domains/program/unused/apache.te 2005-03-24 08:58:25.000000000 -0500
+++ policy-1.23.5/domains/program/unused/apache.te 2005-03-28 10:21:45.000000000 -0500
@@ -152,7 +152,9 @@
allow httpd_t bin_t:lnk_file read;
can_network(httpd_t)
+if (httpd_can_network_connect) {
allow httpd_t port_type:tcp_socket name_connect;
+}
can_ypbind(httpd_t)
###################
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/canna.te policy-1.23.5/domains/program/unused/canna.te
--- nsapolicy/domains/program/unused/canna.te 2005-03-24 08:58:25.000000000 -0500
+++ policy-1.23.5/domains/program/unused/canna.te 2005-03-28 10:21:45.000000000 -0500
@@ -42,3 +42,5 @@
can_unix_connect(i18n_input_t, canna_t)
')
+dontaudit canna_t kernel_t:fd use;
+dontaudit canna_t root_t:file read;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/cups.te policy-1.23.5/domains/program/unused/cups.te
--- nsapolicy/domains/program/unused/cups.te 2005-03-24 08:58:26.000000000 -0500
+++ policy-1.23.5/domains/program/unused/cups.te 2005-03-28 10:21:45.000000000 -0500
@@ -143,8 +143,8 @@
# PTAL
daemon_domain(ptal)
etcdir_domain(ptal)
-allow ptal_t ptal_var_run_t:fifo_file create_file_perms;
-allow ptal_t ptal_var_run_t:sock_file create_file_perms;
+
+file_type_auto_trans(ptal_t, var_run_t, ptal_var_run_t)
allow ptal_t self:capability chown;
allow ptal_t self:{ unix_dgram_socket unix_stream_socket } create_socket_perms;
allow ptal_t self:unix_stream_socket { listen accept };
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/hald.te policy-1.23.5/domains/program/unused/hald.te
--- nsapolicy/domains/program/unused/hald.te 2005-02-24 14:51:07.000000000 -0500
+++ policy-1.23.5/domains/program/unused/hald.te 2005-03-29 10:44:55.000000000 -0500
@@ -31,6 +31,7 @@
allow hald_t usr_t:file { getattr read };
allow hald_t bin_t:file getattr;
+allow hald_t self:netlink_socket create_socket_perms;
allow hald_t self:netlink_route_socket r_netlink_socket_perms;
allow hald_t self:capability { net_admin sys_admin dac_override dac_read_search mknod };
can_network_server(hald_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/mailman.te policy-1.23.5/domains/program/unused/mailman.te
--- nsapolicy/domains/program/unused/mailman.te 2005-03-24 08:58:26.000000000 -0500
+++ policy-1.23.5/domains/program/unused/mailman.te 2005-03-28 10:21:45.000000000 -0500
@@ -30,7 +30,7 @@
allow mailman_$1_t mailman_lock_t:dir rw_dir_perms;
allow mailman_$1_t fs_t:filesystem getattr;
can_network(mailman_$1_t)
-allow mailman_$1_t port_type:tcp_socket name_connect;
+allow mailman_$1_t smtp_port_t:tcp_socket name_connect;
can_ypbind(mailman_$1_t)
allow mailman_$1_t self:{ unix_stream_socket unix_dgram_socket } create_socket_perms;
allow mailman_$1_t var_t:dir r_dir_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/mta.te policy-1.23.5/domains/program/unused/mta.te
--- nsapolicy/domains/program/unused/mta.te 2005-03-21 22:32:19.000000000 -0500
+++ policy-1.23.5/domains/program/unused/mta.te 2005-03-28 10:21:45.000000000 -0500
@@ -13,8 +13,6 @@
ifdef(`sendmail.te', `', `
type sendmail_exec_t, file_type, exec_type, sysadmfile;
')
-type smtp_port_t, port_type, reserved_port_type;
-
# create a system_mail_t domain for daemons, init scripts, etc when they run
# "mail user@domain"
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/named.te policy-1.23.5/domains/program/unused/named.te
--- nsapolicy/domains/program/unused/named.te 2005-03-24 08:58:26.000000000 -0500
+++ policy-1.23.5/domains/program/unused/named.te 2005-03-28 10:21:45.000000000 -0500
@@ -60,6 +60,7 @@
can_udp_send(domain, named_t)
can_udp_send(named_t, domain)
can_tcp_connect(domain, named_t)
+log_domain(named)
# Bind to the named port.
allow named_t dns_port_t:udp_socket name_bind;
@@ -104,7 +105,7 @@
domain_auto_trans({ sysadm_t initrc_t }, ndc_exec_t, ndc_t)
uses_shlib(ndc_t)
can_network_client_tcp(ndc_t)
-allow ndc_t port_type:tcp_socket name_connect;
+allow ndc_t rndc_port_t:tcp_socket name_connect;
can_ypbind(ndc_t)
can_resolve(ndc_t)
read_locale(ndc_t)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/nscd.te policy-1.23.5/domains/program/unused/nscd.te
--- nsapolicy/domains/program/unused/nscd.te 2005-03-24 08:58:27.000000000 -0500
+++ policy-1.23.5/domains/program/unused/nscd.te 2005-03-28 10:21:45.000000000 -0500
@@ -73,3 +73,4 @@
allow nscd_t tmp_t:dir { search getattr };
allow nscd_t tmp_t:lnk_file read;
allow nscd_t { urandom_device_t random_device_t }:chr_file { getattr read };
+log_domain(nscd)
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/pamconsole.te policy-1.23.5/domains/program/unused/pamconsole.te
--- nsapolicy/domains/program/unused/pamconsole.te 2005-02-24 14:51:07.000000000 -0500
+++ policy-1.23.5/domains/program/unused/pamconsole.te 2005-03-28 10:21:45.000000000 -0500
@@ -10,6 +10,12 @@
allow pam_console_t etc_t:file { getattr read ioctl };
allow pam_console_t self:unix_stream_socket create_stream_socket_perms;
+# Read /etc/mtab
+allow pam_console_t etc_runtime_t:file { read getattr };
+
+# Read /proc/meminfo
+allow pam_console_t proc_t:file { read getattr };
+
allow pam_console_t self:capability { chown fowner fsetid };
# Allow access to /dev/console through the fd:
@@ -24,7 +30,7 @@
allow pam_console_t device_t:dir { getattr read };
allow pam_console_t device_t:lnk_file { getattr read };
# mouse_device_t is for joy sticks
-allow pam_console_t { framebuf_device_t v4l_device_t apm_bios_t sound_device_t misc_device_t tty_device_t scanner_device_t mouse_device_t power_device_t removable_device_t scsi_generic_device_t }:chr_file { getattr setattr };
+allow pam_console_t { xserver_misc_device_t framebuf_device_t v4l_device_t apm_bios_t sound_device_t misc_device_t tty_device_t scanner_device_t mouse_device_t power_device_t removable_device_t scsi_generic_device_t }:chr_file { getattr setattr };
allow pam_console_t { removable_device_t fixed_disk_device_t }:blk_file { getattr setattr };
allow pam_console_t mnt_t:dir r_dir_perms;
@@ -36,7 +42,6 @@
dontaudit pam_console_t hotplug_etc_t:dir search;
allow pam_console_t hotplug_t:fd use;
')
-allow pam_console_t proc_t:file read;
ifdef(`xdm.te', `
allow pam_console_t xdm_var_run_t:file { getattr read };
')
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/samba.te policy-1.23.5/domains/program/unused/samba.te
--- nsapolicy/domains/program/unused/samba.te 2005-03-24 08:58:27.000000000 -0500
+++ policy-1.23.5/domains/program/unused/samba.te 2005-03-28 10:21:45.000000000 -0500
@@ -41,7 +41,6 @@
general_domain_access(smbd_t)
general_proc_read_access(smbd_t)
-type smbd_port_t, port_type, reserved_port_type;
allow smbd_t smbd_port_t:tcp_socket name_bind;
# Use capabilities.
@@ -88,7 +87,6 @@
general_domain_access(nmbd_t)
general_proc_read_access(nmbd_t)
-type nmbd_port_t, port_type, reserved_port_type;
allow nmbd_t nmbd_port_t:udp_socket name_bind;
# Use capabilities.
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/squid.te policy-1.23.5/domains/program/unused/squid.te
--- nsapolicy/domains/program/unused/squid.te 2005-03-24 08:58:27.000000000 -0500
+++ policy-1.23.5/domains/program/unused/squid.te 2005-03-28 10:21:45.000000000 -0500
@@ -12,7 +12,7 @@
ifdef(`apache.te',`
can_tcp_connect(squid_t, httpd_t)
')
-
+bool squid_connect_any false;
daemon_domain(squid, `, web_client_domain, nscd_client_domain')
type squid_conf_t, file_type, sysadmfile;
general_domain_access(squid_t)
@@ -53,13 +53,16 @@
# Use the network
can_network(squid_t)
+if (squid_connect_any) {
allow squid_t port_type:tcp_socket name_connect;
+} else {
+allow squid_t { http_port_t http_cache_port_t }:tcp_socket name_connect;
+}
can_ypbind(squid_t)
can_tcp_connect(web_client_domain, squid_t)
# tcp port 8080 and udp port 3130 is http_cache_port_t (see net_contexts)
-allow squid_t http_cache_port_t:tcp_socket name_bind;
-allow squid_t http_cache_port_t:udp_socket name_bind;
+allow squid_t http_cache_port_t:{ tcp_socket udp_socket } name_bind;
# to allow running programs from /usr/lib/squid (IE unlinkd)
# also allow exec()ing itself
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/udev.te policy-1.23.5/domains/program/unused/udev.te
--- nsapolicy/domains/program/unused/udev.te 2005-02-24 14:51:08.000000000 -0500
+++ policy-1.23.5/domains/program/unused/udev.te 2005-03-28 10:21:45.000000000 -0500
@@ -29,7 +29,7 @@
type udev_tdb_t, file_type, sysadmfile, dev_fs;
typealias udev_tdb_t alias udev_tbl_t;
file_type_auto_trans(udev_t, device_t, udev_tdb_t, file)
-allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod net_raw net_admin };
+allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin sys_nice mknod net_raw net_admin };
allow udev_t self:file { getattr read };
allow udev_t self:unix_stream_socket {connectto create_stream_socket_perms};
allow udev_t self:unix_dgram_socket create_socket_perms;
@@ -71,6 +71,7 @@
allow udev_t kernel_t:fd use;
allow udev_t kernel_t:unix_dgram_socket { sendto ioctl read write };
+allow udev_t kernel_t:process signal;
allow udev_t initrc_var_run_t:file r_file_perms;
dontaudit udev_t initrc_var_run_t:file write;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/winbind.te policy-1.23.5/domains/program/unused/winbind.te
--- nsapolicy/domains/program/unused/winbind.te 2005-03-24 08:58:27.000000000 -0500
+++ policy-1.23.5/domains/program/unused/winbind.te 2005-03-28 10:21:45.000000000 -0500
@@ -13,7 +13,9 @@
allow winbind_t etc_t:file r_file_perms;
allow winbind_t etc_t:lnk_file read;
can_network(winbind_t)
-allow winbind_t port_type:tcp_socket name_connect;
+allow winbind_t smbd_port_t:tcp_socket name_connect;
+can_resolve(winbind_t)
+
ifdef(`samba.te', `', `
type samba_etc_t, file_type, sysadmfile, usercanread;
type samba_log_t, file_type, sysadmfile, logfile;
@@ -28,7 +30,6 @@
allow winbind_t urandom_device_t:chr_file { getattr read };
allow winbind_t self:fifo_file { read write };
rw_dir_create_file(winbind_t, samba_var_t)
-allow winbind_t krb5_conf_t:file { getattr read };
-dontaudit winbind_t krb5_conf_t:file { write };
+can_kerberos(winbind_t)
allow winbind_t self:netlink_route_socket r_netlink_socket_perms;
allow winbind_t winbind_var_run_t:sock_file create_file_perms;
diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/xdm.te policy-1.23.5/domains/program/unused/xdm.te
--- nsapolicy/domains/program/unused/xdm.te 2005-03-24 08:58:27.000000000 -0500
+++ policy-1.23.5/domains/program/unused/xdm.te 2005-03-28 10:21:45.000000000 -0500
@@ -311,6 +311,7 @@
allow xdm_t pam_var_run_t:dir create_dir_perms;
allow xdm_t pam_var_run_t:file create_file_perms;
allow pam_t xdm_t:fifo_file { getattr ioctl write };
+can_exec(xdm_t, pam_console_exec_t)
can_exec(xdm_t, pam_exec_t)
# For pam_console
rw_dir_create_file(xdm_t, pam_var_console_t)
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/distros.fc policy-1.23.5/file_contexts/distros.fc
--- nsapolicy/file_contexts/distros.fc 2005-02-24 14:51:09.000000000 -0500
+++ policy-1.23.5/file_contexts/distros.fc 2005-03-28 10:21:45.000000000 -0500
@@ -98,10 +98,10 @@
/usr/lib/valgrind/vgskin_massif\.so -- system_u:object_r:texrel_shlib_t
/usr/lib/valgrind/vgskin_memcheck\.so -- system_u:object_r:texrel_shlib_t
/usr/lib/valgrind/vgskin_none\.so -- system_u:object_r:texrel_shlib_t
-/usr/lib/ooo-.*/program/libicudata\.so.* -- system_u:object_r:texrel_shlib_t
-/usr/lib/ooo-.*/program/libsts645li\.so -- system_u:object_r:texrel_shlib_t
-/usr/lib/ooo-.*/program/libvclplug_gen645li\.so -- system_u:object_r:texrel_shlib_t
-/usr/lib/ooo-.*/program/libwrp645li\.so -- system_u:object_r:texrel_shlib_t
+/usr/lib/.*/program/libicudata\.so.* -- system_u:object_r:texrel_shlib_t
+/usr/lib/.*/program/libsts645li\.so -- system_u:object_r:texrel_shlib_t
+/usr/lib/.*/program/libvclplug_gen645li\.so -- system_u:object_r:texrel_shlib_t
+/usr/lib/.*/program/libwrp645li\.so -- system_u:object_r:texrel_shlib_t
# Fedora Extras packages: ladspa, imlib2, ocaml
/usr/lib/ladspa/analogue_osc_1416\.so -- system_u:object_r:texrel_shlib_t
/usr/lib/ladspa/bandpass_a_iir_1893\.so -- system_u:object_r:texrel_shlib_t
@@ -140,6 +140,11 @@
# Jai, Sun Microsystems (Jpackage SPRM)
/usr/lib/libmlib_jai\.so -- system_u:object_r:texrel_shlib_t
+/usr/lib/libdivxdecore.so.0 -- system_u:object_r:texrel_shlib_t
+
+/usr(/.*)?/Acrobat5/Reader/intellinux/plug_ins/.*\.api -- system_u:object_r:shlib_t
+/usr(/.*)?/Acrobat5/Reader/intellinux/plug_ins/AcroForm\.api -- system_u:object_r:texrel_shlib_t
+/usr(/.*)?/Acrobat5/Reader/intellinux/plug_ins/EScript\.api -- system_u:object_r:texrel_shlib_t
')
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/apache.fc policy-1.23.5/file_contexts/program/apache.fc
--- nsapolicy/file_contexts/program/apache.fc 2005-02-24 14:51:09.000000000 -0500
+++ policy-1.23.5/file_contexts/program/apache.fc 2005-03-29 09:07:33.000000000 -0500
@@ -44,3 +44,4 @@
/usr/share/htdig(/.*)? system_u:object_r:httpd_sys_content_t
/var/lib/htdig(/.*)? system_u:object_r:httpd_sys_content_t
/etc/htdig(/.*)? system_u:object_r:httpd_sys_content_t
+/var/spool/gosa(/.*)? system_u:object_r:httpd_sys_script_rw_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/named.fc policy-1.23.5/file_contexts/program/named.fc
--- nsapolicy/file_contexts/program/named.fc 2005-02-24 14:51:08.000000000 -0500
+++ policy-1.23.5/file_contexts/program/named.fc 2005-03-28 10:21:45.000000000 -0500
@@ -21,6 +21,8 @@
/var/run/bind(/.*)? system_u:object_r:named_var_run_t
/var/run/named(/.*)? system_u:object_r:named_var_run_t
/usr/sbin/lwresd -- system_u:object_r:named_exec_t
+/var/log/named.* -- system_u:object_r:named_log_t
+
ifdef(`distro_redhat', `
/var/named/named\.ca -- system_u:object_r:named_conf_t
/var/named/chroot(/.*)? system_u:object_r:named_conf_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/nscd.fc policy-1.23.5/file_contexts/program/nscd.fc
--- nsapolicy/file_contexts/program/nscd.fc 2005-02-24 14:51:08.000000000 -0500
+++ policy-1.23.5/file_contexts/program/nscd.fc 2005-03-28 10:21:45.000000000 -0500
@@ -4,3 +4,4 @@
/var/run/nscd\.pid -- system_u:object_r:nscd_var_run_t
/var/db/nscd(/.*)? system_u:object_r:nscd_var_run_t
/var/run/nscd(/.*)? system_u:object_r:nscd_var_run_t
+/var/log/nscd\.log.* -- system_u:object_r:nscd_log_t
diff --exclude-from=exclude -N -u -r nsapolicy/file_contexts/program/ssh.fc policy-1.23.5/file_contexts/program/ssh.fc
--- nsapolicy/file_contexts/program/ssh.fc 2005-02-24 14:51:08.000000000 -0500
+++ policy-1.23.5/file_contexts/program/ssh.fc 2005-03-28 10:21:45.000000000 -0500
@@ -1,5 +1,6 @@
# ssh
/usr/bin/ssh -- system_u:object_r:ssh_exec_t
+/usr/libexec/openssh/ssh-keysign -- system_u:object_r:ssh_keysign_exec_t
/usr/bin/ssh-keygen -- system_u:object_r:ssh_keygen_exec_t
# sshd
/etc/ssh/primes -- system_u:object_r:sshd_key_t
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/apache_macros.te policy-1.23.5/macros/program/apache_macros.te
--- nsapolicy/macros/program/apache_macros.te 2005-03-24 08:58:29.000000000 -0500
+++ policy-1.23.5/macros/program/apache_macros.te 2005-03-28 10:21:45.000000000 -0500
@@ -3,10 +3,11 @@
#This type is for webpages
#
-type httpd_$1_content_t, file_type, ifelse($1, sys, `', `$1_file_type, ') httpdcontent, sysadmfile, customizable;
+type httpd_$1_content_t, file_type, httpdcontent, sysadmfile, customizable;
ifelse($1, sys, `
typealias httpd_sys_content_t alias httpd_sysadm_content_t;
')
+ifelse($1, sys, `',`typeattribute httpd_$1_content_t $1_file_type;')
# This type is used for .htaccess files
#
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/games_domain.te policy-1.23.5/macros/program/games_domain.te
--- nsapolicy/macros/program/games_domain.te 2005-03-21 22:32:19.000000000 -0500
+++ policy-1.23.5/macros/program/games_domain.te 2005-03-28 10:21:45.000000000 -0500
@@ -19,10 +19,18 @@
}
role $1_r types $1_games_t;
-# X access, Private tmp
+# X access, /tmp files
x_client_domain($1, games)
tmp_domain($1_games)
+uses_shlib($1_games_t)
+read_locale($1_games_t)
+read_sysctl($1_games_t)
+access_terminal($1_games_t, $1)
+
+# Fork
+allow $1_games_t self:process { fork signal_perms getsched };
+
# Games seem to need this
if (allow_execmem) {
allow $1_games_t self:process execmem;
@@ -37,7 +45,7 @@
# Access /home/user/.gnome2
create_dir_file($1_games_t, $1_home_t)
-allow $1_games_t $1_home_dir_t:dir search;
+allow $1_games_t $1_home_dir_t:dir { read getattr search };
allow $1_games_t $1_home_t:dir { read getattr };
create_dir_file($1_games_t, $1_tmp_t)
@@ -57,6 +65,7 @@
allow $1_games_t var_lib_t:dir search;
r_dir_file($1_games_t, man_t)
+allow $1_games_t proc_t:dir search;
allow $1_games_t proc_t:file { read getattr };
ifdef(`mozilla.te', `
dontaudit $1_games_t $1_mozilla_t:unix_stream_socket connectto;
@@ -64,10 +73,17 @@
allow $1_games_t event_device_t:chr_file getattr;
allow $1_games_t mouse_device_t:chr_file getattr;
allow $1_games_t self:file { getattr read };
+allow $1_games_t self:fifo_file rw_file_perms;
# kpat spews errors
dontaudit $1_games_t bin_t:dir getattr;
dontaudit $1_games_t var_run_t:dir search;
+# Allow games to read /etc/mtab and /etc/nsswitch.conf
+allow $1_games_t etc_t:file { getattr read };
+allow $1_games_t etc_runtime_t:file { getattr read };
+
+#
+
')dnl end macro definition
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/gift_macros.te policy-1.23.5/macros/program/gift_macros.te
--- nsapolicy/macros/program/gift_macros.te 2005-03-24 08:58:29.000000000 -0500
+++ policy-1.23.5/macros/program/gift_macros.te 2005-03-28 10:21:45.000000000 -0500
@@ -17,10 +17,15 @@
domain_auto_trans($1_t, gift_exec_t, $1_gift_t)
role $1_r types $1_gift_t;
-# X access, Home access
+# X access, Home files
x_client_domain($1, gift)
home_domain($1, gift)
+uses_shlib($1_gift_t)
+read_locale($1_gift_t)
+read_sysctl($1_gift_t)
+access_terminal($1_gift_t, $1)
+
# Self permissions
allow $1_gift_t self:process getsched;
@@ -29,7 +34,8 @@
r_dir_file($1_gift_t, fonts_t)
# Launch gift daemon
-allow $1_gift_t self:process fork;
+allow $1_gift_t bin_t:dir search;
+allow $1_gift_t self:process { fork signal_perms getsched };
domain_auto_trans($1_gift_t, giftd_exec_t, $1_giftd_t)
# Connect to gift daemon
@@ -40,6 +46,10 @@
allow $1_gift_t proc_t:dir search;
allow $1_gift_t proc_t:file { getattr read };
+# Read /etc/mtab, /etc/nsswitch.conf
+allow $1_gift_t etc_t:file { getattr read };
+allow $1_gift_t etc_runtime_t:file { getattr read };
+
# Tmp/ORBit
tmp_domain($1_gift)
file_type_auto_trans($1_gift_t, $1_tmp_t, $1_gift_tmp_t)
@@ -78,6 +88,7 @@
read_sysctl($1_giftd_t)
read_locale($1_giftd_t)
uses_shlib($1_giftd_t)
+access_terminal($1_giftd_t, $1)
# Access home domain
home_domain_access($1_giftd_t, $1, gift)
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/mozilla_macros.te policy-1.23.5/macros/program/mozilla_macros.te
--- nsapolicy/macros/program/mozilla_macros.te 2005-03-21 22:32:19.000000000 -0500
+++ policy-1.23.5/macros/program/mozilla_macros.te 2005-03-28 10:21:45.000000000 -0500
@@ -24,33 +24,52 @@
}
role $1_r types $1_mozilla_t;
+# X access, Home files
home_domain($1, mozilla)
x_client_domain($1, mozilla)
+
+# Browse files
file_browse_domain($1_mozilla_t)
+can_network($1_mozilla_t)
+uses_shlib($1_mozilla_t)
+read_locale($1_mozilla_t)
+read_sysctl($1_mozilla_t)
+access_terminal($1_mozilla_t, $1)
+
allow $1_mozilla_t sound_device_t:chr_file rw_file_perms;
# Unrestricted inheritance from the caller.
allow $1_t $1_mozilla_t:process { noatsecure siginh rlimitinh };
allow $1_mozilla_t $1_t:process signull;
-# Set resource limits and scheduling info.
-allow $1_mozilla_t self:process { setrlimit setsched };
+# Fork, set resource limits and scheduling info.
+allow $1_mozilla_t self:process { fork signal_perms setrlimit setsched getsched };
allow $1_mozilla_t usr_t:{ lnk_file file } { getattr read };
allow $1_mozilla_t var_lib_t:file { getattr read };
allow $1_mozilla_t { random_device_t urandom_device_t }:chr_file { getattr ioctl read };
allow $1_mozilla_t self:socket create_socket_perms;
allow $1_mozilla_t self:file { getattr read };
+allow $1_mozilla_t self:fifo_file rw_file_perms;
-# for bash
+# for bash - old mozilla binary
+can_exec($1_mozilla_t, mozilla_exec_t)
+can_exec($1_mozilla_t, bin_t)
+allow $1_mozilla_t bin_t:lnk_file read;
allow $1_mozilla_t device_t:dir r_dir_perms;
-allow $1_mozilla_t devpts_t:dir r_dir_perms;
allow $1_mozilla_t proc_t:file { getattr read };
+allow $1_mozilla_t proc_t:lnk_file read;
+allow $1_mozilla_t self:dir search;
+allow $1_mozilla_t self:lnk_file read;
r_dir_file($1_mozilla_t, proc_net_t)
allow $1_mozilla_t { var_t var_lib_t }:dir search;
+# Allow mozilla to read /etc/mtab, /etc/nsswitch.conf
+allow $1_mozilla_t etc_t:file { getattr read };
+allow $1_mozilla_t etc_runtime_t:file { getattr read };
+
# interacting with gstreamer
r_dir_file($1_mozilla_t, var_t)
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/ssh_macros.te policy-1.23.5/macros/program/ssh_macros.te
--- nsapolicy/macros/program/ssh_macros.te 2005-03-24 08:58:29.000000000 -0500
+++ policy-1.23.5/macros/program/ssh_macros.te 2005-03-28 10:21:45.000000000 -0500
@@ -80,7 +80,7 @@
# Grant permissions needed to create TCP and UDP sockets and
# to access the network.
can_network_client_tcp($1_ssh_t)
-allow $1_ssh_t port_type:tcp_socket name_connect;
+allow $1_ssh_t ssh_port_t:tcp_socket name_connect;
can_resolve($1_ssh_t)
can_ypbind($1_ssh_t)
can_kerberos($1_ssh_t)
@@ -153,6 +153,22 @@
allow $1_ssh_t mnt_t:dir search;
r_dir_file($1_ssh_t, removable_t)
+type $1_ssh_keysign_t, domain, nscd_client_domain;
+role $1_r types $1_ssh_keysign_t;
+domain_auto_trans($1_t, ssh_keysign_exec_t, $1_ssh_keysign_t)
+allow $1_ssh_keysign_t sshd_key_t:file { getattr read };
+allow $1_ssh_keysign_t self:capability { setgid setuid };
+allow $1_ssh_keysign_t urandom_device_t:chr_file r_file_perms;
+uses_shlib($1_ssh_keysign_t)
+dontaudit $1_ssh_keysign_t selinux_config_t:dir search;
+dontaudit $1_ssh_keysign_t proc_t:dir search;
+dontaudit $1_ssh_keysign_t proc_t:{ lnk_file file } { getattr read };
+allow $1_ssh_keysign_t usr_t:dir search;
+allow $1_ssh_keysign_t etc_t:file { getattr read };
+allow $1_ssh_keysign_t self:dir search;
+allow $1_ssh_keysign_t self:file { getattr read };
+allow $1_ssh_keysign_t self:unix_stream_socket create_socket_perms;
+
ifdef(`xdm.te', `
# should be able to remove these two later
allow $1_ssh_t xdm_xserver_tmp_t:sock_file { read write };
@@ -164,7 +180,6 @@
allow $1_ssh_t xdm_t:fd use;
')dnl end if xdm.te
')dnl end macro definition
-
', `
define(`ssh_domain',`')
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/tvtime_macros.te policy-1.23.5/macros/program/tvtime_macros.te
--- nsapolicy/macros/program/tvtime_macros.te 2005-03-21 22:32:20.000000000 -0500
+++ policy-1.23.5/macros/program/tvtime_macros.te 2005-03-28 10:21:45.000000000 -0500
@@ -24,11 +24,21 @@
domain_auto_trans($1_t, tvtime_exec_t, $1_tvtime_t)
role $1_r types $1_tvtime_t;
-# Home access, X access
+# X access, Home files
home_domain($1, tvtime)
-tmp_domain($1_tvtime, `', `{ file dir fifo_file }')
x_client_domain($1, tvtime)
+uses_shlib($1_tvtime_t)
+read_locale($1_tvtime_t)
+read_sysctl($1_tvtime_t)
+access_terminal($1_tvtime_t, $1)
+
+# Read /etc/tvtime
+allow $1_tvtime_t etc_t:file { getattr read };
+
+# Tmp files
+tmp_domain($1_tvtime, `', `{ file dir fifo_file }')
+
allow $1_tvtime_t urandom_device_t:chr_file read;
allow $1_tvtime_t clock_device_t:chr_file { ioctl read };
allow $1_tvtime_t kernel_t:system ipc_info;
diff --exclude-from=exclude -N -u -r nsapolicy/macros/program/x_client_macros.te policy-1.23.5/macros/program/x_client_macros.te
--- nsapolicy/macros/program/x_client_macros.te 2005-03-24 08:58:29.000000000 -0500
+++ policy-1.23.5/macros/program/x_client_macros.te 2005-03-28 10:21:45.000000000 -0500
@@ -43,54 +43,17 @@
#
define(`x_client_domain',`
-# This domain is granted permissions common to most domains (including can_net)
-can_network($1_$2_t)
-allow $1_$2_t port_type:tcp_socket name_connect;
-can_ypbind($1_$2_t)
-allow $1_$2_t self:process { fork signal_perms getsched };
allow $1_$2_t self:unix_dgram_socket create_socket_perms;
allow $1_$2_t self:unix_stream_socket { connectto create_stream_socket_perms };
-allow $1_$2_t self:fifo_file rw_file_perms;
-allow $1_$2_t etc_runtime_t:file { getattr read };
-allow $1_$2_t etc_t:lnk_file read;
-allow $1_$2_t fs_t:filesystem getattr;
-access_terminal($1_$2_t, $1)
-read_locale($1_$2_t)
-r_dir_file($1_$2_t, readable_t)
-allow $1_$2_t proc_t:dir search;
-allow $1_$2_t proc_t:lnk_file read;
-allow $1_$2_t self:dir search;
-allow $1_$2_t self:lnk_file read;
-read_sysctl($1_$2_t)
ifdef(`xauth.te',`
allow $1_$2_t $1_xauth_home_t:file { getattr read };
')
# Allow the user domain to send any signal to the $2 process.
+can_ps($1_t, $1_$2_t)
allow $1_t $1_$2_t:process signal_perms;
-# Allow the user domain to read the /proc/PID directory for
-# the $2 process.
-allow $1_t $1_$2_t:dir r_dir_perms;
-allow $1_t $1_$2_t:notdevfile_class_set r_file_perms;
-
-# Allow use of /dev/zero by ld.so.
-allow $1_$2_t device_t:dir search;
-allow $1_$2_t zero_device_t:chr_file rw_file_perms;
-allow $1_$2_t zero_device_t:chr_file x_file_perms;
-
-# allow using shared libraries and running programs
-uses_shlib($1_$2_t)
-allow $1_$2_t { bin_t sbin_t }:dir search;
-allow $1_$2_t bin_t:lnk_file read;
-can_exec($1_$2_t, { shell_exec_t bin_t })
-allow $1_$2_t etc_t:file { getattr read };
-
-# Inherit and use descriptors from gnome-pty-helper.
-ifdef(`gnome-pty-helper.te', `allow $1_$2_t $1_gph_t:fd use;')
-allow $1_$2_t privfd:fd use;
-
# for .xsession-errors
dontaudit $1_$2_t $1_home_t:file write;
diff --exclude-from=exclude -N -u -r nsapolicy/Makefile policy-1.23.5/Makefile
--- nsapolicy/Makefile 2005-03-15 08:02:23.000000000 -0500
+++ policy-1.23.5/Makefile 2005-03-29 11:37:15.000000000 -0500
@@ -77,12 +77,12 @@
all: policy
-tmp/valid_fc: $(APPFILES) $(ROOTFILES) $(LOADPATH) $(FCPATH)
- @echo "Validating file_contexts ..."
- $(SETFILES) -q -c $(LOADPATH) $(FCPATH)
+tmp/valid_fc: $(LOADPATH) $(FC)
+ @echo "Validating file contexts files ..."
+ $(SETFILES) -q -c $(LOADPATH) $(FC)
@touch tmp/valid_fc
-install: tmp/valid_fc $(USERPATH)/local.users
+install: $(FCPATH) $(APPFILES) $(ROOTFILES) $(USERPATH)/local.users
$(USERPATH)/system.users: $(ALL_TUNABLES) $(USER_FILES) policy.conf
@mkdir -p $(USERPATH)
@@ -91,56 +91,57 @@
@echo "# This file is replaced on reinstalls of this policy." >> tmp/system.users
@echo "# Please edit local.users to make local changes." >> tmp/system.users
@echo "#" >> tmp/system.users
- m4 $(ALL_TUNABLES) tmp/program_used_flags.te $(USER_FILES) | grep -v "^#" >> tmp/system.users
+ @m4 $(ALL_TUNABLES) tmp/program_used_flags.te $(USER_FILES) | grep -v "^#" >> tmp/system.users
install -m 644 tmp/system.users $@
$(USERPATH)/local.users: local.users
@mkdir -p $(USERPATH)
- install -C -b -m 644 $< $@
+ install -b -m 644 $< $@
$(CONTEXTPATH)/files/media: appconfig/media
- mkdir -p $(CONTEXTPATH)/files/
+ @mkdir -p $(CONTEXTPATH)/files/
install -m 644 $< $@
$(APPDIR)/default_contexts: appconfig/default_contexts
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/removable_context: appconfig/removable_context
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/customizable_types: policy.conf
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
@grep "^type .*customizable" $< | cut -d',' -f1 | cut -d' ' -f2 > tmp/customizable_types
install -m 644 tmp/customizable_types $@
$(APPDIR)/default_type: appconfig/default_type
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/userhelper_context: appconfig/userhelper_context
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/initrc_context: appconfig/initrc_context
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/failsafe_context: appconfig/failsafe_context
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/dbus_contexts: appconfig/dbus_contexts
- mkdir -p $(APPDIR)
+ @mkdir -p $(APPDIR)
install -m 644 $< $@
$(APPDIR)/users/root: appconfig/root_default_contexts
- mkdir -p $(APPDIR)/users
+ @mkdir -p $(APPDIR)/users
install -m 644 $< $@
-$(LOADPATH): policy.conf $(CHECKPOLICY)
- mkdir -p $(POLICYPATH)
+$(LOADPATH): policy.conf $(CHECKPOLICY)
+ @echo "Compiling policy ..."
+ @mkdir -p $(POLICYPATH)
$(CHECKPOLICY) $(CHECKPOLMLS) -o $@ policy.conf
ifneq ($(MLS),y)
ifneq ($(VERS),18)
@@ -159,10 +160,11 @@
$(CHECKPOLICY) -c 18 -o policy.18 policy.conf
endif
endif
- @echo "Validating file_contexts ..."
+ @echo "Validating file contexts files ..."
$(SETFILES) -q -c $(POLICYVER) $(FC)
reload tmp/load: $(FCPATH) $(LOADPATH)
+ @echo "Loading Policy ..."
ifeq ($(VERS), $(KERNVERS))
$(LOADPOLICY) $(LOADPATH)
else
@@ -177,18 +179,19 @@
mv policy.audit policy.conf
policy.conf: $(POLICYFILES) $(POLICY_DIRS)
- mkdir -p tmp
+ @echo "Building policy.conf ..."
+ @mkdir -p tmp
m4 $(M4PARAM) -Imacros -s $(POLICYFILES) > $@.tmp
- mv $@.tmp $@
+ @mv $@.tmp $@
install-src:
rm -rf $(SRCPATH)/policy.old
-mv $(SRCPATH)/policy $(SRCPATH)/policy.old
- mkdir -p $(SRCPATH)/policy
+ @mkdir -p $(SRCPATH)/policy
cp -R . $(SRCPATH)/policy
tmp/program_used_flags.te: $(wildcard domains/program/*.te) domains/program
- mkdir -p tmp
+ @mkdir -p tmp
( cd domains/program/ ; for n in *.te ; do echo "define(\`$$n')"; done ) > $@.tmp
( cd domains/misc/ ; for n in *.te ; do echo "define(\`$$n')"; done ) >> $@.tmp
mv $@.tmp $@
@@ -205,17 +208,17 @@
$(SETFILES) $(FC) $(FILESYSTEMS)
file_contexts/misc:
- mkdir -p file_contexts/misc
-
+ @mkdir -p file_contexts/misc
-$(FCPATH): $(FC) $(USERPATH)/system.users
+$(FCPATH): tmp/valid_fc $(USERPATH)/system.users $(APPDIR)/customizable_types
+ @echo "Installing file contexts files..."
@mkdir -p $(CONTEXTPATH)/files
install -m 644 $(FC) $(FCPATH)
install -m 644 $(HOMEDIR_TEMPLATE) $(HOMEDIRPATH)
@$(GENHOMEDIRCON) -d $(TOPDIR) -t $(TYPE) $(USEPWD)
$(FC): $(ALL_TUNABLES) tmp/program_used_flags.te $(FCFILES) domains/program domains/misc file_contexts/program file_contexts/misc users /etc/passwd
- @echo "Building file_contexts ..."
+ @echo "Building file contexts files..."
@m4 $(M4PARAM) $(ALL_TUNABLES) tmp/program_used_flags.te $(FCFILES) > $@.tmp
@grep -v -e HOME -e ROLE $@.tmp > $@
@grep -e HOME -e ROLE $@.tmp > $(HOMEDIR_TEMPLATE)
diff --exclude-from=exclude -N -u -r nsapolicy/net_contexts policy-1.23.5/net_contexts
--- nsapolicy/net_contexts 2005-03-24 08:58:25.000000000 -0500
+++ policy-1.23.5/net_contexts 2005-03-28 10:21:45.000000000 -0500
@@ -44,11 +44,11 @@
')
ifdef(`ssh.te', `portcon tcp 22 system_u:object_r:ssh_port_t')
ifdef(`inetd.te', `portcon tcp 23 system_u:object_r:telnetd_port_t')
-ifdef(`mta.te', `
+
portcon tcp 25 system_u:object_r:smtp_port_t
portcon tcp 465 system_u:object_r:smtp_port_t
portcon tcp 587 system_u:object_r:smtp_port_t
-')
+
portcon udp 53 system_u:object_r:dns_port_t
portcon tcp 53 system_u:object_r:dns_port_t
@@ -56,10 +56,10 @@
ifdef(`dhcpc.te', `portcon udp 68 system_u:object_r:dhcpc_port_t')
ifdef(`tftpd.te', `portcon udp 69 system_u:object_r:tftp_port_t')
ifdef(`fingerd.te', `portcon tcp 79 system_u:object_r:fingerd_port_t')
-ifdef(`use_http', `
+
portcon tcp 80 system_u:object_r:http_port_t
portcon tcp 443 system_u:object_r:http_port_t
-')
+
ifdef(`use_pop', `
portcon tcp 106 system_u:object_r:pop_port_t
portcon tcp 109 system_u:object_r:pop_port_t
@@ -70,7 +70,7 @@
ifdef(`innd.te', `portcon tcp 119 system_u:object_r:innd_port_t')
ifdef(`ntpd.te', `portcon udp 123 system_u:object_r:ntp_port_t')
-ifdef(`samba.te', `
+
portcon tcp 137 system_u:object_r:smbd_port_t
portcon udp 137 system_u:object_r:nmbd_port_t
portcon tcp 138 system_u:object_r:smbd_port_t
@@ -78,7 +78,7 @@
portcon tcp 139 system_u:object_r:smbd_port_t
portcon udp 139 system_u:object_r:nmbd_port_t
portcon tcp 445 system_u:object_r:smbd_port_t
-')
+
ifdef(`use_pop', `
portcon tcp 143 system_u:object_r:pop_port_t
portcon tcp 220 system_u:object_r:pop_port_t
@@ -208,11 +208,10 @@
# 9433 is for YIFF
portcon tcp 9433 system_u:object_r:soundd_port_t
')
-ifdef(`use_http_cache', `
portcon tcp 3128 system_u:object_r:http_cache_port_t
portcon tcp 8080 system_u:object_r:http_cache_port_t
portcon udp 3130 system_u:object_r:http_cache_port_t
-')
+
ifdef(`clockspeed.te', `portcon udp 4041 system_u:object_r:clockspeed_port_t')
ifdef(`transproxy.te', `portcon tcp 8081 system_u:object_r:transproxy_port_t')
ifdef(`amanda.te', `
diff --exclude-from=exclude -N -u -r nsapolicy/targeted/domains/program/ssh.te policy-1.23.5/targeted/domains/program/ssh.te
--- nsapolicy/targeted/domains/program/ssh.te 2005-02-24 14:51:10.000000000 -0500
+++ policy-1.23.5/targeted/domains/program/ssh.te 2005-03-29 11:16:20.000000000 -0500
@@ -13,6 +13,7 @@
type sshd_exec_t, file_type, sysadmfile, exec_type;
type ssh_exec_t, file_type, sysadmfile, exec_type;
type ssh_keygen_exec_t, file_type, sysadmfile, exec_type;
+type ssh_keysign_exec_t, file_type, sysadmfile, exec_type;
type sshd_key_t, file_type, sysadmfile;
type sshd_var_run_t, file_type, sysadmfile;
type ssh_port_t, port_type;
diff --exclude-from=exclude -N -u -r nsapolicy/tunables/distro.tun policy-1.23.5/tunables/distro.tun
--- nsapolicy/tunables/distro.tun 2005-02-24 14:51:09.000000000 -0500
+++ policy-1.23.5/tunables/distro.tun 2005-03-28 10:21:45.000000000 -0500
@@ -5,7 +5,7 @@
# appropriate ifdefs.
-dnl define(`distro_redhat')
+define(`distro_redhat')
dnl define(`distro_suse')
diff --exclude-from=exclude -N -u -r nsapolicy/tunables/tunable.tun policy-1.23.5/tunables/tunable.tun
--- nsapolicy/tunables/tunable.tun 2005-02-24 14:51:09.000000000 -0500
+++ policy-1.23.5/tunables/tunable.tun 2005-03-28 10:21:45.000000000 -0500
@@ -1,27 +1,27 @@
# Allow users to execute the mount command
-dnl define(`user_can_mount')
+define(`user_can_mount')
# Allow rpm to run unconfined.
-dnl define(`unlimitedRPM')
+define(`unlimitedRPM')
# Allow privileged utilities like hotplug and insmod to run unconfined.
-dnl define(`unlimitedUtils')
+define(`unlimitedUtils')
# Allow rc scripts to run unconfined, including any daemon
# started by an rc script that does not have a domain transition
# explicitly defined.
-dnl define(`unlimitedRC')
+define(`unlimitedRC')
# Allow sysadm_t to directly start daemons
define(`direct_sysadm_daemon')
# Do not audit things that we know to be broken but which
# are not security risks
-dnl define(`hide_broken_symptoms')
+define(`hide_broken_symptoms')
# Allow user_r to reach sysadm_r via su, sudo, or userhelper.
# Otherwise, only staff_r can do so.
-dnl define(`user_canbe_sysadm')
+define(`user_canbe_sysadm')
# Allow xinetd to run unconfined, including any services it starts
# that do not have a domain transition explicitly defined.
diff --exclude-from=exclude -N -u -r nsapolicy/types/file.te policy-1.23.5/types/file.te
--- nsapolicy/types/file.te 2005-03-24 08:58:30.000000000 -0500
+++ policy-1.23.5/types/file.te 2005-03-28 10:21:45.000000000 -0500
@@ -277,8 +277,9 @@
type tmpfs_t, file_type, sysadmfile, fs_type;
allow { tmpfs_t tmpfile } tmpfs_t:filesystem associate;
+allow tmpfile tmp_t:filesystem associate;
ifdef(`distro_redhat', `
-allow { dev_fs ttyfile } tmpfs_t:filesystem associate;
+allow { dev_fs ttyfile } { tmpfs_t tmp_t }:filesystem associate;
')
type autofs_t, fs_type, noexattrfile, sysadmfile;
diff --exclude-from=exclude -N -u -r nsapolicy/types/network.te policy-1.23.5/types/network.te
--- nsapolicy/types/network.te 2005-03-24 08:58:30.000000000 -0500
+++ policy-1.23.5/types/network.te 2005-03-28 10:21:45.000000000 -0500
@@ -22,13 +22,11 @@
#
# Defines used by the te files need to be defined outside of net_constraints
#
-type dns_port_t, port_type;
-
-ifdef(`dhcpd.te', `define(`use_dhcpd')')
-ifdef(`dnsmasq.te', `define(`use_dhcpd')')
-ifdef(`use_dhcpd', `
-type dhcpd_port_t, port_type;
-')
+type dns_port_t, port_type, reserved_port_type;
+type smtp_port_t, port_type, reserved_port_type;
+type dhcpd_port_t, port_type, reserved_port_type;
+type smbd_port_t, port_type, reserved_port_type;
+type nmbd_port_t, port_type, reserved_port_type;
ifdef(`cyrus.te', `define(`use_pop')')
ifdef(`courier.te', `define(`use_pop')')
@@ -38,21 +36,13 @@
ifdef(`use_pop', `
type pop_port_t, port_type, reserved_port_type;
')
-ifdef(`apache.te', `
-define(`use_http_cache')
-define(`use_http')
-')
ifdef(`ftpd.te', `
define(`use_ftpd')
')
ifdef(`publicfile.te', `
-define(`use_http')
define(`use_ftpd')
')
-ifdef(`squid.te', `define(`use_http_cache')')
-ifdef(`use_http_cache', `
type http_cache_port_t, port_type;
-')
ifdef(`dhcpd.te', `define(`use_pxe')')
ifdef(`pxe.te', `define(`use_pxe')')
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: Policy Patch
2005-03-29 16:47 ` Policy Patch Daniel J Walsh
@ 2005-04-01 20:28 ` James Carter
0 siblings, 0 replies; 27+ messages in thread
From: James Carter @ 2005-04-01 20:28 UTC (permalink / raw)
To: Daniel J Walsh; +Cc: SELinux
Merged.
On Tue, 2005-03-29 at 11:47 -0500, Daniel J Walsh wrote:
> Major cleanup of Makefile. Probably still needs some sanity checks to
> it. Added better echo messages, made sure
> customizable file gets replaced on make load.
>
> Added policy ssh_keysign_exec_t for /usr/libexec/openssh/ssh-keysign
>
> Better handling of syslog-ng
>
> Whole bunch of changes from Ivan, for desktop apps.
>
> Allow named and nscd to write logs to /var/log
>
> Lots of name_connect fixes.
>
> New bool for squid to connect to any port or just http ports.
--
James Carter <jwcart2@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2004-10-13 5:55 Russell Coker
2004-10-13 20:17 ` James Carter
0 siblings, 1 reply; 27+ messages in thread
From: Russell Coker @ 2004-10-13 5:55 UTC (permalink / raw)
To: SELinux
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
Allow checkpolicy to access /dev/tty.
Change var_lib_rpm_t to rpm_var_lib_t.
Allow load_policy to access /dev/tty.
Removed a dontaudit from login.te that was only needed if you had both a buggy
init and booted in permissive mode.
Allow setfiles to access /dev/tty, create unix datagram sockets, and read
locale data.
syslogd should not be running before /dev is labelled so it has no need to
access tmpfs_t.
Make useradd and groupadd run in the correct domain when run from firstboot to
give the files the right context.
Allow fsdaemon_t to access etc_runtime_t for /etc/smartd.conf.
Make kmodule run in kudzu_t (it's from the same code base).
Some minor improvements to mailman policy.
Fix a Red Hat Postfix problem and the postconf problem.
Removed some typealias rules that aren't needed any more.
tftpdir_t generally is not the root of a file system and should not have
attribute root_dir_type.
Added support for the new master socket support in ssh.
xdm_t should not even get access to most types that are labeled as
homedirfile, so changed the rule to use the attribute home_dir_type.
Fixed howl_t port assignments. Either howl code has changed recently or the
current policy was merged wrong.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 18484 bytes --]
diff -ru /usr/src/se/policy/domains/program/checkpolicy.te ./domains/program/checkpolicy.te
--- /usr/src/se/policy/domains/program/checkpolicy.te 2004-09-16 18:06:45.000000000 +1000
+++ ./domains/program/checkpolicy.te 2004-10-04 05:46:14.000000000 +1000
@@ -46,7 +46,7 @@
`allow checkpolicy_t sshd_devpts_t:dir r_dir_perms;')
# Other access
-allow checkpolicy_t { initrc_devpts_t admin_tty_type }:chr_file { read write ioctl getattr };
+allow checkpolicy_t { initrc_devpts_t admin_tty_type devtty_t }:chr_file { read write ioctl getattr };
uses_shlib(checkpolicy_t)
allow checkpolicy_t self:capability dac_override;
diff -ru /usr/src/se/policy/domains/program/initrc.te ./domains/program/initrc.te
--- /usr/src/se/policy/domains/program/initrc.te 2004-10-02 03:36:10.000000000 +1000
+++ ./domains/program/initrc.te 2004-10-11 03:45:20.000000000 +1000
@@ -216,8 +216,8 @@
ifdef(`rpm.te', `
# Access /var/lib/rpm.
-allow initrc_t var_lib_rpm_t:dir rw_dir_perms;
-allow initrc_t var_lib_rpm_t:file create_file_perms;
+allow initrc_t rpm_var_lib_t:dir rw_dir_perms;
+allow initrc_t rpm_var_lib_t:file create_file_perms;
')
')dnl end distro_redhat
diff -ru /usr/src/se/policy/domains/program/load_policy.te ./domains/program/load_policy.te
--- /usr/src/se/policy/domains/program/load_policy.te 2004-08-08 22:16:26.000000000 +1000
+++ ./domains/program/load_policy.te 2004-10-04 05:45:00.000000000 +1000
@@ -48,7 +48,7 @@
allow load_policy_t devpts_t:dir r_dir_perms;
# Other access
-allow load_policy_t { admin_tty_type initrc_devpts_t }:chr_file { read write ioctl getattr };
+allow load_policy_t { admin_tty_type initrc_devpts_t devtty_t }:chr_file { read write ioctl getattr };
uses_shlib(load_policy_t)
allow load_policy_t self:capability dac_override;
diff -ru /usr/src/se/policy/domains/program/login.te ./domains/program/login.te
--- /usr/src/se/policy/domains/program/login.te 2004-09-11 16:21:43.000000000 +1000
+++ ./domains/program/login.te 2004-09-07 22:37:55.000000000 +1000
@@ -130,7 +130,6 @@
can_ypbind($1_login_t)
allow $1_login_t mouse_device_t:chr_file { getattr setattr };
-dontaudit $1_login_t init_t:fd { use };
')dnl end login_domain macro
#################################
#
diff -ru /usr/src/se/policy/domains/program/setfiles.te ./domains/program/setfiles.te
--- /usr/src/se/policy/domains/program/setfiles.te 2004-09-03 14:10:30.000000000 +1000
+++ ./domains/program/setfiles.te 2004-10-04 06:11:39.000000000 +1000
@@ -19,7 +19,9 @@
role sysadm_r types setfiles_t;
allow setfiles_t initrc_devpts_t:chr_file { read write ioctl };
-allow setfiles_t { ttyfile ptyfile tty_device_t admin_tty_type }:chr_file { read write ioctl };
+allow setfiles_t { ttyfile ptyfile tty_device_t admin_tty_type devtty_t }:chr_file { read write ioctl };
+
+allow setfiles_t self:unix_dgram_socket create_socket_perms;
domain_auto_trans(sysadm_t, setfiles_exec_t, setfiles_t)
allow setfiles_t { userdomain privfd initrc_t init_t }:fd use;
@@ -46,6 +48,8 @@
allow setfiles_t fs_t:filesystem getattr;
allow setfiles_t fs_type:dir r_dir_perms;
+read_locale(setfiles_t)
+
allow setfiles_t etc_runtime_t:file read;
allow setfiles_t etc_t:file read;
allow setfiles_t proc_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/sulogin.te ./domains/program/sulogin.te
--- /usr/src/se/policy/domains/program/sulogin.te 2004-10-02 03:36:11.000000000 +1000
+++ ./domains/program/sulogin.te 2004-10-11 04:37:17.000000000 +1000
@@ -38,6 +38,10 @@
allow sulogin_t sysadm_devpts_t:chr_file { getattr ioctl read write };
allow sulogin_t { staff_home_dir_t sysadm_home_dir_t }:dir { search };
+allow sulogin_t default_context_t:dir search;
allow sulogin_t default_context_t:file { getattr read };
r_dir_file(sulogin_t, selinux_config_t)
+
+# because file systems are not mounted
+dontaudit sulogin_t file_t:dir search;
diff -ru /usr/src/se/policy/domains/program/syslogd.te ./domains/program/syslogd.te
--- /usr/src/se/policy/domains/program/syslogd.te 2004-10-11 03:50:36.000000000 +1000
+++ ./domains/program/syslogd.te 2004-10-11 04:37:44.000000000 +1000
@@ -94,5 +94,4 @@
# /initrd is not umounted before minilog starts
#
dontaudit syslogd_t file_t:dir search;
-allow syslogd_t { tmpfs_t devpts_t }:dir { search };
-dontaudit syslogd_t unlabeled_t:file read;
+allow syslogd_t devpts_t:dir { search };
diff -ru /usr/src/se/policy/domains/program/unused/anaconda.te ./domains/program/unused/anaconda.te
--- /usr/src/se/policy/domains/program/unused/anaconda.te 2004-09-11 16:21:44.000000000 +1000
+++ ./domains/program/unused/anaconda.te 2004-10-11 03:44:38.000000000 +1000
@@ -187,8 +187,8 @@
ifdef(`distro_redhat', `
ifdef(`rpm.te', `
# Access /var/lib/rpm.
-allow anaconda_t var_lib_rpm_t:dir rw_dir_perms;
-allow anaconda_t var_lib_rpm_t:file create_file_perms;
+allow anaconda_t rpm_var_lib_t:dir rw_dir_perms;
+allow anaconda_t rpm_var_lib_t:file create_file_perms;
domain_auto_trans(anaconda_t, rpm_exec_t, rpm_t)
')
')
Only in ./domains/program/unused: bindgraph.te
diff -ru /usr/src/se/policy/domains/program/unused/bootloader.te ./domains/program/unused/bootloader.te
--- /usr/src/se/policy/domains/program/unused/bootloader.te 2004-10-11 03:50:36.000000000 +1000
+++ ./domains/program/unused/bootloader.te 2004-10-11 04:38:52.000000000 +1000
@@ -121,7 +121,7 @@
allow bootloader_t proc_t:dir { getattr search };
allow bootloader_t proc_t:file r_file_perms;
allow bootloader_t proc_t:lnk_file { getattr read };
-allow bootloader_t proc_mdstat_t:file r_file_perms;
+allow bootloader_t proc_mdstat_t:file { getattr read };
allow bootloader_t self:dir { getattr search read };
allow bootloader_t sysctl_kernel_t:dir search;
allow bootloader_t sysctl_kernel_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/unused/firstboot.te ./domains/program/unused/firstboot.te
--- /usr/src/se/policy/domains/program/unused/firstboot.te 2004-09-24 06:31:21.000000000 +1000
+++ ./domains/program/unused/firstboot.te 2004-10-01 06:19:47.000000000 +1000
@@ -19,7 +19,6 @@
')
etc_domain(firstboot)
-typealias firstboot_etc_t alias etc_firstboot_t;
allow firstboot_t proc_t:file r_file_perms;
@@ -30,6 +29,8 @@
file_type_auto_trans(firstboot_t, etc_t, firstboot_rw_t, file)
can_exec_any(firstboot_t)
+domain_auto_trans(firstboot_t, useradd_exec_t, useradd_t)
+domain_auto_trans(firstboot_t, groupadd_exec_t, groupadd_t)
allow firstboot_t etc_runtime_t:file { getattr read };
r_dir_file(firstboot_t, etc_t)
diff -ru /usr/src/se/policy/domains/program/unused/fs_daemon.te ./domains/program/unused/fs_daemon.te
--- /usr/src/se/policy/domains/program/unused/fs_daemon.te 2004-02-03 02:17:22.000000000 +1100
+++ ./domains/program/unused/fs_daemon.te 2004-10-04 06:05:27.000000000 +1000
@@ -12,3 +12,4 @@
allow fsdaemon_t device_t:dir read;
allow fsdaemon_t fixed_disk_device_t:blk_file rw_file_perms;
allow fsdaemon_t self:capability { sys_rawio sys_admin };
+allow fsdaemon_t etc_runtime_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/unused/i18n_input.te ./domains/program/unused/i18n_input.te
--- /usr/src/se/policy/domains/program/unused/i18n_input.te 2004-10-11 03:50:37.000000000 +1000
+++ ./domains/program/unused/i18n_input.te 2004-10-11 04:42:15.000000000 +1000
@@ -12,13 +12,6 @@
can_network(i18n_input_t)
can_ypbind(i18n_input_t)
-## No Unix Socket Connection at the moment
-##
-# can_unix_send( { i18n_input_t sysadm_t }, { i18n_input_t sysadm_t } )
-# allow i18n_input_t self:unix_dgram_socket create_socket_perms;
-# allow i18n_input_t self:unix_stream_socket create_stream_socket_perms;
-# can_unix_connect(i18n_input_t, self)
-
can_tcp_connect(userdomain, i18n_input_t)
allow i18n_input_t self:fifo_file rw_file_perms;
diff -ru /usr/src/se/policy/domains/program/unused/kudzu.te ./domains/program/unused/kudzu.te
--- /usr/src/se/policy/domains/program/unused/kudzu.te 2004-10-07 16:14:46.000000000 +1000
+++ ./domains/program/unused/kudzu.te 2004-10-04 05:54:24.000000000 +1000
@@ -15,8 +15,8 @@
allow kudzu_t etc_t:file { getattr read };
allow kudzu_t self:capability { dac_override sys_admin sys_rawio net_admin sys_tty_config };
allow kudzu_t modules_conf_t:file { getattr read };
-allow kudzu_t modules_object_t:dir { getattr search };
-allow kudzu_t modules_dep_t:file { getattr read };
+allow kudzu_t modules_object_t:dir r_dir_perms;
+allow kudzu_t { modules_object_t modules_dep_t }:file { getattr read };
allow kudzu_t mouse_device_t:chr_file { read write };
allow kudzu_t proc_t:file { getattr read };
allow kudzu_t { fixed_disk_device_t removable_device_t }:blk_file rw_file_perms;
diff -ru /usr/src/se/policy/domains/program/unused/mailman.te ./domains/program/unused/mailman.te
--- /usr/src/se/policy/domains/program/unused/mailman.te 2004-08-28 12:05:03.000000000 +1000
+++ ./domains/program/unused/mailman.te 2004-10-08 06:06:06.000000000 +1000
@@ -87,7 +87,10 @@
allow mta_delivery_agent mailman_data_t:dir search;
allow mta_delivery_agent mailman_data_t:lnk_file read;
-domain_auto_trans(mta_delivery_agent, mailman_mail_exec_t, mailman_mail_t)
+domain_auto_trans({ mta_delivery_agent initrc_t }, mailman_mail_exec_t, mailman_mail_t)
+ifdef(`direct_sysadm_daemon', `
+domain_auto_trans(sysadm_t, mailman_mail_exec_t, mailman_mail_t)
+')
allow mailman_mail_t self:unix_dgram_socket create_socket_perms;
system_crond_entry(mailman_queue_exec_t, mailman_queue_t)
diff -ru /usr/src/se/policy/domains/program/unused/mdadm.te ./domains/program/unused/mdadm.te
--- /usr/src/se/policy/domains/program/unused/mdadm.te 2004-09-11 16:21:44.000000000 +1000
+++ ./domains/program/unused/mdadm.te 2004-10-04 02:53:30.000000000 +1000
@@ -6,6 +6,8 @@
daemon_base_domain(mdadm, `, fs_domain')
role sysadm_r types mdadm_t;
+allow initrc_t mdadm_var_run_t:file create_file_perms;
+
# Kernel filesystem permissions
r_dir_file(mdadm_t, proc_t)
allow mdadm_t proc_mdstat_t:file rw_file_perms;
diff -ru /usr/src/se/policy/domains/program/unused/postfix.te ./domains/program/unused/postfix.te
--- /usr/src/se/policy/domains/program/unused/postfix.te 2004-10-02 03:36:11.000000000 +1000
+++ ./domains/program/unused/postfix.te 2004-10-11 15:36:41.000000000 +1000
@@ -94,7 +94,7 @@
dontaudit postfix_master_t selinux_config_t:dir search;
can_exec({ sysadm_mail_t system_mail_t }, postfix_master_exec_t)
ifdef(`distro_redhat', `
-file_type_auto_trans({ sysadm_mail_t system_mail_t }, postfix_etc_t, etc_aliases_t)
+file_type_auto_trans({ sysadm_mail_t system_mail_t postfix_master_t }, postfix_etc_t, etc_aliases_t)
', `
file_type_auto_trans({ sysadm_mail_t system_mail_t }, etc_t, etc_aliases_t)
')
@@ -103,7 +103,7 @@
ifdef(`pppd.te', `
domain_auto_trans(pppd_t, postfix_master_exec_t, postfix_master_t)
')
-can_exec(postfix_master_t, ls_exec_t)
+can_exec(postfix_master_t, { ls_exec_t sbin_t })
allow postfix_master_t sysctl_kernel_t:dir r_dir_perms;
allow postfix_master_t sysctl_kernel_t:file r_file_perms;
allow postfix_master_t self:fifo_file rw_file_perms;
diff -ru /usr/src/se/policy/domains/program/unused/procmail.te ./domains/program/unused/procmail.te
--- /usr/src/se/policy/domains/program/unused/procmail.te 2004-08-28 12:05:04.000000000 +1000
+++ ./domains/program/unused/procmail.te 2004-10-10 17:32:31.000000000 +1000
@@ -70,4 +70,7 @@
ifdef(`sendmail.te', `
r_dir_file(procmail_t, etc_mail_t)
+ifdef(`hide_broken_symptoms', `
+dontaudit procmail_t mqueue_spool_t:file { getattr read };
+')
')
diff -ru /usr/src/se/policy/domains/program/unused/radvd.te ./domains/program/unused/radvd.te
--- /usr/src/se/policy/domains/program/unused/radvd.te 2004-03-18 15:36:09.000000000 +1100
+++ ./domains/program/unused/radvd.te 2004-10-07 14:26:35.000000000 +1000
@@ -11,7 +11,7 @@
daemon_domain(radvd)
etc_domain(radvd)
-typealias radvd_etc_t alias etc_radvd_t;
+allow radvd_t etc_t:file { getattr read };
allow radvd_t self:{ rawip_socket unix_dgram_socket } rw_socket_perms;
diff -ru /usr/src/se/policy/domains/program/unused/rpm.te ./domains/program/unused/rpm.te
--- /usr/src/se/policy/domains/program/unused/rpm.te 2004-10-07 16:14:46.000000000 +1000
+++ ./domains/program/unused/rpm.te 2004-10-11 04:51:43.000000000 +1000
@@ -172,7 +172,7 @@
allow crond_t rpm_t:fifo_file r_file_perms;
')
-allow rpm_script_t proc_t:dir { search getattr read };
+allow rpm_script_t proc_t:dir r_dir_perms;
allow rpm_script_t proc_t:{ file lnk_file } r_file_perms;
allow rpm_script_t devtty_t:chr_file rw_file_perms;
diff -ru /usr/src/se/policy/domains/program/unused/squid.te ./domains/program/unused/squid.te
--- /usr/src/se/policy/domains/program/unused/squid.te 2004-09-16 18:06:56.000000000 +1000
+++ ./domains/program/unused/squid.te 2004-09-29 21:57:20.000000000 +1000
@@ -66,4 +66,6 @@
allow squid_t { bin_t sbin_t }:dir search;
dontaudit squid_t { home_root_t security_t devpts_t }:dir getattr;
+ifdef(`targeted_policy', `
dontaudit squid_t tty_device_t:chr_file { read write };
+')
diff -ru /usr/src/se/policy/domains/program/unused/tftpd.te ./domains/program/unused/tftpd.te
--- /usr/src/se/policy/domains/program/unused/tftpd.te 2004-10-11 03:50:38.000000000 +1000
+++ ./domains/program/unused/tftpd.te 2004-10-11 04:54:30.000000000 +1000
@@ -16,7 +16,7 @@
type tftp_port_t, port_type, reserved_port_type;
# tftpdir_t is the type of files in the /tftpboot directories.
-type tftpdir_t, file_type, root_dir_type, sysadmfile;
+type tftpdir_t, file_type, sysadmfile;
r_dir_file(tftpd_t, tftpdir_t)
domain_auto_trans(inetd_t, tftpd_exec_t, tftpd_t)
diff -ru /usr/src/se/policy/file_contexts/program/fs_daemon.fc ./file_contexts/program/fs_daemon.fc
--- /usr/src/se/policy/file_contexts/program/fs_daemon.fc 2004-02-03 02:17:23.000000000 +1100
+++ ./file_contexts/program/fs_daemon.fc 2004-10-04 06:04:44.000000000 +1000
@@ -1,3 +1,4 @@
# fs admin daemons
/usr/sbin/smartd -- system_u:object_r:fsdaemon_exec_t
/var/run/smartd.pid -- system_u:object_r:fsdaemon_var_run_t
+/etc/smartd.conf -- system_u:object_r:etc_runtime_t
diff -ru /usr/src/se/policy/file_contexts/program/kudzu.fc ./file_contexts/program/kudzu.fc
--- /usr/src/se/policy/file_contexts/program/kudzu.fc 2003-11-27 05:04:46.000000000 +1100
+++ ./file_contexts/program/kudzu.fc 2004-09-26 05:24:38.000000000 +1000
@@ -1,2 +1,3 @@
# kudzu
/usr/sbin/kudzu -- system_u:object_r:kudzu_exec_t
+/sbin/kmodule -- system_u:object_r:kudzu_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/mailman.fc ./file_contexts/program/mailman.fc
--- /usr/src/se/policy/file_contexts/program/mailman.fc 2004-10-02 03:36:12.000000000 +1000
+++ ./file_contexts/program/mailman.fc 2004-10-12 17:32:59.000000000 +1000
@@ -14,10 +14,12 @@
')
ifdef(`distro_redhat', `
-/usr/lib/mailman/cgi-bin/.* -- system_u:object_r:mailman_cgi_exec_t
+/usr/lib/mailman/cgi-bin/.* -- system_u:object_r:mailman_cgi_exec_t
/var/mailman(/.*)? system_u:object_r:mailman_data_t
/var/mailman/locks(/.*)? system_u:object_r:mailman_lock_t
/var/mailman/archives(/.*)? system_u:object_r:mailman_archive_t
/usr/lib/mailman/scripts/mailman -- system_u:object_r:mailman_mail_exec_t
-/usr/lib/mailman/bin/qrunner -- system_u:object_r:mailman_queue_exec_t
+/usr/lib/mailman/bin/qrunner -- system_u:object_r:mailman_queue_exec_t
+/var/mailman/lists(/.*)? system_u:object_r:mailman_data_t
+/var/mailman/logs(/.*)? system_u:object_r:mailman_log_t
')
diff -ru /usr/src/se/policy/file_contexts/program/postfix.fc ./file_contexts/program/postfix.fc
--- /usr/src/se/policy/file_contexts/program/postfix.fc 2004-09-23 22:31:22.000000000 +1000
+++ ./file_contexts/program/postfix.fc 2004-10-11 15:35:56.000000000 +1000
@@ -18,7 +18,6 @@
/usr/lib(exec)?/postfix/pipe -- system_u:object_r:postfix_pipe_exec_t
/usr/sbin/postalias -- system_u:object_r:postfix_master_exec_t
/usr/sbin/postcat -- system_u:object_r:postfix_master_exec_t
-/usr/sbin/postconf -- system_u:object_r:postfix_master_exec_t
/usr/sbin/postdrop -- system_u:object_r:postfix_postdrop_exec_t
/usr/sbin/postfix -- system_u:object_r:postfix_master_exec_t
/usr/sbin/postkick -- system_u:object_r:postfix_master_exec_t
diff -ru /usr/src/se/policy/macros/global_macros.te ./macros/global_macros.te
--- /usr/src/se/policy/macros/global_macros.te 2004-10-07 16:14:50.000000000 +1000
+++ ./macros/global_macros.te 2004-09-29 01:13:57.000000000 +1000
@@ -373,7 +372,6 @@
# classes to use; default is file.
define(`var_run_domain', `
type $1_var_run_t, file_type, sysadmfile, pidfile;
-typealias $1_var_run_t alias var_run_$1_t;
ifelse(`$2', `', `
file_type_auto_trans($1_t, var_run_t, $1_var_run_t, file)
diff -ru /usr/src/se/policy/macros/program/ssh_macros.te ./macros/program/ssh_macros.te
--- /usr/src/se/policy/macros/program/ssh_macros.te 2004-10-11 03:50:41.000000000 +1000
+++ ./macros/program/ssh_macros.te 2004-09-30 07:08:07.000000000 +1000
@@ -104,6 +104,8 @@
# Access the users .ssh directory.
file_type_auto_trans({ sysadm_ssh_t $1_ssh_t }, $1_home_dir_t, $1_home_ssh_t, dir)
+file_type_auto_trans($1_ssh_t, $1_home_dir_t, $1_home_ssh_t, sock_file)
+allow $1_t $1_home_ssh_t:sock_file create_file_perms;
allow { sysadm_ssh_t $1_ssh_t } $1_home_ssh_t:file create_file_perms;
allow { sysadm_ssh_t $1_ssh_t } $1_home_ssh_t:lnk_file { getattr read };
dontaudit $1_ssh_t $1_home_t:dir { getattr search };
diff -ru /usr/src/se/policy/macros/program/xserver_macros.te ./macros/program/xserver_macros.te
--- /usr/src/se/policy/macros/program/xserver_macros.te 2004-10-11 03:50:41.000000000 +1000
+++ ./macros/program/xserver_macros.te 2004-10-11 14:34:17.000000000 +1000
@@ -64,7 +64,7 @@
allow xdm_xserver_t init_t:fd use;
-dontaudit xdm_xserver_t homedirfile:dir { read search };
+dontaudit xdm_xserver_t home_dir_type:dir { read search };
', `
# The user role is authorized for this domain.
role $1_r types $1_xserver_t;
diff -ru /usr/src/se/policy/net_contexts ./net_contexts
--- /usr/src/se/policy/net_contexts 2004-10-07 16:14:35.000000000 +1000
+++ ./net_contexts 2004-10-07 18:39:54.000000000 +1000
@@ -158,7 +158,10 @@
portcon tcp 5323 system_u:object_r:imaze_port_t
portcon udp 5323 system_u:object_r:imaze_port_t
')
-ifdef(`howl.te', `portcon tcp 5353 system_u:object_r:howl_port_t')
+ifdef(`howl.te', `
+portcon tcp 5335 system_u:object_r:howl_port_t
+portcon udp 5353 system_u:object_r:howl_port_t
+')
ifdef(`jabberd.te', `
portcon tcp 5222 system_u:object_r:jabber_client_port_t
portcon tcp 5223 system_u:object_r:jabber_client_port_t
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-10-13 5:55 policy patch Russell Coker
@ 2004-10-13 20:17 ` James Carter
0 siblings, 0 replies; 27+ messages in thread
From: James Carter @ 2004-10-13 20:17 UTC (permalink / raw)
To: Russell Coker; +Cc: SELinux
Merged.
On Wed, 2004-10-13 at 01:55, Russell Coker wrote:
> Allow checkpolicy to access /dev/tty.
>
> Change var_lib_rpm_t to rpm_var_lib_t.
>
> Allow load_policy to access /dev/tty.
>
> Removed a dontaudit from login.te that was only needed if you had both a buggy
> init and booted in permissive mode.
>
> Allow setfiles to access /dev/tty, create unix datagram sockets, and read
> locale data.
>
> syslogd should not be running before /dev is labelled so it has no need to
> access tmpfs_t.
>
> Make useradd and groupadd run in the correct domain when run from firstboot to
> give the files the right context.
>
> Allow fsdaemon_t to access etc_runtime_t for /etc/smartd.conf.
>
> Make kmodule run in kudzu_t (it's from the same code base).
>
> Some minor improvements to mailman policy.
>
> Fix a Red Hat Postfix problem and the postconf problem.
>
> Removed some typealias rules that aren't needed any more.
>
> tftpdir_t generally is not the root of a file system and should not have
> attribute root_dir_type.
>
> Added support for the new master socket support in ssh.
>
> xdm_t should not even get access to most types that are labeled as
> homedirfile, so changed the rule to use the attribute home_dir_type.
>
> Fixed howl_t port assignments. Either howl code has changed recently or the
> current policy was merged wrong.
--
James Carter <jwcart2@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2004-08-24 8:18 Russell Coker
2004-08-24 12:23 ` Stephen Smalley
2004-08-27 20:58 ` James Carter
0 siblings, 2 replies; 27+ messages in thread
From: Russell Coker @ 2004-08-24 8:18 UTC (permalink / raw)
To: SE Linux
[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]
diff1 removes some unnecessary dontaudit lines from syslogd.te, if there is to
be one single domain accessing devpts_t:chr_file then syslogd_t is not it,
and if a log file gets type unlabeled_t then it's something we want audited.
httpd_t does not need search access to devpts_t (it is not granted access to
any device node under /dev/pts). httpd_suexec_t does not need
net_bind_service (all it does it call setuid() and execute a script), it's
access attempts of /var/run are the usual nscd stuff that gets a dontaudit
rule.
It seems that only Red Hat has bootloader_t needing access to
modules_object_t:lnk_file.
cpucontrol_t sometimes needs getattr access to a sym-link in /dev, no harm in
granting it.
There should never be a printer_device_t:fifo_file object, there is no
file_contexts entry assigning printer_device_t to a fifo_file object, so I
remove the access to this invalid combination.
dovecot_cert_t is used for SSL certificates. If there are any certificates
labeled as usr_t then that's a bug in the file_contexts file. I'll change
the contexts of the files to use bin_t for sub-binaries on Debian as well as
Red Hat (as well as putting some conditionals into the .fc file).
I changed ftpd.te to have the domain_auto_trans(inetd, part inside
if(!ftpd_is_daemon).
Change hald.te to work with the latest version in Fedora. I didn't want to
give it read access to hard disks, but it seems that's he way things are
going.
Changed hotplug.te to allow it to run arping on Red Hat, and to be a hald
client (maybe we need a hald_client_domain attribute).
Allows lvm_t to create unix_dgram_socket objects.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff1 --]
[-- Type: text/x-diff, Size: 11250 bytes --]
diff -ru /usr/src/se/policy/domains/program/syslogd.te ./domains/program/syslogd.te
--- /usr/src/se/policy/domains/program/syslogd.te 2004-08-24 16:01:13.000000000 +1000
+++ ./domains/program/syslogd.te 2004-07-08 21:30:48.000000000 +1000
@@ -94,6 +94,3 @@
#
dontaudit syslogd_t file_t:dir search;
allow syslogd_t devpts_t:dir { search };
-dontaudit syslogd_t devpts_t:chr_file { read write };
-
-dontaudit syslogd_t unlabeled_t:file { read };
diff -ru /usr/src/se/policy/domains/program/unused/apache.te ./domains/program/unused/apache.te
--- /usr/src/se/policy/domains/program/unused/apache.te 2004-08-15 15:45:15.000000000 +1000
+++ ./domains/program/unused/apache.te 2004-08-24 16:07:09.000000000 +1000
@@ -68,7 +69,6 @@
allow httpd_t { random_device_t urandom_device_t }:chr_file { getattr ioctl read };
-allow httpd_t devpts_t:dir { search };
allow httpd_t sysctl_kernel_t:dir search;
allow httpd_t sysctl_kernel_t:file read;
@@ -88,11 +88,10 @@
# Permissions for running child processes and scripts
##########################################################
-allow httpd_suexec_t self:capability { setuid setgid net_bind_service };
+allow httpd_suexec_t self:capability { setuid setgid };
-allow httpd_suexec_t var_run_t:dir { search };
-allow httpd_suexec_t var_t:dir { search };
-allow httpd_suexec_t var_log_t:dir search;
+dontaudit httpd_suexec_t var_run_t:dir search;
+allow httpd_suexec_t { var_t var_log_t }:dir search;
allow httpd_suexec_t home_root_t:dir search;
allow httpd_suexec_t httpd_log_t:dir search;
@@ -122,7 +121,10 @@
uses_shlib(httpd_t)
allow httpd_t { usr_t lib_t }:file { getattr read ioctl };
-allow httpd_t usr_t:lnk_file read;
+allow httpd_t usr_t:lnk_file { getattr read };
+
+# for apache2 memory mapped files
+var_lib_domain(httpd)
# for tomcat
r_dir_file(httpd_t, var_lib_t)
diff -ru /usr/src/se/policy/domains/program/unused/bootloader.te ./domains/program/unused/bootloader.te
--- /usr/src/se/policy/domains/program/unused/bootloader.te 2004-08-24 16:01:17.000000000 +1000
+++ ./domains/program/unused/bootloader.te 2004-08-24 16:07:33.000000000 +1000
@@ -65,7 +65,9 @@
allow bootloader_t { modules_dep_t modules_object_t modules_conf_t }:file r_file_perms;
allow bootloader_t modules_object_t:dir r_dir_perms;
+ifdef(`distro_redhat', `
allow bootloader_t modules_object_t:lnk_file { getattr read };
+')
# for ldd
ifdef(`fsadm.te', `
diff -ru /usr/src/se/policy/domains/program/unused/cpucontrol.te ./domains/program/unused/cpucontrol.te
--- /usr/src/se/policy/domains/program/unused/cpucontrol.te 2004-08-24 16:01:19.000000000 +1000
+++ ./domains/program/unused/cpucontrol.te 2004-08-22 19:08:10.000000000 +1000
@@ -9,8 +9,8 @@
# Access cpu devices.
allow cpucontrol_t cpu_device_t:chr_file rw_file_perms;
+allow cpucontrol_t device_t:lnk_file { getattr read };
allow initrc_t cpu_device_t:chr_file getattr;
-allow cpucontrol_t device_t:lnk_file { read };
allow cpucontrol_t self:capability sys_rawio;
diff -ru /usr/src/se/policy/domains/program/unused/cups.te ./domains/program/unused/cups.te
--- /usr/src/se/policy/domains/program/unused/cups.te 2004-08-02 16:59:48.000000000 +1000
+++ ./domains/program/unused/cups.te 2004-08-24 16:10:02.000000000 +1000
@@ -152,11 +152,10 @@
allow ptal_t printer_device_t:chr_file { ioctl read write };
allow ptal_t { etc_t etc_runtime_t }:file { getattr read };
r_dir_file(ptal_t, usbdevfs_t)
-allow cupsd_t ptal_var_run_t:sock_file { write setattr } ;
+allow cupsd_t ptal_var_run_t:sock_file { write setattr };
allow cupsd_t ptal_t:unix_stream_socket { connectto };
allow cupsd_t ptal_var_run_t:dir { search };
dontaudit ptal_t { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search };
-allow cupsd_t printer_device_t:fifo_file rw_file_perms;
dontaudit cupsd_t selinux_config_t:dir search;
dontaudit cupsd_t selinux_config_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/unused/dovecot.te ./domains/program/unused/dovecot.te
--- /usr/src/se/policy/domains/program/unused/dovecot.te 2004-06-30 13:03:13.000000000 +1000
+++ ./domains/program/unused/dovecot.te 2004-08-24 16:19:10.000000000 +1000
@@ -11,20 +11,15 @@
type dovecot_cert_t, file_type, sysadmfile;
-allow dovecot_t self:capability { chown net_bind_service setgid setuid sys_chroot dac_override dac_read_search };
+allow dovecot_t self:capability { dac_override dac_read_search chown net_bind_service setgid setuid sys_chroot };
allow dovecot_t self:process { setrlimit };
can_network(dovecot_t)
allow dovecot_t self:unix_dgram_socket create_socket_perms;
allow dovecot_t self:unix_stream_socket create_stream_socket_perms;
can_unix_connect(dovecot_t, self)
-# For SSL certificates
-allow dovecot_t usr_t:file { getattr read };
-
allow dovecot_t etc_t:file { getattr read };
allow dovecot_t initrc_var_run_t:file { getattr };
-# Dovecot sub-binaries are lib_t on Debian and bin_t on Fedora
-allow dovecot_t lib_t:file { execute execute_no_trans };
allow dovecot_t bin_t:dir { getattr search };
can_exec(dovecot_t, bin_t)
diff -ru /usr/src/se/policy/domains/program/unused/ftpd.te ./domains/program/unused/ftpd.te
--- /usr/src/se/policy/domains/program/unused/ftpd.te 2004-08-08 22:16:26.000000000 +1000
+++ ./domains/program/unused/ftpd.te 2004-08-24 16:32:22.000000000 +1000
@@ -24,6 +24,7 @@
allow ftpd_t bin_t:dir search;
can_exec(ftpd_t, bin_t)
+allow ftpd_t bin_t:lnk_file read;
allow ftpd_t { sysctl_t sysctl_kernel_t }:dir search;
allow ftpd_t sysctl_kernel_t:file { getattr read };
@@ -32,14 +33,11 @@
ifdef(`crond.te', `
system_crond_entry(ftpd_exec_t, ftpd_t)
can_exec(ftpd_t, { sbin_t shell_exec_t })
+allow ftpd_t usr_t:file { getattr read };
')
allow ftpd_t ftp_data_port_t:tcp_socket name_bind;
-ifdef(`inetd.te', `
-domain_auto_trans(inetd_t, ftpd_exec_t, ftpd_t)
-')
-
# Allow ftpd to run directly without inetd.
bool ftpd_is_daemon false;
if (ftpd_is_daemon) {
@@ -47,10 +45,10 @@
allow ftpd_t ftp_port_t:tcp_socket name_bind;
can_tcp_connect(userdomain, ftpd_t)
}
-
ifdef(`inetd.te', `
if (!ftpd_is_daemon) {
ifdef(`tcpd.te', `domain_auto_trans(tcpd_t, ftpd_exec_t, ftpd_t)')
+domain_auto_trans(inetd_t, ftpd_exec_t, ftpd_t)
# Use sockets inherited from inetd.
allow ftpd_t inetd_t:fd use;
@@ -87,11 +85,12 @@
dontaudit ftpd_t sysadm_home_dir_t:dir getattr;
dontaudit ftpd_t krb5_conf_t:file { write };
+dontaudit ftpd_t selinux_config_t:dir search;
allow ftpd_t krb5_conf_t:file { getattr read };
ifdef(`automount.te', `
allow ftpd_t autofs_t:dir { search };
')
-allow ftpd_t self:file { read };
+allow ftpd_t self:file { getattr read };
tmp_domain(ftpd)
# Allow ftp to read/write files in the user home directories.
@@ -101,4 +100,4 @@
allow ftpd_t nfs_t:dir r_dir_perms;
allow ftpd_t nfs_t:file r_file_perms;
}
-')
+')dnl end if nfs_home_dirs
diff -ru /usr/src/se/policy/domains/program/unused/hald.te ./domains/program/unused/hald.te
--- /usr/src/se/policy/domains/program/unused/hald.te 2004-08-18 22:42:50.000000000 +1000
+++ ./domains/program/unused/hald.te 2004-08-23 20:35:07.000000000 +1000
@@ -10,14 +10,15 @@
#
# hald_exec_t is the type of the hald executable.
#
-daemon_domain(hald, `, dbus_client_domain')
+daemon_domain(hald, `, dbus_client_domain, fs_domain')
-allow hald_t etc_t:file { getattr read };
+allow hald_t { etc_t etc_runtime_t }:file { getattr read };
allow hald_t self:unix_stream_socket create_stream_socket_perms;
+allow hald_t self:unix_dgram_socket create_socket_perms;
allow hald_t dbusd_t:dbus { acquire_svc };
-allow hald_t self:file { getattr read };
+allow hald_t { self proc_t }:file { getattr read };
allow hald_t { bin_t sbin_t }:dir search;
allow hald_t hald_t:fifo_file rw_file_perms;
@@ -28,8 +29,14 @@
allow hald_t self:capability { net_admin sys_admin };
can_network(hald_t)
+allow hald_t fixed_disk_device_t:blk_file { getattr read };
+allow hald_t event_device_t:chr_file { getattr read };
+
ifdef(`updfstab.te', `domain_auto_trans(hald_t, updfstab_exec_t, updfstab_t)')
-ifdef(`udev.te', `domain_auto_trans(hald_t, udev_exec_t, udev_t)')
+ifdef(`udev.te', `
+domain_auto_trans(hald_t, udev_exec_t, udev_t)
+allow udev_t hald_t:unix_dgram_socket sendto;
+')
allow hald_t usbdevfs_t:dir search;
allow hald_t usbdevfs_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/unused/hotplug.te ./domains/program/unused/hotplug.te
--- /usr/src/se/policy/domains/program/unused/hotplug.te 2004-08-21 13:19:07.000000000 +1000
+++ ./domains/program/unused/hotplug.te 2004-08-23 16:37:52.000000000 +1000
@@ -17,14 +17,13 @@
')
etcdir_domain(hotplug)
-typealias hotplug_etc_t alias etc_hotplug_t;
allow hotplug_t self:fifo_file { read write getattr ioctl };
allow hotplug_t self:unix_dgram_socket create_socket_perms;
allow hotplug_t self:unix_stream_socket create_socket_perms;
allow hotplug_t self:udp_socket create_socket_perms;
-allow hotplug_t sysctl_net_t:dir search;
+allow hotplug_t sysctl_net_t:dir r_dir_perms;
allow hotplug_t sysctl_net_t:file { getattr read };
# get info from /proc
@@ -43,12 +42,16 @@
allow hotplug_t { bin_t sbin_t }:dir search;
allow hotplug_t { bin_t sbin_t }:lnk_file read;
can_exec(hotplug_t, { hotplug_exec_t bin_t sbin_t ls_exec_t shell_exec_t hotplug_etc_t etc_t })
-ifdef(`hostname.te', `
-can_exec(hotplug_t, hostname_exec_t)
-')
+ifdef(`hostname.te', `can_exec(hotplug_t, hostname_exec_t)')
+ifdef(`netutils.te', `
+ifdef(`distro_redhat', `
+# for arping used for static IP addresses on PCMCIA ethernet
+domain_auto_trans(hotplug_t, netutils_exec_t, netutils_t)
+')dnl end if distro_redhat
+')dnl end if netutils.te
allow initrc_t usbdevfs_t:file { getattr read ioctl };
-allow initrc_t modules_dep_t:file { getattr read };
+allow initrc_t modules_dep_t:file { getattr read ioctl };
r_dir_file(hotplug_t, usbdevfs_t)
allow hotplug_t usbfs_t:dir r_dir_perms;
allow hotplug_t usbfs_t:file { getattr read };
@@ -64,6 +67,10 @@
allow hotplug_t var_lock_t:file getattr;
')
+ifdef(`hald.te', `
+allow hotplug_t hald_t:unix_dgram_socket sendto;
+')
+
# for killall
allow hotplug_t self:process { getsession getattr };
allow hotplug_t self:file getattr;
@@ -129,8 +136,7 @@
allow hotplug_t sound_device_t:chr_file { setattr };
ifdef(`udev.te', `
-domain_auto_trans(hotplug_t, udev_exec_t, udev_t)
-domain_auto_trans(hotplug_t, udev_helper_exec_t, udev_t)
+domain_auto_trans(hotplug_t, { udev_exec_t udev_helper_exec_t }, udev_t)
')
file_type_auto_trans(hotplug_t, etc_t, etc_runtime_t, file)
@@ -143,7 +149,7 @@
domain_auto_trans(hotplug_t, sendmail_exec_t, system_mail_t)
')
-allow restorecon_t hotplug_t:fd { use };
+allow restorecon_t hotplug_t:fd use;
ifdef(`unlimitedUtils', `
unconfined_domain(hotplug_t)
diff -ru /usr/src/se/policy/domains/program/unused/lvm.te ./domains/program/unused/lvm.te
--- /usr/src/se/policy/domains/program/unused/lvm.te 2004-08-19 17:10:36.000000000 +1000
+++ ./domains/program/unused/lvm.te 2004-08-18 19:00:03.000000000 +1000
@@ -32,6 +32,7 @@
allow lvm_t self:process { setsched };
allow lvm_t self:fifo_file rw_file_perms;
+allow lvm_t self:unix_dgram_socket create_socket_perms;
r_dir_file(lvm_t, proc_t)
allow lvm_t self:file r_file_perms;
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-08-24 8:18 Russell Coker
@ 2004-08-24 12:23 ` Stephen Smalley
2004-08-24 16:54 ` Russell Coker
2004-08-27 20:58 ` James Carter
1 sibling, 1 reply; 27+ messages in thread
From: Stephen Smalley @ 2004-08-24 12:23 UTC (permalink / raw)
To: Russell Coker; +Cc: SE Linux, Daniel J Walsh
On Tue, 2004-08-24 at 04:18, Russell Coker wrote:
> diff1 removes some unnecessary dontaudit lines from syslogd.te, if there is to
> be one single domain accessing devpts_t:chr_file then syslogd_t is not it,
> and if a log file gets type unlabeled_t then it's something we want audited.
Both rules were added by Dan, so please coordinate such changes with
him. The dontaudit rules for devpts_t:chr_file are for the targeted
policy, which has no derived types for ptys or ttys; daemon restart will
trigger such denials. I think that the dontaudit rule for unlabeled_t
is for the kernel bug that is leaking descriptors to the rootfs to init
and its descendants. However, SELinux should be closing those
descriptors and re-opening them to the null device anyway.
--
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
2004-08-24 12:23 ` Stephen Smalley
@ 2004-08-24 16:54 ` Russell Coker
0 siblings, 0 replies; 27+ messages in thread
From: Russell Coker @ 2004-08-24 16:54 UTC (permalink / raw)
To: Stephen Smalley; +Cc: SE Linux, Daniel J Walsh
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
On Tue, 24 Aug 2004 22:23, Stephen Smalley <sds@epoch.ncsc.mil> wrote:
> On Tue, 2004-08-24 at 04:18, Russell Coker wrote:
> > diff1 removes some unnecessary dontaudit lines from syslogd.te, if there
> > is to be one single domain accessing devpts_t:chr_file then syslogd_t is
> > not it, and if a log file gets type unlabeled_t then it's something we
> > want audited.
>
> Both rules were added by Dan, so please coordinate such changes with
> him. The dontaudit rules for devpts_t:chr_file are for the targeted
> policy, which has no derived types for ptys or ttys; daemon restart will
In that case we should modify the daemon_core_rules() macro to solve it
properly. I've attached a patch which should fix this.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 411 bytes --]
--- /usr/src/se/policy/macros/global_macros.te 2004-08-24 16:01:30.000000000 +1000
+++ macros/global_macros.te 2004-08-25 02:52:43.000000000 +1000
@@ -292,6 +292,9 @@
ifdef(`automount.te', `
allow $1_t autofs_t:dir { search getattr };
')dnl end if automount.te
+ifdef(`targeted_policy', `
+dontaudit $1_t devpts_t:chr_file { read write };
+')dnl end if targeted_policy
')dnl end macro daemon_core_rules
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
2004-08-24 8:18 Russell Coker
2004-08-24 12:23 ` Stephen Smalley
@ 2004-08-27 20:58 ` James Carter
2004-08-28 13:46 ` Russell Coker
1 sibling, 1 reply; 27+ messages in thread
From: James Carter @ 2004-08-27 20:58 UTC (permalink / raw)
To: russell; +Cc: SELinux
Merged.
Also added:
allow hotplug_t udev_helper_exec_t:lnk_file read;
It seems reasonable and I was seeing a lot of denials, but it might be
possible to use a dontaudit.
On Tue, 2004-08-24 at 04:18, Russell Coker wrote:
> diff1 removes some unnecessary dontaudit lines from syslogd.te, if there is to
> be one single domain accessing devpts_t:chr_file then syslogd_t is not it,
> and if a log file gets type unlabeled_t then it's something we want audited.
>
> httpd_t does not need search access to devpts_t (it is not granted access to
> any device node under /dev/pts). httpd_suexec_t does not need
> net_bind_service (all it does it call setuid() and execute a script), it's
> access attempts of /var/run are the usual nscd stuff that gets a dontaudit
> rule.
>
> It seems that only Red Hat has bootloader_t needing access to
> modules_object_t:lnk_file.
>
> cpucontrol_t sometimes needs getattr access to a sym-link in /dev, no harm in
> granting it.
>
> There should never be a printer_device_t:fifo_file object, there is no
> file_contexts entry assigning printer_device_t to a fifo_file object, so I
> remove the access to this invalid combination.
>
> dovecot_cert_t is used for SSL certificates. If there are any certificates
> labeled as usr_t then that's a bug in the file_contexts file. I'll change
> the contexts of the files to use bin_t for sub-binaries on Debian as well as
> Red Hat (as well as putting some conditionals into the .fc file).
>
> I changed ftpd.te to have the domain_auto_trans(inetd, part inside
> if(!ftpd_is_daemon).
>
> Change hald.te to work with the latest version in Fedora. I didn't want to
> give it read access to hard disks, but it seems that's he way things are
> going.
>
> Changed hotplug.te to allow it to run arping on Red Hat, and to be a hald
> client (maybe we need a hald_client_domain attribute).
>
> Allows lvm_t to create unix_dgram_socket objects.
--
James Carter <jwcart2@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
2004-08-27 20:58 ` James Carter
@ 2004-08-28 13:46 ` Russell Coker
2004-08-30 20:24 ` James Carter
0 siblings, 1 reply; 27+ messages in thread
From: Russell Coker @ 2004-08-28 13:46 UTC (permalink / raw)
To: jwcart2; +Cc: SELinux
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
On Sat, 28 Aug 2004 06:58, James Carter <jwcart2@epoch.ncsc.mil> wrote:
> Also added:
> allow hotplug_t udev_helper_exec_t:lnk_file read;
> It seems reasonable and I was seeing a lot of denials, but it might be
> possible to use a dontaudit.
I think that a better thing to do is to use "--" on the file_contexts entry
for an executable file and have any sym-links with similar named get bin_t or
sbin_t. The contents of a sym-link are almost never of any relevance to the
security of the system, but adding more rules increases the size of the
policy and the work for all of us. Also as a side-affect specifying the
class of the object to be labelled makes setfiles run faster.
I have attached a patch which adds -- to all types ending in _exec_t. It also
fixes some bugs in the spamassasin policy and adds a couple of other file
contexts things as well.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: fc.diff --]
[-- Type: text/x-diff, Size: 9876 bytes --]
diff -ru /usr/src/se/policy/file_contexts/program/distcc.fc file_contexts/program/distcc.fc
--- /usr/src/se/policy/file_contexts/program/distcc.fc 2004-07-29 06:04:18.000000000 +1000
+++ file_contexts/program/distcc.fc 2004-08-28 23:28:02.000000000 +1000
@@ -1,2 +1,2 @@
# distcc
-/usr/bin/distccd system_u:object_r:distccd_exec_t
+/usr/bin/distccd -- system_u:object_r:distccd_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/dovecot.fc file_contexts/program/dovecot.fc
--- /usr/src/se/policy/file_contexts/program/dovecot.fc 2004-07-13 09:08:03.000000000 +1000
+++ file_contexts/program/dovecot.fc 2004-08-24 18:08:10.000000000 +1000
@@ -1,6 +1,12 @@
# for Dovecot POP and IMAP server
/usr/sbin/dovecot -- system_u:object_r:dovecot_exec_t
+ifdef(`distro_redhat', `
/usr/libexec/dovecot/dovecot-auth -- system_u:object_r:dovecot_auth_exec_t
+')
+ifdef(`distro_debian', `
+/usr/lib/dovecot/dovecot-auth -- system_u:object_r:dovecot_auth_exec_t
+/usr/lib/dovecot/.+ -- system_u:object_r:bin_t
+')
/usr/share/ssl/certs/dovecot.pem -- system_u:object_r:dovecot_cert_t
/usr/share/ssl/private/dovecot.pem -- system_u:object_r:dovecot_cert_t
/var/run/dovecot(-login)?(/.*)? system_u:object_r:dovecot_var_run_t
diff -ru /usr/src/se/policy/file_contexts/program/dpkg.fc file_contexts/program/dpkg.fc
--- /usr/src/se/policy/file_contexts/program/dpkg.fc 2004-08-19 17:10:38.000000000 +1000
+++ file_contexts/program/dpkg.fc 2004-08-28 23:25:01.000000000 +1000
@@ -15,7 +15,7 @@
/usr/sbin/dpkg-preconfigure -- system_u:object_r:dpkg_exec_t
/usr/sbin/install-menu -- system_u:object_r:install_menu_exec_t
/usr/share/applnk(/.*)? system_u:object_r:debian_menu_t
-/usr/share/debconf(/.*)? system_u:object_r:dpkg_exec_t
+/usr/share/debconf/.+ -- system_u:object_r:dpkg_exec_t
/usr/share/debiandoc-sgml/saspconvert -- system_u:object_r:bin_t
/usr/share/lintian/.+ -- system_u:object_r:bin_t
/usr/share/kernel-package/.+ -- system_u:object_r:bin_t
diff -ru /usr/src/se/policy/file_contexts/program/firstboot.fc file_contexts/program/firstboot.fc
--- /usr/src/se/policy/file_contexts/program/firstboot.fc 2004-04-03 21:37:23.000000000 +1000
+++ file_contexts/program/firstboot.fc 2004-08-28 23:25:18.000000000 +1000
@@ -1,4 +1,4 @@
# firstboot
/usr/sbin/firstboot -- system_u:object_r:firstboot_exec_t
/usr/share/firstboot system_u:object_r:firstboot_rw_t
-/usr/share/firstboot/firstboot.py system_u:object_r:firstboot_exec_t
+/usr/share/firstboot/firstboot.py -- system_u:object_r:firstboot_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/initrc.fc file_contexts/program/initrc.fc
--- /usr/src/se/policy/file_contexts/program/initrc.fc 2004-08-28 12:05:09.000000000 +1000
+++ file_contexts/program/initrc.fc 2004-08-28 23:29:40.000000000 +1000
@@ -13,8 +13,12 @@
/var/run/setmixer_flag -- system_u:object_r:initrc_var_run_t
# run_init
/usr/sbin/run_init -- system_u:object_r:run_init_exec_t
+ifdef(`distro_debian', `
/usr/sbin/open_init_pty -- system_u:object_r:initrc_exec_t
+')
/etc/nologin.* -- system_u:object_r:etc_runtime_t
/etc/nohotplug -- system_u:object_r:etc_runtime_t
+ifdef(`distro_redhat', `
/halt -- system_u:object_r:etc_runtime_t
/\.autofsck -- system_u:object_r:etc_runtime_t
+')
diff -ru /usr/src/se/policy/file_contexts/program/jabberd.fc file_contexts/program/jabberd.fc
--- /usr/src/se/policy/file_contexts/program/jabberd.fc 2004-06-17 15:10:43.000000000 +1000
+++ file_contexts/program/jabberd.fc 2004-08-28 23:25:26.000000000 +1000
@@ -1,3 +1,3 @@
# jabberd
-/usr/sbin/jabberd system_u:object_r:jabberd_exec_t
+/usr/sbin/jabberd -- system_u:object_r:jabberd_exec_t
/var/lib/jabber(/.*)? system_u:object_r:jabberd_var_lib_t
diff -ru /usr/src/se/policy/file_contexts/program/kerberos.fc file_contexts/program/kerberos.fc
--- /usr/src/se/policy/file_contexts/program/kerberos.fc 2004-06-24 22:50:07.000000000 +1000
+++ file_contexts/program/kerberos.fc 2004-08-28 23:25:48.000000000 +1000
@@ -1,11 +1,11 @@
# MIT Kerberos krbkdc, kadmind
/etc/krb5\.keytab system_u:object_r:krb5_keytab_t
-/usr(/local)?(/kerberos)?/sbin/krb5kdc system_u:object_r:krb5kdc_exec_t
-/usr(/local)?(/kerberos)?/sbin/kadmind system_u:object_r:kadmind_exec_t
+/usr(/local)?(/kerberos)?/sbin/krb5kdc -- system_u:object_r:krb5kdc_exec_t
+/usr(/local)?(/kerberos)?/sbin/kadmind -- system_u:object_r:kadmind_exec_t
/var/kerberos/krb5kdc(/.*)? system_u:object_r:krb5kdc_conf_t
/usr/local/var/krb5kdc(/.*)? system_u:object_r:krb5kdc_conf_t
/var/kerberos/krb5kdc/principal.* system_u:object_r:krb5kdc_principal_t
/usr/local/var/krb5kdc/principal.* system_u:object_r:krb5kdc_principal_t
/var/log/krb5kdc.log system_u:object_r:krb5kdc_log_t
/var/log/kadmind.log system_u:object_r:kadmind_log_t
-/usr(/local)?/bin/ksu system_u:object_r:su_exec_t
+/usr(/local)?/bin/ksu -- system_u:object_r:su_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/named.fc file_contexts/program/named.fc
--- /usr/src/se/policy/file_contexts/program/named.fc 2004-08-28 12:05:10.000000000 +1000
+++ file_contexts/program/named.fc 2004-08-28 22:53:56.000000000 +1000
@@ -1,8 +1,10 @@
# named
+ifdef(`distro_redhat', `
/var/named(/.*)? system_u:object_r:named_zone_t
/var/named/slaves(/.*)? system_u:object_r:named_cache_t
/var/named/data(/.*)? system_u:object_r:named_cache_t
/etc/named\.conf -- system_u:object_r:named_conf_t
+') dnl end distro_redhat
ifdef(`distro_debian', `
/etc/bind(/.*)? system_u:object_r:named_zone_t
diff -ru /usr/src/se/policy/file_contexts/program/openca-ca.fc file_contexts/program/openca-ca.fc
--- /usr/src/se/policy/file_contexts/program/openca-ca.fc 2004-06-17 15:10:43.000000000 +1000
+++ file_contexts/program/openca-ca.fc 2004-08-28 23:26:09.000000000 +1000
@@ -5,4 +5,4 @@
/var/lib/openca/crypto/keys(/.*)? system_u:object_r:openca_var_lib_keys_t
/usr/share/openca(/.*)? system_u:object_r:openca_usr_share_t
/usr/share/openca/htdocs(/.*)? system_u:object_r:httpd_sys_content_t
-/usr/share/openca/cgi-bin/ca(/.*)? system_u:object_r:openca_ca_exec_t
+/usr/share/openca/cgi-bin/ca/.+ -- system_u:object_r:openca_ca_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/prelink.fc file_contexts/program/prelink.fc
--- /usr/src/se/policy/file_contexts/program/prelink.fc 2004-02-25 17:05:05.000000000 +1100
+++ file_contexts/program/prelink.fc 2004-08-25 21:42:00.000000000 +1000
@@ -1,5 +1,8 @@
# prelink - prelink ELF shared libraries and binaries to speed up startup time
/usr/sbin/prelink -- system_u:object_r:prelink_exec_t
+ifdef(`distro_debian', `
+/usr/sbin/prelink\.bin -- system_u:object_r:prelink_exec_t
+')
/etc/prelink.conf -- system_u:object_r:etc_prelink_t
/var/log/prelink.log -- system_u:object_r:prelink_log_t
/etc/prelink.cache -- system_u:object_r:prelink_cache_t
diff -ru /usr/src/se/policy/file_contexts/program/rssh.fc file_contexts/program/rssh.fc
--- /usr/src/se/policy/file_contexts/program/rssh.fc 2004-08-24 05:46:54.000000000 +1000
+++ file_contexts/program/rssh.fc 2004-08-28 23:28:07.000000000 +1000
@@ -1,2 +1,2 @@
# rssh
-/usr/bin/rssh system_u:object_r:rssh_exec_t
+/usr/bin/rssh -- system_u:object_r:rssh_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/seuser.fc file_contexts/program/seuser.fc
--- /usr/src/se/policy/file_contexts/program/seuser.fc 2003-11-27 05:04:46.000000000 +1100
+++ file_contexts/program/seuser.fc 2004-08-28 23:26:21.000000000 +1000
@@ -1,4 +1,4 @@
# seuser
-/usr/bin/seuser system_u:object_r:seuser_exec_t
+/usr/bin/seuser -- system_u:object_r:seuser_exec_t
/usr/apol/seuser.conf system_u:object_r:seuser_conf_t
diff -ru /usr/src/se/policy/file_contexts/program/spamassassin.fc file_contexts/program/spamassassin.fc
--- /usr/src/se/policy/file_contexts/program/spamassassin.fc 2004-05-05 05:35:53.000000000 +1000
+++ file_contexts/program/spamassassin.fc 2004-08-28 23:27:21.000000000 +1000
@@ -1,3 +1,3 @@
-/usr/bin/spamassassin system_u:object_r:spamassassin_exec_t
-/root/\.spamassassin(/.*)? system_u:object_r:staff_home_spamassassin_t
-/home/[^/]+/\.spamassassin(/.*)? system_u:object_r:user_home_spamassassin_t
+# spamassasin
+/usr/bin/spamassassin -- system_u:object_r:spamassassin_exec_t
+HOME_DIR/\.spamassassin(/.*)? system_u:object_r:ROLE_home_spamassassin_t
diff -ru /usr/src/se/policy/file_contexts/program/spamc.fc file_contexts/program/spamc.fc
--- /usr/src/se/policy/file_contexts/program/spamc.fc 2004-05-05 05:35:53.000000000 +1000
+++ file_contexts/program/spamc.fc 2004-08-28 23:27:27.000000000 +1000
@@ -1 +1 @@
-/usr/bin/spamc system_u:object_r:spamc_exec_t
+/usr/bin/spamc -- system_u:object_r:spamc_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/udev.fc file_contexts/program/udev.fc
--- /usr/src/se/policy/file_contexts/program/udev.fc 2004-08-28 12:05:11.000000000 +1000
+++ file_contexts/program/udev.fc 2004-08-28 23:27:56.000000000 +1000
@@ -3,7 +3,7 @@
/sbin/udev -- system_u:object_r:udev_exec_t
/sbin/udevd -- system_u:object_r:udev_exec_t
/usr/bin/udevinfo -- system_u:object_r:udev_exec_t
-/etc/dev\.d(/.*)? system_u:object_r:udev_helper_exec_t
-/etc/hotplug.d/default/udev.* system_u:object_r:udev_helper_exec_t
+/etc/dev\.d/.+ -- system_u:object_r:udev_helper_exec_t
+/etc/hotplug.d/default/udev.* -- system_u:object_r:udev_helper_exec_t
/dev/udev\.tbl -- system_u:object_r:udev_tbl_t
/dev/\.udev\.tdb -- system_u:object_r:udev_tbl_t
diff -ru /usr/src/se/policy/file_contexts/program/xfs.fc file_contexts/program/xfs.fc
--- /usr/src/se/policy/file_contexts/program/xfs.fc 2004-01-24 12:15:54.000000000 +1100
+++ file_contexts/program/xfs.fc 2004-08-26 00:11:03.000000000 +1000
@@ -1,3 +1,5 @@
# xfs
/tmp/\.font-unix(/.*)? system_u:object_r:xfs_tmp_t
/usr/X11R6/bin/xfs -- system_u:object_r:xfs_exec_t
+/usr/X11R6/bin/xfs-xtt -- system_u:object_r:xfs_exec_t
+/usr/bin/xfstt -- system_u:object_r:xfs_exec_t
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
2004-08-28 13:46 ` Russell Coker
@ 2004-08-30 20:24 ` James Carter
0 siblings, 0 replies; 27+ messages in thread
From: James Carter @ 2004-08-30 20:24 UTC (permalink / raw)
To: russell; +Cc: SELinux
Thanks. Merged.
On Sat, 2004-08-28 at 09:46, Russell Coker wrote:
> On Sat, 28 Aug 2004 06:58, James Carter <jwcart2@epoch.ncsc.mil> wrote:
> > Also added:
> > allow hotplug_t udev_helper_exec_t:lnk_file read;
> > It seems reasonable and I was seeing a lot of denials, but it might be
> > possible to use a dontaudit.
>
> I think that a better thing to do is to use "--" on the file_contexts entry
> for an executable file and have any sym-links with similar named get bin_t or
> sbin_t. The contents of a sym-link are almost never of any relevance to the
> security of the system, but adding more rules increases the size of the
> policy and the work for all of us. Also as a side-affect specifying the
> class of the object to be labelled makes setfiles run faster.
>
> I have attached a patch which adds -- to all types ending in _exec_t. It also
> fixes some bugs in the spamassasin policy and adds a couple of other file
> contexts things as well.
--
James Carter <jwcart2@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2004-07-12 14:12 Russell Coker
2004-07-12 19:46 ` Luke Kenneth Casson Leighton
0 siblings, 1 reply; 27+ messages in thread
From: Russell Coker @ 2004-07-12 14:12 UTC (permalink / raw)
To: SE Linux
[-- Attachment #1: Type: text/plain, Size: 924 bytes --]
We don't have any sym-link under /boot for klogd to read.
Added some use of create_lnk_perms.
Allow load_policy_t to run in system_r for scripts to load policy.
var_log_t:chr_file is wrong. syslogd_t can already write to terminal devices.
More cleaning up device_type stuff.
Fixed a couple of minor bugs in cpucontrol and lvm policy.
allow mdadm_t proc_t:file rw_file_perms;
I believe that the above is bogus. The file can't be opened for write access
on any system I have running regardless of what SE Linux does.
Fixed some mistakes in .fc files.
Made mysql work properly.
A few other small things.
Steve, I believe that this is worthy of CVS inclusion.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 24174 bytes --]
diff -ru /usr/src/se/policy/domains/program/klogd.te ./domains/program/klogd.te
--- /usr/src/se/policy/domains/program/klogd.te 2004-07-08 13:09:33.000000000 +1000
+++ ./domains/program/klogd.te 2004-06-17 03:07:45.000000000 +1000
@@ -43,5 +43,3 @@
# Read /boot/System.map*
allow klogd_t system_map_t:file r_file_perms;
allow klogd_t boot_t:dir r_dir_perms;
-allow klogd_t boot_t:lnk_file { read };
-
diff -ru /usr/src/se/policy/domains/program/ldconfig.te ./domains/program/ldconfig.te
--- /usr/src/se/policy/domains/program/ldconfig.te 2004-05-12 05:10:34.000000000 +1000
+++ ./domains/program/ldconfig.te 2004-07-08 23:42:59.000000000 +1000
@@ -23,7 +23,7 @@
file_type_auto_trans(ldconfig_t, etc_t, ld_so_cache_t, file)
allow ldconfig_t lib_t:dir rw_dir_perms;
-allow ldconfig_t lib_t:lnk_file create_file_perms;
+allow ldconfig_t lib_t:lnk_file create_lnk_perms;
allow ldconfig_t userdomain:fd use;
allow ldconfig_t etc_t:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/load_policy.te ./domains/program/load_policy.te
--- /usr/src/se/policy/domains/program/load_policy.te 2004-06-17 15:10:38.000000000 +1000
+++ ./domains/program/load_policy.te 2004-07-04 18:19:12.000000000 +1000
@@ -11,6 +11,7 @@
type load_policy_t, domain;
role sysadm_r types load_policy_t;
+role system_r types load_policy_t;
type load_policy_exec_t, file_type, exec_type, sysadmfile;
diff -ru /usr/src/se/policy/domains/program/modutil.te ./domains/program/modutil.te
--- /usr/src/se/policy/domains/program/modutil.te 2004-05-12 05:10:34.000000000 +1000
+++ ./domains/program/modutil.te 2004-07-04 23:42:54.000000000 +1000
@@ -81,6 +81,9 @@
in_user_role(insmod_t)
uses_shlib(insmod_t)
read_locale(insmod_t)
+
+# for SSP
+allow insmod_t urandom_device_t:chr_file read;
allow insmod_t lib_t:file { getattr read };
allow insmod_t { bin_t sbin_t }:dir search;
diff -ru /usr/src/se/policy/domains/program/netutils.te ./domains/program/netutils.te
--- /usr/src/se/policy/domains/program/netutils.te 2004-06-18 10:47:55.000000000 +1000
+++ ./domains/program/netutils.te 2004-07-04 23:43:46.000000000 +1000
@@ -55,3 +55,6 @@
allow netutils_t { initrc_devpts_t admin_tty_type }:chr_file rw_file_perms;
ifdef(`gnome-pty-helper.te', `allow netutils_t sysadm_gph_t:fd use;')
allow netutils_t proc_t:dir { search };
+
+# for nscd
+dontaudit netutils_t var_t:dir search;
diff -ru /usr/src/se/policy/domains/program/syslogd.te ./domains/program/syslogd.te
--- /usr/src/se/policy/domains/program/syslogd.te 2004-07-08 13:09:33.000000000 +1000
+++ ./domains/program/syslogd.te 2004-07-08 21:30:48.000000000 +1000
@@ -39,10 +39,6 @@
# Modify/create log files.
create_append_log_file(syslogd_t, var_log_t)
-#
-# This allows someone to set the context of a terminal for syslog output
-#
-allow syslogd_t var_log_t:chr_file { append };
# Create and bind to /dev/log or /var/run/log.
file_type_auto_trans(syslogd_t, { device_t var_run_t }, devlog_t, sock_file)
diff -ru /usr/src/se/policy/domains/program/tmpreaper.te ./domains/program/tmpreaper.te
--- /usr/src/se/policy/domains/program/tmpreaper.te 2004-04-07 13:32:14.000000000 +1000
+++ ./domains/program/tmpreaper.te 2004-07-08 23:42:30.000000000 +1000
@@ -17,7 +17,7 @@
uses_shlib(tmpreaper_t)
# why does it need setattr?
allow tmpreaper_t tmpfile:dir { setattr rw_dir_perms rmdir };
-allow tmpreaper_t tmpfile:file_class_set { getattr unlink };
+allow tmpreaper_t tmpfile:notdevfile_class_set { getattr unlink };
allow tmpreaper_t { home_type file_t }:notdevfile_class_set { getattr unlink };
allow tmpreaper_t self:process { fork sigchld };
allow tmpreaper_t self:capability { dac_override dac_read_search fowner };
diff -ru /usr/src/se/policy/domains/program/unused/apmd.te ./domains/program/unused/apmd.te
--- /usr/src/se/policy/domains/program/unused/apmd.te 2004-06-17 15:10:39.000000000 +1000
+++ ./domains/program/unused/apmd.te 2004-07-05 00:02:14.000000000 +1000
@@ -75,7 +75,7 @@
dontaudit apmd_t { file_type fs_type }:dir_file_class_set getattr;
dontaudit apmd_t home_type:dir { search getattr };
dontaudit apmd_t domain:key_socket getattr;
-
+dontaudit apmd_t domain:dir search;
ifdef(`rpm.te', `
can_exec(apmd_t, apmd_var_run_t)
diff -ru /usr/src/se/policy/domains/program/unused/backup.te ./domains/program/unused/backup.te
--- /usr/src/se/policy/domains/program/unused/backup.te 2004-03-18 15:36:08.000000000 +1100
+++ ./domains/program/unused/backup.te 2004-07-05 00:02:53.000000000 +1000
@@ -30,7 +30,9 @@
allow backup_t { file_type fs_type }:dir r_dir_perms;
allow backup_t file_type:{ file lnk_file } r_file_perms;
-allow backup_t file_type:{ sock_file fifo_file chr_file blk_file } getattr;
+allow backup_t file_type:{ sock_file fifo_file } getattr;
+allow backup_t { device_t device_type ttyfile }:chr_file getattr;
+allow backup_t { device_t device_type }:blk_file getattr;
allow backup_t var_t:file create_file_perms;
allow backup_t proc_t:dir r_dir_perms;
diff -ru /usr/src/se/policy/domains/program/unused/bootloader.te ./domains/program/unused/bootloader.te
--- /usr/src/se/policy/domains/program/unused/bootloader.te 2004-06-30 13:03:13.000000000 +1000
+++ ./domains/program/unused/bootloader.te 2004-07-05 00:10:20.000000000 +1000
@@ -28,7 +28,7 @@
domain_auto_trans(sysadm_t, bootloader_exec_t, bootloader_t)
allow bootloader_t { initrc_t privfd }:fd use;
-tmp_domain(bootloader)
+tmp_domain(bootloader, `, device_type')
allow bootloader_t bootloader_tmp_t:devfile_class_set create_file_perms;
read_locale(bootloader_t)
@@ -78,7 +78,8 @@
dontaudit bootloader_t { staff_home_dir_t sysadm_home_dir_t }:dir search;
allow bootloader_t boot_t:dir { create rw_dir_perms };
-allow bootloader_t boot_t:{ file lnk_file } create_file_perms;
+allow bootloader_t boot_t:file create_file_perms;
+allow bootloader_t boot_t:lnk_file create_lnk_perms;
allow bootloader_t load_policy_exec_t:file { getattr read };
@@ -91,7 +92,8 @@
# new file system defaults to file_t, granting file_t access is still bad.
allow bootloader_t file_t:dir create_dir_perms;
-allow bootloader_t file_t:{ file lnk_file blk_file chr_file } create_file_perms;
+allow bootloader_t file_t:{ file blk_file chr_file } create_file_perms;
+allow bootloader_t file_t:lnk_file create_lnk_perms;
allow bootloader_t self:unix_stream_socket create_socket_perms;
allow bootloader_t boot_runtime_t:file { read getattr unlink };
@@ -102,7 +104,8 @@
allow bootloader_t self:capability { fsetid sys_rawio sys_admin mknod chown };
# allow bootloader to get attributes of any device node
-allow bootloader_t file_type:dir_file_class_set getattr;
+allow bootloader_t { device_type ttyfile }:chr_file getattr;
+allow bootloader_t device_type:blk_file getattr;
dontaudit bootloader_t devpts_t:dir create_dir_perms;
allow bootloader_t self:process { fork signal_perms };
@@ -144,5 +147,5 @@
allow bootloader_t urandom_device_t:chr_file read;
allow bootloader_t { usr_t var_t }:file { getattr read };
r_dir_file(bootloader_t, src_t)
-dontaudit bootloader_t selinux_config_t:dir { search };
-dontaudit bootloader_t sysctl_t:dir { search };
+dontaudit bootloader_t selinux_config_t:dir search;
+dontaudit bootloader_t sysctl_t:dir search;
diff -ru /usr/src/se/policy/domains/program/unused/cardmgr.te ./domains/program/unused/cardmgr.te
--- /usr/src/se/policy/domains/program/unused/cardmgr.te 2004-07-08 13:09:33.000000000 +1000
+++ ./domains/program/unused/cardmgr.te 2004-07-05 00:35:05.000000000 +1000
@@ -35,27 +35,29 @@
allow cardmgr_t self:unix_stream_socket create_socket_perms;
allow cardmgr_t self:fifo_file rw_file_perms;
-file_type_auto_trans(cardmgr_t, { var_run_t device_t }, cardmgr_var_run_t, { blk_file chr_file file })
+file_type_auto_trans(cardmgr_t, { var_run_t device_t }, cardmgr_dev_t, { blk_file chr_file })
# Create stab file and device nodes.
-type cardmgr_var_lib_t, file_type, sysadmfile;
-file_type_auto_trans(cardmgr_t, var_lib_t, cardmgr_var_lib_t, { blk_file chr_file file })
+file_type_auto_trans(cardmgr_t, var_lib_t, cardmgr_dev_t, { blk_file chr_file })
+var_lib_domain(cardmgr)
# for /var/lib/misc/pcmcia-scheme
# would be better to have it in a different type if I knew how it was created..
allow cardmgr_t var_lib_t:file { getattr read };
# Create device files in /tmp.
-type cardmgr_dev_t, file_type, sysadmfile, tmpfile;
-allow cardmgr_t tmp_t:dir { search };
+type cardmgr_dev_t, file_type, sysadmfile, tmpfile, device_type;
type_transition cardmgr_t tmp_t:chr_file cardmgr_dev_t;
allow cardmgr_t cardmgr_dev_t:chr_file create_file_perms;
+ifdef(`tmpreaper.te', `
+allow tmpreaper_t cardmgr_dev_t:chr_file { getattr unlink };
+')
# Create symbolic links in /dev.
type cardmgr_lnk_t, file_type, sysadmfile;
type_transition cardmgr_t device_t:lnk_file cardmgr_lnk_t;
allow cardmgr_t device_t:dir rw_dir_perms;
-allow cardmgr_t cardmgr_lnk_t:lnk_file create_file_perms;
+allow cardmgr_t cardmgr_lnk_t:lnk_file create_lnk_perms;
# Run a shell, normal commands, /etc/pcmcia scripts.
can_exec_any(cardmgr_t)
@@ -83,6 +85,6 @@
')
ifdef(`hide_broken_symptoms', `', `
-dontaudit insmod_t cardmgr_var_run_t:chr_file { read write };
-dontaudit ifconfig_t cardmgr_var_run_t:chr_file { read write };
+dontaudit insmod_t cardmgr_dev_t:chr_file { read write };
+dontaudit ifconfig_t cardmgr_dev_t:chr_file { read write };
')
diff -ru /usr/src/se/policy/domains/program/unused/cpucontrol.te ./domains/program/unused/cpucontrol.te
--- /usr/src/se/policy/domains/program/unused/cpucontrol.te 2003-10-02 23:40:03.000000000 +1000
+++ ./domains/program/unused/cpucontrol.te 2004-07-11 17:25:01.000000000 +1000
@@ -9,6 +9,7 @@
# Access cpu devices.
allow cpucontrol_t cpu_device_t:chr_file rw_file_perms;
+allow initrc_t cpu_device_t:chr_file getattr;
allow cpucontrol_t self:capability sys_rawio;
diff -ru /usr/src/se/policy/domains/program/unused/dpkg.te ./domains/program/unused/dpkg.te
--- /usr/src/se/policy/domains/program/unused/dpkg.te 2004-06-17 15:10:39.000000000 +1000
+++ ./domains/program/unused/dpkg.te 2004-07-11 19:27:39.000000000 +1000
@@ -155,6 +155,9 @@
domain_auto_trans(dpkg_t, groupadd_exec_t, groupadd_t)
role system_r types { useradd_t groupadd_t };
')
+ifdef(`passwd.te', `
+domain_auto_trans(dpkg_t, chfn_exec_t, chfn_t)
+')
ifdef(`ldconfig.te', `
domain_auto_trans(dpkg_t, ldconfig_exec_t, ldconfig_t)
')
@@ -285,10 +288,11 @@
# read/write/create any files in the system
allow dpkg_t sysadmfile:dir create_dir_perms;
-allow dpkg_t sysadmfile:{ file lnk_file fifo_file sock_file } create_file_perms;
-allow dpkg_t file_type:{ chr_file blk_file } getattr;
+allow dpkg_t sysadmfile:{ file fifo_file sock_file } create_file_perms;
+allow dpkg_t sysadmfile:lnk_file create_lnk_perms;
+allow dpkg_t device_type:{ chr_file blk_file } getattr;
ifdef(`devfsd.te', `', `
-allow dpkg_t file_type:{ chr_file blk_file } { create setattr rename };
+allow dpkg_t device_type:{ chr_file blk_file } { create setattr rename };
')
dontaudit dpkg_t domain:{ socket unix_dgram_socket udp_socket unix_stream_socket tcp_socket fifo_file rawip_socket packet_socket } getattr;
allow dpkg_t proc_kmsg_t:file getattr;
@@ -308,7 +312,7 @@
rw_dir_create_file(apt_t, lib_t)
# for apt-listbugs
-allow apt_t usr_t:file { getattr read };
+allow apt_t usr_t:file { getattr read ioctl };
allow apt_t usr_t:lnk_file read;
# allow /var/cache/apt/archives to be owned by non-root
@@ -359,8 +363,7 @@
r_dir_file(userdomain, debian_menu_t)
dontaudit install_menu_t sysadm_home_dir_t:dir search;
-allow install_menu_t debian_menu_t:dir create_dir_perms;
-allow install_menu_t debian_menu_t:{ file lnk_file } create_file_perms;
+create_dir_file(install_menu_t, debian_menu_t)
allow install_menu_t dpkg_lock_t:file { setattr rw_file_perms };
allow install_menu_t self:process signal;
allow install_menu_t proc_t:dir search;
diff -ru /usr/src/se/policy/domains/program/unused/lvm.te ./domains/program/unused/lvm.te
--- /usr/src/se/policy/domains/program/unused/lvm.te 2004-07-08 13:09:34.000000000 +1000
+++ ./domains/program/unused/lvm.te 2004-07-11 17:21:36.000000000 +1000
@@ -52,7 +52,7 @@
# LVM(2) needs to create directores (/dev/mapper, /dev/<vg>)
# and links from /dev/<vg> to /dev/mapper/<vg>-<lv>
allow lvm_t device_t:dir create_dir_perms;
-allow lvm_t device_t:lnk_file create_file_perms;
+allow lvm_t device_t:lnk_file create_lnk_perms;
# /lib/lvm-<version> holds the actual LVM binaries (and symlinks)
allow lvm_t lvm_exec_t:dir search;
@@ -104,7 +104,7 @@
dontaudit lvm_t initctl_t:fifo_file getattr;
dontaudit lvm_t sbin_t:file getattr;
allow lvm_t lvm_control_t:chr_file rw_file_perms;
-allow initrc_t lvm_control_t:chr_file unlink;
+allow initrc_t lvm_control_t:chr_file { getattr unlink };
allow initrc_t device_t:chr_file create;
dontaudit lvm_t var_run_t:dir getattr;
diff -ru /usr/src/se/policy/domains/program/unused/mdadm.te ./domains/program/unused/mdadm.te
--- /usr/src/se/policy/domains/program/unused/mdadm.te 2004-06-18 10:47:56.000000000 +1000
+++ ./domains/program/unused/mdadm.te 2004-07-06 08:29:36.000000000 +1000
@@ -11,8 +11,6 @@
allow mdadm_t sysctl_kernel_t:file r_file_perms;
allow mdadm_t sysctl_kernel_t:dir r_dir_perms;
r_dir_file(mdadm_t, sysfs_t)
-# Allow writes to /proc/mdstat - TODO: specific type for that file
-allow mdadm_t proc_t:file rw_file_perms;
# Configuration
allow mdadm_t { etc_t etc_runtime_t }:file { getattr read };
diff -ru /usr/src/se/policy/domains/program/unused/mysqld.te ./domains/program/unused/mysqld.te
--- /usr/src/se/policy/domains/program/unused/mysqld.te 2004-04-03 21:37:22.000000000 +1000
+++ ./domains/program/unused/mysqld.te 2004-07-05 22:52:04.000000000 +1000
@@ -12,6 +12,9 @@
#
daemon_domain(mysqld)
+type mysqld_port_t, port_type;
+allow mysqld_t mysqld_port_t:tcp_socket name_bind;
+
allow mysqld_t mysqld_var_run_t:sock_file create_file_perms;
etcdir_domain(mysqld)
@@ -65,3 +68,14 @@
can_unix_connect(logrotate_t, mysqld_t)
')
+ifdef(`user_db_connect', `
+allow userdomain mysqld_var_run_t:dir search;
+allow userdomain mysqld_var_run_t:sock_file write;
+')
+
+ifdef(`rpm.te', `
+allow initrc_t mysqld_db_t:dir create_dir_perms;
+
+# because Fedora has the sock_file in the database directory
+file_type_auto_trans(mysqld_t, mysqld_db_t, mysqld_var_run_t, sock_file)
+')
diff -ru /usr/src/se/policy/file_contexts/program/bootloader.fc ./file_contexts/program/bootloader.fc
--- /usr/src/se/policy/file_contexts/program/bootloader.fc 2004-03-18 15:36:09.000000000 +1100
+++ ./file_contexts/program/bootloader.fc 2004-07-07 21:11:42.000000000 +1000
@@ -9,4 +9,4 @@
/etc/mkinitrd/scripts/.* -- system_u:object_r:bootloader_exec_t
/sbin/ybin.* -- system_u:object_r:bootloader_exec_t
/etc/yaboot\.conf.* -- system_u:object_r:bootloader_etc_t
-/boot/grub/.* -- system_u:object_r:boot_runtime_t
+/boot/grub/menu.lst -- system_u:object_r:boot_runtime_t
diff -ru /usr/src/se/policy/file_contexts/program/courier.fc ./file_contexts/program/courier.fc
--- /usr/src/se/policy/file_contexts/program/courier.fc 2004-03-18 15:36:09.000000000 +1100
+++ ./file_contexts/program/courier.fc 2004-07-05 23:05:08.000000000 +1000
@@ -13,5 +13,5 @@
/usr/sbin/courierlogger -- system_u:object_r:courier_exec_t
/usr/sbin/courierldapaliasd -- system_u:object_r:courier_exec_t
/usr/sbin/couriertcpd -- system_u:object_r:courier_tcpd_exec_t
-/var/run/courier(.*)? system_u:object_r:courier_var_run_t
+/var/run/courier(/.*)? system_u:object_r:courier_var_run_t
/etc/courier(/.*)? system_u:object_r:courier_etc_t
diff -ru /usr/src/se/policy/file_contexts/program/cyrus.fc ./file_contexts/program/cyrus.fc
--- /usr/src/se/policy/file_contexts/program/cyrus.fc 2004-06-17 15:10:42.000000000 +1000
+++ ./file_contexts/program/cyrus.fc 2004-07-05 23:06:05.000000000 +1000
@@ -1,4 +1,4 @@
# cyrus
/var/lib/imap(/.*)? system_u:object_r:cyrus_var_lib_t
-/usr/lib(64)?/cyrus-imapd/(.*)? -- system_u:object_r:bin_t
+/usr/lib(64)?/cyrus-imapd/.* -- system_u:object_r:bin_t
/usr/lib(64)?/cyrus-imapd/cyrus-master -- system_u:object_r:cyrus_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/dovecot.fc ./file_contexts/program/dovecot.fc
--- /usr/src/se/policy/file_contexts/program/dovecot.fc 2004-04-06 03:48:16.000000000 +1000
+++ ./file_contexts/program/dovecot.fc 2004-07-05 22:45:46.000000000 +1000
@@ -4,3 +4,4 @@
/usr/share/ssl/certs/dovecot.pem -- system_u:object_r:dovecot_cert_t
/usr/share/ssl/private/dovecot.pem -- system_u:object_r:dovecot_cert_t
/var/run/dovecot(-login)?(/.*)? system_u:object_r:dovecot_var_run_t
+/usr/lib/dovecot/.+ -- system_u:object_r:bin_t
diff -ru /usr/src/se/policy/file_contexts/program/dpkg.fc ./file_contexts/program/dpkg.fc
--- /usr/src/se/policy/file_contexts/program/dpkg.fc 2004-06-17 15:10:42.000000000 +1000
+++ ./file_contexts/program/dpkg.fc 2004-07-08 13:50:06.000000000 +1000
@@ -39,10 +39,12 @@
/usr/share/dlint/digparse -- system_u:object_r:bin_t
/usr/share/gimp/1.2/user_install -- system_u:object_r:bin_t
/usr/share/openoffice.org-debian-files/install-hook -- system_u:object_r:bin_t
-/var/lib/defoma(/.*)? system_u:object_r:readable_t
+/var/lib/defoma(/.*)? system_u:object_r:fonts_t
/usr/lib(64)?/doc-rfc/register-doc-rfc-docs -- system_u:object_r:bin_t
/usr/share/intltool-debian/.* -- system_u:object_r:bin_t
/usr/share/po-debconf/intltool-merge -- system_u:object_r:bin_t
/usr/share/linuxdoc-tools/sgmlswhich -- system_u:object_r:bin_t
/usr/share/shorewall/.* -- system_u:object_r:bin_t
/usr/share/reportbug/.* -- system_u:object_r:bin_t
+/etc/network/ifstate.* -- system_u:object_r:etc_runtime_t
+/usr/lib/gconf2/gconfd-2 -- system_u:object_r:bin_t
diff -ru /usr/src/se/policy/file_contexts/program/lrrd.fc ./file_contexts/program/lrrd.fc
--- /usr/src/se/policy/file_contexts/program/lrrd.fc 2004-06-17 15:10:43.000000000 +1000
+++ ./file_contexts/program/lrrd.fc 2004-07-05 23:07:55.000000000 +1000
@@ -6,5 +6,5 @@
/var/run/lrrd(/.*)? system_u:object_r:lrrd_var_run_t
/var/log/lrrd.* -- system_u:object_r:lrrd_log_t
/var/lib/lrrd(/.*)? system_u:object_r:lrrd_var_lib_t
-/var/www/lrrd(.*)? system_u:object_r:lrrd_var_lib_t
+/var/www/lrrd(/.*)? system_u:object_r:lrrd_var_lib_t
/etc/lrrd(/.*)? system_u:object_r:lrrd_etc_t
diff -ru /usr/src/se/policy/file_contexts/program/lvm.fc ./file_contexts/program/lvm.fc
--- /usr/src/se/policy/file_contexts/program/lvm.fc 2004-05-12 05:10:48.000000000 +1000
+++ ./file_contexts/program/lvm.fc 2004-07-07 22:20:31.000000000 +1000
@@ -14,9 +14,8 @@
/dev/lvm -c system_u:object_r:fixed_disk_device_t
/dev/mapper/.* -b system_u:object_r:fixed_disk_device_t
/dev/mapper/control -c system_u:object_r:lvm_control_t
-/lib(64)?/lvm-10(/.*) system_u:object_r:lvm_exec_t
-/lib(64)?/lvm-200(/.*) system_u:object_r:lvm_exec_t
-/lib(64)?/lvm-default system_u:object_r:bin_t
+/lib/lvm-10(/.*) -- system_u:object_r:lvm_exec_t
+/lib/lvm-200(/.*) -- system_u:object_r:lvm_exec_t
/sbin/e2fsadm -- system_u:object_r:lvm_exec_t
/sbin/lvchange -- system_u:object_r:lvm_exec_t
/sbin/lvcreate -- system_u:object_r:lvm_exec_t
@@ -55,10 +54,12 @@
/sbin/vgscan.static -- system_u:object_r:lvm_exec_t
/sbin/vgsplit -- system_u:object_r:lvm_exec_t
/sbin/vgwrapper -- system_u:object_r:lvm_exec_t
+/usr/bin/cryptsetup -- system_u:object_r:lvm_exec_t
/sbin/dmsetup -- system_u:object_r:lvm_exec_t
/sbin/dmsetup.static -- system_u:object_r:lvm_exec_t
/sbin/lvm -- system_u:object_r:lvm_exec_t
/sbin/lvm.static -- system_u:object_r:lvm_exec_t
+/usr/sbin/lvm -- system_u:object_r:lvm_exec_t
/sbin/lvresize -- system_u:object_r:lvm_exec_t
/sbin/lvs -- system_u:object_r:lvm_exec_t
/sbin/pvremove -- system_u:object_r:lvm_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/mozilla.fc ./file_contexts/program/mozilla.fc
--- /usr/src/se/policy/file_contexts/program/mozilla.fc 2004-06-17 15:10:43.000000000 +1000
+++ ./file_contexts/program/mozilla.fc 2004-07-05 23:11:37.000000000 +1000
@@ -2,6 +2,8 @@
HOME_DIR/\.netscape(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.mozilla(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.phoenix(/.*)? system_u:object_r:ROLE_mozilla_rw_t
+HOME_DIR/\.gconfd(/.*)? system_u:object_r:ROLE_mozilla_rw_t
+HOME_DIR/\.gconf(/.*)? system_u:object_r:ROLE_mozilla_rw_t
HOME_DIR/\.gnome2/epiphany(/.*)? system_u:object_r:ROLE_mozilla_rw_t
/usr/bin/netscape -- system_u:object_r:mozilla_exec_t
/usr/bin/mozilla -- system_u:object_r:mozilla_exec_t
diff -ru /usr/src/se/policy/file_contexts/program/mysqld.fc ./file_contexts/program/mysqld.fc
--- /usr/src/se/policy/file_contexts/program/mysqld.fc 2004-06-17 15:10:43.000000000 +1000
+++ ./file_contexts/program/mysqld.fc 2004-07-05 23:12:05.000000000 +1000
@@ -1,7 +1,9 @@
# mysql database server
/usr/sbin/mysqld -- system_u:object_r:mysqld_exec_t
+/usr/libexec/mysqld -- system_u:object_r:mysqld_exec_t
/var/run/mysqld(/.*)? system_u:object_r:mysqld_var_run_t
/var/log/mysql.* -- system_u:object_r:mysqld_log_t
/var/lib/mysql(/.*)? system_u:object_r:mysqld_db_t
+/var/lib/mysql/mysql.sock -s system_u:object_r:mysqld_var_run_t
/etc/my\.cnf -- system_u:object_r:mysqld_etc_t
/etc/mysql(/.*)? system_u:object_r:mysqld_etc_t
diff -ru /usr/src/se/policy/file_contexts/program/postfix.fc ./file_contexts/program/postfix.fc
--- /usr/src/se/policy/file_contexts/program/postfix.fc 2004-06-18 10:47:58.000000000 +1000
+++ ./file_contexts/program/postfix.fc 2004-07-05 23:12:53.000000000 +1000
@@ -30,6 +30,7 @@
/var/spool/postfix/active(/.*)? system_u:object_r:postfix_spool_t
/var/spool/postfix/hold(/.*)? system_u:object_r:postfix_spool_t
/var/spool/postfix/incoming(/.*)? system_u:object_r:postfix_spool_t
+/var/spool/postfix/corrupt(/.*)? system_u:object_r:postfix_spool_t
/var/spool/postfix/maildrop(/.*)? system_u:object_r:postfix_spool_maildrop_t
/var/spool/postfix/pid -d system_u:object_r:var_run_t
/var/spool/postfix/pid/.* system_u:object_r:postfix_var_run_t
diff -ru /usr/src/se/policy/file_contexts/program/pppd.fc ./file_contexts/program/pppd.fc
--- /usr/src/se/policy/file_contexts/program/pppd.fc 2004-06-17 15:10:43.000000000 +1000
+++ ./file_contexts/program/pppd.fc 2004-07-05 23:13:17.000000000 +1000
@@ -10,6 +10,7 @@
/etc/ppp/.*secrets -- system_u:object_r:pppd_secret_t
/var/run/(i)?ppp.*pid -- system_u:object_r:pppd_var_run_t
/var/log/ppp-connect-errors.* -- system_u:object_r:pppd_log_t
+/var/log/ppp(/.*)? -- system_u:object_r:pppd_log_t
/etc/ppp/ip-down.* -- system_u:object_r:bin_t
/etc/ppp/ip-up.* -- system_u:object_r:bin_t
/etc/ppp/ipv6-up -- system_u:object_r:bin_t
diff -ru /usr/src/se/policy/file_contexts/program/udev.fc ./file_contexts/program/udev.fc
--- /usr/src/se/policy/file_contexts/program/udev.fc 2004-05-12 05:10:51.000000000 +1000
+++ ./file_contexts/program/udev.fc 2004-07-05 23:14:35.000000000 +1000
@@ -4,3 +4,4 @@
/sbin/udevd -- system_u:object_r:udev_exec_t
/etc/dev.d(/.*)? system_u:object_r:udev_helper_exec_t
/etc/hotplug.d/default/udev.* system_u:object_r:udev_helper_exec_t
+/dev/udev.tbl -- system_u:object_r:udev_tbl_t
diff -ru /usr/src/se/policy/file_contexts/types.fc ./file_contexts/types.fc
--- /usr/src/se/policy/file_contexts/types.fc 2004-06-30 13:03:16.000000000 +1000
+++ ./file_contexts/types.fc 2004-07-08 21:20:32.000000000 +1000
@@ -227,6 +227,8 @@
#
/etc(/.*)? system_u:object_r:etc_t
/etc/\.pwd\.lock -- system_u:object_r:shadow_t
+/etc/passwd\.lock -- system_u:object_r:shadow_t
+/etc/group\.lock -- system_u:object_r:shadow_t
/etc/shadow.* -- system_u:object_r:shadow_t
/etc/gshadow.* -- system_u:object_r:shadow_t
/etc/blkid.tab -- system_u:object_r:etc_runtime_t
@@ -267,7 +269,6 @@
/lib(64)?/tls/ld[^/]*\.so(\.[^/]*)* -- system_u:object_r:ld_so_t
/lib(64)?/lib[^/]*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
/lib(64)?/[^/]*/lib[^/]*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
-/lib(64)?/devfsd/[^/]*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
/lib(64)?/security/[^/]*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
/lib(64)?/tls/i686/cmov/[^/]*\.so(\.[^/]*)* -- system_u:object_r:shlib_t
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-07-12 14:12 Russell Coker
@ 2004-07-12 19:46 ` Luke Kenneth Casson Leighton
0 siblings, 0 replies; 27+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-07-12 19:46 UTC (permalink / raw)
To: Russell Coker; +Cc: SE Linux
On Tue, Jul 13, 2004 at 12:12:43AM +1000, Russell Coker wrote:
> Made mysql work properly.
great!
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2004-07-11 7:59 Russell Coker
2004-07-12 13:30 ` Stephen Smalley
0 siblings, 1 reply; 27+ messages in thread
From: Russell Coker @ 2004-07-11 7:59 UTC (permalink / raw)
To: SE Linux
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)
I remove the above from domains/admin.te because it's granted to privhome by
macros/user_macros.te and sysadm_t has the privhome attribute.
checkpolicy_t should not be creating lnk_file, sock_file, or fifo_file objects
of type policy_config_t, and if there are sock_file or fifo_file objects of
type policy_src_t then it should not be reading them.
system_crond_t should not be trying to access device nodes of types that are
for files.
I still don't think that dmesg_t is appropriate for running dmesg from the
administrator shell.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 2754 bytes --]
diff -ru /usr/src/se/policy/domains/admin.te ./domains/admin.te
--- /usr/src/se/policy/domains/admin.te 2004-05-30 16:26:57.000000000 +1000
+++ ./domains/admin.te 2004-07-08 19:20:25.000000000 +1000
@@ -31,4 +31,3 @@
# Add/remove user home directories
file_type_auto_trans(sysadm_t, home_root_t, user_home_dir_t, dir)
-file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)
diff -ru /usr/src/se/policy/domains/program/checkpolicy.te ./domains/program/checkpolicy.te
--- /usr/src/se/policy/domains/program/checkpolicy.te 2004-06-03 14:11:05.000000000 +1000
+++ ./domains/program/checkpolicy.te 2004-07-09 11:17:36.000000000 +1000
@@ -23,7 +23,7 @@
# able to create and modify binary policy files
allow checkpolicy_t policy_config_t:dir rw_dir_perms;
-allow checkpolicy_t policy_config_t:notdevfile_class_set create_file_perms;
+allow checkpolicy_t policy_config_t:file create_file_perms;
###########################
# constrain what checkpolicy can use as source files
@@ -31,7 +31,7 @@
# only allow read of policy source files
allow checkpolicy_t policy_src_t:dir r_dir_perms;
-allow checkpolicy_t policy_src_t:notdevfile_class_set r_file_perms;
+allow checkpolicy_t policy_src_t:{ file lnk_file } r_file_perms;
# allow test policies to be created in src directories
file_type_auto_trans(checkpolicy_t, policy_src_t, policy_config_t, file)
diff -ru /usr/src/se/policy/domains/program/crond.te ./domains/program/crond.te
--- /usr/src/se/policy/domains/program/crond.te 2004-07-11 17:37:09.000000000 +1000
+++ ./domains/program/crond.te 2004-07-09 07:17:19.000000000 +1000
@@ -61,7 +61,7 @@
allow crond_t cron_spool_t:file r_file_perms;
# Read /etc/security/default_contexts.
-r_dir_file( crond_t, default_context_t)
+r_dir_file(crond_t, default_context_t)
allow crond_t etc_t:file { getattr read };
allow crond_t etc_t:lnk_file read;
@@ -147,7 +147,8 @@
')
# Stat any file and search any directory for find.
-allow system_crond_t file_type:file_class_set getattr;
+allow system_crond_t file_type:notdevfile_class_set getattr;
+allow system_crond_t device_type:{ chr_file blk_file } getattr;
allow system_crond_t file_type:dir { read search getattr };
# Create temporary files.
diff -ru /usr/src/se/policy/domains/program/dmesg.te ./domains/program/dmesg.te
--- /usr/src/se/policy/domains/program/dmesg.te 2004-06-17 15:10:38.000000000 +1000
+++ ./domains/program/dmesg.te 2004-07-04 18:17:42.000000000 +1000
@@ -9,7 +9,10 @@
#
# dmesg_exec_t is the type of the dmesg executable.
#
-daemon_base_domain(dmesg)
+# while sysadm_t has the sys_admin capability there is no point in using
+# dmesg_t when run from sysadm_t, so we use nosysadm.
+#
+daemon_base_domain(dmesg, , `nosysadm')
#
# Rules used for dmesg
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-07-11 7:59 Russell Coker
@ 2004-07-12 13:30 ` Stephen Smalley
0 siblings, 0 replies; 27+ messages in thread
From: Stephen Smalley @ 2004-07-12 13:30 UTC (permalink / raw)
To: Russell Coker; +Cc: SE Linux
On Sun, 2004-07-11 at 03:59, Russell Coker wrote:
> file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)
>
> I remove the above from domains/admin.te because it's granted to privhome by
> macros/user_macros.te and sysadm_t has the privhome attribute.
>
> checkpolicy_t should not be creating lnk_file, sock_file, or fifo_file objects
> of type policy_config_t, and if there are sock_file or fifo_file objects of
> type policy_src_t then it should not be reading them.
>
> system_crond_t should not be trying to access device nodes of types that are
> for files.
>
> I still don't think that dmesg_t is appropriate for running dmesg from the
> administrator shell.
Thanks, merged.
--
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2004-07-04 5:04 Russell Coker
2004-07-07 20:47 ` Stephen Smalley
0 siblings, 1 reply; 27+ messages in thread
From: Russell Coker @ 2004-07-04 5:04 UTC (permalink / raw)
To: SE Linux
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
The attached patch fixes a problem with LVM on Fedora, some annoying audit
messages from rpm, and has some of the stuff that's needed for Postgresql (NB
it's not enough to make Postgresql fully functional but it's a definite
improvement over what's currently there so it's worth having).
Steve, please put this into Sourceforge.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 2546 bytes --]
diff -ru policy-1.14/domains/program/unused/lvm.te selinux-policy-default-1.14/domains/program/unused/lvm.te
--- policy-1.14/domains/program/unused/lvm.te 2004-06-24 22:48:00.000000000 +1000
+++ selinux-policy-default-1.14/domains/program/unused/lvm.te 2004-07-02 12:59:06.000000000 +1000
@@ -93,6 +93,7 @@
dontaudit lvm_t initctl_t:fifo_file getattr;
dontaudit lvm_t sbin_t:file getattr;
allow lvm_t lvm_control_t:chr_file rw_file_perms;
+allow initrc_t lvm_control_t:chr_file unlink;
dontaudit lvm_t var_run_t:dir getattr;
allow lvm_t tmpfs_t:dir getattr;
diff -ru policy-1.14/domains/program/unused/rpm.te selinux-policy-default-1.14/domains/program/unused/rpm.te
--- policy-1.14/domains/program/unused/rpm.te 2004-06-17 23:33:14.000000000 +1000
+++ selinux-policy-default-1.14/domains/program/unused/rpm.te 2004-07-02 00:50:38.000000000 +1000
@@ -93,6 +93,8 @@
allow rpm_t sysfs_t:filesystem getattr;
allow rpm_t tmpfs_t:filesystem getattr;
dontaudit rpm_t domain:{ socket unix_dgram_socket udp_socket unix_stream_socket tcp_socket fifo_file rawip_socket packet_socket } getattr;
+allow rpm_t fs_type:dir getattr;
+allow rpm_t fs_type:filesystem getattr;
# allow compiling and loading new policy
create_dir_file(rpm_t, { policy_src_t policy_config_t })
diff -ru policy-1.14/file_contexts/program/postgresql.fc selinux-policy-default-1.14/file_contexts/program/postgresql.fc
--- policy-1.14/file_contexts/program/postgresql.fc 2004-06-24 22:48:00.000000000 +1000
+++ selinux-policy-default-1.14/file_contexts/program/postgresql.fc 2004-07-03 00:18:45.000000000 +1000
@@ -1,5 +1,18 @@
# postgresql - ldap server
/usr/lib(64)?/postgresql/bin/.* -- system_u:object_r:postgresql_exec_t
+/usr/bin/postgres -- system_u:object_r:postgresql_exec_t
+/usr/bin/pg_dump -- system_u:object_r:postgresql_exec_t
+/usr/bin/pg_dumpall -- system_u:object_r:postgresql_exec_t
+/usr/bin/pg_resetxlog -- system_u:object_r:postgresql_exec_t
+/etc/rc.d/init.d/postgresql -- system_u:object_r:postgresql_exec_t
+
+# not sure whether the following binaries need labelling
+/usr/bin/createlang -- system_u:object_r:postgresql_exec_t
+/usr/bin/droplang -- system_u:object_r:postgresql_exec_t
+/usr/bin/pg_encoding -- system_u:object_r:postgresql_exec_t
+/usr/bin/pg_id -- system_u:object_r:postgresql_exec_t
+/usr/bin/pg_restore -- system_u:object_r:postgresql_exec_t
+
/var/lib/postgres(/.*)? system_u:object_r:postgresql_db_t
/var/lib/pgsql(/.*)? system_u:object_r:postgresql_db_t
/var/run/postgresql(/.*)? system_u:object_r:postgresql_var_run_t
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: policy patch
2004-07-04 5:04 Russell Coker
@ 2004-07-07 20:47 ` Stephen Smalley
0 siblings, 0 replies; 27+ messages in thread
From: Stephen Smalley @ 2004-07-07 20:47 UTC (permalink / raw)
To: Russell Coker; +Cc: SE Linux
On Sun, 2004-07-04 at 01:04, Russell Coker wrote:
> The attached patch fixes a problem with LVM on Fedora, some annoying audit
> messages from rpm, and has some of the stuff that's needed for Postgresql (NB
> it's not enough to make Postgresql fully functional but it's a definite
> improvement over what's currently there so it's worth having).
>
> Steve, please put this into Sourceforge.
Thanks, merged.
--
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: policy patch
@ 2002-12-03 14:47 Stephen D. Smalley
0 siblings, 0 replies; 27+ messages in thread
From: Stephen D. Smalley @ 2002-12-03 14:47 UTC (permalink / raw)
To: selinux, russell
> I've attached my latest patch. Please read the following before applying.
Thanks, mostly merged.
--
Stephen Smalley, NSA
sds@epoch.ncsc.mil
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 27+ messages in thread
* policy patch
@ 2002-11-29 11:45 Russell Coker
0 siblings, 0 replies; 27+ messages in thread
From: Russell Coker @ 2002-11-29 11:45 UTC (permalink / raw)
To: selinux
[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]
I've attached my latest patch. Please read the following before applying.
Steve, apart from a few exceptions I think it's all good for the CVS.
Adds support for flag defines for domains/misc.
Finishes off the changes for the new fcron policy, and uses the
system_crond_entry() macro more.
Allows automount_t to get the attributes of any fs_type directory because it
appears to need it.
Puts the "allow daemon fs_t:filesystem getattr;" into the daemon_domain macro
and removes it from numerous daemons.
Adds the following for devfsd, not sure if it should be needed in an ideal
situation, but it seems to be needed on some of my systems now for the
initial boot phase.
allow kernel_t device_t:filesystem mount;
Allow lsof as sysadm_t to see stats on ipsec_t:key_socket.
The latest version of mrtg seems to do some spurious ioctls, that we don't
want to audit.
ping_t needs to be able to receive from itself for pinging 127.0.0.1.
Finished the changes to xdm that I started some time ago. Now it's fully
functional again.
Put in some changes to user.te and rbac. They make things a bit easier when
adding multiple user roles (I think). Steve, let me know if you don't like
them and I'll re-arrange them a bit.
Fixed fsadm.fc to correctly label all the fsck/mkfs type programs.
Correctly label all the .tdb files for Samba.
Changes to xdm.fc and xserver.fc. Steve you will want to carefully consider
my changes to /tmp. I have been considering the matter for some time (I made
the change in my tree months ago). The xdm.fc stuff that isn't related to
/tmp is all good and should go in however.
Also made some changes to types.fc, Steve, you may not like the /tmp and
/var/tmp changes.
For the global_macros.te file I added ioctl to rw_dir_perms as previously
discussed. Also I gave all daemons access to devtty_t:chr_file and added a
new macro var_lib_domain().
I made some minor changes to x_client_macros for ssh tunnels and for some
other types of file access.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 32939 bytes --]
diff -ruN /tmp/policy/Makefile policy/Makefile
--- /tmp/policy/Makefile 2002-09-27 22:27:36.000000000 +0200
+++ policy/Makefile 2002-11-08 10:31:17.000000000 +0100
@@ -77,6 +79,7 @@
tmp/program_used_flags.te: $(wildcard domains/program/*.te) domains/program
mkdir -p tmp
( cd domains/program/ ; for n in *.te ; do echo "define(\`$$n')"; done ) > $@
+ ( cd domains/misc/ ; for n in *.te ; do echo "define(\`$$n')"; done ) >> $@
tmp/all_macros.te: macros $(wildcard macros/*.te) tmp/all_program_macros.te
cat $(wildcard macros/*.te) tmp/all_program_macros.te > $@
diff -ruN /tmp/policy/domains/program/acct.te policy/domains/program/acct.te
--- /tmp/policy/domains/program/acct.te 2002-11-29 12:19:33.000000000 +0100
+++ policy/domains/program/acct.te 2002-11-14 23:11:04.000000000 +0100
@@ -10,10 +10,12 @@
# acct_exec_t is the type of the acct executable.
#
daemon_base_domain(acct)
-domain_auto_trans(system_crond_t, acct_exec_t, acct_t)
+ifdef(`crond.te', `
+system_crond_entry(acct_exec_t, acct_t)
# for monthly cron job
file_type_auto_trans(acct_t, var_log_t, wtmp_t)
+')
ifdef(`logrotate.te', `
allow acct_t logrotate_exec_t:file getattr;
diff -ruN /tmp/policy/domains/program/automount.te policy/domains/program/automount.te
--- /tmp/policy/domains/program/automount.te 2002-11-29 12:19:34.000000000 +0100
+++ policy/domains/program/automount.te 2002-11-24 10:16:54.000000000 +0100
@@ -33,6 +33,7 @@
file_type_auto_trans(automount_t, tmp_t, automount_tmp_t)
allow automount_t autofs_t:dir { create_dir_perms ioctl };
+allow automount_t fs_type:dir getattr;
allow autofs_t self:filesystem associate;
domain_auto_trans(automount_t, fsadm_exec_t, fsadm_t)
diff -ruN /tmp/policy/domains/program/crack.te policy/domains/program/crack.te
--- /tmp/policy/domains/program/crack.te 2002-09-27 22:27:37.000000000 +0200
+++ policy/domains/program/crack.te 2002-11-08 10:32:25.000000000 +0100
@@ -9,18 +9,14 @@
# crack_exec_t is the type of the crack executable.
#
system_domain(crack)
-domain_auto_trans(system_crond_t, crack_exec_t, crack_t)
+ifdef(`crond.te', `
+system_crond_entry(crack_exec_t, crack_t)
+')
type crack_db_t, file_type, sysadmfile;
allow crack_t var_t:dir search;
rw_dir_create_file(crack_t, crack_db_t)
-allow crack_t crond_t:fd use;
-allow crack_t crond_t:fifo_file r_file_perms;
-ifdef(`fcron.te', `
-allow crack_t fcron_t:fd use;
-allow crack_t fcron_t:fifo_file r_file_perms;
-')
allow crack_t device_t:dir search;
allow crack_t devtty_t:chr_file rw_file_perms;
allow crack_t self:fifo_file { read write getattr };
diff -ruN /tmp/policy/domains/program/crond.te policy/domains/program/crond.te
--- /tmp/policy/domains/program/crond.te 2002-11-29 12:19:34.000000000 +0100
+++ policy/domains/program/crond.te 2002-11-20 14:24:13.000000000 +0100
@@ -71,8 +71,6 @@
# Run a shell.
can_exec(crond_t, shell_exec_t)
-allow crond_t fs_t:filesystem getattr;
-
ifdef(`rpm.te',
`# Run the rpm program in the rpm_t domain. Allow creation of RPM log files
# via redirection of standard out.
diff -ruN /tmp/policy/domains/program/ddt-client.te policy/domains/program/ddt-client.te
--- /tmp/policy/domains/program/ddt-client.te 2002-08-23 21:04:28.000000000 +0200
+++ policy/domains/program/ddt-client.te 2002-11-20 14:27:02.000000000 +0100
@@ -27,7 +27,6 @@
# Use capabilities
allow ddt_client_t self:capability { setuid setgid dac_override chown };
-allow ddt_client_t fs_t:filesystem getattr;
allow ddt_client_t etc_t:dir search;
allow ddt_client_t etc_t:lnk_file read;
diff -ruN /tmp/policy/domains/program/devfsd.te policy/domains/program/devfsd.te
--- /tmp/policy/domains/program/devfsd.te 2002-10-28 22:55:52.000000000 +0100
+++ policy/domains/program/devfsd.te 2002-11-20 14:24:32.000000000 +0100
@@ -27,6 +27,9 @@
ifdef(`dpkg.te', `
# for the makedev script - this may be a bad idea
domain_auto_trans_read(dpkg_t, devfsd_exec_t, devfsd_t)
+
+# for package upgrade
+allow devfsd_t lib_t:file execute;
')
# mknod capability is for the startup scripts
@@ -49,8 +52,6 @@
# allow all devices to be under device_t
allow file_type device_t:filesystem associate;
-allow devfsd_t fs_t:filesystem getattr;
-
# allow context lookups
allow devfsd_t security_t:security { context_to_sid sid_to_context };
@@ -80,6 +81,8 @@
allow devfsd_t privfd:fd use;
+allow kernel_t device_t:filesystem mount;
+
# for nss-ldap etc
can_network(devfsd_t)
allow devfsd_t self:tcp_socket create_socket_perms;
diff -ruN /tmp/policy/domains/program/dpkg.te policy/domains/program/dpkg.te
--- /tmp/policy/domains/program/dpkg.te 2002-11-29 12:19:34.000000000 +0100
+++ policy/domains/program/dpkg.te 2002-11-19 13:57:32.000000000 +0100
@@ -18,6 +18,10 @@
allow dpkg_t security_t:security load_policy;
can_exec(dpkg_t, { dpkg_exec_t bin_t shell_exec_t tmp_dpkg_t ls_exec_t var_lib_dpkg_t etc_dpkg_t sbin_t })
+ifdef(`rlogind.te', `
+# for ssh
+can_exec(dpkg_t, rlogind_exec_t)
+')
can_exec(dpkg_t, init_exec_t)
file_type_auto_trans(dpkg_t, tmp_t, tmp_dpkg_t)
ifdef(`mta.te', `
@@ -136,8 +140,9 @@
allow { apt_t install_menu_t userdomain } etc_dpkg_t:file r_file_perms;
can_exec(sysadm_t, etc_dpkg_t)
-# Inherit and use descriptors from any domain.
+# Inherit and use descriptors from open_init_pty
allow { apt_t dpkg_t install_menu_t } initrc_t:fd use;
+dontaudit dpkg_t privfd:fd use;
allow { apt_t dpkg_t install_menu_t } devpts_t:dir search;
allow { apt_t dpkg_t install_menu_t } initrc_devpts_t:chr_file rw_file_perms;
diff -ruN /tmp/policy/domains/program/hotplug.te policy/domains/program/hotplug.te
--- /tmp/policy/domains/program/hotplug.te 2002-09-21 05:01:26.000000000 +0200
+++ policy/domains/program/hotplug.te 2002-11-20 14:24:53.000000000 +0100
@@ -34,8 +34,6 @@
r_dir_file(hotplug_t, usbdevfs_t)
allow hotplug_t usbdevfs_device_t:file getattr;
-allow hotplug_t fs_t:filesystem getattr;
-
# read config files
allow hotplug_t etc_t:dir r_dir_perms;
allow hotplug_t etc_t:{ file lnk_file } r_file_perms;
diff -ruN /tmp/policy/domains/program/ipsec.te policy/domains/program/ipsec.te
--- /tmp/policy/domains/program/ipsec.te 2002-11-04 13:27:51.000000000 +0100
+++ policy/domains/program/ipsec.te 2002-11-17 03:11:03.000000000 +0100
@@ -56,6 +56,9 @@
allow ipsec_t self:key_socket { create write read };
+# for lsof
+allow sysadm_t ipsec_t:key_socket getattr;
+
# the ipsec wrapper wants to run /usr/bin/logger (should we put
# it in its own domain?)
can_exec(ipsec_mgmt_t, bin_t)
diff -ruN /tmp/policy/domains/program/ircd.te policy/domains/program/ircd.te
--- /tmp/policy/domains/program/ircd.te 2002-10-28 22:55:53.000000000 +0100
+++ policy/domains/program/ircd.te 2002-11-20 14:25:02.000000000 +0100
@@ -29,8 +29,6 @@
allow ircd_t devtty_t:chr_file rw_file_perms;
-allow ircd_t fs_t:filesystem getattr;
-
allow ircd_t sbin_t:dir search;
allow ircd_t proc_t:file { getattr read };
diff -ruN /tmp/policy/domains/program/kcheckpass.te policy/domains/program/kcheckpass.te
--- /tmp/policy/domains/program/kcheckpass.te 2002-10-01 19:28:43.000000000 +0200
+++ policy/domains/program/kcheckpass.te 2002-11-20 01:12:49.000000000 +0100
@@ -34,6 +34,8 @@
dontaudit kcheckpass_t { home_root_t user_home_dir_type }:dir search;
dontaudit kcheckpass_t user_home_type:dir read;
+ifdef(`xdm.te', `
dontaudit kcheckpass_t xdm_t:fd use;
+')
dontaudit kcheckpass_t user_tmpfile:file read;
dontaudit kcheckpass_t device_t:dir search;
diff -ruN /tmp/policy/domains/program/load_policy.te policy/domains/program/load_policy.te
--- /tmp/policy/domains/program/load_policy.te 2002-11-04 13:27:51.000000000 +0100
+++ policy/domains/program/load_policy.te 2002-11-20 01:02:54.000000000 +0100
@@ -49,3 +49,4 @@
allow load_policy_t { initrc_t privfd }:fd use;
+allow load_policy_t fs_t:filesystem getattr;
diff -ruN /tmp/policy/domains/program/lpd.te policy/domains/program/lpd.te
--- /tmp/policy/domains/program/lpd.te 2002-10-17 00:01:10.000000000 +0200
+++ policy/domains/program/lpd.te 2002-11-09 14:53:02.000000000 +0100
@@ -54,7 +54,7 @@
type lpd_var_run_t, file_type, sysadmfile, pidfile;
file_type_auto_trans(lpd_t, var_run_t, lpd_var_run_t)
-allow checkpc_t lpd_var_run_t:dir getattr;
+allow checkpc_t lpd_var_run_t:dir { search getattr };
# This is needed to permit chown to read /var/spool/lpd/lp.
diff -ruN /tmp/policy/domains/program/mailman.te policy/domains/program/mailman.te
--- /tmp/policy/domains/program/mailman.te 2002-10-01 18:40:37.000000000 +0200
+++ policy/domains/program/mailman.te 2002-11-08 10:32:25.000000000 +0100
@@ -86,10 +86,6 @@
domain_auto_trans(system_crond_t, mailman_queue_exec_t, mailman_queue_t)
allow mailman_queue_t crond_t:fd use;
allow mailman_queue_t crond_t:fifo_file { ioctl read write };
-ifdef(`fcron.te', `
-allow mailman_queue_t fcron_t:fd use;
-allow mailman_queue_t fcron_t:fifo_file { ioctl read write };
-')
allow mailman_queue_t devtty_t:chr_file { read write };
allow mailman_queue_t self:process { fork signal sigchld };
diff -ruN /tmp/policy/domains/program/mrtg.te policy/domains/program/mrtg.te
--- /tmp/policy/domains/program/mrtg.te 2002-10-23 21:38:18.000000000 +0200
+++ policy/domains/program/mrtg.te 2002-11-29 09:35:14.000000000 +0100
@@ -12,10 +12,8 @@
daemon_base_domain(mrtg)
ifdef(`crond.te', `
-domain_auto_trans(system_crond_t, mrtg_exec_t, mrtg_t)
-allow mrtg_t crond_t:fifo_file { ioctl read write };
+system_crond_entry(mrtg_exec_t, mrtg_t)
allow mrtg_t cron_log_t:file rw_file_perms;
-allow mrtg_t crond_t:process sigchld;
')
type etc_mrtg_t, file_type, sysadmfile;
@@ -44,6 +42,7 @@
')
allow mrtg_t proc_t:file { read getattr };
+dontaudit mrtg_t proc_t:file ioctl;
allow mrtg_t { var_lock_t var_lib_t }:dir search;
rw_dir_create_file(mrtg_t, var_lib_mrtg_t)
@@ -51,6 +50,7 @@
# read config files
allow mrtg_t { etc_t etc_mrtg_t resolv_conf_t }:file { read getattr };
+dontaudit mrtg_t etc_mrtg_t:file ioctl;
allow mrtg_t etc_mrtg_t:dir { read search getattr };
dontaudit mrtg_t etc_mrtg_t:dir write;
allow mrtg_t etc_t:lnk_file read;
diff -ruN /tmp/policy/domains/program/named.te policy/domains/program/named.te
--- /tmp/policy/domains/program/named.te 2002-11-04 13:27:52.000000000 +0100
+++ policy/domains/program/named.te 2002-11-20 14:25:36.000000000 +0100
@@ -63,8 +63,6 @@
allow named_t self:unix_stream_socket create_stream_socket_perms;
allow named_t self:unix_dgram_socket create_socket_perms;
-allow named_t fs_t:filesystem getattr;
-
# Read sysctl kernel variables.
allow named_t sysctl_t:dir r_dir_perms;
allow named_t sysctl_kernel_t:dir r_dir_perms;
@@ -112,6 +110,9 @@
allow ndc_t self:fifo_file { read write getattr ioctl };
allow ndc_t named_zone_t:dir search;
+# for chmod in start script
+dontaudit initrc_t var_run_named_t:dir setattr;
+
# for ndc_t to be used for restart shell scripts
ifdef(`ndc_shell_script', `
allow ndc_t crond_t:fd use;
diff -ruN /tmp/policy/domains/program/ntpd.te policy/domains/program/ntpd.te
--- /tmp/policy/domains/program/ntpd.te 2002-09-27 22:27:38.000000000 +0200
+++ policy/domains/program/ntpd.te 2002-11-20 14:25:48.000000000 +0100
@@ -63,8 +63,6 @@
allow ntpd_t devtty_t:chr_file rw_file_perms;
-allow ntpd_t fs_t:filesystem getattr;
-
can_udp_send(ntpd_t, sysadm_t)
can_udp_send(sysadm_t, ntpd_t)
can_udp_send(ntpd_t, ntpd_t)
diff -ruN /tmp/policy/domains/program/ping.te policy/domains/program/ping.te
--- /tmp/policy/domains/program/ping.te 2002-11-04 13:27:52.000000000 +0100
+++ policy/domains/program/ping.te 2002-11-13 19:04:17.000000000 +0100
@@ -24,7 +24,7 @@
allow ping_t any_socket_t:rawip_socket sendto;
# Let ping receive ICMP replies.
-allow ping_t icmp_socket_t:rawip_socket recvfrom;
+allow ping_t { self icmp_socket_t }:rawip_socket recvfrom;
# Use capabilities.
allow ping_t ping_t:capability { net_raw setuid };
diff -ruN /tmp/policy/domains/program/postfix.te policy/domains/program/postfix.te
--- /tmp/policy/domains/program/postfix.te 2002-11-29 12:19:35.000000000 +0100
+++ policy/domains/program/postfix.te 2002-11-09 16:27:44.000000000 +0100
@@ -131,6 +131,7 @@
postfix_server_domain(local, `, mta_delivery_agent')
ifdef(`procmail.te', `
domain_auto_trans_read(postfix_local_t, procmail_exec_t, procmail_t)
+# for a bug in the postfix local program
dontaudit procmail_t postfix_local_t:tcp_socket { read write };
')
allow postfix_local_t { etc_aliases_t }:file r_file_perms;
diff -ruN /tmp/policy/domains/program/postgresql.te policy/domains/program/postgresql.te
--- /tmp/policy/domains/program/postgresql.te 2002-11-29 12:19:35.000000000 +0100
+++ policy/domains/program/postgresql.te 2002-11-20 14:25:55.000000000 +0100
@@ -18,6 +18,9 @@
dontaudit postgresql_t sysadm_home_dir_t:dir search;
+# quiet ps
+dontaudit postgresql_t domain:dir getattr;
+
# for currect directory of scripts
allow postgresql_t { var_spool_t cron_spool_t }:dir search;
@@ -57,7 +60,6 @@
can_tcp_connect(userdomain, postgresql_t)
allow postgresql_t { proc_t self }:file { getattr read };
-allow postgresql_t fs_t:filesystem getattr;
# Allow access to the postgresql databases
create_dir_file(postgresql_t, postgresql_db_t)
diff -ruN /tmp/policy/domains/program/pppd.te policy/domains/program/pppd.te
--- /tmp/policy/domains/program/pppd.te 2002-10-01 19:28:45.000000000 +0200
+++ policy/domains/program/pppd.te 2002-11-20 14:26:05.000000000 +0100
@@ -10,11 +10,11 @@
# pppd_t is the domain for the pppd program.
# pppd_exec_t is the type of the pppd executable.
# pppd_secret_t is the type of the pap and chap password files
-# pppd_log_t is the type of the ppp log files
#
daemon_domain(pppd, `, privmail')
type pppd_secret_t, file_type, sysadmfile;
-type pppd_log_t, file_type, sysadmfile, logfile;
+
+log_domain(pppd)
# Use the network.
can_network(pppd_t)
@@ -22,14 +22,9 @@
# Use capabilities.
allow pppd_t self:capability { net_admin setuid setgid fsetid };
-allow pppd_t fs_t:filesystem getattr;
-
allow pppd_t var_lock_t:dir rw_dir_perms;
allow pppd_t var_lock_t:file create_file_perms;
-# allow writing log files
-file_type_auto_trans(pppd_t, var_log_t, pppd_log_t)
-
# Access secret files
allow pppd_t pppd_secret_t:file r_file_perms;
diff -ruN /tmp/policy/domains/program/procmail.te policy/domains/program/procmail.te
--- /tmp/policy/domains/program/procmail.te 2002-10-10 17:50:17.000000000 +0200
+++ policy/domains/program/procmail.te 2002-11-20 01:07:27.000000000 +0100
@@ -39,6 +39,8 @@
allow procmail_t var_spool_t:dir r_dir_perms;
allow procmail_t fs_t:filesystem getattr;
+allow procmail_t proc_t:dir search;
+allow procmail_t proc_t:file { getattr read };
# for if /var/mail is a symlink to /var/spool/mail
#allow procmail_t mail_spool_t:lnk_file r_file_perms;
diff -ruN /tmp/policy/domains/program/qmail.te policy/domains/program/qmail.te
--- /tmp/policy/domains/program/qmail.te 2002-10-17 00:01:13.000000000 +0200
+++ policy/domains/program/qmail.te 2002-11-07 12:38:13.000000000 +0100
@@ -55,6 +55,7 @@
allow qmail_lspawn_t qmail_spool_t:dir search;
allow qmail_lspawn_t qmail_spool_t:file { read getattr };
allow qmail_lspawn_t etc_t:file { getattr read };
+allow qmail_lspawn_t tmp_t:dir getattr;
dontaudit qmail_lspawn_t user_home_dir_type:dir { getattr search };
qmail_daemon_domain(send)
diff -ruN /tmp/policy/domains/program/snmpd.te policy/domains/program/snmpd.te
--- /tmp/policy/domains/program/snmpd.te 2002-11-04 13:27:54.000000000 +0100
+++ policy/domains/program/snmpd.te 2002-11-20 14:26:16.000000000 +0100
@@ -35,5 +35,4 @@
allow snmpd_t proc_t:dir search;
allow snmpd_t proc_t:file r_file_perms;
-allow snmpd_t fs_t:filesystem getattr;
allow snmpd_t self:file { getattr read };
diff -ruN /tmp/policy/domains/program/squid.te policy/domains/program/squid.te
--- /tmp/policy/domains/program/squid.te 2002-10-28 21:31:50.000000000 +0100
+++ policy/domains/program/squid.te 2002-11-20 14:26:24.000000000 +0100
@@ -39,8 +39,6 @@
allow squid_t devtty_t:chr_file rw_file_perms;
-allow squid_t fs_t:filesystem getattr;
-
allow squid_t { self proc_t }:file { read getattr };
# for when we use /var/spool/cache
diff -ruN /tmp/policy/domains/program/ssh.te policy/domains/program/ssh.te
--- /tmp/policy/domains/program/ssh.te 2002-10-28 22:55:57.000000000 +0100
+++ policy/domains/program/ssh.te 2002-11-05 18:37:02.000000000 +0100
@@ -48,6 +48,7 @@
# sshd_key_t is the type of the ssh private key files
#
sshd_program_domain(sshd_t)
+allow sshd_t initrc_devpts_t:chr_file rw_file_perms;
allow sshd_t ssh_port_t:tcp_socket name_bind;
sshd_program_domain(sshd_login_t)
undefine(`sshd_program_domain')
diff -ruN /tmp/policy/domains/program/sxid.te policy/domains/program/sxid.te
--- /tmp/policy/domains/program/sxid.te 2002-09-27 22:27:38.000000000 +0200
+++ policy/domains/program/sxid.te 2002-11-08 10:32:25.000000000 +0100
@@ -13,10 +13,10 @@
allow sxid_t fs_t:filesystem getattr;
-domain_auto_trans(system_crond_t, sxid_exec_t, sxid_t)
-allow sxid_t crond_t:fd use;
-allow sxid_t crond_t:fifo_file { read ioctl };
-allow system_crond_t var_log_sxid_t:file create_file_perms;
+ifdef(`crond.te', `
+system_crond_entry(sxid_exec_t, sxid_t)
+')
+#allow system_crond_t var_log_sxid_t:file create_file_perms;
allow sxid_t etc_t:lnk_file read;
diff -ruN /tmp/policy/domains/program/tftpd.te policy/domains/program/tftpd.te
--- /tmp/policy/domains/program/tftpd.te 2002-09-21 05:01:28.000000000 +0200
+++ policy/domains/program/tftpd.te 2002-11-20 14:26:35.000000000 +0100
@@ -35,6 +35,3 @@
allow tftpd_t var_t:dir r_dir_perms;
allow tftpd_t var_t:{ file lnk_file } r_file_perms;
-
-allow tftpd_t fs_t:filesystem getattr;
-
diff -ruN /tmp/policy/domains/program/tmpreaper.te policy/domains/program/tmpreaper.te
--- /tmp/policy/domains/program/tmpreaper.te 2002-10-23 21:38:19.000000000 +0200
+++ policy/domains/program/tmpreaper.te 2002-11-08 10:32:25.000000000 +0100
@@ -15,10 +15,6 @@
uses_shlib(tmpreaper_t)
allow tmpreaper_t crond_t:fd use;
allow tmpreaper_t crond_t:fifo_file { read write };
-ifdef(`fcron.te', `
-allow tmpreaper_t fcron_t:fd use;
-allow tmpreaper_t fcron_t:fifo_file { read write };
-')
allow tmpreaper_t tmpfile:dir { rw_dir_perms rmdir };
allow tmpreaper_t tmpfile:notdevfile_class_set { getattr unlink };
allow tmpreaper_t home_type:notdevfile_class_set { getattr unlink };
diff -ruN /tmp/policy/domains/program/xdm.te policy/domains/program/xdm.te
--- /tmp/policy/domains/program/xdm.te 2002-11-29 12:19:36.000000000 +0100
+++ policy/domains/program/xdm.te 2002-11-09 16:13:05.000000000 +0100
@@ -14,12 +14,20 @@
# xdm_exec_t is the type of the [xgk]dm program
#
daemon_domain(xdm, `, privuser, privrole, auth, privowner, privmem')
-#every_domain(xdm_t)
tmp_domain(xdm)
+var_lib_domain(xdm)
+# NB we do NOT allow xdm_xserver_t var_lib_xdm_t:dir!!!
+allow xdm_xserver_t var_lib_xdm_t:file { getattr read };
+dontaudit xdm_xserver_t var_lib_xdm_t:dir search;
type xsession_exec_t, file_type, sysadmfile, exec_type;
allow xdm_t default_context_t:file { read getattr };
+can_network(xdm_t)
+allow xdm_t self:unix_stream_socket create_stream_socket_perms;
+allow xdm_t self:unix_dgram_socket create_socket_perms;
+allow xdm_t self:fifo_file rw_file_perms;
+
# for reboot
allow xdm_t initctl_t:fifo_file write;
@@ -31,6 +39,8 @@
# Commented out by default.
#allow xdm_t memory_device_t:chr_file { execute read write };
+allow xdm_t random_device_t:chr_file { getattr read };
+
# Transition to user domains for user sessions.
domain_trans(xdm_t, xsession_exec_t, unpriv_userdomain)
@@ -67,14 +77,14 @@
allow xdm_t gpmctl_t:sock_file { getattr setattr };')
# Update utmp and wtmp.
-allow xdm_t initrc_var_run_t: file { read write };
+allow xdm_t initrc_var_run_t: file { read write lock };
allow xdm_t wtmp_t:file { append };
# Update lastlog.
allow xdm_t lastlog_t:file rw_file_perms;
# Ask the security server for SIDs for user sessions.
-allow xdm_t security_t:security { get_user_sids };
+allow xdm_t security_t:security { get_user_sids context_to_sid };
# Access the shared memory pseudo file system.
# Should really define a derived type for this.
@@ -93,9 +103,15 @@
allow xdm_t xfs_tmp_t:sock_file { write };
can_unix_connect(xdm_t, xfs_t)')
+allow xdm_t self:process { setpgid setsched };
+allow xdm_t etc_t:lnk_file read;
+allow xdm_t etc_runtime_t:file { getattr read };
+
# Signal any user domain.
allow xdm_t userdomain:process signal_perms;
+allow xdm_t proc_t:file { getattr read };
+
# Search /proc for any user domain processes.
allow xdm_t userdomain:dir r_dir_perms;
allow xdm_t userdomain:{ file lnk_file } r_file_perms;
diff -ruN /tmp/policy/domains/user.te policy/domains/user.te
--- /tmp/policy/domains/user.te 2002-10-17 00:01:05.000000000 +0200
+++ policy/domains/user.te 2002-10-23 20:14:43.000000000 +0200
@@ -5,16 +5,26 @@
full_user_role(user)
#full_user_role(second_user)
-# Add role allow rules in policy/rbac as desired to
-# support transitions among the user roles, and to permit
-# system_r to transition to user_r.
+allow system_r user_r;
+#allow system_r second_user_r;
-# system_r is authorized for user_t as a fallback for unmodified daemons.
-role system_r types user_t;
+#
+# Allow the user roles to transition
+# into each other.
+#
+allow user_r sysadm_r;
+allow sysadm_r user_r;
+#allow sysadm_r second_user_r;
+
+# if adding new user roles make sure you edit the in_user_role macro in
+# macros/user_macros.te to match
# lots of user programs accidentally search /root, and also the admin often
# logs in as UID=0 domain=user_t...
dontaudit unpriv_userdomain sysadm_home_dir_t:dir { getattr search };
+# system_r is authorized for user_t as a fallback for unmodified daemons.
+role system_r types user_t;
+
# "ps aux" and "ls -l /dev/pts" make too much noise without this
dontaudit unpriv_userdomain ptyfile:chr_file getattr;
diff -ruN /tmp/policy/file_contexts/program/fsadm.fc policy/file_contexts/program/fsadm.fc
--- /tmp/policy/file_contexts/program/fsadm.fc 2002-09-09 19:54:20.000000000 +0200
+++ policy/file_contexts/program/fsadm.fc 2002-11-08 10:33:05.000000000 +0100
@@ -1,12 +1,12 @@
# fs admin utilities
-/sbin/fsck system_u:object_r:fsadm_exec_t
-/sbin/fsck\.ext2 system_u:object_r:fsadm_exec_t
-/sbin/fsck\.ext3 system_u:object_r:fsadm_exec_t
+/sbin/fsck.* system_u:object_r:fsadm_exec_t
+/sbin/mkfs.* system_u:object_r:fsadm_exec_t
/sbin/e2fsck system_u:object_r:fsadm_exec_t
+/sbin/reiserfs(ck|tune) system_u:object_r:fsadm_exec_t
+/sbin/mkreiserfs system_u:object_r:fsadm_exec_t
/sbin/e2label system_u:object_r:fsadm_exec_t
/sbin/mkfs system_u:object_r:fsadm_exec_t
/sbin/mke2fs system_u:object_r:fsadm_exec_t
-/sbin/mkfs.ext2 system_u:object_r:fsadm_exec_t
/sbin/mkswap system_u:object_r:fsadm_exec_t
/sbin/scsi_info system_u:object_r:fsadm_exec_t
/sbin/sfdisk system_u:object_r:fsadm_exec_t
diff -ruN /tmp/policy/file_contexts/program/named.fc policy/file_contexts/program/named.fc
--- /tmp/policy/file_contexts/program/named.fc 2002-10-01 19:28:51.000000000 +0200
+++ policy/file_contexts/program/named.fc 2002-11-18 20:37:48.000000000 +0100
@@ -8,4 +8,5 @@
/usr/sbin/r?ndc system_u:object_r:ndc_exec_t
/var/cache/bind(/.*)? system_u:object_r:named_cache_t
/var/run/ndc system_u:object_r:var_run_named_t
+/var/run/bind(/.*)? system_u:object_r:var_run_named_t
/usr/sbin/lwresd system_u:object_r:named_exec_t
diff -ruN /tmp/policy/file_contexts/program/pppd.fc policy/file_contexts/program/pppd.fc
--- /tmp/policy/file_contexts/program/pppd.fc 2002-09-21 05:01:29.000000000 +0200
+++ policy/file_contexts/program/pppd.fc 2002-11-09 14:36:12.000000000 +0100
@@ -6,3 +6,4 @@
/var/run/pppd.tdb system_u:object_r:var_run_pppd_t
/etc/ppp/.*secrets system_u:object_r:pppd_secret_t
/var/run/ipppd.*pid system_u:object_r:var_run_pppd_t
+/var/log/ppp-connect-errors.* system_u:object_r:pppd_log_t
diff -ruN /tmp/policy/file_contexts/program/samba.fc policy/file_contexts/program/samba.fc
--- /tmp/policy/file_contexts/program/samba.fc 2002-10-28 21:32:43.000000000 +0100
+++ policy/file_contexts/program/samba.fc 2002-11-22 22:40:06.000000000 +0100
@@ -7,3 +7,12 @@
/var/lib/samba(/.*)? system_u:object_r:samba_var_t
/etc/samba/secrets.tdb system_u:object_r:samba_secrets_t
/etc/samba/MACHINE.SID system_u:object_r:samba_secrets_t
+/var/run/samba/locking.tdb system_u:object_r:var_run_smbd_t
+/var/run/samba/connections.tdb system_u:object_r:var_run_smbd_t
+/var/run/samba/sessionid.tdb system_u:object_r:var_run_smbd_t
+/var/run/samba/brlock.tdb system_u:object_r:var_run_smbd_t
+/var/run/samba/namelist.debug system_u:object_r:var_run_nmbd_t
+/var/run/samba/messages.tdb system_u:object_r:var_run_nmbd_t
+/var/run/samba/unexpected.tdb system_u:object_r:var_run_nmbd_t
+/var/run/samba/smbd.pid system_u:object_r:var_run_smbd_t
+/var/run/samba/nmbd.pid system_u:object_r:var_run_nmbd_t
diff -ruN /tmp/policy/file_contexts/program/xdm.fc policy/file_contexts/program/xdm.fc
--- /tmp/policy/file_contexts/program/xdm.fc 2002-08-23 21:04:28.000000000 +0200
+++ policy/file_contexts/program/xdm.fc 2002-11-05 01:01:51.000000000 +0100
@@ -3,7 +3,8 @@
/var/[xgk]dm(/.*)? system_u:object_r:xserver_var_log_t
/usr/var/[xgk]dm(/.*)? system_u:object_r:xserver_var_log_t
/var/log/kdm.log system_u:object_r:xserver_var_log_t
-#/tmp/.X11-unix(/.*)? system_u:object_r:xdm_tmp_t
-#/tmp/.X0-lock system_u:object_r:xdm_tmp_t
-/etc/X11/Xsession[^/]* -- system_u:object_r:xsession_exec_t
-
+/tmp/.X11-unix(/.*)? system_u:object_r:xdm_tmp_t
+/tmp/.X0-lock system_u:object_r:xdm_tmp_t
+/etc/X11/Xsession[^/]* -- system_u:object_r:xsession_exec_t
+/var/run/xdmctl system_u:object_r:var_run_xdm_t
+/var/lib/kdm/authfiles(/.*)? system_u:object_r:var_lib_xdm_t
diff -ruN /tmp/policy/file_contexts/program/xserver.fc policy/file_contexts/program/xserver.fc
--- /tmp/policy/file_contexts/program/xserver.fc 2002-08-23 21:04:28.000000000 +0200
+++ policy/file_contexts/program/xserver.fc 2002-10-23 20:12:44.000000000 +0200
@@ -1,8 +1,6 @@
# X server
/dev/agpgart system_u:object_r:agp_device_t
/dev/dri(/.*)? system_u:object_r:dri_device_t
-/tmp/.X11-unix(/.*)? system_u:object_r:user_xserver_tmp_t
-/tmp/.X0-lock system_u:object_r:user_xserver_tmp_t
/usr/X11R6/bin/Xwrapper system_u:object_r:xserver_exec_t
/usr/X11R6/bin/X system_u:object_r:xserver_exec_t
/usr/X11R6/bin/XFree86 system_u:object_r:xserver_exec_t
diff -ruN /tmp/policy/file_contexts/types.fc policy/file_contexts/types.fc
--- /tmp/policy/file_contexts/types.fc 2002-10-23 21:38:20.000000000 +0200
+++ policy/file_contexts/types.fc 2002-11-20 18:18:57.000000000 +0100
@@ -58,8 +58,10 @@
/var/lib(/.*)? system_u:object_r:var_lib_t
/var/lib/nfs(/.*)? system_u:object_r:var_lib_nfs_t
/var/lib/texmf(/.*)? system_u:object_r:tetex_data_t
+/var/cache/fonts(/.*)? system_u:object_r:tetex_data_t
/var/lock(/.*)? system_u:object_r:var_lock_t
-/var/tmp(/.*)? system_u:object_r:tmp_t
+/var/tmp system_u:object_r:tmp_t
+/var/tmp/.* <<none>>
/var/tmp/vi.recover system_u:object_r:tmp_t
#
@@ -136,12 +138,13 @@
/dev/psaux system_u:object_r:mouse_device_t
/dev/.*mouse.* -c system_u:object_r:mouse_device_t
/dev/input/.*mouse.* system_u:object_r:mouse_device_t
+/dev/input/mice system_u:object_r:mouse_device_t
/dev/ptmx system_u:object_r:ptmx_t
/dev/sequencer system_u:object_r:misc_device_t
/dev/fb[0-9]* system_u:object_r:framebuf_device_t
/dev/apm_bios system_u:object_r:apm_bios_t
/dev/cpu/mtrr system_u:object_r:mtrr_device_t
-/dev/(radio|video|vbi|vtx).* system_u:object_r:v4l_device_t
+/dev/(radio|video|vbi|vtx).* -c system_u:object_r:v4l_device_t
/proc(/.*)? <<none>>
@@ -187,7 +190,8 @@
#
# /tmp
#
-/tmp(/.*)? system_u:object_r:tmp_t
+/tmp system_u:object_r:tmp_t
+/tmp/.* <<none>>
/tmp/orbit.* system_u:object_r:user_tmp_t
/tmp/.ICE-unix(/.*)? system_u:object_r:user_tmp_t
diff -ruN /tmp/policy/macros/global_macros.te policy/macros/global_macros.te
--- /tmp/policy/macros/global_macros.te 2002-10-28 22:56:04.000000000 +0100
+++ policy/macros/global_macros.te 2002-11-29 10:17:35.000000000 +0100
@@ -104,7 +104,7 @@
#
# Permissions for reading and writing directories and their attributes.
#
-define(`rw_dir_perms', `{ read getattr lock search add_name remove_name write }')
+define(`rw_dir_perms', `{ read getattr lock search ioctl add_name remove_name write }')
#
# Permissions for reading and adding names to directories.
@@ -950,8 +950,13 @@
type var_run_$1_t, file_type, sysadmfile, pidfile;
file_type_auto_trans($1_t, var_run_t, var_run_$1_t)
+allow $1_t devtty_t:chr_file rw_file_perms;
+
# for daemons that look at /root on startup
dontaudit $1_t sysadm_home_dir_t:dir search;
+
+# for df
+allow $1_t fs_type:filesystem getattr;
')dnl
define(`uses_authbind',
@@ -996,6 +1001,11 @@
file_type_auto_trans($1_t, tmp_t, $1_tmp_t)
')
+define(`var_lib_domain', `
+type var_lib_$1_t, file_type, sysadmfile;
+file_type_auto_trans($1_t, var_lib_t, var_lib_$1_t)
+')
+
define(`log_domain', `
type $1_log_t, file_type, sysadmfile, logfile;
file_type_auto_trans($1_t, var_log_t, $1_log_t)
diff -ruN /tmp/policy/macros/program/crond_macros.te policy/macros/program/crond_macros.te
--- /tmp/policy/macros/program/crond_macros.te 2002-09-27 22:27:44.000000000 +0200
+++ policy/macros/program/crond_macros.te 2002-11-08 10:33:44.000000000 +0100
@@ -29,11 +29,6 @@
# via execve_secure. There is no way to set up an automatic
# transition, since crontabs are configuration files, not executables.
domain_trans(crond_t, shell_exec_t, $1_crond_t)
-ifdef(`fcron.te', `
-domain_trans(fcron_t, shell_exec_t, $1_crond_t)
-# should get the spool file created under a different type or use a fifo
-allow $1_crond_t fcron_spool_t:file rw_file_perms;
-')
ifdef(`mta.te', `
domain_auto_trans($1_crond_t, sendmail_exec_t, $1_mail_t)
diff -ruN /tmp/policy/macros/program/crontab_macros.te policy/macros/program/crontab_macros.te
--- /tmp/policy/macros/program/crontab_macros.te 2002-10-28 21:33:15.000000000 +0100
+++ policy/macros/program/crontab_macros.te 2002-11-08 10:33:44.000000000 +0100
@@ -44,13 +44,12 @@
allow sysadm_crontab_t $1_cron_spool_t:file { getattr read };
file_type_auto_trans($1_crontab_t, cron_spool_t, $1_cron_spool_t)
ifdef(`fcron.te', `
-file_type_auto_trans($1_crontab_t, fcron_spool_t, $1_cron_spool_t)
-allow fcron_t $1_cron_spool_t:file create_file_perms;
+allow crond_t $1_cron_spool_t:file create_file_perms;
# fcron wants an instant update of a crontab change for the administrator
ifelse(`$1', `sysadm', `
-allow $1_crontab_t fcron_t:process signal;
+allow $1_crontab_t crond_t:process signal;
', `
-dontaudit $1_crontab_t fcron_t:process signal;
+dontaudit $1_crontab_t crond_t:process signal;
')dnl end ifelse
')dnl end ifdef fcron
diff -ruN /tmp/policy/macros/program/x_client_macros.te policy/macros/program/x_client_macros.te
--- /tmp/policy/macros/program/x_client_macros.te 2002-10-10 17:50:31.000000000 +0200
+++ policy/macros/program/x_client_macros.te 2002-11-27 19:04:03.000000000 +0100
@@ -52,7 +52,9 @@
# Type for files that are read-only for this domain
type $1_$2_ro_t, file_type, sysadmfile;
r_dir_file($1_$2_t, $1_$2_ro_t)
-rw_dir_create_file($1_t, $1_$2_ro_t)
+allow $1_$2_t $1_$2_ro_t:fifo_file { read write };
+create_dir_file($1_t, $1_$2_ro_t)
+allow $1_t $1_$2_ro_t:fifo_file create_file_perms;
allow $1_t $1_$2_ro_t:{ dir file lnk_file } { relabelto relabelfrom };
# Allow the user domain to send any signal to the $2 process.
@@ -91,6 +93,10 @@
allow $1_$2_t xdm_xserver_tmp_t:sock_file { read write };
allow $1_$2_t xdm_t:fd use;
dontaudit $1_$2_t xdm_t:tcp_socket { read write };
+# for X over a ssh tunnel
+ifdef(`ssh.te', `
+can_tcp_connect($1_$2_t, sshd_t)
+')
# for .xsession-errors
dontaudit $1_$2_t $1_home_t:file write;
diff -ruN /tmp/policy/macros/user_macros.te policy/macros/user_macros.te
--- /tmp/policy/macros/user_macros.te 2002-11-29 12:19:38.000000000 +0100
+++ policy/macros/user_macros.te 2002-11-29 12:30:08.000000000 +0100
@@ -270,6 +270,8 @@
dontaudit $1_t syslogd_t:unix_dgram_socket sendto;
')
+# stop warnings about "ls -l" on directories with unlabelled files
+dontaudit $1_t file_t:{ dir file lnk_file } getattr;
')
undefine(`in_user_role')
diff -ruN /tmp/policy/rbac policy/rbac
--- /tmp/policy/rbac 2002-07-03 22:26:19.000000000 +0200
+++ policy/rbac 2002-10-23 20:18:03.000000000 +0200
@@ -31,19 +31,11 @@
#
# Allow the system_r role to transition
-# into any of the user roles.
+# into the sysadm_r role.
#
-allow system_r user_r;
allow system_r sysadm_r;
#
-# Allow the user roles to transition
-# into each other.
-#
-allow user_r sysadm_r;
-allow sysadm_r user_r;
-
-#
# Allow the user and admin role to transition to httpd_admin_r
#
ifdef(`apache.te',
^ permalink raw reply [flat|nested] 27+ messages in thread* policy patch
@ 2002-09-21 4:39 Russell Coker
0 siblings, 0 replies; 27+ messages in thread
From: Russell Coker @ 2002-09-21 4:39 UTC (permalink / raw)
To: selinux
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
This one should be mostly self-explanatory, a few notes:
dontaudit ldconfig_t device_t:dir search;
It doesn't really need search access, so I removed the allow rule.
dontaudit ntpd_t var_t:dir getattr;
My var.diff patch allows this...
can_udp_send(init_t, portmap_t)
For NFS...
I solved the Postgresql problems that needed the gross hacks so I removed
them.
--
There is no point PGP/GPG signing an email unless the signature can be
verified. If you post to a list then don't sign the message unless your
key is available on public key servers and has been signed by someone
who is in the web of trust, otherwise you just waste bandwidth and CPU.
[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 7448 bytes --]
diff -ru /tmp/policy/domains/program/dpkg.te policy/domains/program/dpkg.te
--- /tmp/policy/domains/program/dpkg.te 2002-09-21 06:04:23.000000000 +0200
+++ policy/domains/program/dpkg.te 2002-09-21 05:19:00.000000000 +0200
@@ -115,7 +115,7 @@
')
r_dir_file(install_menu_t, var_lib_dpkg_t)
-allow { install_menu_t userdomain system_crond_t } etc_dpkg_t:file r_file_perms;
+allow { apt_t install_menu_t userdomain system_crond_t } etc_dpkg_t:file r_file_perms;
can_exec(sysadm_t, etc_dpkg_t)
# Inherit and use descriptors from any domain.
@@ -237,7 +238,7 @@
domain_auto_trans(dpkg_t, install_menu_exec_t, install_menu_t)
allow dpkg_t install_menu_t:process signal_perms;
-allow install_menu_t newrole_t:fd use;
+allow install_menu_t privfd:fd use;
uses_shlib(install_menu_t)
allow install_menu_t self:process { fork sigchld };
diff -ru /tmp/policy/domains/program/fcron.te policy/domains/program/fcron.te
--- /tmp/policy/domains/program/fcron.te 2002-09-21 05:01:26.000000000 +0200
+++ policy/domains/program/fcron.te 2002-09-10 22:35:26.000000000 +0200
@@ -6,8 +6,8 @@
#
# Author: Russell Coker <russell@coker.com.au>
-# ideally we would not give it privowner!
-daemon_domain(fcron, `, privuser, privrole, privmail, privfd, privowner')
+# ideally we would not give it privowner or auth!
+daemon_domain(fcron, `, privuser, privrole, privmail, privfd, privowner, auth')
general_domain_access(fcron_t)
diff -ru /tmp/policy/domains/program/ldconfig.te policy/domains/program/ldconfig.te
--- /tmp/policy/domains/program/ldconfig.te 2002-09-21 05:01:27.000000000 +0200
+++ policy/domains/program/ldconfig.te 2002-09-15 19:23:39.000000000 +0200
@@ -13,8 +13,8 @@
role system_r types ldconfig_t;
domain_auto_trans({ sysadm_t initrc_t ifdef(`dpkg.te', `dpkg_t') }, ldconfig_exec_t, ldconfig_t)
-allow ldconfig_t device_t:dir search;
-allow ldconfig_t { sysadm_devpts_t sysadm_tty_device_t }:chr_file rw_file_perms;
+dontaudit ldconfig_t device_t:dir search;
+allow ldconfig_t admin_tty_type:chr_file rw_file_perms;
allow ldconfig_t privfd:fd use;
uses_shlib(ldconfig_t)
diff -ru /tmp/policy/domains/program/named.te policy/domains/program/named.te
--- /tmp/policy/domains/program/named.te 2002-09-21 06:08:50.000000000 +0200
+++ policy/domains/program/named.te 2002-09-21 05:23:54.000000000 +0200
@@ -100,6 +100,9 @@
allow ndc_t self:capability dac_override;
allow ndc_t var_run_named_t:sock_file rw_file_perms;
allow ndc_t named_t:unix_stream_socket connectto;
+allow ndc_t privfd:fd use;
+# seems to need read as well for some reason
+allow ndc_t admin_tty_type:chr_file { getattr read write };
# for ndc_t to be used for restart shell scripts
ifdef(`ndc_shell_script', `
diff -ru /tmp/policy/domains/program/ntpd.te policy/domains/program/ntpd.te
--- /tmp/policy/domains/program/ntpd.te 2002-09-09 19:54:13.000000000 +0200
+++ policy/domains/program/ntpd.te 2002-09-13 23:24:30.000000000 +0200
@@ -24,11 +24,13 @@
dontaudit ntpd_t self:capability fsetid;
dontaudit ntpd_t domain:lnk_file read;
+# for some reason it creates a file in /tmp
+tmp_domain(ntpd)
+
allow ntpd_t etc_t:dir r_dir_perms;
allow ntpd_t etc_t:lnk_file r_file_perms;
allow ntpd_t resolv_conf_t:file { read getattr };
allow ntpd_t etc_ntp_t:file rw_file_perms;
-dontaudit ntpd_t var_t:dir getattr;
# Use the network.
can_network(ntpd_t)
diff -ru /tmp/policy/domains/program/portmap.te policy/domains/program/portmap.te
--- /tmp/policy/domains/program/portmap.te 2002-09-09 19:54:14.000000000 +0200
+++ policy/domains/program/portmap.te 2002-09-17 14:44:29.000000000 +0200
@@ -31,6 +31,7 @@
ifdef(`ypbind.te',
`can_udp_send(portmap_t, ypbind_t)')
can_udp_send(portmap_t, initrc_t)
+can_udp_send(init_t, portmap_t)
ifdef(`rpcd.te',
`can_udp_send(portmap_t, rpcd_t)')
ifdef(`inetd.te',
diff -ru /tmp/policy/domains/program/portslave.te policy/domains/program/portslave.te
--- /tmp/policy/domains/program/portslave.te 2002-08-23 20:44:19.000000000 +0200
+++ policy/domains/program/portslave.te 2002-09-20 05:19:59.000000000 +0200
@@ -13,6 +13,7 @@
allow portslave_t shadow_t:file { read getattr };
general_domain_access(portslave_t)
+domain_auto_trans(init_t, portslave_exec_t, portslave_t)
ifdef(`rlogind.te', `
domain_auto_trans(rlogind_t, portslave_exec_t, portslave_t)
')
@@ -23,10 +24,12 @@
allow portslave_t proc_t:file { getattr read };
-allow portslave_t { var_log_t devpts_t }:dir r_dir_perms;
+allow portslave_t { var_t var_log_t devpts_t }:dir search;
allow portslave_t devtty_t:chr_file { setattr rw_file_perms };
+allow portslave_t pppd_secret_t:file r_file_perms;
+
can_network(portslave_t)
allow portslave_t fs_t:filesystem getattr;
ifdef(`radius.te', `
@@ -61,7 +64,7 @@
allow portslave_t wtmp_t:file rw_file_perms;
# Read and write ttys.
-allow portslave_t tty_device_t:chr_file rw_file_perms;
+allow portslave_t tty_device_t:chr_file { setattr rw_file_perms };
allow portslave_t ttyfile:chr_file rw_file_perms;
diff -ru /tmp/policy/domains/program/postgresql.te policy/domains/program/postgresql.te
--- /tmp/policy/domains/program/postgresql.te 2002-09-21 05:01:28.000000000 +0200
+++ policy/domains/program/postgresql.te 2002-09-21 05:32:02.000000000 +0200
@@ -15,8 +15,6 @@
# gross hack
domain_auto_trans(dpkg_t, postgresql_exec_t, postgresql_t)
')
-# a grosser hack, and not a good idea
-#allow postgresql_t etc_t:file setattr;
dontaudit postgresql_t { sysadm_home_dir_t var_spool_t }:dir search;
@@ -70,10 +68,6 @@
allow postgresql_t bin_t:lnk_file read;
allow postgresql_t postgresql_exec_t:lnk_file read;
-# Not a good idea.
-#allow postgresql_t initrc_var_run_t:file { read write lock };
-allow postgresql_t initrc_var_run_t:file { read };
-
allow postgresql_t self:sem rw_sem_perms;
allow postgresql_t self:udp_socket recvfrom;
diff -ru /tmp/policy/domains/program/tmpreaper.te policy/domains/program/tmpreaper.te
--- /tmp/policy/domains/program/tmpreaper.te 2002-09-09 19:54:16.000000000 +0200
+++ policy/domains/program/tmpreaper.te 2002-09-21 05:37:06.000000000 +0200
@@ -15,6 +15,10 @@
uses_shlib(tmpreaper_t)
allow tmpreaper_t crond_t:fd use;
allow tmpreaper_t crond_t:fifo_file { read write };
+ifdef(`fcron.te', `
+allow tmpreaper_t fcron_t:fd use;
+allow tmpreaper_t fcron_t:fifo_file { read write };
+')
create_dir_file(tmpreaper_t, tmpfile)
allow tmpreaper_t tmpfile:dir { rw_dir_perms rmdir };
allow tmpreaper_t tmpfile:notdevfile_class_set { getattr unlink };
diff -ru /tmp/policy/file_contexts/program/portslave.fc policy/file_contexts/program/portslave.fc
--- /tmp/policy/file_contexts/program/portslave.fc 2002-07-12 17:19:44.000000000 +0200
+++ policy/file_contexts/program/portslave.fc 2002-09-20 05:22:13.000000000 +0200
@@ -1,3 +1,4 @@
# portslave
/usr/sbin/portslave system_u:object_r:portslave_exec_t
/etc/portslave(/.*)? system_u:object_r:portslave_etc_t
+/var/run/radius.(id)|(seq) system_u:object_r:var_run_pppd_t
diff -ru /tmp/policy/genfs_contexts policy/genfs_contexts
--- /tmp/policy/genfs_contexts 2002-09-21 05:01:24.000000000 +0200
+++ policy/genfs_contexts 2002-09-15 19:17:05.000000000 +0200
@@ -84,6 +84,8 @@
')
ifdef(`lpd.te', `
genfscon devfs /printers -c system_u:object_r:printer_t
+genfscon devfs /lp -c system_u:object_r:printer_t
+genfscon devfs /usb/lp -c system_u:object_r:printer_t
')
genfscon devfs /ppp system_u:object_r:ppp_device_t
genfscon devfs /fb -c system_u:object_r:framebuf_device_t
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2005-08-18 7:41 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-25 13:27 policy patch Russell Coker
2004-11-25 16:32 ` Luke Kenneth Casson Leighton
2004-11-25 19:05 ` Russell Coker
2004-11-25 20:34 ` Luke Kenneth Casson Leighton
2004-11-29 19:23 ` James Carter
2004-11-29 21:47 ` Daniel J Walsh
2004-11-30 16:42 ` Daniel J Walsh
-- strict thread matches above, loose matches on Subject: below --
2005-08-18 7:31 Russell Coker
2005-01-12 18:46 [Fwd: New policy patch] Daniel J Walsh
2005-01-21 20:36 ` James Carter
2005-03-29 16:47 ` Policy Patch Daniel J Walsh
2005-04-01 20:28 ` James Carter
2004-10-13 5:55 policy patch Russell Coker
2004-10-13 20:17 ` James Carter
2004-08-24 8:18 Russell Coker
2004-08-24 12:23 ` Stephen Smalley
2004-08-24 16:54 ` Russell Coker
2004-08-27 20:58 ` James Carter
2004-08-28 13:46 ` Russell Coker
2004-08-30 20:24 ` James Carter
2004-07-12 14:12 Russell Coker
2004-07-12 19:46 ` Luke Kenneth Casson Leighton
2004-07-11 7:59 Russell Coker
2004-07-12 13:30 ` Stephen Smalley
2004-07-04 5:04 Russell Coker
2004-07-07 20:47 ` Stephen Smalley
2002-12-03 14:47 Stephen D. Smalley
2002-11-29 11:45 Russell Coker
2002-09-21 4:39 Russell Coker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.