my latest effort at a devfsd policy
Tell me what you think.
Signature · 4 lines
If you send email to me or to a mailing list that I use which has >4 lines of legalistic junk at the end then you are specifically authorizing me to do whatever I wish with the message and all other messages from your domain, by posting the message you agree that your long legalistic sig is void.
#
# Author: Russell Coker <[email protected]>
#
#################################
#
# Rules for the devfsd_t domain.
#
type devfsd_t, domain, privlog;
type devfsd_exec_t, file_type, sysadmfile, exec_type;
role system_r types devfsd_t;
# Inherit and use descriptors from init.
allow devfsd_t init_t:fd inherit_fd_perms;
allow devfsd_t init_t:process sigchld;
allow devfsd_t devfsd_t:process fork;
# Create pid file.
type devfsd_var_run_t, file_type, sysadmfile, pidfile; file_type_auto_trans(devfsd_t, var_run_t, devfsd_var_run_t)
# Run /sbin/modprobe domain_auto_trans(devfsd_t, insmod_exec_t, insmod_t)
allow devfsd_t devfsd_t:capability chown;
# allow devfsd to change any object from type devfsd_t to any other type
# also allow to unlink
allow devfsd_t devfs_t:dir_file_class_set { getattr setattr relabelfrom unlink };
# allow devfsd to get and set attributes of any device node and to change the
# type to any device type
allow devfsd_t all_device_types:dir_file_class_set { getattr setattr relabelto };
allow devfsd_t all_device_types:dir r_dir_perms;
allow devfsd_t { devpts_t printer_t }:dir_file_class_set { getattr setattr relabelto };
allow devfsd_t { devpts_t printer_t }:dir r_dir_perms;# allow all devices to be under devfs_t allow domain devfs_t:filesystem associate;
# allow context lookups allow devfsd_t security_t:security context_to_sid;
# allow anyone to read devfs allow domain devfs_t:dir r_dir_perms; allow domain devfs_t:lnk_file r_file_perms;
# allow the permissions and symlinks to be done allow devfsd_t devfs_t:lnk_file create_file_perms; allow devfsd_t devfs_t:dir rw_dir_perms; allow devfsd_t devfs_t:chr_file r_file_perms; domain_auto_trans(initrc_t, devfsd_exec_t, devfsd_t) uses_shlib(devfsd_t)