summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/reply.c7
-rw-r--r--source3/smbd/service.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 624dc59084..dc604cf49b 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -115,7 +115,12 @@ int reply_special(char *inbuf,char *outbuf)
break;
}
- add_session_user(remote_machine);
+ /* only add the client's machine name to the list
+ of possibly valid usernames if we are operating
+ in share mode security */
+ if (lp_security() == SEC_SHARE) {
+ add_session_user(remote_machine);
+ }
reload_services(True);
reopen_logs();
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)) {