summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-09 21:56:49 +0100
committerDaniel Mack <github@zonque.org>2015-11-09 21:56:49 +0100
commitb0bc8dbd73b7d1f66f01849d89acca59c9fbc699 (patch)
treecf4ce91cd4a2c4dcf325ee210aa507b4dc5e78bb /src/journal/journald-server.c
parent70d54fca18f52e20c07f37a6c86133229521ee47 (diff)
parente1427b138fbf7b7f13bb61187635b882be3ca2b2 (diff)
Merge pull request #1820 from michich/errno-v2
[v2] treewide: treatment of errno and other cleanups
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);