diff options
-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 0595034123c..c7cbb53125b 100644 --- a/source3/winbindd/wb_getpwsid.c +++ b/source3/winbindd/wb_getpwsid.c @@ -95,25 +95,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)); |