Hello Max,

Thank you for the bug report.

On Wed, Apr 20, 2022 at 11:30:32AM +0000, Max Faxälv wrote:
> Package: msktutil
> Version: 1.1
> 
> There is a bug in the crontab execution of msktutil. These scripts are not 
> present in main GitHub repository, so reporting to Debian issue tracker 
> instead.
> 
> /etc/cron.daily/msktutil:
> Error: Unknown parameter (--computer-name mymachine1234 -b 'OU=XX - 
> Office,OU=Workstation Linux,OU=XXX,DC=XXX,DC=XXX,DC=XXX')
> For help, try running msktutil --help
> run-parts: /etc/cron.daily/msktutil exited with return code 1
> 
> The "AUTOUPDATE_OPTIONS" argument seem to fail if you have **more** than 
> **one** option.
> 
> This can be solved by changing:
> 
> > exec /usr/sbin/msktutil --auto-update $AUTOUPDATE_OPTIONS
> 
> to
> 
> > eval "/usr/sbin/msktutil --auto-update $AUTOUPDATE_OPTIONS"
> 
> inside the `/etc/crontab.daily/msktutil` file.
> 
> This bug has been verified to be present on both msktuil 1.0 and 1.1, on both 
> Ubuntu 18.04 and 20.04.

I don't have a suitable test environment for msktutil and would like to
be sure to address your problem with the next upload.  Would you be able
to test quoting $AUTOUPDATE_OPTIONS like so:

  exec /usr/sbin/msktutil --auto-update "$AUTOUPDATE_OPTIONS"

This should avoid the splitting that causing problems for msktutil, and
avoids changing the exec to an eval, which leaves the invoking shell
around for a bit longer.  (Which is admittedly a minor nit, but the eval
doesn't appear to be needed.)

Thank you,
tony

Reply via email to