61 lines
1.2 KiB
Plaintext
61 lines
1.2 KiB
Plaintext
## <summary>Policy for dmesg.</summary>
|
|
|
|
########################################
|
|
## <summary>
|
|
## Execute dmesg in the dmesg domain.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## The type of the process performing this action.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
interface(`dmesg_domtrans',`
|
|
ifdef(`targeted_policy',`
|
|
gen_require(`
|
|
type dmesg_exec_t;
|
|
')
|
|
|
|
# $0(): disabled in targeted policy as there
|
|
# is no dmesg domain.
|
|
',`
|
|
gen_require(`
|
|
type dmesg_t, dmesg_exec_t;
|
|
')
|
|
|
|
corecmd_search_sbin($1)
|
|
domain_auto_trans($1,dmesg_exec_t,dmesg_t)
|
|
|
|
allow $1 dmesg_t:fd use;
|
|
allow dmesg_t $1:fd use;
|
|
allow dmesg_t $1:fifo_file rw_file_perms;
|
|
allow dmesg_t $1:process sigchld;
|
|
')
|
|
')
|
|
|
|
########################################
|
|
## <summary>
|
|
## Execute dmesg in the caller domain.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## The type of the process performing this action.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
interface(`dmesg_exec',`
|
|
ifdef(`targeted_policy',`
|
|
# $0(): the dmesg program is an alias
|
|
# of generic bin programs.
|
|
corecmd_exec_bin($1)
|
|
',`
|
|
gen_require(`
|
|
type dmesg_exec_t;
|
|
')
|
|
|
|
corecmd_search_sbin($1)
|
|
can_exec($1,dmesg_exec_t)
|
|
')
|
|
')
|
|
|