Chris PeBenito 3865d6
## <summary>Policy for udev.</summary>
Chris PeBenito dfb86a
Chris PeBenito 3865d6
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito ae9e27
##	Execute udev in the udev domain.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito ae9e27
##	The type of the process performing this action.
Chris PeBenito ae9e27
## </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 ae9e27
## <summary>
Chris PeBenito ae9e27
##	Do not audit attempts to read or write
Chris PeBenito ae9e27
##	to a udev unix datagram socket.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito ae9e27
##	Domain to not audit.
Chris PeBenito ae9e27
## </param>
Chris PeBenito ae9e27
#
Chris PeBenito ae9e27
interface(`udev_donaudit_rw_unix_dgram_socket',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type udev_t;
Chris PeBenito ae9e27
		class unix_dgram_socket { read write };
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
	dontaudit $1 udev_t:unix_dgram_socket { read write };
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito ae9e27
##	Allow process to read list of devices.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito ae9e27
##	The type of the process performing this action.
Chris PeBenito ae9e27
## </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 ae9e27
## <summary>
Chris PeBenito ae9e27
##	Allow process to modify list of devices.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito ae9e27
##	The type of the process performing this action.
Chris PeBenito ae9e27
## </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