diff options
author | Tim Potter <tpot@samba.org> | 2001-10-10 23:08:13 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-10-10 23:08:13 +0000 |
commit | 1f48b3640f971705d53e2f59aab311927b7c54a5 (patch) | |
tree | 1889da0c43b77f1b1758e8c55cca3d8581147a30 /source3/nsswitch/winbindd_util.c | |
parent | de2ece0543bbd0b013310667ebdf33abe78a0ac4 (diff) | |
download | samba-1f48b3640f971705d53e2f59aab311927b7c54a5.tar.gz samba-1f48b3640f971705d53e2f59aab311927b7c54a5.tar.bz2 samba-1f48b3640f971705d53e2f59aab311927b7c54a5.zip |
Got the rest of the group functions working. Did some reformatting (man
what was I thinking with those 4 character tabs?)
We now pass our winbindd test suite again!
Still to do:
- talloc_ctx on a per winbindd request basis not per connection
- clean up old crap we don't use any more
- test against multiple BDCs (I know this isn't going to work - group/user
handles have to be made against the same DC the domain and basic handles
are.
- implement network and dc failure recovery
(This used to be commit dc4ca0e0bd779b9157ea3b2a8f17eb455abf0f26)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index a5e558f658..23f46f239a 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -29,34 +29,35 @@ static struct winbindd_domain *add_trusted_domain(char *domain_name, DOM_SID *domain_sid) { - struct winbindd_domain *domain, *tmp; - - for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { - if (strcmp(domain_name, tmp->name) == 0) { - DEBUG(3, ("domain %s already in domain list\n", - domain_name)); - return tmp; - } - } - - DEBUG(1, ("adding domain %s\n", domain_name)); - - /* Create new domain entry */ - - if ((domain = (struct winbindd_domain *)malloc(sizeof(*domain))) == NULL) - return NULL; - - /* Fill in fields */ - - ZERO_STRUCTP(domain); - fstrcpy(domain->name, domain_name); - sid_copy(&domain->sid, domain_sid); - - /* Link to domain list */ - - DLIST_ADD(domain_list, domain); + struct winbindd_domain *domain, *tmp; + + for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { + if (strcmp(domain_name, tmp->name) == 0) { + DEBUG(3, ("domain %s already in domain list\n", + domain_name)); + return tmp; + } + } + + DEBUG(1, ("adding domain %s\n", domain_name)); + + /* Create new domain entry */ + + if ((domain = (struct winbindd_domain *) + malloc(sizeof(*domain))) == NULL) + return NULL; - return domain; + /* Fill in fields */ + + ZERO_STRUCTP(domain); + fstrcpy(domain->name, domain_name); + sid_copy(&domain->sid, domain_sid); + + /* Link to domain list */ + + DLIST_ADD(domain_list, domain); + + return domain; } /* Look up global info for the winbind daemon */ @@ -674,11 +675,8 @@ struct winbindd_domain *find_domain_from_sid(DOM_SID *sid) /* Search through list */ for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { - if (sid_equal(sid, &tmp->sid)) { - if (!tmp->got_domain_info) - return NULL; + if (sid_equal(sid, &tmp->sid)) return tmp; - } } /* Not found */ |