1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

342 Commits

Author SHA1 Message Date
Stefan Metzmacher
6d1757f189 s3:libsmb: make use of cli_state_disconnect()
metze
2011-07-22 17:06:07 +02:00
Stefan Metzmacher
a11cc880ef s3:libsmb: move cli_state->outgoing to cli_state->conn.outgoing
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul 22 09:53:59 CEST 2011 on sn-devel-104
2011-07-22 09:53:59 +02:00
Stefan Metzmacher
9f2b3b0be6 s3:libsmb: move cli_state->pending to cli_state->conn.pending
metze
2011-07-22 08:44:08 +02:00
Stefan Metzmacher
b94a7caa3a s3:libsmb: fix compiler warnings in cli_state_create()
metze
2011-07-22 08:44:08 +02:00
Stefan Metzmacher
ebe258dd40 s3:libsmb: replace cli_initialise[_ex]() by cli_state_create()
This makes sure cli_state->src_ss and cli_state->dest_ss are always
initialized.

metze
2011-07-21 22:08:53 +02:00
Stefan Metzmacher
25447a528a s3:libsmb: move cli->vuid to cli->smb1.uid and hide it behind cli_state_[g|s]et_uid()
metze
2011-07-21 22:08:52 +02:00
Stefan Metzmacher
c70103f3f8 s3:libsmb: add cli_state_encryption_on()
metze
2011-07-21 22:08:51 +02:00
Stefan Metzmacher
8f41e54d53 s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
2011-07-20 15:56:27 +02:00
Stefan Metzmacher
1e3822115c s3:libsmb: move cli->pid to cli->smb1.pid and hide it behind cli_[g|s]etpid()
metze
2011-07-20 15:55:08 +02:00
Stefan Metzmacher
9fb7e228f5 s3:libsmb: add cli->smb1.vc_num and hide it behind cli_state_get_vc_num()
This makes it clearer, why we send the pid value in the session setup.

metze
2011-07-20 15:54:31 +02:00
Stefan Metzmacher
6c31b610e4 s3:libsmb: move cli->mid to cli->smb1.mid
metze
2011-07-20 15:48:59 +02:00
Stefan Metzmacher
8a234cbe15 s3:libsmb: remove unused cli_oplock_handler()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 10:53:52 CEST 2011 on sn-devel-104
2011-07-12 10:53:52 +02:00
Stefan Metzmacher
2b70c0f4f3 s3:libsmb: remove unused cli_set_port()
metze
2011-07-11 16:39:15 +02:00
Stefan Metzmacher
d6cd1ee032 s3:libsmb: remove unused cli->inbuf and cli->bufsize
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul  8 15:21:46 CEST 2011 on sn-devel-104
2011-07-08 15:21:46 +02:00
Stefan Metzmacher
235aedae50 s3:libsmb: don't use the cli->inbuf to store the last error
We keep the raw error in cli->raw_status now, until we fixed all
caller to get the NTSTATUS from the function calls.

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
2c160224c2 s3:libsmb: don't call cli_set_error() in cli_echo()
cli_smb_recv() already does it.

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
f0e6e5c37d s3:libsmb: remove unused enum smb_read_errors infrastructure
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
3cdf962d1e s3:libsmb: finally remove unused cli_state->outbuf
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
fdfb5e95fe s3:libsmb: remove unused cli_state_seqnum infrastructure
metze

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jun 10 20:37:54 CEST 2011 on sn-devel-104
2011-06-10 20:37:54 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Volker Lendecke
df0e33008e s3: Remove cli_send/receive_smb
A moment of silence is due here, R.I.P.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun May 22 22:17:12 CEST 2011 on sn-devel-104
2011-05-22 22:17:12 +02:00
Volker Lendecke
dca321f62b s3: Remove unused cli_setup_bcc
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 21 21:24:13 CEST 2011 on sn-devel-104
2011-05-21 21:24:13 +02:00
Volker Lendecke
d432c7e278 s3: Remove unused cli_setup_packet()
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri May 20 10:51:36 CEST 2011 on sn-devel-104
2011-05-20 10:51:36 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Volker Lendecke
ca9ac7c4c7 s3: Remove cli_write
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-26 12:22:55 -07:00
Andrew Bartlett
1923b78209 s3-lib Remove the clobber_region() code.
This code wrote to the full buffer in fstrcpy(), pstrcpy() and other
fixed-length string manipulation functions.

The hope of this code was to find out at run time if we were mixing up
pstring and fstring etc, and to record where this came from.  It has a
runtime performance impact (particularly if compiled with
--enable-developer).

It is being removed because of the complexity it adds, and the
distinct lack of bugs that this complexity has been credited in
finding.

The macro-based compile-time checking of string sizes remains.

Andrew Bartlett
2011-03-23 12:49:39 +11:00
Andrew Bartlett
243abcb0af s3-build __FUNCTION__ is always available, always use it
This avoids duplication between FUNCTION_NAME and __FUNCTION__
2011-03-01 02:13:22 +01:00
Christian Ambach
051611256b s3:libsmb only log a dead connection if it was not closed
in case the cli was closed before (e.g. via a dropped ip message)
it can be expected that the read here returns with an error and so
we should not log that a connection is dead when it was closed before

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb 23 16:51:03 CET 2011 on sn-devel-104
2011-02-23 16:51:03 +01:00
Volker Lendecke
7b054ecaed s3: Make passing up "result_parent" from cli_smb optional 2011-01-17 08:03:43 +01:00
Volker Lendecke
b33f1147a6 s3: Remove unused cli_send_keepalive 2011-01-17 08:03:42 +01:00
Günther Deschner
c7fe04abc7 s3-build: only include async headers where needed.
Guenther
2010-09-20 13:54:42 -07:00
Volker Lendecke
5b875a83a9 s3: Print the IP of the server that stopped responding 2010-09-01 12:57:16 +02:00
Günther Deschner
59289d4fa9 s3-build: only include smb_signing.h where needed.
Guenther
2010-08-18 09:20:13 +02:00
Volker Lendecke
08b628efe4 s3: Remove some unused code 2010-08-15 15:15:59 +02:00
Stefan Metzmacher
47e10ab9a8 s3:libsmb: don't let cli_shutdown() segfault with a NULL cli_state
metze
2010-03-29 18:11:14 +02:00
Volker Lendecke
1fab94a31b s3: Explicitly handle inbuf in cli_echo_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
d122bfc064 s3: Add a talloc_move for the inbuf to cli_smb_recv 2010-02-22 23:23:18 +01:00
Volker Lendecke
89e6a5263e s3: Add cli_smb()
This is a sync wrapper around cli_smb_send/cli_smb_recv. This is a hack to
speed up converting libsmb/ away from cli_send_smb/cli_receive_smb. Some
routines in libsmb/ are only called in one place in smbtorture for example,
where making it async right now is not worth it. With cli_smb_send/cli_smb_recv
in place, pushing the asynchronosity out one level is "just" boilerplate code
that is easy to do should it become necessary.
2010-02-20 18:59:29 +01:00
Andrew Tridgell
d550621561 s3-libsmb: update libsmb to use new DLIST macros
manipulating p->prev directly is not safe any more
(cherry picked from commit 3c650ac1e3e1cdbbabecfddcd29325f20b5dcb48)
2010-02-10 15:38:48 -08:00
Jeremy Allison
43c766a14a Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
2009-09-06 21:38:50 -07:00
Jeremy Allison
ad9d64ee1b Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
Jeremy.
2009-05-12 11:45:37 -07:00
Jeremy Allison
8cf78ff553 Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
2009-04-30 15:26:43 -07:00
Volker Lendecke
dec928e884 Convert cli_echo to tevent_req 2009-04-06 21:32:06 +02:00
Volker Lendecke
8bdac3615a Add new async libsmb infrastructure
I know this is just yet another iteration, but I like this one much better than
the one that exists right now :-)

It will do trans and echo requests without a _recv helper and without
unnecessary memcpy().
2009-04-06 21:32:06 +02:00
Stefan Metzmacher
6af15943c6 s3:libsmb: use new simplified smb_signing code for the client side
We store the seqnum/mid mapping in the cli_request structure
for async requests and in the cli_state structure for sync calls.

We skip the signing check for oplock requests while waiting
for async requests coming in.

metze
2009-03-23 12:21:14 +01:00
Volker Lendecke
8afd835cea Fix a malloc/talloc mismatch when cli_initialise() fails 2009-03-15 12:01:20 +01:00
Jeremy Allison
f48a345e4a Remove pwd_cache.c, it was doing nothing. Make user_name, domain, and
password talloc'ed strings within the cli_struct.
Jeremy.
2009-03-13 17:49:24 -07:00
Jeremy Allison
e5136e9849 Remove the static "struct client_connection" mess which is part of
the problem that stops libsmbclient being thread safe. Subsidiary
DFS connections are now hung off a list inside the cli_state struct.
Much more to do in order to get libsmbclient to thread safety, but
this is a good start.
Jeremy.
2009-03-12 17:59:24 -07:00
Stefan Metzmacher
3f3e15ab91 s3:libsmb: merge cli_setup_signing_state() into cli_initialise_ex()
metze
2009-03-06 16:37:22 +01:00