diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-04-08 14:32:48 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-04-08 14:32:48 +0000 |
commit | b42a153f2ead9d9ec3b0c08fbf863771074b7622 (patch) | |
tree | c10bd704acdd53d389977ba3ce0b3405c9df41d3 | |
parent | 67bfc05a88ea11cdbc5ba44db7442ae468f04e08 (diff) |
sigh, really fix the error message this time, thanks Moritz Jodeit
-rw-r--r-- | sbin/pflogd/privsep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/pflogd/privsep.c b/sbin/pflogd/privsep.c index f859c60e3a4..c21f41895fe 100644 --- a/sbin/pflogd/privsep.c +++ b/sbin/pflogd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.10 2004/04/08 12:26:06 avsm Exp $ */ +/* $OpenBSD: privsep.c,v 1.11 2004/04/08 14:32:47 avsm Exp $ */ /* * Copyright (c) 2003 Can Erkin Acar @@ -67,7 +67,7 @@ int priv_init(void) { int i, fd, socks[2], cmd; - int snaplen, ret; + int snaplen, ret, olderrno; struct passwd *pw; for (i = 1; i < _NSIG; i++) @@ -147,13 +147,14 @@ priv_init(void) fd = open(filename, O_RDWR|O_CREAT|O_APPEND|O_NONBLOCK|O_NOFOLLOW, 0600); + olderrno = errno; + send_fd(socks[0], fd); if (fd < 0) logmsg(LOG_NOTICE, "[priv]: failed to open %s: %s", - filename, strerror(errno)); + filename, strerror(olderrno)); else close(fd); - send_fd(socks[0], fd); break; default: |