Skip to contentSkip to conversation

add proc_fs attribute

PATCH In review Colin Walters 2 participants 2 messages Sep 14, 2004 – Sep 15, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add proc_fs attribute

Hi,

The attached patch should fix this denial:

audit(1095188105.721:0): avc: denied { read }
for pid=2789 exe=/sbin/mdadm name=mdstat dev=proc ino=-268435080 scontext=user_u:system_r:unconfined_t tcontext=system_u:object_r:proc_mdstat_t tclass=file

attrib.te renamed from attrib.te~ +4 -0
@@ -209,6 +209,10 @@
 # files, sockets, or pipes under /dev.
 attribute dev_fs;
 
+# The proc_fs attribute identifies all types that may be assigned to
+# files under /proc.
+attribute proc_fs;
+
 # The sysadmfile attribute identifies all types assigned to files 
 # that should be completely accessible to administrators.  It is used
 # in TE rules to grant such access for administrator domains.
macros/global_macros.te renamed from macros/global_macros.te~ +1 -1
@@ -553,7 +553,7 @@
 # pseudo filesystem types that are applied to both the filesystem
 # and its files.
 allow $1 { unlabeled_t fs_type }:dir_file_class_set *;
-allow $1 { proc_kmsg_t proc_kcore_t }: file *;
+allow $1 { proc_fs }: file *;
 
 # For /proc/pid
 r_dir_file($1,domain)
types/procfs.te renamed from types/procfs.te~ +4 -4
@@ -12,10 +12,10 @@
 # proc_kmsg_t is the type of /proc/kmsg.
 # proc_kcore_t is the type of /proc/kcore.
 #
-type proc_t, fs_type, root_dir_type;
-type proc_kmsg_t;
-type proc_kcore_t;
-type proc_mdstat_t;
+type proc_t, fs_type, proc_fs, root_dir_type;
+type proc_kmsg_t, proc_fs;
+type proc_kcore_t, proc_fs;
+type proc_mdstat_t, proc_fs;
 
 #
 # sysctl_t is the type of /proc/sys.
#1 lore raw

Merged as part of Dan's second patch.

Quoted 8 lines · Colin Walters

Hi,

The attached patch should fix this denial:

audit(1095188105.721:0): avc: denied { read }
for pid=2789 exe=/sbin/mdadm name=mdstat dev=proc ino=-268435080 scontext=user_u:system_r:unconfined_t tcontext=system_u:object_r:proc_mdstat_t tclass=file

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.