summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-05-04 10:19:23 +0530
committerNiels de Vos <ndevos@redhat.com>2016-05-12 00:03:53 -0700
commit54b991b587317a8be06faded01eed4ee046f3bb8 (patch)
tree8f594c802a6b9bf4e57840723fa2d370ed7627ed /libglusterfs
parent11dca385555ae086f14bb26a33ec9713b5d09ee6 (diff)
libglusterfs: Fix security prefix comparison
>BUG: 1331860 >Change-Id: If35012ee35104848d7d3b21900c7f533d0253cde >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14194 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1335282 Change-Id: Ib2388883d0fd3d777dbc6e856cc44d6179909bfa Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14301 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/syscall.c2
1 files changed, 1 insertions, 1 deletions
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,