From: Katy Feng Date: Thu, 5 Oct 2023 17:35:25 +0000 (-0700) Subject: Allow pre-Windows 2000 style user logon for Linux Guests. X-Git-Tag: stable-12.4.0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bacfb532b8f904c7d4141891ca95db7b4b6c0ac6;p=thirdparty%2Fopen-vm-tools.git Allow pre-Windows 2000 style user logon for Linux Guests. 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 --- diff --git a/open-vm-tools/vgauth/common/usercheck.c b/open-vm-tools/vgauth/common/usercheck.c index 31eeb5a77..3beede2e8 100644 --- a/open-vm-tools/vgauth/common/usercheck.c +++ b/open-vm-tools/vgauth/common/usercheck.c @@ -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) {