This commit is contained in:
Joris Vink 2015-05-20 11:34:57 +02:00
parent 15fd954501
commit cdefb66ed8
1 changed files with 2 additions and 0 deletions

View File

@ -143,6 +143,7 @@ kore_parse_config(void)
if (skip_chroot != 1 && chroot_path == NULL) { if (skip_chroot != 1 && chroot_path == NULL) {
fatal("missing a chroot path"); fatal("missing a chroot path");
} }
if (getuid() != 0 && skip_chroot == 0) { if (getuid() != 0 && skip_chroot == 0) {
fatal("cannot chroot, use -n to skip it"); fatal("cannot chroot, use -n to skip it");
} }
@ -150,6 +151,7 @@ kore_parse_config(void)
if (skip_runas != 1 && runas_user == NULL) { if (skip_runas != 1 && runas_user == NULL) {
fatal("missing runas user"); fatal("missing runas user");
} }
if (getuid() != 0 && skip_runas == 0) { if (getuid() != 0 && skip_runas == 0) {
fatal("cannot drop privileges, use -p to skip it"); fatal("cannot drop privileges, use -p to skip it");
} }