Lines Matching refs:cap_idx
105 static void drop_capset(int cap_idx) in drop_capset() argument
110 caps.data[CAP_TO_INDEX(cap_idx)].inheritable &= ~CAP_TO_MASK(cap_idx); in drop_capset()
115 static void drop_bounding_set(int cap_idx) in drop_bounding_set() argument
119 ret = prctl(PR_CAPBSET_READ, cap_idx, 0, 0, 0); in drop_bounding_set()
124 ret = prctl(PR_CAPBSET_DROP, cap_idx, 0, 0, 0); in drop_bounding_set()
130 static void drop_usermodehelper(const char *filename, int cap_idx) in drop_usermodehelper() argument
146 if (cap_idx < 32) in drop_usermodehelper()
147 lo &= ~(1 << cap_idx); in drop_usermodehelper()
149 hi &= ~(1 << (cap_idx - 32)); in drop_usermodehelper()
162 unsigned cap_idx; in drop_capabilities() local
164 cap_idx = cap_name_to_number(cap); in drop_capabilities()
165 drop_usermodehelper("/proc/sys/kernel/usermodehelper/bset", cap_idx); in drop_capabilities()
166 drop_usermodehelper("/proc/sys/kernel/usermodehelper/inheritable", cap_idx); in drop_capabilities()
167 drop_bounding_set(cap_idx); in drop_capabilities()
168 drop_capset(cap_idx); in drop_capabilities()