dbus policy
Subsystems (2)
The attached patch grants dbusd_t full access to dbusd_var_run_t (no reason why it shouldn't).
Adds ifdef(`pamconsole.te', to prevent compilation errors if you don't include pamconsole.te.
Allows dbus clients to search /var/run (can't access dbus otherwise).
It also adds the below line which may be controversial. I believe that any domain which is a dbus client will need to send dbus messages to itself and there is no benefit in denying it. Colin, as the expert in this area please let me know what you think. Steve, you may consider not applying the last part of this patch unless you receive positive feedback from Colain.
allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg };
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
program/unused/dbusd.te renamed from usr/src/se/policy/domains/program/unused/dbusd.te +5 -5
@@ -5,9 +5,11 @@ 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 }; +allow dbusd_t dbusd_var_run_t:sock_file create_file_perms; +ifdef(`pamconsole.te', ` r_dir_file(dbusd_t, pam_var_console_t) +') r_dir_file(dbusd_t, etc_dbusd_t) allow dbusd_t self:unix_stream_socket create_stream_socket_perms;
@@ -21,7 +23,7 @@ can_ypbind(dbusd_t) # I expect we need more than this -allow { dbus_client_domain userdomain } dbusd_var_run_t:dir search; +allow { dbus_client_domain userdomain } { var_run_t 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 };
@@ -29,6 +31,4 @@ r_dir_file(dbusd_t,selinux_config_t) # SE-DBus specific permissions -allow { dbus_client_domain userdomain } dbusd_t:dbus { send_msg }; -allow userdomain self:dbus { send_msg }; - +allow { dbus_client_domain userdomain } { dbusd_t self }:dbus { send_msg };
Quoted 8 lines · Russell Coker
The attached patch grants
dbusd_tfull access todbusd_var_run_t(no reason why it shouldn't).Adds ifdef(`pamconsole.te', to prevent compilation errors if you don't include pamconsole.te.
Allows dbus clients to search
/var/run(can't access dbus otherwise).
Quoted 7 lines
It also adds the below line which may be controversial. I believe that any domain which is a dbus client will need to send dbus messages to itself and there is no benefit in denying it. Colin, as the expert in this area please let me know what you think. Steve, you may consider not applying the last part of this patch unless you receive positive feedback from Colain.
allow {
dbus_client_domainuserdomain } {dbusd_tself }:dbus {send_msg};
This all looks good to me.
--
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.