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
|
fi
|
||||||
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
|
EOF
|
||||||
|
|
||||||
cat >>confdefs.h <<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])
|
AC_DEFINE_UNQUOTED(_PATH_SUDO_SESH, "$sesh_file", [The fully qualified pathname of sesh])
|
||||||
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$_shrext2")
|
SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers$_shrext2")
|
||||||
exec_prefix="$oexec_prefix"
|
exec_prefix="$oexec_prefix"
|
||||||
fi
|
fi
|
||||||
|
@@ -143,9 +143,9 @@ sudo_load_plugins(const char *conf_file,
|
|||||||
if (strlcpy(path, info->path, sizeof(path)) >= sizeof(path))
|
if (strlcpy(path, info->path, sizeof(path)) >= sizeof(path))
|
||||||
errorx(1, "%s: %s", info->path, strerror(ENAMETOOLONG));
|
errorx(1, "%s: %s", info->path, strerror(ENAMETOOLONG));
|
||||||
} else {
|
} 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)) {
|
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));
|
strerror(ENAMETOOLONG));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user