Revert "Cygwin: passwd/group: allow specifying "." as local computername"
This reverts commit 7c34811440
.
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>
This commit is contained in:
parent
367c1ae161
commit
9883959f08
|
@ -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])))
|
if ((p = wcschr (name, cygheap->pg.nss_separator ()[0])))
|
||||||
{
|
{
|
||||||
fq_name = true;
|
fq_name = true;
|
||||||
/* Convenience: Translate domain name "." to local machine. */
|
*p = L'\\';
|
||||||
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'\\';
|
|
||||||
}
|
}
|
||||||
sid = csid;
|
sid = csid;
|
||||||
ret = LookupAccountNameW (NULL, name, sid, &slen, dom, &dlen, &acc_type);
|
ret = LookupAccountNameW (NULL, name, sid, &slen, dom, &dlen, &acc_type);
|
||||||
|
|
Loading…
Reference in New Issue