2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Move pass_warn() so that it is defined before it is called().

This commit is contained in:
Todd C. Miller
2014-09-26 20:39:40 -06:00
parent b6432173cc
commit 4105734743

View File

@@ -95,8 +95,6 @@ static sudo_auth auth_switch[] = {
static int standalone;
static void pass_warn(void);
/*
* Initialize sudoers authentication method(s).
* Returns 0 on success and -1 on error.
@@ -161,6 +159,21 @@ sudo_auth_cleanup(struct passwd *pw)
debug_return_int(status == AUTH_FATAL ? -1 : 0);
}
static void
pass_warn(void)
{
const char *warning = def_badpass_message;
debug_decl(pass_warn, SUDO_DEBUG_AUTH)
#ifdef INSULT
if (def_insults)
warning = INSULT;
#endif
sudo_printf(SUDO_CONV_ERROR_MSG, "%s\n", warning);
debug_return;
}
/*
* Verify the specified user.
* Returns true if verified, false if not or -1 on error.
@@ -310,21 +323,6 @@ sudo_auth_end_session(struct passwd *pw)
debug_return_int(status == AUTH_FATAL ? -1 : 1);
}
static void
pass_warn(void)
{
const char *warning = def_badpass_message;
debug_decl(pass_warn, SUDO_DEBUG_AUTH)
#ifdef INSULT
if (def_insults)
warning = INSULT;
#endif
sudo_printf(SUDO_CONV_ERROR_MSG, "%s\n", warning);
debug_return;
}
char *
auth_getpass(const char *prompt, int timeout, int type)
{