Set the sudoers plugin name in configure so we get the extension right.

This commit is contained in:
Todd C. Miller
2010-03-17 18:48:19 -04:00
parent 81949e89d1
commit 5a2a2d193f
4 changed files with 13 additions and 2 deletions

View File

@@ -25,6 +25,9 @@
/* Define to 1 if using `alloca.c'. */ /* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA #undef C_ALLOCA
/* The name of the sudoers plugin, including extension. */
#undef SUDOERS_PLUGIN
/* Define to 1 if you want sudo to display "command not allowed" instead of /* Define to 1 if you want sudo to display "command not allowed" instead of
"command not found" when a command cannot be found. */ "command not found" when a command cannot be found. */
#undef DONT_LEAK_PATH_INFO #undef DONT_LEAK_PATH_INFO

6
configure vendored
View File

@@ -26287,6 +26287,10 @@ _ACEOF
eval PLUGINDIR="$with_plugindir" eval PLUGINDIR="$with_plugindir"
cat >>confdefs.h <<EOF cat >>confdefs.h <<EOF
#define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR" #define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR"
EOF
cat >>confdefs.h <<EOF
#define SUDOERS_PLUGIN "sudoers$_shrext"
EOF EOF
exec_prefix="$oexec_prefix" exec_prefix="$oexec_prefix"
@@ -27727,6 +27731,8 @@ fi

View File

@@ -2695,6 +2695,7 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
fi fi
eval PLUGINDIR="$with_plugindir" eval PLUGINDIR="$with_plugindir"
SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR") SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR")
SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers$_shrext")
exec_prefix="$oexec_prefix" exec_prefix="$oexec_prefix"
fi fi
@@ -2722,6 +2723,7 @@ dnl
AH_TEMPLATE(BROKEN_SYSLOG, [Define to 1 if the `syslog' function returns a non-zero int to denote failure.]) AH_TEMPLATE(BROKEN_SYSLOG, [Define to 1 if the `syslog' function returns a non-zero int to denote failure.])
AH_TEMPLATE(CLASSIC_INSULTS, [Define to 1 if you want the insults from the "classic" version sudo.]) AH_TEMPLATE(CLASSIC_INSULTS, [Define to 1 if you want the insults from the "classic" version sudo.])
AH_TEMPLATE(CSOPS_INSULTS, [Define to 1 if you want insults culled from the twisted minds of CSOps.]) AH_TEMPLATE(CSOPS_INSULTS, [Define to 1 if you want insults culled from the twisted minds of CSOps.])
AH_TEMPLATE(SUDOERS_PLUGIN, [The name of the sudoers plugin, including extension.])
AH_TEMPLATE(DONT_LEAK_PATH_INFO, [Define to 1 if you want sudo to display "command not allowed" instead of "command not found" when a command cannot be found.]) AH_TEMPLATE(DONT_LEAK_PATH_INFO, [Define to 1 if you want sudo to display "command not allowed" instead of "command not found" when a command cannot be found.])
AH_TEMPLATE(ENV_EDITOR, [Define to 1 if you want visudo to honor the EDITOR and VISUAL env variables.]) AH_TEMPLATE(ENV_EDITOR, [Define to 1 if you want visudo to honor the EDITOR and VISUAL env variables.])
AH_TEMPLATE(FQDN, [Define to 1 if you want to require fully qualified hosts in sudoers.]) AH_TEMPLATE(FQDN, [Define to 1 if you want to require fully qualified hosts in sudoers.])

View File

@@ -60,8 +60,8 @@ sudo_read_conf(const char *conf_file)
if ((fp = fopen(conf_file, "r")) == NULL) { if ((fp = fopen(conf_file, "r")) == NULL) {
/* Default values */ /* Default values */
info = emalloc(sizeof(*info)); info = emalloc(sizeof(*info));
info->symbol_name = "sudoers"; info->symbol_name = "sudoers_policy";
info->path = "sudoers_policy"; info->path = SUDOERS_PLUGIN;
info->prev = info; info->prev = info;
info->next = NULL; info->next = NULL;
tq_append(&pil, info); tq_append(&pil, info);