From: Volker Lendecke Date: Sat, 6 Feb 2010 15:54:05 +0000 (+0100) Subject: libwbclient: wbc_create_password_policy_info is always called with mem_ctx==NULL X-Git-Tag: samba-3.6.0pre1~5551 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=2607dc5ee87c84fc6b1419e5207f2ffaa5714af4 libwbclient: wbc_create_password_policy_info is always called with mem_ctx==NULL --- diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c index e6a7c095bdf..c9034ce62d5 100644 --- a/nsswitch/libwbclient/wbc_pam.c +++ b/nsswitch/libwbclient/wbc_pam.c @@ -232,14 +232,13 @@ done: return wbc_status; } -static wbcErr wbc_create_password_policy_info(TALLOC_CTX *mem_ctx, - const struct winbindd_response *resp, +static wbcErr wbc_create_password_policy_info(const struct winbindd_response *resp, struct wbcUserPasswordPolicyInfo **_i) { wbcErr wbc_status = WBC_ERR_SUCCESS; struct wbcUserPasswordPolicyInfo *i; - i = talloc(mem_ctx, struct wbcUserPasswordPolicyInfo); + i = talloc(NULL, struct wbcUserPasswordPolicyInfo); BAIL_ON_PTR_ERROR(i, wbc_status); i->min_passwordage = resp->data.auth.policy.min_passwordage; @@ -918,8 +917,7 @@ wbcErr wbcChangeUserPasswordEx(const struct wbcChangePasswordParams *params, } if (policy) { - wbc_status = wbc_create_password_policy_info(NULL, - &response, + wbc_status = wbc_create_password_policy_info(&response, policy); BAIL_ON_WBC_ERROR(wbc_status); } @@ -1092,8 +1090,7 @@ wbcErr wbcLogonUser(const struct wbcLogonUserParams *params, } if (policy) { - wbc_status = wbc_create_password_policy_info(NULL, - &response, + wbc_status = wbc_create_password_policy_info(&response, policy); BAIL_ON_WBC_ERROR(wbc_status); }