basic_pam_auth.cc File Reference
#include "squid.h"
#include "helper/protocol_defines.h"
#include "rfc1738.h"
#include "util.h"
#include <cassert>
#include <csignal>
#include <cstring>
#include <ctime>
Include dependency graph for basic_pam_auth.cc:

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

#define DEFAULT_SQUID_PAM_SERVICE   "squid"

Definition at line 91 of file basic_pam_auth.cc.

Referenced by main(), and usage().

#define DEFAULT_SQUID_PAM_TTL   0

Definition at line 96 of file basic_pam_auth.cc.

Referenced by main(), and usage().

Function Documentation

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.

References debug, and xstrdup.

static void usage ( char *  program)
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

struct pam_conv conv
static
Initial value:
= {
}
int password_conversation(int num_msg, PAM_CONV_FUNC_CONST_PARM struct pam_message **msg, struct pam_response **resp, void *appdata_ptr)
#define NULL
Definition: types.h:166

Definition at line 142 of file basic_pam_auth.cc.

Referenced by main().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors