modutils: adjust interfaces after recent binaries merge
This commit is contained in:
parent
7d1a81a006
commit
94311b1c20
|
@ -121,6 +121,77 @@ interface(`modutils_manage_module_config',`
|
||||||
manage_files_pattern($1, modules_conf_t, modules_conf_t)
|
manage_files_pattern($1, modules_conf_t, modules_conf_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Execute any modutil,
|
||||||
|
## like insmod, kmod, depmod or updates-modules,
|
||||||
|
## in the kmod domain.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed to transition.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`modutils_domtrans',`
|
||||||
|
gen_require(`
|
||||||
|
type kmod_t, kmod_exec_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
corecmd_search_bin($1)
|
||||||
|
domtrans_pattern($1, kmod_exec_t, kmod_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Execute any modutil,
|
||||||
|
## like insmod, kmod, depmod or updates-modules,
|
||||||
|
## in the kmod domain, and allow the specified role
|
||||||
|
## the kmod domain, and use the caller's terminal.
|
||||||
|
## Has a sigchld backchannel.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed to transition.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
## <param name="role">
|
||||||
|
## <summary>
|
||||||
|
## Role allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
## <rolecap/>
|
||||||
|
#
|
||||||
|
interface(`modutils_run',`
|
||||||
|
gen_require(`
|
||||||
|
attribute_role kmod_roles;
|
||||||
|
')
|
||||||
|
|
||||||
|
modutils_domtrans_insmod($1)
|
||||||
|
roleattribute $2 kmod_roles;
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Execute any modutil,
|
||||||
|
## like insmod, kmod, depmod or updates-modules,
|
||||||
|
## in the caller domain.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`modutils_exec',`
|
||||||
|
gen_require(`
|
||||||
|
type kmod_exec_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
corecmd_search_bin($1)
|
||||||
|
can_exec($1, kmod_exec_t)
|
||||||
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
## <summary>
|
## <summary>
|
||||||
## Unconditionally execute insmod in the insmod domain.
|
## Unconditionally execute insmod in the insmod domain.
|
||||||
|
@ -134,12 +205,8 @@ interface(`modutils_manage_module_config',`
|
||||||
# cjp: this is added for pppd, due to nested
|
# cjp: this is added for pppd, due to nested
|
||||||
# conditionals not working.
|
# conditionals not working.
|
||||||
interface(`modutils_domtrans_insmod_uncond',`
|
interface(`modutils_domtrans_insmod_uncond',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_domtrans() instead.')
|
||||||
type insmod_t, insmod_exec_t;
|
modutils_domtrans($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
domtrans_pattern($1, insmod_exec_t, insmod_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -153,12 +220,8 @@ interface(`modutils_domtrans_insmod_uncond',`
|
||||||
## </param>
|
## </param>
|
||||||
#
|
#
|
||||||
interface(`modutils_domtrans_insmod',`
|
interface(`modutils_domtrans_insmod',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_domtrans() instead.')
|
||||||
type insmod_t, insmod_exec_t;
|
modutils_domtrans($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
domtrans_pattern($1, insmod_exec_t, insmod_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -181,12 +244,8 @@ interface(`modutils_domtrans_insmod',`
|
||||||
## <rolecap/>
|
## <rolecap/>
|
||||||
#
|
#
|
||||||
interface(`modutils_run_insmod',`
|
interface(`modutils_run_insmod',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_run() instead.')
|
||||||
type insmod_t;
|
modutils_run($1, $2)
|
||||||
')
|
|
||||||
|
|
||||||
modutils_domtrans_insmod($1)
|
|
||||||
role $2 types insmod_t;
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -200,12 +259,8 @@ interface(`modutils_run_insmod',`
|
||||||
## </param>
|
## </param>
|
||||||
#
|
#
|
||||||
interface(`modutils_exec_insmod',`
|
interface(`modutils_exec_insmod',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_exec() instead.')
|
||||||
type insmod_exec_t;
|
modutils_exec($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
can_exec($1, insmod_exec_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -219,12 +274,8 @@ interface(`modutils_exec_insmod',`
|
||||||
## </param>
|
## </param>
|
||||||
#
|
#
|
||||||
interface(`modutils_domtrans_depmod',`
|
interface(`modutils_domtrans_depmod',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_domtrans() instead.')
|
||||||
type depmod_t, depmod_exec_t;
|
modutils_domtrans($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
domtrans_pattern($1, depmod_exec_t, depmod_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -244,12 +295,8 @@ interface(`modutils_domtrans_depmod',`
|
||||||
## <rolecap/>
|
## <rolecap/>
|
||||||
#
|
#
|
||||||
interface(`modutils_run_depmod',`
|
interface(`modutils_run_depmod',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_run() instead.')
|
||||||
type depmod_t, insmod_t;
|
modutils_run($1, $2)
|
||||||
')
|
|
||||||
|
|
||||||
modutils_domtrans_depmod($1)
|
|
||||||
role $2 types depmod_t;
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -263,12 +310,8 @@ interface(`modutils_run_depmod',`
|
||||||
## </param>
|
## </param>
|
||||||
#
|
#
|
||||||
interface(`modutils_exec_depmod',`
|
interface(`modutils_exec_depmod',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_exec() instead.')
|
||||||
type depmod_exec_t;
|
modutils_exec($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
can_exec($1, depmod_exec_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -282,12 +325,8 @@ interface(`modutils_exec_depmod',`
|
||||||
## </param>
|
## </param>
|
||||||
#
|
#
|
||||||
interface(`modutils_domtrans_update_mods',`
|
interface(`modutils_domtrans_update_mods',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_domtrans() instead.')
|
||||||
type update_modules_t, update_modules_exec_t;
|
modutils_domtrans($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
domtrans_pattern($1, update_modules_exec_t, update_modules_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -307,12 +346,8 @@ interface(`modutils_domtrans_update_mods',`
|
||||||
## <rolecap/>
|
## <rolecap/>
|
||||||
#
|
#
|
||||||
interface(`modutils_run_update_mods',`
|
interface(`modutils_run_update_mods',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_run() instead.')
|
||||||
attribute_role update_modules_roles;
|
modutils_run($1, $2)
|
||||||
')
|
|
||||||
|
|
||||||
modutils_domtrans_update_mods($1)
|
|
||||||
roleattribute $2 update_modules_roles;
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
@ -326,12 +361,8 @@ interface(`modutils_run_update_mods',`
|
||||||
## </param>
|
## </param>
|
||||||
#
|
#
|
||||||
interface(`modutils_exec_update_mods',`
|
interface(`modutils_exec_update_mods',`
|
||||||
gen_require(`
|
refpolicywarn(`$0($*) has been deprecated, please use modutils_exec() instead.')
|
||||||
type update_modules_exec_t;
|
modutils_exec($1)
|
||||||
')
|
|
||||||
|
|
||||||
corecmd_search_bin($1)
|
|
||||||
can_exec($1, update_modules_exec_t)
|
|
||||||
')
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
|
@ -5,12 +5,15 @@ policy_module(modutils, 1.17.2)
|
||||||
# Declarations
|
# Declarations
|
||||||
#
|
#
|
||||||
|
|
||||||
|
attribute_role kmod_roles;
|
||||||
|
|
||||||
type kmod_t alias { insmod_t depmod_t update_modules_t };
|
type kmod_t alias { insmod_t depmod_t update_modules_t };
|
||||||
type kmod_exec_t alias { insmod_exec_t depmod_exec_t update_modules_exec_t };
|
type kmod_exec_t alias { insmod_exec_t depmod_exec_t update_modules_exec_t };
|
||||||
application_domain(kmod_t, kmod_exec_t)
|
application_domain(kmod_t, kmod_exec_t)
|
||||||
kernel_domtrans_to(kmod_t, kmod_exec_t)
|
kernel_domtrans_to(kmod_t, kmod_exec_t)
|
||||||
mls_file_write_all_levels(kmod_t)
|
mls_file_write_all_levels(kmod_t)
|
||||||
role system_r types kmod_t;
|
roleattribute system_r kmod_roles;
|
||||||
|
role kmod_roles types kmod_t;
|
||||||
|
|
||||||
# module loading config
|
# module loading config
|
||||||
type modules_conf_t;
|
type modules_conf_t;
|
||||||
|
|
Loading…
Reference in New Issue