1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

19 Commits

Author SHA1 Message Date
Gerald Carter
fb5362c069 r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10 11:10:14 -05:00
Jeremy Allison
3df82f57fc r13489: Fix #3496 from jason@ncac.gwu.edu. Variable set but never used.
Jeremy.
(This used to be commit 4204794cc7c5e2671259652879c33f539d26958c)
2007-10-10 11:10:06 -05:00
Volker Lendecke
71247a2f05 r13477: Fix code before declaration
(This used to be commit c15f1d553f03ad1ed4e1d52b8e46c52202bc3a83)
2007-10-10 11:10:05 -05:00
Jeremy Allison
d672d8fd6b r13473: Back port r13470, r13471, r13472 from Samba4. Thanks Andrew:
-----------------------------------
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
-----------------------------------
With more 'try all options' testing, I found this 'simple' but in the
NTLM2 signing code.

Andrew Bartlett
-----------------------------------
After Volker's advise, try every combination of parameters.  This
isn't every parameter on NTLMSSP, but it is most of the important
ones.

This showed up that we had the '128bit && LM_KEY' case messed up.
This isn't supported, so we must look instead at the 56 bit flag.

Andrew Bartlett
-----------------------------------

We should now try retesting with NT4. This should be standalone
enough to port into a SAMBA_3_0_RELEASE branch fix.

Jeremy.
(This used to be commit b9b8cd1752aeab049983c1a6038edf2231ec10a4)
2007-10-10 11:10:05 -05:00
Jeremy Allison
2fd79d8bfc r13015: Make logic much clearer. From jpeach.
Jeremy.
(This used to be commit d9b6bdd84a16c8af44049748a0fc47844f597919)
2007-10-10 11:06:10 -05:00
Jeremy Allison
8d7c886671 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
(This used to be commit d720867a788c735e56d53d63265255830ec21208)
2007-10-10 11:05:02 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10 11:04:48 -05:00
Gerald Carter
4e8c17d985 r5432: compile fixes from Jason Mader <jason@ncac.gwu.edu> -- BUGS 2340
(This used to be commit 3fd86a1f9d5b63aa066aed3347209913cdf782a8)
2007-10-10 10:55:40 -05:00
Jeremy Allison
9604545ed8 r3892: Fix "might be used uninitialized" error.
Jeremy.
(This used to be commit eead77919b05e0a2bed32a4a192dd0d9e6a86008)
2007-10-10 10:53:24 -05:00
Andrew Bartlett
b31ec210fc Fix the initialisation vectors for NTLM2, so that they at least make sense,
even if they don't work yet.

Andrew Bartlett
(This used to be commit 636b98dab9bc27f55bdc65d7dedb58cdf8d8563b)
2004-01-25 01:11:10 +00:00
Andrew Bartlett
d4954eff57 Make it clear that we cannot sign if we don't have a session key.
(This used to be commit a2f6dec05b3b30292ec3e42808dc89f1bf5c7ab4)
2004-01-05 00:11:35 +00:00
Andrew Bartlett
fcbfc7ad06 Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
(This used to be commit f3bbc87b0dac63426cda6fac7a295d3aad810ecc)
2003-11-22 13:19:38 +00:00
Tim Potter
fbb8f131c2 Fix more 64-bit printf warnings.
(This used to be commit 23443e3aa079710221557e18158d0ddb8ff48a36)
2003-11-03 14:34:25 +00:00
Herb Lewis
062f89bc28 get rid of some sompiler warnings on IRIX
(This used to be commit a6a39c61e8228c8b3b7552ab3c61ec3a6a639143)
2003-08-15 01:42:30 +00:00
Tim Potter
aed434ea9b Spelling.
(This used to be commit 2750418752e491c5e87f0f2adf253291e31ee4c2)
2003-07-16 05:51:10 +00:00
Andrew Bartlett
456f51bcbe Jeremy requested that I get my NTLMSSP patch into CVS. He didn't request
the schannel code, but I've included that anyway. :-)

This patch revives the client-side NTLMSSP support for RPC named pipes
in Samba, and cleans up the client and server schannel code.  The use of the
new code is enabled by the 'sign', 'seal' and 'schannel' commands in
rpcclient.

The aim was to prove that our separate NTLMSSP client library actually
implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation,
in the hope that knowing this will assist us in correctly implementing
NTLMSSP signing for SMB packets.  (Still not yet functional)

This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with
calls to libsmb/ntlmssp.c.  In the process, we have gained the ability to
use the more secure NT password, and the ability to sign-only, instead of
having to seal the pipe connection.  (Previously we were limited to sealing,
and could only use the LM-password derived key).

Our new client-side NTLMSSP code also needed alteration to cope with our
comparatively simple server-side implementation.  A future step is to replace
it with calls to the same NTLMSSP library.

Also included in this patch is the schannel 'sign only' patch I submitted to
the team earlier.  While not enabled (and not functional, at this stage) the
work in this patch makes the code paths *much* easier to follow.  I have also
included similar hooks in rpccleint to allow the use of schannel on *any* pipe.

rpcclient now defaults to not using schannel (or any other extra per-pipe
authenticiation) for any connection.  The 'schannel' command enables schannel
for all pipes until disabled.

This code is also much more secure than the previous code, as changes to our
cli_pipe routines ensure that the authentication footer cannot be removed
by an attacker, and more error states are correctly handled.

(The same needs to be done to our server)

Andrew Bartlett
(This used to be commit 5472ddc9eaf4e79c5b2e1c8ee8c7f190dc285f19)
2003-07-14 08:46:32 +00:00
Andrew Bartlett
1e2147fc0f Merge SMB signing, cli buffer clobber and NTLMSSP signing tweaks from HEAD.
(This used to be commit c6c4f69b8ddc500890a65829e1b9fb7a3e9839e9)
2003-04-21 13:00:39 +00:00
Andrew Bartlett
b33cee92ed Fix compile on IA64 by noting that this should be the integer, not a pointer
to the integer for SIVAL().
(This used to be commit 5e20868fadc4e01ea09639bc57c51d1eb687f78c)
2003-03-22 10:53:20 +00:00
Andrew Bartlett
e9a94cd2c9 Further work on NTLMSSP-based SMB signing. Current status is that I cannnot
get Win2k to send a valid signiture in it's session setup reply - which it will
give to win2k clients.

So, I need to look at becoming 'more like MS', but for now I'll get this code
into the tree.  It's actually based on the TNG cli_pipe_ntlmssp.c, as it was
slightly easier to understand than our own (but only the utility functions
remain in any way intact...).

This includes the mysical 'NTLM2' code - I have no idea if it actually works.

(I couldn't get TNG to use it for its pipes either).

Andrew Bartlett
(This used to be commit a034a5e381ba5612be21e2ba640d11f82cd945da)
2003-03-10 02:14:35 +00:00