Home
last modified time | relevance | path

Searched refs:setgroups_fd (Results 1 – 4 of 4) sorted by relevance

/linux/tools/testing/selftests/namespaces/
H A Dfile_handle_test.c483 int setgroups_fd = open("/proc/self/setgroups", O_WRONLY); in TEST() local
485 if (uid_map_fd < 0 || gid_map_fd < 0 || setgroups_fd < 0) { in TEST()
492 write(setgroups_fd, "deny", 4); in TEST()
493 close(setgroups_fd); in TEST()
612 int setgroups_fd = open("/proc/self/setgroups", O_WRONLY); in TEST() local
614 if (uid_map_fd < 0 || gid_map_fd < 0 || setgroups_fd < 0) { in TEST()
621 write(setgroups_fd, "deny", 4); in TEST()
622 close(setgroups_fd); in TEST()
741 int setgroups_fd = open("/proc/self/setgroups", O_WRONLY); in TEST() local
743 if (uid_map_fd < 0 || gid_map_fd < 0 || setgroups_fd < 0) { in TEST()
[all …]
H A Dns_active_ref_test.c320 int setgroups_fd = open("/proc/self/setgroups", O_WRONLY); in TEST() local
322 if (uid_map_fd >= 0 && gid_map_fd >= 0 && setgroups_fd >= 0) { in TEST()
323 write(setgroups_fd, "deny", 4); in TEST()
324 close(setgroups_fd); in TEST()
/linux/tools/testing/selftests/filesystems/binderfs/
H A Dbinderfs_test.c255 int setgroups_fd; in write_id_mapping() local
258 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping()
259 if (setgroups_fd < 0 && errno != ENOENT) in write_id_mapping()
262 if (setgroups_fd >= 0) { in write_id_mapping()
263 ret = write_nointr(setgroups_fd, "deny", sizeof("deny") - 1); in write_id_mapping()
264 close_prot_errno_disarm(setgroups_fd); in write_id_mapping()
/linux/tools/testing/selftests/filesystems/
H A Dutils.c182 int fd = -EBADF, setgroups_fd = -EBADF; in write_id_mapping() local
193 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC); in write_id_mapping()
194 if (setgroups_fd < 0 && errno != ENOENT) { in write_id_mapping()
199 if (setgroups_fd >= 0) { in write_id_mapping()
200 ret = write_nointr(setgroups_fd, "deny\n", STRLITERALLEN("deny\n")); in write_id_mapping()
228 close(setgroups_fd); in write_id_mapping()