summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-04-08 12:26:07 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-04-08 12:26:07 +0000
commit9c318af55dd2124071f073bdde8c8919965a1b86 (patch)
tree69f71084fb1bce62b5435b4f6f200b8304d24839 /sbin
parent910abe658add257be1d7deb26027c971df2b9f46 (diff)
reorder error message and send_fd in order to display the correct
errno in error message; pointed out by Moritz Jodeit <moritz at jodeit.org>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pflogd/privsep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pflogd/privsep.c b/sbin/pflogd/privsep.c
index 842c8a40a50..f859c60e3a4 100644
--- a/sbin/pflogd/privsep.c
+++ b/sbin/pflogd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.9 2004/04/03 10:21:18 avsm Exp $ */
+/* $OpenBSD: privsep.c,v 1.10 2004/04/08 12:26:06 avsm Exp $ */
/*
* Copyright (c) 2003 Can Erkin Acar
@@ -147,13 +147,13 @@ priv_init(void)
fd = open(filename,
O_RDWR|O_CREAT|O_APPEND|O_NONBLOCK|O_NOFOLLOW,
0600);
- send_fd(socks[0], fd);
if (fd < 0)
logmsg(LOG_NOTICE,
"[priv]: failed to open %s: %s",
filename, strerror(errno));
else
close(fd);
+ send_fd(socks[0], fd);
break;
default: