|
Zbigniew Jędrzejewski-Szmek |
399a2a |
From 67c29191b0d4880decb771f2ed5cd155a4de09db Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
Date: Sun, 8 Mar 2015 11:11:50 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
Subject: [PATCH] sd-journal: return error when we cannot open a file
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
Lack of this caused journalctl not to display a hint about missing groups
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
properly when the user lacks permissions.
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
(cherry picked from commit 7b300be75e6d5755778dd7da63e7147866f21351)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
---
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
src/journal/sd-journal.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
index 9b57e5945d..9b9e8ac859 100644
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
--- a/src/journal/sd-journal.c
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+++ b/src/journal/sd-journal.c
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
@@ -1248,7 +1248,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) {
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
r = add_any_file(j, path);
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
if (r == -ENOENT)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
- return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+ return r;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
}
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
static int remove_file(sd_journal *j, const char *prefix, const char *filename) {
|