1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-09 20:59:11 +03:00
Commit Graph

294 Commits

Author SHA1 Message Date
6abd986704 Convert all uses of uint8/16/32 to _t in source3/smbd.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-06 04:14:14 +02:00
4b9f17eca7 s3:smbd: pass smbXsrv_connection to srv_send_smb()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-19 09:15:11 +02:00
b32b5fe66e s3:smbd: use req->xconn in send_trans_reply()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-06 09:51:13 +02:00
7cf7fd77f7 s3:smbd: move sconn->smb1.sessions.* to xconn->smb1.sessions.*
This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-06 09:51:11 +02:00
2ec49cf57c s3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c
We're now sure that sconn->smb1.sessions.max_send is >= SMB_BUFFER_SIZE_MIN.
in order to garantee some progress we need to make sure our assumed
header overhead is less than SMB_BUFFER_SIZE_MIN.

Assuming 372 bytes for the SMBtrans headers should still be more than
enough.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05 10:06:24 -08:00
faa8edccef s3:smbd: make use of smbXsrv_tcon for smb1
Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze
2012-06-25 20:55:06 +02:00
612838dca8 s3:smbd: pass down vuid as uint64_t in ipc.c
metze
2012-06-06 10:18:41 +02:00
37bfadf4a3 s3:include: change files_struct->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
d595d2e5af s3:smbd: use nt_status_np_pipe for smb1
metze
2012-05-23 20:03:08 +02:00
d869f0260c s3:smbd: add nt_status_np_pipe()
This mapps between NT_STATUS_CONNECTION_* to NT_STATUS_PIPE_*

metze
2012-05-23 20:03:08 +02:00
e7a100200b s3:smbd/pipes: avoid passing server_event_context() as event context to np_{read,write}_send
metze
2011-12-12 14:35:43 +01:00
c7286f159a s3:smbd/ipc: pass 'state' as mem_ctx to np_read_send()
metze
2011-12-12 14:35:43 +01:00
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
e5dd03d199 s3-globals Remove smbd_event_context() (use server_event_context())
This has been a wrapper around server_event_context() for some time
now, and removing this from dummmysmbd.c assists with library
dependencies.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
4f41be356a Fix many const compiler warnings. 2011-05-05 10:41:59 -07:00
047d8c073b s3-proto: move more rpc_server prototypes out of proto.h
Guenther
2011-05-02 15:03:43 +02:00
165521e20d s3: only include smb profiling where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
2011-04-14 01:31:39 +02:00
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
1808dd0a85 s3: Make srv_send_smb take an sconn instead of a sock fd 2010-08-24 21:06:41 +02:00
e34c5e235d s3: Remove smbd_server_fd from api_dcerpc_cmd_read/write_done 2010-08-16 22:39:16 +02:00
215d803cdb s3: Remove smbd_server_fd from send_trans_reply 2010-08-16 22:39:16 +02:00
ad871b73a2 s3: Fix some error messages 2010-08-13 22:53:06 +02:00
f437f12d3e s3: Remove smbd_server_conn from send_trans_reply 2010-06-12 15:42:53 +02:00
56ebbb53c8 s3:smbd: add PIPE_BUSY handling for SMBtrans calls on named pipes
metze
2010-05-27 07:13:55 +02:00
8ddc977c14 Fix bug #7122 - Reading a large browselist fails (server returns invalid values in subsequent SMBtrans replies)
There are two problems:

1). The server is off-by-one in the end of buffer space test.
2). The server returns 0 in the totaldata (smb_vwv1) and totalparams (smb_vwv0)
fields in the second and subsequent SMBtrans replies.

This patch fixes both.

Jeremy.
2010-02-09 15:14:38 -08:00
c54e6b19e3 s3:smbd: add a smbd_server_connection pointer to connection_struct
This can be NULL for faked connection structs used in the rpc server
or printing code.

metze
2009-08-07 14:18:14 +02:00
5a8d70d465 s3: Change fsp->fsp_name to be an smb_filename struct! 2009-07-20 17:26:56 -07:00
c862018008 s3:smbd: move tcon specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:38 +02:00
356f0336e5 s3:smbd: move some session specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:37 +02:00
3b0572bf91 Fix smbd crash for close_on_completion
handle_trans() can talloc_free "conn" if the client requests
close_on_completion. "state" is a talloc_child of conn, so it will be gone when
we later free state->data et al.
2009-04-05 14:34:14 +02:00
c16c90a1cb s3:smbd: use new simplified snb_signing code in the server
We keep the seqnum/mid mapping in the smb_request structure.

This also moves one global variable into the
smbd_server_connection struct.

metze
2009-03-23 12:21:13 +01:00
bce98d8c03 Convert np_read to tevent_req 2009-03-17 17:31:22 +01:00
89543d6c78 Convert np_write to tevent_req 2009-03-17 17:31:22 +01:00
54c51a66e3 S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
2009-02-09 13:23:44 -08:00
c2fe28ba59 Convert api_rpc_trans_reply to async np_* 2009-01-31 17:50:18 +01:00
b8b6cddb29 Remove some smb fsp knowledge from rpc_server/
np_open/read/write don't have to know about files_struct
2009-01-20 16:41:14 +01:00
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
2719216d60 Consolidate the buffer checks for the reply_trans style functions
This is the one where I found the problem that led to 3.2.5. So if there is one
checkin in the last year that I would like others to review and *understand*,
it is this one :-)

Volker
2008-11-28 09:22:34 +01:00
9da3101e44 Remove the variable "size" from reply_trans
This converts the range checks for the setup[] array to rely on req->wct being
set correctly in init_smb_request. As that already verifies the vwv array to be
in the range of the smb_request inbuf, we don't have to do overflow checks here
anymore.

Jeremy, please check thoroughly! :-)

Thanks,

Volker
2008-11-28 08:23:46 +01:00
114f519233 Fix the offset checks in the trans routines
This fixes a potential crash bug, a client can make us read memory we
should not read. Luckily I got the disp checks right...

Volker
(cherry picked from commit 64a1d80851)
(cherry picked from commit f04c5650a3)
2008-11-27 17:19:01 +01:00
8315677ca3 Do not write into inbuf for the transs request
Instead, fix up the outbuf in send_xx_reply. In those routines, we know
what we are returning.
2008-11-08 10:42:29 +01:00
7a35506bb8 Remove direct inbuf refs from send_trans_reply 2008-11-08 10:42:29 +01:00
c2a280ac63 Pass smb_request to send_trans_reply to match with send_[nt]trans[2]_reply 2008-11-02 21:20:41 +01:00
77f52d903f Use "vwv" in trans parsing 2008-11-02 17:46:08 +01:00
2bab73a18d Remove a bunch of direct inbuf references by adding "vwv" to smb_request 2008-11-02 16:58:19 +01:00
a31fab8156 Simplify params of srvstr_pull_buf_talloc()
Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc()
to srvstr_pull_req()
2008-11-02 09:22:40 +01:00
7bdb571ec4 Remove a bunch of direct inbuf references by adding "buf" to smb_request 2008-11-01 19:41:08 +01:00
ac126ea818 Use "struct files_struct" for pipes instead of smb_np_struct 2008-10-13 20:59:32 +02:00