Bug#865223: acct: new init script is broken

Lukas Schwaighofer lukas at schwaighofer.name
Wed Jun 21 22:41:58 UTC 2017


Hi Marcos,

did you look at that bug already:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865223

I just checked your init script and it seems all but finished:

* DAEMON_ARGS is undefined, should probably be:
  DAEMON_ARGS="/var/log/account/pacct"
* you source /etc/default/acct and set the two variables if they do not
  exist, but you do not actually use either of those two variables
* function do_start(): if the --test run fails, you return 1, which
  will then be interpreted by the case as success?  That doesn't seem
  right to me.  What do you want to achieve here?  Maybe add a comment
  as at least to me this is not straight forward.
* function do_stop():
  - why do you add --oknodo on the second invocation if you allow the
    exit code 1 anyways?
  - in case the first call to start-stop-daemon failed, but the second
    succeeds, shouldn't you return RETVAL from the second one?
  - you're not clearing the $PIDFILE in all cases (I don't know if that
    was your intention…)
* the do_reload() function doesn't seem to be used
* the nested case for the restart|force-reload case has a different
  handling of the return values of do_start…

Regards
Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-security-team/attachments/20170622/de765af6/attachment.sig>


More information about the Pkg-security-team mailing list