Skip to content

Commit

Permalink
changed pam a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-gaines-siege committed Jun 24, 2019
1 parent 3ed8ee4 commit 4ffb9ca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions robolock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ int main(const int argc, char ** argv){
pam_strerror(pam_handle, result)); \
end(result); \
return 0; \
} while (1);
} while (1);

pam_handle_t *pam_handle;
static inline int end(int last_result) {
Expand Down Expand Up @@ -1345,7 +1345,7 @@ unsigned int login(const char *password) {
if (result != PAM_SUCCESS) {
err("pam_authenticate");
}

/*
result = pam_acct_mgmt(pam_handle, 0);
if (result != PAM_SUCCESS) {
err("pam_acct_mgmt");
Expand All @@ -1361,6 +1361,10 @@ unsigned int login(const char *password) {
pam_setcred(pam_handle, PAM_DELETE_CRED);
err("pam_open_session");
}

*/
result = pam_end(pam_handle, 0);
if(result != PAM_SUCCESS){
err("pam_end");
}
return 1;
}

0 comments on commit 4ffb9ca

Please sign in to comment.