netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
uams_pam.c File Reference
`#include <arpa/inet.h>`
`#include <signal.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <atalk/afp.h>`
`#include <atalk/constant_time.h>`
`#include <atalk/uam.h>`
`#include <atalk/util.h>`
`#include <atalk/logger.h>`
`#include <atalk/compat.h>`

## Macros
#define | PASSWDLEN 8
#define | COPY_STRING(s)
#define | PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED

## Functions
UAM_MODULE_EXPORT void | append (struct papfile *, const char *, int)
static int | PAM_conv (int num_msg, struct pam_message **msg, struct pam_response **resp, void *appdata_ptr)
| PAM conversation function.
static int | login (void *obj, char *username, int ulen, struct passwd **uam_pwd, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
static int | pam_login (void *obj, struct passwd **uam_pwd, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
static int | pam_login_ext (void *obj, char *uname, struct passwd **uam_pwd, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
static void | pam_logout (void)
static int | pam_changepw (void *obj, char *username, struct passwd *pwd, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
static int | pam_printer (char *start, char *stop, char *username, struct papfile *out)
static int | uam_setup (void *obj, const char *path)
static void | uam_cleanup (void)

## Variables
static pam_handle_t * | pamh = NULL
static const char * | hostname
static char * | PAM_username
static char * | PAM_password
static char * | PAM_oldpassword
static int | PAM_chauthtok_mode
static int | PAM_chauthtok_count
static struct pam_conv | PAM_conversation
UAM_MODULE_EXPORT struct uam_export | uams_clrtxt
UAM_MODULE_EXPORT struct uam_export | uams_pam

## Macro Definition Documentation

## ◆ COPY_STRING

#define COPY_STRING | ( |  | s | ) |

Value:
(s) ? strdup(s) : NULL
NULL
#define NULL
Definition utf8util.c:47

## ◆ PAM_CRED_ESTABLISH

#define PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED

## ◆ PASSWDLEN

#define PASSWDLEN 8

## Function Documentation

## ◆ append()

UAM_MODULE_EXPORT void append | ( | struct papfile * | pf,
|  | const char * | data,
|  | int | len )
| extern

## ◆ login()

int login | ( | void * | obj,
|  | char * | username,
|  | int | ulen,
|  | struct passwd ** | uam_pwd,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )
| static

## ◆ pam_changepw()

int pam_changepw | ( | void * | obj,
|  | char * | username,
|  | struct passwd * | pwd,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )
| static

change passwd

## ◆ PAM_conv()

int PAM_conv | ( | int | num_msg,
|  | struct pam_message ** | msg,
|  | struct pam_response ** | resp,
|  | void * | appdata_ptr )
| static

PAM conversation function.

Note
  Here we assume (for now, at least) that echo on means login name, and echo off means password.

## ◆ pam_login()

int pam_login | ( | void * | obj,
|  | struct passwd ** | uam_pwd,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )
| static

cleartxt login

## ◆ pam_login_ext()

int pam_login_ext | ( | void * | obj,
|  | char * | uname,
|  | struct passwd ** | uam_pwd,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )
| static

## ◆ pam_logout()

void pam_logout | ( | void |  | ) |
| static

## ◆ pam_printer()

int pam_printer | ( | char * | start,
|  | char * | stop,
|  | char * | username,
|  | struct papfile * | out )
| static

Printer ClearTxtUAM login

## ◆ uam_cleanup()

void uam_cleanup | ( | void |  | ) |
| static

## ◆ uam_setup()

int uam_setup | ( | void * | obj,
|  | const char * | path )
| static

## Variable Documentation

## ◆ hostname

const char* hostname
| static

## ◆ PAM_chauthtok_count

int PAM_chauthtok_count
| static

## ◆ PAM_chauthtok_mode

int PAM_chauthtok_mode
| static

## ◆ PAM_conversation

struct pam_conv PAM_conversation
| static

Initial value:
= {
&PAM_conv,
NULL
}
PAM_conv
static int PAM_conv(int num_msg, struct pam_message **msg, struct pam_response **resp, void *appdata_ptr)
PAM conversation function.
Definition uams_dhx2_pam.c:142

## ◆ PAM_oldpassword

char* PAM_oldpassword
| static

## ◆ PAM_password

char* PAM_password
| static

## ◆ PAM_username

char* PAM_username
| static

## ◆ pamh

pam_handle_t* pamh = NULL
| static

## ◆ uams_clrtxt

UAM_MODULE_EXPORT struct uam_export uams_clrtxt

Initial value:
= {
UAM_MODULE_SERVER,
UAM_MODULE_VERSION,
uam_setup, uam_cleanup
}
UAM_MODULE_VERSION
#define UAM_MODULE_VERSION
Definition uam.h:21
UAM_MODULE_SERVER
#define UAM_MODULE_SERVER
Definition uam.h:17
uam_setup
static int uam_setup(void *obj, const char *path)
Definition uams_dhx2_pam.c:1018
uam_cleanup
static void uam_cleanup(void)
Definition uams_dhx2_pam.c:1040

## ◆ uams_pam

UAM_MODULE_EXPORT struct uam_export uams_pam

Initial value:
= {
UAM_MODULE_SERVER,
UAM_MODULE_VERSION,
uam_setup, uam_cleanup
}