#include "Tools.hpp"
#include "Session.hpp"
#include <iostream>
#include <string>
#include <security/pam_appl.h>
#include <unistd.h>
#include <cstring>
#include <cstdlib>
#include <iomanip>
Macros | |
#define | MYRA_RET_SUCCESS 0 |
#define | MYRA_RET_FAILED 1 |
Functions | |
int | myra_pam_callback (int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) |
PAM uses this callback when it needs to get the username/password. More... | |
int | authenticate_with_pam (const std::string &username, const std::string &password) |
Use PAM to authenticate the provided username/password. More... | |
int | display_all_sessions (void) |
Display all sessions. More... | |
int | main (int argc, char *argv[]) |
Functionality related to user session IDs and validating usernames/passwords to create new session IDs. More... | |
Variables | |
std::string | pam_callback_username |
std::string | pam_callback_password |
#define MYRA_RET_FAILED 1 |
#define MYRA_RET_SUCCESS 0 |
int authenticate_with_pam | ( | const std::string & | username, |
const std::string & | password | ||
) |
Use PAM to authenticate the provided username/password.
int display_all_sessions | ( | void | ) |
Display all sessions.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Functionality related to user session IDs and validating usernames/passwords to create new session IDs.
int myra_pam_callback | ( | int | num_msg, |
const struct pam_message ** | msg, | ||
struct pam_response ** | resp, | ||
void * | appdata_ptr | ||
) |
PAM uses this callback when it needs to get the username/password.
man 3 pam_conv
std::string pam_callback_password |
std::string pam_callback_username |