From 7d431c14bc458e9451e9c737f5879968a7b6a0b9 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 4 May 2016 10:19:23 +0530 Subject: libglusterfs: Fix security prefix comparison BUG: 1331860 Change-Id: If35012ee35104848d7d3b21900c7f533d0253cde Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/14194 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- libglusterfs/src/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src') diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c index 7e7db9318f9..316d80452fb 100644 --- a/libglusterfs/src/syscall.c +++ b/libglusterfs/src/syscall.c @@ -350,7 +350,7 @@ gf_add_prefix(const char *ns, const char *key, char **newkey) /* if we dont have any namespace, append USER NS */ if (strncmp(key, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) && strncmp(key, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) && - strncmp(key, XATTR_SECURITY_PREFIX, XATTR_TRUSTED_PREFIX_LEN) && + strncmp(key, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) && strncmp(key, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) { int ns_length = strlen(ns); *newkey = GF_MALLOC(ns_length + strlen(key) + 10, -- cgit