]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file changes that are not directly related to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)
Build vmtools and vgauth for Windows with xmlsec instead of
xml-security-c.  It will still be possible to build with xml-security-c
either by commenting out the definition of USE_XMLSEC_FOR_WINDOWS in
bora-vmsoft/vgauth/make/inc/defs.mk or adding a make command line
argument of USE_XMLSEC_FOR_WINDOWS=0.

open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c

index 82530276af0968363ddbff5d599ed2f9e5742893..a394c0ea7febaf51f60e29f2debe975ec691e37e 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2016-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2016-2018 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -17,7 +17,7 @@
  *********************************************************/
 
 /**
- * @file saml-xmlsec1.cpp
+ * @file saml-xmlsec1.c
  *
  * Code for authenticating users based on SAML tokens.
  */
@@ -174,8 +174,8 @@ LoadCatalogAndSchema(void)
        * check in ../ in case we're in a dev environment.
        */
       schemaDir = g_build_filename(gInstallDir, "schemas", NULL);
-      if (!(g_file_test(dir, G_FILE_TEST_EXISTS) &&
-            g_file_test(dir, G_FILE_TEST_IS_DIR))) {
+      if (!(g_file_test(schemaDir, G_FILE_TEST_EXISTS) &&
+            g_file_test(schemaDir, G_FILE_TEST_IS_DIR))) {
 
          gchar *newDir = g_build_filename(gInstallDir, "..", "schemas", NULL);
 
@@ -1331,7 +1331,7 @@ VerifySAMLToken(const gchar *token,
                            strlen(token),
                            NULL, NULL, 0);
 #else
-   doc = xmlParseMemory(token, strlen(token));
+   doc = xmlParseMemory(token, (int)strlen(token));
 #endif
    if ((NULL == doc) || (xmlDocGetRootElement(doc) == NULL)) {
       g_warning("Failed to parse document\n");