From: Andreas Schneider Date: Mon, 16 Jun 2025 05:45:21 +0000 (+0200) Subject: third_party: Update pam_wrapper to version 1.1.8 X-Git-Tag: tevent-0.17.0~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0a2dd57b1816ff1d0b2cc6de6c3b1d9fe9dde17;p=thirdparty%2Fsamba.git third_party: Update pam_wrapper to version 1.1.8 Signed-off-by: Andreas Schneider Reviewed-by: Gary Lockyer Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 17 08:38:35 UTC 2025 on atb-devel-224 --- diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py index 3637fe2e59f..a3c45775a4b 100644 --- a/buildtools/wafsamba/samba_third_party.py +++ b/buildtools/wafsamba/samba_third_party.py @@ -44,5 +44,5 @@ Build.BuildContext.CHECK_UID_WRAPPER = CHECK_UID_WRAPPER @conf def CHECK_PAM_WRAPPER(conf): - return conf.CHECK_BUNDLED_SYSTEM_PKG('pam_wrapper', minversion='1.1.7') + return conf.CHECK_BUNDLED_SYSTEM_PKG('pam_wrapper', minversion='1.1.8') Build.BuildContext.CHECK_PAM_WRAPPER = CHECK_PAM_WRAPPER diff --git a/third_party/pam_wrapper/modules/pam_matrix.c b/third_party/pam_wrapper/modules/pam_matrix.c index cc6fbf37e82..6758d9cd5a4 100644 --- a/third_party/pam_wrapper/modules/pam_matrix.c +++ b/third_party/pam_wrapper/modules/pam_matrix.c @@ -581,6 +581,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { struct pam_matrix_ctx pctx; + const void *pwd = NULL; int rv; (void) flags; /* unused */ @@ -594,11 +595,12 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, } rv = pam_matrix_read_password(pamh, pctx.flags, PAM_AUTHTOK, "Password: ", - NULL, (const void **) &pctx.pli.password); + NULL, &pwd); if (rv != PAM_SUCCESS) { rv = PAM_AUTHINFO_UNAVAIL; goto done; } + pctx.pli.password = discard_const(pwd); /* Auth and get rid of the authtok */ rv = pam_matrix_auth(pamh, &pctx); @@ -763,6 +765,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, { struct pam_matrix_ctx pctx; const char *old_pass; + const void *pwd = NULL; int rv; time_t *auth_stamp = NULL; const time_t *auth_stamp_out = NULL; @@ -780,11 +783,12 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, rv = pam_matrix_read_password( pamh, pctx.flags, PAM_OLDAUTHTOK, "Old password: ", NULL, - (const void **) &pctx.pli.password); + &pwd); if (rv != PAM_SUCCESS) { rv = PAM_AUTHINFO_UNAVAIL; goto done; } + pctx.pli.password = discard_const(pwd); auth_stamp = malloc(sizeof(time_t)); if (auth_stamp == NULL) { @@ -824,11 +828,12 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, PAM_AUTHTOK, "New Password :", "Verify New Password :", - (const void **) &pctx.pli.password); + &pwd); if (rv != PAM_SUCCESS) { rv = PAM_AUTHINFO_UNAVAIL; goto done; } + pctx.pli.password = discard_const(pwd); /* Write the new password to the db */ rv = pam_matrix_lib_items_put(pctx.passdb, &pctx.pli); diff --git a/third_party/pam_wrapper/wscript b/third_party/pam_wrapper/wscript index 4ee5765269e..9b6a1d507a8 100644 --- a/third_party/pam_wrapper/wscript +++ b/third_party/pam_wrapper/wscript @@ -2,7 +2,8 @@ import os -VERSION="1.1.7" +VERSION = "1.1.8" + def find_library(library_names, lookup_paths): for directory in lookup_paths: