1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r13877: remove smbsrv_send_dos_error() and use smbsrv_send_error(..,NT_STATUS_DOS())

metze
(This used to be commit 60d7920527)
This commit is contained in:
Stefan Metzmacher 2006-03-06 18:29:48 +00:00 committed by Gerald (Jerry) Carter
parent 8d91f3dec0
commit edd5b847bc
5 changed files with 10 additions and 29 deletions

View File

@ -379,7 +379,7 @@ void smbsrv_reply_nttrans(struct smbsrv_request *req)
trans.in.function = SVAL(req->in.vwv, 36);
if (req->in.wct != 19 + trans.in.setup_count) {
smbsrv_send_dos_error(req, ERRSRV, ERRerror);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror));
return;
}

View File

@ -568,7 +568,7 @@ void smbsrv_chain_reply(struct smbsrv_request *req)
uint16_t data_size;
if (req->in.wct < 2 || req->out.wct < 2) {
smbsrv_send_dos_error(req, ERRSRV, ERRerror);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror));
return;
}
@ -623,7 +623,7 @@ void smbsrv_chain_reply(struct smbsrv_request *req)
error:
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
smbsrv_send_dos_error(req, ERRSRV, ERRerror);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror));
}
/*

View File

@ -33,7 +33,7 @@
if ((req)->in.wct != (wcount)) { \
DEBUG(1,("Unexpected WCT %d at %s(%d) - expected %d\n", \
(req)->in.wct, __FILE__, __LINE__, wcount)); \
smbsrv_send_dos_error(req, ERRSRV, ERRerror); \
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror)); \
return; \
}} while (0)
@ -200,7 +200,7 @@ void smbsrv_reply_unknown(struct smbsrv_request *req)
DEBUG(0,("unknown command type %d (0x%X)\n", type, type));
smbsrv_send_dos_error(req, ERRSRV, ERRunknownsmb);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRunknownsmb));
}
@ -941,7 +941,7 @@ void smbsrv_reply_read_and_X(struct smbsrv_request *req)
****************************************************************************/
void smbsrv_reply_writebraw(struct smbsrv_request *req)
{
smbsrv_send_dos_error(req, ERRSRV, ERRuseSTD);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRuseSTD));
}
@ -1854,7 +1854,7 @@ void smbsrv_reply_lockingX(struct smbsrv_request *req)
void smbsrv_reply_readbmpx(struct smbsrv_request *req)
{
/* tell the client to not use a multiplexed read - its too broken to use */
smbsrv_send_dos_error(req, ERRSRV, ERRuseSTD);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRuseSTD));
}
@ -1890,7 +1890,7 @@ void smbsrv_reply_setattrE(struct smbsrv_request *req)
****************************************************************************/
void smbsrv_reply_writebmpx(struct smbsrv_request *req)
{
smbsrv_send_dos_error(req, ERRSRV, ERRuseSTD);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRuseSTD));
}
@ -1899,7 +1899,7 @@ void smbsrv_reply_writebmpx(struct smbsrv_request *req)
****************************************************************************/
void smbsrv_reply_writebs(struct smbsrv_request *req)
{
smbsrv_send_dos_error(req, ERRSRV, ERRuseSTD);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRuseSTD));
}

View File

@ -312,25 +312,6 @@ void smbsrv_send_reply(struct smbsrv_request *req)
smbsrv_send_reply_nosign(req);
}
/*
construct and send an error packet with a forced DOS error code
this is needed to match win2000 behaviour for some parts of the protocol
*/
void smbsrv_send_dos_error(struct smbsrv_request *req, uint8_t eclass, uint16_t ecode)
{
/* if the basic packet hasn't been setup yet then do it now */
if (req->out.buffer == NULL) {
smbsrv_setup_reply(req, 0, 0);
}
SCVAL(req->out.hdr, HDR_RCLS, eclass);
SSVAL(req->out.hdr, HDR_ERR, ecode);
SSVAL(req->out.hdr, HDR_FLG2, SVAL(req->out.hdr, HDR_FLG2) & ~FLAGS2_32_BIT_ERROR_CODES);
smbsrv_send_reply(req);
}
/*
setup the header of a reply to include an NTSTATUS code
*/

View File

@ -1610,7 +1610,7 @@ static void reply_trans_generic(struct smbsrv_request *req, uint8_t command)
trans->in.setup_count = CVAL(req->in.vwv, VWV(13));
if (req->in.wct != 14 + trans->in.setup_count) {
smbsrv_send_dos_error(req, ERRSRV, ERRerror);
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror));
return;
}