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

9902 Commits

Author SHA1 Message Date
Stefan Metzmacher
28b8ec0156 r17268: change the smb2 session setup to use the new gensec_update_send/recv() api
metze
(This used to be commit 14ecc56343)
2007-10-10 14:10:25 -05:00
Stefan Metzmacher
64d6abac74 r17267: - add an async interface for gensec_update() to the public gensec api
- note this is still uses the sync update() hook of the gensec modules
  but it allows me to fix the callers first

Later auth_check_password() will also get an async version,
so that we can later implement an async version of auth_winbind
using async IRPC to the winbind task.

metze
(This used to be commit d5638a4faf)
2007-10-10 14:10:25 -05:00
Stefan Metzmacher
af8f55367c r17265: some reformatting
metze
(This used to be commit e4c28001d3)
2007-10-10 14:10:25 -05:00
Stefan Metzmacher
da9723c224 r17264: - remove unused includes from talloc
- check explicit check for varargs.h as fallback from stdarg.h
  and fail the build if both are not present

metze
(This used to be commit b091d182fe)
2007-10-10 14:10:25 -05:00
Stefan Metzmacher
02ea24bcd1 r17263: export talloc_free_children()
metze
(This used to be commit 195754b169)
2007-10-10 14:10:24 -05:00
Stefan Metzmacher
8194dfd289 r17257: make the size_t is to small error more verbose
(hopefully nobody will ever see this:-)

metze
(This used to be commit 196803a6c6)
2007-10-10 14:10:24 -05:00
Stefan Metzmacher
e72786ec24 r17256: fix 2 crash bugs, which are introduced by making parameters
ref pointers!

I'm sure there're more places and more care is needed when idl files
are changed. Hopefully testing against windows in the build farm
find such bugs in future...

Why is in the client library this no more possible:

NTSTATUS foo([in,out,ref] uint8 *foo);

and then just

r.in.foo = &foo;
status = dcerpc_foo(p, mem_ctx, &r);

and r.out.foo will set to r.in.foo via pidl magic,
that worked some time ago...

metze
(This used to be commit d8952f00c7)
2007-10-10 14:10:24 -05:00
Andrew Tridgell
bbc185729b r17255: fixed BENCH-NBENCH for new smb_raw_find_first() syntax
(This used to be commit 7b05c007ea)
2007-10-10 14:10:24 -05:00
Stefan Metzmacher
308abfefb9 r17253: add configure checks for writev/readv to see how portable they're
metze
(This used to be commit b5c06d5b4c)
2007-10-10 14:10:24 -05:00
Stefan Metzmacher
04d776a409 r17251: - split out the starttls into its own function
- give an operations error when tls is already on the socket

metze
(This used to be commit 9190d134c9)
2007-10-10 14:10:23 -05:00
Andrew Bartlett
e88bf7cae4 r17250: Fix comment, the Samba3 winbind protocol uses the host byte order here.
Andrew Bartlett
(This used to be commit dc4500eb90)
2007-10-10 14:10:23 -05:00
Stefan Metzmacher
2ac8de0d69 r17243: some svcctl idl fixes from <andrzej.hajda@wp.pl>
metze
(This used to be commit 7b136ddf48)
2007-10-10 14:10:23 -05:00
Stefan Metzmacher
d86e04ca1e r17241: substitude @datarootdir@ with old autoconf versions:-)
metze
(This used to be commit ed5ffc7bfc)
2007-10-10 14:10:23 -05:00
Stefan Metzmacher
aeb8077b96 r17240: move extended operations to a new file
metze
(This used to be commit 0b16350fa2)
2007-10-10 14:10:23 -05:00
Jelmer Vernooij
7cdd639cc2 r17238: Add datarootdir (required for newer autoconf versions)
(This used to be commit c575dee5c7)
2007-10-10 14:10:22 -05:00
Stefan Metzmacher
4cdcc17893 r17237: - keep pointer to the different sockets
- we need this to later:
  - to disallow a StartTLS when TLS is already in use
  - to place the TLS socket between the raw and sasl socket
    when we had a sasl bind before the StartTLS
  - and rfc4513 says that the server may allow to remove the TLS from
    the tcp connection again and reuse raw tcp
  - and also a 2nd sasl bind should replace the old sasl socket

metze
(This used to be commit 10cb9c07ac)
2007-10-10 14:10:22 -05:00
Stefan Metzmacher
ec8d486e26 r17230: don't overwrite the error with NT_STATUS_NO_MEMORY
metze
(This used to be commit f2196bf9b6)
2007-10-10 14:10:22 -05:00
Stefan Metzmacher
8a3f6a7912 r17227: don't call a function which takes some nonoptional args
with NULL.

metze
(This used to be commit 3711b968ad)
2007-10-10 14:10:22 -05:00
Stefan Metzmacher
79f7b58630 r17226: add some comments about ldap binds and pending requests
metze
(This used to be commit e8db1fb558)
2007-10-10 14:10:22 -05:00
Andrew Bartlett
e3df3cd55f r17225: Fix the build by fixing the spelling of START-TLS.
Andrew Bartlett
(This used to be commit 4827a6b171)
2007-10-10 14:10:21 -05:00
Andrew Bartlett
a6629e037a r17224: Accept the start-tls extended request. Getting OpenLDAP to recognise
our certificate, and proceed with the connection is left as an
exercise for the reader...

Andrew Bartlett
(This used to be commit 9bd66d4c95)
2007-10-10 14:10:21 -05:00
Andrew Bartlett
1ea4f560fc r17223: In some protocols it is not possible to negoitate off some features,
without the agreement of the peer.  This can cause problems, because
one side things sealing is disabled, while the other thinks it is
enabled.

Andrew Bartlett
(This used to be commit 68ddc4921f)
2007-10-10 14:10:20 -05:00
Andrew Bartlett
9d6f276717 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
(This used to be commit 003e2ab93c)
2007-10-10 14:10:20 -05:00
Andrew Bartlett
c047a88f41 r17221: Add some integer wrap parinoia to data_blob_append().
Andrew Bartlett
(This used to be commit 7c5a25a423)
2007-10-10 14:10:20 -05:00
Andrew Bartlett
d8f1e27b19 r17215: Prepare the SASL socket before actually settting it. This allows
errors to be reported corectly, rather than just dropping the socket.

Andrew Bartlett
(This used to be commit 83dd22accf)
2007-10-10 14:10:19 -05:00
Simo Sorce
830b03d7e8 r17210: I wonder how I missed this, build farm caught it.
(This used to be commit e0af5cf51d)
2007-10-10 14:10:19 -05:00
Simo Sorce
c504a8269c r17209: Add dependency over the new share configuration module into smbd
Should fix some build farm machine
(This used to be commit 15b8fafb99)
2007-10-10 14:10:19 -05:00
Simo Sorce
cb85a76d77 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
(This used to be commit d4c2b89350)
2007-10-10 14:10:19 -05:00
Simo Sorce
151fc74006 r17207: Add the ldb based shares configuration module
(This used to be commit df1da91d4f)
2007-10-10 14:10:19 -05:00
Simo Sorce
9c66f601f1 r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one
(This used to be commit a89cc346b9)
2007-10-10 14:10:18 -05:00
Volker Lendecke
2dc38416b6 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
(This used to be commit 0c05f571a0)
2007-10-10 14:10:18 -05:00
Andrew Bartlett
ba07fa43d0 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
(This used to be commit 5d7c9c12cb)
2007-10-10 14:10:18 -05:00
Andrew Bartlett
74b68a7555 r17196: Clarify that SSL is used for LDAP as well as SWAT.
Andrew Bartlett
(This used to be commit d79bfbe87d)
2007-10-10 14:10:18 -05:00
Simo Sorce
e248caed12 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.
(This used to be commit 523e8f3ed4)
2007-10-10 14:10:18 -05:00
Simo Sorce
fcea638657 r17193: Remove ancient stuff never really used
(This used to be commit a6709196ca)
2007-10-10 14:10:17 -05:00
Simo Sorce
3faab3e6dd r17189: Add the new LDAP rfc series
(This used to be commit d3f8b813b3)
2007-10-10 14:10:17 -05:00
Volker Lendecke
7718ef4c66 r17187: Beginnings of a little lsa walker for Samba3, if only to prevent the
regression we had in 3.0.23...

Volker
(This used to be commit 0236f3b41a)
2007-10-10 14:10:17 -05:00
Simo Sorce
49f68caed2 r17186: "async" word abuse clean-up part 2
(This used to be commit c6aa60c7e6)
2007-10-10 14:10:17 -05:00
Simo Sorce
c93817b36d 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.
(This used to be commit 25fc735404)
2007-10-10 14:10:16 -05:00
Stefan Metzmacher
550f5fb26e r17176: remove off_t from talloc. size_t is large enough to hold
the max amount of memory of one process

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

Andrew Bartlett
(This used to be commit e96638bc74)
2007-10-10 14:10:16 -05:00
Andrew Bartlett
048d0c64f9 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
(This used to be commit cbbe99d9c1)
2007-10-10 14:10:15 -05:00
Andrew Bartlett
d5aeddf2ef 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
(This used to be commit d304760d3d)
2007-10-10 14:10:15 -05:00
Andrew Bartlett
9e854f2f86 r17169: Test LDAP with testnonblock.
Andrew Bartlett
(This used to be commit 9d866a030e)
2007-10-10 14:10:15 -05:00
Andrew Bartlett
a1a842eb44 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
(This used to be commit 9c33c6a20a)
2007-10-10 14:10:15 -05:00
Andrew Bartlett
dc2715b49c r17167: indent
(This used to be commit 4dcdc5a3ad)
2007-10-10 14:10:15 -05:00
Stefan Metzmacher
48fac823d2 r17157: bail out if sizeof(size_t) < sizeof(void *)
metze
(This used to be commit f94198c2a8)
2007-10-10 14:10:14 -05:00
Stefan Metzmacher
02ac968a26 r17156: check for the size of a pointer
metze
(This used to be commit 58e124ade3)
2007-10-10 14:10:14 -05:00
Jeremy Allison
38dee43c19 r17141: Prove that create dispositions with truncate and
overwrite break oplocks.
Jeremy.
(This used to be commit 94886f8c40)
2007-10-10 14:10:14 -05:00