summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-06-18 16:17:26 +0200
committerGünther Deschner <gd@samba.org>2009-06-18 16:37:45 +0200
commite7e98ba4807f3c4e0538b24ae0092f69383ae2d7 (patch)
tree60fe86ca887ba33151bb977e2b6d7336ac51a9ed /nsswitch/libwbclient
parent6037c200a1ff37fce91a5559aa87cdee0e310a8d (diff)
downloadsamba-e7e98ba4807f3c4e0538b24ae0092f69383ae2d7.tar.gz
samba-e7e98ba4807f3c4e0538b24ae0092f69383ae2d7.tar.bz2
samba-e7e98ba4807f3c4e0538b24ae0092f69383ae2d7.zip
libwbclient: fix returned LogonInfo in wbc_LogonUser().
That function could return emtpy blobs for username and ccache for e.g. cached logins. Guenther
Diffstat (limited to 'nsswitch/libwbclient')
-rw-r--r--nsswitch/libwbclient/wbc_pam.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c
index a245d8a044..d3bf6168ed 100644
--- a/nsswitch/libwbclient/wbc_pam.c
+++ b/nsswitch/libwbclient/wbc_pam.c
@@ -268,7 +268,8 @@ static wbcErr wbc_create_logon_info(TALLOC_CTX *mem_ctx,
wbc_status = wbc_create_auth_info(i, resp, &i->info);
BAIL_ON_WBC_ERROR(wbc_status);
- if (resp->data.auth.krb5ccname) {
+ if (resp->data.auth.krb5ccname &&
+ strlen(resp->data.auth.krb5ccname)) {
wbc_status = wbcAddNamedBlob(&i->num_blobs,
&i->blobs,
"krb5ccname",
@@ -278,7 +279,8 @@ static wbcErr wbc_create_logon_info(TALLOC_CTX *mem_ctx,
BAIL_ON_WBC_ERROR(wbc_status);
}
- if (resp->data.auth.unix_username) {
+ if (resp->data.auth.unix_username &&
+ strlen(resp->data.auth.unix_username)) {
wbc_status = wbcAddNamedBlob(&i->num_blobs,
&i->blobs,
"unix_username",