Searched refs:NamespaceUtils (Results 1 – 6 of 6) sorted by relevance
23 SANDBOX_TEST(NamespaceUtils, KernelSupportsUnprivilegedNamespace) { in SANDBOX_TEST() argument26 NamespaceUtils::KernelSupportsUnprivilegedNamespace(CLONE_NEWUSER); in SANDBOX_TEST()35 SANDBOX_TEST(NamespaceUtils, WriteToIdMapFile) { in SANDBOX_TEST() argument44 NamespaceUtils::KernelSupportsDenySetgroups(); in SANDBOX_TEST()51 RAW_CHECK(NamespaceUtils::DenySetgroups()); in SANDBOX_TEST()55 RAW_CHECK(NamespaceUtils::WriteToIdMapFile("/proc/self/uid_map", uid)); in SANDBOX_TEST()59 RAW_CHECK(NamespaceUtils::WriteToIdMapFile("/proc/self/gid_map", gid)); in SANDBOX_TEST()
36 bool NamespaceUtils::WriteToIdMapFile(const char* map_file, generic_id_t id) { in WriteToIdMapFile()57 bool NamespaceUtils::KernelSupportsUnprivilegedNamespace(int type) { in KernelSupportsUnprivilegedNamespace()99 bool NamespaceUtils::KernelSupportsDenySetgroups() { in KernelSupportsDenySetgroups()104 bool NamespaceUtils::DenySetgroups() { in DenySetgroups()
46 NamespaceUtils::KernelSupportsDenySetgroups()) {} in WriteUidGidMapDelegate()52 RAW_CHECK(NamespaceUtils::DenySetgroups()); in RunAsyncSafe()54 RAW_CHECK(NamespaceUtils::WriteToIdMapFile("/proc/self/uid_map", uid_)); in RunAsyncSafe()55 RAW_CHECK(NamespaceUtils::WriteToIdMapFile("/proc/self/gid_map", gid_)); in RunAsyncSafe()135 if (NamespaceUtils::KernelSupportsUnprivilegedNamespace(ns_type)) { in LaunchProcessWithOptions()
19 class SANDBOX_EXPORT NamespaceUtils {50 DISALLOW_IMPLICIT_CONSTRUCTORS(NamespaceUtils);
299 if (NamespaceUtils::KernelSupportsDenySetgroups()) { in MoveToNewUserNS()300 PCHECK(NamespaceUtils::DenySetgroups()); in MoveToNewUserNS()308 PCHECK(NamespaceUtils::WriteToIdMapFile(kGidMapFile, gid)); in MoveToNewUserNS()309 PCHECK(NamespaceUtils::WriteToIdMapFile(kUidMapFile, uid)); in MoveToNewUserNS()
78 NamespaceUtils::KernelSupportsUnprivilegedNamespace(CLONE_NEWPID)); in MULTIPROCESS_TEST_MAIN()80 NamespaceUtils::KernelSupportsUnprivilegedNamespace(CLONE_NEWNET)); in MULTIPROCESS_TEST_MAIN()97 NamespaceUtils::KernelSupportsUnprivilegedNamespace(CLONE_NEWPID)); in MULTIPROCESS_TEST_MAIN()