commit: b39af892a3459615c9941f545574d9561db23ab2 Author: Chris PeBenito <pebenito <AT> ieee <DOT> org> AuthorDate: Thu Jan 28 16:27:54 2021 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Mon Feb 1 01:21:42 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b39af892
samba: Move service interface definitions. Signed-off-by: Chris PeBenito <pebenito <AT> ieee.org> Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> policy/modules/services/samba.if | 152 +++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/policy/modules/services/samba.if b/policy/modules/services/samba.if index 5e01db23..6af30d0c 100644 --- a/policy/modules/services/samba.if +++ b/policy/modules/services/samba.if @@ -328,6 +328,82 @@ interface(`samba_read_share_files',` read_files_pattern($1, samba_share_t, samba_share_t) ') +######################################## +## <summary> +## start samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_start',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service start; +') + +######################################## +## <summary> +## stop samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_stop',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service stop; +') + +######################################## +## <summary> +## get status of samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_status',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service status; +') + +######################################## +## <summary> +## reload samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_reload',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service reload; +') + ######################################## ## <summary> ## Search samba var directories. @@ -729,79 +805,3 @@ interface(`samba_admin',` files_list_tmp($1) admin_pattern($1, { swat_tmp_t smbd_tmp_t winbind_tmp_t }) ') - -######################################## -## <summary> -## start samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_start',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service start; -') - -######################################## -## <summary> -## stop samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_stop',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service stop; -') - -######################################## -## <summary> -## get status of samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_status',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service status; -') - -######################################## -## <summary> -## reload samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_reload',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service reload; -')