depot/third_party/nixpkgs/pkgs/tools/system/netdata/ndsudo-fix-path.patch
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

17 lines
603 B
Diff

# See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868
# https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93
diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c
index d53ca9f28..b42a121bf 100644
--- a/src/collectors/plugins.d/ndsudo.c
+++ b/src/collectors/plugins.d/ndsudo.c
@@ -357,9 +357,6 @@ int main(int argc, char *argv[]) {
return 3;
}
- char new_path[] = "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
- putenv(new_path);
-
setuid(0);
setgid(0);
setegid(0);