]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Allow pre-Windows 2000 style user logon for Linux Guests.
authorKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:25 +0000 (10:35 -0700)
committerKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:25 +0000 (10:35 -0700)
With this change, applications that require user/password type
authentication/authorization (done by VGAuth service) for guestOps
can now use pre-windows 2000 style user logon for Linux Guests too.

Github Issue: https://github.com/vmware/open-vm-tools/issues/641

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

index 31eeb5a7768c97fdf0a742a623bdea0567c0700a..3beede2e8a1048c977a764f38cb40ea9377a9fa0 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2011-2016,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2011-2016,2019,2023 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
@@ -347,19 +347,14 @@ Usercheck_UsernameIsLegal(const gchar *userName)
     * The illegal character list appears to be:
     *
     * Windows      /\@[]:;|=,+*?<>"
-    *          Note that '\' is valid with a domain username; this is
-    *          the restricted list for local usernames.
     * Ubuntu       /\[]:;|=,*<>"!(){}?$@%^&'
     * Rhel         /\[]:;|=,*<>"!(){}?$@%^&'+
     *
+    * Note that '\' is valid with a domain username; this is the
+    * restricted list for local usernames.
     */
    size_t len;
-#ifdef _WIN32
-   // allow '\' in for Windows domain usernames
    char *illegalChars = "<>/";
-#else
-   char *illegalChars = "\\<>/";
-#endif
 
    len = strlen(userName);
    if (strcspn(userName, illegalChars) != len) {