#include "squid.h"
#include "helper/protocol_defines.h"
#include "rfc1738.h"
#include "util.h"
#include <cassert>
#include <csignal>
#include <cstring>
#include <ctime>
Go to the source code of this file.
Macros | |
#define | DEFAULT_SQUID_PAM_SERVICE "squid" |
#define | DEFAULT_SQUID_PAM_TTL 0 |
Functions | |
int | password_conversation (int num_msg, PAM_CONV_FUNC_CONST_PARM struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) |
static void | usage (char *program) |
int | main (int argc, char *argv[]) |
Variables | |
static struct pam_conv | conv |
Macro Definition Documentation
◆ DEFAULT_SQUID_PAM_SERVICE
#define DEFAULT_SQUID_PAM_SERVICE "squid" |
Definition at line 91 of file basic_pam_auth.cc.
◆ DEFAULT_SQUID_PAM_TTL
#define DEFAULT_SQUID_PAM_TTL 0 |
Definition at line 96 of file basic_pam_auth.cc.
Function Documentation
◆ main()
Definition at line 161 of file basic_pam_auth.cc.
References conv, debug(), DEFAULT_SQUID_PAM_SERVICE, DEFAULT_SQUID_PAM_TTL, error(), getopt(), HELPER_INPUT_BUFFER, NULL, optarg, optind, rfc1738_unescape(), SEND_ERR, SEND_OK, and usage().
◆ password_conversation()
int password_conversation | ( | int | num_msg, |
PAM_CONV_FUNC_CONST_PARM struct pam_message ** | msg, | ||
struct pam_response ** | resp, | ||
void * | appdata_ptr | ||
) |
A simple "conversation" function returning the supplied password. Has a bit to much error control, but this is my first PAM application so I'd rather check everything than make any mistakes. The function expects a single converstation message of type PAM_PROMPT_ECHO_OFF.
Definition at line 113 of file basic_pam_auth.cc.
◆ usage()
|
static |
Definition at line 147 of file basic_pam_auth.cc.
References DEFAULT_SQUID_PAM_SERVICE, and DEFAULT_SQUID_PAM_TTL.
Referenced by main().
Variable Documentation
◆ conv
|
static |
Definition at line 142 of file basic_pam_auth.cc.
Referenced by main().