rts: Stop tracing environment variables (fixes #15371)
authorMitsutoshi Aoe <maoe@foldr.in>
Sun, 14 Oct 2018 18:23:21 +0000 (20:23 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sun, 14 Oct 2018 18:23:21 +0000 (20:23 +0200)
Summary:
This tracing may cause a security issue as some external tools
out there expects user to set credentials in environment variables.

Reviewers: bgamari, erikd, simonmar, monoidal

Reviewed By: monoidal

Subscribers: tdammers, rwbarton, carter

GHC Trac Issues: #15371

Differential Revision: https://phabricator.haskell.org/D5187

rts/Trace.c

index 5b485c4..5abd1d9 100644 (file)
@@ -478,16 +478,6 @@ void traceOSProcessInfo_(void) {
                                    argc, argv);
             }
         }
-        {
-            int envc = 0; char **envv;
-            getProgEnvv(&envc, &envv);
-            if (envc != 0) {
-                postCapsetVecEvent(EVENT_PROGRAM_ENV,
-                                   CAPSET_OSPROCESS_DEFAULT,
-                                   envc, envv);
-            }
-            freeProgEnvv(envc, envv);
-        }
     }
 }