27 lines
673 B
C
27 lines
673 B
C
/////
|
|
//
|
|
// File : test_authen.c
|
|
// Author : Jean-Luc Cyr
|
|
// Date : 2018-10
|
|
//
|
|
// Description: authentification method test file
|
|
//
|
|
|
|
//#include "absec_pam.h"
|
|
//#include "absec_etc.h"
|
|
#include "absec_authen.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;
|
|
}
|