summaryrefslogtreecommitdiffstats
path: root/source/libads
Commit message (Collapse)AuthorAgeFilesLines
...
* Seems I missed commiting this when I added the rest of metze's ADS patch.Andrew Bartlett2002-09-061-0/+75
| | | | | | Oh well, here it is... Andrew Bartlett
* Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de>Andrew Bartlett2002-09-062-8/+42
| | | | | | | | | | | | | to extend the ADS_STATUS system to include NTSTATUS, and to provide a better general infrustructure for his sam_ads work. I've also added some extra failure mode DEBUG()s to parts of the code. NOTE: The ADS_ERR_OK() macro is rather sensitive to braketing issues - without the final set of brakets, the test is essentially inverted - causing some intersting 'error = success' messages... Andrew Bartlett
* Add some DEBUG()s to some libads failure modes.Andrew Bartlett2002-09-061-1/+5
|
* convert the LDAP/SASL code to use GSS-SPNEGO if possibleAndrew Tridgell2002-08-302-34/+221
| | | | | | | | | | | | | | | | we now do this: - look for suported SASL mechanisms on the LDAP server - choose GSS-SPNEGO if possible - within GSS-SPNEGO choose KRB5 if we can do a kinit - otherwise use NTLMSSP This change also means that we no longer rely on having a gssapi library to do ADS. todo: - add TLS/SSL support over LDAP - change to using LDAP/SSL for password change in ADS
* fix irix compile errors - cannot initialize array in declaration statementHerb Lewis2002-08-201-2/+9
| | | | with non-const values - strsep not defined
* when using netbios lookup methods make sure we try any BDCs even ifAndrew Tridgell2002-08-061-9/+21
| | | | we get a response from WINS for a PDC, if the PDC isn't responding.
* fixed a memory corruption bug in ads_try_dns()Andrew Tridgell2002-08-061-3/+3
|
* This fixes a number of ADS problems, particularly with netbioslessAndrew Tridgell2002-08-057-170/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm
* Now that I got the function arguments sane, remove the silly (void **) castsAndrew Bartlett2002-08-041-9/+9
| | | | | | from some of the callers. Andrew Bartlett
* net ads info now reports the IP of the LDAP server as well as its name - ↵Andrew Tridgell2002-07-301-0/+6
| | | | very useful in scripts
* a couple more minor tweaks. This now allows us to operate in ADS modeAndrew Tridgell2002-07-301-0/+6
| | | | | without any 'realm =' or 'ads server =' options at all, as long as DNS is working right.
* More fixes towards warnings on the IRIX compilerAndrew Bartlett2002-07-201-2/+2
| | | | | | | | | | | | (and yes, some of these are real bugs) In particular, the samr code was doing an &foo of various types, to a function that assumed uint32. If time_t isn't 32 bits long, that broke. They are assignment compatible however, so use that and an intermediate variable. Andrew Bartlett
* fix setting machine passwords in the case where a user account of theAndrew Tridgell2002-07-121-1/+5
| | | | | same name as the machine name exists. (we ended up setting the users password, not the machines password!)
* this implements a completely new strategy for fetching groupAndrew Tridgell2002-07-111-0/+35
| | | | | | | | | | | | membership from an ADS server. We now use a 'member' query on the group and do a separate call to convert the resulting distinguished name to a name, rid etc. This is *much* faster for very large numbers of groups (on a quantum test system with 10000 groups it drops the time from an hour to about 35 seconds). strangely enough, this actually *increases* the amount of ldap traffic, its just that the MS LDAP server answers these queries much faster.
* this fixes the ads dump codeAndrew Tridgell2002-07-111-3/+3
| | | | a char** isn't quite the same thing as a struct berval** :)
* make sure we disable referrals in all ldap searches - they are badlyAndrew Tridgell2002-07-091-0/+3
| | | | broken
* Fix length in snprintf invocation to account for "dn:" in sasl gssapi bind.Jim McDonough2002-07-081-2/+1
| | | | | | Also remove unused line which incremented pointer by the wrong length anyway. Provided by Anthony Liguori (aliguori@us.ibm.com).
* Kill off const warnings - add a pile of const to various places.Andrew Bartlett2002-07-081-1/+1
|
* used findstatic.pl to make some variables static and remove some deadAndrew Tridgell2002-07-011-15/+3
| | | | code
* ads_mod_ber should be static, not publicAndrew Tridgell2002-07-011-2/+2
| | | | | this fixes the huge number of struct berval warnings on non-ads compiles
* Const cleanup...should only be 2 warnings left from calling lib/util_str.cJim McDonough2002-06-281-117/+158
| | | | str_list_copy(). Perhaps its proto should be fixed.
* Reduce compiler warnings.Jim McDonough2002-06-261-28/+36
|
* Break up samba's object dependencies, and its prototype includes.Andrew Bartlett2002-06-252-123/+151
| | | | | | | | | | | | | | | | Now smbclient, net, and swat use their own proto files - now the global proto.h The change to libads/kerberos.c was to break up the dependency on secrets.c - we want to be able to write an ADS client that doesn't need local secrets. I have other breakups in the works - I will remove the dependency of rpc_parse on passdb (and therefore secrets.c) shortly. (NOTE: This patch does *not* break up includes.h, or other such forbidden actions). Andrew Bartlett
* Support utf8 on the wire for ads ldap. DN's are converted, as well as strings,Jim McDonough2002-06-243-339/+295
| | | | | | | | | | | | | | though it is up to the calling function to decide whether values are strings or not. Attributes are not converted at this point, though support for it would be simple. I have tested it with users and groups using non-ascii chars, and if the check for alphanumeric user/domain names is removed form sesssetup.c, even a user with accented chars can connect, or even login (via winbind). I have also simplified the interfaces to ads_mod_*, though we will probably want to expand this by a few functions in the near future. We just had too many ways to do the same thing...
* fixed a spelling mistakeAndrew Tridgell2002-06-031-1/+1
|
* This is meant to be accessed via the helper fn, not directly.Andrew Bartlett2002-05-171-1/+1
|
* Add ads group account add function.Jim McDonough2002-05-091-0/+33
|
* fixed trust relationships in ADS winbindd after breaking them with my BDC ↵Andrew Tridgell2002-04-192-5/+12
| | | | changes ...
* fixed the fallback to a BDC for ADS connectionsAndrew Tridgell2002-04-182-1/+42
|
* by using a prompter function we can avoid the bug in the MIT kerberosAndrew Tridgell2002-04-151-7/+25
| | | | libraries with handling blank passwords.
* A few more updates:Jim McDonough2002-04-101-132/+348
| | | | | | - Add doxygen comments - remove server sort control (ms implementation was not reliable) - rename ads_do_search_all2() to ads_do_search_all_fn()
* Several updates to get server side sorting going:Jim McDonough2002-04-051-26/+78
| | | | | | | | | | | | | | | - Added sort control to ads_do_paged_search. It allows a char * to be passed as the sort key. If NULL, no sort is done. - fixed a bug in the processing of controls (loop wasn't incremented properly) - Added ads_do_search_all2, which funs a function that is passed in against each entry. No ldapmessage structures are returned. Allows results to be processed as the come in on each page. I'd like ads_do_search_all2 to replace ads_do_search_all, but there's some work to be done in winbindd_ads.c first. Also, perhaps now we can do async ldap searches? Allow us to process a page while the server retrieves the next one?
* Try harder next time to not duplicate function...take ads_err2string backJim McDonough2002-04-041-15/+0
| | | | out since it's already in ads_errstr() in ads_status.c
* Contains functions to manage/view AD user accounts via ldap. Initially has fnsJim McDonough2002-04-041-0/+80
| | | | to find and add a user.
* Add ads_err2string() function for generating error strings from an ADS_STATUS.Jim McDonough2002-04-041-0/+15
| | | | I've got the cases besides gssapi...anyone know how to get those?
* Added ads_process_results(), which takes a function that is called for eachJim McDonough2002-03-291-20/+73
| | | | | | | | entry returned from a search, and applies it to the results. Re-structured ads_dump to use this, plus changed the ber_free in ads_dump from (b,1) to (b,0), in accordance with openldap manpages. Also allows proper free of result using ldap_msgfree afterwards, so you can do something with the results after an ads_dump.
* Whoops, left the paged control not critical in the paged search...kind ofJim McDonough2002-03-271-1/+1
| | | | defeats the purpose.
* Add server control to prevent referrals in paged searches. This keepsJim McDonough2002-03-271-6/+18
| | | | | | the scope limited to the domain at hand, and also keeps the openldap libs happy, since they don't currently chase referrals and return server controls properly at the same time.
* Stomped on some header file version numbers that have crept back in.Tim Potter2002-03-221-2/+1
|
* added a ads_do_search_all() call, which is a more convenient interfaceAndrew Tridgell2002-03-191-0/+42
| | | | | to paged searches. This makes updating winbindd to used paged searches trivial.
* fixed paged controls on my box. The problem seems to be incorrectAndrew Tridgell2002-03-191-4/+21
| | | | | referrals parsing in the openldap libs. By disabling referrals we get valid controls back and the cookies work.
* This adds the Paged Result Control to ads searching. The new function, ↵Jim McDonough2002-03-141-0/+79
| | | | ads_do_paged_search, is the same as ads_do_search, but it also contains a count of records returned in this page, and a cookie for resuming, to be passed back. The cookie must start off NULL, and when it returns as NULL, the search is done.
* detect SIZELIMIT_EXCEEDED in ldap queries and truncateAndrew Tridgell2002-03-131-0/+4
| | | | | | the problem is, how the heck do we properly handle these? Jerry? It seems that the Win2000 ADS server only returns a max of 1000 records!
* put in the ADS DNS hack, but commented outAndrew Tridgell2002-03-111-0/+11
|
* forgotten file, oopsAndrew Tridgell2002-03-101-0/+175
|
* yipee! Finally put in the patch from Alexey KotovichAndrew Tridgell2002-03-101-8/+121
| | | | | | | | <a.kotovich@sam-solutions.net> that adds the security decsriptor code for ADS workstation accounts thanks for your patience Cat, and thanks to Andrew Bartlett for extensive reviews and suggestions about this code.
* fix for IRIX compile errorHerb Lewis2002-03-041-3/+4
|
* Fix LDAP modification operation. Cut and paste error: was LDAP_MOD_ADD, ↵Jim McDonough2002-02-131-1/+1
| | | | should be LDAP_MOD_REPLACE. Caught by Alexey Kotovich.
* talloc'ify ads modify functions.Jim McDonough2002-02-121-35/+51
|
* talloc'ify ads modify functions. Also add more complete berval support.Jim McDonough2002-02-121-122/+119
|