int argc, const char *argv[])
{
struct pam_matrix_ctx pctx;
+ const void *pwd = NULL;
int rv;
(void) flags; /* unused */
}
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);
{
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;
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) {
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);