summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2004-06-19 03:28:42 +0000
committergad <gad@FreeBSD.org>2004-06-19 03:28:42 +0000
commit04ef458020d3773ca90efb24e46cf8750413f049 (patch)
tree20570e19e3c524bf31348b1e0fbe643518569210 /usr.sbin
parent5cfbdc1d4a69e351dac1bff15311fe583a260083 (diff)
downloadFreeBSD-src-04ef458020d3773ca90efb24e46cf8750413f049.zip
FreeBSD-src-04ef458020d3773ca90efb24e46cf8750413f049.tar.gz
Fix the check for a "duplicate filename to compress", so that we're checking
the *filename* and not the pid_file(!). Stupid brain-fault on my part. This could cause a segfault under -neworder if newsyslog had to rotate multiple files, and later ones had specifed the 'N' flag. Bug first reported by: le MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/newsyslog/newsyslog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c
index bc8dcdb..c160432 100644
--- a/usr.sbin/newsyslog/newsyslog.c
+++ b/usr.sbin/newsyslog/newsyslog.c
@@ -1890,7 +1890,7 @@ save_zipwork(const struct conf_entry *ent, const struct sigwork_entry *swork,
zprev = NULL;
ndiff = 1;
SLIST_FOREACH(ztmp, &zwhead, zw_nextp) {
- ndiff = strcmp(ent->pid_file, ztmp->zw_fname);
+ ndiff = strcmp(zipfname, ztmp->zw_fname);
if (ndiff == 0)
break;
if (zsize > ztmp->zw_fsize)
OpenPOWER on IntegriCloud