1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +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 used to be commit 69ace07609)
This commit is contained in:
Jeremy Allison 1998-05-11 17:53:37 +00:00
parent 0518067c6e
commit 05eb22f77c
2 changed files with 9 additions and 2 deletions

View File

@ -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);

View File

@ -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());