fix(feuille.c): print non-root warning before running in background

This commit is contained in:
Tom MTT. 2022-11-22 06:48:00 +01:00
parent 58db0b6b33
commit d453de5108

View file

@ -247,6 +247,11 @@ int main(int argc, char *argv[])
uid = user->pw_uid; uid = user->pw_uid;
gid = user->pw_gid; gid = user->pw_gid;
} else {
puts("");
syslog(LOG_WARNING, "running as non-root user.");
syslog(LOG_WARNING, "`chroot' and user switching have been disabled.");
puts("");
} }
@ -280,11 +285,6 @@ int main(int argc, char *argv[])
setgid(gid); setgid(gid);
setuid(uid); setuid(uid);
} else {
puts("");
syslog(LOG_WARNING, "running as non-root user.");
syslog(LOG_WARNING, "`chroot' and user switching have been disabled.");
puts("");
} }
/* OpenBSD-only security measures */ /* OpenBSD-only security measures */