Use AIX-style shared libraries on AIX by default instead of SVR4-style.

This removes the need to use the -brtl linker flag which can cause
problems when there are both a .so and .a version of the same library
but with different versions.  This was particularly problematic
when using the AIX freeware version of OpenSSL.  The --with-aix-soname=svr4
option can be used to build SVR4-style shared libs instead.
This commit is contained in:
Todd C. Miller
2022-12-26 07:43:55 -07:00
parent 5165fb9b22
commit 206700c3f0
12 changed files with 109 additions and 116 deletions

View File

@@ -34,9 +34,6 @@
#include "sudo_plugin_int.h"
#include "sudo_dso.h"
/* We always use the same name for the sudoers plugin, regardless of the OS */
#define SUDOERS_PLUGIN "sudoers.so"
#ifdef ENABLE_SUDO_PLUGIN_API
static int
sudo_stat_plugin(struct plugin_info *info, char *fullpath,
@@ -55,7 +52,7 @@ sudo_stat_plugin(struct plugin_info *info, char *fullpath,
} else {
#ifdef STATIC_SUDOERS_PLUGIN
/* Check static symbols. */
if (strcmp(info->path, SUDOERS_PLUGIN) == 0) {
if (strcmp(info->path, _PATH_SUDOERS_PLUGIN) == 0) {
if (strlcpy(fullpath, info->path, pathsize) >= pathsize) {
errno = ENAMETOOLONG;
goto done;
@@ -466,7 +463,7 @@ sudo_load_sudoers_plugin(const char *symbol_name, bool optional)
goto done;
}
info->symbol_name = strdup(symbol_name);
info->path = strdup(SUDOERS_PLUGIN);
info->path = strdup(_PATH_SUDOERS_PLUGIN);
if (info->symbol_name == NULL || info->path == NULL) {
sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
free_plugin_info(info);