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 <frederic.saunier@atos.net>
Change-Id: I75e958da26273fe2a15ccae01a1176c3549821b8
Reviewed-on: http://review.whamcloud.com/18294
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
strscat(buf, key, maxbuflen);
if (val != NULL) {
strscat(buf, key, maxbuflen);
if (val != NULL) {
- strscat(buf, "=", maxbuflen);
+ strscat(buf, "=\"", maxbuflen);
strscat(buf, val, maxbuflen);
strscat(buf, val, maxbuflen);
+ strscat(buf, "\"", maxbuflen);