[Bug 507374] Re: dhcp.conf file created with invalid syntax

Bug Watch Updater 507374 at bugs.launchpad.net
Thu Aug 11 05:52:40 UTC 2011


** Changed in: samba (Debian)
       Status: Unknown => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to samba in Ubuntu.
https://bugs.launchpad.net/bugs/507374

Title:
  dhcp.conf file created with invalid syntax

Status in “samba” package in Ubuntu:
  Fix Released
Status in “samba” package in Debian:
  Fix Released

Bug description:
  Binary package hint: samba

  I'm using Ubuntu 9.10 with dhcp3-client 3.1.2-1ubuntu7. We have a WINS
  server at 10.128.41.34, which clients are informed of via DHCP. The
  produced dhcp.conf file (generated by dhclient using /etc/dhcp3
  /dhclient-enter-hooks.d/samba) seems invalid, as it produces a file
  using a double equals symbol to assign the WINS servers. This has been
  observed from a number of Ubuntu machines.

  abolte at abolte-amd64:~$ cat /etc/samba/dhcp.conf
     wins server == br0:10.128.41.34
  abolte at abolte-amd64:~$

  Interestingly enough, the testparm command doesn't complain about it.
  The output does look wrong however. This could be another bug in
  itself I suppose, but is not the topic of this report.

  abolte at abolte-amd64:~$ testparm -s 2>&1 | grep wins
  	wins server = =, br0:10.128.41.34
  abolte at abolte-amd64:~$

  I've attached a patch which seems to fix the issue for me. Steps to use this would be (where "br0" is the interface in this case):
  1. If needed, release the current lease
  $ dhclient -r br0
  2. Delete the dhcp.conf file
  $ rm -f /etc/samba/dhcp.conf
  3. Replace /etc/dhcp3/dhclient-enter-hooks.d/samba with the patched version.
  4. Grab a lease
  $ dhclient br0

  The dhcp.conf file will now be re-created correctly as follows:

  abolte at abolte-amd64:/etc/samba$ cat dhcp.conf
     wins server = br0:10.128.41.34
  abolte at abolte-amd64:/etc/samba$

  The patch was created against the latest (at time of reporting) samba-
  common_3.4.3-2ubuntu1_all package, however testing was against
  3.4.0-3ubuntu5.3. The file in question has not changed between these
  releases.

  The patch should also detect an invalid config and correct it if it
  exists - but only if we're making changes anyway. Perhaps this check
  should go in regardless of the WINS setup not changing from previous
  leases? There was a small change thrown in to fix up the dhcp.conf
  formatting too.

  The problematic lines specifically seems to be:
  other_servers==""
  serverlist==""
  which I believe end up assigning "=" instead of nothing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/507374/+subscriptions




More information about the foundations-bugs mailing list