From: Katy Feng Date: Fri, 25 Aug 2023 18:58:47 +0000 (-0700) Subject: Allow pre-Windows 2000 style user logon for Linux Guests. X-Git-Tag: stable-12.3.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75507219d4c87c4e3c805059242f3fb1a8b999b4;p=thirdparty%2Fopen-vm-tools.git Allow pre-Windows 2000 style user logon for Linux Guests. With this change, applications that requires 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) {