]> granicus.if.org Git - sudo/commitdiff
Set the sudoers plugin name in configure so we get the extension right.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 17 Mar 2010 22:48:19 +0000 (18:48 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 17 Mar 2010 22:48:19 +0000 (18:48 -0400)
config.h.in
configure
configure.in
src/load_plugins.c

index 586753a8c9ff8908b1132b7d2d391a7dcb56b5e5..01a26bffb1a9ff0b313eee36ca7c5d64271fbed5 100644 (file)
@@ -25,6 +25,9 @@
 /* Define to 1 if using `alloca.c'. */
 #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
    "command not found" when a command cannot be found. */
 #undef DONT_LEAK_PATH_INFO
index 6f0c4481137918bcc65cb6e3df7c1df025a6bd2c..edb414de66802320f299010e94ecc848dc84100b 100755 (executable)
--- a/configure
+++ b/configure
@@ -26287,6 +26287,10 @@ _ACEOF
     eval PLUGINDIR="$with_plugindir"
     cat >>confdefs.h <<EOF
 #define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR"
+EOF
+
+    cat >>confdefs.h <<EOF
+#define SUDOERS_PLUGIN "sudoers$_shrext"
 EOF
 
     exec_prefix="$oexec_prefix"
@@ -27727,6 +27731,8 @@ fi
 
 
 
+
+
 
 
 
index cb3ab39add64228908fb7c1ebac15778edb47651..daf09e50af3baef2d07303a406c69c402ae2ad64 100644 (file)
@@ -2695,6 +2695,7 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
     fi
     eval PLUGINDIR="$with_plugindir"
     SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR")
+    SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers$_shrext")
     exec_prefix="$oexec_prefix"
 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(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(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(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.])
index 33bc5063f43342403fd2fb59671f8fe575bb1371..496ed79aaa35830519b2d331f08f622754f0cf1f 100644 (file)
@@ -60,8 +60,8 @@ sudo_read_conf(const char *conf_file)
     if ((fp = fopen(conf_file, "r")) == NULL) {
        /* Default values */
        info = emalloc(sizeof(*info));
-       info->symbol_name = "sudoers";
-       info->path = "sudoers_policy";
+       info->symbol_name = "sudoers_policy";
+       info->path = SUDOERS_PLUGIN;
        info->prev = info;
        info->next = NULL;
        tq_append(&pil, info);