2005-05-26 15:50:53 +00:00
|
|
|
## <summary>Policy for dmesg.</summary>
|
|
|
|
|
|
|
|
########################################
|
2005-07-15 20:45:26 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute dmesg in the dmesg domain.
|
2005-07-15 20:45:26 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-26 15:50:53 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dmesg_domtrans',`
|
2005-11-14 20:26:41 +00:00
|
|
|
ifdef(`targeted_policy',`
|
2005-12-02 22:06:05 +00:00
|
|
|
gen_require(`
|
|
|
|
type dmesg_exec_t;
|
|
|
|
')
|
|
|
|
|
2005-11-14 20:26:41 +00:00
|
|
|
# $0(): disabled in targeted policy as there
|
|
|
|
# is no dmesg domain.
|
|
|
|
',`
|
|
|
|
gen_require(`
|
|
|
|
type dmesg_t, dmesg_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2005-11-14 20:26:41 +00:00
|
|
|
domain_auto_trans($1,dmesg_exec_t,dmesg_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-11-14 20:26:41 +00:00
|
|
|
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;
|
|
|
|
')
|
2005-05-26 15:50:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-15 20:45:26 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute dmesg in the caller domain.
|
2005-07-15 20:45:26 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-26 15:50:53 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dmesg_exec',`
|
2005-11-14 20:26:41 +00:00
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
# $0(): the dmesg program is an alias
|
|
|
|
# of generic bin programs.
|
|
|
|
corecmd_exec_bin($1)
|
|
|
|
',`
|
|
|
|
gen_require(`
|
|
|
|
type dmesg_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2005-11-14 20:26:41 +00:00
|
|
|
can_exec($1,dmesg_exec_t)
|
|
|
|
')
|
2005-05-26 15:50:53 +00:00
|
|
|
')
|