Chris PeBenito c22038
## <summary>Policy for dmesg.</summary>
Chris PeBenito c22038
Chris PeBenito c22038
########################################
Chris PeBenito 50aca6
## <summary>
Chris PeBenito 414e41
##	Execute dmesg in the dmesg domain.
Chris PeBenito 50aca6
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito c22038
#
Chris PeBenito 199895
interface(`dmesg_domtrans',`
Chris PeBenito 9e9138
	ifdef(`targeted_policy',`
Chris PeBenito 6f81e1
		gen_require(`
Chris PeBenito 6f81e1
			type dmesg_exec_t;
Chris PeBenito 6f81e1
		')
Chris PeBenito 6f81e1
Chris PeBenito 9e9138
		# $0(): disabled in targeted policy as there
Chris PeBenito 9e9138
		# is no dmesg domain.
Chris PeBenito 9e9138
	',`
Chris PeBenito 9e9138
		gen_require(`
Chris PeBenito 9e9138
			type dmesg_t, dmesg_exec_t;
Chris PeBenito 9e9138
		')
Chris PeBenito 0c73cd
Chris PeBenito 9e9138
		corecmd_search_sbin($1)
Chris PeBenito 9e9138
		domain_auto_trans($1,dmesg_exec_t,dmesg_t)
Chris PeBenito 0c73cd
Chris PeBenito 9e9138
		allow $1 dmesg_t:fd use;
Chris PeBenito 9e9138
		allow dmesg_t $1:fd use;
Chris PeBenito 9e9138
		allow dmesg_t $1:fifo_file rw_file_perms;
Chris PeBenito 9e9138
		allow dmesg_t $1:process sigchld;
Chris PeBenito 9e9138
	')
Chris PeBenito c22038
')
Chris PeBenito c22038
Chris PeBenito c22038
########################################
Chris PeBenito 50aca6
## <summary>
Chris PeBenito 414e41
##	Execute dmesg in the caller domain.
Chris PeBenito 50aca6
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito c22038
#
Chris PeBenito 199895
interface(`dmesg_exec',`
Chris PeBenito 9e9138
	ifdef(`targeted_policy',`
Chris PeBenito 9e9138
		# $0(): the dmesg program is an alias
Chris PeBenito 9e9138
		# of generic bin programs.
Chris PeBenito 9e9138
		corecmd_exec_bin($1)
Chris PeBenito 9e9138
	',`
Chris PeBenito 9e9138
		gen_require(`
Chris PeBenito 9e9138
			type dmesg_exec_t;
Chris PeBenito 9e9138
		')
Chris PeBenito 0c73cd
Chris PeBenito 9e9138
		corecmd_search_sbin($1)
Chris PeBenito 9e9138
		can_exec($1,dmesg_exec_t)
Chris PeBenito 9e9138
	')
Chris PeBenito c22038
')
Chris PeBenito c22038