[Pkg-samba-maint] Bug#629406: Bug#629406: Bug#629406: samba-common: create empty /etc/samba/dhcp.conf even if samba-common/dhcp=false
bubulle at debian.org
Fri Jun 10 05:45:08 UTC 2011
Quoting Luca Capello (luca at pca.it):
> >> The dhcp3-client package must be installed to take advantage of this feature.
> BTW, I completely missed this, which is a bug, this should be changed to
> isc-dhcp-client (I could clone this bug or submit a new one, but
> IMHO is a waste of time, given that dhcp3-client is still in sid).
That's correct, you're right. This warrants a wording change in the
debconf template. So, yes, a separate bug report.
Anyway, if we go for /var/run/samba/dhcp.conf, we have to change the
> > The debconf question has never been intended to govern whether the dhcp hook
> > script runs, only whether samba makes use of the information. We could
> > possibly move this file into /run, if that would help.
> We must, otherwise there is no possibility to have a read-only root.
> Given that, I added it to the corresponding wiki page:
Yes, I think we have an agreement, here.
> >>> Hmmm, indeed. The /etc/dhcp3/dhclient-enter-hooks.d/samba hook is a
> >>> little bit naive here...
> >>> The attached (untested) patch should fix this by testing if the file
> >>> to be created is non empty before putting it in place. Could you check
> >>> this?
> Christian, given that there is no consensus yet, I have not tested your
> patch. Feel free to ask for it and I will gladly do.
Nope, no need. Steve's concerns are enough to stop me on that way..:-)
> >> Nack. The hook script *should* be naive; we don't want to add more
> >> complexity here.
> >> We can move the include file to /run instead.
> > And update smb.conf accordingly? Even if smb.conf has been modified
> > by the local admin?
> Please note that neither `man smb.conf` nor the samba-doc package
> contain any reference to dhcp.conf. I thus went to the Samba upstream
> website, but neither "Using Samba, 2nd Edition, chapter 6, 'The Samba
> Configuration File'" nor the daily docs build contain dhcp.conf:
> To me it seems that /etc/samba/dhcp.conf is Debian-specific, i.e. not an
> upstream configuration file. Given that this file is intended to be
> created when using DHCP through the isc-dhcp-client package, I think the
> only proper location is /run/samba/dhcp.conf.
> I do not think there is any problem in having it included or not in
> /etc/samba/smb.conf: if we continue to manage this through debconf,
> installing the samba-common package or reconfiguring it suppose that (at
> least) /etc is writable.
Yes, this is Debian/Ubuntu specific....
My point was: what to do when people have "include
/etc/samba/dhcp.conf" in smb.conf?
Should we modify this in smb.conf while we're moving the file to
/run/samba? Probably, I think as this include comes from samba
postinst maintainer script.
This bug report is definitely a good opportunity for the samba package
to adopt the move to /run. We have other things that we need to move
there anyway (what's currently in /var/run/samba).
I might need help for cooking up a proper patch for samba.postinst so
that it rewrites the include line. I'm not a sed expert enough for
doing this in a safe way..:-)....for other things related to this bug
report, I think I can handle them.
PS: I see you included Joey in the loop. I'm fine with that (I'm
always OK to get Joey's advice on anything..:-)), but I missed why...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the Pkg-samba-maint