[Pkg-samba-maint] Bug#801976: samba-common: dhclient hook fails if samba not installed

Jan Braun janbraun at gmx.net
Fri Oct 16 15:16:59 UTC 2015


Package: samba-common
Version: 2:4.1.17+dfsg-4
Severity: normal
Tags: patch

Dear Maintainer,
On interface changes, I'm getting the following syslog message:

| $DATE $HOSTNAME root: /etc/dhcp/dhclient-enter-hooks.d/samba returned non-zero exit status 1

It seems #414841 wasn't fixed properly: the hook script ends with

|   # reload the samba server
|   # We don't necessarily have the samba package installed. #414841
|   [ -x /etc/init.d/smbd ] && /usr/sbin/invoke-rc.d smbd reload

, but this compound statement and thus the whole script will still
*fail* if /etc/init.d/smbd is not executable (i.e. samba is not
installed), because the exit code of the failed test propagates. You
want

|   [ ! -x /etc/init.d/smbd ] || /usr/sbin/invoke-rc.d smbd reload

instead. Patch attached.

This bug was until recently shadowed by #692846, which pevented
isc-dhcp-client < 4.3.3-5 from noticing the exit code. It now emits the
message and stops processing further hooks if one of them fails[1].

I'm reporting against testing's samba-common installed here, but
verified manually that experimental's 2:4.3.0+dfsg-2 still contains the
same code.

Thanks for maintaining samba.
    Jan

[1] According to the changelog; I didn't test the second part, and I
don't see how that's useful behaviour, tbh. In fact this is why I'm
reporting this as "normal" severity, for possibly preventing other hooks
from running, instead of barely minor for the error message.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (800, 'testing'), (550, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages samba-common depends on:
ii  debconf [debconf-2.0]  1.5.57
ii  dpkg                   1.18.3
ii  ucf                    3.0030

Versions of packages samba-common recommends:
pn  samba-common-bin  <none>

samba-common suggests no packages.

-- debconf information:
  samba-common/encrypt_passwords: true
  samba-common/dhcp: false
  samba-common/workgroup: WORKGROUP
  samba-common/title:
  samba-common/do_debconf: true
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba.dhclient-hook.diff
Type: text/x-diff
Size: 385 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20151016/4adf528f/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20151016/4adf528f/attachment.sig>


More information about the Pkg-samba-maint mailing list