From 44ec97062dafc83b639c425da20387c8c7fb2d8b Mon Sep 17 00:00:00 2001 From: markj Date: Sun, 2 Jun 2013 01:10:49 +0000 Subject: [PATCH] We want to stat the archived log file rather than the logfile itself. PR: bin/179122 Submitted by: Oliver Fromme MFC after: 3 days --- usr.sbin/newsyslog/newsyslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 15340266395c..7a7e26f55caf 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -2326,7 +2326,7 @@ mtime_old_timelog(const char *file) if (validate_old_timelog(dir_fd, dp, logfname, &tm) == 0) continue; - if (fstatat(dir_fd, logfname, &sb, AT_SYMLINK_NOFOLLOW) == -1) { + if (fstatat(dir_fd, dp->d_name, &sb, AT_SYMLINK_NOFOLLOW) == -1) { warn("Cannot stat '%s'", file); continue; }