New SE-DBUS patch
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
I'm testing out the Matthew's SE-DBUS stuff, and due to the new netlink classes, the dbus classes have to be moved later in the flask definitions in order to prevent conflict. It would be a good idea I think to apply the flask changes now, so things don't have to be adjusted when more new classes are defined.
Also I needed the following changes to the D-BUS SELinux policy itself to get it to run. Since a number of the changes I think affect any userspace object manager, I abstracted it out into a new attribute that could also be applied to e.g. SE-X.
I'm working on testing the service activation bits now.
access_vectors renamed from access_vectors~ +10 -0
@@ -549,3 +549,13 @@ class netlink_dnrt_socket inherits socket + +# Define the access vector interpretation for controlling +# access and communication through the D-BUS messaging +# system. +# +class dbus +{ + acquire_svc + send_msg +}
security_classes renamed from security_classes~ +2 -0
@@ -74,4 +74,6 @@ class netlink_ip6fw_socket class netlink_dnrt_socket +class dbus + # FLASK
domains/userspace_objmgr.te new file +9 -0
@@ -0,0 +1,9 @@ +#DESC Userspace Object Managers +# +################################# + +can_getsecurity(userspace_objmgr) +# For determining SELinux policy type +allow userspace_objmgr selinux_config_t:file { getattr read }; +# For notifications of policy reloads +allow userspace_objmgr self:netlink_selinux_socket { create bind read };
domains/program/dbusd.te renamed from src/work/rpms/selinux-policy-strict/noarch/etc/selinux/strict/src/policy/domains/program/dbusd.te +5 -1
@@ -2,20 +2,24 @@ # # Author: Russell Coker <[email protected]> -daemon_domain(dbusd) +daemon_domain(dbusd, `, userspace_objmgr') type etc_dbusd_t, file_type, sysadmfile; allow dbusd_t dbusd_var_run_t:sock_file { create getattr setattr unlink }; r_dir_file(dbusd_t, etc_dbusd_t) allow dbusd_t self:unix_stream_socket create_stream_socket_perms; +allow dbusd_t self:unix_dgram_socket create_socket_perms; allow dbusd_t etc_t:file { getattr read }; # dac_override: /var/run/dbus is owned by messagebus on Debian allow dbusd_t self:capability { dac_override setgid setuid }; +allow dbusd_t self:file { getattr read }; +allow dbusd_t proc_t:file { read }; # I expect we need more than this allow { dbus_client_domain userdomain } dbusd_var_run_t:dir search; allow { dbus_client_domain userdomain } dbusd_var_run_t:sock_file { write }; allow { dbus_client_domain userdomain } dbusd_t:unix_stream_socket { connectto }; +allow { dbus_client_domain userdomain } dbusd_t:dbus { send_msg }; can_ypbind(dbusd_t)
attrib.te renamed from src/work/rpms/selinux-policy-strict/noarch/etc/selinux/strict/src/policy/attrib.te +4 -0
@@ -59,6 +59,10 @@ # constraints configuration. attribute privrole; +# The userspace_objmgr attribute identifies every domain +# which enforces its own policy. +attribute userspace_objmgr; + # The priv_system_role attribute identifies every domain that can # change role from a user role to system_r role, and identity from a user # identity to system_u. It is used in the constraints configuration.
Quoted 5 lines · Colin Walters
I'm testing out the Matthew's SE-DBUS stuff, and due to the new netlink classes, the dbus classes have to be moved later in the flask definitions in order to prevent conflict. It would be a good idea I think to apply the flask changes now, so things don't have to be adjusted when more new classes are defined.
Thanks, merged.
Quoted 4 lines
Also I needed the following changes to the D-BUS SELinux policy itself to get it to run. Since a number of the changes I think affect any userspace object manager, I abstracted it out into a new attribute that could also be applied to e.g. SE-X.
Ok, merged. I moved userspace_objmgr.te under domains/misc.
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.