summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtests/basic/geo-replication/marker-xattrs.t2
-rw-r--r--xlators/lib/src/libxlator.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/basic/geo-replication/marker-xattrs.t b/tests/basic/geo-replication/marker-xattrs.t
index a7dcb50aa78..7061b4532a3 100755
--- a/tests/basic/geo-replication/marker-xattrs.t
+++ b/tests/basic/geo-replication/marker-xattrs.t
@@ -30,6 +30,7 @@ TEST kill_brick $V0 $H0 $B0/${V0}-0
TEST "getfattr -n $xtime $M1 | grep -q ${xtime}="
+TEST getfattr -d -m. -e hex $M1
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
@@ -65,6 +66,7 @@ TEST kill_brick $V0 $H0 $B0/${V0}-0
TEST "getfattr -n $xtime $M1 | grep -q ${xtime}="
+TEST getfattr -d -m. -e hex $M1
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
diff --git a/xlators/lib/src/libxlator.c b/xlators/lib/src/libxlator.c
index 30436131b6b..0f703904fab 100644
--- a/xlators/lib/src/libxlator.c
+++ b/xlators/lib/src/libxlator.c
@@ -458,6 +458,9 @@ cluster_handle_marker_getxattr (call_frame_t *frame, loc_t *loc,
if (GF_CLIENT_PID_GSYNCD != frame->root->pid)
return -EINVAL;
+ if (name == NULL)
+ return -EINVAL;
+
if (strcmp (GF_XATTR_MARKER_KEY, name) == 0) {
type = MARKER_UUID_TYPE;
memcpy (gauge, marker_uuid_default_gauge, sizeof (gauge));