The branch, master has been updated via 6a61580617b0bd2cf46d4857dd0e87b3e48288f6 (commit) via 85dec6917184a024f9b76ea6f6654227e6457af3 (commit) from 540b2df874ff053bccd6ef6165476d5225f2ae16 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 6a61580617b0bd2cf46d4857dd0e87b3e48288f6 Author: Günther Deschner <[EMAIL PROTECTED]> Date: Thu Nov 13 17:19:11 2008 +0100 s3-winbindd: workaround for samr_ChangePasswordUser3 to User2 fallback for w2k dcs. Guenther commit 85dec6917184a024f9b76ea6f6654227e6457af3 Author: Günther Deschner <[EMAIL PROTECTED]> Date: Thu Nov 13 16:45:42 2008 +0100 pam_winbind: do not add empty blob. Guenther ----------------------------------------------------------------------- Summary of changes: source3/nsswitch/pam_winbind.c | 18 ++++++++++-------- source3/winbindd/winbindd_pam.c | 6 ++++++ 2 files changed, 16 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 5ba4850..c164f8e 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -2369,14 +2369,16 @@ static int _pam_delete_cred(pam_handle_t *pamh, int flags, logoff.username = user; - wbc_status = wbcAddNamedBlob(&logoff.num_blobs, - &logoff.blobs, - "ccfilename", - 0, - (uint8_t *)ccname, - strlen(ccname)+1); - if (!WBC_ERROR_IS_OK(wbc_status)) { - goto out; + if (ccname) { + wbc_status = wbcAddNamedBlob(&logoff.num_blobs, + &logoff.blobs, + "ccfilename", + 0, + (uint8_t *)ccname, + strlen(ccname)+1); + if (!WBC_ERROR_IS_OK(wbc_status)) { + goto out; + } } wbc_status = wbcAddNamedBlob(&logoff.num_blobs, diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 7de28b0..597d48a 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -2117,9 +2117,15 @@ enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact got_info = true; } + /* atm the pidl generated rpccli_samr_ChangePasswordUser3 function will + * return with NT_STATUS_BUFFER_TOO_SMALL for w2k dcs as w2k just + * returns with 4byte error code (NT_STATUS_NOT_SUPPORTED) which is too + * short to comply with the samr_ChangePasswordUser3 idl - gd */ + /* only fallback when the chgpasswd_user3 call is not supported */ if ((NT_STATUS_EQUAL(result, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR))) || (NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED)) || + (NT_STATUS_EQUAL(result, NT_STATUS_BUFFER_TOO_SMALL)) || (NT_STATUS_EQUAL(result, NT_STATUS_NOT_IMPLEMENTED))) { DEBUG(10,("Password change with chgpasswd_user3 failed with: %s, retrying chgpasswd_user2\n", -- Samba Shared Repository