Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	SMB and CIFS client/server programs for UNIX and
Chris PeBenito 17de1b
##	name  Service  Switch  daemon for resolving names
Chris PeBenito 17de1b
##	from Windows NT servers.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito bbcd3c
##	The per role template for the samba module.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This template allows smbd to manage files in
Chris PeBenito 17de1b
##	a user home directory, creating files with the
Chris PeBenito 17de1b
##	correct type.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This template is invoked automatically for each user, and
Chris PeBenito 17de1b
##	generally does not need to be invoked directly
Chris PeBenito 17de1b
##	by policy writers.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="userdomain_prefix">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The prefix of the user domain (e.g., user
Chris PeBenito 17de1b
##	is the prefix for user_t).
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito bbcd3c
template(`samba_per_role_template',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type smbd_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	tunable_policy(`samba_enable_home_dirs',`
Chris PeBenito 0bfccd
		userdom_manage_user_home_content_dirs($1, smbd_t)
Chris PeBenito 0bfccd
		userdom_manage_user_home_content_files($1, smbd_t)
Chris PeBenito 0bfccd
		userdom_manage_user_home_content_symlinks($1, smbd_t)
Chris PeBenito 0bfccd
		userdom_manage_user_home_content_sockets($1, smbd_t)
Chris PeBenito 0bfccd
		userdom_manage_user_home_content_pipes($1, smbd_t)
Chris PeBenito 0bfccd
		userdom_user_home_dir_filetrans_user_home_content($1, smbd_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute samba net in the samba_net domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_domtrans_net',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_net_t, samba_net_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito 0bfccd
	domtrans_pattern($1, samba_net_exec_t, samba_net_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute samba net in the samba_net domain, and
Chris PeBenito 17de1b
##	allow the specified role the samba_net domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the samba_net domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the samba_net domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_run_net',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_net_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	samba_domtrans_net($1)
Chris PeBenito 17de1b
	role $2 types samba_net_t;
Chris PeBenito 17de1b
	allow samba_net_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute smbmount in the smbmount domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_domtrans_smbmount',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type smbmount_t, smbmount_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito 0bfccd
	domtrans_pattern($1, smbmount_exec_t, smbmount_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 350b6a
##	Execute smbmount interactively and do
Chris PeBenito 350b6a
##	a domain transition to the smbmount domain.
Chris PeBenito 350b6a
## </summary>
Chris PeBenito 350b6a
## <param name="domain">
Chris PeBenito 350b6a
##	<summary>
Chris PeBenito 350b6a
##	Domain allowed acces.
Chris PeBenito 350b6a
##	</summary>
Chris PeBenito 350b6a
## </param>
Chris PeBenito 350b6a
## <param name="role">
Chris PeBenito 350b6a
##	<summary>
Chris PeBenito 350b6a
##	The role to be allowed the smbmount domain.
Chris PeBenito 350b6a
##	</summary>
Chris PeBenito 350b6a
## </param>
Chris PeBenito 350b6a
## <param name="terminal">
Chris PeBenito 350b6a
##	<summary>
Chris PeBenito 350b6a
##	The type of the terminal allow the smbmount domain to use.
Chris PeBenito 350b6a
##	</summary>
Chris PeBenito 350b6a
## </param>
Chris PeBenito 350b6a
## <rolecap/>
Chris PeBenito 350b6a
#
Chris PeBenito 350b6a
interface(`samba_run_smbmount',`
Chris PeBenito 350b6a
	gen_require(`
Chris PeBenito 350b6a
		type smbmount_t;
Chris PeBenito 350b6a
	')
Chris PeBenito 350b6a
Chris PeBenito 350b6a
	samba_domtrans_smbmount($1)
Chris PeBenito 350b6a
	role $2 types smbmount_t;
Chris PeBenito 350b6a
	allow smbmount_t $3:chr_file rw_term_perms;
Chris PeBenito 350b6a
')
Chris PeBenito 350b6a
Chris PeBenito 350b6a
########################################
Chris PeBenito 350b6a
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to read
Chris PeBenito 17de1b
##	samba configuration files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 0bfccd
	read_files_pattern($1, samba_etc_t, samba_etc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to read
Chris PeBenito 17de1b
##	and write samba configuration files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_rw_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 0bfccd
	rw_files_pattern($1, samba_etc_t, samba_etc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to read samba's log files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_read_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_search_logs($1)
Chris PeBenito c0868a
	allow $1 samba_log_t:dir list_dir_perms;
Chris PeBenito 0bfccd
	read_files_pattern($1, samba_log_t, samba_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 40df56
##	Allow the specified domain to append to samba's log files.
Chris PeBenito 40df56
## </summary>
Chris PeBenito 40df56
## <param name="domain">
Chris PeBenito 40df56
##	<summary>
Chris PeBenito 40df56
##	Domain allowed access.
Chris PeBenito 40df56
##	</summary>
Chris PeBenito 40df56
## </param>
Chris PeBenito 40df56
## <rolecap/>
Chris PeBenito 40df56
#
Chris PeBenito 40df56
interface(`samba_append_log',`
Chris PeBenito 40df56
	gen_require(`
Chris PeBenito 40df56
		type samba_log_t;
Chris PeBenito 40df56
	')
Chris PeBenito 40df56
Chris PeBenito 40df56
	logging_search_logs($1)
Chris PeBenito 40df56
	allow $1 samba_log_t:dir list_dir_perms;
Chris PeBenito 40df56
	allow $1 samba_log_t:file append_file_perms;
Chris PeBenito 40df56
')
Chris PeBenito 40df56
Chris PeBenito 40df56
########################################
Chris PeBenito 40df56
## <summary>
Chris PeBenito 17de1b
##	Execute samba log in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_exec_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_search_logs($1)
Chris PeBenito 0bfccd
	can_exec($1, samba_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to read samba's secrets.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_read_secrets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_secrets_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 17de1b
	allow $1 samba_secrets_t:file { read getattr lock };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to search
Chris PeBenito 17de1b
##	samba /var directories.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_search_var',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_var_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 40df56
	files_search_var_lib($1)
Chris PeBenito 17de1b
	allow $1 samba_var_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to
Chris PeBenito 40df56
##	read samba /var files.
Chris PeBenito 40df56
## </summary>
Chris PeBenito 40df56
## <param name="domain">
Chris PeBenito 40df56
##	<summary>
Chris PeBenito 40df56
##	Domain allowed access.
Chris PeBenito 40df56
##	</summary>
Chris PeBenito 40df56
## </param>
Chris PeBenito 40df56
#
Chris PeBenito 40df56
interface(`samba_read_var_files',`
Chris PeBenito 40df56
	gen_require(`
Chris PeBenito 40df56
		type samba_var_t;
Chris PeBenito 40df56
	')
Chris PeBenito 40df56
Chris PeBenito 40df56
	files_search_var($1)
Chris PeBenito 40df56
	files_search_var_lib($1)
Chris PeBenito 0bfccd
	read_files_pattern($1, samba_var_t, samba_var_t)
Chris PeBenito 40df56
')
Chris PeBenito 40df56
Chris PeBenito 40df56
########################################
Chris PeBenito 40df56
## <summary>
Chris PeBenito 40df56
##	Allow the specified domain to
Chris PeBenito 17de1b
##	read and write samba /var files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_rw_var_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type samba_var_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 40df56
	files_search_var_lib($1)
Chris PeBenito 0bfccd
	rw_files_pattern($1, samba_var_t, samba_var_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 40df56
##	Allow the specified domain to
Chris PeBenito 40df56
##	read and write samba /var files.
Chris PeBenito 40df56
## </summary>
Chris PeBenito 40df56
## <param name="domain">
Chris PeBenito 40df56
##	<summary>
Chris PeBenito 40df56
##	Domain allowed access.
Chris PeBenito 40df56
##	</summary>
Chris PeBenito 40df56
## </param>
Chris PeBenito 40df56
#
Chris PeBenito 40df56
interface(`samba_manage_var_files',`
Chris PeBenito 40df56
	gen_require(`
Chris PeBenito 40df56
		type samba_var_t;
Chris PeBenito 40df56
	')
Chris PeBenito 40df56
Chris PeBenito 40df56
	files_search_var($1)
Chris PeBenito 40df56
	files_search_var_lib($1)
Chris PeBenito 0bfccd
	manage_files_pattern($1, samba_var_t, samba_var_t)
Chris PeBenito 40df56
')
Chris PeBenito 40df56
Chris PeBenito 40df56
########################################
Chris PeBenito 40df56
## <summary>
Chris PeBenito 40df56
##	Do not audit attempts to use file descriptors from samba.
Chris PeBenito 40df56
## </summary>
Chris PeBenito 40df56
## <param name="domain">
Chris PeBenito 40df56
##	<summary>
Chris PeBenito 40df56
##	Domain to not audit.
Chris PeBenito 40df56
##	</summary>
Chris PeBenito 40df56
## </param>
Chris PeBenito 40df56
#
Chris PeBenito 40df56
interface(`samba_dontaudit_use_fds',`
Chris PeBenito 40df56
	gen_require(`
Chris PeBenito 40df56
		type smbd_t;
Chris PeBenito 40df56
	')
Chris PeBenito 40df56
Chris PeBenito 40df56
	dontaudit $1 smbd_t:fd use; 
Chris PeBenito 40df56
')
Chris PeBenito 40df56
Chris PeBenito 40df56
########################################
Chris PeBenito 40df56
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to write to smbmount tcp sockets.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_write_smbmount_tcp_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type smbmount_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 smbmount_t:tcp_socket write;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to read and write to smbmount tcp sockets.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_rw_smbmount_tcp_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type smbmount_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 smbmount_t:tcp_socket { read write };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute winbind_helper in the winbind_helper domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_domtrans_winbind_helper',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type winbind_helper_t, winbind_helper_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	domtrans_pattern($1, winbind_helper_exec_t, winbind_helper_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute winbind_helper in the winbind_helper domain, and
Chris PeBenito 17de1b
##	allow the specified role the winbind_helper domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the winbind_helper domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the winbind_helper domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_run_winbind_helper',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type winbind_helper_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	samba_domtrans_winbind_helper($1)
Chris PeBenito 17de1b
	role $2 types winbind_helper_t;
Chris PeBenito 17de1b
	allow winbind_helper_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the specified domain to read the winbind pid files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_read_winbind_pid',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type winbind_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito c0868a
	allow $1 winbind_var_run_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Connect to winbind.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`samba_stream_connect_winbind',`
Chris PeBenito b81bfc
	gen_require(`
Chris PeBenito b81bfc
		type samba_var_t, winbind_t, winbind_var_run_t;
Chris PeBenito b81bfc
	')
Chris PeBenito 9377a3
Chris PeBenito b81bfc
	files_search_pids($1)
Chris PeBenito b81bfc
	allow $1 samba_var_t:dir search_dir_perms;
Chris PeBenito b81bfc
	stream_connect_pattern($1, winbind_var_run_t, winbind_var_run_t, winbind_t)
Chris PeBenito b81bfc
	
Chris PeBenito b81bfc
	ifndef(`distro_redhat',`
Chris PeBenito 9377a3
		gen_require(`
Chris PeBenito b81bfc
		    type winbind_tmp_t;
Chris PeBenito 9377a3
		')
Chris PeBenito 9377a3
Chris PeBenito 9377a3
		# the default for the socket is (poorly named):
Chris PeBenito 9377a3
		# /tmp/.winbindd/pipe
Chris PeBenito 9377a3
		files_search_tmp($1)
Chris PeBenito 0bfccd
		stream_connect_pattern($1, winbind_tmp_t, winbind_tmp_t, winbind_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')