Skip to contentSkip to conversation

Latest policy

PATCH Daniel J Walsh 3 participants 4 messages Mar 29, 2006 – Mar 30, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

Added restorecond policy

fixed samba_selinux man page

logwatch looks for mounted files system on /mnt

file context for yumex

groupadd and useradd need to read nsswitch

hplib_port_t needed for 9100

add 6000 as valid xserver port

pam console needs to getattr/setattr usb_dev

bluetooth tools want to read resolver

hplib_t fixes to work with additional devices (Usb printers

dovecot wants to talk to postgresql and use inotify

hal needs to comunicate with ntp

pegasus needs to connect to random non reserved ports

privoxy wants to use nscd and communicate with tor

xfs needs to read fonts in usr_t

fstools need to be able to work with blk devices. (fsck)

libmpg123 is moving

mount using some certificates stored in usr_t

setfiles needs trans_lock

man/man8/samba_selinux.8 +1 -1
diff --exclude-from=exclude -N -u -r nsaserefpolicy/man/man8/samba_selinux.8 serefpolicy-2.2.28/man/man8/samba_selinux.8
@@ -23,7 +23,7 @@
 .SH SHARING FILES
 If you want to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of public_content_t and public_content_rw_t.  These context allow any of the above domains to read the content.  If you want a particular domain to write to the public_content_rw_t domain, you must set the appropriate boolean.  allow_DOMAIN_anon_write.  So for samba you would execute:
 
-setsebool -P allow_smb_anon_write=1
+setsebool -P allow_smbd_anon_write=1
 
 .SH BOOLEANS
 .br 
policy/modules/admin/logwatch.te +1 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/logwatch.te serefpolicy-2.2.28/policy/modules/admin/logwatch.te
@@ -52,6 +52,7 @@
 files_read_etc_runtime_files(logwatch_t)
 files_read_usr_files(logwatch_t)
 files_search_spool(logwatch_t)
+files_search_mnt(logwatch_t)
 files_dontaudit_search_home(logwatch_t)
 
 fs_getattr_all_fs(logwatch_t)
policy/modules/admin/rpm.fc +1 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.fc serefpolicy-2.2.28/policy/modules/admin/rpm.fc
@@ -3,6 +3,7 @@
 /usr/bin/smart 			--	gen_context(system_u:object_r:rpm_exec_t,s0)
 
 /usr/bin/yum 			--	gen_context(system_u:object_r:rpm_exec_t,s0)
+/usr/share/yumex/yumex		--	gen_context(system_u:object_r:rpm_exec_t,s0)
 
 /usr/lib(64)?/rpm/rpmd		-- 	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib(64)?/rpm/rpmq		-- 	gen_context(system_u:object_r:bin_t,s0)
policy/modules/admin/usermanage.te +2 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/usermanage.te serefpolicy-2.2.28/policy/modules/admin/usermanage.te
@@ -225,6 +225,7 @@
 
 files_manage_etc_files(groupadd_t)
 files_relabel_etc_files(groupadd_t)
+files_read_etc_runtime_files(groupadd_t)
 
 libs_use_ld_so(groupadd_t)
 libs_use_shared_libs(groupadd_t)
@@ -492,6 +493,7 @@
 files_manage_etc_files(useradd_t)
 files_search_var_lib(useradd_t)
 files_relabel_etc_files(useradd_t)
+files_read_etc_runtime_files(useradd_t)
 
 init_use_fds(useradd_t)
 init_rw_utmp(useradd_t)
policy/modules/kernel/corenetwork.te.in +2 -2
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corenetwork.te.in serefpolicy-2.2.28/policy/modules/kernel/corenetwork.te.in
@@ -68,7 +68,7 @@
 network_port(http_cache, tcp,3128,s0, udp,3130,s0, tcp,8080,s0, tcp,8118,s0) # 8118 is for privoxy
 network_port(http, tcp,80,s0, tcp,443,s0, tcp,488,s0, tcp,8008,s0)
 network_port(howl, tcp,5335,s0, udp,5353,s0)
-network_port(hplip, tcp,50000,s0, tcp,50002,s0)
+network_port(hplip, tcp,50000,s0, tcp,50002,s0, tcp,9100,s0)
 network_port(i18n_input, tcp,9010,s0)
 network_port(imaze, tcp,5323,s0, udp,5323,s0)
 network_port(inetd_child, tcp,7,s0, udp,7,s0, tcp,9,s0, udp,9,s0, tcp,13,s0, udp,13,s0, tcp,19,s0, udp,19,s0, tcp,37,s0, udp,37,s0, tcp,512,s0, tcp,543,s0, tcp,544,s0, tcp,891,s0, udp,891,s0, tcp,892,s0, udp,892,s0, tcp,2105,s0, tcp,5666,s0)
@@ -127,7 +127,7 @@
 network_port(uucpd, tcp,540,s0)
 network_port(vnc, tcp,5900,s0)
 network_port(xen, tcp,8002,s0)
-network_port(xserver, tcp,6001,s0, tcp,6002,s0, tcp,6003,s0, tcp,6004,s0, tcp,6005,s0, tcp,6006,s0, tcp,6007,s0, tcp,6008,s0, tcp,6009,s0, tcp,6010,s0, tcp,6011,s0, tcp,6012,s0, tcp,6013,s0, tcp,6014,s0, tcp,6015,s0, tcp,6016,s0, tcp,6017,s0, tcp,6018,s0, tcp,6019,s0)
+network_port(xserver, tcp, 6000, s0, tcp,6001,s0, tcp,6002,s0, tcp,6003,s0, tcp,6004,s0, tcp,6005,s0, tcp,6006,s0, tcp,6007,s0, tcp,6008,s0, tcp,6009,s0, tcp,6010,s0, tcp,6011,s0, tcp,6012,s0, tcp,6013,s0, tcp,6014,s0, tcp,6015,s0, tcp,6016,s0, tcp,6017,s0, tcp,6018,s0, tcp,6019,s0)
 network_port(zebra, tcp,2601,s0)
 network_port(zope, tcp,8021,s0)
 
policy/modules/kernel/devices.if +58 -0

67 lines not on this page · raw message

policy/modules/kernel/files.if +27 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.if serefpolicy-2.2.28/policy/modules/kernel/files.if
@@ -1643,6 +1643,21 @@
 ')
 
 ########################################
+#
+# files_unlink_boot_flag(domain)
+#
+# /halt, /.autofsck, etc
+#
+interface(`files_unlink_boot_flag',`
+	gen_require(`
+		type root_t;
+	')
+
+	allow $1 root_t:file unlink;
+')
+
+
+########################################
 ## <summary>
 ##	Read files in /etc that are dynamically
 ##	created on boot, such as mtab.
@@ -2152,6 +2167,18 @@
 
 ########################################
 #
+# files_dontaudit_search_mnt(domain)
+#
+interface(`files_dontaudit_search_mnt',`
+	gen_require(`
+		type mnt_t;
+	')
+
+	dontaudit $1 mnt_t:dir search_dir_perms;
+')
+
+########################################
+#
 # files_list_mnt(domain)
 #
 interface(`files_list_mnt',`
policy/modules/kernel/kernel.if +2 -2
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel.if serefpolicy-2.2.28/policy/modules/kernel/kernel.if
@@ -1148,7 +1148,7 @@
 
 	allow $1 proc_t:dir search;
 	allow $1 sysctl_t:dir r_dir_perms;
-	allow $1 sysctl_vm_t:dir list_dir_perms;
+	allow $1 sysctl_vm_t:dir rw_dir_perms;
 	allow $1 sysctl_vm_t:file rw_file_perms;
 ')
 
@@ -1433,7 +1433,7 @@
 
 	allow $1 proc_t:dir search;
 	allow $1 sysctl_t:dir r_dir_perms;
-	allow $1 sysctl_kernel_t:dir r_dir_perms;
+	allow $1 sysctl_kernel_t:dir rw_dir_perms;
 	allow $1 sysctl_kernel_t:file rw_file_perms;
 ')
 
policy/modules/services/apm.te +4 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apm.te serefpolicy-2.2.28/policy/modules/services/apm.te
@@ -226,6 +226,10 @@
 ')
 
 optional_policy(`
+	xserver_domtrans_xdm_xserver(apmd_t)
+')
+
+optional_policy(`
 	seutil_sigchld_newrole(apmd_t)
 ')
 
policy/modules/services/bluetooth.te +2 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bluetooth.te serefpolicy-2.2.28/policy/modules/services/bluetooth.te
@@ -220,6 +220,8 @@
 	')
 ')
 
+sysnet_read_config(bluetooth_helper_t)
+
 optional_policy(`
 	dbus_system_bus_client_template(bluetooth_helper,bluetooth_helper_t)
 	dbus_connect_system_bus(bluetooth_helper_t)
policy/modules/services/cups.te +3 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups.te serefpolicy-2.2.28/policy/modules/services/cups.te
@@ -375,7 +375,9 @@
 # HPLIP local policy
 #
 
+allow hplip_t self:capability net_raw;
 dontaudit hplip_t self:capability sys_tty_config;
+allow hplip_t self:fifo_file rw_file_perms;
 allow hplip_t self:process signal_perms;
 allow hplip_t self:unix_dgram_socket create_socket_perms;
 allow hplip_t self:unix_stream_socket create_socket_perms;
@@ -418,6 +420,7 @@
 dev_read_sysfs(hplip_t)
 dev_rw_printer(hplip_t)
 dev_read_urand(hplip_t)
+dev_rw_generic_usb_dev(hplip_t)
 
 fs_getattr_all_fs(hplip_t)
 fs_search_auto_mountpoints(hplip_t)
policy/modules/services/dovecot.te +2 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dovecot.te serefpolicy-2.2.28/policy/modules/services/dovecot.te
@@ -79,12 +79,14 @@
 corenet_tcp_bind_all_nodes(dovecot_t)
 corenet_tcp_bind_pop_port(dovecot_t)
 corenet_tcp_connect_all_ports(dovecot_t)
+corenet_tcp_connect_postgresql_port(dovecot_t)
 
 dev_read_sysfs(dovecot_t)
 dev_read_urand(dovecot_t)
 
 fs_getattr_all_fs(dovecot_t)
 fs_search_auto_mountpoints(dovecot_t)
+fs_list_inotifyfs(dovecot_t)
 
 term_dontaudit_use_console(dovecot_t)
 
policy/modules/services/hal.te +4 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.te serefpolicy-2.2.28/policy/modules/services/hal.te
@@ -211,6 +211,10 @@
 ')
 
 optional_policy(`
+        ntp_domtrans(hald_t)
+')
+
+optional_policy(`
 	nscd_socket_use(hald_t)
 ')
 
policy/modules/services/pegasus.te +1 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pegasus.te serefpolicy-2.2.28/policy/modules/services/pegasus.te
@@ -77,6 +77,7 @@
 corenet_tcp_bind_pegasus_https_port(pegasus_t)
 corenet_tcp_connect_pegasus_http_port(pegasus_t)
 corenet_tcp_connect_pegasus_https_port(pegasus_t)
+corenet_tcp_connect_generic_port(pegasus_t)
 
 dev_read_sysfs(pegasus_t)
 dev_read_urand(pegasus_t)
policy/modules/services/privoxy.te +5 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/privoxy.te serefpolicy-2.2.28/policy/modules/services/privoxy.te
@@ -51,6 +51,7 @@
 corenet_tcp_bind_http_cache_port(privoxy_t)
 corenet_tcp_connect_http_port(privoxy_t)
 corenet_tcp_connect_ftp_port(privoxy_t)
+corenet_tcp_connect_tor_port(privoxy_t)
 
 dev_read_sysfs(privoxy_t)
 
@@ -95,6 +96,10 @@
 ')
 
 optional_policy(`
+       nscd_socket_use(privoxy_t)
+')
+
+optional_policy(`
 	seutil_sigchld_newrole(privoxy_t)
 ')
 
policy/modules/services/xfs.te +1 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xfs.te serefpolicy-2.2.28/policy/modules/services/xfs.te
@@ -53,6 +53,7 @@
 
 files_read_etc_files(xfs_t)
 files_read_etc_runtime_files(xfs_t)
+files_read_usr_files(xfs_t)
 
 init_use_fds(xfs_t)
 init_use_script_ptys(xfs_t)
policy/modules/services/xserver.if +20 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xserver.if serefpolicy-2.2.28/policy/modules/services/xserver.if
@@ -1015,3 +1015,23 @@
 
 	dontaudit $1 xdm_xserver_t:tcp_socket { read write };
 ')
+
+########################################
+## <summary>
+##	Allow read and write to
+##	a XDM X server socket.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to allow
+##	</summary>
+## </param>
+#
+interface(`xserver_rw_xdm_sockets',`
+	gen_require(`
+		type xdm_xserver_tmp_t;
+	')
+
+	allow $1 xdm_xserver_tmp_t:dir search;
+	allow $1 xdm_xserver_tmp_t:sock_file { read write };
+')
policy/modules/system/authlogin.te +2 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlogin.te serefpolicy-2.2.28/policy/modules/system/authlogin.te
@@ -171,6 +171,8 @@
 dev_setattr_video_dev(pam_console_t)
 dev_getattr_xserver_misc_dev(pam_console_t)
 dev_setattr_xserver_misc_dev(pam_console_t)
+dev_getattr_generic_usb_dev(pam_console_t)
+dev_setattr_generic_usb_dev(pam_console_t)
 
 fs_search_auto_mountpoints(pam_console_t)
 
policy/modules/system/fstools.te +5 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstools.te serefpolicy-2.2.28/policy/modules/system/fstools.te
@@ -67,6 +67,10 @@
 dev_read_urand(fsadm_t)
 # Recreate /dev/cdrom.
 dev_manage_generic_symlinks(fsadm_t)
+
+# fdisk needs this for early boot
+dev_manage_generic_blk_files(fsadm_t)
+
 # Access to /initrd devices
 dev_search_usbfs(fsadm_t)
 # for swapon
@@ -75,6 +79,7 @@
 dev_getattr_usbfs_dirs(fsadm_t)
 # Access to /dev/mapper/control
 dev_rw_lvm_control(fsadm_t)
+dev_dontaudit_getattr_all_device_nodes(fsadm_t)
 
 fs_search_auto_mountpoints(fsadm_t)
 fs_getattr_xattr_fs(fsadm_t)
policy/modules/system/init.te +1 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.te serefpolicy-2.2.28/policy/modules/system/init.te
@@ -353,6 +353,7 @@
 files_mounton_isid_type_dirs(initrc_t)
 files_list_default(initrc_t)
 files_mounton_default(initrc_t)
+files_unlink_boot_flag(initrc_t)
 
 libs_rw_ld_so_cache(initrc_t)
 libs_use_ld_so(initrc_t)
policy/modules/system/libraries.fc +1 -1
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/libraries.fc serefpolicy-2.2.28/policy/modules/system/libraries.fc
@@ -148,7 +148,7 @@
 /usr/lib(64)?/php/modules/.*\.so		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 
 # Livna.org packages: xmms-mp3, ffmpeg, xvidcore, xine-lib, gsm, lame
-/usr/lib(64)?/xmms/Input/libmpg123\.so	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+/usr/lib(64)?.*/libmpg123\.so	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib(64)?/libpostproc\.so.*		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib(64)?/libavformat-.*\.so		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib(64)?/libavcodec-.*\.so		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
policy/modules/system/mount.te +2 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.te serefpolicy-2.2.28/policy/modules/system/mount.te
@@ -72,6 +72,8 @@
 # for when /etc/mtab loses its type
 # cjp: this seems wrong, the type should probably be etc
 files_read_isid_type_files(mount_t)
+# For reading cert files
+files_read_usr_files(mount_t)
 
 init_use_fds(mount_t)
 init_use_script_ptys(mount_t)
policy/modules/system/selinuxutil.fc +6 -0
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinuxutil.fc serefpolicy-2.2.28/policy/modules/system/selinuxutil.fc
@@ -33,6 +33,7 @@
 /usr/lib(64)?/selinux(/.*)?		gen_context(system_u:object_r:policy_src_t,s0)
 
 /usr/sbin/load_policy		--	gen_context(system_u:object_r:load_policy_exec_t,s0)
+/usr/sbin/restorecond		--	gen_context(system_u:object_r:restorecond_exec_t,s0)
 /usr/sbin/run_init		--	gen_context(system_u:object_r:run_init_exec_t,s0)
 /usr/sbin/setfiles.*		--	gen_context(system_u:object_r:setfiles_exec_t,s0)
 /usr/sbin/semodule		--	gen_context(system_u:object_r:semanage_exec_t,s0)
@@ -40,3 +41,8 @@
 ifdef(`distro_debian', `
 /usr/share/selinux(/.*)?		gen_context(system_u:object_r:policy_src_t,s0)
 ')
+
+#
+# /var/run
+#
+/var/run/restorecond.pid	--	gen_context(system_u:object_r:restorecond_var_run_t,s0)
policy/modules/system/selinuxutil.te +52 -0

70 lines not on this page · raw message

#1 lore raw
Quoted 10 lines · Daniel J Walsh

Added restorecond policy
fixed samba_selinux man page
logwatch looks for mounted files system on /mnt file context for yumex
groupadd and useradd need to read nsswitch hplib_port_t needed for 9100
add 6000 as valid xserver port
pam console needs to getattr/setattr usb_dev bluetooth tools want to read resolver
hplib_t fixes to work with additional devices (Usb printers

Quoted 8 lines

dovecot wants to talk to postgresql and use inotify hal needs to comunicate with ntp
pegasus needs to connect to random non reserved ports privoxy wants to use nscd and communicate with tor xfs needs to read fonts in usr_t
fstools need to be able to work with blk devices. (fsck) libmpg123 is moving
mount using some certificates stored in usr_t

Merged.

Quoted 1 line

setfiles needs trans_lock

I dropped this; I'm pretty sure its related to the leaked file descriptors in semodule too.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 22 lines · Christopher J. PeBenito
Quoted 10 lines · Daniel J Walsh

Added restorecond policy
fixed samba_selinux man page
logwatch looks for mounted files system on /mnt file context for yumex
groupadd and useradd need to read nsswitch hplib_port_t needed for 9100
add 6000 as valid xserver port
pam console needs to getattr/setattr usb_dev bluetooth tools want to read resolver
hplib_t fixes to work with additional devices (Usb printers

Quoted 9 lines

dovecot wants to talk to postgresql and use inotify hal needs to comunicate with ntp
pegasus needs to connect to random non reserved ports privoxy wants to use nscd and communicate with tor xfs needs to read fonts in usr_t
fstools need to be able to work with blk devices. (fsck) libmpg123 is moving
mount using some certificates stored in usr_t

Quoted 9 lines

Merged.

Quoted 2 lines

setfiles needs trans_lock

I dropped this; I'm pretty sure its related to the leaked file descriptors in semodule t

I have the leak code fixed, but am still seeing this. I will try it again without this code.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw
Quoted 6 lines · Daniel J Walsh
Quoted 3 lines · Christopher J. PeBenito

I dropped this; I'm pretty sure its related to the leaked file descriptors in semodule t

I have the leak code fixed, but am still seeing this. I will try it again without this code.

libsemanage patch wasn't right, so it is still leaking the descriptor.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.