diff options
Diffstat (limited to 'policy/modules/apps/gitosis.if')
-rw-r--r-- | policy/modules/apps/gitosis.if | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/policy/modules/apps/gitosis.if b/policy/modules/apps/gitosis.if new file mode 100644 index 00000000..d9d222dc --- /dev/null +++ b/policy/modules/apps/gitosis.if @@ -0,0 +1,45 @@ +## <summary>Tools for managing and hosting git repositories.</summary> + +####################################### +## <summary> +## Execute a domain transition to run gitosis. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed to transition. +## </summary> +## </param> +# +interface(`gitosis_domtrans',` + gen_require(` + type gitosis_t, gitosis_exec_t; + ') + + domtrans_pattern($1, gitosis_exec_t, gitosis_t) +') + +####################################### +## <summary> +## Execute gitosis-serve in the gitosis domain, and +## allow the specified role the gitosis domain. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access +## </summary> +## </param> +## <param name="role"> +## <summary> +## Role allowed access. +## </summary> +## </param> +# +interface(`gitosis_run',` + gen_require(` + type gitosis_t; + ') + + gitosis_domtrans($1) + role $2 types gitosis_t; +') + |