mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
Fix for [homes] problem with security=share. We were still relying
on a valid vuid to get the connecting username - this is *never* true (anymore) with security=share. Jeremy.
This commit is contained in:
parent
fc2295e0f5
commit
5d6f63a7e6
@ -3353,11 +3353,25 @@ int make_connection(char *service,char *user,char *password, int pwlen, char *de
|
||||
if (*user && Get_Pwnam(user,True))
|
||||
return(make_connection(user,user,password,pwlen,dev,vuid));
|
||||
|
||||
if (validated_username(vuid))
|
||||
{
|
||||
strcpy(user,validated_username(vuid));
|
||||
return(make_connection(user,user,password,pwlen,dev,vuid));
|
||||
}
|
||||
if(lp_security() != SEC_SHARE)
|
||||
{
|
||||
if (validated_username(vuid))
|
||||
{
|
||||
strcpy(user,validated_username(vuid));
|
||||
return(make_connection(user,user,password,pwlen,dev,vuid));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Security = share. Try with sesssetup_user as the username.
|
||||
*/
|
||||
if(*sesssetup_user)
|
||||
{
|
||||
strcpy(user,sesssetup_user);
|
||||
return(make_connection(user,user,password,pwlen,dev,vuid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!lp_snum_ok(snum) || !check_access(snum)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user