diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/smb_server/smb_server.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index c8d411af16..0a28023e46 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -450,11 +450,14 @@ static void switch_message(int type, struct smbsrv_request *req) /* does this protocol need a valid tree connection? */ if ((flags & AS_USER) && !req->tcon) { - 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); + /* amazingly, the error code depends on the command */ + switch (type) { + case SMBntcreateX: + req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRinvnid)); + break; + default: + req_reply_error(req, NT_STATUS_INVALID_HANDLE); + break; } return; } |