]> granicus.if.org Git - sudo/commitdiff
Move pass_warn() so that it is defined before it is called().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 27 Sep 2014 02:39:40 +0000 (20:39 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 27 Sep 2014 02:39:40 +0000 (20:39 -0600)
plugins/sudoers/auth/sudo_auth.c

index 42ef9dd7074ee09f89927bdf95f49eb30382c9e9..adae8a76b3dbcb6f76d75822312de736b656053c 100644 (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)
 {