From d453de51086133ffd946ba9292e8981764fda652 Mon Sep 17 00:00:00 2001 From: Tom MTT Date: Tue, 22 Nov 2022 06:48:00 +0100 Subject: [PATCH] fix(feuille.c): print non-root warning before running in background --- feuille.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/feuille.c b/feuille.c index 1bfc28e..cbc4e04 100644 --- a/feuille.c +++ b/feuille.c @@ -247,6 +247,11 @@ int main(int argc, char *argv[]) uid = user->pw_uid; 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); 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 */