mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
reply.c: Added code to not overwrite sesssetup_user when in share level security
and null session setup done. smbpasswd.c: Fix from Gerald Carter <cartegw@Eng.Auburn.EDU> to fix incorrect use of pointer. Jeremy.
This commit is contained in:
parent
6b2f9ea68f
commit
69ace07609
@ -586,7 +586,14 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
|
||||
|
||||
strlower(user);
|
||||
|
||||
strcpy(sesssetup_user,user);
|
||||
/*
|
||||
* In share level security, only overwrite sesssetup_use if
|
||||
* it's a non null-session share. Helps keep %U and %G
|
||||
* working.
|
||||
*/
|
||||
|
||||
if((lp_security() != SEC_SHARE) || *user)
|
||||
strcpy(sesssetup_user,user);
|
||||
|
||||
reload_services(True);
|
||||
|
||||
|
@ -646,7 +646,7 @@ int main(int argc, char **argv)
|
||||
vp = startsampwent(True);
|
||||
}
|
||||
}
|
||||
if (!fp) {
|
||||
if (!vp) {
|
||||
err = errno;
|
||||
fprintf(stderr, "%s: Failed to open password file %s.\n",
|
||||
prog_name, lp_smb_passwd_file());
|
||||
|
Loading…
Reference in New Issue
Block a user