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

45 Commits

Author SHA1 Message Date
Andrew Tridgell
d37a55548b build: moved libcli/auth/ntlmssp*.c into a common libcliauth.so library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-24 11:57:48 +11:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Stefan Metzmacher
d3e7266676 s4:ntlmssp: rename gensec_ntlmssp_state => ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
36669bfcf1 s4:ntlmssp: remove server_name from (gensec_)ntlmssp_state and fill the server.* fields also for the client
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
ee240799b6 s4:ntlmssp: keep struct gensec_ntlmssp_context in gensec_security->private_data
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Andrew Bartlett
a2286bad67 s4:ntlmssp Ensure that we always negotiate signing if we negotiate sealing.
Without this, a sealed LDAP connection to windows does not work.

Andrew Bartlett
2010-03-24 19:28:37 +11:00
Andrew Tridgell
f8109b0f49 s4: ran minimal_includes.pl on source4/auth/ntlmssp 2009-10-20 16:05:07 +11:00
Günther Deschner
e8c19f31b3 s4-ntlmssp: use NTLMSSP headers from IDL and remove duplicate constants.
Guenther
2009-08-28 10:09:06 +02:00
Andrew Bartlett
dbcd80ed01 Fix Samba4 build errors with common libcli/samsync 2009-04-16 10:17:17 +10:00
Jelmer Vernooij
b034c519f5 Add gensec_settings structure. This wraps loadparm_context for now, but
should in the future only contain some settings required for gensec.
2008-11-02 02:05:48 +01:00
Jelmer Vernooij
3a6b88f9f9 Remove unused argument iconv_convenience. 2008-11-01 20:58:41 +01:00
Jelmer Vernooij
922a29992e Remove iconv_convenience parameter from simple string push/pull
functions.
2008-10-24 03:40:09 +02:00
Jelmer Vernooij
6925202bde Move source4/lib/crypto to lib/crypto. 2008-09-24 15:30:23 +02:00
Andrew Bartlett
9caa8d3da1 Try to make NTLMSSP less fussy for unimportant messages.
We don't really care (because nobody uses them) what we send as the
domain and workstation in the negotiate packet.

Andrew Bartlett
(This used to be commit 9ac07e1487)
2008-07-15 15:04:06 +10:00
Jelmer Vernooij
6f79af9d13 r26652: msrpc_parse/msrpc_gen: Add iconv_convenience argument.
(This used to be commit e886f1bc0d)
2008-01-03 12:33:36 -06:00
Jelmer Vernooij
ecea5ce245 r26260: Store loadparm context in gensec context.
(This used to be commit b9e3a4862e)
2007-12-21 05:47:34 +01:00
Jelmer Vernooij
78416aff6c r26258: Use loadparm context in client_start function of gensec.
(This used to be commit bad1891cae)
2007-12-21 05:47:32 +01:00
Andrew Bartlett
6554433fc2 r25660: Add a new interface 'generate_secret_buffer()', to be used when we
require top-quality entropy.  We don't want to waste system enropy
generating challenges (which simply need to be unpredictable, not
secret) or when generating UUIDs.

Rework generate_random_buffer() to use /dev/urandom less often, only
to seed the existing RC4 based PRNG.  (With an exception to ensure we
don't waste this setup cost for very small entropy requests).

Perhaps we should be using heimdal's code for this instead?

This should drasticly reduce our entropy use, particularly in the
build farm (automated Samba build on hosts without much other source
of entropy).

Andrew Bartlett
(This used to be commit 6a5630d371)
2007-12-21 05:43:03 +01:00
Jelmer Vernooij
3642f3b40d r25552: Convert to standard bool type.
(This used to be commit b8d6b82f12)
2007-10-10 15:07:54 -05:00
Jelmer Vernooij
60a1046c5c r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9)
2007-10-10 15:07:31 -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
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643)
2007-10-10 15:05:27 -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
84c5acc615 r19805: Add the (harmless, but apparently default)
NTLMSSP_NEGOTIATE_ALWAYS_SIGN flags into the default set.

Andrew Bartlett
(This used to be commit 04709c75af)
2007-10-10 14:28:21 -05:00
Andrew Bartlett
13dbee3ffe r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
(This used to be commit 2b569c42e0)
2007-10-10 14:25:00 -05:00
Andrew Bartlett
eb66b26cd1 r14701: Allow, with non-default options, NTLMSSP to access the LM session key,
even when not sending the LM response.  Needed to pass the
test_session_key against Win2k3.

Yes, I think this is a security flaw in the use of Win2k3-compatible NTLM.

Andrew Bartlett
(This used to be commit cb6c27b4f2)
2007-10-10 13:59:10 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Stefan Metzmacher
7d8424ede2 r14064: - split out MSRPC_PARSE into a speperate subsystem
- build gensec_ntlmssp always static for now, because torture/auth/ntlmssp.c
  needs to access functions from it

metze
(This used to be commit 43733c9556)
2007-10-10 13:52:39 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Andrew Bartlett
e218c8442d r13470: Thanks to a report from VL:
We were causing mayhem by weakening the keys at the wrong point in time.

I think this is the correct place to do it.  The session key for SMB
signing, and the 'smb session key' (used for encrypting password sets)
is never weakened.

The session key used for bulk data encryption/signing is weakened.

This also makes more sense, when we look at the NTLM2 code.

Andrew Bartlett
(This used to be commit 3fd32a1209)
2007-10-10 13:51:54 -05:00
Andrew Bartlett
ba04ff6736 r13467: Add new parametric options (for testing) controlling LM_KEY and 56-bit
encryption behaviour.

Andrew Bartlett
(This used to be commit 2b3b2f33a4)
2007-10-10 13:51:54 -05:00
Andrew Bartlett
f7ff0540d2 r10981: Pull code to decide between and implement NTLMv2, NTLM and LM
authentication out of the various callers and into the kitchen
sink.. err, credentials subsystem.

This should ensure consistant logic, as well as get us one step closer
to security=server operation in future.

Andrew Bartlett
(This used to be commit 09c9576330)
2007-10-10 13:39:50 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Andrew Bartlett
ba90b652d9 r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting.

In particular, the composite session setup (extended security/SPNEGO)
code now returns errors, rather than NT_STATUS_NO_MEMORY.  This is
seen particularly when GENSEC fails to start.

The tighter interface rules apply to NTLMSSP, which must be called
exactly the right number of times.  This is to match some of our other
less-tested modules, where adding flexablity is harder.  (and this is
security code, so let's just get it right).  As such, the DCE/RPC and
LDAP clients have been updated.

Andrew Bartlett
(This used to be commit 134550cf75)
2007-10-10 13:34:24 -05:00
Andrew Bartlett
e578c33c2c r7757: Add NTLMv2 support to the NT1 Session setup (ie, not SPNEGO/NTLMSSP)
Session Setup code.

Add a mem_ctx argument to a few of the NTLMv2 support functions, and
add smb.conf options to control client NTLMv2 behaviour.

Andrew Bartlett
(This used to be commit 3f35cdb218)
2007-10-10 13:18:32 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
d3481b160c r6522: I have no idea why this change was made, but it not only breaks
connections to Win2k3, it doesn't match the well-known behaviour from
samba3.

Andrew Bartlett
(This used to be commit 99c9afe45a)
2007-10-10 13:16:22 -05:00
Stefan Metzmacher
a09593c37a r6484: fix NTLMSSP client against w2k and w2k3
if we use lm_response = data_blob(NULL, 0);

we got NT_STATUS_INVALID_PARAMETER

(abartlet: we should maybe also give this error in our server code)

metze
(This used to be commit be5e301442)
2007-10-10 13:16:19 -05:00
Andrew Bartlett
8b0e09e24f r6464: Remove the last of the Samba3 NTLMSSP API. This removes the rudundent
struct ntlmssp_state, and pushes all the member elements into struct
gensec_ntlmssp_state.

This also removes the 2-layer start function, caused by the previous
double abstraction layer.

Andrew Bartlett
(This used to be commit eebbb4205b)
2007-10-10 13:11:39 -05:00
Andrew Bartlett
0501a440be r6462: Move the arcfour sbox state into it's own structure, and allocate it
with talloc() for the NTLMSSP system.

Andrew Bartlett
(This used to be commit 7a93ac49c2)
2007-10-10 13:11:39 -05:00
Andrew Bartlett
874cd2db86 r6460: Push the client credentials into NTLMSSP, allowing logins of the form
user@REALM for the first time.

Fix the build for smbencrypt.c

Andrew Bartlett
(This used to be commit 5a6a57cd93)
2007-10-10 13:11:39 -05:00
Andrew Bartlett
3045ecfa1d r6458: Split up NTLMSSP into a new directory, and into seperate files for the
client and server logic code.  In future, this may allow us to build
only the NTLMSSP client, and not the server, but in the short-term, it
allows me greater sainity in moving around these files.

Andrew Bartlett
(This used to be commit 2f22841c67)
2007-10-10 13:11:38 -05:00