Age | Commit message (Collapse) | Author | Files | Lines |
|
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
(This used to be commit 5b9a7ab901bc311f3ad08462a8a68d133c34a8b4)
|
|
(This used to be commit ad3c8da13b9d510f78fd56364cd0987de88a9b9f)
|
|
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
(This used to be commit b04e91f660d3b26d23044075d4a7e707eb41462d)
|
|
with non-const values - strsep not defined
(This used to be commit a5c59b2cd10016ecbd931531602ad1cb3660bbf9)
|
|
we get a response from WINS for a PDC, if the PDC isn't responding.
(This used to be commit 57916316ffc70b0b6659f3ad9d14aad41fad4c71)
|
|
(This used to be commit 2ee0abb50f25e5a4529d8c9409c979a7a00e5984)
|
|
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
(This used to be commit e358d7b24c86a46d8c361b9e32a25d4f71a6dc00)
|
|
from some of the callers.
Andrew Bartlett
(This used to be commit eb3354aa6c7293df9a728565a6774049b2e6d57f)
|
|
(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
(This used to be commit 30d0998c8c1a1d4de38ef0fbc83c2b763e05a3e6)
|
|
same name as the machine name exists. (we ended up setting the users
password, not the machines password!)
(This used to be commit fe1e6233c6f0a5654bcc3ab34f65bb570efc69b1)
|
|
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 used to be commit 5538048e4f6dd224b2990f3c6a3e99fd07065f77)
|
|
a char** isn't quite the same thing as a struct berval** :)
(This used to be commit a92834ea9460bc49be99d6d5b0d41a817e6f0824)
|
|
broken
(This used to be commit 022073d140bae960613127a6d9422e443a8098c6)
|
|
this fixes the huge number of struct berval warnings on non-ads
compiles
(This used to be commit e7f588d8156856109623b5f5a3841c5d096b1185)
|
|
str_list_copy(). Perhaps its proto should be fixed.
(This used to be commit b81bc2b34b620c24a148435d9913bd1a1528c983)
|
|
(This used to be commit b361089360068b91e9f4d221abdc3c8351596a7f)
|
|
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...
(This used to be commit f924cb53580bc081ff34e45abba57629018c68d6)
|
|
(This used to be commit b84882a628b3f2f0890322f25694c1932aa3e5ec)
|
|
changes ...
(This used to be commit 8096032663690eafb6bb8b4f405d6231389d4f80)
|
|
(This used to be commit 3e58a1ee83ea0b4347ce24e566445cc6cb67bb3a)
|
|
- Add doxygen comments
- remove server sort control (ms implementation was not reliable)
- rename ads_do_search_all2() to ads_do_search_all_fn()
(This used to be commit 7aa5fa617221019de0f4565d07842df72673e154)
|
|
- 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?
(This used to be commit 95bec4c8bae0e29f816ec0751bf66404e1f2098e)
|
|
out since it's already in ads_errstr() in ads_status.c
(This used to be commit 0475126ffb69f0485fd31511cb13d98df74a8d5b)
|
|
I've got the cases besides gssapi...anyone know how to get those?
(This used to be commit c937e1352207ad90e8257ad6c9f8b7c9cf92030d)
|
|
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.
(This used to be commit f01f02fc569b4f5101a37d3b493f2fe2d2b2677a)
|
|
defeats the purpose.
(This used to be commit 71806c49b366faf2466eee7352c71fcdfefd8cc1)
|
|
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.
(This used to be commit 2bebc8a391bd80bd0e5adbedb3757fb4279ec414)
|
|
to paged searches. This makes updating winbindd to used paged searches
trivial.
(This used to be commit 514c11b4e3fcc765a8087405333bd351c05c9e36)
|
|
referrals parsing in the openldap libs. By disabling referrals we get
valid controls back and the cookies work.
(This used to be commit 8bf487ddff240150d7a92aaa0f978dd30062c331)
|
|
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.
(This used to be commit 9afba67f9a56699e34735e1e425f97b2464f2402)
|
|
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!
(This used to be commit 93389647203395da0e894c2e57348081e755884a)
|
|
(This used to be commit 3396a671c59e6afe70a22ce64e4a9381b1d6fef8)
|
|
<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.
(This used to be commit 6891393b5db868246fe52ff62b3dc6aa5ca6f726)
|
|
(This used to be commit 2d620909f9def17dacf2af997a32d596f4dbd827)
|
|
should be LDAP_MOD_REPLACE. Caught by Alexey Kotovich.
(This used to be commit be48a05ed95f0f4ed02ffb996cb1ecc10811d9a0)
|
|
(This used to be commit 1f186c60ad957c0e8157a6fd903857121c65a2e0)
|
|
malloc checks and return ADS_ERROR(LDAP_NO_MEMORY) if they fail.
(This used to be commit 81d76f05d8b886a86eb421d1bd8737ec7d05cbde)
|
|
get trusted domains query but leave the domain SID blank - we need to
fail the add of the trusted domain in winbindd in that case
(This used to be commit 24c7e7a3849df3a3378f7e7f20099de048f0b7bd)
|
|
control for permissive modify.
(This used to be commit 01e7f7c3d9006883b71e43d917d32e325cff7a15)
|
|
BOOLs. Add support for bervals in mod lists. Also put undocumented AD ldap control in to allow modifications when an attribute does not yet exist.
(This used to be commit 1a2d27b21e61be5a314f7d6c4ea0dff06a5307be)
|
|
attributes until a method for checking for their existence is done.
(This used to be commit 538c19a6983e0423b94f743184263cd8ef9c701e)
|
|
to void **
(This used to be commit 9467792843fdd9bc55e92bfaa2f2205279074297)
|
|
(This used to be commit 3d8d8cef64c674f9f1240759a05766db95bfde4e)
|
|
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
|
|
a username on the commandline. Also don't continue past the kinit if a password is entered and fails because existing tickets would be used, which may not be desired if the username was specified.
(This used to be commit 7e5d7dfa834c0161460bde8a2f0d4824c0a0d1fe)
|
|
(This used to be commit 7e876057d5e392f85e6fdb0f2c233b0fe76df688)
|
|
This fixes up a problem where a machine would join (or downgrade by trust
password change) to NT4 membership and not be able to regain full ADS
membership until a 'net ads leave'.
Andrew Bartlett
(This used to be commit ab8ff85f03b25a0dfe4ab63886a10da81207393c)
|
|
(This used to be commit f383e19e095eab975bf3d4e622a5c1d1f823171b)
|
|
We now include the libber.h file if required, but currently we just don't use
ldap. (I'll chase this up).
In the meantime, I've moved the ads_status code about, its now in its own file,
and has a couple of #ifdefs to allow smbd to link - becouse the lack of LDAP
caused HAVE_ADS to be undefined. (I hope its not too ugly).
Andrew Bartlett
(This used to be commit 14407c87e2dcccae1784290e3eb7a2d611516aff)
|
|
(This used to be commit ff002a458afa6ca378f0c6d2ec9fb74233c839a7)
|