]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
VGAuth: vgauthd service fails if vgauth.conf samlSchemaDir has trailing whitespace
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 11 Sep 2020 19:11:05 +0000 (12:11 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 11 Sep 2020 19:11:05 +0000 (12:11 -0700)
When reading the vgauth.conf samlSchemaDir, remove any trailing whitespace.
Also remove trailing whitespace when reading any preference string.

open-vm-tools/vgauth/common/prefs.c

index 50d77fecf2e0d003c97b788046091a47af662c26..686aace3bc92d13a247e6bed9d9a5afcf3f93f96 100644 (file)
@@ -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;