diff options
author | ache <ache@FreeBSD.org> | 1997-05-05 15:00:15 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-05-05 15:00:15 +0000 |
commit | 40924e377c7624fb8a1a0f208e30a0364780684b (patch) | |
tree | ab04f5a0afb3a7317e3c62c046ce07f3285e6582 | |
parent | debef8b031b5038bd90f5b1029cdab5c48c7a8d7 (diff) | |
download | FreeBSD-src-40924e377c7624fb8a1a0f208e30a0364780684b.zip FreeBSD-src-40924e377c7624fb8a1a0f208e30a0364780684b.tar.gz |
Do not kill -HUP syslog if running in user mode (-r), it allows
private user logs rotation without error diagnostics
-rw-r--r-- | usr.sbin/newsyslog/newsyslog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index cacf1f6..8ff7ba2 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -25,11 +25,11 @@ provided "as is" without express or implied warranty. * keeping the a specified number of backup files around. * * $Source: /home/ncvs/src/usr.sbin/newsyslog/newsyslog.c,v $ - * $Author: imp $ + * $Author: ache $ */ #ifndef lint -static char rcsid[] = "$Id: newsyslog.c,v 1.10 1997/03/31 05:10:25 imp Exp $"; +static char rcsid[] = "$Id: newsyslog.c,v 1.11 1997/05/04 01:53:53 ache Exp $"; #endif /* not lint */ #ifndef CONF @@ -131,7 +131,7 @@ int main(argc,argv) } p = q = parse_file(); - syslog_pid = get_pid(PIDFILE); + syslog_pid = needroot ? get_pid(PIDFILE) : 0; while (p) { do_entry(p); @@ -466,7 +466,7 @@ static void dotrim(log,pid_file,numdays,flags,perm,owner_uid,group_gid) if (pid_file != NULL) { need_notification = 1; pid = get_pid(pid_file); - } else if (!(flags & CE_BINARY)) { + } else if (needroot && !(flags & CE_BINARY)) { need_notification = 1; pid = syslog_pid; } |