Skip to contentSkip to conversation

policy patches needed for Fedora

PATCH Russell Coker 2 participants 2 messages Sep 23, 2004 – Sep 28, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The attached patch allows domains that run before a tmpfs /dev is labelled correctly to access tmpfs_t:chr_file and tmpfs_t:dir for Fedora.

For all systems I allow initrc_t to access usbfs_t. It's necessary right now on Fedora and probably will be on other systems in the near future.

Signature · 4 lines
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
program/unused/hotplug.te renamed from usr/src/se/policy/domains/program/unused/hotplug.te +3 -0
@@ -47,6 +47,9 @@
 ifdef(`distro_redhat', `
 # for arping used for static IP addresses on PCMCIA ethernet
 domain_auto_trans(hotplug_t, netutils_exec_t, netutils_t)
+
+allow hotplug_t tmpfs_t:dir search;
+allow hotplug_t tmpfs_t:chr_file rw_file_perms;
 ')dnl end if distro_redhat
 ')dnl end if netutils.te
 
program/hostname.te renamed from usr/src/se/policy/domains/program/hostname.te +4 -1
@@ -22,4 +22,7 @@
 
 # for when /usr is not mounted
 dontaudit hostname_t file_t:dir search;
-dontaudit hostname_t tmpfs_t:chr_file { read write };
+
+ifdef(`distro_redhat', `
+allow hostname_t tmpfs_t:chr_file rw_file_perms;
+')
program/mount.te renamed from usr/src/se/policy/domains/program/mount.te +1 -1
@@ -97,6 +97,6 @@
 can_exec(mount_t, { sbin_t bin_t })
 allow mount_t device_t:dir r_dir_perms;
 ifdef(`distro_redhat', `
-dontaudit mount_t tmpfs_t:chr_file { read write };
+allow mount_t tmpfs_t:chr_file { read write };
 allow mount_t tmpfs_t:dir { mounton };
 ')
program/initrc.te renamed from usr/src/se/policy/domains/program/initrc.te +5 -0
@@ -48,6 +48,8 @@
 allow initrc_t usbdevfs_t:dir r_dir_perms;
 allow initrc_t usbdevfs_t:lnk_file r_file_perms;
 allow initrc_t usbdevfs_t:file getattr;
+allow initrc_t usbfs_t:dir r_dir_perms;
+allow initrc_t usbfs_t:file getattr;
 
 # allow initrc to fork and renice itself
 allow initrc_t self:process { fork sigchld setsched setpgid setrlimit };
@@ -199,6 +201,9 @@
 allow initrc_t boot_t:lnk_file rw_file_perms;
 file_type_auto_trans(initrc_t, boot_t, boot_runtime_t, file)
 
+allow initrc_t tmpfs_t:chr_file rw_file_perms;
+allow initrc_t tmpfs_t:dir r_dir_perms;
+
 #
 # readahead asks for these
 #
#1 lore raw

Dan had already picked up everything except the hostname stuff in his Sep 27th patch. I merged the hostname part.

Quoted 5 lines · Russell Coker

The attached patch allows domains that run before a tmpfs /dev is labelled correctly to access tmpfs_t:chr_file and tmpfs_t:dir for Fedora.

For all systems I allow initrc_t to access usbfs_t. It's necessary right now on Fedora and probably will be on other systems in the near future.

Signature · 7 lines
James Carter <[email protected]>
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.