cardmgr.te patch
The attached patch against the latest release allows the administrator to run "cardctl eject", allows cardmgr to create device nodes when it wants to (should look into the possibility of changing the way cardmgr works), and allows dpkg to stop and start the card manager for upgrades.
It works for me and it's based on what works for Brian.
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
domains/program/cardmgr.te renamed from tmp/selinux/policy/domains/program/cardmgr.te +7 -3
@@ -9,9 +9,12 @@ # type cardmgr_t, domain, privlog; role system_r types cardmgr_t; +role sysadm_r types cardmgr_t; every_domain(cardmgr_t) type cardmgr_exec_t, file_type, sysadmfile, exec_type; domain_auto_trans(initrc_t, cardmgr_exec_t, cardmgr_t) +type cardctl_exec_t, file_type, sysadmfile, exec_type; +domain_auto_trans(sysadm_t, cardctl_exec_t, cardmgr_t) type_transition init_t cardmgr_exec_t:process cardmgr_t; # Use capabilities (net_admin for route), setuid for cardctl
@@ -26,11 +29,12 @@ # for /etc/resolv.conf file_type_auto_trans(cardmgr_t, etc_t, resolv_conf_t) +# allow cardmgr to write to the sysadm terminal (otherwise it will not start) +allow cardmgr_t { sysadm_tty_device_t sysadm_devpts_t }:chr_file { read write }; + # Create pid file and temporary block and character device nodes type cardmgr_var_run_t, file_type, sysadmfile, pidfile; -file_type_auto_trans(cardmgr_t, { var_run_t devfs_t }, cardmgr_var_run_t) -allow cardmgr_t cardmgr_var_run_t:{ chr_file blk_file } create_file_perms; -type_transition cardmgr_t { var_run_t devfs_t }:{ chr_file blk_file } cardmgr_var_run_t; +file_type_auto_trans(cardmgr_t, { var_run_t device_t }, cardmgr_var_run_t, { blk_file chr_file file }) # Create stab file. type cardmgr_var_lib_t, file_type, sysadmfile;
domains/program/dpkg.te renamed from tmp/selinux/policy/domains/program/dpkg.te +1 -1
@@ -40,7 +40,7 @@ ifdef(`cardmgr.te', ` allow cardmgr_t dpkg_t:fd use; allow cardmgr_t dpkg_t:fifo_file write; -domain_auto_trans(dpkg_t, cardmgr_exec_t, cardmgr_t) +domain_auto_trans(dpkg_t, { cardctl_exec_t cardmgr_exec_t }, cardmgr_t) ') ifdef(`netscape.te', ` # hate to do this, for netscape install scripts
file_contexts/program/cardmgr.fc renamed from tmp/selinux/policy/file_contexts/program/cardmgr.fc +1 -1
@@ -1,5 +1,5 @@ # cardmgr /sbin/cardmgr system_u:object_r:cardmgr_exec_t -/sbin/cardctl system_u:object_r:cardmgr_exec_t +/sbin/cardctl system_u:object_r:cardctl_exec_t /var/run/stab system_u:object_r:cardmgr_var_run_t /etc/apm/event.d/pcmcia system_u:object_r:cardmgr_exec_t
Quoted 6 lines · Russell Coker
The attached patch against the latest release allows the administrator to run "cardctl eject", allows cardmgr to create device nodes when it wants to (should look into the possibility of changing the way cardmgr works), and allows dpkg to stop and start the card manager for upgrades.
It works for me and it's based on what works for Brian.
Merged and available in the sourceforge CVS.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
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.