summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-04 02:19:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:27 -0500
commita9c00f35f9d7d59b36c286abb2e72613b32ba775 (patch)
tree1d17cc33d6d2ed303e915d1be52186f5f4c1bc18 /source4/smb_server
parentf7a13be68d56ef0937c766026fe0dbe684f35c41 (diff)
downloadsamba-a9c00f35f9d7d59b36c286abb2e72613b32ba775.tar.gz
samba-a9c00f35f9d7d59b36c286abb2e72613b32ba775.tar.bz2
samba-a9c00f35f9d7d59b36c286abb2e72613b32ba775.zip
r3518: fixed some includes to be consistent.
- use #include <XXX.h> for operating system includes - use includes relative to include/ for things like system/wait.h also fixed the thread backend to work somewhat. To fix it properly we need to do this: - add a configure test for support for thread local storage (the __thread keyword) - refuse to do pthreads if tls doesn't work - refuse to do pthreads if seteuid() affects process instead of thread - defined THREAD_LOCAL as __thread when WITH_PTHREADS - add THREAD_LOCAL to all the global data structures that should be thread local (there are quite a few) right now the thread backend falls over when you hit it with several connections at once, due to the lack of __thread on some critical structures. (This used to be commit 0dc1deabd0b53bc7a6f6cee2ed99e2cbbe422262)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb_server.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 861186a8d7..3c17abe6fb 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -173,7 +173,6 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn)
These flags determine some of the permissions required to do an operation
*/
#define AS_USER (1<<0)
-#define USE_MUTEX (1<<1)
/*
define a list of possible SMB messages and their corresponding
@@ -299,12 +298,12 @@ static const struct smb_message_struct
/* 0x6d */ { NULL, NULL, 0 },
/* 0x6e */ { NULL, NULL, 0 },
/* 0x6f */ { NULL, NULL, 0 },
-/* 0x70 */ { "SMBtcon",reply_tcon,USE_MUTEX},
+/* 0x70 */ { "SMBtcon",reply_tcon,0},
/* 0x71 */ { "SMBtdis",reply_tdis,0},
-/* 0x72 */ { "SMBnegprot",reply_negprot,USE_MUTEX},
-/* 0x73 */ { "SMBsesssetupX",reply_sesssetup,USE_MUTEX},
+/* 0x72 */ { "SMBnegprot",reply_negprot,0},
+/* 0x73 */ { "SMBsesssetupX",reply_sesssetup,0},
/* 0x74 */ { "SMBulogoffX", reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */
-/* 0x75 */ { "SMBtconX",reply_tcon_and_X,USE_MUTEX},
+/* 0x75 */ { "SMBtconX",reply_tcon_and_X,0},
/* 0x76 */ { NULL, NULL, 0 },
/* 0x77 */ { NULL, NULL, 0 },
/* 0x78 */ { NULL, NULL, 0 },
@@ -520,15 +519,7 @@ static void switch_message(int type, struct smbsrv_request *req)
return;
}
- /* THREAD TESTING: use mutex to serialize calls to critical
- functions with global state */
- if (flags & USE_MUTEX) {
- MUTEX_LOCK_BY_ID(MUTEX_SMBD);
- }
smb_messages[type].fn(req);
- if (flags & USE_MUTEX) {
- MUTEX_UNLOCK_BY_ID(MUTEX_SMBD);
- }
}