diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2024-04-11 12:54:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 12:54:35 +0300 |
commit | 44c3debc4da5218606e899c1a3515117c057bd5d (patch) | |
tree | bc4de822321119656fab98edd2f7a418ef5f14a4 | |
parent | 68e34e816b20a8bc40ba9f0e30b02be474db0afe (diff) |
hardcode ndsudo PATH (#17377)
-rw-r--r-- | src/collectors/plugins.d/ndsudo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c index 8225a448da..d401c885a9 100644 --- a/src/collectors/plugins.d/ndsudo.c +++ b/src/collectors/plugins.d/ndsudo.c @@ -268,6 +268,9 @@ int main(int argc, char *argv[]) { return 3; } + char new_path[] = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"; + setenv("PATH", new_path, 1); + bool found = false; char filename[FILENAME_MAX]; |