From 54b991b587317a8be06faded01eed4ee046f3bb8 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 BUG: 1335282 Change-Id: Ib2388883d0fd3d777dbc6e856cc44d6179909bfa Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/14301 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Niels de Vos --- libglusterfs/src/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs') 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