Home
last modified time | relevance | path

Searched refs:CAP_SYS_ADMIN (Results 1 - 23 of 23) sorted by relevance

/third_party/ltp/testcases/kernel/security/cap_bound/
H A Dcap_bset_inh_bounds.c51 /* 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 Dexec_without_inh.c23 * 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 Dexec_with_inh.c23 * 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 Dcheck_pe.c23 * 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 Dcapability.h35 #ifndef CAP_SYS_ADMIN
36 # define CAP_SYS_ADMIN 21 macro
/third_party/musl/src/linux/liteos_a/
H A Dcap.c25 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 Dcap.c41 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 Dquotactl06.c27 * - 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 Dquotactl09.c18 * - 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 Dtst_capability02.c32 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
/third_party/ltp/testcases/kernel/syscalls/bpf/
H A Dbpf_prog06.c139 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
H A Dbpf_prog04.c114 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
H A Dbpf_prog05.c198 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
H A Dbpf_prog03.c152 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
H A Dbpf_prog07.c147 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
H A Dbpf_prog02.c114 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
/third_party/ltp/testcases/kernel/syscalls/close_range/
H A Dclose_range01.c202 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
/third_party/ltp/testcases/kernel/syscalls/prctl/
H A Dprctl02.c18 * 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 Dcan_rcv_own_msgs.c145 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
H A Dcan_filter.c183 TST_CAP(TST_CAP_DROP, CAP_SYS_ADMIN),
/third_party/ltp/testcases/kernel/syscalls/pivot_root/
H A Dpivot_root01.c59 * 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 Dprctl.rs183 const CAP_SYS_ADMIN: u32 = 21; consts
298 SystemAdmin = CAP_SYS_ADMIN,
/third_party/libfuse/util/
H A Dmount.fuse.c356 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()

Completed in 9 milliseconds