Quoting Julien Cristau ([email protected]): > On Tue, May 5, 2009 at 08:02:49 +0200, Christian Perrier wrote: > > > We need to change this as this is certainly a violation of the > > policy... > > How so? To me, /var/lib/ sounds more appropriate for db files than > /etc/...
You seem to agree with Steve on that one.
However, what about the good old smbpasswd? It also lives in "private
dir".
Anyway, whatever we decide about this, we need to reconsider what
we're currently doing:
debian/rules:
.../...
--libdir=/usr/lib/samba \
--with-privatedir=/etc/samba \
--with-piddir=/var/run/samba \
.../...
--with-modulesdir=/usr/lib/samba \
--datarootdir=/usr/share \
--datadir=/usr/share/samba \
--with-swatdir=/usr/share/samba/swat \
--with-lockdir=/var/run/samba \
--with-statedir=/var/lib/samba \
--with-cachedir=/var/cache/samba \
.../...
debian/patches/fhs-filespaths.patch:
Index: samba-3.3.0rc2/source/passdb/pdb_tdb.c
===================================================================
--- samba-3.3.0rc2.orig/source/passdb/pdb_tdb.c
+++ samba-3.3.0rc2/source/passdb/pdb_tdb.c
@@ -1613,7 +1613,7 @@
/* save the path for later */
if (!location) {
- if (asprintf(&tdbfile, "%s/%s", lp_private_dir(),
+ if (asprintf(&tdbfile, "%s/%s", get_dyn_STATEDIR(),
PASSDB_FILE_NAME) < 0) {
return NT_STATUS_NO_MEMORY;
}
Index: samba-3.3.0rc2/source/passdb/secrets.c
===================================================================
--- samba-3.3.0rc2.orig/source/passdb/secrets.c
+++ samba-3.3.0rc2/source/passdb/secrets.c
@@ -59,7 +59,7 @@
return True;
fname = talloc_asprintf(talloc_tos(), "%s/secrets.tdb",
- lp_private_dir());
+ get_dyn_STATEDIR());
if (fname == NULL) {
return false;
}
@@ -1113,7 +1113,7 @@
TDB_DATA vers;
uint32 ver;
TDB_CONTEXT *tdb_sc = NULL;
- char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb",
lp_private_dir());
+ char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb",
get_dyn_STATEDIR());
if (!fname) {
return NULL;
So, basically, what we're doing here seems to be:
-say that private dir will be /etc/samba
- but then replace it with "state_dir" when it's used
The consequence is that files end up in /var/lib/samba but in a very
weird way..:-)
We can probably discuss whether they belong to /etc/samba(/private) or
/var/lib/samba but anyway we can probably simplify all this....
signature.asc
Description: Digital signature

