summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-05-26 15:20:36 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-03 17:54:37 +0200
commitf554af187161a006c3f51edd129e53500acc9046 (patch)
tree93a5aff07e209924c6ef0e874f745ad5b18db9aa /source3
parentd9843b3db4ba6961ba1af01f8393b7e744df5927 (diff)
downloadsamba-f554af187161a006c3f51edd129e53500acc9046.tar.gz
samba-f554af187161a006c3f51edd129e53500acc9046.tar.bz2
samba-f554af187161a006c3f51edd129e53500acc9046.zip
s3:smbd: move already_got_session to struct smbd_server_connection
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.c2
-rw-r--r--source3/smbd/globals.h5
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/reply.c4
4 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 6c34f9d44b..bcf01069bc 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -107,8 +107,6 @@ int num_validated_vuids = 0;
char *my_yp_domain = NULL;
#endif
-bool already_got_session = false;
-
/*
* Size of data we can send to client. Set
* by the client for all protocols above CORE.
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index e8f26a98d0..2b4dce7489 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -105,8 +105,6 @@ extern int num_validated_vuids;
extern char *my_yp_domain;
#endif
-extern bool already_got_session;
-
/*
* Size of data we can send to client. Set
* by the client for all protocols above CORE.
@@ -316,6 +314,9 @@ struct smbd_smb2_tcon {
struct pending_auth_data;
struct smbd_server_connection {
+ struct {
+ bool got_session;
+ } nbt;
bool allow_smb2;
struct {
struct fd_event *fde;
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 4c33257b9d..3bf0566097 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2157,6 +2157,8 @@ void smbd_process(void)
#endif
+ smbd_server_conn->nbt.got_session = false;
+
smbd_server_conn->smb1.negprot.max_recv = MIN(lp_maxxmit(),BUFFER_SIZE);
smbd_server_conn->smb1.fde = event_add_fd(smbd_event_context(),
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 16fc61955d..f71fde1818 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -523,7 +523,7 @@ void reply_special(char *inbuf)
switch (msg_type) {
case 0x81: /* session request */
- if (already_got_session) {
+ if (sconn->nbt.got_session) {
exit_server_cleanly("multiple session request not permitted");
}
@@ -567,7 +567,7 @@ void reply_special(char *inbuf)
reload_services(True);
reopen_logs();
- already_got_session = True;
+ sconn->nbt.got_session = true;
break;
case 0x89: /* session keepalive request