Prefix authentication functions with a "sudo_" prefix to avoid

namespace problems.
This commit is contained in:
Todd C. Miller
2011-11-13 11:46:39 -05:00
parent c86561e502
commit 6fd3e03857
13 changed files with 104 additions and 104 deletions

View File

@@ -50,11 +50,11 @@
#include "sudo_auth.h"
int
afs_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_afs_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
struct ktc_encryptionKey afs_key;
struct ktc_token afs_token;
debug_decl(afs_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_afs_verify, SUDO_DEBUG_AUTH)
/* Try to just check the password */
ka_StringToKey(pass, NULL, &afs_key);

View File

@@ -51,12 +51,12 @@
* http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf1/authenticate.htm
*/
int
aixauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
sudo_aix_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
{
char *pass, *message = NULL;
int result = 1, reenter = 0;
int rval = AUTH_SUCCESS;
debug_decl(aixauth_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_aix_verify, SUDO_DEBUG_AUTH)
do {
pass = auth_getpass(prompt, def_passwd_timeout * 60,
@@ -89,9 +89,9 @@ aixauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
}
int
aixauth_cleanup(struct passwd *pw, sudo_auth *auth)
sudo_aix_cleanup(struct passwd *pw, sudo_auth *auth)
{
debug_decl(aixauth_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_aix_cleanup, SUDO_DEBUG_AUTH)
/* Unset AUTHSTATE as it may not be correct for the runas user. */
unsetenv("AUTHSTATE");

View File

@@ -67,7 +67,7 @@
static int check_dce_status(error_status_t, char *);
int
dce_verify(struct passwd *pw, char *plain_pw, sudo_auth *auth)
sudo_dce_verify(struct passwd *pw, char *plain_pw, sudo_auth *auth)
{
struct passwd temp_pw;
sec_passwd_rec_t password_rec;
@@ -75,7 +75,7 @@ dce_verify(struct passwd *pw, char *plain_pw, sudo_auth *auth)
boolean32 reset_passwd;
sec_login_auth_src_t auth_src;
error_status_t status;
debug_decl(dce_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_dce_verify, SUDO_DEBUG_AUTH)
/*
* Create the local context of the DCE principal necessary

View File

@@ -50,11 +50,11 @@
#include "sudo_auth.h"
int
fwtk_init(struct passwd *pw, sudo_auth *auth)
sudo_fwtk_init(struct passwd *pw, sudo_auth *auth)
{
static Cfg *confp; /* Configuration entry struct */
char resp[128]; /* Response from the server */
debug_decl(fwtk_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_fwtk_init, SUDO_DEBUG_AUTH)
if ((confp = cfg_read("sudo")) == (Cfg *)-1) {
warningx(_("unable to read fwtk config"));
@@ -80,13 +80,13 @@ fwtk_init(struct passwd *pw, sudo_auth *auth)
}
int
fwtk_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
sudo_fwtk_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
{
char *pass; /* Password from the user */
char buf[SUDO_PASS_MAX + 12]; /* General prupose buffer */
char resp[128]; /* Response from the server */
int error;
debug_decl(fwtk_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_fwtk_verify, SUDO_DEBUG_AUTH)
/* Send username to authentication server. */
(void) snprintf(buf, sizeof(buf), "authorize %s 'sudo'", pw->pw_name);
@@ -146,9 +146,9 @@ done:
}
int
fwtk_cleanup(struct passwd *pw, sudo_auth *auth)
sudo_fwtk_cleanup(struct passwd *pw, sudo_auth *auth)
{
debug_decl(fwtk_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_fwtk_cleanup, SUDO_DEBUG_AUTH)
auth_close();
debug_return_int(AUTH_SUCCESS);

View File

@@ -88,10 +88,10 @@ krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opts)
#endif
int
kerb5_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
sudo_krb5_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{
static char *krb5_prompt;
debug_decl(kerb5_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_krb5_init, SUDO_DEBUG_AUTH)
if (krb5_prompt == NULL) {
krb5_context sudo_context;
@@ -125,14 +125,14 @@ kerb5_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
}
int
kerb5_init(struct passwd *pw, sudo_auth *auth)
sudo_krb5_init(struct passwd *pw, sudo_auth *auth)
{
krb5_context sudo_context;
krb5_ccache ccache;
krb5_principal princ;
krb5_error_code error;
char cache_name[64];
debug_decl(kerb5_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_krb5_init, SUDO_DEBUG_AUTH)
auth->data = (void *) &sudo_krb5_data; /* Stash all our data here */
@@ -170,13 +170,13 @@ kerb5_init(struct passwd *pw, sudo_auth *auth)
#ifdef HAVE_KRB5_VERIFY_USER
int
kerb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_krb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
krb5_context sudo_context;
krb5_principal princ;
krb5_ccache ccache;
krb5_error_code error;
debug_decl(kerb5_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_krb5_verify, SUDO_DEBUG_AUTH)
sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context;
princ = ((sudo_krb5_datap) auth->data)->princ;
@@ -187,7 +187,7 @@ kerb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
}
#else
int
kerb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_krb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
krb5_context sudo_context;
krb5_principal princ;
@@ -195,7 +195,7 @@ kerb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
krb5_ccache ccache;
krb5_error_code error;
krb5_get_init_creds_opt *opts = NULL;
debug_decl(kerb5_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_krb5_verify, SUDO_DEBUG_AUTH)
sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context;
princ = ((sudo_krb5_datap) auth->data)->princ;
@@ -257,12 +257,12 @@ done:
#endif
int
kerb5_cleanup(struct passwd *pw, sudo_auth *auth)
sudo_krb5_cleanup(struct passwd *pw, sudo_auth *auth)
{
krb5_context sudo_context;
krb5_principal princ;
krb5_ccache ccache;
debug_decl(kerb5_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_krb5_cleanup, SUDO_DEBUG_AUTH)
sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context;
princ = ((sudo_krb5_datap) auth->data)->princ;

View File

@@ -80,11 +80,11 @@ static int gotintr;
static pam_handle_t *pamh;
int
pam_init(struct passwd *pw, sudo_auth *auth)
sudo_pam_init(struct passwd *pw, sudo_auth *auth)
{
static struct pam_conv pam_conv;
static int pam_status;
debug_decl(pam_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_pam_init, SUDO_DEBUG_AUTH)
/* Initial PAM setup */
if (auth != NULL)
@@ -124,11 +124,11 @@ pam_init(struct passwd *pw, sudo_auth *auth)
}
int
pam_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
sudo_pam_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
{
const char *s;
int *pam_status = (int *) auth->data;
debug_decl(pam_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_pam_verify, SUDO_DEBUG_AUTH)
def_prompt = prompt; /* for converse */
@@ -181,10 +181,10 @@ pam_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
}
int
pam_cleanup(struct passwd *pw, sudo_auth *auth)
sudo_pam_cleanup(struct passwd *pw, sudo_auth *auth)
{
int *pam_status = (int *) auth->data;
debug_decl(pam_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_pam_cleanup, SUDO_DEBUG_AUTH)
/* If successful, we can't close the session until pam_end_session() */
if (*pam_status == AUTH_SUCCESS)
@@ -196,10 +196,10 @@ pam_cleanup(struct passwd *pw, sudo_auth *auth)
}
int
pam_begin_session(struct passwd *pw, sudo_auth *auth)
sudo_pam_begin_session(struct passwd *pw, sudo_auth *auth)
{
int status = PAM_SUCCESS;
debug_decl(pam_begin_session, SUDO_DEBUG_AUTH)
debug_decl(sudo_pam_begin_session, SUDO_DEBUG_AUTH)
/*
* If there is no valid user we cannot open a PAM session.
@@ -243,10 +243,10 @@ done:
}
int
pam_end_session(struct passwd *pw, sudo_auth *auth)
sudo_pam_end_session(struct passwd *pw, sudo_auth *auth)
{
int status = PAM_SUCCESS;
debug_decl(pam_end_session, SUDO_DEBUG_AUTH)
debug_decl(sudo_pam_end_session, SUDO_DEBUG_AUTH)
if (pamh != NULL) {
#ifndef NO_PAM_SESSION

View File

@@ -49,9 +49,9 @@
#define HAS_AGEINFO(p, l) (l == 18 && p[DESLEN] == ',')
int
passwd_init(struct passwd *pw, sudo_auth *auth)
sudo_passwd_init(struct passwd *pw, sudo_auth *auth)
{
debug_decl(passwd_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_passwd_init, SUDO_DEBUG_AUTH)
#ifdef HAVE_SKEYACCESS
if (skeyaccess(pw, user_tty, NULL, NULL) == 0)
@@ -64,13 +64,13 @@ passwd_init(struct passwd *pw, sudo_auth *auth)
}
int
passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
char sav, *epass;
char *pw_epasswd = auth->data;
size_t pw_len;
int error;
debug_decl(passwd_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_passwd_verify, SUDO_DEBUG_AUTH)
pw_len = strlen(pw_epasswd);
@@ -105,12 +105,12 @@ passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth)
}
int
passwd_cleanup(pw, auth)
sudo_passwd_cleanup(pw, auth)
struct passwd *pw;
sudo_auth *auth;
{
char *pw_epasswd = auth->data;
debug_decl(passwd_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_passwd_cleanup, SUDO_DEBUG_AUTH)
if (pw_epasswd != NULL) {
zero_bytes(pw_epasswd, strlen(pw_epasswd));

View File

@@ -63,13 +63,13 @@
#include "sudo_auth.h"
int
rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{
char challenge[256];
static char *orig_prompt = NULL, *new_prompt = NULL;
static int op_len, np_size;
static struct RFC1938 rfc1938;
debug_decl(rfc1938_setup, SUDO_DEBUG_AUTH)
debug_decl(sudo_rfc1938_setup, SUDO_DEBUG_AUTH)
/* Stash a pointer to the rfc1938 struct if we have not initialized */
if (!auth->data)
@@ -125,9 +125,9 @@ rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
}
int
rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
debug_decl(rfc1938_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_rfc1938_verify, SUDO_DEBUG_AUTH)
if (rfc1938verify((struct RFC1938 *) auth->data, pass) == 0)
debug_return_int(AUTH_SUCCESS);

View File

@@ -53,11 +53,11 @@
#include "sudo_auth.h"
int
secureware_init(struct passwd *pw, sudo_auth *auth)
sudo_secureware_init(struct passwd *pw, sudo_auth *auth)
{
#ifdef __alpha
extern int crypt_type;
debug_decl(secureware_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_secureware_init, SUDO_DEBUG_AUTH)
if (crypt_type == INT_MAX)
debug_return_int(AUTH_FAILURE); /* no shadow */
@@ -71,10 +71,10 @@ secureware_init(struct passwd *pw, sudo_auth *auth)
}
int
secureware_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_secureware_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
char *pw_epasswd = auth->data;
debug_decl(secureware_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_secureware_verify, SUDO_DEBUG_AUTH)
#ifdef __alpha
{
extern int crypt_type;
@@ -101,12 +101,12 @@ secureware_verify(struct passwd *pw, char *pass, sudo_auth *auth)
}
int
secureware_cleanup(pw, auth)
sudo_secureware_cleanup(pw, auth)
struct passwd *pw;
sudo_auth *auth;
{
char *pw_epasswd = auth->data;
debug_decl(secureware_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_secureware_cleanup, SUDO_DEBUG_AUTH)
if (pw_epasswd != NULL) {
zero_bytes(pw_epasswd, strlen(pw_epasswd));

View File

@@ -67,10 +67,10 @@
* success.
*/
int
securid_init(struct passwd *pw, sudo_auth *auth)
sudo_securid_init(struct passwd *pw, sudo_auth *auth)
{
static SDI_HANDLE sd_dat; /* SecurID handle */
debug_decl(securid_init, SUDO_DEBUG_AUTH)
debug_decl(sudo_securid_init, SUDO_DEBUG_AUTH)
auth->data = (void *) &sd_dat; /* For method-specific data */
@@ -96,11 +96,11 @@ securid_init(struct passwd *pw, sudo_auth *auth)
* otherwise
*/
int
securid_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
sudo_securid_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{
SDI_HANDLE *sd = (SDI_HANDLE *) auth->data;
int retval;
debug_decl(securid_setup, SUDO_DEBUG_AUTH)
debug_decl(sudo_securid_setup, SUDO_DEBUG_AUTH)
/* Re-initialize SecurID every time. */
if (SD_Init(sd) != ACM_OK) {
@@ -147,11 +147,11 @@ securid_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
* incorrect authentication, fatal on errors
*/
int
securid_verify(struct passwd *pw, char *pass, sudo_auth *auth)
sudo_securid_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
SDI_HANDLE *sd = (SDI_HANDLE *) auth->data;
int rval;
debug_decl(securid_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_securid_verify, SUDO_DEBUG_AUTH)
pass = auth_getpass("Enter your PASSCODE: ",
def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF);

View File

@@ -87,13 +87,13 @@ sudo_collect(int timeout, int rendition, uchar_t *title, int nprompts,
}
int
sia_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
sudo_sia_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{
SIAENTITY *siah = NULL;
int i;
extern int NewArgc;
extern char **NewArgv;
debug_decl(sia_setup, SUDO_DEBUG_AUTH)
debug_decl(sudo_sia_setup, SUDO_DEBUG_AUTH)
/* Rebuild argv for sia_ses_init() */
sudo_argc = NewArgc + 1;
@@ -115,10 +115,10 @@ sia_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
}
int
sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
sudo_sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
{
SIAENTITY *siah = (SIAENTITY *) auth->data;
debug_decl(sia_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_sia_verify, SUDO_DEBUG_AUTH)
def_prompt = prompt; /* for sudo_collect */
@@ -130,10 +130,10 @@ sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
}
int
sia_cleanup(struct passwd *pw, sudo_auth *auth)
sudo_sia_cleanup(struct passwd *pw, sudo_auth *auth)
{
SIAENTITY *siah = (SIAENTITY *) auth->data;
debug_decl(sia_cleanup, SUDO_DEBUG_AUTH)
debug_decl(sudo_sia_cleanup, SUDO_DEBUG_AUTH)
(void) sia_ses_release(&siah);
efree(sudo_argv);

View File

@@ -51,19 +51,19 @@
static sudo_auth auth_switch[] = {
/* Standalone entries first */
#ifdef HAVE_PAM
AUTH_ENTRY("pam", FLAG_STANDALONE, pam_init, NULL, pam_verify, pam_cleanup, pam_begin_session, pam_end_session)
AUTH_ENTRY("pam", FLAG_STANDALONE, sudo_pam_init, NULL, sudo_pam_verify, sudo_pam_cleanup, sudo_pam_begin_session, sudo_pam_end_session)
#endif
#ifdef HAVE_SECURID
AUTH_ENTRY("SecurId", FLAG_STANDALONE, securid_init, securid_setup, securid_verify, NULL, NULL, NULL)
AUTH_ENTRY("SecurId", FLAG_STANDALONE, sudo_securid_init, sudo_securid_setup, sudo_securid_verify, NULL, NULL, NULL)
#endif
#ifdef HAVE_SIA_SES_INIT
AUTH_ENTRY("sia", FLAG_STANDALONE, NULL, sia_setup, sia_verify, sia_cleanup, NULL, NULL)
AUTH_ENTRY("sia", FLAG_STANDALONE, NULL, sudo_sia_setup, sudo_sia_verify, sudo_sia_cleanup, NULL, NULL)
#endif
#ifdef HAVE_AIXAUTH
AUTH_ENTRY("aixauth", FLAG_STANDALONE, NULL, NULL, aixauth_verify, aixauth_cleanup, NULL, NULL)
AUTH_ENTRY("aixauth", FLAG_STANDALONE, NULL, NULL, sudo_aix_verify, sudo_aix_cleanup, NULL, NULL)
#endif
#ifdef HAVE_FWTK
AUTH_ENTRY("fwtk", FLAG_STANDALONE, fwtk_init, NULL, fwtk_verify, fwtk_cleanup, NULL, NULL)
AUTH_ENTRY("fwtk", FLAG_STANDALONE, sudo_fwtk_init, NULL, sudo_fwtk_verify, sudo_fwtk_cleanup, NULL, NULL)
#endif
#ifdef HAVE_BSD_AUTH_H
AUTH_ENTRY("bsdauth", FLAG_STANDALONE, bsdauth_init, NULL, bsdauth_verify, bsdauth_cleanup, NULL, NULL)
@@ -71,25 +71,25 @@ static sudo_auth auth_switch[] = {
/* Non-standalone entries */
#ifndef WITHOUT_PASSWD
AUTH_ENTRY("passwd", 0, passwd_init, NULL, passwd_verify, passwd_cleanup, NULL, NULL)
AUTH_ENTRY("passwd", 0, sudo_passwd_init, NULL, sudo_passwd_verify, sudo_passwd_cleanup, NULL, NULL)
#endif
#if defined(HAVE_GETPRPWNAM) && !defined(WITHOUT_PASSWD)
AUTH_ENTRY("secureware", 0, secureware_init, NULL, secureware_verify, secureware_cleanup, NULL, NULL)
AUTH_ENTRY("secureware", 0, sudo_secureware_init, NULL, sudo_secureware_verify, sudo_secureware_cleanup, NULL, NULL)
#endif
#ifdef HAVE_AFS
AUTH_ENTRY("afs", 0, NULL, NULL, afs_verify, NULL, NULL, NULL)
AUTH_ENTRY("afs", 0, NULL, NULL, sudo_afs_verify, NULL, NULL, NULL)
#endif
#ifdef HAVE_DCE
AUTH_ENTRY("dce", 0, NULL, NULL, dce_verify, NULL, NULL, NULL)
AUTH_ENTRY("dce", 0, NULL, NULL, sudo_dce_verify, NULL, NULL, NULL)
#endif
#ifdef HAVE_KERB5
AUTH_ENTRY("kerb5", 0, kerb5_init, kerb5_setup, kerb5_verify, kerb5_cleanup, NULL, NULL)
AUTH_ENTRY("kerb5", 0, sudo_krb5_init, sudo_krb5_setup, sudo_krb5_verify, sudo_krb5_cleanup, NULL, NULL)
#endif
#ifdef HAVE_SKEY
AUTH_ENTRY("S/Key", 0, NULL, rfc1938_setup, rfc1938_verify, NULL, NULL, NULL)
AUTH_ENTRY("S/Key", 0, NULL, sudo_rfc1938_setup, sudo_rfc1938_verify, NULL, NULL, NULL)
#endif
#ifdef HAVE_OPIE
AUTH_ENTRY("OPIE", 0, NULL, rfc1938_setup, rfc1938_verify, NULL, NULL, NULL)
AUTH_ENTRY("OPIE", 0, NULL, sudo_rfc1938_setup, sudo_rfc1938_verify, NULL, NULL, NULL)
#endif
AUTH_ENTRY(NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL)
};

View File

@@ -55,41 +55,41 @@ char *auth_getpass(const char *prompt, int timeout, int type);
extern sudo_conv_t sudo_conv;
/* Prototypes for standalone methods */
int fwtk_init(struct passwd *pw, sudo_auth *auth);
int fwtk_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int fwtk_cleanup(struct passwd *pw, sudo_auth *auth);
int pam_init(struct passwd *pw, sudo_auth *auth);
int pam_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int pam_cleanup(struct passwd *pw, sudo_auth *auth);
int pam_begin_session(struct passwd *pw, sudo_auth *auth);
int pam_end_session(struct passwd *pw, sudo_auth *auth);
int sia_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int sia_cleanup(struct passwd *pw, sudo_auth *auth);
int aixauth_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int aixauth_cleanup(struct passwd *pw, sudo_auth *auth);
int bsdauth_init(struct passwd *pw, sudo_auth *auth);
int bsdauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int bsdauth_cleanup(struct passwd *pw, sudo_auth *auth);
int sudo_aix_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_aix_cleanup(struct passwd *pw, sudo_auth *auth);
int sudo_fwtk_init(struct passwd *pw, sudo_auth *auth);
int sudo_fwtk_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int sudo_fwtk_cleanup(struct passwd *pw, sudo_auth *auth);
int sudo_pam_init(struct passwd *pw, sudo_auth *auth);
int sudo_pam_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int sudo_pam_cleanup(struct passwd *pw, sudo_auth *auth);
int sudo_pam_begin_session(struct passwd *pw, sudo_auth *auth);
int sudo_pam_end_session(struct passwd *pw, sudo_auth *auth);
int sudo_securid_init(struct passwd *pw, sudo_auth *auth);
int sudo_securid_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int sudo_securid_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_sia_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int sudo_sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth);
int sudo_sia_cleanup(struct passwd *pw, sudo_auth *auth);
/* Prototypes for normal methods */
int passwd_init(struct passwd *pw, sudo_auth *auth);
int passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int passwd_cleanup(struct passwd *pw, sudo_auth *auth);
int secureware_init(struct passwd *pw, sudo_auth *auth);
int secureware_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int secureware_cleanup(struct passwd *pw, sudo_auth *auth);
int rfc1938_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int afs_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int dce_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int kerb5_init(struct passwd *pw, sudo_auth *auth);
int kerb5_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int kerb5_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int kerb5_cleanup(struct passwd *pw, sudo_auth *auth);
int securid_init(struct passwd *pw, sudo_auth *auth);
int securid_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int securid_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_afs_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_dce_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_krb5_init(struct passwd *pw, sudo_auth *auth);
int sudo_krb5_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int sudo_krb5_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_krb5_cleanup(struct passwd *pw, sudo_auth *auth);
int sudo_passwd_init(struct passwd *pw, sudo_auth *auth);
int sudo_passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_passwd_cleanup(struct passwd *pw, sudo_auth *auth);
int sudo_rfc1938_setup(struct passwd *pw, char **prompt, sudo_auth *auth);
int sudo_rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_secureware_init(struct passwd *pw, sudo_auth *auth);
int sudo_secureware_verify(struct passwd *pw, char *pass, sudo_auth *auth);
int sudo_secureware_cleanup(struct passwd *pw, sudo_auth *auth);
/* Fields: name, flags, init, setup, verify, cleanup, begin_sess, end_sess */
#define AUTH_ENTRY(n, f, i, s, v, c, b, e) \