aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/daemon
diff options
context:
space:
mode:
authorGuy Helmer <ghelmer@FreeBSD.org>2012-01-05 22:48:36 +0000
committerGuy Helmer <ghelmer@FreeBSD.org>2012-01-05 22:48:36 +0000
commit074db536b30318ec021e52dfe9aa228398bca180 (patch)
tree653e0ec5d386da5e9d9755005f3c3efb3229a3f6 /usr.sbin/daemon
parent1e96ae8193e1891c20e2346484d8c699499c7df3 (diff)
Notes
Diffstat (limited to 'usr.sbin/daemon')
-rw-r--r--usr.sbin/daemon/daemon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c
index 540ebf35df7e..8b25800707df 100644
--- a/usr.sbin/daemon/daemon.c
+++ b/usr.sbin/daemon/daemon.c
@@ -79,9 +79,6 @@ main(int argc, char *argv[])
if (argc == 0)
usage();
- if (user != NULL)
- restrict_process(user);
-
/*
* Try to open the pidfile before calling daemon(3),
* to be able to report the error intelligently
@@ -97,6 +94,9 @@ main(int argc, char *argv[])
}
}
+ if (user != NULL)
+ restrict_process(user);
+
if (daemon(nochdir, noclose) == -1)
err(1, NULL);