diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-11-28 22:29:45 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-11-28 22:29:45 +0000 |
commit | 9b02e944d8a1968fe39ff654b9f987ed838daed2 (patch) | |
tree | e4f8de597ed01e35e4888993a3326d52ab5b05f8 /libexec/ftpd | |
parent | c8c3b488cdbceaf7087fcdc77ce2176566962017 (diff) |
logging fixes:
-don't prefix ftpd: in syslog(), it does that for us
-replace a bad (too late) err() by syslog + exit
from moritz
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 0705b9d63b3..66b5ce7e170 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.158 2004/11/28 19:36:48 henning Exp $ */ +/* $OpenBSD: ftpd.c,v 1.159 2004/11/28 22:29:44 henning Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -70,7 +70,7 @@ static const char copyright[] = static const char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94"; #else static const char rcsid[] = - "$OpenBSD: ftpd.c,v 1.158 2004/11/28 19:36:48 henning Exp $"; + "$OpenBSD: ftpd.c,v 1.159 2004/11/28 22:29:44 henning Exp $"; #endif #endif /* not lint */ @@ -97,7 +97,6 @@ static const char rcsid[] = #include <bsd_auth.h> #include <ctype.h> #include <dirent.h> -#include <err.h> #include <errno.h> #include <fcntl.h> #include <glob.h> @@ -353,7 +352,7 @@ main(int argc, char *argv[]) val = strtol(optarg, &p, 8); if (*p != '\0' || val < 0 || (val & ~ACCESSPERMS)) { syslog(LOG_ERR, - "ftpd: %s is a bad value for -u, aborting..", + "%s is a bad value for -u, aborting..", optarg); exit(2); } else @@ -482,7 +481,8 @@ main(int argc, char *argv[]) if (poll(pfds, n, INFTIM) < 0) { if (errno == EINTR) continue; - err(1, "poll"); + syslog(LOG_ERR, "poll: %m"); + exit(1); } for (i = 0; i < n; i++) if (pfds[i].revents & POLLIN) { |