Home
last modified time | relevance | path

Searched refs:caps (Results 1 – 9 of 9) sorted by relevance

/system/core/init/
Dcapabilities.cpp120 ScopedCaps caps(cap_init()); in SetProcCaps() local
122 cap_clear(caps.get()); in SetProcCaps()
127 if (cap_set_flag(caps.get(), CAP_INHERITABLE, arraysize(value), value, CAP_SET) != 0 || in SetProcCaps()
128 cap_set_flag(caps.get(), CAP_PERMITTED, arraysize(value), value, CAP_SET) != 0) { in SetProcCaps()
137 if (cap_set_flag(caps.get(), CAP_PERMITTED, arraysize(value), value, CAP_SET) != 0 || in SetProcCaps()
138 cap_set_flag(caps.get(), CAP_EFFECTIVE, arraysize(value), value, CAP_SET) != 0) { in SetProcCaps()
144 if (cap_set_proc(caps.get()) != 0) { in SetProcCaps()
210 ScopedCaps caps(cap_get_proc()); in DropInheritableCaps() local
211 if (cap_clear_flag(caps.get(), CAP_INHERITABLE) == -1) { in DropInheritableCaps()
215 if (cap_set_proc(caps.get()) != 0) { in DropInheritableCaps()
Dcapabilities.h28 void operator()(cap_t caps) const { cap_free(caps); } in operator()
Dreboot_utils.cpp88 ScopedCaps caps(cap_get_proc()); in IsRebootCapable() local
89 if (!caps) { in IsRebootCapable()
95 if (cap_get_flag(caps.get(), CAP_SYS_BOOT, CAP_EFFECTIVE, &value) != 0) { in IsRebootCapable()
/system/logging/logd/
Dmain.cpp87 std::unique_ptr<struct _cap_struct, int (*)(void*)> caps(cap_init(), cap_free); in DropPrivs() local
88 if (cap_clear(caps.get()) < 0) { in DropPrivs()
93 if (cap_set_flag(caps.get(), CAP_PERMITTED, 1, &cap_syslog, CAP_SET) < 0 || in DropPrivs()
94 cap_set_flag(caps.get(), CAP_EFFECTIVE, 1, &cap_syslog, CAP_SET) < 0) { in DropPrivs()
100 if (cap_set_flag(caps.get(), CAP_PERMITTED, 1, &cap_audit_control, CAP_SET) < 0 || in DropPrivs()
101 cap_set_flag(caps.get(), CAP_EFFECTIVE, 1, &cap_audit_control, CAP_SET) < 0) { in DropPrivs()
105 if (cap_set_proc(caps.get()) < 0) { in DropPrivs()
/system/core/libcutils/
Dsched_policy_test.cpp33 __user_cap_data_struct caps[_LINUX_CAPABILITY_U32S_3]; in hasCapSysNice() local
34 if (capget(&header, &caps[0])) { in hasCapSysNice()
41 return caps[nice_idx].effective & nice_mask; in hasCapSysNice()
/system/chre/pal/tests/src/
Dble_pal_impl_test.cc160 auto caps = mApi->getCapabilities(); in TEST_F() local
161 LOGI("capabilities: 0x%x", caps); in TEST_F()
162 EXPECT_NE(caps, 0); in TEST_F()
163 EXPECT_EQ(caps & ~(CHRE_BLE_CAPABILITIES_SCAN | in TEST_F()
/system/sepolicy/private/
Dperformanced.te12 # TODO: use file caps to obtain sys_nice instead of setuid / setgid.
Ddomain.te1436 # Only allow filesystem caps to be set at build time. Runtime changes
/system/sepolicy/microdroid/system/private/
Ddomain.te516 # Only allow filesystem caps to be set at build time. Runtime changes