mirror of
https://github.com/samba-team/samba.git
synced 2025-09-17 05:44:20 +03:00
s3: Fix a winbind crash
nss_get_info_cached might have invalidated "ads" deep inside.
This commit is contained in:
@@ -549,10 +549,15 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
|
|||||||
|
|
||||||
info->acct_name = ads_pull_username(ads, mem_ctx, msg);
|
info->acct_name = ads_pull_username(ads, mem_ctx, msg);
|
||||||
|
|
||||||
nss_get_info_cached( domain, sid, mem_ctx, ads, msg,
|
status = nss_get_info_cached( domain, sid, mem_ctx, ads, msg,
|
||||||
&info->homedir, &info->shell, &info->full_name,
|
&info->homedir, &info->shell, &info->full_name,
|
||||||
&gid);
|
&gid);
|
||||||
info->primary_gid = gid;
|
info->primary_gid = gid;
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
DEBUG(1, ("nss_get_info_cached failed: %s\n",
|
||||||
|
nt_errstr(status)));
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
if (info->full_name == NULL) {
|
if (info->full_name == NULL) {
|
||||||
info->full_name = ads_pull_string(ads, mem_ctx, msg, "name");
|
info->full_name = ads_pull_string(ads, mem_ctx, msg, "name");
|
||||||
|
Reference in New Issue
Block a user