From 33690b1276cf9730d680a789c7786f45e961fbf5 Mon Sep 17 00:00:00 2001 From: Frederic Saunier Date: Tue, 2 Feb 2016 09:46:43 +0100 Subject: [PATCH] LU-7003 utils: must quote the value of the context option As per mount(8) notes, the context value might contain commas, in which case the value has to be properly quoted, otherwise mount(8) will interpret the comma as a separator between mount options. Signed-off-by: Frederic Saunier Change-Id: I75e958da26273fe2a15ccae01a1176c3549821b8 Reviewed-on: http://review.whamcloud.com/18294 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Henri Doreau Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- lustre/utils/mount_utils_ldiskfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/utils/mount_utils_ldiskfs.c b/lustre/utils/mount_utils_ldiskfs.c index 1ce4aa1..54b62fe 100644 --- a/lustre/utils/mount_utils_ldiskfs.c +++ b/lustre/utils/mount_utils_ldiskfs.c @@ -553,8 +553,9 @@ static void append_unique(char *buf, char *prefix, char *key, char *val, strscat(buf, key, maxbuflen); if (val != NULL) { - strscat(buf, "=", maxbuflen); + strscat(buf, "=\"", maxbuflen); strscat(buf, val, maxbuflen); + strscat(buf, "\"", maxbuflen); } } } -- 1.8.3.1