diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-07-12 09:22:39 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-07-12 09:22:39 +0000 |
commit | 3fc5e5ff725140f62e0b54aa4afb722940ad9586 (patch) | |
tree | 1fb2388a1a06763798e2ba6843359b5889ca9431 | |
parent | b8bfb9dafa0ea4e9b0e9e90eb1c0e63094fa52ea (diff) |
Replace errx with equivalent fprintf+exit to make porting easier; ok henning@
-rw-r--r-- | usr.sbin/ntpd/buffer.c | 3 | ||||
-rw-r--r-- | usr.sbin/ntpd/log.c | 3 | ||||
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 15 | ||||
-rw-r--r-- | usr.sbin/ntpd/parse.y | 3 |
4 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/ntpd/buffer.c b/usr.sbin/ntpd/buffer.c index efc1bfffc8c..a1bedd5b12d 100644 --- a/usr.sbin/ntpd/buffer.c +++ b/usr.sbin/ntpd/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.1 2004/05/31 13:46:16 henning Exp $ */ +/* $OpenBSD: buffer.c,v 1.2 2004/07/12 09:22:38 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -21,7 +21,6 @@ #include <stdio.h> #include <stdlib.h> -#include <err.h> #include <errno.h> #include <limits.h> #include <string.h> diff --git a/usr.sbin/ntpd/log.c b/usr.sbin/ntpd/log.c index 40acc044dff..4445972f8b8 100644 --- a/usr.sbin/ntpd/log.c +++ b/usr.sbin/ntpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.5 2004/07/11 03:05:50 dtucker Exp $ */ +/* $OpenBSD: log.c,v 1.6 2004/07/12 09:22:38 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -21,7 +21,6 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include <err.h> #include <errno.h> #include <stdarg.h> #include <stdio.h> diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 6115ac582c7..d00caf66fe6 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.10 2004/07/09 15:08:54 deraadt Exp $ */ +/* $OpenBSD: ntpd.c,v 1.11 2004/07/12 09:22:38 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -21,7 +21,6 @@ #include <sys/wait.h> #include <netinet/in.h> #include <arpa/inet.h> -#include <err.h> #include <errno.h> #include <fcntl.h> #include <poll.h> @@ -110,11 +109,15 @@ main(int argc, char *argv[]) if (parse_config(conffile, &conf)) exit(1); - if (geteuid()) - errx(1, "need root privileges"); + if (geteuid()) { + fprintf(stderr, "ntpd: need root privileges"); + exit(1); + } - if (getpwnam(NTPD_USER) == NULL) - errx(1, "unknown user %s", NTPD_USER); + if (getpwnam(NTPD_USER) == NULL) { + fprintf(stderr, "ntpd: unknown user %s", NTPD_USER); + exit(1); + } endpwent(); log_init(debug); diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y index 73bba735ebc..5599202e012 100644 --- a/usr.sbin/ntpd/parse.y +++ b/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.11 2004/07/09 19:28:03 otto Exp $ */ +/* $OpenBSD: parse.y,v 1.12 2004/07/12 09:22:38 dtucker Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -26,7 +26,6 @@ #include <arpa/inet.h> #include <ctype.h> -#include <err.h> #include <errno.h> #include <limits.h> #include <stdarg.h> |