svn commit: samba r17280 - in
branches/SAMBA_4_0/source/smb_server/smb: .
metze at samba.org
metze at samba.org
Thu Jul 27 18:06:10 GMT 2006
Author: metze
Date: 2006-07-27 18:06:09 +0000 (Thu, 27 Jul 2006)
New Revision: 17280
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17280
Log:
NT_STATUS_INVALID_HANDLE maps to ERRbadfid, which is wrong in this
places, so only overwrite ERRbaduid and ERRinvnid when NTSTATUS support
is given.
metze
Modified:
branches/SAMBA_4_0/source/smb_server/smb/receive.c
Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/receive.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/receive.c 2006-07-27 17:23:57 UTC (rev 17279)
+++ branches/SAMBA_4_0/source/smb_server/smb/receive.c 2006-07-27 18:06:09 UTC (rev 17280)
@@ -501,16 +501,19 @@
/* see if the vuid is valid */
if ((flags & NEED_SESS) && !req->session) {
+ status = NT_STATUS_DOS(ERRSRV, ERRbaduid);
/* amazingly, the error code depends on the command */
switch (type) {
- case SMBntcreateX:
- case SMBntcancel:
- case SMBulogoffX:
- status = NT_STATUS_DOS(ERRSRV, ERRbaduid);
- break;
- default:
+ case SMBntcreateX:
+ case SMBntcancel:
+ case SMBulogoffX:
+ break;
+ default:
+ if (req->smb_conn->config.nt_status_support &&
+ req->smb_conn->negotiate.client_caps & CAP_STATUS32) {
status = NT_STATUS_INVALID_HANDLE;
- break;
+ }
+ break;
}
/*
* TODO:
@@ -530,16 +533,19 @@
/* does this protocol need a valid tree connection? */
if ((flags & NEED_TCON) && !req->tcon) {
+ status = NT_STATUS_DOS(ERRSRV, ERRinvnid);
/* amazingly, the error code depends on the command */
switch (type) {
- case SMBntcreateX:
- case SMBntcancel:
- case SMBtdis:
- status = NT_STATUS_DOS(ERRSRV, ERRinvnid);
- break;
- default:
+ case SMBntcreateX:
+ case SMBntcancel:
+ case SMBtdis:
+ break;
+ default:
+ if (req->smb_conn->config.nt_status_support &&
+ req->smb_conn->negotiate.client_caps & CAP_STATUS32) {
status = NT_STATUS_INVALID_HANDLE;
- break;
+ }
+ break;
}
/*
* TODO:
More information about the samba-cvs
mailing list