|
Chris PeBenito |
17de1b |
## <summary>Policy for mount.</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute mount in the mount 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(`mount_domtrans',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type mount_t, mount_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1,mount_exec_t,mount_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute mount in the mount domain, and
|
|
Chris PeBenito |
17de1b |
## allow the specified role the mount domain,
|
|
Chris PeBenito |
17de1b |
## and use the caller's terminal.
|
|
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 mount 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 mount domain to use.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`mount_run',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type mount_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
mount_domtrans($1)
|
|
Chris PeBenito |
17de1b |
role $2 types mount_t;
|
|
Chris PeBenito |
17de1b |
allow mount_t $3:chr_file rw_file_perms;
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
350b6a |
optional_policy(`
|
|
Chris PeBenito |
350b6a |
samba_run_smbmount($1, $2, $3)
|
|
Chris PeBenito |
350b6a |
')
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute mount 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(`mount_exec',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type mount_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
# cjp: this should be removed:
|
|
Chris PeBenito |
c0868a |
allow $1 mount_exec_t:dir list_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow $1 mount_exec_t:lnk_file read_lnk_file_perms;
|
|
Chris PeBenito |
c0868a |
can_exec($1,mount_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Use file descriptors for mount.
|
|
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(`mount_use_fds',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type mount_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 mount_t:fd use;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Allow the mount domain to send nfs requests for mounting
|
|
Chris PeBenito |
17de1b |
## network drives
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <desc>
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## Allow the mount domain to send nfs requests for mounting
|
|
Chris PeBenito |
17de1b |
## network drives
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## This interface has been deprecated as these rules were
|
|
Chris PeBenito |
17de1b |
## a side effect of leaked mount file descriptors. This
|
|
Chris PeBenito |
17de1b |
## interface has no effect.
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## </desc>
|
|
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(`mount_send_nfs_client_request',`
|
|
Chris PeBenito |
ea3c1f |
refpolicywarn(`$0($*) has been deprecated.')
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute mount in the unconfined mount domain.
|
|
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(`mount_domtrans_unconfined',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
350b6a |
type unconfined_mount_t, mount_exec_t;
|
|
Chris PeBenito |
350b6a |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
350b6a |
domtrans_pattern($1, mount_exec_t, unconfined_mount_t)
|
|
Chris PeBenito |
350b6a |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
350b6a |
########################################
|
|
Chris PeBenito |
350b6a |
## <summary>
|
|
Chris PeBenito |
350b6a |
## Execute mount in the unconfined mount domain, and
|
|
Chris PeBenito |
350b6a |
## allow the specified role the unconfined mount domain,
|
|
Chris PeBenito |
350b6a |
## and use the caller's terminal.
|
|
Chris PeBenito |
350b6a |
## </summary>
|
|
Chris PeBenito |
350b6a |
## <param name="domain">
|
|
Chris PeBenito |
350b6a |
## <summary>
|
|
Chris PeBenito |
350b6a |
## Domain allowed access.
|
|
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 unconfined mount 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 unconfined mount domain to use.
|
|
Chris PeBenito |
350b6a |
## </summary>
|
|
Chris PeBenito |
350b6a |
## </param>
|
|
Chris PeBenito |
350b6a |
## <rolecap/>
|
|
Chris PeBenito |
350b6a |
#
|
|
Chris PeBenito |
350b6a |
interface(`mount_run_unconfined',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
350b6a |
type unconfined_mount_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
350b6a |
mount_domtrans_unconfined($1)
|
|
Chris PeBenito |
350b6a |
role $2 types unconfined_mount_t;
|
|
Chris PeBenito |
350b6a |
allow unconfined_mount_t $3:chr_file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|