forked from josch/mmdebstrap
warn if chrootless mode is run by the root user
This commit is contained in:
parent
6af46f0b4a
commit
da88c56b9f
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue