extern int chkpassword(char *, char *);

typedef struct
{
	int (* chkpasswd)(void *, char *, char **errmsg);
	char *(* gethomedir)(void *);
	char *(* getrootdir)(void *);
	uid_t (* getuseruid)(void *);
	gid_t (* getusergid)(void *);
	gid_t *(* getusersupgid)(void *);
	void *(* gethandle)(FTPSTATE *peer, TOKENSET *tset, char *username, int *err);
	void (* freehandle)(void *);
	void *handle;
} PERMSTRUCT;

extern PERMSTRUCT unixauth_commands;
extern PERMSTRUCT anonauth_commands;
extern PERMSTRUCT internalauth_commands;
extern PERMSTRUCT disableauth_commands;

#ifdef HAVE_PAM_START
extern PERMSTRUCT pamauth_commands;
#endif

typedef struct
{
	char *authname;
	PERMSTRUCT *authstruct;
} PERMINFO;
