File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,13 @@ pub(crate) fn selinux_ensure_install_or_setenforce() -> Result<Option<SetEnforce
105
105
// Note that this will re-exec the entire process
106
106
selinux_ensure_install ( ) ?;
107
107
let g = if !context_is_install_t ( & current) {
108
- tracing:: warn!( "Failed to enter install_t; temporarily setting permissive mode" ) ;
109
- selinux_set_permissive ( true ) ?;
110
- Some ( SetEnforceGuard )
108
+ if std:: env:: var_os ( "BOOTC_SETENFORCE0_FALLBACK" ) . is_some ( ) {
109
+ tracing:: warn!( "Failed to enter install_t; temporarily setting permissive mode" ) ;
110
+ selinux_set_permissive ( true ) ?;
111
+ Some ( SetEnforceGuard )
112
+ } else {
113
+ anyhow:: bail!( "Failed to enter install_t (running as {current}) - use BOOTC_SETENFORCE0_FALLBACK=1 to override" ) ;
114
+ }
111
115
} else {
112
116
None
113
117
} ;
You can’t perform that action at this time.
0 commit comments