From 6fd3e0385762cd9f71ef702a503d5d68d3f2a067 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 13 Nov 2011 11:46:39 -0500 Subject: [PATCH] Prefix authentication functions with a "sudo_" prefix to avoid namespace problems. --- plugins/sudoers/auth/afs.c | 4 +-- plugins/sudoers/auth/aix_auth.c | 8 ++--- plugins/sudoers/auth/dce.c | 4 +-- plugins/sudoers/auth/fwtk.c | 12 +++---- plugins/sudoers/auth/kerb5.c | 20 +++++------ plugins/sudoers/auth/pam.c | 20 +++++------ plugins/sudoers/auth/passwd.c | 12 +++---- plugins/sudoers/auth/rfc1938.c | 8 ++--- plugins/sudoers/auth/secureware.c | 12 +++---- plugins/sudoers/auth/securid5.c | 12 +++---- plugins/sudoers/auth/sia.c | 12 +++---- plugins/sudoers/auth/sudo_auth.c | 24 ++++++------- plugins/sudoers/auth/sudo_auth.h | 60 +++++++++++++++---------------- 13 files changed, 104 insertions(+), 104 deletions(-) diff --git a/plugins/sudoers/auth/afs.c b/plugins/sudoers/auth/afs.c index 8a622e4c6..f9693d04f 100644 --- a/plugins/sudoers/auth/afs.c +++ b/plugins/sudoers/auth/afs.c @@ -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); diff --git a/plugins/sudoers/auth/aix_auth.c b/plugins/sudoers/auth/aix_auth.c index 6b7eda40d..be7ba46cc 100644 --- a/plugins/sudoers/auth/aix_auth.c +++ b/plugins/sudoers/auth/aix_auth.c @@ -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"); diff --git a/plugins/sudoers/auth/dce.c b/plugins/sudoers/auth/dce.c index 1df6ac063..467c08fe9 100644 --- a/plugins/sudoers/auth/dce.c +++ b/plugins/sudoers/auth/dce.c @@ -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 diff --git a/plugins/sudoers/auth/fwtk.c b/plugins/sudoers/auth/fwtk.c index f7adfed5a..48556237c 100644 --- a/plugins/sudoers/auth/fwtk.c +++ b/plugins/sudoers/auth/fwtk.c @@ -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); diff --git a/plugins/sudoers/auth/kerb5.c b/plugins/sudoers/auth/kerb5.c index ce9dd551c..daf5743c7 100644 --- a/plugins/sudoers/auth/kerb5.c +++ b/plugins/sudoers/auth/kerb5.c @@ -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; diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c index dc297ab8f..d85fc9929 100644 --- a/plugins/sudoers/auth/pam.c +++ b/plugins/sudoers/auth/pam.c @@ -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 diff --git a/plugins/sudoers/auth/passwd.c b/plugins/sudoers/auth/passwd.c index d14130d03..1736f3066 100644 --- a/plugins/sudoers/auth/passwd.c +++ b/plugins/sudoers/auth/passwd.c @@ -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)); diff --git a/plugins/sudoers/auth/rfc1938.c b/plugins/sudoers/auth/rfc1938.c index 75f95cc5c..f4ed7c0f6 100644 --- a/plugins/sudoers/auth/rfc1938.c +++ b/plugins/sudoers/auth/rfc1938.c @@ -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); diff --git a/plugins/sudoers/auth/secureware.c b/plugins/sudoers/auth/secureware.c index 3cb4e2614..776b5dd70 100644 --- a/plugins/sudoers/auth/secureware.c +++ b/plugins/sudoers/auth/secureware.c @@ -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)); diff --git a/plugins/sudoers/auth/securid5.c b/plugins/sudoers/auth/securid5.c index b12fc5c3f..6fe7dcbd0 100644 --- a/plugins/sudoers/auth/securid5.c +++ b/plugins/sudoers/auth/securid5.c @@ -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); diff --git a/plugins/sudoers/auth/sia.c b/plugins/sudoers/auth/sia.c index a2c41c2e5..c5b93926f 100644 --- a/plugins/sudoers/auth/sia.c +++ b/plugins/sudoers/auth/sia.c @@ -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); diff --git a/plugins/sudoers/auth/sudo_auth.c b/plugins/sudoers/auth/sudo_auth.c index 8125a8979..bc1c4eae9 100644 --- a/plugins/sudoers/auth/sudo_auth.c +++ b/plugins/sudoers/auth/sudo_auth.c @@ -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) }; diff --git a/plugins/sudoers/auth/sudo_auth.h b/plugins/sudoers/auth/sudo_auth.h index 45715c1d3..7259f22b5 100644 --- a/plugins/sudoers/auth/sudo_auth.h +++ b/plugins/sudoers/auth/sudo_auth.h @@ -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) \ -- 2.40.0