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

83 Commits

Author SHA1 Message Date
Andrew Tridgell
8f1b809d2c build: nearly there on samba4 build 2010-04-06 20:26:47 +10:00
Andrew Tridgell
332553d8ab build: check for libgpg-error 2010-04-06 20:26:44 +10:00
Andrew Tridgell
a2c866a5e6 build: gcrypt functions 2010-04-06 20:26:43 +10:00
Andrew Tridgell
aac8aec0d1 build: more config checks 2010-04-06 20:26:43 +10:00
Andrew Tridgell
8bae4823f2 build: waf build for lib/tls 2010-04-06 20:26:41 +10:00
Brian Lu
f346079083 s4:tls: fix the build on Solaris
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-12-15 12:56:50 +01:00
Matthias Dieter Wallnöfer
e9686985cb s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
2009-10-14 10:50:43 +02:00
Andrew Tridgell
c6936ab00f raise the debug level for a common message
when a client disconnects we expect this to happen, so don't print an
error each time
2009-08-12 15:19:42 +10:00
Stefan Metzmacher
6f40637ca8 s4:tls: avoid using talloc_reference() in tls_init_client()
metze
2009-07-31 14:42:04 +02:00
Stefan Metzmacher
d866497b18 s4:tls: avoid using talloc_reference() in tls_init_server()
metze
2009-07-31 14:42:03 +02:00
Andrew Bartlett
bfda910a20 s4:tls Enable GnuTLS back to version 1.4 (an into the future)
We think we have the bug fixed.

Andrew Bartlett
2009-07-28 14:11:18 +10:00
Matthias Dieter Wallnöfer
2627c6c0c2 Fixed some uninitialised variables
I tried hard to not change the program logic. Should fix bug #6439.
2009-06-19 11:32:01 +10:00
Jeremy Allison
a028e9640b Make S4 build on OpenSolaris.
Jeremy.
2009-02-24 15:27:47 -08:00
Andrew Tridgell
b1ff79dbb2 fixed some of the TLS problems
This fixes two things in the TLS support for Samba4. The first is to
use a somewhat more correct hostname instead of 'Samba' when
generating the test certificates. That allows TLS test clients (such
as gnutls-cli) to connect to Samba4 using auto-generated certificates.

The second fix is to add a call to gcry_control() to tell gcrypt to
use /dev/urandom instead of /dev/random (on systems that support
that). That means that test certificate generation is now very fast,
which was previously an impediment to putting the TLS tests on the
build farm.
2009-02-18 14:46:57 +11:00
Jelmer Vernooij
0cbce777a3 Fix indentation for some configure options. 2009-01-15 21:17:56 +01:00
Jelmer Vernooij
d44a6982f3 Don't attempt to use GNUTLS >= 2.6, as it is known broken with the socket-tls backend. 2009-01-08 13:15:10 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
1feab85be6 Rename samba-socket -> samba_socket to fix a couple more compiler
warnings.
2008-12-24 00:15:43 +01:00
Jelmer Vernooij
dcc4081f75 Fix more compiler warnings. 2008-12-23 23:22:57 +01:00
Jelmer Vernooij
9d2d666109 Make lp_tls_* return absolute paths. 2008-10-23 21:49:40 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
1b99d8fbb5 Use common util_file code. 2008-10-12 17:34:43 +02:00
Simo Sorce
4a0582438f Make it possible to disable gnutls at configure time,
until someone will finally decide to fix it.
(This used to be commit 0671dce355)
2008-06-08 19:16:26 -04:00
Jelmer Vernooij
333c169529 Use variables for source directory in remaining subsystems.
(This used to be commit 6b6b2196a8)
2008-05-18 20:30:46 +02:00
Jelmer Vernooij
b5d84a74d1 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/makefile.pm
	source/heimdal_build/config.mk
	source/lib/events/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/registry/config.mk
	source/lib/socket_wrapper/config.mk
	source/lib/tdb/config.mk
	source/lib/tls/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/scripting/ejs/config.mk
	source/smbd/process_model.mk
(This used to be commit 760378e029)
2008-04-08 03:45:06 +02:00
Jelmer Vernooij
f41b9a9dde Rename libsamba-config to libsamba-hostconfig.
(This used to be commit c46b7e90e3)
2008-04-01 15:08:30 +02:00
Jelmer Vernooij
b29d47edcf Move object file lists to the Makefile.
(This used to be commit a7e6d2a183)
2008-03-03 18:25:28 +01:00
Jelmer Vernooij
b4c81c0c18 Make data about what subsystems/libraries are enabled available in the mkconfig.mk file.
(This used to be commit 4cc93a98f9)
2008-02-11 14:41:28 +01:00
Jelmer Vernooij
bbdfbf8d9d r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a553054)
2007-12-21 05:47:20 +01:00
Jelmer Vernooij
719a4ae0d3 r25522: Convert to standard bool types.
(This used to be commit 5e814287ba)
2007-10-10 15:07:47 -05:00
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
50bcb45692 r25033: Fix include
(This used to be commit d81bb09046)
2007-10-10 15:05:42 -05:00
Jelmer Vernooij
dccf3f99e4 r25027: Fix more warnings.
(This used to be commit 5085c53fcf)
2007-10-10 15:05:41 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Andrew Tridgell
0479a2f1cb 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.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Bartlett
a3a7c28765 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
(This used to be commit d20ab6a5ed)
2007-10-10 14:20:54 -05:00
Andrew Tridgell
30ee8beb93 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.
(This used to be commit eba6c84eff)
2007-10-10 14:18:04 -05:00
Andrew Tridgell
714f3991a1 r17674: fixed a problem on with our configure logic on systems that have
libgnutls but not some of the crt functions
(This used to be commit 7a0264c52d)
2007-10-10 14:16:22 -05:00
Andrew Tridgell
a8aea84267 r17660: fixed configure test
(This used to be commit 28238ad8f1)
2007-10-10 14:16:21 -05:00
Andrew Tridgell
cbbaa36fbf r17659: cope with systems without the x509 gnutls functions
(This used to be commit 8148534d9c)
2007-10-10 14:16:21 -05:00
Simo Sorce
1ea8c378e2 r17412: fix missing colon
(This used to be commit 300d6e724d)
2007-10-10 14:15:22 -05:00
Andrew Bartlett
976b01b01a r17411: Try and compile on older versions of GnuTLS.
Andrew Bartlett
(This used to be commit 798c0791d8)
2007-10-10 14:15:22 -05:00
Andrew Bartlett
adefa4404c r17379: Pre-generate DH parameters, to avoid doing this at runtime in our testsuite.
Andrew Bartlett
(This used to be commit 23314c3953)
2007-10-10 14:15:20 -05:00
Andrew Bartlett
84b0eb6a57 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
(This used to be commit 3043969708)
2007-10-10 14:15:06 -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
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
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
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