https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8533
Bug ID: 8533
Summary: Non-root spamd with -u fails on FreeBSD 15 when the
user is in wheel
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Hardware: All
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: spamc/spamd
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Undefined
Created attachment 6235
--> https://bz.apache.org/SpamAssassin/attachment.cgi?id=6235&action=edit
compare spamd -u group lists as sets, not strings
Failures in the spamd -u tests surfaced on a CPAN smoker running FreeBSD 15 as
a user in wheel (gid 0), which is a common configuration on FreeBSD. FreeBSD 15
returns a process's groups in a different order from earlier versions, which
exposed the bug. However the bug also occurs under less common reasonable
configurations on Linux and possibly other platforms, when spamd is started as
a non-root user with -u naming that user, and the user has a secondary gid 0.
The attached patch uses a set comparison instead of an order-dependent string
comparison of the lists of gids, which fixes the problem in the special
circumstances of this bug in which the two lists being compared are in
different orders. It also preserves the check that prevents a spamd started as
root with -u from keeping its gid 0.
--
You are receiving this mail because:
You are the assignee for the bug.