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

9730 Commits

Author SHA1 Message Date
Andrew Bartlett
003e2ab93c r17222: Change the function prototypes for the GENSEc and TLS socket creation
routines to return an NTSTATUS.  This should help track down errors.

Use a bit of talloc_steal and talloc_unlink to get the real socket to
be a child of the GENSEC or TLS socket.

Always return a new socket, even for the 'pass-though' case.

Andrew Bartlett
2007-10-10 14:10:20 -05:00
Andrew Bartlett
7c5a25a423 r17221: Add some integer wrap parinoia to data_blob_append().
Andrew Bartlett
2007-10-10 14:10:20 -05:00
Andrew Bartlett
83dd22accf r17215: Prepare the SASL socket before actually settting it. This allows
errors to be reported corectly, rather than just dropping the socket.

Andrew Bartlett
2007-10-10 14:10:19 -05:00
Simo Sorce
e0af5cf51d r17210: I wonder how I missed this, build farm caught it. 2007-10-10 14:10:19 -05:00
Simo Sorce
15b8fafb99 r17209: Add dependency over the new share configuration module into smbd
Should fix some build farm machine
2007-10-10 14:10:19 -05:00
Simo Sorce
d4c2b89350 r17208: Add a away to test the ldb module.
Actually you can't test both classic and ldb together, but you can replace the standard
script/tests/mktestsetup.sh file with this one and run make test to see share_ldb in action
2007-10-10 14:10:19 -05:00
Simo Sorce
df1da91d4f r17207: Add the ldb based shares configuration module 2007-10-10 14:10:19 -05:00
Simo Sorce
a89cc346b9 r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one
2007-10-10 14:10:18 -05:00
Volker Lendecke
0c05f571a0 r17205: Even if this makes me look foolish, at least start to scratch on the surface
of spoolss. If snum is to be removed, then we should make at least the attempt
to walk parts of the code before and after the changes.

This walks GetPrinterInfo level 0-7.

Volker
2007-10-10 14:10:18 -05:00
Andrew Bartlett
5d7c9c12cb r17197: This patch moves the encryption of bulk data on SASL negotiated security
contexts from the application layer into the socket layer.

This improves a number of correctness aspects, as we now allow LDAP
packets to cross multiple SASL packets.  It should also make it much
easier to write async LDAP tests from windows clients, as they use SASL
by default.  It is also vital to allowing OpenLDAP clients to use GSSAPI
against Samba4, as it negotiates a rather small SASL buffer size.

This patch mirrors the earlier work done to move TLS into the socket
layer.

Unusual in this pstch is the extra read callback argument I take.  As
SASL is a layer on top of a socket, it is entirely possible for the
SASL layer to drain a socket dry, but for the caller not to have read
all the decrypted data.  This would leave the system without an event
to restart the read (as the socket is dry).

As such, I re-invoke the read handler from a timed callback, which
should trigger on the next running of the event loop.  I believe that
the TLS code does require a similar callback.

In trying to understand why this is required, imagine a SASL-encrypted
LDAP packet in the following formation:

+-----------------+---------------------+
| SASL  Packet #1 | SASL Packet #2      |
----------------------------------------+
| LDAP Packet #1       | LDAP Packet #2 |
----------------------------------------+

In the old code, this was illegal, but it is perfectly standard
SASL-encrypted LDAP.  Without the callback, we would read and process
the first LDAP packet, and the SASL code would have read the second SASL
packet (to decrypt enough data for the LDAP packet), and no data would
remain on the socket.

Without data on the socket, read events stop.  That is why I add timed
events, until the SASL buffer is drained.

Another approach would be to add a hack to the event system, to have it
pretend there remained data to read off the network (but that is ugly).

In improving the code, to handle more real-world cases, I've been able
to remove almost all the special-cases in the testnonblock code.  The
only special case is that we must use a deterministic partial packet
when calling send, rather than a random length.  (1 + n/2).  This is
needed because of the way the SASL and TLS code works, and the 'resend
on failure' requirements.

Andrew Bartlett
2007-10-10 14:10:18 -05:00
Andrew Bartlett
d79bfbe87d r17196: Clarify that SSL is used for LDAP as well as SWAT.
Andrew Bartlett
2007-10-10 14:10:18 -05:00
Simo Sorce
523e8f3ed4 r17195: Start thinking how to implement extended operations.
Ad supports three extended operations:
- start tls
- dynamic objects
- fast binds

none of these are a priority.
2007-10-10 14:10:18 -05:00
Simo Sorce
a6709196ca r17193: Remove ancient stuff never really used 2007-10-10 14:10:17 -05:00
Simo Sorce
d3f8b813b3 r17189: Add the new LDAP rfc series 2007-10-10 14:10:17 -05:00
Volker Lendecke
0236f3b41a r17187: Beginnings of a little lsa walker for Samba3, if only to prevent the
regression we had in 3.0.23...

Volker
2007-10-10 14:10:17 -05:00
Simo Sorce
c6aa60c7e6 r17186: "async" word abuse clean-up part 2 2007-10-10 14:10:17 -05:00
Simo Sorce
25fc735404 r17185: Oh, I wanted to do this for sooo long time.
Finally acknowledge that ldb is inherently async and does not have a dual personality anymore
Rename all ldb_async_XXX functions to ldb_XXX except for ldb_async_result, it is now ldb_reply
to reflect the real function of this structure.

Simo.
2007-10-10 14:10:16 -05:00
Stefan Metzmacher
f47b7bb656 r17176: remove off_t from talloc. size_t is large enough to hold
the max amount of memory of one process

metze
2007-10-10 14:10:16 -05:00
Andrew Bartlett
f3b6e57b23 r17174: Enable gnutls code, which requires the HAVE_GNUTLS CPP macro.
Andrew Bartlett
2007-10-10 14:10:16 -05:00
Andrew Bartlett
e96638bc74 r17173: Check for oversize output, not oversize input, and fix the GSSAPI mech
to work (it broke it in the previous commit).

Andrew Bartlett
2007-10-10 14:10:16 -05:00
Andrew Bartlett
cbbe99d9c1 r17171: Add a gensec function to determine the maximum negotiated buffer size,
and the maximum amount of user data that may be fitted into that.

This is used in the new SASL code, to correctly honour SASL buffer sizes.

Andrew Bartlett
2007-10-10 14:10:15 -05:00
Andrew Bartlett
d304760d3d r17170: Catch some more out-of-memory cases, and provide some clues when
chasing down bad signatures that may be due to data truncation.

Andrew Bartlett
2007-10-10 14:10:15 -05:00
Andrew Bartlett
9d866a030e r17169: Test LDAP with testnonblock.
Andrew Bartlett
2007-10-10 14:10:15 -05:00
Andrew Bartlett
9c33c6a20a r17168: Now that TLS (and soon SASL) is below the socket layer, we need to
make the testnonblock skip some things.  The socket *under* the tls
socket is still tested.

Andrew Bartlett
2007-10-10 14:10:15 -05:00
Andrew Bartlett
4dcdc5a3ad r17167: indent 2007-10-10 14:10:15 -05:00
Stefan Metzmacher
f94198c2a8 r17157: bail out if sizeof(size_t) < sizeof(void *)
metze
2007-10-10 14:10:14 -05:00
Stefan Metzmacher
58e124ade3 r17156: check for the size of a pointer
metze
2007-10-10 14:10:14 -05:00
Jeremy Allison
94886f8c40 r17141: Prove that create dispositions with truncate and
overwrite break oplocks.
Jeremy.
2007-10-10 14:10:14 -05:00
Jeremy Allison
720c425af1 r17139: Checking in Volker's extended oplock test.
Jeremy
2007-10-10 14:10:14 -05:00
Stefan Metzmacher
fa04ef88e5 r17114: print some sizes for debugging
metze
2007-10-10 14:10:14 -05:00
Stefan Metzmacher
5c1e6c08c7 r17113: build tdb and ldb standalone with the same sizes of 'off_t' as from samba
metze
2007-10-10 14:10:13 -05:00
Stefan Metzmacher
ac9d69d257 r17112: - fix the build of the ldap ldb backend with newer openldap header files.
- use the correct timeout variable (simo you should do a standalone build before commiting:-)

metze
2007-10-10 14:10:13 -05:00
Stefan Metzmacher
2977e7097a r17109: - use AC_SYS_LARGEFILE so that type sizes are the same when talloc
is build standalone and inside samba
- add configure checks for the some type sizes for debugging

metze
2007-10-10 14:10:13 -05:00
Andrew Bartlett
15dd43b773 r17104: Rename function parameters and variables to avoid shadowing global
declarations.

Andrew Bartlett
2007-10-10 14:10:13 -05:00
Andrew Bartlett
0a354a1dde r17103: Big updates to the not-yet-enabled partitions module. It now services
the Global Catalog port 'correctly' (in a very simple sense) in that
it should be no worse than what we had before.

We now combine partitions together to search over the whole tree, when
we are marked as 'global catalog'.

Andrew Bartlett
2007-10-10 14:10:13 -05:00
Jeremy Allison
382c37e3d7 r17099: Samba3 now passes RAW-LOCK completely, no need for
parameters to protect it.
Jeremy.
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
7daf432d58 r17088: add ntvfs mapping function for notify
metze
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
41acbc6645 r17087: - make pvfs_notify_next_send static
- fix double free:
  a talloc_reference(a,b) when a is a child of b
  doesn't prevent talloc_free(b) from destroiying a and b.

metze
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
22463cbcdd r17085: reuse the existing sec_desc_buf struct
metze
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
eaccd3c435 r17084: implement SMB2 Cancel in the server,
that makes it possible for clients to cancel
async requests, like NOTIFY...

metze
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
730cdc4475 r17083: - implement SMB2 Cancel in the client
- the 0xffffffffffffffff seqnum is reserved for SMB2 Break (oplock breaks)
  so don't use it in a request. we should someday try to test this...

metze
2007-10-10 14:10:11 -05:00
Volker Lendecke
6718550822 r17082: Add a test that walks and tests denying tconX access via the share security
descriptor. This is something that W2k3 does _not_ pass and probably is not
expected to, it seems the don't check access at tconX time.

Thanks to metze for the hint how in the srvsvc_NetShareInfo1501 struct the
length of the sd can be encoded in idl.

As metze says, there's probably more to the share secdesc, this needs more
testing. This one is here to walk the samba3 code.

Volker
2007-10-10 14:10:11 -05:00
Stefan Metzmacher
1f48e7dca6 r17081: add idle handler support to the smb2 client lib too
metze
2007-10-10 14:10:11 -05:00
Rafal Szczesniak
76888c74a6 r17079: Remove an attempt to connect on ncacn_ip_tcp transport after failure
on ncacn_np, as abartlet suggested. Also, named pipe remains the default
transport for all kinds of servers to be contacted.

rafal
2007-10-10 14:10:11 -05:00
Volker Lendecke
92afe11569 r17074: Extend the rpc-samba3-getusername test: This creates a normal user and we
check if we can actually see the user SID on a fresh sessionsetup.

This also gives us the simple create_user, which can lead to more fun tests
:-)

Volker
2007-10-10 14:10:11 -05:00
Volker Lendecke
963878a5f3 r17069: Make us pass RPC-NETLOGSAMBA3 against w2k3 again 2007-10-10 14:10:10 -05:00
Volker Lendecke
4f13b7d53c r17065: NT4 does not like "0" here, W2k3 does not care... 2007-10-10 14:10:10 -05:00
Volker Lendecke
5603db30e7 r17064: lsa_GetUserName needs to return the name for S-1-5-7 on an anonymous login.
Found that because I want to play around with setsharesecurity, for this I
need the "whoami" call figuring out the SID of the currently connected user.

Not activating this test yet until the build farm has picked up the new samba4
revision.

Volker
2007-10-10 14:10:10 -05:00
Stefan Metzmacher
c5672a54a0 r17062: make correct use of talloc destructors, and make the code much simpler
should I merge that aslo to samba3?

metze
2007-10-10 14:10:10 -05:00
Stefan Metzmacher
0559222b62 r17061: - remove the currect talloc chunk from it's parent before freeing the children
this fixes an endless loop bug!
- reenable the test for this

should I merge this to samba3?

metze
2007-10-10 14:10:09 -05:00