Fix non-dynamic (no dlopen) sudo build.

This commit is contained in:
Todd C. Miller
2011-11-13 21:24:54 -05:00
parent 19c98b62bf
commit f689afb5ee
4 changed files with 8 additions and 12 deletions

View File

@@ -16,8 +16,6 @@
#include <config.h> #include <config.h>
#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
@@ -58,6 +56,8 @@
# define RTLD_GLOBAL 0 # define RTLD_GLOBAL 0
#endif #endif
#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
static void *group_handle; static void *group_handle;
static struct sudoers_group_plugin *group_plugin; 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. * No loadable shared object support.
*/ */
#ifndef FALSE
#define FALSE 0
#endif
struct passwd;
int int
group_plugin_load(char *plugin_info) group_plugin_load(char *plugin_info)
{ {
@@ -216,7 +210,7 @@ void
group_plugin_unload(void) group_plugin_unload(void)
{ {
debug_decl(group_plugin_unload, SUDO_DEBUG_UTIL) debug_decl(group_plugin_unload, SUDO_DEBUG_UTIL)
debug_return_bool; debug_return;
} }
int int

View File

@@ -35,7 +35,7 @@
static void _warning(int, const char *, va_list); static void _warning(int, const char *, va_list);
void plugin_cleanup(int); void plugin_cleanup(int);
sigjmp_buf error_jmp; extern sigjmp_buf error_jmp;
extern sudo_conv_t sudo_conv; extern sudo_conv_t sudo_conv;

View File

@@ -132,8 +132,8 @@ static sigaction_t saved_sa_int, saved_sa_quit, saved_sa_tstp;
int NewArgc; int NewArgc;
char **NewArgv; char **NewArgv;
/* plugin_error.c */ /* Declared here instead of plugin_error.c for static sudo builds. */
extern sigjmp_buf error_jmp; sigjmp_buf error_jmp;
static int static int
sudoers_policy_open(unsigned int version, sudo_conv_t conversation, sudoers_policy_open(unsigned int version, sudo_conv_t conversation,

View File

@@ -51,7 +51,9 @@
extern int tgetpass_flags; /* XXX */ extern int tgetpass_flags; /* XXX */
#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
sudo_conv_t sudo_conv; /* NULL in sudo front-end */ sudo_conv_t sudo_conv; /* NULL in sudo front-end */
#endif
/* /*
* Sudo conversation function. * Sudo conversation function.