aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'policy/modules/admin/dmesg.if')
-rw-r--r--policy/modules/admin/dmesg.if40
1 files changed, 40 insertions, 0 deletions
diff --git a/policy/modules/admin/dmesg.if b/policy/modules/admin/dmesg.if
new file mode 100644
index 000000000..e1973c789
--- /dev/null
+++ b/policy/modules/admin/dmesg.if
@@ -0,0 +1,40 @@
+## <summary>Policy for dmesg.</summary>
+
+########################################
+## <summary>
+## Execute dmesg in the dmesg domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`dmesg_domtrans',`
+ gen_require(`
+ type dmesg_t, dmesg_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ domtrans_pattern($1, dmesg_exec_t, dmesg_t)
+')
+
+########################################
+## <summary>
+## Execute dmesg in the caller domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`dmesg_exec',`
+ gen_require(`
+ type dmesg_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ can_exec($1, dmesg_exec_t)
+')