Skip to contentSkip to conversation

nfs policy fixes

PATCH Thomas Bleher 2 participants 2 messages Jul 16, 2004 – Jul 17, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

This patch adds some permissions for nfs homedirs. It only adds permissions which were already there for non-nfs homedirs. Additionally it dontaudits a small denial in gpg_macros.te.

Please apply.

Thomas

Signature · 2 lines
http://www.cip.ifi.lmu.de/~bleher/selinux/ - my SELinux pages
GPG-Fingerprint: BC4F BB16 30D6 F253 E3EA  D09E C562 2BAE B2F4 ABE7
macros/program/gpg_macros.te +5 -1
@@ -34,7 +34,7 @@
 can_network($1_gpg_t)
 
 # for a bug in kmail
-dontaudit $1_gpg_t $1_t:unix_stream_socket { read write };
+dontaudit $1_gpg_t $1_t:unix_stream_socket { getattr read write };
 
 # The user role is authorized for this domain.
 role $1_r types $1_gpg_t;
@@ -84,6 +84,10 @@
 # allow the usual access to /tmp
 file_type_auto_trans($1_gpg_t, tmp_t, $1_tmp_t)
 
+ifdef(`nfs_home_dirs', `
+create_dir_file($1_gpg_t, nfs_t)
+')dnl end if nfs_home_dirs
+
 allow $1_gpg_t self:capability { ipc_lock setuid };
 allow $1_gpg_t devtty_t:chr_file rw_file_perms;
 
macros/program/lpr_macros.te +3 -0
@@ -79,6 +79,9 @@
 allow sysadm_lpr_t $1_home_t:{ file lnk_file } r_file_perms;  
 allow $1_lpr_t { home_root_t $1_home_t $1_home_dir_t }:dir search;  
 allow $1_lpr_t $1_home_t:{ file lnk_file } r_file_perms;  
+ifdef(`nfs_home_dirs', `
+r_dir_file($1_lpr_t, nfs_t)
+')dnl end if nfs_home_dirs
 
 # Read and write shared files in the spool directory.
 allow $1_lpr_t print_spool_t:file rw_file_perms;
macros/program/mta_macros.te +3 -0
@@ -95,6 +95,9 @@
 
 # Create dead.letter in user home directories.
 file_type_auto_trans($1_mail_t, $1_home_dir_t, $1_home_t, file)
+ifdef(`nfs_home_dirs', `
+rw_dir_create_file($1_mail_t, nfs_t)
+')dnl end if nfs_home_dirs
 
 # if you do not want to allow dead.letter then use the following instead
 #allow $1_mail_t { $1_home_dir_t $1_home_t }:dir r_dir_perms;
macros/program/screen_macros.te +3 -0
@@ -50,6 +50,9 @@
 allow $1_screen_t $1_home_screen_t:{ file lnk_file } r_file_perms;
 allow $1_t $1_home_screen_t:{ file lnk_file } create_file_perms;
 allow $1_t $1_home_screen_t:{ file lnk_file } { relabelfrom relabelto };
+ifdef(`nfs_home_dirs', `
+r_dir_file($1_screen_t, nfs_t)
+')dnl end if nfs_home_dirs
 
 allow $1_screen_t privfd:fd use;
 
#1 lore raw
Quoted 3 lines · Thomas Bleher

This patch adds some permissions for nfs homedirs. It only adds permissions which were already there for non-nfs homedirs. Additionally it dontaudits a small denial in gpg_macros.te.

That denial should be fixed in the calling code. Ideally the MUA (or whatever program you are using) should close all file handles that aren't needed after the fork and before the exec.

The patch is good, I've included it in my tree.

Signature · 9 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

--
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.