summaryrefslogtreecommitdiff
path: root/source3/smbd/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r--source3/smbd/service.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index a6e66965c3..96f00eef12 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -301,8 +301,11 @@ connection_struct *make_connection(char *service,char *user,char *password, int
/* lowercase the user name */
strlower(user);
- /* add it as a possible user name */
- add_session_user(service);
+ /* add it as a possible user name if we
+ are in share mode security */
+ if (lp_security() == SEC_SHARE) {
+ add_session_user(service);
+ }
/* shall we let them in? */
if (!authorise_login(snum,user,password,pwlen,&guest,&force,vuid)) {