Closed grembo closed 6 years ago
New version requires File::HomeDir to get user dir in a platform independent way, added --setsid option to toggle if setsid should be used (defaults to off as in previous versions)
Thanks for the fixes!
I'm a bit torn on this PR as it really should probably be done in separate commits (or 3). The fixes are top priority of course.
--setsid is new option so that shouldn't have any regression issues. :+1:
I'm not entirely sure on SA's user_dir
. I do seem to remember that it was omitted for a reason (or was redundant)... I could be wrong and in any case it was a long time (many versions) ago. I'm not even sure if this changes default behavior... what does SA default user_dir
to if not specifically passed (but username
is)?
SA docs say...
user_dir A directory to use as a 'home directory' for the current user's data, overriding the system default.
Isn't File::HomeDir just getting the system default also (I'm guessing)?
P.S. Or perhaps I'm misinterpreting what SA docs mean by "system default?" I thought that would mean username
passed to SA, but maybe not?
It doesn't seem to be that simple.
The origin of this patch was here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=88901
Looking at SpamAssassin.pm it does various things, based on ~, HOME and configuration:
@default_userprefs_path = ( '~/.spamassassin/user_prefs', );
@default_userstate_dir = ( '~/.spamassassin', );
If user_dir is set, it's used to override those locations in get_and_set_userstate_dir. Then there's also expand_name later, which uses user_dir or $HOME (and kind of replicates what File::HomeDir does). user_state_dir is also overridden, so this could only be relevant to user_prefs (maybe)?
So to be honest, I'm not sure if this makes any difference or not.
As this isn't entirely clear, I removed userdir for the time being. I'll leave it in the FreeBSD port, to avoid breakage there too. This will allow you to tag the release and me to open a PR for the port. Thanks!
Great, thanks!
New release pushed.
...by making sure $(relay)socket is only defined if passed.
[0] Could not determine port number from host [*]:unix at line 78 in file /usr/local/lib/perl5/site_perl/Net/Server/Proto.pm