Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/newsyslog - Use _PATH_VARRUN.



details:   https://anonhg.NetBSD.org/src/rev/f257a494406b
branches:  trunk
changeset: 494754:f257a494406b
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Jul 13 11:28:50 2000 +0000

description:
- Use _PATH_VARRUN.
- Address PR 10577 from mjl: recognise '.' as user/group seperator.

diffstat:

 usr.bin/newsyslog/newsyslog.c |  7 ++++---
 usr.bin/newsyslog/pathnames.h |  4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diffs (51 lines):

diff -r 163e9b0cde7c -r f257a494406b usr.bin/newsyslog/newsyslog.c
--- a/usr.bin/newsyslog/newsyslog.c     Thu Jul 13 11:24:40 2000 +0000
+++ b/usr.bin/newsyslog/newsyslog.c     Thu Jul 13 11:28:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newsyslog.c,v 1.30 2000/07/11 12:06:32 ad Exp $        */
+/*     $NetBSD: newsyslog.c,v 1.31 2000/07/13 11:28:50 ad Exp $        */
 
 /*
  * Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
@@ -55,7 +55,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: newsyslog.c,v 1.30 2000/07/11 12:06:32 ad Exp $");
+__RCSID("$NetBSD: newsyslog.c,v 1.31 2000/07/13 11:28:50 ad Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -77,6 +77,7 @@
 #include <errno.h>
 #include <err.h>
 #include <util.h>
+#include <paths.h>
 
 #include "pathnames.h"
 
@@ -223,7 +224,7 @@
        ap = argv;
        strlcpy(log->logfile, *ap++, sizeof(log->logfile));
 
-       if (strchr(*ap, ':') != NULL) {
+       if (strchr(*ap, ':') != NULL || strchr(*ap, '.') != NULL) {
                if (parseuserspec(*ap++, &pw, &gr)) {
                        warnx("config line %d: unknown user/group", lineno);
                        return (-1);
diff -r 163e9b0cde7c -r f257a494406b usr.bin/newsyslog/pathnames.h
--- a/usr.bin/newsyslog/pathnames.h     Thu Jul 13 11:24:40 2000 +0000
+++ b/usr.bin/newsyslog/pathnames.h     Thu Jul 13 11:28:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pathnames.h,v 1.1 2000/07/07 10:52:41 ad Exp $ */
+/*     $NetBSD: pathnames.h,v 1.2 2000/07/13 11:28:51 ad Exp $ */
 
 /*
  * Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
@@ -28,5 +28,5 @@
  */
 
 #define        _PATH_NEWSYSLOGCONF     "/etc/newsyslog.conf"
-#define _PATH_SYSLOGDPID       "/var/run/syslogd.pid"
+#define _PATH_SYSLOGDPID       _PATH_VARRUN"syslogd.pid"
 #define _PATH_GZIP             "/usr/bin/gzip"



Home | Main Index | Thread Index | Old Index