Files
ABSEC/test_pam.c
T

17 lines
510 B
C

#include "absec_pam.h"
#include "absec_etc.h"
#include <stdio.h>
void main(int argc, char** argv){
char *user = "jlcyr";
char *pass = "jlcyrpass01!";
printf("ABSEC auth pam for %s identified by %s\r\n", user, pass);
int retval = check_user(user, pass);
printf("Retval: %d\r\n", retval);
if (retval == PAM_ERROR_START) printf("Error at start\r\n");
if (retval == PAM_ERROR_INVALID_CRED) printf("Invalid user/pass\r\n");
if (retval == PAM_OK) printf("OK\r\n");
printf("Test completed\r\n");
return;
}