[booster] Drop privileged SGID for non-privileged apps. Fixes JB#48847

Under Linux, setgid() is implemented like the POSIX version with the
_POSIX_SAVED_IDS feature. That means that after "setgid(nemo)" SGID
will be set to "privileged" instead of "nemo". So using "setresuid()"
instead.

Signed-off-by: Igor Zhbanov <i.zhbanov@omprussia.ru>
pull/1/head
Igor Zhbanov 6 years ago committed by Igor Zhbanov
parent 6912348d5a
commit b62ef0d2d4

@ -521,7 +521,8 @@ void Booster::setEnvironmentBeforeLaunch()
} }
if (getegid() != m_appData->groupId()) { if (getegid() != m_appData->groupId()) {
setgid(m_appData->groupId()); setresgid(m_appData->groupId(), m_appData->groupId(),
m_appData->groupId());
} }
} }

Loading…
Cancel
Save