diff options
author | Günther Deschner <gd@samba.org> | 2008-11-12 14:27:51 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-11-12 14:45:11 +0100 |
commit | 7f36d3b55051150b9d4fa75af424898f48c48771 (patch) | |
tree | fd201cd4fd4834c776d0d7350f9ac7268f310607 /source3/nsswitch | |
parent | 67018ed8bdd867f0612f2c559267cba6a67e4b2d (diff) | |
download | samba-7f36d3b55051150b9d4fa75af424898f48c48771.tar.gz samba-7f36d3b55051150b9d4fa75af424898f48c48771.tar.bz2 samba-7f36d3b55051150b9d4fa75af424898f48c48771.zip |
pam_winbind: fix what data we put into the blobs.
Guenther
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/pam_winbind.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 1c927259e5..0c861e9f97 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -1615,14 +1615,16 @@ static int winbind_auth_request(struct pwb_context *ctx, logon.username = user; logon.password = pass; - wbc_status = wbcAddNamedBlob(&logon.num_blobs, - &logon.blobs, - "krb5_cc_type", - 0, - (uint8_t *)cctype, - strlen(cctype)+1); - if (!WBC_ERROR_IS_OK(wbc_status)) { - goto done; + if (cctype) { + wbc_status = wbcAddNamedBlob(&logon.num_blobs, + &logon.blobs, + "krb5_cc_type", + 0, + (uint8_t *)cctype, + strlen(cctype)+1); + if (!WBC_ERROR_IS_OK(wbc_status)) { + goto done; + } } wbc_status = wbcAddNamedBlob(&logon.num_blobs, @@ -1645,14 +1647,16 @@ static int winbind_auth_request(struct pwb_context *ctx, goto done; } - wbc_status = wbcAddNamedBlob(&logon.num_blobs, - &logon.blobs, - "membership_of", - 0, - (uint8_t *)membership_of, - sizeof(membership_of)); - if (!WBC_ERROR_IS_OK(wbc_status)) { - goto done; + if (member) { + wbc_status = wbcAddNamedBlob(&logon.num_blobs, + &logon.blobs, + "membership_of", + 0, + (uint8_t *)membership_of, + sizeof(membership_of)); + if (!WBC_ERROR_IS_OK(wbc_status)) { + goto done; + } } wbc_status = wbcLogonUser(&logon, &info, &error, &policy); |