Lines Matching defs:caps
33 #include "caps.h"
37 cap_t caps;
40 /* Let's reduce our caps to the minimum set and tell Linux to keep
44 caps = cap_init();
45 assert(caps);
46 cap_clear(caps);
48 cap_set_flag(caps, CAP_EFFECTIVE, 3, cap_values, CAP_SET);
49 cap_set_flag(caps, CAP_PERMITTED, 3, cap_values, CAP_SET);
51 if (cap_set_proc(caps) < 0) {
55 cap_free(caps);
68 cap_t caps;
71 /* Reduce our caps to the bare minimum and tell Linux not to keep
75 /* No longer retain caps across setuid() */
81 caps = cap_init();
82 assert(caps);
83 cap_clear(caps);
85 /* setuid() zeroed our effective caps, let's get them back */
86 cap_set_flag(caps, CAP_EFFECTIVE, 1, cap_values, CAP_SET);
87 cap_set_flag(caps, CAP_PERMITTED, 1, cap_values, CAP_SET);
89 if (cap_set_proc(caps) < 0) {
93 cap_free(caps);
99 cap_t caps;
104 caps = cap_init();
105 assert(caps);
106 cap_clear(caps);
108 if (cap_set_proc(caps) < 0) {
112 cap_free(caps);