diff options
author | Ralph Boehme <slow@samba.org> | 2017-12-01 23:26:33 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2018-01-13 08:24:09 +0100 |
commit | c8f76bfd7223512074d38379593969595642a0f8 (patch) | |
tree | e712e47198b016be9528b0656a27633f7224c243 /nsswitch | |
parent | 59cb1f6f9c3817bc436746e6f29fd44855451838 (diff) | |
download | samba-c8f76bfd7223512074d38379593969595642a0f8.tar.gz |
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>
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/libwbclient/wbc_pam.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c index c31220ae7eb..e4cd2963012 100644 --- a/nsswitch/libwbclient/wbc_pam.c +++ b/nsswitch/libwbclient/wbc_pam.c @@ -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, |