Add interface udev_domtrans_to
PATCH 1/1 Add interface udev_domtrans_to
This interface is useful when using the 'RUN' option in UDEV rules where udev will be executing a user function to perform some action. This interface allows a domain transition to occur for the run action.
Signed-off-by Dave Sugar <[email protected]>
--- policy/modules/system/udev.if | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
policy/modules/system/udev.if +35 -0
@@ -36,6 +36,41 @@ interface(`udev_domtrans',` domtrans_pattern($1, udev_exec_t, udev_t) ') +######################################## +## <summary> +## Allow udev to execute the specified program in +## the specified domain. +## </summary> +## <desc> +## <p> +## Allow udev to execute the specified program in +## the specified domain. +## </p> +## <p> +## This is an interface to support the UDEV 'RUN' +## command. This will allow the command run by +## udev to be run in a domain other than udev_t. +## </p> +## </desc> +## <param name="domain"> +## <summary> +## Domain to execute in. +## </summary> +## </param> +## <param name="entry_file"> +## <summary> +## Domain entry point file. +## </summary> +## </param> +# +interface(`udev_domtrans_to',` + gen_require(` + type udev_t; + ') + + domtrans_pattern(udev_t,$2,$1) +') + ######################################## ## <summary> ## Execute udev in the caller domain.
Signature · 1 line
2.14.4
Quoted 33 lines · Dave Sugar
This interface is useful when using the 'RUN' option in UDEV rules where udev will be executing a user function to perform some action. This interface allows a domain transition to occur for the run action.
Signed-off-by Dave Sugar <[email protected]>--- policy/modules/system/udev.if | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)policy/modules/system/udev.if +18
-0@@ -36,6 +36,41 @@ interface(`udev_domtrans',` domtrans_pattern($1, udev_exec_t, udev_t) ') +######################################## +## <summary> +## Allow udev to execute the specified program in +## the specified domain. +## </summary> +## <desc> +## <p> +## Allow udev to execute the specified program in +## the specified domain. +## </p> +## <p> +## This is an interface to support the UDEV 'RUN' +## command. This will allow the command run by +## udev to be run in a domain other than udev_t. +## </p> +## </desc> +## <param name="domain"> +## <summary>
policy/modules/system/udev.if interface(`udev_domtrans',` · line 66
Quoted 10 lines
policy/modules/system/udev.if +10
-0+## Domain to execute in. +## </summary> +## </param> +## <param name="entry_file"> +## <summary> +## Domain entry point file. +## </summary> +## </param> +# +interface(`udev_domtrans_to',`
This should be called something like udev_run_command_domain or udev_run_domain. If you have other suggestions, I could take that too, since this being for "run commands" doesn't make interface naming easy.
Quoted 11 lines
policy/modules/system/udev.if +7
-0+ gen_require(` + type udev_t; + ') + + domtrans_pattern(udev_t,$2,$1) +') + ######################################## ## <summary> ## Execute udev in the caller domain.
Signature · 1 line
Chris PeBenito