execute: Restore call to pam_setcred
This commit is contained in:
@@ -1193,6 +1193,10 @@ static int setup_pam(
|
||||
if (pam_code != PAM_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
pam_code = pam_setcred(handle, PAM_ESTABLISH_CRED | flags);
|
||||
if (pam_code != PAM_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
pam_code = pam_open_session(handle, flags);
|
||||
if (pam_code != PAM_SUCCESS)
|
||||
goto fail;
|
||||
@@ -1277,6 +1281,10 @@ static int setup_pam(
|
||||
}
|
||||
}
|
||||
|
||||
pam_code = pam_setcred(handle, PAM_DELETE_CRED | flags);
|
||||
if (pam_code != PAM_SUCCESS)
|
||||
goto child_finish;
|
||||
|
||||
/* If our parent died we'll end the session */
|
||||
if (getppid() != parent_pid) {
|
||||
pam_code = pam_close_session(handle, flags);
|
||||
|
||||
Reference in New Issue
Block a user