diff options
Diffstat (limited to 'policy/modules/contrib/games.if')
-rw-r--r-- | policy/modules/contrib/games.if | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/policy/modules/contrib/games.if b/policy/modules/contrib/games.if new file mode 100644 index 000000000..7ac736d3a --- /dev/null +++ b/policy/modules/contrib/games.if @@ -0,0 +1,51 @@ +## <summary>Games</summary> + +############################################################ +## <summary> +## Role access for games +## </summary> +## <param name="role"> +## <summary> +## Role allowed access +## </summary> +## </param> +## <param name="domain"> +## <summary> +## User domain for the role +## </summary> +## </param> +# +interface(`games_role',` + gen_require(` + type games_t, games_exec_t; + ') + + role $1 types games_t; + + domtrans_pattern($2, games_exec_t, games_t) + allow $2 games_t:unix_stream_socket connectto; + allow games_t $2:unix_stream_socket connectto; + + # Allow the user domain to signal/ps. + ps_process_pattern($2, games_t) + allow $2 games_t:process signal_perms; +') + +######################################## +## <summary> +## Allow the specified domain to read/write +## games data. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`games_rw_data',` + gen_require(` + type games_data_t; + ') + + rw_files_pattern($1, games_data_t, games_data_t) +') |