]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common source files not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Tue, 12 Jul 2022 16:56:01 +0000 (09:56 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Tue, 12 Jul 2022 16:56:01 +0000 (09:56 -0700)
open-vm-tools/lib/include/conf.h
open-vm-tools/lib/include/strutil.h
open-vm-tools/lib/misc/strutil.c
open-vm-tools/tools.conf

index 4f044202881a43c17583ec76780e9639dc53a611..282b9e0c0d2dc4daaf66f32ae889301e99b451c4 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2002-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2002-2022 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
 #define CONFNAME_AUTOUPGRADE_ALLOW_UPGRADE "allow-upgrade"
 #define CONFNAME_AUTOUPGRADE_ALLOW_ADD_FEATURE "allow-add-feature"
 #define CONFNAME_AUTOUPGRADE_ALLOW_REMOVE_FEATURE "allow-remove-feature"
+#define CONFNAME_AUTOUPGRADE_ALLOW_MSI_TRANSFORMS "allow-msi-transforms"
 
 /*
  * END upgrader goodies.
index 43ee5519becfc261658d3808d4b4f1a7c23fbdc0..218711182a63be1e2d27881d9f5adc7733578a14 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2018, 2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2018, 2021-2022 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
@@ -66,6 +66,7 @@ Bool StrUtil_StartsWith(const char *s, const char *prefix);
 Bool StrUtil_CaselessStartsWith(const char *s, const char *prefix);
 Bool StrUtil_EndsWith(const char *s, const char *suffix);
 Bool StrUtil_CaselessEndsWith(const char *s, const char *suffix);
+const char * StrUtil_CaselessStrstr(const char *str, const char *strSearch);
 Bool StrUtil_IsASCII(const char *s);
 
 Bool StrUtil_VDynBufPrintf(struct DynBuf *b, const char *fmt, va_list args);
index 6152b811c465d35f8e14ac886ec36baa8e6b811a..acecee504740369ee8852574b8466710f5ff3ccc 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2019, 2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2019, 2021-2022 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
@@ -1040,6 +1040,48 @@ StrUtil_CaselessEndsWith(const char *s,      // IN
 }
 
 
+/**
+ *-----------------------------------------------------------------------------
+ *
+ * StrUtil_CaselessStrstr --
+ *
+ *    This is a case-insensitive version of strstr in C string.h.
+ *
+ * Results:
+ *    return a pointer to the first occurrence of strSearch in str, or NULL
+ *    if strSearch does not appear in str. If strSearch is zero length, the
+ *    function returns str.
+ *
+ * Side effects:
+ *    none
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+const char *
+StrUtil_CaselessStrstr(const char *str,         // IN
+                       const char *strSearch)   // IN
+{
+   size_t len;
+
+   if (strSearch == NULL || *strSearch == '\0') {
+      return str;
+   }
+
+   if (str == NULL || *str == '\0') {
+      return NULL;
+   }
+
+   len = strlen(strSearch);
+   for (; *str; str++) {
+      if (strncasecmp(str, strSearch, len) == 0) {
+         return str;
+      }
+   }
+   return NULL;
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
index bfcf952b7e75734e8a9eafa063b316d899f1842b..2577d324b56168d468b28ecd4c7036914cd44fb9 100644 (file)
 
 [autoupgrade]
 
-# The autoupgrade plugin is only available for Windows.
-
 # The "allow-upgrade" option controls whether automatic upgrades (or reinstalls)
-# are allowed. The two options "allow-add-feature" and "allow-remove-feature"
-# control whether adding or removing a feature will be allowed. The two latter
-# ones only affect Windows tools.
-
+# are allowed.
 #allow-upgrade=true
+
+# The autoupgrade plugin is only available for Windows.
+# The "allow-add-feature" and "allow-remove-feature" control whether adding
+# or removing a feature will be allowed.
+# The allow-msi-transforms option controls whether TRANSFORMS property is
+# allowed.
+
 #allow-add-feature=true
 #allow-remove-feature=true
+#allow-msi-transforms=false
 
 [deployPkg]