summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-13 07:11:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:06 -0500
commit8f31f8c57e9147a3b073347153f5724e2267b1bc (patch)
treec94ba11044e029cfa3cbbc2f9b878b6daf0efb66
parente5c70a58873d5f274ec38d85884e0e76bbbaa291 (diff)
downloadsamba-8f31f8c57e9147a3b073347153f5724e2267b1bc.tar.gz
samba-8f31f8c57e9147a3b073347153f5724e2267b1bc.tar.bz2
samba-8f31f8c57e9147a3b073347153f5724e2267b1bc.zip
r7523: blergh
the error code for an invalid tid depends on the command (This used to be commit 9dab036fbe50d84cb79d7a103c454a1c0c90a48a)
-rw-r--r--source4/smb_server/smb_server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 86aa46ba9a..3b4d06f3b2 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -511,7 +511,12 @@ static void switch_message(int type, struct smbsrv_request *req)
/* does this protocol need a valid tree connection? */
if ((flags & AS_USER) && !req->tcon) {
- req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRinvnid));
+ if (type == SMBntcreateX) {
+ /* amazingly, the error code depends on the command */
+ req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRinvnid));
+ } else {
+ req_reply_error(req, NT_STATUS_INVALID_HANDLE);
+ }
return;
}