You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2019/07/09 05:30:24 UTC
[mesos] branch master updated: Used euid to determine subprocess'
user when launching tasks.
This is an automated email from the ASF dual-hosted git repository.
jieyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new de7b506 Used euid to determine subprocess' user when launching tasks.
de7b506 is described below
commit de7b5062b1fa3ccd7fd345be6d7d816505eb066b
Author: fei long <ca...@gmail.com>
AuthorDate: Mon Jul 8 22:30:01 2019 -0700
Used euid to determine subprocess' user when launching tasks.
Review: https://reviews.apache.org/r/71005/
---
src/slave/containerizer/mesos/launch.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index b29ec55..0419e8e 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -926,8 +926,8 @@ int MesosContainerizerLaunch::execute()
}
// No need to change user/groups if the specified user is the same
- // as that of the current process.
- if (_uid.get() != os::getuid().get()) {
+ // as the effective user of the current process.
+ if (_uid.get() != ::geteuid()) {
Result<gid_t> _gid = os::getgid(launchInfo.user());
if (!_gid.isSome()) {
cerr << "Failed to get the gid of user '" << launchInfo.user() << "': "