Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300380 > unrolled thread
| Started by | Toralf Förster <toralf.foerster@gmx.de> |
|---|---|
| First post | 2016-01-03 21:10 +0100 |
| Last post | 2016-01-03 21:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 2/2] security: use XATTR_*_PREFIX_LEN instead sizeof(...) Toralf Förster <toralf.foerster@gmx.de> - 2016-01-03 21:10 +0100
| From | Toralf Förster <toralf.foerster@gmx.de> |
|---|---|
| Date | 2016-01-03 21:10 +0100 |
| Subject | [PATCH 2/2] security: use XATTR_*_PREFIX_LEN instead sizeof(...) |
| Message-ID | <qMX8t-1Ee-3@gated-at.bofh.it> |
use the definition in include/uapi/linux/xattr.h Signed-off-by: Toralf Förster <toralf.foerster@gmx.de> --- security/commoncap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/commoncap.c b/security/commoncap.c index 1832cf7..907a3ef 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -658,7 +658,7 @@ int cap_inode_setxattr(struct dentry *dentry, const char *name, } if (!strncmp(name, XATTR_SECURITY_PREFIX, - sizeof(XATTR_SECURITY_PREFIX) - 1) && + XATTR_SECURITY_PREFIX_LEN) && !capable(CAP_SYS_ADMIN)) return -EPERM; return 0; @@ -684,7 +684,7 @@ int cap_inode_removexattr(struct dentry *dentry, const char *name) } if (!strncmp(name, XATTR_SECURITY_PREFIX, - sizeof(XATTR_SECURITY_PREFIX) - 1) && + XATTR_SECURITY_PREFIX_LEN) && !capable(CAP_SYS_ADMIN)) return -EPERM; return 0; -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web