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

262 Commits

Author SHA1 Message Date
Jeremy Allison
bb0598faf5 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
(This used to be commit d7e35dfb92)
2003-10-22 23:38:20 +00:00
Tim Potter
72b9e5571a Add configure test for krb5_keytab_entry keyblock vs key member. Bug #636.
(This used to be commit 3daefe9d17)
2003-10-17 04:59:07 +00:00
Gerald Carter
48958b0105 don't call ads_destroy() twice; fixes segfault in winbindd when DC goes down; bug 437
(This used to be commit 1cfbd92404)
2003-10-03 21:43:09 +00:00
Jeremy Allison
ca1c6ebb11 Fix a nasty mess, and also bug #296. passdb/pdb_ldap.c was not converting
to/from utf8 for some calls. The libads code gets this right. Wonder why
the passdb code doesn't use it ?
Jeremy.
(This used to be commit 910d21d316)
2003-09-10 22:33:06 +00:00
Gerald Carter
d5bef211d0 revert retry loops in winbindd_ads as abartket points out, we
already have ads_search_retry() for this.  However, neither
domain_sid() nor sequence_nunber() used this function.  So modify
them to us ads_do_search_retry() so we can specify the base search
DN and scope.
(This used to be commit 89f6adf830)
2003-09-06 18:02:19 +00:00
Jim McDonough
d517c1d613 Try to add memory keytab support. It also includes much of the generic
keytab support code, but it won't be enabled until we add that to smb.conf.
Adapted from the work of Guenther Deschner (gd@suse.com).

Please hammer on this...
(This used to be commit a26fa5bee2)
2003-09-03 00:45:15 +00:00
Volker Lendecke
51dfb55b8a Fix segfault. krb5_free_ticket does not check if it got a NULL ticket.
(This used to be commit 97e4778103)
2003-08-25 09:13:20 +00:00
Gerald Carter
8bfe26b62d metze's autogenerate patch for version.h
(This used to be commit ae452e51b0)
2003-08-20 17:13:38 +00:00
Andrew Bartlett
f1be3a5c5d - Make 'net' use a single funciton for setting the 'use machine account' code.
- Make winbindd try to use kerberos for connections to DCs, so that it can
   access RA=2 servers, particularly for netlogon.
 - Make rpcclient follow the new flags for the NETLOGON pipe
 - Make all the code that uses schannel use the centralised functions for doing so.

Andrew Bartlett
(This used to be commit 96b4187963)
2003-08-19 22:47:10 +00:00
Tim Potter
45b9fd9fb9 Don't print out error in ads_do_search_retry() when it suceeds.
(This used to be commit 617feab422)
2003-08-15 21:23:25 +00:00
Gerald Carter
c904740e95 s/OM_uint32//uint32/g
(This used to be commit f8a092e7b4)
2003-08-15 21:19:34 +00:00
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6)
2003-08-15 04:42:05 +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
Volker Lendecke
bb6dff2cb1 In ads_verify_realm, all we use in the ADS_STRUCT is the
auth.realm. So directly pass that instead of setting up and tearing
down the ADS_STRUCT.

Volker
(This used to be commit ce5b8d2ec2)
2003-08-14 21:07:49 +00:00
Jim McDonough
9f2e6167d2 Update my copyrights according to my agreement with IBM
(This used to be commit c9b209be2b)
2003-08-01 15:21:20 +00:00
Gerald Carter
0d087e3ba2 working on transtive trusts issue:
* use DsEnumerateDomainTrusts() instead of LDAP search.
    wbinfo -m now lists all trusted downlevel domains and
    all domains in the forest.

Thnigs to do:

  o Look at Krb5 connection trusted domains
  o make sure to initial the trusted domain cache as soon
    as possible
(This used to be commit 0ab00ccaed)
2003-07-31 05:43:47 +00:00
Jeremy Allison
316c77ed0b Don't revert something until you've seen if volker has already fixed it :-).
Jeremy.
(This used to be commit d57d9b99df)
2003-07-30 16:34:14 +00:00
Jeremy Allison
f5799f2db2 Comment out mutex until I get dependencies sorted out...
Jeremy
(This used to be commit 382d1732ca)
2003-07-30 15:30:36 +00:00
Jeremy Allison
1b89b58475 Put mutex around access of replay cache for krb5 tickets. krb5 replay cache
is not multi-process safe.
Jeremy.
(This used to be commit 9e0534a1b6)
2003-07-29 21:32:36 +00:00
Jeremy Allison
b40d1a2a76 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.
(This used to be commit e8425df77c)
2003-07-29 17:03:51 +00:00
Jim McDonough
15188bcb02 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.
(This used to be commit 4ff322ccf9)
2003-07-29 16:34:31 +00:00
Jeremy Allison
05875e573c Improved debug messages whilst trying to track down kerb issues.
Jeremy.
(This used to be commit 29dd71ddea)
2003-07-29 00:31:44 +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
Gerald Carter
c916e5e390 fix case where no realm or workgroup means to use our own
(This used to be commit 6edc7e0a74)
2003-07-25 16:42:34 +00:00
Gerald Carter
3a00cedc01 connect to the right realm or domain for trusted AD domains
(This used to be commit 83376671c5)
2003-07-23 19:58:01 +00:00
Jeremy Allison
9c15a65dc3 Fixed memory leaks, added krb5 replay cache. Now I need to add code to check
the incoming addresses....
Jeremy.
(This used to be commit 4e9359a1f6)
2003-07-12 00:27:22 +00:00
Tim Potter
62c48a7dbb Fix shadow parameter warning.
(This used to be commit 8d8d85ecd6)
2003-07-10 08:27:55 +00:00
Tim Potter
b5cd4a8643 Call the synchronous version of the ldap delete function otherwise we end up
treating the returned message id as an error code.
(This used to be commit 42fdcef324)
2003-07-07 02:50:09 +00:00
Jeremy Allison
ce72beb2b5 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.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Tim Potter
baf439cd55 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().
(This used to be commit 814519c5de)
2003-07-03 05:08:51 +00:00
Tim Potter
40ece6552d Fix bug in doxygen comments for ads search functions.
(This used to be commit ae6c05ea72)
2003-07-03 04:12:54 +00:00
Tim Potter
47a07aef5d Fix shadow variable warnings.
(This used to be commit 5ffb8e0920)
2003-06-30 05:42:15 +00:00
Gerald Carter
72876b79c9 * fix typos in a few debug statements
* check negative connection cache before ads_try_connect()
  in ads_find_dc()
(This used to be commit 2a76101a3a)
2003-06-25 19:00:15 +00:00
Gerald Carter
f51d769dd3 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())
(This used to be commit d7f7fcda42)
2003-06-25 17:41:05 +00:00
Gerald Carter
f36c96d59c * 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
(This used to be commit f8cab8635b)
2003-06-23 19:05:23 +00:00
Andrew Tridgell
ec0303820f we need to call ads_first_entry() before using a ldap result,
otherwise we can segv or return garbage
(This used to be commit d1316656b0)
2003-06-16 02:42:00 +00:00
Tim Potter
0a9396dcca Rename some uuid functions so as not to conflict with system
versions.  Fixes bug #154.
(This used to be commit 986eae40f7)
2003-06-13 04:35:53 +00:00
Tim Potter
61742d1117 Fix shadow variable warning.
(This used to be commit c22a4074bd)
2003-06-13 04:29:20 +00:00
Andrew Tridgell
2cfc19f899 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.
(This used to be commit 23a6ea385c)
2003-06-10 03:47:42 +00:00
Andrew Bartlett
adb710d028 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
(This used to be commit 9d4e327850)
2003-06-06 10:22:48 +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
Jim McDonough
1f3b279076 More on bug 137: rename remainder of krb5_xxx functions to not start with krb5_
(This used to be commit 4169de6d8f)
2003-05-30 20:03:18 +00:00
Jim McDonough
0463fc2d77 Fix bug #137: krb5_set_password is already defined in MIT 1.3 libs, so
we wouldn't build.
(This used to be commit 0e9836c4e9)
2003-05-30 19:51:09 +00:00
Jeremy Allison
ec7b079ab3 Patch from Luke Howard <lukeh@PADL.COM> to recognise local groups.
Jeremy.
(This used to be commit d7a23afe14)
2003-05-15 19:43:21 +00:00
Andrew Bartlett
6a19f354e5 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
(This used to be commit 00e08efb5c)
2003-05-04 02:48:11 +00:00
Andrew Bartlett
7041e295eb Revert patch - we need to try the NTLMSSP code below...
Andrew Bartlett
(This used to be commit 317158972e)
2003-04-24 14:07:13 +00:00
Andrew Bartlett
77ced5915d 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
(This used to be commit 984321bfab)
2003-04-24 14:02:02 +00:00
Andrew Bartlett
f071020f5e 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
(This used to be commit 876e00fd11)
2003-04-21 14:09:03 +00:00
Andrew Bartlett
06c99d15e2 Add const, static and fix a double free() (merge from HEAD).
(This used to be commit 9ba88c7314)
2003-04-21 13:10:35 +00:00
Jim McDonough
bdaac40746 Move PAC decoding over from HEAD.
(This used to be commit b0fd4e5555)
2003-04-16 16:57:01 +00:00