aboutsummaryrefslogtreecommitdiffstats
path: root/security/commoncap.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/commoncap.c')
-rw-r--r--security/commoncap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index c45c4d20baa8..4e015996dd4d 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -570,7 +570,7 @@ int cap_inode_setxattr(struct dentry *dentry, const char *name,
570 } 570 }
571 571
572 if (!strncmp(name, XATTR_SECURITY_PREFIX, 572 if (!strncmp(name, XATTR_SECURITY_PREFIX,
573 sizeof(XATTR_SECURITY_PREFIX) - 1) && 573 sizeof(XATTR_SECURITY_PREFIX) - 1) &&
574 !capable(CAP_SYS_ADMIN)) 574 !capable(CAP_SYS_ADMIN))
575 return -EPERM; 575 return -EPERM;
576 return 0; 576 return 0;
@@ -596,7 +596,7 @@ int cap_inode_removexattr(struct dentry *dentry, const char *name)
596 } 596 }
597 597
598 if (!strncmp(name, XATTR_SECURITY_PREFIX, 598 if (!strncmp(name, XATTR_SECURITY_PREFIX,
599 sizeof(XATTR_SECURITY_PREFIX) - 1) && 599 sizeof(XATTR_SECURITY_PREFIX) - 1) &&
600 !capable(CAP_SYS_ADMIN)) 600 !capable(CAP_SYS_ADMIN))
601 return -EPERM; 601 return -EPERM;
602 return 0; 602 return 0;