Skip to contentSkip to conversation

CONFIG_SECURITY_FILE_CAPABILITIES has been gone awhile

PATCH In review Serge E. Hallyn 2 participants 2 messages Apr 30, 2010 – May 1, 2010 1 message not in the archive Capabilities

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CONFIG_SECURITY_FILE_CAPABILITIES has been gone awhile

Thanks Matt for noticing the sbits testcase was screaming at us about this being broken!

---
 kernel/capability.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
kernel/capability.c +0 -16
index ccb8907..c39d6b0 100644
@@ -316,7 +316,6 @@ SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data)
 
 }
 
-#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
 int apply_securebits(unsigned securebits, struct cred *new)
 {
 	if ((((new->securebits & SECURE_ALL_LOCKS) >> 1)
@@ -361,21 +360,6 @@ static inline int restore_cap_bset(kernel_cap_t bset, struct cred *cred)
 	return 0;
 }
 
-#else /* CONFIG_SECURITY_FILE_CAPABILITIES */
-
-int apply_securebits(unsigned securebits, struct cred *new)
-{
-	/* settable securebits not supported */
-	return 0;
-}
-
-static inline int restore_cap_bset(kernel_cap_t bset, struct cred *cred)
-{
-	/* bounding sets not supported */
-	return 0;
-}
-#endif /* CONFIG_SECURITY_FILE_CAPABILITIES */
-
 #ifdef CONFIG_CHECKPOINT
 static int do_restore_caps(struct ckpt_capabilities *h, struct cred *cred)
 {
Signature · 1 line
1.6.0.4
#2 lore raw
In reply to a message not in the archive

Applied for v21.

Quoted 42 lines · Serge E. Hallyn

Thanks Matt for noticing the sbits testcase was screaming at us about this being broken!

---
 kernel/capability.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
kernel/capability.c +0 -16
index ccb8907..c39d6b0 100644
@@ -316,7 +316,6 @@ SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data)
 
 }
 
-#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
 int apply_securebits(unsigned securebits, struct cred *new)
 {
 	if ((((new->securebits & SECURE_ALL_LOCKS) >> 1)
@@ -361,21 +360,6 @@ static inline int restore_cap_bset(kernel_cap_t bset, struct cred *cred)
 	return 0;
 }
 
-#else /* CONFIG_SECURITY_FILE_CAPABILITIES */
-
-int apply_securebits(unsigned securebits, struct cred *new)
-{
-	/* settable securebits not supported */
-	return 0;
-}
-
-static inline int restore_cap_bset(kernel_cap_t bset, struct cred *cred)
-{
-	/* bounding sets not supported */
-	return 0;
-}
-#endif /* CONFIG_SECURITY_FILE_CAPABILITIES */
-
 #ifdef CONFIG_CHECKPOINT
 static int do_restore_caps(struct ckpt_capabilities *h, struct cred *cred)
 {