diff options
Diffstat (limited to 'lib/libpam')
-rw-r--r-- | lib/libpam/modules/pam_group/pam_group.c | 4 | ||||
-rw-r--r-- | lib/libpam/modules/pam_ssh/pam_ssh.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpam/modules/pam_group/pam_group.c b/lib/libpam/modules/pam_group/pam_group.c index 3157232..381f21b 100644 --- a/lib/libpam/modules/pam_group/pam_group.c +++ b/lib/libpam/modules/pam_group/pam_group.c @@ -62,8 +62,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, struct group *grp; /* get target account */ - if (pam_get_item(pamh, PAM_USER, (const void **)&user) != PAM_SUCCESS - || user == NULL || (pwd = getpwnam(user)) == NULL) + if (pam_get_user(pamh, &user, NULL) != PAM_SUCCESS || + user == NULL || (pwd = getpwnam(user)) == NULL) return (PAM_AUTH_ERR); if (pwd->pw_uid != 0 && openpam_get_option(pamh, "root_only")) return (PAM_IGNORE); diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.c b/lib/libpam/modules/pam_ssh/pam_ssh.c index 39f6b64..29c4d5c 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.c +++ b/lib/libpam/modules/pam_ssh/pam_ssh.c @@ -141,7 +141,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, OpenSSL_add_all_algorithms(); /* get user name and home directory */ - pam_err = pam_get_item(pamh, PAM_USER, (const void **)&user); + pam_err = pam_get_user(pamh, &user, NULL); if (pam_err != PAM_SUCCESS) return (pam_err); pwd = getpwnam(user); @@ -363,7 +363,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags __unused, return (PAM_SUCCESS); /* switch to user credentials */ - pam_err = pam_get_item(pamh, PAM_USER, (const void **)&user); + pam_err = pam_get_user(pamh, &user, NULL); if (pam_err != PAM_SUCCESS) return (pam_err); pwd = getpwnam(user); |