journalctl: lstat() should suffice if we call canonicalize_file_name() first

This commit is contained in:
Lennart Poettering
2015-05-19 00:26:48 +02:00
parent d52da2057f
commit 26b9f165c3
+1 -1
View File
@@ -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)) {