summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-04-10 01:19:18 +0000
committerJeremy Allison <jra@samba.org>1998-04-10 01:19:18 +0000
commit31ae9c7013be791717f6e77794ce8c8fc1c1c16c (patch)
tree298d2fc043be140f18ef4326220b722c2844330b /source3
parentaf80d8e98f2f74939d680c6abc21e3f40b927f31 (diff)
downloadsamba-31ae9c7013be791717f6e77794ce8c8fc1c1c16c.tar.gz
samba-31ae9c7013be791717f6e77794ce8c8fc1c1c16c.tar.bz2
samba-31ae9c7013be791717f6e77794ce8c8fc1c1c16c.zip
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 used to be commit 5d6f63a7e665ee19bd4508b2b40d497e9851b248)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 01f9006a42..1d3c2e144c 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -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)) {