Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 778734 - acct-user/spamd does not change homedir if spamd user exists
Summary: acct-user/spamd does not change homedir if spamd user exists
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Philippe Chaintreuil
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-27 14:11 UTC by Benny Pedersen
Modified: 2022-07-09 22:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benny Pedersen 2021-03-27 14:11:21 UTC
with spamassassin older then 3.4.5 its valid homedir in /home/spamd, but in spamassassin 3.4.5 its changed to /var/lib/spamd

simple fix is

usermod --home /var/lib/spamd spamd

but acct-user/spamd is imho correct for new installs where spamd user is not existing on yet

hope i have giving needed info to solve it
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-27 17:26:42 UTC
Not a regression, right?
Comment 2 Philippe Chaintreuil 2021-03-27 20:19:37 UTC
@sam: no, I can't figure out anyway 3.4.5 itself could cause this.

@benny: Two requests so I can see if I can reproduce this:

1.)  Can you attach logs of your install (or a re-install) and emerge --info for reference?
2.)  Was spamd running at the time of the install?

Thanks.
Comment 3 Philippe Chaintreuil 2021-03-28 10:54:58 UTC
The only way I've been able to reproduce this is by having spamd running during the upgrade.  But the ebuild outputs a warning in that case:

if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
    ewarn "The spamd user's home folder has been moved to a new location."
    elog
    elog "The acct-user/spamd package should have relocated it for you,"
    elog "but may have failed because your spamd daemon was running."
    elog
    elog "To fix this:"
    elog " - Stop your spamd daemon"
    elog " - emerge -1 acct-user/spamd"
    elog " - Restart your spamd daemon"
    elog " - Remove the old home folder if you want"
    elog "     rm -rf \"${ROOT}/home/spamd\""
fi
Comment 4 Benny Pedersen 2021-03-28 22:34:17 UTC
confirmed that 

usermod --home /var/lib/spamd spamd

fails when spamd is started, makes sense, is it the same acct-user/spamd does not handle well ?
Comment 5 Philippe Chaintreuil 2021-04-18 13:39:52 UTC
Yes, acct-user/spamd is is the ebuild that attempts the home folder change.  (The spamassassin ebuild just tries to inform users (A) that we "recently" switched which ebuild was responsible for the home folder, (B) the implications of that, and (C) tries to do some simple checks and warnings if it doesn't seem like it worked or if the old folder is still around.
Comment 6 Conrad Kostecki gentoo-dev 2022-07-09 22:28:32 UTC
I think, we can close here. No other reports seen? Feel free to reopen, if you disagree.