From: John Wolfe Date: Fri, 11 Sep 2020 19:11:05 +0000 (-0700) Subject: VGAuth: vgauthd service fails if vgauth.conf samlSchemaDir has trailing whitespace X-Git-Tag: stable-11.2.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f78dd5ce2733ea964fe969cb739daa55e329e70;p=thirdparty%2Fopen-vm-tools.git VGAuth: vgauthd service fails if vgauth.conf samlSchemaDir has trailing whitespace When reading the vgauth.conf samlSchemaDir, remove any trailing whitespace. Also remove trailing whitespace when reading any preference string. --- diff --git a/open-vm-tools/vgauth/common/prefs.c b/open-vm-tools/vgauth/common/prefs.c index 50d77fecf..686aace3b 100644 --- a/open-vm-tools/vgauth/common/prefs.c +++ b/open-vm-tools/vgauth/common/prefs.c @@ -141,6 +141,9 @@ Pref_GetString(PrefHandle ph, prefName, gErr->message); g_error_free(gErr); retVal = g_strdup(defaultVal); + } else { + /* Remove any trailing whitespace. */ + g_strchomp(retVal); } return retVal;