diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-09-06 11:46:59 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-09-06 11:46:59 +0000 |
commit | eec38ee3bb4bceeaa82abf8df1cce92b6a5781ce (patch) | |
tree | 505c354bdb503f732dce311a8e823af2415efe38 /source3/nsswitch | |
parent | c4d1f9a1e8961c051eb1cee2aa9d93b1b120d836 (diff) | |
download | samba-eec38ee3bb4bceeaa82abf8df1cce92b6a5781ce.tar.gz samba-eec38ee3bb4bceeaa82abf8df1cce92b6a5781ce.tar.bz2 samba-eec38ee3bb4bceeaa82abf8df1cce92b6a5781ce.zip |
Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de>
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)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index b0b70178a4..4f91ed0f20 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -143,7 +143,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) /* if we get ECONNREFUSED then it might be a NT4 server, fall back to MSRPC */ if (status.error_type == ADS_ERROR_SYSTEM && - status.rc == ECONNREFUSED) { + status.err.rc == ECONNREFUSED) { DEBUG(1,("Trying MSRPC methods\n")); domain->methods = &msrpc_methods; } @@ -170,9 +170,9 @@ static void sid_from_rid(struct winbindd_domain *domain, uint32 rid, DOM_SID *si static enum SID_NAME_USE ads_atype_map(uint32 atype) { switch (atype & 0xF0000000) { - case ATYPE_GROUP: + case ATYPE_GLOBAL_GROUP: return SID_NAME_DOM_GRP; - case ATYPE_USER: + case ATYPE_ACCOUNT: return SID_NAME_USER; default: DEBUG(1,("hmm, need to map account type 0x%x\n", atype)); @@ -339,7 +339,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, if (!ads_pull_uint32(ads, msg, "sAMAccountType", &account_type) || - !(account_type & ATYPE_GROUP)) continue; + !(account_type & ATYPE_GLOBAL_GROUP)) continue; name = pull_username(ads, mem_ctx, msg); gecos = ads_pull_string(ads, mem_ctx, msg, "name"); |