diff --git a/src/launcherlib/booster.cpp b/src/launcherlib/booster.cpp index c1b078f..8d2b873 100644 --- a/src/launcherlib/booster.cpp +++ b/src/launcherlib/booster.cpp @@ -44,20 +44,6 @@ #include "coverage.h" -static const int FALLBACK_GID = 126; - -static gid_t getGroupId(const char *name, gid_t fallback) -{ - struct group group, *grpptr; - size_t size = sysconf(_SC_GETGR_R_SIZE_MAX); - char buf[size]; - - if (getgrnam_r(name, &group, buf, size, &grpptr) == 0 && grpptr != NULL) - return group.gr_gid; - else - return fallback; -} - Booster::Booster() : m_appData(new AppData), m_connection(NULL), @@ -66,7 +52,6 @@ Booster::Booster() : m_spaceAvailable(0), m_bootMode(false) { - m_boosted_gid = getGroupId("boosted", FALLBACK_GID); } Booster::~Booster() @@ -402,16 +387,6 @@ void Booster::setEnvironmentBeforeLaunch() if (getgid() != m_appData->groupId()) setgid(m_appData->groupId()); - - // Flip the real group ID forth and back to a dedicated group - // id to generate an event for policy (re-)classification. - // Using real ID instead of effective for dropping setgid - // from calling process (for example lipstick). - gid_t orig = getgid(); - - setegid(m_boosted_gid); - if (setregid(orig, orig) == -1) - Logger::logError("Failed to set process gid to %d, %s", orig, strerror(errno)); } // Reset out-of-memory killer adjustment diff --git a/src/launcherlib/booster.h b/src/launcherlib/booster.h index 7e674c0..feafada 100644 --- a/src/launcherlib/booster.h +++ b/src/launcherlib/booster.h @@ -213,10 +213,6 @@ private: //! True, if being run in boot mode. bool m_bootMode; - //! Group ID to flip to and back to generate an event for policy - //! (re)classification. - gid_t m_boosted_gid; - #ifdef UNIT_TEST friend class Ut_Booster; #endif