Add a trailing slash to _PATH_SUDO_PLUGIN_DIR to simplify usage.
This commit is contained in:
2
configure
vendored
2
configure
vendored
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user