diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-05-19 00:22:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-05-19 00:26:48 +0200 |
commit | 26b9f165c3ebf513110e3de88c92fcbf3011271d (patch) | |
tree | 3d7f378d4ee942bbb35dd99be919e20066123942 /src | |
parent | d52da2057f06c49d50ed99300dc407c0227b1a32 (diff) |
journalctl: lstat() should suffice if we call canonicalize_file_name() first
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journalctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 3a59d7ff1b..d0cc5d9b2e 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -795,7 +795,7 @@ static int add_matches(sd_journal *j, char **args) { p = canonicalize_file_name(*i); path = p ? p : *i; - if (stat(path, &st) < 0) + if (lstat(path, &st) < 0) return log_error_errno(errno, "Couldn't stat file: %m"); if (S_ISREG(st.st_mode) && (0111 & st.st_mode)) { |