diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-11 17:53:37 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-11 17:53:37 +0000 |
commit | 69ace0760986a6e892cd5b25ca85930b65e38c45 (patch) | |
tree | 0e513111b0e4ff46cf99a405ac270185250d2443 /source/smbd/reply.c | |
parent | 6b2f9ea68f5754ca6caaf685a9538ab404e1bab4 (diff) | |
download | samba-69ace0760986a6e892cd5b25ca85930b65e38c45.tar.gz samba-69ace0760986a6e892cd5b25ca85930b65e38c45.tar.xz samba-69ace0760986a6e892cd5b25ca85930b65e38c45.zip |
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.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index b8270495fd0..c927e09425f 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -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); |