From f46f406d3b010fd0ad1a03d5cfe1658904967be0 Mon Sep 17 00:00:00 2001 From: Vijaikumar M Date: Thu, 21 Aug 2014 17:07:25 +0530 Subject: glusterd: Parsing key/value pair with value containing '='. Parsing key/value pair in the brickinfo file, where value contains '=' would truncate everything after '=' in value. For example: A key/value pair mnt-opts=rw,noatime,allocsize=1MiB,noattr2 is parsed as: mnt-opts=rw,noatime,allocsize Change-Id: I4e279c2a356a8a16eb20d4358d7c8a8cc5724b65 BUG: 1145090 Signed-off-by: Vijaikumar M Reviewed-on: http://review.gluster.org/8507 Reviewed-by: Atin Mukherjee Reviewed-by: Rajesh Joseph Reviewed-by: Sachin Pandit Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/8803 Tested-by: Gluster Build System --- libglusterfs/src/store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/store.c b/libglusterfs/src/store.c index 55a2ab459e2..d6a64d2cdd3 100644 --- a/libglusterfs/src/store.c +++ b/libglusterfs/src/store.c @@ -212,7 +212,7 @@ gf_store_read_and_tokenize (FILE *file, char *str, char **iter_key, goto out; } - value = strtok_r (NULL, "=", &savetok); + value = strtok_r (NULL, "", &savetok); if (!value) { ret = -1; *store_errno = GD_STORE_VALUE_NULL; -- cgit