From 28727173ee60ce74dbcb03e07c15543f1c4bb5fb Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Tue, 11 Nov 2008 21:48:07 +1100 Subject: [PATCH] --- yaml --- r: 120648 b: refs/heads/master c: 9d36be76c55ad2c2bb29683b752b0d9ad2e4eeef h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/capability.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4ed7a0778d9d..2324bec96064 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 39c9aede2b4a252bd296c0a86be832c3d3d0a273 +refs/heads/master: 9d36be76c55ad2c2bb29683b752b0d9ad2e4eeef diff --git a/trunk/include/linux/capability.h b/trunk/include/linux/capability.h index 5bc145bd759a..b5750d0b96e0 100644 --- a/trunk/include/linux/capability.h +++ b/trunk/include/linux/capability.h @@ -457,6 +457,13 @@ static inline int cap_isclear(const kernel_cap_t a) return 1; } +/* + * Check if "a" is a subset of "set". + * return 1 if ALL of the capabilities in "a" are also in "set" + * cap_issubset(0101, 1111) will return 1 + * return 0 if ANY of the capabilities in "a" are not in "set" + * cap_issubset(1111, 0101) will return 0 + */ static inline int cap_issubset(const kernel_cap_t a, const kernel_cap_t set) { kernel_cap_t dest;