Add a trailing slash to _PATH_SUDO_PLUGIN_DIR to simplify usage.

This commit is contained in:
Todd C. Miller
2010-07-02 10:53:47 -04:00
parent 454534eff2
commit 66eafd0994
3 changed files with 4 additions and 4 deletions

View 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));
}
}