diff options
author | Andreas Schneider <asn@samba.org> | 2018-06-20 11:38:28 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-06-25 21:47:19 +0200 |
commit | ee6bd861f3e1f1c3de86fe05976ba22119ba2429 (patch) | |
tree | 39c01ede8a93a25cbde95e5762ff3189937113df | |
parent | 941b5663ca9cdbd347d8f65d6c92f4a3f36ed31a (diff) | |
download | samba-ee6bd861f3e1f1c3de86fe05976ba22119ba2429.tar.gz |
s3:winbind: Fix regression introduced with bso #12851
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12851
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit c1c764925e24788905ab91aa455b415765d6f71f)
-rw-r--r-- | source3/winbindd/wb_getpwsid.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/source3/winbindd/wb_getpwsid.c b/source3/winbindd/wb_getpwsid.c index 8e114abf965..8dc09eb513d 100644 --- a/source3/winbindd/wb_getpwsid.c +++ b/source3/winbindd/wb_getpwsid.c @@ -101,25 +101,17 @@ static void wb_getpwsid_queryuser_done(struct tevent_req *subreq) info->domain_name, acct_name, &mapped_name); - if (NT_STATUS_IS_OK(status)) { - output_username = fill_domain_username_talloc(state, - info->domain_name, - mapped_name, true); - if (output_username == NULL) { - tevent_req_nterror(req, NT_STATUS_NO_MEMORY); - return; - } + if (NT_STATUS_IS_OK(status) || + NT_STATUS_EQUAL(status, NT_STATUS_FILE_RENAMED)) { fstrcpy(acct_name, mapped_name); - } else if (NT_STATUS_EQUAL(status, NT_STATUS_FILE_RENAMED)) { - fstrcpy(acct_name, mapped_name); - } else { - output_username = fill_domain_username_talloc(state, - info->domain_name, - acct_name, true); - if (output_username == NULL) { - tevent_req_nterror(req, NT_STATUS_NO_MEMORY); - return; - } + } + output_username = fill_domain_username_talloc(state, + info->domain_name, + acct_name, + true); + if (output_username == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return; } strlcpy(pw->pw_name, output_username, sizeof(pw->pw_name)); |