Interfaces to access rwho private date
I think we should define access to all private data types, and define all interfaces to this data. This will allow third parties building policy modules to easily use the interfaces. Currently many times when I go to build a policy module, other domains do not have a complete set of interfaces.
policy/modules/services/rwho.if +84 -1
@@ -1 +1,84 @@ -## <summary>Who is logged in on other machines?</summary> + +## <summary>policy for rwho</summary> + +######################################## +## <summary> +## Execute a domain transition to run rwho. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed to transition. +## </summary> +## </param> +# +interface(`rwho_domtrans',` + gen_require(` + type rwho_t, rwho_exec_t; + ') + + domain_auto_trans($1,rwho_exec_t,rwho_t) + + allow rwho_t $1:fd use; + allow rwho_t $1:fifo_file rw_file_perms; + allow rwho_t $1:process sigchld; +') + +######################################## +## <summary> +## Search rwho spool directories. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`rwho_search_spool',` + gen_require(` + type rwho_spool_t; + ') + + allow $1 rwho_spool_t:dir search_dir_perms; + files_search_spool($1) +') + +######################################## +## <summary> +## Read rwho spool files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`rwho_read_spool_files',` + gen_require(` + type rwho_spool_t; + ') + + allow $1 rwho_spool_t:file r_file_perms; + allow $1 rwho_spool_t:dir list_dir_perms; + files_search_spool($1) +') + +######################################## +## <summary> +## Create, read, write, and delete +## rwho spool files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`rwho_manage_spool_files',` + gen_require(` + type rwho_spool_t; + ') + + allow $1 rwho_spool_t:file manage_file_perms; + allow $1 rwho_spool_t:dir rw_dir_perms; + files_search_spool($1) +')
+
--
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.