TODO: Upgrade script to move passdb.tdb and secrets.tdb from /var/lib/samba to /var...
authorAndrew Bartlett <abartlet@samba.org>
Sat, 4 May 2013 10:22:32 +0000 (22:22 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 5 May 2013 23:18:35 +0000 (11:18 +1200)
Samba now uses an acceptable location for the private dir, so this patch is no longer required, but we do need to upgrade from old installations.

Andrew Bartlett

debian/patches/fhs-filespaths.patch [deleted file]
debian/patches/series

diff --git a/debian/patches/fhs-filespaths.patch b/debian/patches/fhs-filespaths.patch
deleted file mode 100644 (file)
index 110c2d4..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-Description: Prepare the sources to better respect FHS
- This patch was historically very long but most parts have
- been integrated upstream.
- .
- The last remaining bit is the location of "private files
- We historically have them in /var/lib/samba while upstream
- has them in /etc/samba
- .
- We need to provide a migraiton path and go back to the "normal"
- file layout
-Author: Eloy A. Paris <peloy@debian.org>
-Bug-Debian: http://bugs.debian.org/49011
-Forwarded: not-needed
-
-
-Index: samba/source3/passdb/pdb_tdb.c
-===================================================================
---- samba.orig/source3/passdb/pdb_tdb.c
-+++ samba/source3/passdb/pdb_tdb.c
-@@ -1260,7 +1260,7 @@
-       /* save the path for later */
-       if (!location) {
--              if (asprintf(&tdbfile, "%s/%s", lp_private_dir(),
-+              if (asprintf(&tdbfile, "%s/%s", lp_statedir(),
-                            PASSDB_FILE_NAME) < 0) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-Index: samba/source3/passdb/secrets.c
-===================================================================
---- samba.orig/source3/passdb/secrets.c
-+++ samba/source3/passdb/secrets.c
-@@ -64,7 +64,7 @@
-               return True;
-       fname = talloc_asprintf(talloc_tos(), "%s/secrets.tdb",
--                              lp_private_dir());
-+                              lp_statedir());
-       if (fname == NULL) {
-               return false;
-       }
-Index: samba/docs/manpages/smb.conf.5
-===================================================================
---- samba.orig/docs/manpages/smb.conf.5
-+++ samba/docs/manpages/smb.conf.5
-@@ -7176,7 +7176,7 @@
- .\}
- tdbsam
- \- The TDB based password storage backend\&. Takes a path to the TDB as an optional argument (defaults to passdb\&.tdb in the
--\m[blue]\fBprivate dir\fR\m[]
-+\m[blue]\fBstate directory\fR\m[]
- directory\&.
- .RE
- .sp
-@@ -8047,9 +8047,7 @@
- .PP
- .RS 4
- This parameters defines the directory smbd will use for storing such files as
--smbpasswd
--and
--secrets\&.tdb\&.
-+smbpasswd\&. secrets\&.tdb is stored in state directory on Debian systems\&.
- .sp
- Default:
- \fI\fIprivate dir\fR\fR\fI = \fR\fI${prefix}/private\fR\fI \fR
---- a/libcli/auth/schannel_state_tdb.c
-+++ b/libcli/auth/schannel_state_tdb.c
-@@ -40,7 +40,7 @@
-                                            const char *private_dir)
- {
-       struct tdb_wrap *tdb_sc = NULL;
--      char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", private_dir);
-+      char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", get_dyn_STATEDIR());
-       if (!fname) {
-               return NULL;
---- a/source3/passdb/machine_sid.c
-+++ b/source3/passdb/machine_sid.c
-@@ -132,7 +132,7 @@
-       }
-       /* check for an old MACHINE.SID file for backwards compatibility */
--      if (asprintf(&fname, "%s/MACHINE.SID", lp_private_dir()) == -1) {
-+      if (asprintf(&fname, "%s/MACHINE.SID", lp_statedir()) == -1) {
-               SAFE_FREE(sam_sid);
-               return NULL;
-       }
---- a/source3/utils/net_idmap.c
-+++ b/source3/utils/net_idmap.c
-@@ -75,7 +75,7 @@
-               dbfile = lp_parm_talloc_string(-1, "tdb", "idmap2.tdb", NULL);
-               if (dbfile == NULL) {
-                       dbfile = talloc_asprintf(talloc_tos(), "%s/idmap2.tdb",
--                                               lp_private_dir());
-+                                               lp_statedir());
-               }
-               if (dbfile == NULL) {
-                       d_fprintf(stderr, _("Out of memory!\n"));
---- a/source3/winbindd/idmap_tdb2.c
-+++ b/source3/winbindd/idmap_tdb2.c
-@@ -108,7 +108,7 @@
-               return NT_STATUS_OK;
-       }
--      db_path = talloc_asprintf(NULL, "%s/idmap2.tdb", lp_private_dir());
-+      db_path = talloc_asprintf(NULL, "%s/idmap2.tdb", lp_statedir());
-       NT_STATUS_HAVE_NO_MEMORY(db_path);
-       /* Open idmap repository */
index 33515d1d46572bd38bcf2ee3dc19b75178207b8e..7a454b7983261a991f2afcf7c57fed5319cdd01c 100644 (file)
@@ -7,7 +7,6 @@
 bug_221618_precise-64bit-prototype.patch
 bug_598313_upstream_7499-nss_wins-dont-clobber-daemons-logs.patch
 bug_601406_fix-perl-path-in-example.patch
-fhs-filespaths.patch
 pam-examples.patch
 README_nosmbldap-tools.patch
 smbclient-pager.patch