Merge pull request #3637 from AlexTMjugador/fix/unitialized-pam-tty-item
Fix `PAM_TTY` item being set to uninitialized data in PAM userpass lib
This commit is contained in:
@@ -69,7 +69,6 @@ common_pam_login(struct auth_info *auth_info,
|
||||
int need_pam_authenticate)
|
||||
{
|
||||
int perror;
|
||||
char service_name[256];
|
||||
|
||||
perror = pam_start(SERVICE, auth_info->userpass.user,
|
||||
&(auth_info->pamc), &(auth_info->ph));
|
||||
@@ -92,7 +91,7 @@ common_pam_login(struct auth_info *auth_info,
|
||||
}
|
||||
}
|
||||
|
||||
perror = pam_set_item(auth_info->ph, PAM_TTY, service_name);
|
||||
perror = pam_set_item(auth_info->ph, PAM_TTY, SERVICE);
|
||||
if (perror != PAM_SUCCESS)
|
||||
{
|
||||
LOG(LOG_LEVEL_ERROR, "pam_set_item(PAM_TTY) failed: %s",
|
||||
|
||||
Reference in New Issue
Block a user