Miroslav Grepl d7de04
## <summary>Passenger policy</summary>
Miroslav Grepl d7de04
Miroslav Grepl d7de04
######################################
Miroslav Grepl d7de04
## <summary>
Miroslav Grepl d7de04
##      Execute passenger in the passenger domain.
Miroslav Grepl d7de04
## </summary>
Miroslav Grepl d7de04
## <param name="domain">
Miroslav Grepl d7de04
##      <summary>
Miroslav Grepl d7de04
##      The type of the process performing this action.
Miroslav Grepl d7de04
##      </summary>
Miroslav Grepl d7de04
## </param>
Miroslav Grepl d7de04
#
Miroslav Grepl d7de04
interface(`passenger_domtrans',`
Miroslav Grepl d7de04
        gen_require(`
Miroslav Grepl d7de04
                type passenger_t;
Dan Walsh 3034a8
                type passenger_exec_t;
Miroslav Grepl d7de04
        ')
Miroslav Grepl d7de04
Miroslav Grepl d7de04
	allow $1 self:capability { fowner fsetid };
Miroslav Grepl d7de04
Miroslav Grepl d7de04
	allow $1 passenger_t:process signal;
Miroslav Grepl d7de04
Miroslav Grepl d7de04
	domtrans_pattern($1, passenger_exec_t, passenger_t)
Miroslav Grepl d7de04
	allow $1 passenger_t:unix_stream_socket { read write shutdown };
Miroslav Grepl d7de04
	allow passenger_t $1:unix_stream_socket { read write };
Miroslav Grepl d7de04
')
Miroslav Grepl d7de04
Miroslav Grepl d7de04
######################################
Miroslav Grepl d7de04
## <summary>
Dan Walsh 3034a8
##      Manage passenger var_run content.
Miroslav Grepl d7de04
## </summary>
Miroslav Grepl d7de04
## <param name="domain">
Miroslav Grepl d7de04
##      <summary>
Miroslav Grepl d7de04
##      Domain allowed access.
Miroslav Grepl d7de04
##      </summary>
Miroslav Grepl d7de04
## </param>
Miroslav Grepl d7de04
#
Dan Walsh 3034a8
interface(`passenger_manage_pid_content',`
Miroslav Grepl d7de04
        gen_require(`
Dan Walsh 3034a8
                type passenger_var_run_t;
Miroslav Grepl d7de04
        ')
Miroslav Grepl d7de04
Miroslav Grepl d7de04
        files_search_pids($1)
Dan Walsh 3034a8
	manage_dirs_pattern($1, passenger_var_run_t, passenger_var_run_t)
Dan Walsh 3034a8
        manage_files_pattern($1, passenger_var_run_t, passenger_var_run_t)
Dan Walsh 3034a8
	manage_fifo_files_pattern($1, passenger_var_run_t, passenger_var_run_t)
Dan Walsh 3034a8
	manage_sock_files_pattern($1, passenger_var_run_t, passenger_var_run_t)
Miroslav Grepl d7de04
')
Miroslav Grepl d7de04
Miroslav Grepl d7de04
########################################
Miroslav Grepl d7de04
## <summary>
Miroslav Grepl d7de04
##      Read passenger lib files
Miroslav Grepl d7de04
## </summary>
Miroslav Grepl d7de04
## <param name="domain">
Miroslav Grepl d7de04
##      <summary>
Miroslav Grepl d7de04
##      Domain to not audit.
Miroslav Grepl d7de04
##      </summary>
Miroslav Grepl d7de04
## </param>
Miroslav Grepl d7de04
#
Miroslav Grepl d7de04
interface(`passenger_read_lib_files',`
Miroslav Grepl d7de04
        gen_require(`
Miroslav Grepl d7de04
                type passenger_var_lib_t;
Miroslav Grepl d7de04
        ')
Miroslav Grepl d7de04
Miroslav Grepl d7de04
	files_search_var_lib($1)
Miroslav Grepl d7de04
        read_files_pattern($1, passenger_var_lib_t, passenger_var_lib_t)
Miroslav Grepl d7de04
        read_lnk_files_pattern($1, passenger_var_lib_t, passenger_var_lib_t)
Miroslav Grepl d7de04
')
Miroslav Grepl d7de04