Lines Matching refs:p
32 static bool has_xattr(const char *p) { in has_xattr() argument
35 if (lgetxattr(p, "system.posix_acl_access", buffer, sizeof(buffer)) < 0) { in has_xattr()
46 const char *p; in TEST() local
53 p = strjoina(t, "/dir"); in TEST()
54 assert_se(mkdir(p, 0777) >= 0); in TEST()
55 assert_se(lstat(p, &st) >= 0); in TEST()
60 assert_se(!has_xattr(p)); in TEST()
62 p = strjoina(t, "/dir/symlink"); in TEST()
63 assert_se(symlink("../../", p) >= 0); in TEST()
64 assert_se(lstat(p, &st) >= 0); in TEST()
69 assert_se(!has_xattr(p)); in TEST()
71 p = strjoina(t, "/dir/reg"); in TEST()
72 assert_se(mknod(p, S_IFREG|0777, 0) >= 0); in TEST()
73 assert_se(lstat(p, &st) >= 0); in TEST()
78 assert_se(!has_xattr(p)); in TEST()
80 p = strjoina(t, "/dir/sock"); in TEST()
81 assert_se(mknod(p, S_IFSOCK|0777, 0) >= 0); in TEST()
82 assert_se(lstat(p, &st) >= 0); in TEST()
87 assert_se(!has_xattr(p)); in TEST()
89 p = strjoina(t, "/dir/fifo"); in TEST()
90 assert_se(mknod(p, S_IFIFO|0777, 0) >= 0); in TEST()
91 assert_se(lstat(p, &st) >= 0); in TEST()
96 assert_se(!has_xattr(p)); in TEST()
99 p = strjoina(t, "/dir"); in TEST()
100 assert_se(setxattr(p, "system.posix_acl_access", acl, sizeof(acl), 0) >= 0); in TEST()
101 … assert_se(setxattr(p, "system.posix_acl_default", default_acl, sizeof(default_acl), 0) >= 0); in TEST()
102 assert_se(lstat(p, &st) >= 0); in TEST()
107 assert_se(has_xattr(p)); in TEST()
111 p = strjoina(t, "/dir"); in TEST()
112 assert_se(lstat(p, &st) >= 0); in TEST()
117 assert_se(!has_xattr(p)); in TEST()
119 p = strjoina(t, "/dir/symlink"); in TEST()
120 assert_se(lstat(p, &st) >= 0); in TEST()
125 assert_se(!has_xattr(p)); in TEST()
127 p = strjoina(t, "/dir/reg"); in TEST()
128 assert_se(lstat(p, &st) >= 0); in TEST()
133 assert_se(!has_xattr(p)); in TEST()
135 p = strjoina(t, "/dir/sock"); in TEST()
136 assert_se(lstat(p, &st) >= 0); in TEST()
141 assert_se(!has_xattr(p)); in TEST()
143 p = strjoina(t, "/dir/fifo"); in TEST()
144 assert_se(lstat(p, &st) >= 0); in TEST()
149 assert_se(!has_xattr(p)); in TEST()