1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

nsswitch: fill out wbcAuthUserInfo user_principal and dns_domain_name from info6

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2017-12-01 23:26:33 +01:00
parent 59cb1f6f9c
commit c8f76bfd72

View File

@ -100,12 +100,22 @@ static wbcErr wbc_create_auth_info(const struct winbindd_response *resp,
i->account_name = strdup(resp->data.auth.info3.user_name);
BAIL_ON_PTR_ERROR(i->account_name, wbc_status);
i->user_principal= NULL;
if (resp->data.auth.validation_level == 6) {
i->user_principal = strdup(resp->data.auth.info6.principal_name);
BAIL_ON_PTR_ERROR(i->user_principal, wbc_status);
} else {
i->user_principal = NULL;
}
i->full_name = strdup(resp->data.auth.info3.full_name);
BAIL_ON_PTR_ERROR(i->full_name, wbc_status);
i->domain_name = strdup(resp->data.auth.info3.logon_dom);
BAIL_ON_PTR_ERROR(i->domain_name, wbc_status);
i->dns_domain_name= NULL;
if (resp->data.auth.validation_level == 6) {
i->dns_domain_name = strdup(resp->data.auth.info6.dns_domainname);
BAIL_ON_PTR_ERROR(i->dns_domain_name, wbc_status);
} else {
i->dns_domain_name = NULL;
}
i->acct_flags = resp->data.auth.info3.acct_flags;
memcpy(i->user_session_key,