Skip to content

Commit

Permalink
hardcode ndsudo PATH (netdata#17377)
Browse files Browse the repository at this point in the history
(cherry picked from commit 44c3deb)
  • Loading branch information
ilyam8 authored and stelfrag committed Apr 11, 2024
1 parent 6385bc7 commit 5c7edac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/collectors/plugins.d/ndsudo.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,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];

Expand Down

0 comments on commit 5c7edac

Please sign in to comment.