Chris PeBenito 7591e8
## <module name="dmesg" layer="admin">
Chris PeBenito c22038
## <summary>Policy for dmesg.</summary>
Chris PeBenito c22038
Chris PeBenito c22038
########################################
Chris PeBenito c9428d
## <interface name="dmesg_domtrans">
Chris PeBenito c22038
##	<description>
Chris PeBenito c22038
##		Execute dmesg in the dmesg domain.
Chris PeBenito c22038
##	</description>
Chris PeBenito c22038
##	<parameter name="domain">
Chris PeBenito c22038
##		The type of the process performing this action.
Chris PeBenito c22038
##	</parameter>
Chris PeBenito c22038
## </interface>
Chris PeBenito c22038
#
Chris PeBenito c9428d
define(`dmesg_domtrans',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type dmesg_t, dmesg_exec_t;
Chris PeBenito 7f2e39
		class process sigchld;
Chris PeBenito 7f2e39
		class fd use;
Chris PeBenito 7f2e39
		class fifo_file rw_file_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito 7f2e39
	corecmd_search_sbin($1)
Chris PeBenito 7f2e39
	domain_auto_trans($1,dmesg_exec_t,dmesg_t)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 dmesg_t:fd use;
Chris PeBenito 0c73cd
	allow dmesg_t $1:fd use;
Chris PeBenito 0c73cd
	allow dmesg_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow dmesg_t $1:process sigchld;
Chris PeBenito c22038
')
Chris PeBenito c22038
Chris PeBenito c22038
########################################
Chris PeBenito c9428d
## <interface name="dmesg_exec">
Chris PeBenito c22038
##	<description>
Chris PeBenito c22038
##		Execute dmesg in the caller domain.
Chris PeBenito c22038
##	</description>
Chris PeBenito c22038
##	<parameter name="domain">
Chris PeBenito c22038
##		The type of the process performing this action.
Chris PeBenito c22038
##	</parameter>
Chris PeBenito c22038
## </interface>
Chris PeBenito c22038
#
Chris PeBenito c9428d
define(`dmesg_exec',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type dmesg_exec_t;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito 7f2e39
	corecmd_search_sbin($1)
Chris PeBenito dc67f7
	can_exec($1,dmesg_exec_t)
Chris PeBenito c22038
')
Chris PeBenito c22038
Chris PeBenito c22038
## </module>