You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2018/01/23 22:42:40 UTC

[2/2] mesos git commit: Cleared the executor auth token after using it.

Cleared the executor auth token after using it.

Since the executor may run in the same container and under
the same credential as the user task, we should clear the
`MESOS_EXECUTOR_AUTHENTICATION_TOKEN` environment variable
once we sample it.

Review: https://reviews.apache.org/r/63423/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9e18db59
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9e18db59
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9e18db59

Branch: refs/heads/master
Commit: 9e18db59f75b85fc6467272203366eef1c17233e
Parents: f348420
Author: James Peach <jp...@apache.org>
Authored: Tue Jan 23 14:13:01 2018 -0800
Committer: James Peach <jp...@apache.org>
Committed: Tue Jan 23 14:13:01 2018 -0800

----------------------------------------------------------------------
 src/executor/executor.cpp | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9e18db59/src/executor/executor.cpp
----------------------------------------------------------------------
diff --git a/src/executor/executor.cpp b/src/executor/executor.cpp
index 1c972d9..9459368 100644
--- a/src/executor/executor.cpp
+++ b/src/executor/executor.cpp
@@ -228,6 +228,10 @@ public:
       authenticationToken = value.get();
     }
 
+    // Erase the auth token from the environment so that it is not visible to
+    // other processes in the same PID namespace.
+    os::eraseenv("MESOS_EXECUTOR_AUTHENTICATION_TOKEN");
+
     // Get checkpointing status from environment.
     value = os::getenv("MESOS_CHECKPOINT");
     checkpoint = value.isSome() && value.get() == "1";