diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-08-26 10:59:32 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-08-27 10:20:12 +0200 |
commit | 567aeb5801e3df568ac336f5d7da945964912c32 (patch) | |
tree | f320c8b9bc0256f5a8e02c286715245e4c516c3e /src/coredump | |
parent | 508fa02d6f112c323b0ed595da85cc5bcdd2d122 (diff) | |
download | systemd-567aeb5801e3df568ac336f5d7da945964912c32.tar.gz |
shared/acl-util: convert rd,wr,ex to a bitmask
I find this version much more readable.
Add replacement defines so that when acl/libacl.h is not available, the
ACL_{READ,WRITE,EXECUTE} constants are also defined. Those constants were
declared in the kernel headers already in 1da177e4c3f41524e886b7f1b8a0c1f,
so they should be the same pretty much everywhere.
Diffstat (limited to 'src/coredump')
-rw-r--r-- | src/coredump/coredump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 9b7811ae54..ab6a840ebd 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -186,9 +186,9 @@ static int fix_acl(int fd, uid_t uid) { return 0; /* Make sure normal users can read (but not write or delete) their own coredumps */ - r = fd_add_uid_acl_permission(fd, uid, /* read = */ true, /* write = */ false, /* execute = */ false); + r = fd_add_uid_acl_permission(fd, uid, ACL_READ); if (r < 0) - return log_error_errno(r, "Failed to adjust ACL of coredump: %m"); + return log_error_errno(r, "Failed to adjust ACL of the coredump: %m"); #endif return 0; |