diff options
author | Jose <jose@zeroc.com> | 2013-07-26 20:03:12 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2013-07-26 20:03:12 +0200 |
commit | 1857f8b03eca13ac6fb294edabb69f37bc5c7483 (patch) | |
tree | 1511fa54ca36fdbd0f8b3101ce4efbfa45e331fd /cpp/src | |
parent | Fixed ICE-5391 - bogus include path in generated files (diff) | |
download | ice-1857f8b03eca13ac6fb294edabb69f37bc5c7483.tar.bz2 ice-1857f8b03eca13ac6fb294edabb69f37bc5c7483.tar.xz ice-1857f8b03eca13ac6fb294edabb69f37bc5c7483.zip |
Don't call initgroups when runing as non root user.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/Activator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index 2da76f782d7..2b48144cf03 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -683,7 +683,10 @@ Activator::activate(const string& name, } } - if(initgroups(pw->pw_name, gid) == -1) + // + // Don't initialize supplementary groups if we are not running as root. + // + if(getuid() == 0 && initgroups(pw->pw_name, gid) == -1) { ostringstream os; os << pw->pw_name; |