Lines Matching refs:cap

273  * @cap: The capability to be tested for
281 struct user_namespace *ns, int cap)
286 ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NONE);
295 * @cap: The capability to be tested for
302 bool has_capability(struct task_struct *t, int cap)
304 return has_ns_capability(t, &init_user_ns, cap);
313 * @cap: The capability to be tested for
322 struct user_namespace *ns, int cap)
327 ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NOAUDIT);
337 * @cap: The capability to be tested for
345 bool has_capability_noaudit(struct task_struct *t, int cap)
347 return has_ns_capability_noaudit(t, &init_user_ns, cap);
352 int cap,
357 if (unlikely(!cap_valid(cap))) {
358 pr_crit("capable() called with invalid cap=%u\n", cap);
362 capable = security_capable(current_cred(), ns, cap, opts);
373 * @cap: The capability to be tested for
381 bool ns_capable(struct user_namespace *ns, int cap)
383 return ns_capable_common(ns, cap, CAP_OPT_NONE);
391 * @cap: The capability to be tested for
399 bool ns_capable_noaudit(struct user_namespace *ns, int cap)
401 return ns_capable_common(ns, cap, CAP_OPT_NOAUDIT);
410 * @cap: The capability to be tested for
418 bool ns_capable_setid(struct user_namespace *ns, int cap)
420 return ns_capable_common(ns, cap, CAP_OPT_INSETID);
426 * @cap: The capability to be tested for
434 bool capable(int cap)
436 return ns_capable(&init_user_ns, cap);
445 * @cap: The capability to be tested for
454 int cap)
457 if (WARN_ON_ONCE(!cap_valid(cap)))
460 if (security_capable(file->f_cred, ns, cap, CAP_OPT_NONE) == 0)
487 * @cap: The capability in question
494 const struct inode *inode, int cap)
498 return ns_capable(ns, cap) &&