summaryrefslogtreecommitdiffstats
path: root/src/test/test-acl-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-08-26 10:59:32 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-08-27 10:20:12 +0200
commit567aeb5801e3df568ac336f5d7da945964912c32 (patch)
treef320c8b9bc0256f5a8e02c286715245e4c516c3e /src/test/test-acl-util.c
parentman: shorten description of recursive credential passing in nspawn (diff)
downloadsystemd-567aeb5801e3df568ac336f5d7da945964912c32.tar.xz
systemd-567aeb5801e3df568ac336f5d7da945964912c32.zip
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/test/test-acl-util.c')
-rw-r--r--src/test/test-acl-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c
index 9a3db3c8e3..00c482efed 100644
--- a/src/test/test-acl-util.c
+++ b/src/test/test-acl-util.c
@@ -41,8 +41,8 @@ static void test_add_acls_for_user(void) {
} else
uid = getuid();
- r = fd_add_uid_acl_permission(fd, uid, true, false, false);
- log_info_errno(r, "fd_add_uid_acl_permission(%i, "UID_FMT", true, false, false): %m", fd, uid);
+ r = fd_add_uid_acl_permission(fd, uid, ACL_READ);
+ log_info_errno(r, "fd_add_uid_acl_permission(%i, "UID_FMT", ACL_READ): %m", fd, uid);
assert_se(r >= 0);
cmd = strjoina("ls -l ", fn);
@@ -53,7 +53,7 @@ static void test_add_acls_for_user(void) {
/* set the acls again */
- r = fd_add_uid_acl_permission(fd, uid, true, false, false);
+ r = fd_add_uid_acl_permission(fd, uid, ACL_READ);
assert_se(r >= 0);
cmd = strjoina("ls -l ", fn);