1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

125 Commits

Author SHA1 Message Date
Günther Deschner
48d8a9dd9f r10907: Handle the case when we can't verify the PAC signature because the
ticket was encrypted using a DES key (and the Windows KDC still puts
CKSUMTYPE_HMAC_MD5_ARCFOUR in the PAC).

In that case, return to old behaviour and ignore the PAC.

Thanks to Chengjie Liu <chengjie.liu@datadomain.com>.

Guenther
2007-10-10 11:04:55 -05:00
Volker Lendecke
cb816e65a9 r10671: Attempt to fix the build on machines without kerberos headers.
Volker
2007-10-10 11:04:49 -05:00
Gerald Carter
939c3cb5d7 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)
2007-10-10 11:04:48 -05:00
Günther Deschner
10358d16d7 r10210: Fix memleak.
Guenther
2007-10-10 11:03:37 -05:00
Herb Lewis
173375f8d8 r6586: get rid of a few more compiler warnings 2007-10-10 10:56:46 -05:00
Derrell Lipman
615a62b21f r6392: - Fixes bug 2564: when smbc_opendir() was called with a file rather than
a directory, the errno returned could end up as ENOENT rather than ENOTDIR.

- Fixes some compiler warnings which showed up on IRIX, as reported by
  James Peach.
2007-10-10 10:56:40 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Jeremy Allison
efc1b688cf r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
2007-10-10 10:53:42 -05:00
Jeremy Allison
6f6b4c61e0 r4020: Fix for crash reported by Bård Kalbakk <baard@inett.biz>.
Don't go fishing for the authorisation data unless we
know it's there.
Jeremy.
2007-10-10 10:53:28 -05:00
Jeremy Allison
34275bae78 r3538: Fix the build with the latest Heimdal code.
Jeremy.
2007-10-10 10:53:09 -05:00
Jeremy Allison
b08e3bf6fb r3535: Tidy up error reporting. Memory leak with MIT krb5 1.3.5 turns
out to be in the kerberos libraries, not in Samba. Now to test
with Heimdal.
Jeremy
2007-10-10 10:53:08 -05:00
Günther Deschner
05619cfdbf r3439: Finally fix build for platforms without kerberos.
Guenther
2007-10-10 10:53:07 -05:00
Volker Lendecke
b144ce557f r3407: Fix the build 2007-10-10 10:53:06 -05:00
Jeremy Allison
30b8807cf6 r3379: More merging of kerberos keytab and salting fixes from Nalin Dahyabhai <nalin@redhat.com>
(bugid #1717).
Jeremy.
2007-10-10 10:53:05 -05:00
Jeremy Allison
7565019286 r3377: Merge in first part of modified patch from Nalin Dahyabhai <nalin@redhat.com>
for bug #1717.The rest of the code needed to call this patch has not yet been
checked in (that's my next task). This has not yet been tested - I'll do this
once the rest of the patch is integrated.
Jeremy.
2007-10-10 10:53:05 -05:00
Jeremy Allison
eefb911d0c r3345: More MIT/Heimdal tests for comparing enctypes now.
Jeremy.
2007-10-10 10:53:05 -05:00
Jeremy Allison
c9b8049012 r3342: More MIT/Heimdal fixes to allow an enctype to be explicitly set in a krb5_creds
struct.
Jeremy.
2007-10-10 10:53:05 -05:00
Günther Deschner
6239a5bec9 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
2007-10-10 10:52:44 -05:00
Günther Deschner
4bd9d8240b 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
2007-10-10 10:52:44 -05:00
Günther Deschner
cca660e109 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
2007-10-10 10:52:29 -05:00
Andrew Bartlett
54248a405c 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
2007-10-10 10:52:11 -05:00
Gerald Carter
89a11b5d7c r1407: revert change that broke the build on systems w/o krb5 files 2007-10-10 10:52:10 -05:00
Gerald Carter
837f56ec8b r1399: applying heimdal krb5 fixes from Guenther and fixing compile warnings in libadskerberos_keyatb.c 2007-10-10 10:52:10 -05:00
Volker Lendecke
43020cf459 r1287: Attempt to fix the build for systems without kerberos headers.
Volker
2007-10-10 10:52:04 -05:00
Jeremy Allison
dd07278b89 r1236: Heimdal fixes from Guenther Deschner <gd@sernet.de>, more to come before
it compiles with Heimdal.
Jeremy.
2007-10-10 10:52:01 -05:00
Jeremy Allison
ad440213aa r1222: Valgrind memory leak fixes. Still tracking down a strange one...
Can't fix the krb5 memory leaks inside that library :-(.
Jeremy.
2007-10-10 10:52:00 -05:00
Jeremy Allison
82c219ea02 r1194: Definition of krb5_free_unparsed_name() if we do't have it.
Jeremy.
2007-10-10 10:51:59 -05:00
Gerald Carter
be74e88d9a r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal; also initialize some pointers 2007-10-10 10:51:28 -05:00
Jeremy Allison
b2ba4d5c1b r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.
Jeremy.
2007-10-10 10:51:27 -05:00
Jim McDonough
5971b0980c 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).
2007-10-10 10:51:14 -05:00
Jim McDonough
ef008b9710 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.
2007-10-10 10:51:14 -05:00
Andrew Bartlett
7c34de8096 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
-
Andrew Bartlett
f3bbc87b0d 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...
-
Volker Lendecke
d8ab446859 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
-
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX -
Andrew Bartlett
3547cb3def 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
-
Tim Potter
73d02e3a2b Fix unused variable warning. -
Jeremy Allison
3f9e3b6070 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.
-
Jeremy Allison
dd46f8b22d Add krb5_princ_component to Heimdal. Remove cli_ from mark packet signed.
Jeremy.
-
Andrew Tridgell
0820840423 use ZERO_STRUCT() instead of memset -
Jim McDonough
10f1da3f4a More on bug 137: rename more of krb5_xxx functions to not start with krb5_ -
Andrew Bartlett
3f9616a68a Merge from HEAD - sync up SessionSetup code to HEAD, including Luke Howard's
session key and auth verifier patches.

Andrew Bartlett
-
Jim McDonough
e0c1f9ef61 Fix IRIX build...void fn can't return another void fn -
Jim McDonough
77e1178a88 Sync with HEAD for verifying kerberos tickets. -
Jim McDonough
c7934f5cb5 Sync w/HEAD - add DES_CBC_CRC encryption type -
Jeremy Allison
90336900ad Revert tpot's breakage of the Heimdal fixes.
Jeremy.
-
Tim Potter
6f89ee2c9d Sync of Heimdal kerberos stuff with HEAD. If this breaks I'm blaming
the dog again.
-
Jeremy Allison
1b71786c16 Finally we compile with Heimdal as well as MIT ! Wonder if it works... :-).
Jeremy.
-
Jeremy Allison
85dda43476 Get smbd to link with Heimdal. Still missing some client progs...
Jeremy.
-
Jeremy Allison
04cc149c75 Thanks Meeester Potter, for reverting *all* my Heimdal changes because
I mistyped a comma :-).
Jeremy.
-