summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pflogd/privsep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/pflogd/privsep.c b/sbin/pflogd/privsep.c
index bcb242e0ff0..50807ada4e4 100644
--- a/sbin/pflogd/privsep.c
+++ b/sbin/pflogd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.7 2004/02/13 19:01:57 otto Exp $ */
+/* $OpenBSD: privsep.c,v 1.8 2004/03/14 19:17:05 otto Exp $ */
/*
* Copyright (c) 2003 Can Erkin Acar
@@ -92,7 +92,8 @@ priv_init(void)
/* Child - drop privileges and return */
if (chroot(pw->pw_dir) != 0)
err(1, "unable to chroot");
- chdir("/");
+ if (chdir("/") != 0)
+ err(1, "unable to chdir");
gidset[0] = pw->pw_gid;
if (setgroups(1, gidset) == -1)