diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-03 08:17:46 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-03 08:17:46 +0000 |
commit | c868fe502bb9ea2b5c5452a49f89ec19ab58f2ba (patch) | |
tree | 86edb9b1c7ecf32553539a22e1bd232c99358845 /source3/nsswitch/winbindd_sid.c | |
parent | b6b84cf7099c3b2cee777cf9514b3e6665a4025f (diff) | |
download | samba-c868fe502bb9ea2b5c5452a49f89ec19ab58f2ba.tar.gz samba-c868fe502bb9ea2b5c5452a49f89ec19ab58f2ba.tar.bz2 samba-c868fe502bb9ea2b5c5452a49f89ec19ab58f2ba.zip |
added name_to_sid to the backend
(This used to be commit 816e40a51af80a7f703c0451304de406deab3dd8)
Diffstat (limited to 'source3/nsswitch/winbindd_sid.c')
-rw-r--r-- | source3/nsswitch/winbindd_sid.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c index bc014f2691..07537b82fa 100644 --- a/source3/nsswitch/winbindd_sid.c +++ b/source3/nsswitch/winbindd_sid.c @@ -70,7 +70,7 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) enum SID_NAME_USE type; fstring sid_str, name_domain, name_user, name; DOM_SID sid; - + struct winbindd_domain *domain; DEBUG(3, ("[%5d]: lookupname %s\n", state->pid, state->request.data.name)); @@ -78,9 +78,14 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) snprintf(name, sizeof(name), "%s\\%s", name_domain, name_user); - /* Lookup name from PDC using lsa_lookup_names() */ + if ((domain = find_domain_from_name(name_domain)) == NULL) { + DEBUG(0, ("could not find domain entry for domain %s\n", + name_domain)); + return WINBINDD_ERROR; + } - if (!winbindd_lookup_sid_by_name(name, &sid, &type)) { + /* Lookup name from PDC using lsa_lookup_names() */ + if (!winbindd_lookup_sid_by_name(domain, name, &sid, &type)) { return WINBINDD_ERROR; } |