ProFTPD Developer's Guide: Authentication Tables

ProFTPD Version 1.2


Table of Contents

Authentication Tables
The authtable declares

Definition

Each hander accepts data in from the cmd_rec structure, and should return its results via the MODRET->data member. The core function mod_create_data() can create this data structure properly for returning to the caller.

Example
This example authentication table is taken directly from mod_unixpw.c:

static authtable unixpw_auth[] = {
  { 0, "setpwent", pw_setpwent },
  { 0, "endpwent", pw_endpwent },
  { 0, "setgrent", pw_setgrent },
  { 0, "endgrent", pw_endgrent },
  { 0, "getpwent", pw_getpwent },
  { 0, "getgrent", pw_getgrent },
  { 0, "getpwnam", pw_getpwnam },
  { 0, "getpwuid", pw_getpwuid },
  { 0, "getgrnam", pw_getgrnam },
  { 0, "getgrgid", pw_getgrgid },
  { 0, "auth",     pw_auth },
  { 0, "check",    pw_check },
  { 0, "uid_name", pw_uid_name },
  { 0, "gid_name", pw_gid_name },
  { 0, "name_uid", pw_name_uid },
  { 0, "name_gid", pw_name_gid },
  { 0, NULL }
};

The trailing { 0, NULL } marks the end of the authentication table, and should always be used.

Table of Contents



Author: $Author: castaglia $
Last Updated: $Date: 2003/01/02 17:39:36 $


© Copyright 2000-2003 TJ Saunders
All Rights Reserved