Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Session_Tool.cpp File Reference
#include "Tools.hpp"
#include "Session.hpp"
#include <iostream>
#include <string>
#include <security/pam_appl.h>
#include <unistd.h>
#include <cstring>
#include <cstdlib>
#include <iomanip>
Include dependency graph for Session_Tool.cpp:

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
 

Macro Definition Documentation

#define MYRA_RET_FAILED   1
#define MYRA_RET_SUCCESS   0

Function Documentation

int authenticate_with_pam ( const std::string &  username,
const std::string &  password 
)

Use PAM to authenticate the provided username/password.

Here is the call graph for this function:

Here is the caller graph for this function:

int display_all_sessions ( void  )

Display all sessions.

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Functionality related to user session IDs and validating usernames/passwords to create new session IDs.

Here is the call graph for this function:

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.

See also
man 3 pam_conv

Here is the caller graph for this function:

Variable Documentation

std::string pam_callback_password
std::string pam_callback_username