Lines Matching full:cap

269  * @cap: The capability to be tested for
277 struct user_namespace *ns, int cap) in has_ns_capability() argument
282 ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NONE); in has_ns_capability()
291 * @cap: The capability to be tested for
298 bool has_capability(struct task_struct *t, int cap) in has_capability() argument
300 return has_ns_capability(t, &init_user_ns, cap); in has_capability()
309 * @cap: The capability to be tested for
318 struct user_namespace *ns, int cap) in has_ns_capability_noaudit() argument
323 ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NOAUDIT); in has_ns_capability_noaudit()
333 * @cap: The capability to be tested for
341 bool has_capability_noaudit(struct task_struct *t, int cap) in has_capability_noaudit() argument
343 return has_ns_capability_noaudit(t, &init_user_ns, cap); in has_capability_noaudit()
348 int cap, in ns_capable_common() argument
353 if (unlikely(!cap_valid(cap))) { in ns_capable_common()
354 pr_crit("capable() called with invalid cap=%u\n", cap); in ns_capable_common()
358 capable = security_capable(current_cred(), ns, cap, opts); in ns_capable_common()
369 * @cap: The capability to be tested for
377 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() argument
379 return ns_capable_common(ns, cap, CAP_OPT_NONE); in ns_capable()
387 * @cap: The capability to be tested for
395 bool ns_capable_noaudit(struct user_namespace *ns, int cap) in ns_capable_noaudit() argument
397 return ns_capable_common(ns, cap, CAP_OPT_NOAUDIT); in ns_capable_noaudit()
406 * @cap: The capability to be tested for
414 bool ns_capable_setid(struct user_namespace *ns, int cap) in ns_capable_setid() argument
416 return ns_capable_common(ns, cap, CAP_OPT_INSETID); in ns_capable_setid()
422 * @cap: The capability to be tested for
430 bool capable(int cap) in capable() argument
432 return ns_capable(&init_user_ns, cap); in capable()
441 * @cap: The capability to be tested for
450 int cap) in file_ns_capable() argument
453 if (WARN_ON_ONCE(!cap_valid(cap))) in file_ns_capable()
456 if (security_capable(file->f_cred, ns, cap, CAP_OPT_NONE) == 0) in file_ns_capable()
483 * @cap: The capability in question
490 const struct inode *inode, int cap) in capable_wrt_inode_uidgid() argument
494 return ns_capable(ns, cap) && in capable_wrt_inode_uidgid()