summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:06 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:06 +0100
commit709f6e46a35ec492b70eb92943d82a8d838ce918 (patch)
tree66f37ebe9d7f2274a886867d2b4c9b2c38183444 /src/journal/journald-server.c
parentc3753458fc30f35b7c2d2c5d5873198cd18131d8 (diff)
treewide: use the negative error codes returned by our functions
Our functions return negative error codes. Do not rely on errno being set after calling our own functions.
Diffstat (limited to 'src/journal/journald-server.c')
-rw-r--r--src/journal/journald-server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 3fd25d1af4..7a70dcbc57 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -240,12 +240,17 @@ void server_fix_perms(Server *s, JournalFile *f, uid_t uid) {
/* We do not recalculate the mask unconditionally here,
* so that the fchmod() mask above stays intact. */
if (acl_get_permset(entry, &permset) < 0 ||
- acl_add_perm(permset, ACL_READ) < 0 ||
- calc_acl_mask_if_needed(&acl) < 0) {
+ acl_add_perm(permset, ACL_READ) < 0) {
log_warning_errno(errno, "Failed to patch ACL on %s, ignoring: %m", f->path);
return;
}
+ r = calc_acl_mask_if_needed(&acl);
+ if (r < 0) {
+ log_warning_errno(r, "Failed to patch ACL on %s, ignoring: %m", f->path);
+ return;
+ }
+
if (acl_set_fd(f->fd, acl) < 0)
log_warning_errno(errno, "Failed to set ACL on %s, ignoring: %m", f->path);