1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

444 Commits

Author SHA1 Message Date
Jeremy Allison
9e0534a1b6 Put mutex around access of replay cache for krb5 tickets. krb5 replay cache
is not multi-process safe.
Jeremy.
-
Jeremy Allison
e8425df77c Typo on my part. I typed KRB5_KDB_BAD_ENCTYPE when I meant to type KRB5_BAD_ENCTYPE.
Heimdal has the latter, not the former.
Jeremy.
-
Jim McDonough
4ff322ccf9 Fix the build on Heimdal. KRB5_KDB_BAD_ENCTYPE doesn't exist on Heimdal, and
it's a different rc than KRB5_BAD_ENCTYPE (which exists on both MIT and
Heimdal).  This will just make the debug show up at level 3 always.

Jeremy, you may want to revisit this, but it's probably not worth the hassle.
-
Jeremy Allison
29dd71ddea Improved debug messages whilst trying to track down kerb issues.
Jeremy.
-
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.
-
Gerald Carter
6edc7e0a74 fix case where no realm or workgroup means to use our own -
Gerald Carter
83376671c5 connect to the right realm or domain for trusted AD domains -
Jeremy Allison
4e9359a1f6 Fixed memory leaks, added krb5 replay cache. Now I need to add code to check
the incoming addresses....
Jeremy.
-
Tim Potter
8d8d85ecd6 Fix shadow parameter warning. -
Tim Potter
42fdcef324 Call the synchronous version of the ldap delete function otherwise we end up
treating the returned message id as an error code.
-
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Tim Potter
814519c5de Implemented 'net ads printer search' which searches the directory for
published printers.

At the moment we don't search using any parameters but this can be
fixed by changing the LDAP search string.  Also we should contact
the global catalog at SRV _gc._tcp instead of the ldap server we
get back from ads_startup().
-
Tim Potter
ae6c05ea72 Fix bug in doxygen comments for ads search functions. -
Tim Potter
5ffb8e0920 Fix shadow variable warnings. -
Gerald Carter
2a76101a3a * fix typos in a few debug statements
* check negative connection cache before ads_try_connect()
  in ads_find_dc()
-
Gerald Carter
d7f7fcda42 large change:
*)  consolidates the dc location routines again (dns
    and netbios)  get_dc_list() or get_sorted_dc_list()
    is the authoritative means of locating DC's again.

    (also inludes a flag to get_dc_list() to define
     if this should be a DNS only lookup or not)

    (however, if you set "name resolve order = hosts wins"
     you could still get DNS queries for domain name IFF
     ldap_domain2hostlist() fails.  The answer?  Fix your DNS
     setup)

*)  enabled DOMAIN<0x1c> lookups to be funneled through
    resolve_hosts resulting in a call to ldap_domain2hostlist()
    if lp_security() == SEC_ADS

*)  enables name cache for winbind ADS backend

*)  enable the negative connection cache for winbind
    ADS backend

*)  removes some old dead code

*)  consolidates some duplicate code

*)  moves the internal_name_resolve() to use an IP/port pair
    to deal with SRV RR dns replies.  The namecache code
    also supports the IP:port syntax now as well.

*)  removes 'ads server' and moves the functionality back
    into 'password server' (which can support "hostname:port"
    syntax now but works fine with defaults depending on
    the value of lp_security())
-
Gerald Carter
f8cab8635b * s/get_dc_name/rpc_dc_name/g (revert a previous change)
* move back to qsort() for sorting IP address in get_dc_list()

* remove dc_name_cache in cm_get_dc_name() since it slowed
  things down more than it helped.  I've made a note of where
  to add in the negative connection cache in the ads code.
  Will come back to that.

* fix rpcclient to use PRINTER_ALL_ACCESS for set printer (instead
  of MAX_ALLOWED)

* only enumerate domain local groups in our domain

* simplify ldap search for seqnum in winbindd's rpc backend
-
Andrew Tridgell
d1316656b0 we need to call ads_first_entry() before using a ldap result,
otherwise we can segv or return garbage
-
Tim Potter
986eae40f7 Rename some uuid functions so as not to conflict with system
versions.  Fixes bug #154.
-
Tim Potter
c22a4074bd Fix shadow variable warning. -
Andrew Tridgell
23a6ea385c added an auth flag that indicates if we should be allowed to fallback
to NTLMSSP for SASL if krb5 fails. This is important as otherwise the
admin may think that a join has succeeeded when kerberos is actually
broken.
-
Andrew Bartlett
9d4e327850 No matter how special this session key is, it's not worth a level 0.
Hide it behind a level 10, with #ifdef DEBUG_PASSWORD instead.

Andrew Bartlett
-
Jim McDonough
10f1da3f4a More on bug 137: rename more of krb5_xxx functions to not start with krb5_ -
Jim McDonough
4169de6d8f More on bug 137: rename remainder of krb5_xxx functions to not start with krb5_ -
Jim McDonough
0e9836c4e9 Fix bug #137: krb5_set_password is already defined in MIT 1.3 libs, so
we wouldn't build.
-
Jeremy Allison
d7a23afe14 Patch from Luke Howard <lukeh@PADL.COM> to recognise local groups.
Jeremy.
-
Andrew Bartlett
00e08efb5c Patch from Ken Cross to allow an ADS domain join with a username of the form
user@realm, where realm might not be the realm we are joining.

Andrew Bartlett
-
Andrew Bartlett
317158972e Revert patch - we need to try the NTLMSSP code below...
Andrew Bartlett
-
Andrew Bartlett
984321bfab Use the kerberos error from ads_kinit_password() in the return value from
our SASL code - help in printing a useful error message.

Andrew Bartlett
-
Andrew Bartlett
876e00fd11 Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
-
Andrew Bartlett
9ba88c7314 Add const, static and fix a double free() (merge from HEAD). -
Jim McDonough
b0fd4e5555 Move PAC decoding over from HEAD. -
Jelmer Vernooij
d49113caef Change variable name to get this working on gcc 3.2 (Merge from HEAD) -
cvs2svn Import User
381649916e This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
Jim McDonough
28ab8504cf Complete what I've seen (and then some)t of the PAC.
I haven't seen the rid+attr arrays for group membership, nor sids or the same
kind of arrays for resource domains, so I don't know how that will work.

Also, the PAC info type 10 is now decoded, but I don't know what it's for.
It has an NTTIME, a 16-bit name length, and a username.  According to M$,
it's not needed, because they didn't doc it...
-
Jim McDonough
046c2087a1 Decode the PAC! This patch just decodes it and then frees it, so it's just
for doc purposes right now (you can see it in the debug logs).
-
Jelmer Vernooij
71b05cd14a - Support building all auth modules as .so's
- Change 2 variable names to avoid conflicts (patch by Stephan Kulow <coolo@kde.org>)
-
Andrew Bartlett
3aa4f923e9 Merge from HEAD:
net ads password

Heimdal compile fixes.

Andrew Bartlett
-
Andrew Bartlett
64796ed27a The kerberos_verify compoenent of the SessionSetup sync with HEAD.
Andrew Bartlett
-
Andrew Bartlett
f0daa15521 merge from HEAD - dump tokenGroups as sids. -
Andrew Bartlett
56dce7ddad Changes to help the kerberos change password code work on systems that
have some of the labels 'duplicated' (ie, the defines double-up).

Also, to an ads_connect() to try and find our KDC. (So we don't segfualt
*every* time)

Andrew Bartlett
-
Andrew Bartlett
e9da9c500b - Fix a double-free (I can't say I understand the code, but it matches the other
cases and keeps valgrind quiet).

 - Add static

Andrew Bartlett
-
Jeremy Allison
7b945e10a6 More const fixes.
Jeremy.
-
Jeremy Allison
fa93763248 More const fixes.
Jeremy.
-
Andrew Bartlett
43f07e9de7 tokenGroups are SIDs, so dump them as such. -
Andrew Bartlett
8b798f03db Patch from Luke Howard to add mutual kerberos authentication, and SMB session
keys for kerberos authentication.

Andrew Bartlett
-
Andrew Bartlett
ff2b5b2f85 Always initialise -
Andrew Bartlett
eacb8dde7a Make sure these values are never uninitialsised. -
Andrew Bartlett
837680ca51 Merge from HEAD client-side authentication changes:
- new kerberos code, allowing the account to change it's own password
   without special SD settings required
 - NTLMSSP client code, now seperated from cliconnect.c
 - NTLMv2 client code
 - SMB signing fixes

Andrew Bartlett
-
Andrew Bartlett
e3b73d5d65 Fix a DEBUG() formatting, add some more debug to our SID pulling code and
inline the call to prs_copy_all_data_out() so that we can know we are not
overrunning our buffer.

Also check more return values.

Andrew Bartlett
-