/third_party/ltp/testcases/kernel/security/cap_bound/ |
H A D | cap_bset_inh_bounds.c | 51 /* We pick a random capability... let's use CAP_SYS_ADMIN */ in main() 53 ret = prctl(PR_CAPBSET_READ, CAP_SYS_ADMIN); in main() 55 tst_brkm(TBROK, NULL, "Not starting with CAP_SYS_ADMIN"); in main() 75 ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f); in main() 77 tst_brkm(TBROK, NULL, "Failed to add CAP_SYS_ADMIN to pI"); in main() 82 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN); in main() 85 "Failed to drop CAP_SYS_ADMIN from bounding set."); in main() 90 /* test 1: is CAP_SYS_ADMIN still in pI? */ in main() 92 ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f); in main() 96 "CAP_SYS_ADMIN no in main() [all...] |
H A D | exec_without_inh.c | 23 * Make sure that CAP_SYS_ADMIN is not in pI 24 * drop CAP_SYS_ADMIN from bounding set 26 * check_pe will return PASS if it does not have CAP_SYS_ADMIN in pE. 51 /* Make sure CAP_SYS_ADMIN is not in pI */ in main() 53 ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f); in main() 55 v[0] = CAP_SYS_ADMIN; in main() 66 CAP_SYS_ADMIN to pI"); in main() 71 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN); in main() 74 "Failed to drop CAP_SYS_ADMIN from bounding set."); in main()
|
H A D | exec_with_inh.c | 23 * Make sure that CAP_SYS_ADMIN is in pI 24 * drop CAP_SYS_ADMIN from bounding set 26 * check_pe will return PASS if it has CAP_SYS_ADMIN in pE. 50 /* Make sure CAP_SYS_ADMIN is in pI */ in main() 67 ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f); in main() 69 tst_brkm(TBROK, NULL, "Failed to add CAP_SYS_ADMIN to pI"); in main() 74 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN); in main() 77 "Failed to drop CAP_SYS_ADMIN from bounding set."); in main()
|
H A D | check_pe.c | 23 * check whether CAP_SYS_ADMIN is in pE. 25 * * argv[0] is 1 and CAP_SYS_ADMIN is in PE, or 26 * * argv[0] is 0 and CAP_SYS_ADMIN is not in pE 60 ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_EFFECTIVE, &f); in main()
|
/third_party/ltp/include/lapi/ |
H A D | capability.h | 35 #ifndef CAP_SYS_ADMIN 36 # define CAP_SYS_ADMIN 21 macro
|
/third_party/musl/src/linux/liteos_a/ |
H A D | cap.c | 25 CAP_NET_BROADCAST, CAP_NET_ADMIN, CAP_NET_RAW, CAP_SYS_PTRACE, CAP_SYS_ADMIN, 86 case CAP_SYS_ADMIN: in linux_caps_to_ohos() 161 result |= 1 << CAP_SYS_ADMIN; in ohos_caps_to_linux()
|
/third_party/musl/porting/liteos_a/user/src/linux/ |
H A D | cap.c | 41 CAP_NET_BROADCAST, CAP_NET_ADMIN, CAP_NET_RAW, CAP_SYS_PTRACE, CAP_SYS_ADMIN, 102 case CAP_SYS_ADMIN: in linux_caps_to_ohos() 177 result |= 1 << CAP_SYS_ADMIN; in ohos_caps_to_linux()
|
/third_party/ltp/testcases/kernel/syscalls/quotactl/ |
H A D | quotactl06.c | 27 * - EPERM when the caller lacked the required privilege (CAP_SYS_ADMIN) for 74 .id = CAP_SYS_ADMIN, 75 .name = "CAP_SYS_ADMIN", 80 .id = CAP_SYS_ADMIN, 81 .name = "CAP_SYS_ADMIN", 123 "EPERM when the caller lacks the required privilege (CAP_SYS_ADMIN)"},
|
H A D | quotactl09.c | 18 * - EPERM when the caller lacked the required privilege (CAP_SYS_ADMIN) for the 47 .id = CAP_SYS_ADMIN, 48 .name = "CAP_SYS_ADMIN", 53 .id = CAP_SYS_ADMIN, 54 .name = "CAP_SYS_ADMIN", 78 "EPERM when the caller lacks required privilege(CAP_SYS_ADMIN)"},
|
/third_party/ltp/lib/newlib_tests/ |
H A D | tst_capability02.c | 32 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
/third_party/ltp/testcases/kernel/syscalls/bpf/ |
H A D | bpf_prog06.c | 139 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
H A D | bpf_prog04.c | 114 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
H A D | bpf_prog05.c | 198 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
H A D | bpf_prog03.c | 152 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
H A D | bpf_prog07.c | 147 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
H A D | bpf_prog02.c | 114 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
/third_party/ltp/testcases/kernel/syscalls/close_range/ |
H A D | close_range01.c | 202 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
/third_party/ltp/testcases/kernel/syscalls/prctl/ |
H A D | prctl02.c | 18 * the process does not have the CAP_SYS_ADMIN capability 202 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
/third_party/ltp/testcases/network/can/filter-tests/ |
H A D | can_rcv_own_msgs.c | 145 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
H A D | can_filter.c | 183 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
|
/third_party/ltp/testcases/kernel/syscalls/pivot_root/ |
H A D | pivot_root01.c | 59 * The calling process does not have the CAP_SYS_ADMIN capability. 78 cap_value_t cap_value[] = { CAP_SYS_ADMIN }; in drop_cap_sys_admin()
|
/third_party/rust/crates/rustix/src/thread/ |
H A D | prctl.rs | 183 const CAP_SYS_ADMIN: u32 = 21; consts 298 SystemAdmin = CAP_SYS_ADMIN,
|
/third_party/libfuse/util/ |
H A D | mount.fuse.c | 356 CAP_TO_MASK(CAP_SYS_ADMIN); in main() 358 fprintf(stderr, "%s: drop_privileges was requested, which launches the FUSE file system fully unprivileged. In order to do so %s must be run with privileges, please invoke with CAP_SYS_ADMIN and CAP_SETPCAP (e.g. as root).\n", in main()
|