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

44 Commits

Author SHA1 Message Date
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +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 f3bbc87b0d)
2003-11-22 13:19:38 +00:00
Volker Lendecke
c9aa836204 Fix memleaks.
Currently I'm compiling against MIT Kerberos 1.2.8.

Anthony, you said you have a heimdal installation available. Could you
please compile this stuff with krb and check it with valgrind?

Thanks,

Volker
(This used to be commit d8ab446859)
2003-08-15 01:46:09 +00:00
Herb Lewis
062f89bc28 get rid of some sompiler warnings on IRIX
(This used to be commit a6a39c61e8)
2003-08-15 01:42:30 +00:00
Andrew Bartlett
172766eea7 Change Samba to always use extended security for it's guest logins, (ie,
NTLMSSP with "" username, NULL password), and add --machine-pass (-P) to
all of Samba's clients.

When connecting to an Active Directory DC, you must initiate the CIFS level
session setup with Kerberos, not a guest login.  If you don't, your machine
account is demoted to NT4.

Andrew Bartlett
(This used to be commit 3547cb3def)
2003-08-14 01:08:00 +00:00
Tim Potter
05540b48f0 Fix unused variable warning.
(This used to be commit 73d02e3a2b)
2003-08-04 06:16:03 +00:00
Jeremy Allison
4632786cfb W00t! Client smb signing is now working correctly with krb5 and w2k server.
Server code *should* also work (I'll check shortly). May be the odd memory
leak. Problem was we (a) weren't setting signing on in the client krb5 sessionsetup
code (b) we need to ask for a subkey... (c). The client and server need to
ask for local and remote subkeys respectively.
Thanks to Paul Nelson @ Thursby for some sage advice on this :-).
Jeremy.
(This used to be commit 3f9e3b6070)
2003-07-25 23:15:30 +00:00
Jeremy Allison
8c38bb75b7 Add krb5_princ_component to Heimdal. Remove cli_ from mark packet signed.
Jeremy.
(This used to be commit dd46f8b22d)
2003-07-16 19:17:33 +00:00
Andrew Tridgell
1d008cd2cb use ZERO_STRUCT() instead of memset
(This used to be commit 0820840423)
2003-06-10 03:48:09 +00:00
Jim McDonough
4f276f9696 More on bug 137: rename more of krb5_xxx functions to not start with krb5_
(This used to be commit 10f1da3f4a)
2003-05-30 20:11:34 +00:00
Andrew Bartlett
ec458fa87e Merge from HEAD - sync up SessionSetup code to HEAD, including Luke Howard's
session key and auth verifier patches.

Andrew Bartlett
(This used to be commit 3f9616a68a)
2003-03-17 22:45:16 +00:00
Jim McDonough
217945cfc8 Fix IRIX build...void fn can't return another void fn
(This used to be commit e0c1f9ef61)
2003-02-21 14:38:14 +00:00
Jim McDonough
83a11f7f0e Sync with HEAD for verifying kerberos tickets.
(This used to be commit 77e1178a88)
2003-02-19 15:48:12 +00:00
Jim McDonough
d08116ffcb Sync w/HEAD - add DES_CBC_CRC encryption type
(This used to be commit c7934f5cb5)
2003-02-18 20:57:29 +00:00
Jeremy Allison
f6fbf0c9db Revert tpot's breakage of the Heimdal fixes.
Jeremy.
(This used to be commit 90336900ad)
2003-01-30 18:01:03 +00:00
Tim Potter
cf292aead6 Sync of Heimdal kerberos stuff with HEAD. If this breaks I'm blaming
the dog again.
(This used to be commit 6f89ee2c9d)
2003-01-30 04:40:12 +00:00
Jeremy Allison
b1bce45141 Finally we compile with Heimdal as well as MIT ! Wonder if it works... :-).
Jeremy.
(This used to be commit 1b71786c16)
2003-01-28 03:31:33 +00:00
Jeremy Allison
755e33ee3f Get smbd to link with Heimdal. Still missing some client progs...
Jeremy.
(This used to be commit 85dda43476)
2003-01-28 00:33:21 +00:00
Jeremy Allison
6cf8ac019e Thanks Meeester Potter, for reverting *all* my Heimdal changes because
I mistyped a comma :-).
Jeremy.
(This used to be commit 04cc149c75)
2003-01-23 18:15:18 +00:00
Tim Potter
c79eccad91 Merge of kerberos changes to make this branch build again!
(This used to be commit 51b319f57f)
2003-01-22 23:32:33 +00:00
Jeremy Allison
e545fe3c0a Get closer to Heimdal compile... Damn. HEAD has different code in
kerberos_verify...
Jeremy.
(This used to be commit e8c4098da6)
2003-01-21 20:43:26 +00:00
Jeremy Allison
18c2948bc5 Fixup proto generation to not include krb5 specific symbols
if no kerberos selected. Noticed by Metze.
Jeremy.
(This used to be commit 0c98f779f0)
2003-01-21 13:33:31 +00:00
Jeremy Allison
b0aadff202 More fixes getting us closer to full Heimdal compile....
Jeremy.
(This used to be commit a7ee6ed645)
2003-01-21 06:23:49 +00:00
Jim McDonough
51d3f61750 should be HAVE_KRB5_SET_REAL_TIME (HAVE_ was missing)...fix the build
(This used to be commit 9f1f3cb8bb)
2003-01-20 19:37:11 +00:00
Jeremy Allison
812e093f02 Merge in more of the SuSE patches for Heimdal. These changes show how
to add a function without an explicit #ifdef HEIMDAL which I'm trying
to avoid.
Jeremy.
(This used to be commit 92ecd0bf0f)
2003-01-19 22:27:32 +00:00
Andrew Bartlett
48dc324cd1 Merge from HEAD - vl's fix to my const patch. Also update the 'not have_krb5'
case.

Andrew Bartlett
(This used to be commit 8129529c4f)
2003-01-04 09:06:46 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Gerald Carter
f2e3b68ce6 fix segfault
(This used to be commit 36bcb312e9)
2002-11-15 17:57:25 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Tridgell
9126a40e2c added trusted realm support to ADS authentication
the method used for checking if a domain is a trusted domain is very
crude, we should really call a backend fn of some sort. For now I'm
using winbindd to do the dirty work.
(This used to be commit adf44a9bd0)
2001-12-19 09:53:30 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f117)
2001-11-28 23:54:07 +00:00
Andrew Tridgell
ad2974cd05 added "net join" command
this completes the first stage of the smbd ADS support
(This used to be commit 058a5aee90)
2001-11-24 14:16:41 +00:00
Jeremy Allison
cfd68eaac4 Ok, I know it's a language thing and it shouldn't matter.... but a kerberos
name is a "principal", not a principle. English majors will complain :-).
Jeremy.
(This used to be commit b668d7d656)
2001-10-21 20:51:27 +00:00
Andrew Bartlett
c41b64d814 Fix for compilation on non-krb5 systems
(This used to be commit 44bdb8b12b)
2001-10-21 04:08:15 +00:00
Andrew Tridgell
bbcd9deb07 made smbclient cope better with arbitrary principle forms
(This used to be commit d1341d74b7)
2001-10-21 03:25:34 +00:00
Andrew Tridgell
93645be91f better krb5 error handling (thanks andrewb!)
(This used to be commit fd3a3daef3)
2001-10-20 06:50:24 +00:00
Andrew Tridgell
5ad7448359 the beginnings of kerberos support in smbd. It doesn't work yet, but
it should give something for others to hack on and possibly find what
I'm doing wrong.
(This used to be commit 353c290f05)
2001-10-18 10:26:06 +00:00
Andrew Tridgell
b886c3b3fa fix heimdal compilation
(This used to be commit 888183a17c)
2001-10-16 12:02:18 +00:00
Andrew Tridgell
9f7cb41f11 added NTLMSSP authentication to libsmb. It seems to work well so I have enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM
(This used to be commit 076aa97bee)
2001-10-12 04:49:42 +00:00
Andrew Tridgell
2b09ef2a2d improve the error handling in the ASN1 code a bit
(This used to be commit 8b692d8326)
2001-10-11 13:49:08 +00:00
Andrew Tridgell
7cd9c611e2 added a ASN.1 parser, so now I can properly parse the negTokenInit
packet which means I can extract the service and realm, so we should
now work with realms other than the local realm.

it also means we now check the list of OIDs given by the server just
in case it says that it doesn't support kerberos. In that case we
should fall back to NTLMSSP but that isn't written yet.
(This used to be commit 395cfeea94)
2001-10-11 13:13:06 +00:00
Andrew Tridgell
8edc45ec4c fixed some memory leaks, started adding asn1 decoder for server side
(This used to be commit 919734c1a6)
2001-10-11 10:29:17 +00:00
Andrew Tridgell
81f56139b6 initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth
(This used to be commit d330575856)
2001-10-11 07:42:52 +00:00