Source: scap-security-guide
Version: 0.1.80-1
Usertags: pidof-without-procps

Dear maintainer(s) of scap-security-guide,

it appears that scap-security-guide uses `pidof` in its testsuite, or that
at least one of its binary packages uses `pidof` at runtime.
Historically, `pidof` was provided by the Essential package
`sysvinit-tools`, making an explicit dependency unnecessary. However
`pidof` will soon be moved to `procps` and will no longer be part of
the Essential set.

Please add an explicit dependency on `procps`:

* via the `Depends:` field of all binary packages of scap-security-guide
  that use `pidof` at runtime;
* via the `Build-Depends:` field of scap-security-guide, if `pidof` is
  used in tests run at build-time;
* via the `Depends:` field of `debian/control/tests`, if `pidof` is
  used in autopkgtests.

To prevent any disruption for users of scap-security-guide, please add
this dependency now, before `pidof` is moved from `sysvinit-utils` to
`procps`. Alternatively, you could remove all uses of `pidof`.

It is believed that scap-security-guide uses `pidof` due to the following
code snippets:

```
path: 
scap-security-guide_0.1.79-1/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_remote_server/bash/shared.sh
config_file="/etc/ntp.conf"
/usr/sbin/pidof ntpd || config_file="{{{ chrony_conf_path }}}"
if ! grep -q ^server "$config_file" ; then


path: 
scap-security-guide_0.1.79-1/linux_os/guide/services/ntp/service_chronyd_or_ntpd_enabled/bash/shared.sh
# disruption = low
if {{{ bash_package_installed("chrony") }}} ; then
    if ! /usr/sbin/pidof ntpd ; then
        {{{ bash_service_command("enable", "chronyd") | indent(8) }}}
    fi


path: 
scap-security-guide_0.1.79-1/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_multiple_servers/bash/shared.sh
config_file="/etc/ntp.conf"
/usr/sbin/pidof ntpd || config_file="{{{ chrony_conf_path }}}"
if ! [ "$(grep -c '^server' "$config_file")" -gt 1 ] ; then


path: 
scap-security-guide_0.1.79-1/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/bash/shared.sh
pof="/bin/pidof"
{{% else %}}
pof="/usr/sbin/pidof"
{{% endif %}}


path: 
scap-security-guide_0.1.79-1/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/bash/shared.sh
{{% if 'sle' in product or 'slmicro' in product or 'ubuntu' in product %}}
pof="/bin/pidof"
{{% else %}}
pof="/usr/sbin/pidof"
```

Feel free to close this issue if this is a false positive (for example
if this code is in an unreachable code path).

Regards,

-- 
Gioele Barabucci

Reply via email to