MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / dropHelperGroup

Function dropHelperGroup

src/client/client-common/utils/linuxutils.cpp:19–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17{
18
19bool dropHelperGroup()
20{
21 // Raw per-thread setresgid, not glibc's wrapper: glibc broadcasts the change to every thread (the
22 // setxid mechanism), which would strip the group from the connect thread (HelperConnector) before
23 // it finishes connecting. Dropping the saved gid too makes the drop permanent.
24 if (syscall(SYS_setresgid, getgid(), getgid(), getgid()) != 0) {
25 qCCritical(LOG_BASIC) << "Could not drop group";
26 return false;
27 }
28 return true;
29}
30
31QString getOsVersionString()
32{

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected