diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2017-07-12 09:18:02 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-07-18 06:48:54 +0000 |
commit | 11eb8ba870457337c6067284dde4277e09764c0a (patch) | |
tree | a824fa09ca0db7c51689e7471cb2c7c3714feb6b /tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t | |
parent | b14f26a869c056fb9951e481ae20f3887edb743d (diff) |
storage/posix: Don't allow gfid/volume-id xattr to be removed
Problem:
Bulk xattr removal doesn't check if the xattrs that are coming in xdata
have gfid/volume-id xattrs, so there is potential for bulkremovexattr
removing gfid/volume-id.
I also observed that bulkremovexattr is not available for fremovexattr.
Fix:
Do proper checks in bulk removexattr to remove gfid/volume-id.
Refactor [f]removexattr to reduce the differences.
BUG: 1470489
Change-Id: Ia845b31846a149500111c0996646e648f72cdce6
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17765
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Anuradha Talur <atalur@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t')
-rwxr-xr-x | tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t b/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t new file mode 100755 index 00000000000..b9fd44ae0d7 --- /dev/null +++ b/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t @@ -0,0 +1,21 @@ +#!/bin/bash +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +## Start and create a volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume info; + +TEST $CLI volume create $V0 $H0:$B0/${V0}; +TEST $CLI volume start $V0; +logdir=`gluster --print-logdir` + + +TEST build_tester $(dirname $0)/disallow-gfid-volumeid-fremovexattr.c -lgfapi +TEST $(dirname $0)/disallow-gfid-volumeid-fremovexattr $H0 $V0 $logdir/disallow-gfid-volumeid-fremovexattr.log + +cleanup_tester $(dirname $0)/disallow-gfid-volumeid-fremovexattr +cleanup; |