Bug 4105 - FHS mode enhancements
FHS mode enhancements
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
All Linux
: P3 enhancement
: none
Assigned To: Tim Potter
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2006-09-15 10:39 UTC by Peter Eisentraut
Modified: 2009-12-11 08:54 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eisentraut 2006-09-15 10:39:45 UTC
The FHS installation mode needs to a few enhancements to be really FHS-conforming.  The following discussion is based on the fhs.patch that the Debian package has been carrying around for a while.  The patch works well as far as the file-system layout is concerned but it causes some problems, so we'd rather see this work merged upstream before we diverge further.

Before I start, the current version of the fhs.patch can be seen at <http://svn.debian.org/wsvn/pkg-samba/trunk/patches/fhs.patch?op=file&rev=0&sc=0>.

Here are the issues:

(1) Installation of character handling files such as upcase.dat and lowcase.dat in /usr/lib/samba/.  These files are architecture-independent, so they should be installed in /usr/share/samba.  Our patch solves this by introducing a data_path() function that replaces lib_path() in certain cases.

(2) The "lock directory" contains a bunch of things, not all of which are locks.  We have split this up into "lock dir" at /var/run/samba/, "cache dir" at "/var/cache/samba/", and "state dir" at "/var/lib/samba/".

The trick is that we have hardcoded the paths of the latter two, which annoys some users who would like to alter the paths (Debian bugs #247163, #249873).  But the alternative would be adding more configuration options, which we don't want to do unilaterally.  (There is a proposed patch available at Debian bug #268010.)  So it would be nice if you take up that task.

[To see Debian bug #N, go to http://bugs.debian.org/N.]

(3) The "private dir" isn't really a problem by itself, but someone thought that it would be better to map its uses to the "state dir", since that is also read protected.  So perhaps if you buy into the new directory options above, "private dir" can be phased out.

Thanks for considering.
Comment 1 Salvador Fandino 2006-12-03 11:25:39 UTC
this bug causes QEMU (http://fabrice.bellard.free.fr/qemu/) samba support to fail in Debian, as it launchs smbd not as root, but as the user running QEMU with the following configuration:

/usr/sbin/smbd -s /tmp/qemu-smb.$$/smb.conf 

private dir=/tmp/qemu-smb.3146
smb ports=0
socket address=
pid directory=/tmp/qemu-smb.3146
lock directory=/tmp/qemu-smb.3146
log file=/tmp/qemu-smb.3146/log.smbd
smb passwd file=/tmp/qemu-smb.3146/smbpasswd
security = share
read only=no
guest ok=yes

smbd ignores "private dir" and tries to access secrets.tbd and messages.tbd from the hard coded path and fails.

Comment 2 Spammer 2007-04-28 04:21:14 UTC
Created attachment 2501
Comment 3 Karolin Seeger 2009-12-11 08:54:51 UTC
(In reply to comment #0)
> (2) The "lock directory" contains a bunch of things, not all of which are
> locks.  We have split this up into "lock dir" at /var/run/samba/, "cache dir"
> at "/var/cache/samba/", and "state dir" at "/var/lib/samba/".

"cache directory" and "state directory" are smb.conf parameters in Samba 3.4 and newer.