]> granicus.if.org Git - sudo/commitdiff
Fix non-dynamic (no dlopen) sudo build.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 14 Nov 2011 02:24:54 +0000 (21:24 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 14 Nov 2011 02:24:54 +0000 (21:24 -0500)
plugins/sudoers/group_plugin.c
plugins/sudoers/plugin_error.c
plugins/sudoers/sudoers.c
src/conversation.c

index 133f4619eb15853900bdb75a1a40bc539be846d1..9caea154fa7746da4855ac8c5bbf8eed6b3f9bad 100644 (file)
@@ -16,8 +16,6 @@
 
 #include <config.h>
 
-#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -58,6 +56,8 @@
 # define RTLD_GLOBAL   0
 #endif
 
+#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
+
 static void *group_handle;
 static struct sudoers_group_plugin *group_plugin;
 
@@ -199,12 +199,6 @@ group_plugin_query(const char *user, const char *group,
  * No loadable shared object support.
  */
 
-#ifndef FALSE
-#define FALSE  0
-#endif
-
-struct passwd;
-
 int
 group_plugin_load(char *plugin_info)
 {
@@ -216,7 +210,7 @@ void
 group_plugin_unload(void)
 {
     debug_decl(group_plugin_unload, SUDO_DEBUG_UTIL)
-    debug_return_bool;
+    debug_return;
 }
 
 int
index 44e073ac0f353f2d54ae8a4914e8b578a2112300..142eddc1d5ec4b2f9a36bc0a560ab9dc09988bcd 100644 (file)
@@ -35,7 +35,7 @@
 static void _warning(int, const char *, va_list);
        void plugin_cleanup(int);
 
-sigjmp_buf error_jmp;
+extern sigjmp_buf error_jmp;
 
 extern sudo_conv_t sudo_conv;
 
index 20fd435a19246cfe3012b4e894324401814688f9..72e379131031984ff7add22aa67ede56ab2482bf 100644 (file)
@@ -132,8 +132,8 @@ static sigaction_t saved_sa_int, saved_sa_quit, saved_sa_tstp;
 int NewArgc;
 char **NewArgv;
 
-/* plugin_error.c */
-extern sigjmp_buf error_jmp;
+/* Declared here instead of plugin_error.c for static sudo builds. */
+sigjmp_buf error_jmp;
 
 static int
 sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
index c21a836a6c2f41750791dbbd977777bc1739a3f7..a2dab5a7c385b142a81ee69fe8f6af65583c4241 100644 (file)
@@ -51,7 +51,9 @@
 
 extern int tgetpass_flags; /* XXX */
 
+#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
 sudo_conv_t sudo_conv; /* NULL in sudo front-end */
+#endif
 
 /*
  * Sudo conversation function.