1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

273 Commits

Author SHA1 Message Date
Stefan Metzmacher
f07274978a s4:libcli/smb2: s/SMB_SIGNING_SUPPORTED/SMB_SIGNING_IF_REQUIRED/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
01ccd59ce0 s4:libcli/smb2: remove unused SMB_SIGNING_AUTO handling
metze
2011-11-03 16:55:11 +01:00
Stefan Metzmacher
22902ef9b8 s4:libcli/smb2: SMB_SIGNING_DEFAULT matches SMB_SIGNING_SUPPORTED on the client for now
metze
2011-11-03 16:55:11 +01:00
Stefan Metzmacher
f293438abd s4:libcli/smb2: let SMB_SIGNING_AUTO behave like SMB_SIGNING_SUPPORTED
This matches the smb1 behavior.

metze
2011-11-03 16:55:11 +01:00
Michael Adam
530cd2aac6 s4:libcli: in smb2_create_recv, map SMB2_CREATE_DURABLE_HANDLE_RESPONSE buffer smb2_create.out.durable_open 2011-10-30 18:41:22 +01:00
Andreas Schneider
7b5fb7d9e8 replace: Add don't include unistd.h directly and add uid_wrapper. 2011-10-27 13:32:02 +02:00
Stefan Metzmacher
8574d509a9 s4:libcli/smb2: make use of _smb_setlen_tcp()
metze
2011-10-19 15:44:29 +02:00
Andrew Bartlett
e7d5f0a357 gensec: move event context from gensec_*_init() to gensec_update()
This avoids keeping the event context around on a the gensec_security
context structure long term.

In the Samba3 server, the event context we either supply is a NULL
pointer as no server-side modules currently use the event context.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:33 +11:00
Stefan Metzmacher
1f4bf0fb0f s4:libcli/smb2: ignore SMB2_OP_CANCEL responses
If there're a problem with signing or the session doesn't exists
any more the server responses with a failure, instead of not
sending a response.

For now we ignore the reponse, as there's not much we could do with it
and it's not likely that we generate bad requests, which trigger
that behavior, except for testing.

metze
2011-09-28 17:29:12 +02:00
Stefan Metzmacher
caef1c7d21 s4:libcli/smb2: correctly sign SMB2_OP_CANCEL request if they belong to a session
metze
2011-09-28 17:29:11 +02:00
Stefan Metzmacher
28b48f8498 s4:libcli/smb2: don't try to check the signing if we got NT_STATUS_USER_SESSION_DELETED
metze
2011-09-28 17:29:11 +02:00
Jelmer Vernooij
9ee1e1f0ac cli-raw: Add public libsmbclient-raw library. 2011-08-18 14:19:18 +02:00
Simo Sorce
ab81505e08 s4:libcli: use tevent_ fn names instead of legacy event_ ones 2011-08-13 09:54:15 -04:00
Andrew Bartlett
af5f494bd2 build: provide tevent-util as a public library
This is needed so that OpenChange can get at _tevent_req_nterr(), which is referenced
by generated PIDL output.

Andrew Bartlett
2011-08-08 13:34:06 +02:00
Andrew Bartlett
35b309fa0c gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett
2011-08-03 18:48:02 +10:00
Jelmer Vernooij
7524413751 cli_raw: Make name lowercase.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jul 23 23:20:51 CEST 2011 on sn-devel-104
2011-07-23 23:20:51 +02:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Stefan Metzmacher
01cb5984ac s4:libcli/smb2: let smb2_session_setup_spnego_* use tevent_req
metze
2011-04-28 20:36:03 +02:00
Stefan Metzmacher
6cb7d764d3 s4:libcli/smb2: move smb2_session_setup_spnego_send() to the top
smb2_session_setup_spnego_send() should be on the top of
the smb2_session_setup_spnego_* block.

metze
2011-04-28 20:36:01 +02:00
Stefan Metzmacher
8116b19a28 s4:libcli/smb2: move smb2_connect_tcon_done()
It should be after smb2_connect_session_done().

metze
2011-04-28 20:35:59 +02:00
Stefan Metzmacher
eb0eb971ca s4:libcli/smb2: move smb2_connect_session_done()
It should be after smb2_connect_negprot_done().

metze
2011-04-28 20:35:57 +02:00
Stefan Metzmacher
ad65cf5b6a s4:libcli/smb2: move smb2_connect_negprot_done()
It should be after smb2_connect_socket_done().

metze
2011-04-28 20:35:56 +02:00
Stefan Metzmacher
1b4a167354 s4:libcli/smb2: move smb2_connect_socket_done()
It should be after smb2_connect_resolve_done().

metze
2011-04-28 20:35:54 +02:00
Stefan Metzmacher
87d2537b48 s4:libcli/smb2: move smb2_connect_resolve_done()
It should be after smb2_connect_send().

metze
2011-04-28 20:35:52 +02:00
Stefan Metzmacher
2e5b539ba9 s4:libcli/smb2: rename step functions of smb2_connect_*()
They should all start with a smb2_connect_ prefix.

metze
2011-04-28 20:35:51 +02:00
Stefan Metzmacher
578cbf1139 s4:libcli/smb2: convert smb2_connect_*() to tevent_req
metze
2011-04-28 20:35:49 +02:00
Jeremy Allison
0c5214e2eb Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-29 21:01:49 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Steven Danneman
bf1a4b2bc4 s4:libcli:smb2 Rename pending_id to async_id and make 64-bit
Match MS-SMB2 - 2.2.1.1   SMB2 Packet Header - ASYNC
2010-09-22 17:52:53 -07:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Andrew Tridgell
b4ea96ecd9 s4-libcli: use GUID_to_ndr_blob() 2009-12-10 17:51:28 +11:00
Andrew Tridgell
498f2b879a s4-libcli: use new GUID functions in libcli 2009-12-10 17:51:26 +11:00
Zack Kirsch
8ceb428c55 s4 torure: Add SMB2 utility functions
- Add a torture_setup_dir() equivalent in SMB2, called smb2_util_setup_dir().
- Add verify_sd() and verify_attrib() helper functions for SMB2.
2009-12-07 16:54:16 -08:00
Steven Danneman
7f14388721 s4/libcli: rename previously reserved field in SMB2 LOCK struct
The lock.in.reserved field has been renamed lock_sequence in the
SMB 2.1 dialect.  See MS-SMB 2.2.26.
2009-11-25 12:55:48 -08:00
Steven Danneman
65a611ec72 s4/libcli: Initialize client PID for SMB2 connections
Set the SMB pid to the Unix pid of the client process.
2009-11-25 12:55:47 -08:00
Steven Danneman
1160d68062 s4/torture: Ported SMB oplock torture tests to SMB2
I've ported all applicable SMB oplock torture tests to SMB2, giving us
a good base for SMB2 oplock testing.

There are several differences between oplocks in SMB and SMB2, mostly
because of differences in W2K3 and W2K8.  The existing SMB oplock
tests all pass against W2K3, but several fail against W2K8.  These
same tests were failing in SMB2, util I reworked them.

BATCH19, BATCH20: In W2K3/SMB a setfileinfo - rename command wouldn't
cause a sharing violation or break an existing oplock.  It appears that
in W2K8/SMB2 a sharing violation is raised.

BATCH22: In W2K3/SMB when a second opener was waiting the full timeout
of an oplock break, it would receive NT_STATUS_SHARING_VIOLATION after
about 35 seconds.  This bug has been fixed in W2K8/SMB2 and instead
the second opener succeeds.

LEVELII500: Added 1 new test checking that the server returns a proper
error code when a client improperly replies to a levelII to none break
notification.

STREAM1: W2K8 now grants oplocks on alternate data streams.
2009-10-01 14:59:52 -07:00
Andrew Tridgell
92786aebf1 s4-resolve: fixed a crash bug on timeout
We were creating the name resolution context as a child of lp_ctx,
which meant when we gave up on a connection the timer on name
resolution kept running, and when it timed out the callback crashed as
the socket was already removed.
2009-09-19 08:23:03 -07:00
Stefan Metzmacher
1d75a6e224 libcli/smb: move smb2_create_blob code to libcli/smb/
I want to use this in source3/smbd/

metze
2009-08-12 19:22:06 +02:00
Stefan Metzmacher
1df883aa39 libcli: move some common SMB and SMB2 stuff into libcli/smb/
This will hold code that's shared between source3 and source4.

metze
2009-08-12 18:28:32 +02:00
Stefan Metzmacher
aef96af916 s4:libcli/smb2: move SMB2_GETINFO_* flags into smb2_constants.h
metze
2009-08-07 14:56:23 +02:00
Stefan Metzmacher
acbb9da530 s4:libcli/smb2: remove unused and redundant SMB2 security flags
metze
2009-08-07 14:56:23 +02:00
Stefan Metzmacher
c2c4d489b6 s4:libcli: move SMB2 Find constants to smb2_constants.h
metze
2009-08-07 14:56:22 +02:00
Andrew Tridgell
ddd13c6816 handle large directories in smb2_deltree() 2009-08-05 15:05:13 +10:00
Stefan Metzmacher
da737f2447 s4:libcli/smb2: add smb2_transport_credits_set_charge() to change the CreditsCharge value for the next request
metze
2009-07-15 10:57:32 +02:00
Stefan Metzmacher
c281638bc4 s4:libcli: move SMB2 lock flags to smb2_constants.h
metze
2009-07-02 22:25:49 +02:00