summaryrefslogtreecommitdiff
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-19 00:22:56 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-19 00:26:48 +0200
commit26b9f165c3ebf513110e3de88c92fcbf3011271d (patch)
tree3d7f378d4ee942bbb35dd99be919e20066123942 /src/journal/journalctl.c
parentd52da2057f06c49d50ed99300dc407c0227b1a32 (diff)
journalctl: lstat() should suffice if we call canonicalize_file_name() first
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r--src/journal/journalctl.c2
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)) {