summaryrefslogtreecommitdiff
path: root/usr.sbin/hostapd/privsep.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-08-17 13:18:34 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-08-17 13:18:34 +0000
commit63b1fbef1807e6addadf28ef19685743e496260c (patch)
tree39043317ec7522e6f191077bb151d56d450226e8 /usr.sbin/hostapd/privsep.c
parentc6aee4de757f8b725dc5d7daedb1290d9d57a7a1 (diff)
add newlines in hostapd_fatal() calls, fix some typos.
thanks to Brian Poole.
Diffstat (limited to 'usr.sbin/hostapd/privsep.c')
-rw-r--r--usr.sbin/hostapd/privsep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/hostapd/privsep.c b/usr.sbin/hostapd/privsep.c
index 64cfeb776fb..5530cce53f5 100644
--- a/usr.sbin/hostapd/privsep.c
+++ b/usr.sbin/hostapd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.12 2005/06/17 19:13:35 reyk Exp $ */
+/* $OpenBSD: privsep.c,v 1.13 2005/08/17 13:18:33 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -95,10 +95,10 @@ hostapd_priv_init(struct hostapd_config *cfg)
/* Create sockets */
if (socketpair(AF_LOCAL, SOCK_STREAM, PF_UNSPEC, socks) == -1)
- hostapd_fatal("failed to get socket pair");
+ hostapd_fatal("failed to get socket pair\n");
if ((child_pid = fork()) < 0)
- hostapd_fatal("failed to fork child process");
+ hostapd_fatal("failed to fork child process\n");
/*
* Unprivileged child process
@@ -113,7 +113,7 @@ hostapd_priv_init(struct hostapd_config *cfg)
if (chroot(pw->pw_dir) == -1)
hostapd_fatal("failed to change root directory\n");
if (chdir("/") == -1)
- hostapd_fatal("failed to change directory");
+ hostapd_fatal("failed to change directory\n");
/*
* Drop privileges and clear the group access list
@@ -121,7 +121,7 @@ hostapd_priv_init(struct hostapd_config *cfg)
if (setgroups(1, &pw->pw_gid) == -1 ||
setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1 ||
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) == -1)
- hostapd_fatal("can't drop privileges");
+ hostapd_fatal("can't drop privileges\n");
close(socks[0]);
priv_fd = socks[1];