#1136580 samba uses pidof but does not depend on procps

Package:
src:samba
Source:
src:samba
Submitter:
Gioele Barabucci
Date:
2026-10-15 18:35:02 UTC
Severity:
normal
Tags:
#1136580#5
Date:
2026-05-13 23:32:11 UTC
From:
To:
Dear maintainer(s) of samba,

it appears that samba 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 samba
  that use `pidof` at runtime;
* via the `Build-Depends:` field of samba, 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 samba, 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 samba uses `pidof` due to the following
code snippets:

```
path: samba_2:4.23.6+dfsg-2/ctdb/config/functions
	_count=1
	for _pid in $(pidof "$_prog"); do
		[ "$_count" -le "$_max" ] || break
```

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

Regards,

#1136580#10
Date:
2026-10-15 18:33:11 UTC
From:
To:
Control: tags -1 patch
After a quick inspection of ctdb, it seems that `pidof` is used in
`program_stack_traces()` (in `/etc/ctbd/functions`), which, in turn, is
used in /etc/ctdb/nfs-check.d/*.check as `service_debug_cmd`

For instance:

```
path: /etc/ctdb/nfs-checks.d/10.status.check
# status
version="1"
restart_every=2
unhealthy_after=6
service_stop_cmd="$CTDB_NFS_CALLOUT stop status"
service_start_cmd="$CTDB_NFS_CALLOUT start status"
service_debug_cmd="program_stack_traces rpc.statd 5"
```

You can find a MR that adds `procps` to CTDB's Recommends field at
<https://salsa.debian.org/samba-team/samba/-/merge_requests/73>.

Regards,