From ee9500ec86756f4e487e381618c3bc1b274e9f99 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Fri, 3 Feb 2006 14:48:12 +0000 Subject: [PATCH] fix userdom_create_sysadm_home --- refpolicy/policy/modules/admin/amanda.te | 2 +- refpolicy/policy/modules/system/userdomain.if | 24 ++++++------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/refpolicy/policy/modules/admin/amanda.te b/refpolicy/policy/modules/admin/amanda.te index ccb9d980..b4e07e0c 100644 --- a/refpolicy/policy/modules/admin/amanda.te +++ b/refpolicy/policy/modules/admin/amanda.te @@ -206,7 +206,7 @@ allow amanda_recover_t amanda_recover_dir_t:file create_file_perms; allow amanda_recover_t amanda_recover_dir_t:lnk_file create_lnk_perms; allow amanda_recover_t amanda_recover_dir_t:sock_file create_file_perms; allow amanda_recover_t amanda_recover_dir_t:fifo_file create_file_perms; -userdom_create_sysadm_home(amanda_recover_t,amanda_recover_dir_t,{ dir file lnk_file sock_file fifo_file }) +userdom_filetrans_sysadm_home_dir(amanda_recover_t,amanda_recover_dir_t,{ dir file lnk_file sock_file fifo_file }) allow amanda_recover_t amanda_tmp_t:dir create_dir_perms; allow amanda_recover_t amanda_tmp_t:file create_file_perms; diff --git a/refpolicy/policy/modules/system/userdomain.if b/refpolicy/policy/modules/system/userdomain.if index d95ac0cf..3212b7d7 100644 --- a/refpolicy/policy/modules/system/userdomain.if +++ b/refpolicy/policy/modules/system/userdomain.if @@ -3202,31 +3202,21 @@ interface(`userdom_dontaudit_read_sysadm_home_files',` ## ## Domain allowed access. ## -## +## +## The type of the object to be created. +## +## ## The class of the object to be created. ## If not specified, file is used. ## # -interface(`userdom_create_sysadm_home',` +interface(`userdom_filetrans_sysadm_home_dir',` gen_require(` - type sysadm_home_dir_t, sysadm_home_t; + type sysadm_home_dir_t; ') allow $1 sysadm_home_dir_t:dir rw_dir_perms; - - ifelse(`$2',`',` - ifelse(`$3',`',` - type_transition $1 sysadm_home_dir_t:file sysadm_home_t; - ',` - type_transition $1 sysadm_home_dir_t:$3 sysadm_home_t; - ') - ',` - ifelse(`$3',`',` - type_transition $1 sysadm_home_dir_t:file $2; - ',` - type_transition $1 sysadm_home_dir_t:$3 $2; - ') - ') + type_transition $1 sysadm_home_dir_t:$3 $2; ') ########################################