I'm trying to write a small C helper function to process MS-CHAP password change requests in FreeRADIUS. The "quickest" (ha!) way of doing this seemed to be to hijack the libwbclient stuff. When calling wbcChangeUserPasswordEx with WBC_CHANGE_PASSWORD_LEVEL_RESPONSE, it does the following, several times (lines 867-897 of nsswitch/libwbclient/wbc_pam.c): if (...data) { memcpy(dest->data, src->data, data->data_len); dest->data_len = src->data_len; } ...this is obviously wrong - the memcpy needs to happen after the "len" assignment, else dest->data_len == 0 and it never copies any data. There are other bugs in this code, which can segfault the winbind child; I'll open these separately.
Created attachment 6408 [details] Patch for 3.5 This was already fixed in master with 03115efae89c8c4f51. The attached patch is the same with a different commit message.
Comment on attachment 6408 [details] Patch for 3.5 looks good
Karolin, please add to 3.5
Pushed to v3-5-test. Closing out bug report. Thanks!