Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32157 - [sshguard] doesn't read all parameters configuration from /etc/conf.d/sshguard file

Attached to Project: Community Packages
Opened by Gabriel Machado (Geek2France) - Monday, 22 October 2012, 12:57 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Wednesday, 24 October 2012, 13:36 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The sshguard daemon reads only the first parameter from SSHGUARD_ARGS variable located in the /etc/conf.d/sshguard file

Additional info:
- package version : community/sshguard 1.5-6

/etc.conf.d/sshguard :
SSHGUARD_ARGS="-p 3600 -s 86400"

/var/log/auth.log :
Oct 22 12:37:52 myhotname sshguard[808]: Started successfully [(a,p,s)=(40, 3600, 1200)], now ready to scan.

As you can see in the /var/log/auth.log file, only the first parameter -p is used. The second parameter -s is ignored and is setted to its default value (1200).

Steps to reproduce:
Install sshguard as explained in the wiki.
Mdify the /etc/conf.d/sshguard to specify more than parameter.
Launch the daemon with this systemd command : systemctl start sshguard.service

Temporary solution :
Only add one argument in the file /etc/conf.d/sshguard and add your others parameters to the script /usr/lib/systemd/scripts/sshguard-journalctl.

Example : /usr/bin/journalctl -afbp info -n0 SYSLOG_FACILITY=4 SYSLOG_FACILITY=10 | /usr/sbin/sshguard -l /var/log/auth.log -l- -s 86400 -p 3600 "$@"
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Wednesday, 24 October 2012, 13:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  sshguard-1.5-7
Comment by Gaetan Bisson (vesath) - Monday, 22 October 2012, 21:32 GMT
You are not even supposed to use /etc/conf.d/* with systemd. The proper way to do things, if you feel the need to customize the default service file located in /usr/lib/systemd/system, is to copy it to /etc/systemd/system and apply your changes there.

So I suggest the maintainers of this package simply remove the EnvironmentFile entry of the service file; it goes against the standard that we have put in place for most packages.
Comment by Massimiliano Torromeo (mtorromeo) - Tuesday, 23 October 2012, 07:53 GMT
@Gaetan: I agree that the EnvironmentFile is not needed for the service file, but it is needed by the old rc.d script and since it is present, for the sake of consistency, I thought it would be better if the service file used it too. Do you think it should still not be used regardless of this considerations?
Comment by Sergej Pupykin (sergej) - Tuesday, 23 October 2012, 08:32 GMT
I think we should use conf.d in .service files until initscripts are supported or until upstream add config that covers all command line options.
Comment by Gabriel Machado (Geek2France) - Tuesday, 23 October 2012, 10:30 GMT
@Gaetan : Thank you for this information. I didn't know this.
If i copy the script to /etc/systemd/system and i apply modifications, the modified script will be overwritten by a package upgrade or not ?

@Massimiliano : Good idea to keep compatibility for the moment. But if the /etc/conf.d/* works correctly when used with /etc/rc.conf (not verified), i think it's not necessary that is working with systemd too.
Comment by Gaetan Bisson (vesath) - Tuesday, 23 October 2012, 12:55 GMT
Massimiliano: Most developers (see for instance [core] packages), including myself, agree that /etc/conf.d/ is made obsolete by the much more flexible option systemd gives users to customize init scripts by copying them to a directory where they will not be rewritten on upgrade.

Sergej: See https://www.archlinux.org/news/systemd-is-now-the-default-on-new-installations/ and in particular "individual packages may now start relying on the system being booted with systemd". We have no use for /etc/conf.d/ anymore.

Gabriel: Nothing under /etc/systemd/system ever gets overwritten; packages write to /usr/lib/systemd/system (and it is your job to merge if you made modifications).
Comment by Massimiliano Torromeo (mtorromeo) - Tuesday, 23 October 2012, 13:07 GMT
Gaetan: I also agree that it is not useful for systemd but I'm not sure if we should drop a fully functional rc script (even if I am not using it).

I think I am just going to drop EnvironmentFile from the systemd service.

Loading...