Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2019-02-18 12:13:35 +0300
committerCorinna Vinschen <corinna@vinschen.de>2019-02-18 12:38:08 +0300
commit9883959f083d13ce9991d2162fcf5fee1613478d (patch)
treecd9b3d07a2673c57a086760a8236fe884642b3ac
parent367c1ae16185e7a81aea5bcc2388e4a7a473c92e (diff)
Revert "Cygwin: passwd/group: allow specifying "." as local computername"
This reverts commit 7c34811440be0bf1e749d9f075f54320c706cb4b. This potentially allows to circumvent OpenSSHs user/group name matching, unless the Admin knows to add every local user twice or to use patterns, e.g.: Match user MACHINE+user,.+user Match user *+user Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/uinfo.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 47fe24725..53efc2117 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -2008,15 +2008,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
if ((p = wcschr (name, cygheap->pg.nss_separator ()[0])))
{
fq_name = true;
- /* Convenience: Translate domain name "." to local machine. */
- if (p == name + 1 && name[0] == L'.')
- {
- p = wcpcpy (name, cygheap->dom.account_flat_name ());
- *p = L'\\';
- sys_mbstowcs (p + 1, UNLEN + 1, arg.name + 2);
- }
- else
- *p = L'\\';
+ *p = L'\\';
}
sid = csid;
ret = LookupAccountNameW (NULL, name, sid, &slen, dom, &dlen, &acc_type);