diff options
author | markj <markj@FreeBSD.org> | 2013-06-02 01:10:49 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-06-02 01:10:49 +0000 |
commit | 44ec97062dafc83b639c425da20387c8c7fb2d8b (patch) | |
tree | bcbe4e6e1806b3f6aa09359a9e8d1ef8aa1a65df /usr.sbin/newsyslog | |
parent | c1cfd940d53801cf430078b6f8ca966c883203fd (diff) | |
download | FreeBSD-src-44ec97062dafc83b639c425da20387c8c7fb2d8b.zip FreeBSD-src-44ec97062dafc83b639c425da20387c8c7fb2d8b.tar.gz |
We want to stat the archived log file rather than the logfile itself.
PR: bin/179122
Submitted by: Oliver Fromme <olli@secnetix.de>
MFC after: 3 days
Diffstat (limited to 'usr.sbin/newsyslog')
-rw-r--r-- | usr.sbin/newsyslog/newsyslog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 1534026..7a7e26f 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; } |