summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-13 20:42:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:13 -0500
commita59149b86a36cd8b51ad5ae11b4d2b0714bb5e9c (patch)
treea01ce02b49ec7358bf8e1f63b9ec1abd8218aeda /source3
parentc7081a0acde413651468b08193b453e778c59dfa (diff)
downloadsamba-a59149b86a36cd8b51ad5ae11b4d2b0714bb5e9c.tar.gz
samba-a59149b86a36cd8b51ad5ae11b4d2b0714bb5e9c.tar.bz2
samba-a59149b86a36cd8b51ad5ae11b4d2b0714bb5e9c.zip
r7550: Steal the correct error return for invalid TID on NTcreateX from Samba4
(thanks tridge !). Jeremy. (This used to be commit 0288823aacdbec6ba99e944c9f06f051e55c64b8)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index afde2e94a9..0373cd471c 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -936,8 +936,14 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
change_to_root_user();
/* does this protocol need a valid tree connection? */
- if ((flags & AS_USER) && !conn)
- return ERROR_DOS(ERRSRV, ERRinvnid);
+ if ((flags & AS_USER) && !conn) {
+ /* Amazingly, the error code depends on the command (from Samba4). */
+ if (type == SMBntcreateX) {
+ return ERROR_NT(NT_STATUS_INVALID_HANDLE);
+ } else {
+ return ERROR_DOS(ERRSRV, ERRinvnid);
+ }
+ }
/* does this protocol need to be run as the connected user? */