#include <errno.h>
#include <gcrypt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <atalk/afp.h>
#include <atalk/globals.h>
#include <atalk/logger.h>
#include <atalk/uam.h>
Macros | |
#define | PRIMEBITS 1024 |
#define | dhxhash(a) |
#define | COPY_STRING(s) |
#define | PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED |
Functions | |
static int | dh_params_generate (unsigned int bits) |
static int | PAM_conv (int num_msg, struct pam_message **msg, struct pam_response **resp, void *appdata_ptr _U_) |
static int | dhx2_setup (void *obj, char *ibuf _U_, size_t ibuflen _U_, char *rbuf, size_t *rbuflen) |
static int | login (void *obj, char *username, int ulen, struct passwd **uam_pwd _U_, 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 int | logincont1 (void *obj _U_, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
static int | loginasroot (const char *adminauthuser, const char **hostname, int status) |
static int | logincont2 (void *obj_in, struct passwd **uam_pwd, char *ibuf, size_t ibuflen, char *rbuf _U_, size_t *rbuflen) |
static int | pam_logincont (void *obj, struct passwd **uam_pwd, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
static void | pam_logout (void) |
static int | changepw_1 (void *obj, char *uname, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
static int | changepw_2 (void *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
static int | changepw_3 (void *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen _U_) |
static int | dhx2_changepw (void *obj _U_, char *uname, struct passwd *pwd _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen _U_) |
static int | uam_setup (void *obj _U_, const char *path) |
static void | uam_cleanup (void) |
Variables | |
static gcry_mpi_t | p |
static gcry_mpi_t | g |
static gcry_mpi_t | Ra |
static gcry_mpi_t | serverNonce |
static char * | K_MD5hash = NULL |
static int | K_hash_len |
static uint16_t | ID |
static unsigned char | dhx_c2siv [] = { 'L', 'W', 'a', 'l', 'l', 'a', 'c', 'e' } |
static unsigned char | dhx_s2civ [] = { 'C', 'J', 'a', 'l', 'b', 'e', 'r', 't' } |
static pam_handle_t * | pamh = NULL |
static char * | PAM_username |
static char * | PAM_password |
static struct passwd * | dhxpwd |
static struct pam_conv | PAM_conversation |
UAM_MODULE_EXPORT struct uam_export | uams_dhx2 |
UAM_MODULE_EXPORT struct uam_export | uams_dhx2_pam |
#define COPY_STRING | ( | s | ) |
#define dhxhash | ( | a | ) |
#define PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED |
#define PRIMEBITS 1024 |
|
static |
|
static |
|
static |
|
static |
This function will generate a new pair of prime and generator for use in the Diffie-Hellman key exchange. The bits value should be one of 768, 1024, 2048, 3072 or 4096.
|
static |
|
static |
|
static |
|
static |
Try to authenticate via PAM as "adminauthuser"
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
UAM_MODULE_EXPORT struct uam_export uams_dhx2 |
UAM_MODULE_EXPORT struct uam_export uams_dhx2_pam |