1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-11 00:23:51 +03:00
Commit Graph

51 Commits

Author SHA1 Message Date
Jelmer Vernooij
df9cebcb97 r25035: Fix some more warnings, use service pointer rather than service number in more places. 2007-10-10 15:05:43 -05:00
Jelmer Vernooij
d81bb09046 r25033: Fix include 2007-10-10 15:05:42 -05:00
Jelmer Vernooij
5085c53fcf r25027: Fix more warnings. 2007-10-10 15:05:41 -05:00
Jelmer Vernooij
1ce32673d9 r24712: No longer expose the 'BOOL' data type in any interfaces. 2007-10-10 15:02:54 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Andrew Bartlett
d20ab6a5ed r19217: Merge from SAMBA_4_0_RELEASE:
Re-enable TLS in the default configuration.  We passed on the build
farm because we have an explicit diffie-hilliman parameters file set.

Andrew Bartlett
2007-10-10 14:20:54 -05:00
Andrew Tridgell
eba6c84eff r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
2007-10-10 14:18:04 -05:00
Andrew Tridgell
7a0264c52d r17674: fixed a problem on with our configure logic on systems that have
libgnutls but not some of the crt functions
2007-10-10 14:16:22 -05:00
Andrew Tridgell
28238ad8f1 r17660: fixed configure test 2007-10-10 14:16:21 -05:00
Andrew Tridgell
8148534d9c r17659: cope with systems without the x509 gnutls functions 2007-10-10 14:16:21 -05:00
Simo Sorce
300d6e724d r17412: fix missing colon 2007-10-10 14:15:22 -05:00
Andrew Bartlett
798c0791d8 r17411: Try and compile on older versions of GnuTLS.
Andrew Bartlett
2007-10-10 14:15:22 -05:00
Andrew Bartlett
23314c3953 r17379: Pre-generate DH parameters, to avoid doing this at runtime in our testsuite.
Andrew Bartlett
2007-10-10 14:15:20 -05:00
Andrew Bartlett
3043969708 r17286: Simply fail the tls_initialise if we don't have TLS compiled in.
Adjust the web_server code to cope with this.

Andrew Bartlett
2007-10-10 14:15:06 -05:00
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
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
f3b6e57b23 r17174: Enable gnutls code, which requires the HAVE_GNUTLS CPP macro.
Andrew Bartlett
2007-10-10 14:10:16 -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 Tridgell
61c6100617 r15854: more talloc_set_destructor() typesafe fixes 2007-10-10 14:08:32 -05:00
Stefan Metzmacher
dbf82fff10 r15829: we need to include socket.h before we can use enum socket_type
this fixes a compiler warning

metze
2007-10-10 14:08:29 -05:00
Jelmer Vernooij
d77ea8f907 r15538: Use pkg-config file where possible and
only fall back to manual tests if that can't be found (for systems
that have older versions of gnutls without the .pc file installed)
2007-10-10 14:05:55 -05:00
Andrew Bartlett
09b2f30dfa r15400: Move the TLS code behind the socket interface.
This reduces caller complexity, because the TLS code is now called
just like any other socket.  (A new socket context is returned by the
tls_init_server and tls_init_client routines).

When TLS is not available, the original socket is returned.

Andrew Bartlett
2007-10-10 14:05:32 -05:00
Jelmer Vernooij
f2ca71f122 r15363: Fix dependencies for shared library 2007-10-10 14:05:26 -05:00
Andrew Bartlett
2cd2e524e6 r15357: Fix the build on systems without GNUTLS.
Andrew Bartlett
2007-10-10 14:05:25 -05:00
Andrew Bartlett
a312812b92 r15356: Remove unused 'flags' argument from socket_send() and friends.
This is in preperation for making TLS a socket library.

Andrew Bartlett
2007-10-10 14:05:25 -05:00
Jelmer Vernooij
2f06305e53 r15274: Drop default EXT_LIB_ prefix for external libraries. Fixes issues with local
(empty) libpopt.a overriding global one
2007-10-10 14:05:00 -05:00
Jelmer Vernooij
11353d4b47 r15231: Try to fix detection of ability of CC to generate dependencies 2007-10-10 14:04:21 -05:00
Jelmer Vernooij
adc8a019b6 r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
2007-10-10 14:04:18 -05:00
Jelmer Vernooij
b38a834077 r14806: Fix compiler warnings 2007-10-10 13:59:22 -05:00
Jelmer Vernooij
f97df7d90a r14575: Move some path-related functions to libsamba-config so libsamba-util
doesn't have to depend on the lp_* functions.
2007-10-10 13:58:52 -05:00
Jelmer Vernooij
9c37f847d3 r14477: Remove the NOPROTO property - it's no longer used as proto.h is gone. 2007-10-10 13:57:30 -05:00
Andrew Tridgell
ec53f5fe96 r14412: init a var 2007-10-10 13:57:20 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Jelmer Vernooij
b24f2583ed r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
2007-10-10 13:47:45 -05:00
Andrew Tridgell
f8d43f1f67 r11596: switched the libcli/raw/ code over to using the lib/stream/ generic
packet parsing code. This simplifies the logic in the raw client
library a fair bit
2007-10-10 13:45:56 -05:00
Jelmer Vernooij
24e1030090 r11244: Relative path names in .mk files 2007-10-10 13:45:06 -05:00
Jelmer Vernooij
7fffc5c917 r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html) 2007-10-10 13:45:03 -05:00
Jelmer Vernooij
b53313dc51 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
2007-10-10 13:39:08 -05:00
Tim Potter
9d001dc083 r10377: Save configuration stuff to sconf.cache so it isn't annoyingly run
at every single build.  Run 'scons configure=1' or delete sconf.cache
to force checks to be re-run.

Jelmer, I think this stuff is cached in the .sconf_cache directory but
the message is still displayed and it looks like it caches the compiled
test object file not the actual result of the test.
2007-10-10 13:38:33 -05:00
Jelmer Vernooij
22f18a8424 r10366: More scons fixes. Building et, asn1, lex and yacc files sort-of works now 2007-10-10 13:38:32 -05:00
Jelmer Vernooij
4f0d7f75b9 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
59d4450453 r10336: Add sconscript for a couple more subsystems. 2007-10-10 13:38:29 -05:00
Andrew Tridgell
437c4057ae r8482: gnutls_x509_crt_set_subject_key_id is not available in some versions
of gnutls. Thanks to ab for spotting this.
2007-10-10 13:23:08 -05:00
Andrew Tridgell
c5bccbc366 r7912: make private_path() recognise a non-relative filename, so we can have
sam database = sam.ldb

and it will know to put it in the private dir, but if you use

  sam database = ldap://server

it knows to use it as-is
2007-10-10 13:18:48 -05:00
Andrew Tridgell
bc6bc84ef4 r7773: fixed the tls code for the non-GNUTLS case 2007-10-10 13:18:34 -05:00
Andrew Tridgell
71ee6a1df5 r7769: added client support in the tls library api 2007-10-10 13:18:33 -05:00
Andrew Tridgell
30da6a1cc4 r7751: only enable tls on the ldaps port in ldap server, and reject non-tls
connections on that port
2007-10-10 13:18:31 -05:00
Andrew Tridgell
135c3367ff r7750: handle STATUS_MORE_ENTRIES on send in tls 2007-10-10 13:18:31 -05:00
Andrew Tridgell
73cb4aad22 r7747: - simplified the ldap server buffer handling
- got rid of the special cases for sasl buffers

- added a tls_socket_pending() call to determine how much data is waiting on a tls connection

- removed the attempt at async handling of ldap calls. The buffers/sockets are all async, but the calls themselves
  are sync.
2007-10-10 13:18:30 -05:00
Andrew Tridgell
42d8a1a222 r7745: better handling of recv errors in tls library 2007-10-10 13:18:30 -05:00