Chris PeBenito 9726b3
## <summary>The unconfined domain.</summary>
Chris PeBenito 9726b3
Chris PeBenito 9726b3
########################################
Chris PeBenito 9726b3
## <summary>
Chris PeBenito 9726b3
##	A template to make the specified domain unconfined.
Chris PeBenito 9726b3
## </summary>
Chris PeBenito 9726b3
## <param name="domain">
Chris PeBenito 9726b3
##	Domain to make unconfined.
Chris PeBenito 9726b3
## </param>
Chris PeBenito 9726b3
#
Chris PeBenito 9726b3
template(`unconfined_access_template',`
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	# Use any Linux capability.
Chris PeBenito 9726b3
	allow $1 self:capability *;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	# Transition to myself, to make get_ordered_context_list happy.
Chris PeBenito 9726b3
	allow $1 self:process transition;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	# Write access is for setting attributes under /proc/self/attr.
Chris PeBenito 9726b3
	allow $1 self:file rw_file_perms;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	# Userland object managers
Chris PeBenito 9726b3
	allow $1 self:nscd *;
Chris PeBenito 9726b3
	allow $1 self:dbus *;
Chris PeBenito 9726b3
	allow $1 self:passwd *;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	kernel_unconfined($1)
Chris PeBenito 9726b3
	dev_unconfined($1)
Chris PeBenito 9726b3
	fs_unconfined($1)
Chris PeBenito 9726b3
	selinux_unconfined($1)
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	domain_unconfined($1)
Chris PeBenito 9726b3
	files_unconfined($1)
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	tunable_policy(`allow_execmem',`
Chris PeBenito 9726b3
		# Allow loading DSOs that require executable stack.
Chris PeBenito 9726b3
		allow $1 self:process execmem;
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	# to satisfy assertions:
Chris PeBenito 9726b3
	optional_policy(`authlogin.te',`
Chris PeBenito 9726b3
		auth_manage_shadow($1)
Chris PeBenito 9726b3
		auth_relabelto_shadow($1)
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	optional_policy(`bootloader.te',`
Chris PeBenito 9726b3
		bootloader_manage_kernel_modules($1)
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	optional_policy(`selinuxutil.te',`
Chris PeBenito 9726b3
		seutil_create_binary_pol($1)
Chris PeBenito 9726b3
		seutil_relabelto_binary_pol($1)
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	optional_policy(`storage.te',`
Chris PeBenito 9726b3
		storage_unconfined($1)
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	ifdef(`TODO',`
Chris PeBenito 9726b3
	if (allow_execmod) {
Chris PeBenito 9726b3
		# Allow text relocations on system shared libraries, e.g. libGL.
Chris PeBenito 9726b3
		allow $1 texrel_shlib_t:file execmod;
Chris PeBenito 9726b3
	}
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	ifdef(`dbusd.te', `
Chris PeBenito 9726b3
		# Communicate via dbusd.
Chris PeBenito 9726b3
		allow $1 system_dbusd_t:dbus *;
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	ifdef(`nscd.te', `
Chris PeBenito 9726b3
		# Get info via nscd.
Chris PeBenito 9726b3
		allow $1 nscd_t:nscd *;
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
	') dnl end TODO
Chris PeBenito 9726b3
')