diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-26 09:55:38 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-26 09:55:38 +0000 |
commit | 06c79a1757fa953237239288a8736f30db61f193 (patch) | |
tree | 24b1107bd70b045ec1eef4dadf8db57a85744d37 /source3/nsswitch/winbindd_sid.c | |
parent | 4691c931e8a75b01d461395239f463258c1b12be (diff) | |
download | samba-06c79a1757fa953237239288a8736f30db61f193.tar.gz samba-06c79a1757fa953237239288a8736f30db61f193.tar.bz2 samba-06c79a1757fa953237239288a8736f30db61f193.zip |
Change the winbind interface to use seperate 'domain' and 'username' feilds for
the sid->uid and uid->sid conversions.
Remove some duplicate arguments from these funcitons, and update the
request/response structures for this and the 'winbind domain name' feature.
As such 'winbindd_lookup_name' now takes both a domain and username.
(This used to be commit ce1b4d4c309e4a60bec5a53224585bd504264672)
Diffstat (limited to 'source3/nsswitch/winbindd_sid.c')
-rw-r--r-- | source3/nsswitch/winbindd_sid.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c index 34318a633d..5c225703ba 100644 --- a/source3/nsswitch/winbindd_sid.c +++ b/source3/nsswitch/winbindd_sid.c @@ -57,7 +57,9 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) return WINBINDD_ERROR; } - fill_domain_username(state->response.data.name.name, dom_name, name); + fstrcpy(state->response.data.name.dom_name, dom_name); + fstrcpy(state->response.data.name.name, name); + state->response.data.name.type = type; return WINBINDD_OK; @@ -68,14 +70,15 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) { enum SID_NAME_USE type; - fstring sid_str, name_domain, name_user; + fstring sid_str; + char *name_domain, *name_user; DOM_SID sid; struct winbindd_domain *domain; - DEBUG(3, ("[%5d]: lookupname %s\n", state->pid, - state->request.data.name)); + DEBUG(3, ("[%5d]: lookupname [%s]\\[%s]\n", state->pid, + state->request.data.name.dom_name, state->request.data.name.name)); - if (!parse_domain_user(state->request.data.name, name_domain, name_user)) - return WINBINDD_ERROR; + name_domain = state->request.data.name.dom_name; + name_user = state->request.data.name.name; if ((domain = find_domain_from_name(name_domain)) == NULL) { DEBUG(0, ("could not find domain entry for domain %s\n", @@ -84,7 +87,7 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) } /* Lookup name from PDC using lsa_lookup_names() */ - if (!winbindd_lookup_sid_by_name(domain, name_domain, name_user, &sid, &type)) { + if (!winbindd_lookup_sid_by_name(domain, name_user, &sid, &type)) { return WINBINDD_ERROR; } |