diff options
author | Volker Lendecke <vl@samba.org> | 2009-08-02 10:43:05 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-08-02 11:24:48 +0200 |
commit | 4f147388c0512fc291cc53764c017d7117154afc (patch) | |
tree | b4a4ee3fba145c2c2710c4c782d653b245d96fdc /source3/winbindd/winbindd_util.c | |
parent | 62fec968193e8a96ccffef216aba30ffb681d33a (diff) | |
download | samba-4f147388c0512fc291cc53764c017d7117154afc.tar.gz samba-4f147388c0512fc291cc53764c017d7117154afc.tar.xz samba-4f147388c0512fc291cc53764c017d7117154afc.zip |
Refactor 9b78af1f: Fix lookupname recursion
Pass a "flags" argument instead of the original winbind command down the
name_to_sid chain. This way we are independent of the winbind commands and
can take the decision at a much higher level
Diffstat (limited to 'source3/winbindd/winbindd_util.c')
-rw-r--r-- | source3/winbindd/winbindd_util.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 99b4542f0bd..c564ef9f51e 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -886,9 +886,14 @@ bool winbindd_lookup_sid_by_name(TALLOC_CTX *mem_ctx, { NTSTATUS result; - /* Lookup name */ - result = domain->methods->name_to_sid(domain, mem_ctx, orig_cmd, - domain_name, name, sid, type); + /* + * For all but LOOKUPNAME we have to avoid nss calls to avoid + * recursion + */ + result = domain->methods->name_to_sid( + domain, mem_ctx, domain_name, name, + orig_cmd == WINBINDD_LOOKUPNAME ? 0 : LOOKUP_NAME_NO_NSS, + sid, type); /* Return sid and type if lookup successful */ if (!NT_STATUS_IS_OK(result)) { |