Skip to content

Commit c851fb1

Browse files
committed
Ignore return code when clearing supplementary groups
If we're an anonymous client, we won't be allowed to clear the groups, logging an error. Rather than keeping a state variable, just try and ignore the result.
1 parent 64de6e5 commit c851fb1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/UserSentry.hh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,7 @@ public:
207207
// Clear supplementary groups
208208
// We don't need to restore the daemon's original groups, as the
209209
// *-privileged processes run without supplementary groups defined.
210-
if ((0 != ThreadSetgroups(0, nullptr))) {
211-
m_log.Emsg("UserSentry", "Failed to clear supplementary groups", strerror(errno));
212-
}
210+
ThreadSetgroups(0, nullptr);
213211
}
214212

215213
bool IsValid() const {return ((m_orig_gid != -1) && (m_orig_uid != -1)) || m_is_anonymous;}

0 commit comments

Comments
 (0)