summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2007-03-15 05:18:33 +0000
committerDamien Miller <djm@cvs.openbsd.org>2007-03-15 05:18:33 +0000
commit452292bc1f1eb3a48630f6cfd9fb495f5783fdca (patch)
tree6fca3bd20494071b12da8468e21c24bb8661ce41
parent14347a8bf0f7178191fb8cb3328f4fcf726b764c (diff)
use warnx and not logerror in monitor, logerror is for the slave;
ok henning@ while in lock
-rw-r--r--usr.sbin/syslogd/privsep.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/syslogd/privsep.c b/usr.sbin/syslogd/privsep.c
index 01f3d1d9c1b..8ffbdd7c850 100644
--- a/usr.sbin/syslogd/privsep.c
+++ b/usr.sbin/syslogd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.29 2007/02/20 11:24:32 henning Exp $ */
+/* $OpenBSD: privsep.c,v 1.30 2007/03/15 05:18:32 djm Exp $ */
/*
* Copyright (c) 2003 Anil Madhavapeddy <anil@recoil.org>
@@ -395,24 +395,24 @@ open_pipe(char *cmd)
argp[2] = cmd;
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fd) == -1) {
- logerror("open_pipe");
+ warnx("open_pipe");
return (-1);
}
/* make the fd on syslogd's side nonblocking */
if ((flags = fcntl(fd[1], F_GETFL, 0)) == -1) {
- logerror("fcntl");
+ warnx("fcntl");
return (-1);
}
flags |= O_NONBLOCK;
if ((flags = fcntl(fd[1], F_SETFL, flags)) == -1) {
- logerror("fcntl");
+ warnx("fcntl");
return (-1);
}
switch (pid = fork()) {
case -1:
- logerror("fork error");
+ warnx("fork error");
return (-1);
case 0:
break;
@@ -441,6 +441,8 @@ open_pipe(char *cmd)
err(1, "dup2 failed");
if (execv("/bin/sh", argp) == -1)
err(1, "execv %s", cmd);
+ /* NOTREACHED */
+ return (-1);
}
/* Check that the terminal device is ok, and if not, rewrite to /dev/null.