diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-06-28 08:39:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:48 -0500 |
commit | 8bf537d119be3e1823ad41b8b8af0d163251b1c5 (patch) | |
tree | bbacd6ecb45e1a1cb095f389a21d39b2c426196e /source4/smb_server | |
parent | 4ddb2d347d86818a13d71d0eb2f0f8983c2cc41f (diff) | |
download | samba-8bf537d119be3e1823ad41b8b8af0d163251b1c5.tar.gz samba-8bf537d119be3e1823ad41b8b8af0d163251b1c5.tar.bz2 samba-8bf537d119be3e1823ad41b8b8af0d163251b1c5.zip |
r1280: rename struct request_context to smbsrv_request
metze
(This used to be commit a85d2db5826a84b812ea5162a11f54edd25f74e3)
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/negprot.c | 14 | ||||
-rw-r--r-- | source4/smb_server/nttrans.c | 14 | ||||
-rw-r--r-- | source4/smb_server/reply.c | 162 | ||||
-rw-r--r-- | source4/smb_server/request.c | 48 | ||||
-rw-r--r-- | source4/smb_server/search.c | 10 | ||||
-rw-r--r-- | source4/smb_server/service.c | 6 | ||||
-rw-r--r-- | source4/smb_server/sesssetup.c | 10 | ||||
-rw-r--r-- | source4/smb_server/signing.c | 8 | ||||
-rw-r--r-- | source4/smb_server/smb_server.c | 20 | ||||
-rw-r--r-- | source4/smb_server/trans2.c | 48 |
10 files changed, 170 insertions, 170 deletions
diff --git a/source4/smb_server/negprot.c b/source4/smb_server/negprot.c index dfeb9ef457..83b3cd75e9 100644 --- a/source4/smb_server/negprot.c +++ b/source4/smb_server/negprot.c @@ -49,7 +49,7 @@ static void get_challenge(struct smbsrv_context *smb_ctx, char buff[8]) /**************************************************************************** Reply for the core protocol. ****************************************************************************/ -static void reply_corep(struct request_context *req, uint16_t choice) +static void reply_corep(struct smbsrv_request *req, uint16_t choice) { req_setup_reply(req, 1, 0); @@ -65,7 +65,7 @@ static void reply_corep(struct request_context *req, uint16_t choice) this is quite incomplete - we only fill in a small part of the reply, but as nobody uses this any more it probably doesn't matter ****************************************************************************/ -static void reply_coreplus(struct request_context *req, uint16_t choice) +static void reply_coreplus(struct smbsrv_request *req, uint16_t choice) { uint16_t raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0); @@ -90,7 +90,7 @@ static void reply_coreplus(struct request_context *req, uint16_t choice) /**************************************************************************** Reply for the lanman 1.0 protocol. ****************************************************************************/ -static void reply_lanman1(struct request_context *req, uint16_t choice) +static void reply_lanman1(struct smbsrv_request *req, uint16_t choice) { int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0); int secword=0; @@ -134,7 +134,7 @@ static void reply_lanman1(struct request_context *req, uint16_t choice) /**************************************************************************** Reply for the lanman 2.0 protocol. ****************************************************************************/ -static void reply_lanman2(struct request_context *req, uint16_t choice) +static void reply_lanman2(struct smbsrv_request *req, uint16_t choice) { int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0); int secword=0; @@ -223,7 +223,7 @@ static DATA_BLOB negprot_spnego(struct smbsrv_context *smb_ctx) /**************************************************************************** Reply for the nt protocol. ****************************************************************************/ -static void reply_nt1(struct request_context *req, uint16_t choice) +static void reply_nt1(struct smbsrv_request *req, uint16_t choice) { /* dual names + lock_and_read + nt SMBs + remote API calls */ int capabilities; @@ -422,7 +422,7 @@ protocol [LANMAN2.1] static const struct { const char *proto_name; const char *short_name; - void (*proto_reply_fn)(struct request_context *req, uint16_t choice); + void (*proto_reply_fn)(struct smbsrv_request *req, uint16_t choice); int protocol_level; } supported_protocols[] = { {"NT LANMAN 1.0", "NT1", reply_nt1, PROTOCOL_NT1}, @@ -441,7 +441,7 @@ static const struct { Reply to a negprot. ****************************************************************************/ -void reply_negprot(struct request_context *req) +void reply_negprot(struct smbsrv_request *req) { int Index=0; int choice = -1; diff --git a/source4/smb_server/nttrans.c b/source4/smb_server/nttrans.c index 14977f9bd2..ddae725c4b 100644 --- a/source4/smb_server/nttrans.c +++ b/source4/smb_server/nttrans.c @@ -32,7 +32,7 @@ /* setup a nttrans reply, given the data and params sizes */ -static void nttrans_setup_reply(struct request_context *req, +static void nttrans_setup_reply(struct smbsrv_request *req, struct smb_nttrans *trans, uint16_t param_size, uint16_t data_size, uint16_t setup_count) @@ -48,7 +48,7 @@ static void nttrans_setup_reply(struct request_context *req, /* parse NTTRANS_CREATE request */ -static NTSTATUS nttrans_create(struct request_context *req, +static NTSTATUS nttrans_create(struct smbsrv_request *req, struct smb_nttrans *trans) { return NT_STATUS_FOOBAR; @@ -56,14 +56,14 @@ static NTSTATUS nttrans_create(struct request_context *req, /* parse NTTRANS_RENAME request */ -static NTSTATUS nttrans_rename(struct request_context *req, +static NTSTATUS nttrans_rename(struct smbsrv_request *req, struct smb_nttrans *trans) { return NT_STATUS_FOOBAR; } /* parse NTTRANS_IOCTL request */ -static NTSTATUS nttrans_ioctl(struct request_context *req, +static NTSTATUS nttrans_ioctl(struct smbsrv_request *req, struct smb_nttrans *trans) { union smb_ioctl nt; @@ -100,7 +100,7 @@ static NTSTATUS nttrans_ioctl(struct request_context *req, /* backend for nttrans requests */ -static NTSTATUS nttrans_backend(struct request_context *req, +static NTSTATUS nttrans_backend(struct smbsrv_request *req, struct smb_nttrans *trans) { DEBUG(9,("nttrans_backend: setup_count=%d function=%d\n", @@ -128,7 +128,7 @@ static NTSTATUS nttrans_backend(struct request_context *req, /**************************************************************************** Reply to an SMBnttrans request ****************************************************************************/ -void reply_nttrans(struct request_context *req) +void reply_nttrans(struct smbsrv_request *req) { struct smb_nttrans trans; int i; @@ -267,7 +267,7 @@ void reply_nttrans(struct request_context *req) /**************************************************************************** Reply to an SMBnttranss request ****************************************************************************/ -void reply_nttranss(struct request_context *req) +void reply_nttranss(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c index 3356ce9925..0715dc4075 100644 --- a/source4/smb_server/reply.c +++ b/source4/smb_server/reply.c @@ -65,7 +65,7 @@ /**************************************************************************** Reply to a simple request (async send) ****************************************************************************/ -static void reply_simple_send(struct request_context *req) +static void reply_simple_send(struct smbsrv_request *req) { CHECK_ASYNC_STATUS; @@ -77,7 +77,7 @@ static void reply_simple_send(struct request_context *req) /**************************************************************************** Reply to a tcon. ****************************************************************************/ -void reply_tcon(struct request_context *req) +void reply_tcon(struct smbsrv_request *req) { union smb_tcon con; NTSTATUS status; @@ -120,7 +120,7 @@ void reply_tcon(struct request_context *req) /**************************************************************************** Reply to a tcon and X. ****************************************************************************/ -void reply_tcon_and_X(struct request_context *req) +void reply_tcon_and_X(struct smbsrv_request *req) { NTSTATUS status; union smb_tcon con; @@ -189,7 +189,7 @@ void reply_tcon_and_X(struct request_context *req) /**************************************************************************** Reply to an unknown request ****************************************************************************/ -void reply_unknown(struct request_context *req) +void reply_unknown(struct smbsrv_request *req) { int type; @@ -204,7 +204,7 @@ void reply_unknown(struct request_context *req) /**************************************************************************** Reply to an ioctl (async reply) ****************************************************************************/ -static void reply_ioctl_send(struct request_context *req) +static void reply_ioctl_send(struct smbsrv_request *req) { union smb_ioctl *io = req->async.private; @@ -224,7 +224,7 @@ static void reply_ioctl_send(struct request_context *req) /**************************************************************************** Reply to an ioctl. ****************************************************************************/ -void reply_ioctl(struct request_context *req) +void reply_ioctl(struct smbsrv_request *req) { union smb_ioctl *io; @@ -249,7 +249,7 @@ void reply_ioctl(struct request_context *req) /**************************************************************************** Reply to a chkpth. ****************************************************************************/ -void reply_chkpth(struct request_context *req) +void reply_chkpth(struct smbsrv_request *req) { struct smb_chkpath *io; @@ -267,7 +267,7 @@ void reply_chkpth(struct request_context *req) /**************************************************************************** Reply to a getatr (async reply) ****************************************************************************/ -static void reply_getatr_send(struct request_context *req) +static void reply_getatr_send(struct smbsrv_request *req) { union smb_fileinfo *st = req->async.private; @@ -289,7 +289,7 @@ static void reply_getatr_send(struct request_context *req) /**************************************************************************** Reply to a getatr. ****************************************************************************/ -void reply_getatr(struct request_context *req) +void reply_getatr(struct smbsrv_request *req) { union smb_fileinfo *st; @@ -317,7 +317,7 @@ void reply_getatr(struct request_context *req) /**************************************************************************** Reply to a setatr. ****************************************************************************/ -void reply_setatr(struct request_context *req) +void reply_setatr(struct smbsrv_request *req) { union smb_setfileinfo *st; @@ -348,7 +348,7 @@ void reply_setatr(struct request_context *req) /**************************************************************************** Reply to a dskattr (async reply) ****************************************************************************/ -static void reply_dskattr_send(struct request_context *req) +static void reply_dskattr_send(struct smbsrv_request *req) { union smb_fsinfo *fs = req->async.private; @@ -371,7 +371,7 @@ static void reply_dskattr_send(struct request_context *req) /**************************************************************************** Reply to a dskattr. ****************************************************************************/ -void reply_dskattr(struct request_context *req) +void reply_dskattr(struct smbsrv_request *req) { union smb_fsinfo *fs; @@ -393,7 +393,7 @@ void reply_dskattr(struct request_context *req) /**************************************************************************** Reply to an open (async reply) ****************************************************************************/ -static void reply_open_send(struct request_context *req) +static void reply_open_send(struct smbsrv_request *req) { union smb_open *oi = req->async.private; @@ -414,7 +414,7 @@ static void reply_open_send(struct request_context *req) /**************************************************************************** Reply to an open. ****************************************************************************/ -void reply_open(struct request_context *req) +void reply_open(struct smbsrv_request *req) { union smb_open *oi; @@ -446,7 +446,7 @@ void reply_open(struct request_context *req) /**************************************************************************** Reply to an open and X (async reply) ****************************************************************************/ -static void reply_open_and_X_send(struct request_context *req) +static void reply_open_and_X_send(struct smbsrv_request *req) { union smb_open *oi = req->async.private; @@ -483,7 +483,7 @@ static void reply_open_and_X_send(struct request_context *req) /**************************************************************************** Reply to an open and X. ****************************************************************************/ -void reply_open_and_X(struct request_context *req) +void reply_open_and_X(struct smbsrv_request *req) { union smb_open *oi; @@ -521,7 +521,7 @@ void reply_open_and_X(struct request_context *req) /**************************************************************************** Reply to a mknew or a create. ****************************************************************************/ -static void reply_mknew_send(struct request_context *req) +static void reply_mknew_send(struct smbsrv_request *req) { union smb_open *oi = req->async.private; @@ -539,7 +539,7 @@ static void reply_mknew_send(struct request_context *req) /**************************************************************************** Reply to a mknew or a create. ****************************************************************************/ -void reply_mknew(struct request_context *req) +void reply_mknew(struct smbsrv_request *req) { union smb_open *oi; @@ -570,7 +570,7 @@ void reply_mknew(struct request_context *req) /**************************************************************************** Reply to a create temporary file (async reply) ****************************************************************************/ -static void reply_ctemp_send(struct request_context *req) +static void reply_ctemp_send(struct smbsrv_request *req) { union smb_open *oi = req->async.private; @@ -590,7 +590,7 @@ static void reply_ctemp_send(struct request_context *req) /**************************************************************************** Reply to a create temporary file. ****************************************************************************/ -void reply_ctemp(struct request_context *req) +void reply_ctemp(struct smbsrv_request *req) { union smb_open *oi; @@ -624,7 +624,7 @@ void reply_ctemp(struct request_context *req) /**************************************************************************** Reply to a unlink ****************************************************************************/ -void reply_unlink(struct request_context *req) +void reply_unlink(struct smbsrv_request *req) { struct smb_unlink *unl; @@ -651,7 +651,7 @@ void reply_unlink(struct request_context *req) only the 4 byte NBT header This command must be replied to synchronously ****************************************************************************/ -void reply_readbraw(struct request_context *req) +void reply_readbraw(struct smbsrv_request *req) { NTSTATUS status; union smb_read io; @@ -712,7 +712,7 @@ failed: /**************************************************************************** Reply to a lockread (async reply) ****************************************************************************/ -static void reply_lockread_send(struct request_context *req) +static void reply_lockread_send(struct smbsrv_request *req) { union smb_read *io = req->async.private; @@ -738,7 +738,7 @@ static void reply_lockread_send(struct request_context *req) Reply to a lockread (core+ protocol). note that the lock is a write lock, not a read lock! ****************************************************************************/ -void reply_lockread(struct request_context *req) +void reply_lockread(struct smbsrv_request *req) { union smb_read *io; @@ -772,7 +772,7 @@ void reply_lockread(struct request_context *req) /**************************************************************************** Reply to a read (async reply) ****************************************************************************/ -static void reply_read_send(struct request_context *req) +static void reply_read_send(struct smbsrv_request *req) { union smb_read *io = req->async.private; @@ -796,7 +796,7 @@ static void reply_read_send(struct request_context *req) /**************************************************************************** Reply to a read. ****************************************************************************/ -void reply_read(struct request_context *req) +void reply_read(struct smbsrv_request *req) { union smb_read *io; @@ -830,7 +830,7 @@ void reply_read(struct request_context *req) /**************************************************************************** Reply to a read and X (async reply) ****************************************************************************/ -static void reply_read_and_X_send(struct request_context *req) +static void reply_read_and_X_send(struct smbsrv_request *req) { union smb_read *io = req->async.private; @@ -857,7 +857,7 @@ static void reply_read_and_X_send(struct request_context *req) /**************************************************************************** Reply to a read and X. ****************************************************************************/ -void reply_read_and_X(struct request_context *req) +void reply_read_and_X(struct smbsrv_request *req) { union smb_read *io; @@ -900,7 +900,7 @@ void reply_read_and_X(struct request_context *req) /**************************************************************************** Reply to a writebraw (core+ or LANMAN1.0 protocol). ****************************************************************************/ -void reply_writebraw(struct request_context *req) +void reply_writebraw(struct smbsrv_request *req) { /* this one is damn complex - put it off for now */ req_reply_error(req, NT_STATUS_FOOBAR); @@ -910,7 +910,7 @@ void reply_writebraw(struct request_context *req) /**************************************************************************** Reply to a writeunlock (async reply) ****************************************************************************/ -static void reply_writeunlock_send(struct request_context *req) +static void reply_writeunlock_send(struct smbsrv_request *req) { union smb_write *io = req->async.private; @@ -927,7 +927,7 @@ static void reply_writeunlock_send(struct request_context *req) /**************************************************************************** Reply to a writeunlock (core+). ****************************************************************************/ -void reply_writeunlock(struct request_context *req) +void reply_writeunlock(struct smbsrv_request *req) { union smb_write *io; @@ -967,7 +967,7 @@ void reply_writeunlock(struct request_context *req) /**************************************************************************** Reply to a write (async reply) ****************************************************************************/ -static void reply_write_send(struct request_context *req) +static void reply_write_send(struct smbsrv_request *req) { union smb_write *io = req->async.private; @@ -984,7 +984,7 @@ static void reply_write_send(struct request_context *req) /**************************************************************************** Reply to a write ****************************************************************************/ -void reply_write(struct request_context *req) +void reply_write(struct smbsrv_request *req) { union smb_write *io; @@ -1023,7 +1023,7 @@ void reply_write(struct request_context *req) /**************************************************************************** Reply to a write and X (async reply) ****************************************************************************/ -static void reply_write_and_X_send(struct request_context *req) +static void reply_write_and_X_send(struct smbsrv_request *req) { union smb_write *io = req->async.private; @@ -1045,7 +1045,7 @@ static void reply_write_and_X_send(struct request_context *req) /**************************************************************************** Reply to a write and X. ****************************************************************************/ -void reply_write_and_X(struct request_context *req) +void reply_write_and_X(struct smbsrv_request *req) { union smb_write *io; @@ -1089,7 +1089,7 @@ void reply_write_and_X(struct request_context *req) /**************************************************************************** Reply to a lseek (async reply) ****************************************************************************/ -static void reply_lseek_send(struct request_context *req) +static void reply_lseek_send(struct smbsrv_request *req) { struct smb_seek *io = req->async.private; @@ -1106,7 +1106,7 @@ static void reply_lseek_send(struct request_context *req) /**************************************************************************** Reply to a lseek. ****************************************************************************/ -void reply_lseek(struct request_context *req) +void reply_lseek(struct smbsrv_request *req) { struct smb_seek *io; @@ -1129,7 +1129,7 @@ void reply_lseek(struct request_context *req) /**************************************************************************** Reply to a flush. ****************************************************************************/ -void reply_flush(struct request_context *req) +void reply_flush(struct smbsrv_request *req) { struct smb_flush *io; @@ -1151,7 +1151,7 @@ void reply_flush(struct request_context *req) /**************************************************************************** Reply to a exit. ****************************************************************************/ -void reply_exit(struct request_context *req) +void reply_exit(struct smbsrv_request *req) { REQ_CHECK_WCT(req, 0); @@ -1174,7 +1174,7 @@ void reply_exit(struct request_context *req) Note that this has to deal with closing a directory opened by NT SMB's. ****************************************************************************/ -void reply_close(struct request_context *req) +void reply_close(struct smbsrv_request *req) { union smb_close *io; @@ -1199,7 +1199,7 @@ void reply_close(struct request_context *req) /**************************************************************************** Reply to a writeclose (async reply) ****************************************************************************/ -static void reply_writeclose_send(struct request_context *req) +static void reply_writeclose_send(struct smbsrv_request *req) { union smb_write *io = req->async.private; @@ -1216,7 +1216,7 @@ static void reply_writeclose_send(struct request_context *req) /**************************************************************************** Reply to a writeclose (Core+ protocol). ****************************************************************************/ -void reply_writeclose(struct request_context *req) +void reply_writeclose(struct smbsrv_request *req) { union smb_write *io; @@ -1252,7 +1252,7 @@ void reply_writeclose(struct request_context *req) /**************************************************************************** Reply to a lock. ****************************************************************************/ -void reply_lock(struct request_context *req) +void reply_lock(struct smbsrv_request *req) { union smb_lock *lck; @@ -1277,7 +1277,7 @@ void reply_lock(struct request_context *req) /**************************************************************************** Reply to a unlock. ****************************************************************************/ -void reply_unlock(struct request_context *req) +void reply_unlock(struct smbsrv_request *req) { union smb_lock *lck; @@ -1302,7 +1302,7 @@ void reply_unlock(struct request_context *req) /**************************************************************************** Reply to a tdis. ****************************************************************************/ -void reply_tdis(struct request_context *req) +void reply_tdis(struct smbsrv_request *req) { REQ_CHECK_WCT(req, 0); @@ -1319,7 +1319,7 @@ void reply_tdis(struct request_context *req) Reply to a echo. This is one of the few calls that is handled directly (the backends don't see it at all) ****************************************************************************/ -void reply_echo(struct request_context *req) +void reply_echo(struct smbsrv_request *req) { uint16_t count; int i; @@ -1351,7 +1351,7 @@ void reply_echo(struct request_context *req) /**************************************************************************** Reply to a printopen (async reply) ****************************************************************************/ -static void reply_printopen_send(struct request_context *req) +static void reply_printopen_send(struct smbsrv_request *req) { union smb_open *oi = req->async.private; @@ -1368,7 +1368,7 @@ static void reply_printopen_send(struct request_context *req) /**************************************************************************** Reply to a printopen. ****************************************************************************/ -void reply_printopen(struct request_context *req) +void reply_printopen(struct smbsrv_request *req) { union smb_open *oi; @@ -1394,7 +1394,7 @@ void reply_printopen(struct request_context *req) /**************************************************************************** Reply to a printclose. ****************************************************************************/ -void reply_printclose(struct request_context *req) +void reply_printclose(struct smbsrv_request *req) { union smb_close *io; @@ -1416,7 +1416,7 @@ void reply_printclose(struct request_context *req) /**************************************************************************** Reply to a printqueue. ****************************************************************************/ -void reply_printqueue_send(struct request_context *req) +void reply_printqueue_send(struct smbsrv_request *req) { union smb_lpq *lpq = req->async.private; int i, maxcount; @@ -1461,7 +1461,7 @@ void reply_printqueue_send(struct request_context *req) /**************************************************************************** Reply to a printqueue. ****************************************************************************/ -void reply_printqueue(struct request_context *req) +void reply_printqueue(struct smbsrv_request *req) { union smb_lpq *lpq; @@ -1486,7 +1486,7 @@ void reply_printqueue(struct request_context *req) /**************************************************************************** Reply to a printwrite. ****************************************************************************/ -void reply_printwrite(struct request_context *req) +void reply_printwrite(struct smbsrv_request *req) { union smb_write *io; @@ -1523,7 +1523,7 @@ void reply_printwrite(struct request_context *req) /**************************************************************************** Reply to a mkdir. ****************************************************************************/ -void reply_mkdir(struct request_context *req) +void reply_mkdir(struct smbsrv_request *req) { union smb_mkdir *io; @@ -1546,7 +1546,7 @@ void reply_mkdir(struct request_context *req) /**************************************************************************** Reply to a rmdir. ****************************************************************************/ -void reply_rmdir(struct request_context *req) +void reply_rmdir(struct smbsrv_request *req) { struct smb_rmdir *io; @@ -1568,7 +1568,7 @@ void reply_rmdir(struct request_context *req) /**************************************************************************** Reply to a mv. ****************************************************************************/ -void reply_mv(struct request_context *req) +void reply_mv(struct smbsrv_request *req) { union smb_rename *io; char *p; @@ -1601,7 +1601,7 @@ void reply_mv(struct request_context *req) /**************************************************************************** Reply to an NT rename. ****************************************************************************/ -void reply_ntrename(struct request_context *req) +void reply_ntrename(struct smbsrv_request *req) { union smb_rename *io; char *p; @@ -1635,7 +1635,7 @@ void reply_ntrename(struct request_context *req) /**************************************************************************** Reply to a file copy (async reply) ****************************************************************************/ -static void reply_copy_send(struct request_context *req) +static void reply_copy_send(struct smbsrv_request *req) { struct smb_copy *cp = req->async.private; @@ -1652,7 +1652,7 @@ static void reply_copy_send(struct request_context *req) /**************************************************************************** Reply to a file copy. ****************************************************************************/ -void reply_copy(struct request_context *req) +void reply_copy(struct smbsrv_request *req) { struct smb_copy *cp; char *p; @@ -1686,7 +1686,7 @@ void reply_copy(struct request_context *req) /**************************************************************************** Reply to a lockingX request (async send) ****************************************************************************/ -static void reply_lockingX_send(struct request_context *req) +static void reply_lockingX_send(struct smbsrv_request *req) { union smb_lock *lck = req->async.private; @@ -1712,7 +1712,7 @@ static void reply_lockingX_send(struct request_context *req) /**************************************************************************** Reply to a lockingX request. ****************************************************************************/ -void reply_lockingX(struct request_context *req) +void reply_lockingX(struct smbsrv_request *req) { union smb_lock *lck; uint_t total_locks, i; @@ -1786,7 +1786,7 @@ void reply_lockingX(struct request_context *req) /**************************************************************************** Reply to a SMBreadbmpx (read block multiplex) request. ****************************************************************************/ -void reply_readbmpx(struct request_context *req) +void reply_readbmpx(struct smbsrv_request *req) { /* tell the client to not use a multiplexed read - its too broken to use */ req_reply_dos_error(req, ERRSRV, ERRuseSTD); @@ -1796,7 +1796,7 @@ void reply_readbmpx(struct request_context *req) /**************************************************************************** Reply to a SMBsetattrE. ****************************************************************************/ -void reply_setattrE(struct request_context *req) +void reply_setattrE(struct smbsrv_request *req) { union smb_setfileinfo *info; @@ -1822,7 +1822,7 @@ void reply_setattrE(struct request_context *req) /**************************************************************************** Reply to a SMBwritebmpx (write block multiplex primary) request. ****************************************************************************/ -void reply_writebmpx(struct request_context *req) +void reply_writebmpx(struct smbsrv_request *req) { /* we will need to implement this one for OS/2, but right now I can't be bothered */ req_reply_error(req, NT_STATUS_FOOBAR); @@ -1832,7 +1832,7 @@ void reply_writebmpx(struct request_context *req) /**************************************************************************** Reply to a SMBwritebs (write block multiplex secondary) request. ****************************************************************************/ -void reply_writebs(struct request_context *req) +void reply_writebs(struct smbsrv_request *req) { /* see reply_writebmpx */ req_reply_error(req, NT_STATUS_FOOBAR); @@ -1843,7 +1843,7 @@ void reply_writebs(struct request_context *req) /**************************************************************************** Reply to a SMBgetattrE (async reply) ****************************************************************************/ -static void reply_getattrE_send(struct request_context *req) +static void reply_getattrE_send(struct smbsrv_request *req) { union smb_fileinfo *info = req->async.private; @@ -1865,7 +1865,7 @@ static void reply_getattrE_send(struct request_context *req) /**************************************************************************** Reply to a SMBgetattrE. ****************************************************************************/ -void reply_getattrE(struct request_context *req) +void reply_getattrE(struct smbsrv_request *req) { union smb_fileinfo *info; @@ -1889,7 +1889,7 @@ void reply_getattrE(struct request_context *req) /**************************************************************************** reply to an old style session setup command ****************************************************************************/ -static void reply_sesssetup_old(struct request_context *req) +static void reply_sesssetup_old(struct smbsrv_request *req) { NTSTATUS status; union smb_sesssetup sess; @@ -1947,7 +1947,7 @@ static void reply_sesssetup_old(struct request_context *req) /**************************************************************************** reply to an NT1 style session setup command ****************************************************************************/ -static void reply_sesssetup_nt1(struct request_context *req) +static void reply_sesssetup_nt1(struct smbsrv_request *req) { NTSTATUS status; union smb_sesssetup sess; @@ -2017,7 +2017,7 @@ static void reply_sesssetup_nt1(struct request_context *req) /**************************************************************************** reply to an SPNEGO style session setup command ****************************************************************************/ -static void reply_sesssetup_spnego(struct request_context *req) +static void reply_sesssetup_spnego(struct smbsrv_request *req) { NTSTATUS status; union smb_sesssetup sess; @@ -2074,7 +2074,7 @@ static void reply_sesssetup_spnego(struct request_context *req) /**************************************************************************** reply to a session setup command ****************************************************************************/ -void reply_sesssetup(struct request_context *req) +void reply_sesssetup(struct smbsrv_request *req) { switch (req->in.wct) { case 10: @@ -2099,7 +2099,7 @@ void reply_sesssetup(struct request_context *req) /**************************************************************************** Reply to a SMBulogoffX. ****************************************************************************/ -void reply_ulogoffX(struct request_context *req) +void reply_ulogoffX(struct smbsrv_request *req) { uint16_t vuid; @@ -2125,7 +2125,7 @@ void reply_ulogoffX(struct request_context *req) /**************************************************************************** Reply to an SMBfindclose request ****************************************************************************/ -void reply_findclose(struct request_context *req) +void reply_findclose(struct smbsrv_request *req) { NTSTATUS status; union smb_search_close io; @@ -2154,7 +2154,7 @@ void reply_findclose(struct request_context *req) /**************************************************************************** Reply to an SMBfindnclose request ****************************************************************************/ -void reply_findnclose(struct request_context *req) +void reply_findnclose(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } @@ -2163,7 +2163,7 @@ void reply_findnclose(struct request_context *req) /**************************************************************************** Reply to an SMBntcreateX request (async send) ****************************************************************************/ -static void reply_ntcreate_and_X_send(struct request_context *req) +static void reply_ntcreate_and_X_send(struct smbsrv_request *req) { union smb_open *io = req->async.private; @@ -2196,7 +2196,7 @@ static void reply_ntcreate_and_X_send(struct request_context *req) /**************************************************************************** Reply to an SMBntcreateX request ****************************************************************************/ -void reply_ntcreate_and_X(struct request_context *req) +void reply_ntcreate_and_X(struct smbsrv_request *req) { union smb_open *io; uint16_t fname_len; @@ -2245,7 +2245,7 @@ void reply_ntcreate_and_X(struct request_context *req) /**************************************************************************** Reply to an SMBntcancel request ****************************************************************************/ -void reply_ntcancel(struct request_context *req) +void reply_ntcancel(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } @@ -2253,7 +2253,7 @@ void reply_ntcancel(struct request_context *req) /**************************************************************************** Reply to an SMBsends request ****************************************************************************/ -void reply_sends(struct request_context *req) +void reply_sends(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } @@ -2261,7 +2261,7 @@ void reply_sends(struct request_context *req) /**************************************************************************** Reply to an SMBsendstrt request ****************************************************************************/ -void reply_sendstrt(struct request_context *req) +void reply_sendstrt(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } @@ -2269,7 +2269,7 @@ void reply_sendstrt(struct request_context *req) /**************************************************************************** Reply to an SMBsendend request ****************************************************************************/ -void reply_sendend(struct request_context *req) +void reply_sendend(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } @@ -2277,7 +2277,7 @@ void reply_sendend(struct request_context *req) /**************************************************************************** Reply to an SMBsendtxt request ****************************************************************************/ -void reply_sendtxt(struct request_context *req) +void reply_sendtxt(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } @@ -2287,7 +2287,7 @@ void reply_sendtxt(struct request_context *req) /**************************************************************************** Reply to a special message - a SMB packet with non zero NBT message type ****************************************************************************/ -void reply_special(struct request_context *req) +void reply_special(struct smbsrv_request *req) { uint8_t msg_type; char buf[4]; diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c index 6361325f22..d845a78c0d 100644 --- a/source4/smb_server/request.c +++ b/source4/smb_server/request.c @@ -19,7 +19,7 @@ */ /* - this file implements functions for manipulating the 'struct request_context' structure in smbd + this file implements functions for manipulating the 'struct smbsrv_request' structure in smbd */ #include "includes.h" @@ -28,7 +28,7 @@ #define REQ_OVER_ALLOCATION 256 /* destroy a request structure */ -void req_destroy(struct request_context *req) +void req_destroy(struct smbsrv_request *req) { /* the request might be marked protected. This is done by the * SMBecho code for example */ @@ -45,9 +45,9 @@ void req_destroy(struct request_context *req) construct a basic request packet, mostly used to construct async packets such as change notify and oplock break requests ****************************************************************************/ -struct request_context *init_smb_request(struct smbsrv_context *smb_ctx) +struct smbsrv_request *init_smb_request(struct smbsrv_context *smb_ctx) { - struct request_context *req; + struct smbsrv_request *req; TALLOC_CTX *mem_ctx; /* each request gets its own talloc context. The request @@ -79,7 +79,7 @@ struct request_context *init_smb_request(struct smbsrv_context *smb_ctx) /* setup a chained reply in req->out with the given word count and initial data buffer size. */ -static void req_setup_chain_reply(struct request_context *req, uint_t wct, uint_t buflen) +static void req_setup_chain_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen) { uint32_t chain_base_size = req->out.size; @@ -111,7 +111,7 @@ static void req_setup_chain_reply(struct request_context *req, uint_t wct, uint_ the caller will then fill in the command words and data before calling req_send_reply() to send the reply on its way */ -void req_setup_reply(struct request_context *req, uint_t wct, uint_t buflen) +void req_setup_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen) { if (req->chain_count != 0) { req_setup_chain_reply(req, wct, buflen); @@ -172,7 +172,7 @@ void req_setup_reply(struct request_context *req, uint_t wct, uint_t buflen) note that this is deliberately a signed integer reply */ -int req_max_data(struct request_context *req) +int req_max_data(struct smbsrv_request *req) { int ret; ret = req->smb_ctx->negotiate.max_send; @@ -190,7 +190,7 @@ int req_max_data(struct request_context *req) To cope with this req->out.ptr is supplied. This will be updated to point at the same offset into the packet as before this call */ -static void req_grow_allocation(struct request_context *req, uint_t new_size) +static void req_grow_allocation(struct smbsrv_request *req, uint_t new_size) { int delta; char *buf2; @@ -231,7 +231,7 @@ static void req_grow_allocation(struct request_context *req, uint_t new_size) To cope with this req->out.ptr is supplied. This will be updated to point at the same offset into the packet as before this call */ -void req_grow_data(struct request_context *req, uint_t new_size) +void req_grow_data(struct smbsrv_request *req, uint_t new_size) { int delta; @@ -256,7 +256,7 @@ void req_grow_data(struct request_context *req, uint_t new_size) note that this only looks at req->out.buffer and req->out.size, allowing manually constructed packets to be sent */ -void req_send_reply_nosign(struct request_context *req) +void req_send_reply_nosign(struct smbsrv_request *req) { if (req->out.size > NBT_HDR_SIZE) { _smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE); @@ -275,7 +275,7 @@ void req_send_reply_nosign(struct request_context *req) note that this only looks at req->out.buffer and req->out.size, allowing manually constructed packets to be sent */ -void req_send_reply(struct request_context *req) +void req_send_reply(struct smbsrv_request *req) { req_sign_packet(req); @@ -288,7 +288,7 @@ void req_send_reply(struct request_context *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 req_reply_dos_error(struct request_context *req, uint8_t eclass, uint16_t ecode) +void req_reply_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) { @@ -304,7 +304,7 @@ void req_reply_dos_error(struct request_context *req, uint8_t eclass, uint16_t e /* setup the header of a reply to include an NTSTATUS code */ -void req_setup_error(struct request_context *req, NTSTATUS status) +void req_setup_error(struct smbsrv_request *req, NTSTATUS status) { if (!lp_nt_status_support() || !(req->smb_ctx->negotiate.client_caps & CAP_STATUS32)) { /* convert to DOS error codes */ @@ -332,7 +332,7 @@ void req_setup_error(struct request_context *req, NTSTATUS status) construct and send an error packet, then destroy the request auto-converts to DOS error format when appropriate */ -void req_reply_error(struct request_context *req, NTSTATUS status) +void req_reply_error(struct smbsrv_request *req, NTSTATUS status) { req_setup_reply(req, 0, 0); @@ -352,7 +352,7 @@ void req_reply_error(struct request_context *req, NTSTATUS status) if dest_len is -1 then no limit applies */ -size_t req_push_str(struct request_context *req, char *dest, const char *str, int dest_len, uint_t flags) +size_t req_push_str(struct smbsrv_request *req, char *dest, const char *str, int dest_len, uint_t flags) { size_t len; uint_t grow_size; @@ -397,7 +397,7 @@ size_t req_push_str(struct request_context *req, char *dest, const char *str, in append raw bytes into the data portion of the request packet return the number of bytes added */ -size_t req_append_bytes(struct request_context *req, +size_t req_append_bytes(struct smbsrv_request *req, const uint8_t *bytes, size_t byte_len) { req_grow_allocation(req, byte_len + req->out.data_size); @@ -409,7 +409,7 @@ size_t req_append_bytes(struct request_context *req, append variable block (type 5 buffer) into the data portion of the request packet return the number of bytes added */ -size_t req_append_var_block(struct request_context *req, +size_t req_append_var_block(struct smbsrv_request *req, const uint8_t *bytes, uint16_t byte_len) { req_grow_allocation(req, byte_len + 3 + req->out.data_size); @@ -434,7 +434,7 @@ size_t req_append_var_block(struct request_context *req, on failure zero is returned and *dest is set to NULL, otherwise the number of bytes consumed in the packet is returned */ -static size_t req_pull_ucs2(struct request_context *req, const char **dest, const char *src, int byte_len, uint_t flags) +static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const char *src, int byte_len, uint_t flags) { int src_len, src_len2, alignment=0; ssize_t ret; @@ -491,7 +491,7 @@ static size_t req_pull_ucs2(struct request_context *req, const char **dest, cons on failure zero is returned and *dest is set to NULL, otherwise the number of bytes consumed in the packet is returned */ -static size_t req_pull_ascii(struct request_context *req, const char **dest, const char *src, int byte_len, uint_t flags) +static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, const char *src, int byte_len, uint_t flags) { int src_len, src_len2; ssize_t ret; @@ -538,7 +538,7 @@ static size_t req_pull_ascii(struct request_context *req, const char **dest, con on failure zero is returned and *dest is set to NULL, otherwise the number of bytes consumed in the packet is returned */ -size_t req_pull_string(struct request_context *req, const char **dest, const char *src, int byte_len, uint_t flags) +size_t req_pull_string(struct smbsrv_request *req, const char **dest, const char *src, int byte_len, uint_t flags) { if (!(flags & STR_ASCII) && (((flags & STR_UNICODE) || (req->flags2 & FLAGS2_UNICODE_STRINGS)))) { @@ -558,7 +558,7 @@ size_t req_pull_string(struct request_context *req, const char **dest, const cha on failure *dest is set to the zero length string. This seems to match win2000 behaviour */ -size_t req_pull_ascii4(struct request_context *req, const char **dest, const char *src, uint_t flags) +size_t req_pull_ascii4(struct smbsrv_request *req, const char **dest, const char *src, uint_t flags) { ssize_t ret; @@ -587,7 +587,7 @@ size_t req_pull_ascii4(struct request_context *req, const char **dest, const cha return False if any part is outside the data portion of the packet */ -BOOL req_pull_blob(struct request_context *req, const char *src, int len, DATA_BLOB *blob) +BOOL req_pull_blob(struct smbsrv_request *req, const char *src, int len, DATA_BLOB *blob) { if (len != 0 && req_data_oob(req, src, len)) { return False; @@ -600,7 +600,7 @@ BOOL req_pull_blob(struct request_context *req, const char *src, int len, DATA_B /* check that a lump of data in a request is within the bounds of the data section of the packet */ -BOOL req_data_oob(struct request_context *req, const char *ptr, uint32_t count) +BOOL req_data_oob(struct smbsrv_request *req, const char *ptr, uint32_t count) { if (count == 0) { return False; @@ -620,7 +620,7 @@ BOOL req_data_oob(struct request_context *req, const char *ptr, uint32_t count) /* pull an open file handle from a packet, taking account of the chained_fnum */ -uint16_t req_fnum(struct request_context *req, const char *base, uint_t offset) +uint16_t req_fnum(struct smbsrv_request *req, const char *base, uint_t offset) { if (req->chained_fnum != -1) { return req->chained_fnum; diff --git a/source4/smb_server/search.c b/source4/smb_server/search.c index 40ea53c235..282f4bd1a3 100644 --- a/source4/smb_server/search.c +++ b/source4/smb_server/search.c @@ -57,7 +57,7 @@ /* a structure to encapsulate the state information about * an in-progress search first/next operation */ struct search_state { - struct request_context *req; + struct smbsrv_request *req; union smb_search_data *file; uint16_t last_entry_offset; }; @@ -65,7 +65,7 @@ struct search_state { /* fill a single entry in a search find reply */ -static void find_fill_info(struct request_context *req, +static void find_fill_info(struct smbsrv_request *req, union smb_search_data *file) { char *p = req->out.data + req->out.data_size; @@ -100,7 +100,7 @@ static BOOL find_callback(void *private, union smb_search_data *file) /**************************************************************************** Reply to a search. ****************************************************************************/ -void reply_search(struct request_context *req) +void reply_search(struct smbsrv_request *req) { union smb_search_first *sf; union smb_search_next *sn; @@ -176,7 +176,7 @@ void reply_search(struct request_context *req) /**************************************************************************** Reply to a fclose (async reply) ****************************************************************************/ -static void reply_fclose_send(struct request_context *req) +static void reply_fclose_send(struct smbsrv_request *req) { CHECK_ASYNC_STATUS; @@ -190,7 +190,7 @@ static void reply_fclose_send(struct request_context *req) /**************************************************************************** Reply to fclose (stop directory search). ****************************************************************************/ -void reply_fclose(struct request_context *req) +void reply_fclose(struct smbsrv_request *req) { union smb_search_next *sn; DATA_BLOB resume_key; diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c index 61cc8c718d..082a7d02da 100644 --- a/source4/smb_server/service.c +++ b/source4/smb_server/service.c @@ -135,7 +135,7 @@ static int find_service(const char *service) Make a connection, given the snum to connect to, and the vuser of the connecting user if appropriate. ****************************************************************************/ -static NTSTATUS make_connection_snum(struct request_context *req, +static NTSTATUS make_connection_snum(struct smbsrv_request *req, int snum, enum ntvfs_type type, DATA_BLOB password, const char *dev) @@ -208,7 +208,7 @@ static NTSTATUS make_connection_snum(struct request_context *req, * * @param service ****************************************************************************/ -static NTSTATUS make_connection(struct request_context *req, +static NTSTATUS make_connection(struct smbsrv_request *req, const char *service, DATA_BLOB password, const char *dev, uint16_t vuid) { @@ -274,7 +274,7 @@ void close_cnum(struct smbsrv_tcon *tcon) /* backend for tree connect call */ -NTSTATUS tcon_backend(struct request_context *req, union smb_tcon *con) +NTSTATUS tcon_backend(struct smbsrv_request *req, union smb_tcon *con) { NTSTATUS status; diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c index f438f84712..f766d9bd0f 100644 --- a/source4/smb_server/sesssetup.c +++ b/source4/smb_server/sesssetup.c @@ -26,7 +26,7 @@ /* setup the OS, Lanman and domain portions of a session setup reply */ -static void sesssetup_common_strings(struct request_context *req, +static void sesssetup_common_strings(struct smbsrv_request *req, char **os, char **lanman, char **domain) { (*os) = talloc_asprintf(req->mem_ctx, "Unix"); @@ -38,7 +38,7 @@ static void sesssetup_common_strings(struct request_context *req, /* handler for old style session setup */ -static NTSTATUS sesssetup_old(struct request_context *req, union smb_sesssetup *sess) +static NTSTATUS sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *sess) { NTSTATUS status; struct auth_usersupplied_info *user_info = NULL; @@ -86,7 +86,7 @@ static NTSTATUS sesssetup_old(struct request_context *req, union smb_sesssetup * /* handler for NT1 style session setup */ -static NTSTATUS sesssetup_nt1(struct request_context *req, union smb_sesssetup *sess) +static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *sess) { NTSTATUS status; struct auth_usersupplied_info *user_info = NULL; @@ -136,7 +136,7 @@ static NTSTATUS sesssetup_nt1(struct request_context *req, union smb_sesssetup * /* handler for SPNEGO style session setup */ -static NTSTATUS sesssetup_spnego(struct request_context *req, union smb_sesssetup *sess) +static NTSTATUS sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup *sess) { /* defer this one for now */ return NT_STATUS_INVALID_LEVEL; @@ -145,7 +145,7 @@ static NTSTATUS sesssetup_spnego(struct request_context *req, union smb_sesssetu /* backend for sessionsetup call - this takes all 3 variants of the call */ -NTSTATUS sesssetup_backend(struct request_context *req, +NTSTATUS sesssetup_backend(struct smbsrv_request *req, union smb_sesssetup *sess) { switch (sess->generic.level) { diff --git a/source4/smb_server/signing.c b/source4/smb_server/signing.c index 9fcd875e39..4765d9d6c3 100644 --- a/source4/smb_server/signing.c +++ b/source4/smb_server/signing.c @@ -23,7 +23,7 @@ /* mark the flags2 field in a packet as signed */ -static void mark_packet_signed(struct request_context *req) +static void mark_packet_signed(struct smbsrv_request *req) { uint16_t flags2; flags2 = SVAL(req->out.hdr, HDR_FLG2); @@ -51,7 +51,7 @@ static void calc_signature(uint8_t *buffer, size_t length, /* sign an outgoing packet */ -void req_sign_packet(struct request_context *req) +void req_sign_packet(struct smbsrv_request *req) { /* check if we are doing signing on this connection */ if (req->smb_ctx->signing.signing_state != SMB_SIGNING_REQUIRED) { @@ -90,7 +90,7 @@ void srv_setup_signing(struct smbsrv_context *smb_ctx, /* allocate a sequence number to a request */ -static void req_signing_alloc_seq_num(struct request_context *req) +static void req_signing_alloc_seq_num(struct smbsrv_request *req) { req->seq_num = req->smb_ctx->signing.next_seq_num; @@ -104,7 +104,7 @@ static void req_signing_alloc_seq_num(struct request_context *req) /* check the signature of an incoming packet */ -BOOL req_signing_check_incoming(struct request_context *req) +BOOL req_signing_check_incoming(struct smbsrv_request *req) { uint8_t client_md5_mac[8], signature[8]; diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 6fdfdb6097..b32cf5b7af 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -27,7 +27,7 @@ */ BOOL req_send_oplock_break(struct smbsrv_tcon *tcon, uint16_t fnum, uint8_t level) { - struct request_context *req; + struct smbsrv_request *req; req = init_smb_request(tcon->smb_ctx); @@ -57,11 +57,11 @@ BOOL req_send_oplock_break(struct smbsrv_tcon *tcon, uint16_t fnum, uint8_t leve /**************************************************************************** receive a SMB request from the wire, forming a request_context from the result ****************************************************************************/ -static struct request_context *receive_smb_request(struct smbsrv_context *smb_ctx) +static struct smbsrv_request *receive_smb_request(struct smbsrv_context *smb_ctx) { ssize_t len, len2; char header[4]; - struct request_context *req; + struct smbsrv_request *req; len = read_data(smb_ctx->socket.fd, header, 4); if (len != 4) { @@ -116,7 +116,7 @@ static struct request_context *receive_smb_request(struct smbsrv_context *smb_ct /* setup the user_ctx element of a request */ -static void setup_user_context(struct request_context *req) +static void setup_user_context(struct smbsrv_request *req) { struct smbsrv_user *user_ctx; @@ -150,7 +150,7 @@ force write permissions on print services. static const struct smb_message_struct { const char *name; - void (*fn)(struct request_context *); + void (*fn)(struct smbsrv_request *); int flags; } smb_messages[256] = { @@ -433,7 +433,7 @@ for sending the reply themselves, rather than returning a size to this function The reply functions may also choose to delay the processing by pushing the message onto the message queue ****************************************************************************/ -static void switch_message(int type, struct request_context *req) +static void switch_message(int type, struct smbsrv_request *req) { int flags; uint16_t session_tag; @@ -548,7 +548,7 @@ static void switch_message(int type, struct request_context *req) /**************************************************************************** Construct a reply to the incoming packet. ****************************************************************************/ -static void construct_reply(struct request_context *req) +static void construct_reply(struct smbsrv_request *req) { uint8_t type = CVAL(req->in.hdr,HDR_COM); @@ -596,7 +596,7 @@ static void construct_reply(struct request_context *req) we call this when first first part of a possibly chained request has been completed and we need to call the 2nd part, if any */ -void chain_reply(struct request_context *req) +void chain_reply(struct smbsrv_request *req) { uint16_t chain_cmd, chain_offset; char *vwv, *data; @@ -782,7 +782,7 @@ void open_sockets_smbd(struct event_context *events, void smbd_read_handler(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags) { - struct request_context *req; + struct smbsrv_request *req; struct smbsrv_context *smb_ctx = fde->private; req = receive_smb_request(smb_ctx); @@ -806,7 +806,7 @@ void smbd_read_handler(struct event_context *ev, struct fd_event *fde, */ void smbd_process_async(struct smbsrv_context *smb_ctx) { - struct request_context *req; + struct smbsrv_request *req; req = receive_smb_request(smb_ctx); if (!req) { diff --git a/source4/smb_server/trans2.c b/source4/smb_server/trans2.c index 738247b713..0ab1ca0b7c 100644 --- a/source4/smb_server/trans2.c +++ b/source4/smb_server/trans2.c @@ -32,7 +32,7 @@ /* grow the data allocation size of a trans2 reply - this guarantees that requests to grow the data size later will not change the pointer */ -static void trans2_grow_data_allocation(struct request_context *req, +static void trans2_grow_data_allocation(struct smbsrv_request *req, struct smb_trans2 *trans, uint16_t new_size) { @@ -44,7 +44,7 @@ static void trans2_grow_data_allocation(struct request_context *req, /* grow the data size of a trans2 reply */ -static void trans2_grow_data(struct request_context *req, +static void trans2_grow_data(struct smbsrv_request *req, struct smb_trans2 *trans, uint16_t new_size) { @@ -53,7 +53,7 @@ static void trans2_grow_data(struct request_context *req, } /* grow the data, zero filling any new bytes */ -static void trans2_grow_data_fill(struct request_context *req, +static void trans2_grow_data_fill(struct smbsrv_request *req, struct smb_trans2 *trans, uint16_t new_size) { @@ -66,7 +66,7 @@ static void trans2_grow_data_fill(struct request_context *req, /* setup a trans2 reply, given the data and params sizes */ -static void trans2_setup_reply(struct request_context *req, +static void trans2_setup_reply(struct smbsrv_request *req, struct smb_trans2 *trans, uint16_t param_size, uint16_t data_size, uint16_t setup_count) @@ -83,7 +83,7 @@ static void trans2_setup_reply(struct request_context *req, /* pull a string from a blob in a trans2 request */ -static size_t trans2_pull_blob_string(struct request_context *req, +static size_t trans2_pull_blob_string(struct smbsrv_request *req, const DATA_BLOB *blob, uint16_t offset, const char **str, @@ -107,7 +107,7 @@ static size_t trans2_pull_blob_string(struct request_context *req, push a string into the data section of a trans2 request return the number of bytes consumed in the output */ -static size_t trans2_push_data_string(struct request_context *req, +static size_t trans2_push_data_string(struct smbsrv_request *req, struct smb_trans2 *trans, uint16_t len_offset, uint16_t offset, @@ -176,7 +176,7 @@ static size_t trans2_push_data_string(struct request_context *req, len_offset points to the place in the packet where the length field should go */ -static void trans2_append_data_string(struct request_context *req, +static void trans2_append_data_string(struct smbsrv_request *req, struct smb_trans2 *trans, const WIRE_STRING *str, uint_t len_offset, @@ -196,7 +196,7 @@ static void trans2_append_data_string(struct request_context *req, /* trans2 qfsinfo implementation */ -static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_qfsinfo(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_fsinfo fsinfo; NTSTATUS status; @@ -391,7 +391,7 @@ static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *t /* fill in the reply from a qpathinfo or qfileinfo call */ -static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_trans2 *trans, +static NTSTATUS trans2_fileinfo_fill(struct smbsrv_request *req, struct smb_trans2 *trans, union smb_fileinfo *st) { uint_t i; @@ -614,7 +614,7 @@ static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_tra /* trans2 qpathinfo implementation */ -static NTSTATUS trans2_qpathinfo(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_qpathinfo(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_fileinfo st; NTSTATUS status; @@ -654,7 +654,7 @@ static NTSTATUS trans2_qpathinfo(struct request_context *req, struct smb_trans2 /* trans2 qpathinfo implementation */ -static NTSTATUS trans2_qfileinfo(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_qfileinfo(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_fileinfo st; NTSTATUS status; @@ -690,7 +690,7 @@ static NTSTATUS trans2_qfileinfo(struct request_context *req, struct smb_trans2 /* parse a trans2 setfileinfo/setpathinfo data blob */ -static NTSTATUS trans2_parse_sfileinfo(struct request_context *req, +static NTSTATUS trans2_parse_sfileinfo(struct smbsrv_request *req, union smb_setfileinfo *st, const DATA_BLOB *blob) { @@ -786,7 +786,7 @@ static NTSTATUS trans2_parse_sfileinfo(struct request_context *req, /* trans2 setfileinfo implementation */ -static NTSTATUS trans2_setfileinfo(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_setfileinfo(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_setfileinfo st; NTSTATUS status; @@ -824,7 +824,7 @@ static NTSTATUS trans2_setfileinfo(struct request_context *req, struct smb_trans /* trans2 setpathinfo implementation */ -static NTSTATUS trans2_setpathinfo(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_setpathinfo(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_setfileinfo st; NTSTATUS status; @@ -863,7 +863,7 @@ static NTSTATUS trans2_setpathinfo(struct request_context *req, struct smb_trans /* a structure to encapsulate the state information about an in-progress ffirst/fnext operation */ struct find_state { - struct request_context *req; + struct smbsrv_request *req; struct smb_trans2 *trans; enum search_level level; uint16_t last_entry_offset; @@ -873,7 +873,7 @@ struct find_state { /* fill a single entry in a trans2 find reply */ -static void find_fill_info(struct request_context *req, +static void find_fill_info(struct smbsrv_request *req, struct smb_trans2 *trans, struct find_state *state, union smb_search_data *file) @@ -1069,7 +1069,7 @@ static BOOL find_callback(void *private, union smb_search_data *file) /* trans2 findfirst implementation */ -static NTSTATUS trans2_findfirst(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_findfirst(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_search_first search; NTSTATUS status; @@ -1129,7 +1129,7 @@ static NTSTATUS trans2_findfirst(struct request_context *req, struct smb_trans2 /* trans2 findnext implementation */ -static NTSTATUS trans2_findnext(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_findnext(struct smbsrv_request *req, struct smb_trans2 *trans) { union smb_search_next search; NTSTATUS status; @@ -1188,7 +1188,7 @@ static NTSTATUS trans2_findnext(struct request_context *req, struct smb_trans2 * /* backend for trans2 requests */ -static NTSTATUS trans2_backend(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans2_backend(struct smbsrv_request *req, struct smb_trans2 *trans) { if (req->tcon->ntvfs_ops->trans2 != NULL) { /* direct trans2 pass thru */ @@ -1226,7 +1226,7 @@ static NTSTATUS trans2_backend(struct request_context *req, struct smb_trans2 *t /* backend for trans requests */ -static NTSTATUS trans_backend(struct request_context *req, struct smb_trans2 *trans) +static NTSTATUS trans_backend(struct smbsrv_request *req, struct smb_trans2 *trans) { if (!req->tcon->ntvfs_ops->trans) { return NT_STATUS_NOT_IMPLEMENTED; @@ -1238,7 +1238,7 @@ static NTSTATUS trans_backend(struct request_context *req, struct smb_trans2 *tr /**************************************************************************** Reply to an SMBtrans or SMBtrans2 request ****************************************************************************/ -void reply_trans_generic(struct request_context *req, uint8_t command) +void reply_trans_generic(struct smbsrv_request *req, uint8_t command) { struct smb_trans2 trans; int i; @@ -1391,7 +1391,7 @@ void reply_trans_generic(struct request_context *req, uint8_t command) /**************************************************************************** Reply to an SMBtrans2 ****************************************************************************/ -void reply_trans2(struct request_context *req) +void reply_trans2(struct smbsrv_request *req) { reply_trans_generic(req, SMBtrans2); } @@ -1399,7 +1399,7 @@ void reply_trans2(struct request_context *req) /**************************************************************************** Reply to an SMBtrans ****************************************************************************/ -void reply_trans(struct request_context *req) +void reply_trans(struct smbsrv_request *req) { reply_trans_generic(req, SMBtrans); } @@ -1407,7 +1407,7 @@ void reply_trans(struct request_context *req) /**************************************************************************** Reply to an SMBtranss2 request ****************************************************************************/ -void reply_transs2(struct request_context *req) +void reply_transs2(struct smbsrv_request *req) { req_reply_error(req, NT_STATUS_FOOBAR); } |