warn if chrootless mode is run by the root user

pull/1/head
parent 6af46f0b4a
commit da88c56b9f
Signed by: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -3171,7 +3171,10 @@ sub main() {
exit 1; exit 1;
} }
} elsif ($options->{mode} eq 'chrootless') { } elsif ($options->{mode} eq 'chrootless') {
# nothing to do if ($EFFECTIVE_USER_ID == 0) {
warning "running chrootless mode as root might damage the host "
. "system";
}
} else { } else {
error "unknown mode: $options->{mode}"; error "unknown mode: $options->{mode}";
} }

Loading…
Cancel
Save