summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-11 17:53:37 +0000
committerJeremy Allison <jra@samba.org>1998-05-11 17:53:37 +0000
commit05eb22f77c21f8027e64b0caddefa4d9f030f95f (patch)
tree53cd47eec284c3dc9d7b754168ad86769b590924 /source3/smbd
parent0518067c6e5ca3ebd7743a2a4f5ce6d63eec6812 (diff)
downloadsamba-05eb22f77c21f8027e64b0caddefa4d9f030f95f.tar.gz
samba-05eb22f77c21f8027e64b0caddefa4d9f030f95f.tar.bz2
samba-05eb22f77c21f8027e64b0caddefa4d9f030f95f.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. (This used to be commit 69ace0760986a6e892cd5b25ca85930b65e38c45)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b8270495fd..c927e09425 100644
--- a/source3/smbd/reply.c
+++ b/source3/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);