diff options
author | Eric Paris <eparis@redhat.com> | 2008-11-11 05:48:07 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-11 05:48:07 -0500 |
commit | 9d36be76c55ad2c2bb29683b752b0d9ad2e4eeef (patch) | |
tree | dc193d694a65dc64740928858432af7bb623d010 /include/linux | |
parent | 39c9aede2b4a252bd296c0a86be832c3d3d0a273 (diff) |
Document the order of arguments for cap_issubset. It's not instantly clear
which order the argument should be in. So give an example.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/capability.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 5bc145bd759a..b5750d0b96e0 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -457,6 +457,13 @@ static inline int cap_isclear(const kernel_cap_t a) | |||
457 | return 1; | 457 | return 1; |
458 | } | 458 | } |
459 | 459 | ||
460 | /* | ||
461 | * Check if "a" is a subset of "set". | ||
462 | * return 1 if ALL of the capabilities in "a" are also in "set" | ||
463 | * cap_issubset(0101, 1111) will return 1 | ||
464 | * return 0 if ANY of the capabilities in "a" are not in "set" | ||
465 | * cap_issubset(1111, 0101) will return 0 | ||
466 | */ | ||
460 | static inline int cap_issubset(const kernel_cap_t a, const kernel_cap_t set) | 467 | static inline int cap_issubset(const kernel_cap_t a, const kernel_cap_t set) |
461 | { | 468 | { |
462 | kernel_cap_t dest; | 469 | kernel_cap_t dest; |