Chris PeBenito 3865d6
## <summary>Policy for udev.</summary>
Chris PeBenito dfb86a
Chris PeBenito 3865d6
########################################
Chris PeBenito 261e0e
##     <desc>
Chris PeBenito 3865d6
##             Execute udev in the udev domain.
Chris PeBenito 261e0e
##     </desc>
Chris PeBenito 261e0e
##     <param name="domain">
Chris PeBenito 3865d6
##             The type of the process performing this action.
Chris PeBenito 261e0e
##     </param>
Chris PeBenito dfb86a
#
Chris PeBenito 199895
interface(`udev_domtrans',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type udev_t, udev_exec_t;
Chris PeBenito 139520
		class process sigchld;
Chris PeBenito 139520
		class fd use;
Chris PeBenito 139520
		class fifo_file rw_file_perms;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 7edd02
	domain_auto_trans($1, udev_exec_t, udev_t)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 udev_t:fd use;
Chris PeBenito 0c73cd
	allow udev_t $1:fd use;
Chris PeBenito 0c73cd
	allow udev_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow udev_t $1:process sigchld;
Chris PeBenito dfb86a
')
Chris PeBenito dfb86a
Chris PeBenito dfb86a
########################################
Chris PeBenito 261e0e
##     <desc>
Chris PeBenito 3865d6
##             Allow process to read list of devices.
Chris PeBenito 261e0e
##     </desc>
Chris PeBenito 261e0e
##     <param name="domain">
Chris PeBenito 3865d6
##             The type of the process performing this action.
Chris PeBenito 261e0e
##     </param>
Chris PeBenito dfb86a
#
Chris PeBenito 199895
interface(`udev_read_db',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type udev_tdb_t;
Chris PeBenito 139520
		class file r_file_perms;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 139520
	dev_list_all_dev_nodes($1)
Chris PeBenito 7edd02
	allow $1 udev_tdb_t:file r_file_perms;
Chris PeBenito dfb86a
')
Chris PeBenito dfb86a
Chris PeBenito 7bba9d
########################################
Chris PeBenito 261e0e
##     <desc>
Chris PeBenito 3865d6
##             Allow process to modify list of devices.
Chris PeBenito 261e0e
##     </desc>
Chris PeBenito 261e0e
##     <param name="domain">
Chris PeBenito 3865d6
##             The type of the process performing this action.
Chris PeBenito 261e0e
##     </param>
Chris PeBenito 7bba9d
#
Chris PeBenito 199895
interface(`udev_rw_db',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type udev_tdb_t;
Chris PeBenito 139520
		class file rw_file_perms;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 139520
	dev_list_all_dev_nodes($1)
Chris PeBenito 7edd02
	allow $1 udev_tdb_t:file rw_file_perms;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d