From 816ca94f5dd49f34f395caf501de3c71f0ba113d Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Tue, 13 Oct 2015 14:40:55 +0530 Subject: libglusterfs: pass buffer size to gf_store_read_and_tokenize function Previously if user set an option where length of key=value goes beyond PATH_MAX (4096) character then tokenzing the option at the time of reading configuration file will fail. This is because of the we was having restraction in fgets to read maximum of PATH_MAX (4096) length of character. Consequence of this is when user try to restart glusterd, after setting key=value length beyond PATH_MAX (4096) character, glusterd will not restart. With this fix instead of PATH_MAX, consumer of gf_store_read_and_tokenize function will decide the size of the buffer length. Change-Id: I655a8ce982effdfff8f3e785ea31f543dbe39301 BUG: 1271150 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/12346 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Anand Nekkunti Reviewed-by: Niels de Vos --- xlators/mgmt/glusterd/src/glusterd-store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 37d7d142118..73b1c696271 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -3464,7 +3464,7 @@ glusterd_store_retrieve_missed_snaps_list (xlator_t *this) } do { - ret = gf_store_read_and_tokenize (fp, buf, + ret = gf_store_read_and_tokenize (fp, buf, sizeof (buf), &missed_node_info, &value, &store_errno); if (ret) { -- cgit