1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

58 Commits

Author SHA1 Message Date
Günther Deschner
a71c7b4e17 r2474: (re-)fix memleak (initially found by jra).
heimdal 0.6.1rc3 had a bug causing winbindd to die, heimdal version
0.6.1 and higher have that fixed (thanks to Love from Heimdal).

SuSE has been informed about this possible pitfall, any other vendors
that ship with heimdal-0.6.1rc3 to be notified ?

Guenther
(This used to be commit 6239a5bec99c62032e0cde20679a71622dd7a059)
2007-10-10 10:52:44 -05:00
Günther Deschner
83d5892eab r2472: Fixed krb5_krbhost_get_addrinfo()-parameters and make failure
of this call non-critical.

Thanks to Love for the patch and explaining the inner workings of
heimdal.

Guenther
(This used to be commit 4bd9d8240b571fdd8546af4eea3f4f148987d57c)
2007-10-10 10:52:44 -05:00
Günther Deschner
77cc4121cf r2057: Although rarely used, prevent "net lookup kdc" from segfaulting when
using our own implementation of krb5_lookup_kdc with heimdal. Also,
heimdals krb5_krbhst_next() obviously does not retrieve the struct
addrinfo in the krb5_krbhst_info-struct, using
krb5_krbhst_get_addrinfo() instead.

Guenther
(This used to be commit cca660e109cc94b49ac6bf1f2802235d1d4d4383)
2007-10-10 10:52:29 -05:00
Andrew Bartlett
608172ebe3 r1428: Remove *completly bogus* memset. (No doubt my bug, too...).
This memset could well have clobbered bits of the stack, because
session_key changed from

char session_key[16];

to

DATA_BLOB session_key

Andrew Bartlett
(This used to be commit 54248a405c9459f93f4200ebb0dc71748ae2fc83)
2007-10-10 10:52:11 -05:00
Gerald Carter
0122d4ef5e r1407: revert change that broke the build on systems w/o krb5 files
(This used to be commit 89a11b5d7c0939c9344115ef509cbb0567d7524a)
2007-10-10 10:52:10 -05:00
Gerald Carter
824bc32be7 r1399: applying heimdal krb5 fixes from Guenther and fixing compile warnings in libadskerberos_keyatb.c
(This used to be commit 837f56ec8bc171497fb84d332002776313c26305)
2007-10-10 10:52:10 -05:00
Volker Lendecke
d095357d08 r1287: Attempt to fix the build for systems without kerberos headers.
Volker
(This used to be commit 43020cf459da24a915a39b770cec95a524d487c7)
2007-10-10 10:52:04 -05:00
Jeremy Allison
2b76b28932 r1236: Heimdal fixes from Guenther Deschner <gd@sernet.de>, more to come before
it compiles with Heimdal.
Jeremy.
(This used to be commit dd07278b892770ac51750b87a4ab902d4de3a960)
2007-10-10 10:52:01 -05:00
Jeremy Allison
7825677b86 r1222: Valgrind memory leak fixes. Still tracking down a strange one...
Can't fix the krb5 memory leaks inside that library :-(.
Jeremy.
(This used to be commit ad440213aaae58fb5bff6e8a6fcf811c5ba83669)
2007-10-10 10:52:00 -05:00
Jeremy Allison
59d1794527 r1194: Definition of krb5_free_unparsed_name() if we do't have it.
Jeremy.
(This used to be commit 82c219ea023dd546fcde29569725865a42e4198e)
2007-10-10 10:51:59 -05:00
Gerald Carter
63378d6f0e r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal; also initialize some pointers
(This used to be commit be74e88d9a4b74fcaf25b0816e3fa8a487c91ab5)
2007-10-10 10:51:28 -05:00
Jeremy Allison
33ebb4bee5 r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.
Jeremy.
(This used to be commit b2ba4d5c1be6089e3818a20c68e3894432b53d87)
2007-10-10 10:51:27 -05:00
Jim McDonough
3c62df4780 r221: Remainder of bug 1208. We do not remove creds from _any_ FILE ccache,
because not only does it not work on Heimdal, but also since ccaches
created within samba are memory-based, so we shouldn't touch a
FILE-based one (it was probably created via kinit or similar).
(This used to be commit 5971b0980ca8abae2208f22485c5af4c0dde0459)
2007-10-10 10:51:14 -05:00
Jim McDonough
0859a89166 r219: Obtain new tickets if current ones are expired. Next part of fix for
bug 1208. Based on a fix from Guether Deschener.

Outstanding pieces:
- Heimdal FILE-based ccaches don't actually remove creds properly, so we
  need to code a check for this
- what if ticket expires between our check and when we use it?

Guenther has coded up fixes for these parts, but I still need
to review them, as I'm not totally comfortable with the solutions.
(This used to be commit ef008b9710e682f87f0bbf526d30eb5114264233)
2007-10-10 10:51:14 -05:00
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 7c34de8096b86d2869e7177420fe129bd0c7541d)
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 f3bbc87b0dac63426cda6fac7a295d3aad810ecc)
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 d8ab44685994b302bb46eed9001c72c194d13dc8)
2003-08-15 01:46:09 +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
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 3547cb3def45a90f99f67829a533eac1ccba5e77)
2003-08-14 01:08:00 +00:00
Tim Potter
05540b48f0 Fix unused variable warning.
(This used to be commit 73d02e3a2b0f9e84ab6d8685e4ad6a03ef9249b2)
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 3f9e3b60709df5ab755045a093e642510d4cde00)
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 dd46f8b22d6e8411081a1279e1cd32929e40370b)
2003-07-16 19:17:33 +00:00
Andrew Tridgell
1d008cd2cb use ZERO_STRUCT() instead of memset
(This used to be commit 082084042307f5f7d532b28debdeac11753a05f9)
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 10f1da3f4a9680a039a2aa26301b97e31c06c38d)
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 3f9616a68a855acbae3f405c27ee2358fbe7ba2c)
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 e0c1f9ef61a0ec4f06a0b0e257497943195b5297)
2003-02-21 14:38:14 +00:00
Jim McDonough
83a11f7f0e Sync with HEAD for verifying kerberos tickets.
(This used to be commit 77e1178a888f0d380a5ef94911a8f07bf04a7ba3)
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 c7934f5cb56d54a90c9ffdbe2f7429a3c9227abe)
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 90336900ad2a6d50e1d42f7bc59fdc7c762187d3)
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 6f89ee2c9dc7f03e3dbe7aa734bf67c6a434d135)
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 1b71786c161cd8ec4c3c0c6b178370ed50feeef4)
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 85dda434763bbcea260c800599e4b6b73afcf174)
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 04cc149c756c396012cfa321a74724b077302b95)
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 51b319f57f28e3993919d7f3db0251a724902332)
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 e8c4098da619a1429cc4c8251761333a7c0f3458)
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 0c98f779f05431ac4d298c9f021fca85d16aebae)
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 a7ee6ed64500a0d949849da6996b7dc837518f00)
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 9f1f3cb8bb3d7d9b4fb414b06ad10356f775bb28)
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 92ecd0bf0fe2cc4f6c86ca48e6e458e726470a50)
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 8129529c4faec5ea630acf70b7514a3efc0fbdcf)
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 3a7458f9472432ef12c43008414925fd1ce8ea0c)
2003-01-03 08:28:12 +00:00
Gerald Carter
f2e3b68ce6 fix segfault
(This used to be commit 36bcb312e95f46d196575ed3535679deeddd89b0)
2002-11-15 17:57:25 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
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 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
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 adf44a9bd0d997ba4dcfadc564a29149531525af)
2001-12-19 09:53:30 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f11700bbaa5778a9678a990a2b041fcefe)
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 058a5aee901e6609969ef7e1d482a720a84a4a12)
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 b668d7d656cdd066820fb8044f24bcd4fda29524)
2001-10-21 20:51:27 +00:00
Andrew Bartlett
c41b64d814 Fix for compilation on non-krb5 systems
(This used to be commit 44bdb8b12b3d6a7bf3148c2ac651a79f10776db6)
2001-10-21 04:08:15 +00:00
Andrew Tridgell
bbcd9deb07 made smbclient cope better with arbitrary principle forms
(This used to be commit d1341d74b7aa5f6b3f72e5409b245f87f1ad670b)
2001-10-21 03:25:34 +00:00