1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

nsswitch: Fix getting data out of pam_get_data()

nsswitch/pam_winbind.c:3360:24: error: cast from 'time_t **' (aka 'long **') to
    'const void **' must have all intermediate pointers const qualified to be safe
    [-Werror,-Wcast-qual]
                             (const void **)&pwdlastset_update);
                                            ^

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2023-02-03 14:59:21 +01:00 committed by Jeremy Allison
parent d7bc74afcc
commit 981dcccfd9

View File

@ -3291,8 +3291,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
"failed to set PAM_OLDAUTHTOK");
}
} else if (flags & PAM_UPDATE_AUTHTOK) {
time_t *pwdlastset_update = NULL;
const time_t *pwdlastset_update = NULL;
/*
* obtain the proposed password
@ -3357,7 +3356,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
*/
pam_get_data(pamh,
PAM_WINBIND_PWD_LAST_SET,
(const void **)&pwdlastset_update);
(const void **)(&pwdlastset_update));
/*
* if cached creds were enabled, make sure to set the