Lines Matching refs:cap_p
159 cap_t cap_p; in limit_capabilities() local
161 cap_p = cap_get_proc(); in limit_capabilities()
162 if (!cap_p) { in limit_capabilities()
167 cap_get_flag(cap_p, CAP_NET_RAW, CAP_PERMITTED, &cap_raw); in limit_capabilities()
170 if (cap_clear(cap_p) < 0) { in limit_capabilities()
175 cap_set_flag(cap_p, CAP_PERMITTED, 1, caps, CAP_SET); in limit_capabilities()
177 if (cap_set_proc(cap_p) < 0) { in limit_capabilities()
199 cap_free(cap_p); in limit_capabilities()
208 cap_t cap_p; in modify_capability_raw() local
213 cap_p = cap_get_proc(); in modify_capability_raw()
214 if (!cap_p) { in modify_capability_raw()
219 cap_set_flag(cap_p, CAP_EFFECTIVE, 1, caps, on ? CAP_SET : CAP_CLEAR); in modify_capability_raw()
221 if (cap_set_proc(cap_p) < 0) { in modify_capability_raw()
226 cap_free(cap_p); in modify_capability_raw()
249 cap_t cap_p = cap_init(); in drop_capabilities() local
251 if (!cap_p) { in drop_capabilities()
256 if (cap_set_proc(cap_p) < 0) { in drop_capabilities()
261 cap_free(cap_p); in drop_capabilities()