mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
s3: smbd: Rename reply_outbuf() -> reply_smb1_outbuf().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@suse.com>
This commit is contained in:
parent
97fd5e56c0
commit
1574443b46
@ -124,7 +124,7 @@ void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus,
|
||||
int line, const char *file)
|
||||
{
|
||||
TALLOC_FREE(req->outbuf);
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
error_packet_set((char *)req->outbuf, 0, 0, ntstatus, line, file);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ void reply_force_dos_error(struct smb_request *req, uint8_t eclass, uint32_t eco
|
||||
int line, const char *file)
|
||||
{
|
||||
TALLOC_FREE(req->outbuf);
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
error_packet_set((char *)req->outbuf,
|
||||
eclass, ecode,
|
||||
NT_STATUS_DOS(eclass, ecode),
|
||||
@ -148,7 +148,7 @@ void reply_both_error(struct smb_request *req, uint8_t eclass, uint32_t ecode,
|
||||
NTSTATUS status, int line, const char *file)
|
||||
{
|
||||
TALLOC_FREE(req->outbuf);
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
error_packet_set((char *)req->outbuf, eclass, ecode, status,
|
||||
line, file);
|
||||
}
|
||||
|
@ -887,7 +887,7 @@ bool create_smb1_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req,
|
||||
const uint8_t *inbuf, char **outbuf,
|
||||
uint8_t num_words, uint32_t num_bytes);
|
||||
void construct_smb1_reply_common_req(struct smb_request *req, char *outbuf);
|
||||
void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes);
|
||||
void reply_smb1_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes);
|
||||
void process_smb(struct smbXsrv_connection *xconn,
|
||||
uint8_t *inbuf, size_t nread, size_t unread_bytes,
|
||||
uint32_t seqnum, bool encrypted,
|
||||
|
@ -110,7 +110,7 @@ void send_trans_reply(connection_struct *conn,
|
||||
|
||||
align = ((this_lparam)%4);
|
||||
|
||||
reply_outbuf(req, 10, 1+align+this_ldata+this_lparam);
|
||||
reply_smb1_outbuf(req, 10, 1+align+this_ldata+this_lparam);
|
||||
|
||||
/*
|
||||
* We might have SMBtranss in req which was transferred to the outbuf,
|
||||
@ -167,7 +167,7 @@ void send_trans_reply(connection_struct *conn,
|
||||
|
||||
align = (this_lparam%4);
|
||||
|
||||
reply_outbuf(req, 10, 1+align+this_ldata+this_lparam);
|
||||
reply_smb1_outbuf(req, 10, 1+align+this_ldata+this_lparam);
|
||||
|
||||
/*
|
||||
* We might have SMBtranss in req which was transferred to the
|
||||
@ -811,7 +811,7 @@ void reply_trans(struct smb_request *req)
|
||||
|
||||
/* We need to send an interim response then receive the rest
|
||||
of the parameter/data bytes */
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
show_msg((char *)req->outbuf);
|
||||
END_PROFILE(SMBtrans);
|
||||
return;
|
||||
|
@ -186,7 +186,7 @@ void reply_sends(struct smb_request *req)
|
||||
|
||||
msg_deliver(state);
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBsends);
|
||||
return;
|
||||
@ -236,7 +236,7 @@ void reply_sendstrt(struct smb_request *req)
|
||||
xconn->smb1.msg_state->from,
|
||||
xconn->smb1.msg_state->to));
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBsendstrt);
|
||||
return;
|
||||
@ -293,7 +293,7 @@ void reply_sendtxt(struct smb_request *req)
|
||||
|
||||
DEBUG( 3, ( "SMBsendtxt\n" ) );
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBsendtxt);
|
||||
return;
|
||||
@ -329,7 +329,7 @@ void reply_sendend(struct smb_request *req)
|
||||
|
||||
TALLOC_FREE(xconn->smb1.msg_state);
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBsendend);
|
||||
return;
|
||||
|
@ -88,7 +88,7 @@ static NTSTATUS reply_lanman1(struct smb_request *req, uint16_t choice)
|
||||
secword |= NEGOTIATE_SECURITY_CHALLENGE_RESPONSE;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 13, xconn->smb1.negprot.encrypted_passwords?8:0);
|
||||
reply_smb1_outbuf(req, 13, xconn->smb1.negprot.encrypted_passwords?8:0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0,choice);
|
||||
SSVAL(req->outbuf,smb_vwv1,secword);
|
||||
@ -144,7 +144,7 @@ static NTSTATUS reply_lanman2(struct smb_request *req, uint16_t choice)
|
||||
secword |= NEGOTIATE_SECURITY_CHALLENGE_RESPONSE;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 13, xconn->smb1.negprot.encrypted_passwords?8:0);
|
||||
reply_smb1_outbuf(req, 13, xconn->smb1.negprot.encrypted_passwords?8:0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0, choice);
|
||||
SSVAL(req->outbuf,smb_vwv1, secword);
|
||||
@ -207,7 +207,7 @@ static NTSTATUS reply_nt1(struct smb_request *req, uint16_t choice)
|
||||
}
|
||||
}
|
||||
|
||||
reply_outbuf(req,17,0);
|
||||
reply_smb1_outbuf(req,17,0);
|
||||
|
||||
/* do spnego in user level security if the client
|
||||
supports it and we can do encrypted passwords */
|
||||
@ -665,7 +665,7 @@ void reply_negprot(struct smb_request *req)
|
||||
bool ok;
|
||||
|
||||
DBG_NOTICE("No protocol supported !\n");
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, NO_PROTOCOL_CHOSEN);
|
||||
|
||||
ok = smb1_srv_send(xconn, (char *)req->outbuf,
|
||||
|
@ -76,7 +76,7 @@ static void send_nt_replies(connection_struct *conn,
|
||||
*/
|
||||
|
||||
if(params_to_send == 0 && data_to_send == 0) {
|
||||
reply_outbuf(req, 18, 0);
|
||||
reply_smb1_outbuf(req, 18, 0);
|
||||
if (NT_STATUS_V(nt_error)) {
|
||||
error_packet_set((char *)req->outbuf,
|
||||
0, 0, nt_error,
|
||||
@ -139,7 +139,7 @@ static void send_nt_replies(connection_struct *conn,
|
||||
|
||||
total_sent_thistime = MIN(total_sent_thistime, useable_space);
|
||||
|
||||
reply_outbuf(req, 18,
|
||||
reply_smb1_outbuf(req, 18,
|
||||
total_sent_thistime + alignment_offset
|
||||
+ data_alignment_offset);
|
||||
|
||||
@ -344,10 +344,10 @@ static void do_ntcreate_pipe_open(connection_struct *conn,
|
||||
* the wcnt to 42 ? It's definitely
|
||||
* what happens on the wire....
|
||||
*/
|
||||
reply_outbuf(req, 50, 0);
|
||||
reply_smb1_outbuf(req, 50, 0);
|
||||
SCVAL(req->outbuf,smb_wct,42);
|
||||
} else {
|
||||
reply_outbuf(req, 34, 0);
|
||||
reply_smb1_outbuf(req, 34, 0);
|
||||
}
|
||||
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
@ -721,10 +721,10 @@ void reply_ntcreate_and_X(struct smb_request *req)
|
||||
* the wcnt to 42 ? It's definitely
|
||||
* what happens on the wire....
|
||||
*/
|
||||
reply_outbuf(req, 50, 0);
|
||||
reply_smb1_outbuf(req, 50, 0);
|
||||
SCVAL(req->outbuf,smb_wct,42);
|
||||
} else {
|
||||
reply_outbuf(req, 34, 0);
|
||||
reply_smb1_outbuf(req, 34, 0);
|
||||
}
|
||||
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
@ -1567,7 +1567,7 @@ void reply_ntrename(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
out:
|
||||
END_PROFILE(SMBntrename);
|
||||
return;
|
||||
@ -2539,7 +2539,7 @@ void reply_nttrans(struct smb_request *req)
|
||||
|
||||
/* We need to send an interim response then receive the rest
|
||||
of the parameter/data bytes */
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
show_msg((char *)req->outbuf);
|
||||
END_PROFILE(SMBnttrans);
|
||||
return;
|
||||
|
@ -99,7 +99,7 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
|
||||
}
|
||||
|
||||
/* Prepare the reply */
|
||||
reply_outbuf(req, 15, 0);
|
||||
reply_smb1_outbuf(req, 15, 0);
|
||||
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
@ -217,7 +217,7 @@ static void pipe_write_andx_done(struct tevent_req *subreq)
|
||||
goto done;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 6, 0);
|
||||
reply_smb1_outbuf(req, 6, 0);
|
||||
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
@ -283,7 +283,7 @@ void reply_pipe_read_and_X(struct smb_request *req)
|
||||
state->smb_maxcnt = SVAL(req->vwv+5, 0);
|
||||
state->smb_mincnt = SVAL(req->vwv+6, 0);
|
||||
|
||||
reply_outbuf(req, 12, state->smb_maxcnt + 1 /* padding byte */);
|
||||
reply_smb1_outbuf(req, 12, state->smb_maxcnt + 1 /* padding byte */);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
SCVAL(smb_buf(req->outbuf), 0, 0); /* padding byte */
|
||||
@ -439,7 +439,7 @@ static void pipe_write_done(struct tevent_req *subreq)
|
||||
goto send;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0,nwritten);
|
||||
|
||||
|
@ -110,7 +110,7 @@ void reply_tcon(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
SSVAL(req->outbuf,smb_vwv0,xconn->smb1.negprot.max_recv);
|
||||
SSVAL(req->outbuf,smb_vwv1,conn->cnum);
|
||||
SSVAL(req->outbuf,smb_tid,conn->cnum);
|
||||
@ -359,7 +359,7 @@ void reply_tcon_and_X(struct smb_request *req)
|
||||
server_devicetype = "A:";
|
||||
|
||||
if (get_Protocol() < PROTOCOL_NT1) {
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
if (message_push_string(&req->outbuf, server_devicetype,
|
||||
STR_TERMINATE|STR_ASCII) == -1) {
|
||||
reply_nterror(req, NT_STATUS_NO_MEMORY);
|
||||
@ -375,7 +375,7 @@ void reply_tcon_and_X(struct smb_request *req)
|
||||
uint32_t perm1 = 0;
|
||||
uint32_t perm2 = 0;
|
||||
|
||||
reply_outbuf(req, 7, 0);
|
||||
reply_smb1_outbuf(req, 7, 0);
|
||||
|
||||
if (IS_IPC(conn)) {
|
||||
perm1 = FILE_ALL_ACCESS;
|
||||
@ -387,7 +387,7 @@ void reply_tcon_and_X(struct smb_request *req)
|
||||
SIVAL(req->outbuf, smb_vwv3, perm1);
|
||||
SIVAL(req->outbuf, smb_vwv5, perm2);
|
||||
} else {
|
||||
reply_outbuf(req, 3, 0);
|
||||
reply_smb1_outbuf(req, 3, 0);
|
||||
}
|
||||
|
||||
if ((message_push_string(&req->outbuf, server_devicetype,
|
||||
@ -481,7 +481,7 @@ void reply_ioctl(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 8, replysize+1);
|
||||
reply_smb1_outbuf(req, 8, replysize+1);
|
||||
SSVAL(req->outbuf,smb_vwv1,replysize); /* Total data bytes returned */
|
||||
SSVAL(req->outbuf,smb_vwv5,replysize); /* Data bytes this buffer */
|
||||
SSVAL(req->outbuf,smb_vwv6,52); /* Offset to data */
|
||||
@ -609,7 +609,7 @@ void reply_checkpath(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
path_err:
|
||||
/* We special case this - as when a Windows machine
|
||||
@ -721,7 +721,7 @@ void reply_getatr(struct smb_request *req)
|
||||
}
|
||||
}
|
||||
|
||||
reply_outbuf(req, 10, 0);
|
||||
reply_smb1_outbuf(req, 10, 0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0,mode);
|
||||
if(lp_dos_filetime_resolution(SNUM(conn)) ) {
|
||||
@ -842,7 +842,7 @@ void reply_setatr(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
DEBUG(3, ("setatr name=%s mode=%d\n", smb_fname_str_dbg(smb_fname),
|
||||
mode));
|
||||
@ -898,7 +898,7 @@ void reply_dskattr(struct smb_request *req)
|
||||
}
|
||||
}
|
||||
|
||||
reply_outbuf(req, 5, 0);
|
||||
reply_smb1_outbuf(req, 5, 0);
|
||||
|
||||
if (get_Protocol() <= PROTOCOL_LANMAN2) {
|
||||
double total_space, free_space;
|
||||
@ -1034,7 +1034,7 @@ void reply_search(struct smb_request *req)
|
||||
expect_close = True;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 3);
|
||||
reply_smb1_outbuf(req, 1, 3);
|
||||
maxentries = SVAL(req->vwv+0, 0);
|
||||
dirtype = SVAL(req->vwv+1, 0);
|
||||
p = (const char *)req->buf + 1;
|
||||
@ -1382,7 +1382,7 @@ void reply_fclose(struct smb_request *req)
|
||||
dptr_num = -1;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
SSVAL(req->outbuf,smb_vwv0,0);
|
||||
|
||||
DEBUG(3,("search close\n"));
|
||||
@ -1526,7 +1526,7 @@ void reply_open(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 7, 0);
|
||||
reply_smb1_outbuf(req, 7, 0);
|
||||
SSVAL(req->outbuf,smb_vwv0,fsp->fnum);
|
||||
SSVAL(req->outbuf,smb_vwv1,fattr);
|
||||
if(lp_dos_filetime_resolution(SNUM(conn)) ) {
|
||||
@ -1750,9 +1750,9 @@ void reply_open_and_X(struct smb_request *req)
|
||||
*/
|
||||
|
||||
if (open_flags & EXTENDED_RESPONSE_REQUIRED) {
|
||||
reply_outbuf(req, 19, 0);
|
||||
reply_smb1_outbuf(req, 19, 0);
|
||||
} else {
|
||||
reply_outbuf(req, 15, 0);
|
||||
reply_smb1_outbuf(req, 15, 0);
|
||||
}
|
||||
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
@ -1990,7 +1990,7 @@ static void reply_ulogoffX_done(struct tevent_req *req)
|
||||
|
||||
TALLOC_FREE(session);
|
||||
|
||||
reply_outbuf(smb1req, 2, 0);
|
||||
reply_smb1_outbuf(smb1req, 2, 0);
|
||||
SSVAL(smb1req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(smb1req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
|
||||
@ -2122,7 +2122,7 @@ void reply_mknew(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
SSVAL(req->outbuf,smb_vwv0,fsp->fnum);
|
||||
|
||||
if (oplock_request && lp_fake_oplocks(SNUM(conn))) {
|
||||
@ -2266,7 +2266,7 @@ void reply_ctemp(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
SSVAL(req->outbuf,smb_vwv0,fsp->fnum);
|
||||
|
||||
/* the returned filename is relative to the directory */
|
||||
@ -2371,7 +2371,7 @@ void reply_unlink(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
out:
|
||||
TALLOC_FREE(smb_fname);
|
||||
END_PROFILE(SMBunlink);
|
||||
@ -2850,7 +2850,7 @@ static void reply_lockread_locked(struct tevent_req *subreq)
|
||||
numtoread = maxtoread;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 5, numtoread + 3);
|
||||
reply_smb1_outbuf(req, 5, numtoread + 3);
|
||||
|
||||
data = smb_buf(req->outbuf) + 3;
|
||||
|
||||
@ -2943,7 +2943,7 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n",
|
||||
numtoread = maxtoread;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 5, numtoread+3);
|
||||
reply_smb1_outbuf(req, 5, numtoread+3);
|
||||
|
||||
data = smb_buf(req->outbuf) + 3;
|
||||
|
||||
@ -3215,7 +3215,7 @@ normal_read:
|
||||
|
||||
nosendfile_read:
|
||||
|
||||
reply_outbuf(req, 12, smb_maxcnt + 1 /* padding byte */);
|
||||
reply_smb1_outbuf(req, 12, smb_maxcnt + 1 /* padding byte */);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
|
||||
@ -3420,7 +3420,7 @@ void error_to_writebrawerr(struct smb_request *req)
|
||||
{
|
||||
uint8_t *old_outbuf = req->outbuf;
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
|
||||
memcpy(req->outbuf, old_outbuf, smb_size);
|
||||
TALLOC_FREE(old_outbuf);
|
||||
@ -3621,7 +3621,7 @@ void reply_writebraw(struct smb_request *req)
|
||||
}
|
||||
|
||||
/* Set up outbuf to return the correct size */
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
|
||||
if (numtowrite != 0) {
|
||||
|
||||
@ -3833,7 +3833,7 @@ void reply_writeunlock(struct smb_request *req)
|
||||
}
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0,nwritten);
|
||||
|
||||
@ -3967,7 +3967,7 @@ void reply_write(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0,nwritten);
|
||||
|
||||
@ -4236,7 +4236,7 @@ void reply_write_and_X(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 6, 0);
|
||||
reply_smb1_outbuf(req, 6, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
SSVAL(req->outbuf,smb_vwv2,nwritten);
|
||||
@ -4346,7 +4346,7 @@ void reply_lseek(struct smb_request *req)
|
||||
|
||||
fh_set_pos(fsp->fh, res);
|
||||
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
SIVAL(req->outbuf,smb_vwv0,res);
|
||||
|
||||
DEBUG(3,("lseek %s ofs=%.0f newpos = %.0f mode=%d\n",
|
||||
@ -4417,7 +4417,7 @@ void reply_flush(struct smb_request *req)
|
||||
}
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
DEBUG(3,("flush\n"));
|
||||
END_PROFILE(SMBflush);
|
||||
@ -4643,7 +4643,7 @@ static void reply_exit_done(struct tevent_req *req)
|
||||
close_file_free(NULL, &fsp, SHUTDOWN_CLOSE);
|
||||
}
|
||||
|
||||
reply_outbuf(smb1req, 0, 0);
|
||||
reply_smb1_outbuf(smb1req, 0, 0);
|
||||
/*
|
||||
* The following call is needed to push the
|
||||
* reply data back out the socket after async
|
||||
@ -4729,7 +4729,7 @@ done:
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(smb1req, 0, 0);
|
||||
reply_smb1_outbuf(smb1req, 0, 0);
|
||||
END_PROFILE(SMBclose);
|
||||
return;
|
||||
}
|
||||
@ -4849,7 +4849,7 @@ static void reply_close_done(struct tevent_req *req)
|
||||
|
||||
status = close_file_free(smb1req, &state->fsp, NORMAL_CLOSE);
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
reply_outbuf(smb1req, 0, 0);
|
||||
reply_smb1_outbuf(smb1req, 0, 0);
|
||||
} else {
|
||||
reply_nterror(smb1req, status);
|
||||
}
|
||||
@ -4959,7 +4959,7 @@ void reply_writeclose(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
|
||||
SSVAL(req->outbuf,smb_vwv0,nwritten);
|
||||
|
||||
@ -5055,7 +5055,7 @@ static void reply_lock_done(struct tevent_req *subreq)
|
||||
TALLOC_FREE(subreq);
|
||||
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
} else {
|
||||
reply_nterror(req, status);
|
||||
}
|
||||
@ -5122,7 +5122,7 @@ void reply_unlock(struct smb_request *req)
|
||||
lck.offset,
|
||||
lck.count);
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBunlock);
|
||||
return;
|
||||
@ -5333,7 +5333,7 @@ static void reply_tdis_done(struct tevent_req *req)
|
||||
|
||||
TALLOC_FREE(tcon);
|
||||
|
||||
reply_outbuf(smb1req, 0, 0);
|
||||
reply_smb1_outbuf(smb1req, 0, 0);
|
||||
/*
|
||||
* The following call is needed to push the
|
||||
* reply data back out the socket after async
|
||||
@ -5368,7 +5368,7 @@ void reply_echo(struct smb_request *req)
|
||||
|
||||
smb_reverb = SVAL(req->vwv+0, 0);
|
||||
|
||||
reply_outbuf(req, 1, req->buflen);
|
||||
reply_smb1_outbuf(req, 1, req->buflen);
|
||||
|
||||
/* copy any incoming data back out */
|
||||
if (req->buflen > 0) {
|
||||
@ -5450,7 +5450,7 @@ void reply_printopen(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
SSVAL(req->outbuf,smb_vwv0,fsp->fnum);
|
||||
|
||||
DEBUG(3,("openprint fd=%d %s\n",
|
||||
@ -5502,7 +5502,7 @@ void reply_printclose(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBsplclose);
|
||||
return;
|
||||
@ -5541,7 +5541,7 @@ void reply_printqueue(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 2, 3);
|
||||
reply_smb1_outbuf(req, 2, 3);
|
||||
SSVAL(req->outbuf,smb_vwv0,0);
|
||||
SSVAL(req->outbuf,smb_vwv1,0);
|
||||
SCVAL(smb_buf(req->outbuf),0,1);
|
||||
@ -5742,7 +5742,7 @@ void reply_printwrite(struct smb_request *req)
|
||||
|
||||
DEBUG(3, ("printwrite %s num=%d\n", fsp_fnum_dbg(fsp), numtowrite));
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
END_PROFILE(SMBsplwr);
|
||||
return;
|
||||
@ -5807,7 +5807,7 @@ void reply_mkdir(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
DEBUG(3, ("mkdir %s\n", smb_dname->base_name));
|
||||
out:
|
||||
@ -5909,7 +5909,7 @@ void reply_rmdir(struct smb_request *req)
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
reply_nterror(req, status);
|
||||
} else {
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
}
|
||||
|
||||
DEBUG(3, ("rmdir %s\n", smb_fname_str_dbg(smb_dname)));
|
||||
@ -6058,7 +6058,7 @@ void reply_mv(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
out:
|
||||
TALLOC_FREE(smb_fname_src);
|
||||
TALLOC_FREE(smb_fname_dst);
|
||||
@ -6299,7 +6299,7 @@ void reply_lockingX(struct smb_request *req)
|
||||
ulocks[0],
|
||||
NT_STATUS_OK);
|
||||
if (ok) {
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff);
|
||||
SSVAL(req->outbuf, smb_vwv1, 0);
|
||||
END_PROFILE(SMBlockingX);
|
||||
@ -6350,7 +6350,7 @@ void reply_lockingX(struct smb_request *req)
|
||||
|
||||
if (num_locks == 0) {
|
||||
/* See smbtorture3 lock11 test */
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
/* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff);
|
||||
SSVAL(req->outbuf, smb_vwv1, 0);
|
||||
@ -6370,7 +6370,7 @@ void reply_lockingX(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff);
|
||||
SSVAL(req->outbuf, smb_vwv1, 0);
|
||||
END_PROFILE(SMBlockingX);
|
||||
@ -6412,7 +6412,7 @@ static void reply_lockingx_done(struct tevent_req *subreq)
|
||||
DBG_DEBUG("smbd_smb1_do_locks_recv returned %s\n", nt_errstr(status));
|
||||
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
reply_outbuf(req, 2, 0);
|
||||
reply_smb1_outbuf(req, 2, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
} else {
|
||||
@ -6500,7 +6500,7 @@ void reply_setattrE(struct smb_request *req)
|
||||
ft.create_time = time_t_to_full_timespec(
|
||||
srv_make_unix_date2(req->vwv+1));
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
/*
|
||||
* Patch from Ray Frush <frush@engr.colostate.edu>
|
||||
@ -6616,7 +6616,7 @@ void reply_getattrE(struct smb_request *req)
|
||||
* this.
|
||||
*/
|
||||
|
||||
reply_outbuf(req, 11, 0);
|
||||
reply_smb1_outbuf(req, 11, 0);
|
||||
|
||||
create_ts = get_create_timespec(conn, fsp, fsp->fsp_name);
|
||||
srv_put_dos_date2((char *)req->outbuf, smb_vwv0, create_ts.tv_sec);
|
||||
@ -6678,7 +6678,7 @@ void reply_findclose(struct smb_request *req)
|
||||
}
|
||||
}
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
DEBUG(3,("SMBfindclose dptr_num = %d\n", dptr_num));
|
||||
|
||||
@ -6710,7 +6710,7 @@ void reply_findnclose(struct smb_request *req)
|
||||
findnotifyfirst - so any dptr_num is ok here.
|
||||
Just ignore it. */
|
||||
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
|
||||
DEBUG(3,("SMB_findnclose dptr_num = %d\n", dptr_num));
|
||||
|
||||
|
@ -442,7 +442,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
|
||||
|
||||
vuid = session->global->session_wire_id;
|
||||
|
||||
reply_outbuf(req, 4, 0);
|
||||
reply_smb1_outbuf(req, 4, 0);
|
||||
|
||||
SSVAL(req->outbuf, smb_uid, vuid);
|
||||
SIVAL(req->outbuf, smb_rcls, NT_STATUS_V(status));
|
||||
@ -955,7 +955,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
|
||||
}
|
||||
|
||||
/* it's ok - setup a reply */
|
||||
reply_outbuf(req, 3, 0);
|
||||
reply_smb1_outbuf(req, 3, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
|
||||
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
|
||||
|
||||
|
@ -98,7 +98,7 @@ void send_trans2_replies(connection_struct *conn,
|
||||
/* If there genuinely are no parameters or data to send just send the empty packet */
|
||||
|
||||
if(params_to_send == 0 && data_to_send == 0) {
|
||||
reply_outbuf(req, 10, 0);
|
||||
reply_smb1_outbuf(req, 10, 0);
|
||||
if (NT_STATUS_V(status)) {
|
||||
uint8_t eclass;
|
||||
uint32_t ecode;
|
||||
@ -156,7 +156,7 @@ void send_trans2_replies(connection_struct *conn,
|
||||
|
||||
total_sent_thistime = MIN(total_sent_thistime, useable_space);
|
||||
|
||||
reply_outbuf(req, 10, total_sent_thistime + alignment_offset
|
||||
reply_smb1_outbuf(req, 10, total_sent_thistime + alignment_offset
|
||||
+ data_alignment_offset);
|
||||
|
||||
/* Set total params and data to be sent */
|
||||
@ -1853,7 +1853,7 @@ static void call_trans2setfsinfo(connection_struct *conn,
|
||||
* like windows do...
|
||||
* --metze
|
||||
*/
|
||||
reply_outbuf(req, 10, 0);
|
||||
reply_smb1_outbuf(req, 10, 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -3313,7 +3313,7 @@ void reply_trans2(struct smb_request *req)
|
||||
|
||||
/* We need to send an interim response then receive the rest
|
||||
of the parameter/data bytes */
|
||||
reply_outbuf(req, 0, 0);
|
||||
reply_smb1_outbuf(req, 0, 0);
|
||||
show_msg((char *)req->outbuf);
|
||||
END_PROFILE(SMBtrans2);
|
||||
return;
|
||||
|
@ -1166,7 +1166,7 @@ NTSTATUS smb2_multi_protocol_reply_negprot(struct smb_request *req)
|
||||
bool ok;
|
||||
|
||||
DBG_NOTICE("No protocol supported !\n");
|
||||
reply_outbuf(req, 1, 0);
|
||||
reply_smb1_outbuf(req, 1, 0);
|
||||
SSVAL(req->outbuf, smb_vwv0, NO_PROTOCOL_CHOSEN);
|
||||
|
||||
ok = smb1_srv_send(xconn, (char *)req->outbuf,
|
||||
|
@ -558,7 +558,7 @@ bool create_smb1_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req,
|
||||
return true;
|
||||
}
|
||||
|
||||
void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes)
|
||||
void reply_smb1_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes)
|
||||
{
|
||||
char *outbuf;
|
||||
if (!create_smb1_outbuf(req, req, req->inbuf, &outbuf, num_words,
|
||||
|
Loading…
x
Reference in New Issue
Block a user