]> granicus.if.org Git - sudo/commitdiff
Add a trailing slash to _PATH_SUDO_PLUGIN_DIR to simplify usage.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 2 Jul 2010 14:53:47 +0000 (10:53 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 2 Jul 2010 14:53:47 +0000 (10:53 -0400)
configure
configure.in
src/load_plugins.c

index cfcfc1c8dddc79571c35e03cd174adef48766297..558ef7463408d58a475d45d59fc8881630a8b3da 100755 (executable)
--- a/configure
+++ b/configure
@@ -18302,7 +18302,7 @@ _ACEOF
     fi
     eval PLUGINDIR="$with_plugindir"
     cat >>confdefs.h <<EOF
-#define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR"
+#define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR/"
 EOF
 
     cat >>confdefs.h <<EOF
index c831c6d7deb502641ab1595731324353270f3cec..de7adf5f6fe2e0922db183e0284d5f55f69c6f4c 100644 (file)
@@ -2770,7 +2770,7 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
        AC_DEFINE_UNQUOTED(_PATH_SUDO_SESH, "$sesh_file", [The fully qualified pathname of sesh])
     fi
     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$_shrext2")
     exec_prefix="$oexec_prefix"
 fi
index cea995b8bca780f352a88c4850e7d8ffb83885bb..5087f513d9b214c4494ac56048b55619f53a31eb 100644 (file)
@@ -143,9 +143,9 @@ sudo_load_plugins(const char *conf_file,
            if (strlcpy(path, info->path, sizeof(path)) >= sizeof(path))
                errorx(1, "%s: %s", info->path, strerror(ENAMETOOLONG));
        } else {
-           if (snprintf(path, sizeof(path), "%s/%s", _PATH_SUDO_PLUGIN_DIR,
+           if (snprintf(path, sizeof(path), "%s%s", _PATH_SUDO_PLUGIN_DIR,
                info->path) >= sizeof(path)) {
-               errorx(1, "%s/%s: %s", _PATH_SUDO_PLUGIN_DIR, info->path,
+               errorx(1, "%s%s: %s", _PATH_SUDO_PLUGIN_DIR, info->path,
                    strerror(ENAMETOOLONG));
            }
        }