Skip to contentSkip to conversation

init.te

PATCH Russell Coker 2 participants 2 messages Jul 11, 2004 – Jul 12, 2004

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

There should never be a sock_file or fifo_file object labelled as sbin_t or bin_t, so there is no benefit in granting init_t such access.

I can't think of any reason for granting init_t access to exec_type (except possibly a gross error in some other part of policy), and booting a rawhide machine without such access does not give any audit messages.

I have drastically reduced the access of init_t to sbin_t, bin_t, and removed access to exec_type, the patch is attached.

Steve, please put this in the CVS.

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
domains/program/init.te renamed from usr/src/se/policy/domains/program/init.te +3 -6
diff -ru /usr/src/se/policy/domains/program/init.te ./domains/program/init.te
@@ -70,11 +70,8 @@
 allow init_t self:fifo_file rw_file_perms;
 
 # Permissions required for system startup
-allow init_t bin_t:dir { read getattr lock search ioctl };
-allow init_t bin_t:{ file lnk_file sock_file fifo_file } { read getattr lock ioctl };
-allow init_t exec_type:{ file lnk_file } { read getattr lock ioctl };
-allow init_t sbin_t:dir { read getattr lock search ioctl };
-allow init_t sbin_t:{ file lnk_file sock_file fifo_file } { read getattr lock ioctl };
+allow init_t { bin_t sbin_t }:dir r_dir_perms;
+allow init_t { bin_t sbin_t }:{ file lnk_file } { read getattr lock ioctl };
 
 # allow init to fork
 allow init_t self:process { fork sigchld };
@@ -136,4 +133,4 @@
 ')
 r_dir_file(init_t, sysfs_t)
 
-r_dir_file( init_t, selinux_config_t)
+r_dir_file(init_t, selinux_config_t)
#1 lore raw
Quoted 11 lines · Russell Coker

There should never be a sock_file or fifo_file object labelled as sbin_t or bin_t, so there is no benefit in granting init_t such access.

I can't think of any reason for granting init_t access to exec_type (except possibly a gross error in some other part of policy), and booting a rawhide machine without such access does not give any audit messages.

I have drastically reduced the access of init_t to sbin_t, bin_t, and removed access to exec_type, the patch is attached.

Steve, please put this in the CVS.

Thanks, merged.

Signature · 8 lines
Stephen Smalley <[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.