Always define _PATH_SUDO_NOEXEC, _PATH_SUDO_SESH, _PATH_SUDO_PLUGIN_DIR,
even if only defined to NULL. This means the accessors can always be present. Use RTLD_PRELOAD_VAR instead of _PATH_SUDO_NOEXEC to tell when noexec is available. Add ENABLE_SUDO_PLUGIN_API and use it instead of _PATH_SUDO_PLUGIN_DIR to tell when the plugin API is available. Add sudo_conf_clear_paths() to clear the path values so the regress tests are not affected by compile-time settings.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
/* We always use the same name for the sudoers plugin, regardless of the OS */
|
||||
#define SUDOERS_PLUGIN "sudoers.so"
|
||||
|
||||
#ifdef _PATH_SUDO_PLUGIN_DIR
|
||||
#ifdef ENABLE_SUDO_PLUGIN_API
|
||||
static int
|
||||
sudo_stat_plugin(struct plugin_info *info, char *fullpath,
|
||||
size_t pathsize, struct stat *sb)
|
||||
@@ -144,7 +144,7 @@ sudo_check_plugin(struct plugin_info *info, char *fullpath, size_t pathsize)
|
||||
(void)strlcpy(fullpath, info->path, pathsize);
|
||||
debug_return_bool(true);
|
||||
}
|
||||
#endif /* _PATH_SUDO_PLUGIN_DIR */
|
||||
#endif /* ENABLE_SUDO_PLUGIN_API */
|
||||
|
||||
/*
|
||||
* Load the plugin specified by "info".
|
||||
|
Reference in New Issue
Block a user