Skip to contentSkip to conversation

give userspace_objmgr access to default_context_t

PATCH In review Colin Walters 2 participants 2 messages Oct 23, 2004 – Oct 29, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 give userspace_objmgr access to default_context_t

Hi,

Most userspace object managers (e.g. D-BUS) will need access to default contexts files. I think these used to just be selinux_config_t but seem to have switched recently.

I noticed two domains, updfstab and udev are both likely candidates for the userspace_objmgr attribute, since they have this:

domains/program/updfstab.te:r_dir_file(updfstab_t, { selinux_config_t file_context_t default_context_t } )

Right now neither of them get security decisions, but it doesn't seem unlikely in the future.

domains/misc/userspace_objmgr.te +2 -2
@@ -6,8 +6,8 @@
 can_getcon(userspace_objmgr)
 # Get security decisions via selinuxfs.
 can_getsecurity(userspace_objmgr)
-# Read /etc/selinux/config.
-r_dir_file(userspace_objmgr, selinux_config_t)
+# Read /etc/selinux
+r_dir_file(userspace_objmgr, { selinux_config_t default_context_t })
 # Receive notifications of policy reloads and enforcing status changes.
 allow userspace_objmgr self:netlink_selinux_socket { create bind read };
 
#1 lore raw

Merged.

Quoted 13 lines · Colin Walters

Hi,

Most userspace object managers (e.g. D-BUS) will need access to default contexts files. I think these used to just be selinux_config_t but seem to have switched recently.

I noticed two domains, updfstab and udev are both likely candidates for the userspace_objmgr attribute, since they have this:

domains/program/updfstab.te:r_dir_file(updfstab_t, { selinux_config_t file_context_t default_context_t } )

Right now neither of them get security decisions, but it doesn't seem unlikely in the 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.