Lines Matching refs:cap_p
509 cap_t cap_p, cap_cur_p; in limit_capabilities() local
511 cap_p = cap_init(); in limit_capabilities()
512 if (!cap_p) { in limit_capabilities()
526 cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_net_raw, CAP_SET); in limit_capabilities()
527 cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_net_raw, CAP_SET); in limit_capabilities()
532 cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET); in limit_capabilities()
534 if (cap_set_proc(cap_p) < 0) { in limit_capabilities()
546 cap_free(cap_p); in limit_capabilities()
555 cap_t cap_p; in drop_capabilities() local
557 cap_p = cap_init(); in drop_capabilities()
558 if (!cap_p) { in drop_capabilities()
565 cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET); in drop_capabilities()
566 cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuid, CAP_SET); in drop_capabilities()
568 if (cap_set_proc(cap_p) < 0) { in drop_capabilities()
584 cap_clear(cap_p); in drop_capabilities()
585 if (cap_set_proc(cap_p) < 0) { in drop_capabilities()
590 cap_free(cap_p); in drop_capabilities()