[SCM] Samba Shared Repository - branch v3-3-stable updated -
release-3-3-2-121-gac2d880
Karolin Seeger
kseeger at samba.org
Wed Apr 1 11:49:21 GMT 2009
The branch, v3-3-stable has been updated
via ac2d88014dd7d2c09480972ab4e950cfec62b6cc (commit)
via 6da2a16693f5b3776fffef49944e2b9a787f7217 (commit)
from 6c9713b603b295680d80a39c0d21c69ce2e95eed (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-stable
- Log -----------------------------------------------------------------
commit ac2d88014dd7d2c09480972ab4e950cfec62b6cc
Author: Karolin Seeger <kseeger at samba.org>
Date: Wed Apr 1 13:47:56 2009 +0200
WHATSNEW: Update changes.
Karolin
(cherry picked from commit efc59974e7b893627ad3c4a07e35f1429fc1044d)
commit 6da2a16693f5b3776fffef49944e2b9a787f7217
Author: Michael Adam <obnox at samba.org>
Date: Wed Apr 1 12:23:07 2009 +0200
s3: fix the fix for bug #6195 - dont let smbd child processes panic
This patch makes sure the original and temporary TDBs are closed
_before_ the rename. Originally, the open TDB was renamed, and so
the name passdb.tdb.tmp stayed around in the db context. Hence
upon client connect, the smbd children died because reinit_after_fork()
calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which
existed no longer...
Michael
(cherry picked from commit 735c27c7176a9fb5b20ad02dc7cdd1ef23ff3e81)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 1 +
source/passdb/pdb_tdb.c | 18 ++++++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 374f5f5..8fdcdbf 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -23,6 +23,7 @@ Changes since 3.3.2:
o Michael Adam <obnox at samba.org>
+ * BUG 6195: Don't let smbd child processes panic.
* Add backend_requires_messaging() method to libsmbconf.
* Add methods is_writeable() and wrapper smbconf_is_writeable() to libsmbconf.
* Fall back to file backend when no valid backend was found.
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c
index 1f3441a..73814ef 100644
--- a/source/passdb/pdb_tdb.c
+++ b/source/passdb/pdb_tdb.c
@@ -250,6 +250,11 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
smb_panic("tdbsam_convert_backup: orig commit failed\n");
}
+ /* be sure to close the DBs _before_ renaming the file */
+
+ TALLOC_FREE(orig_db);
+ TALLOC_FREE(tmp_db);
+
/* This is safe from other users as we know we're
* under a mutex here. */
@@ -262,13 +267,22 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
}
TALLOC_FREE(frame);
- TALLOC_FREE(orig_db);
+
+ /* re-open the converted TDB */
+
+ orig_db = db_open(NULL, dbname, 0,
+ TDB_DEFAULT, O_CREAT|O_RDWR, 0600);
+ if (orig_db == NULL) {
+ DEBUG(0, ("tdbsam_convert_backup: Failed to re-open "
+ "converted passdb TDB [%s]\n", dbname));
+ return false;
+ }
DEBUG(1, ("tdbsam_convert_backup: updated %s file.\n",
dbname ));
/* Replace the global db pointer. */
- *pp_db = tmp_db;
+ *pp_db = orig_db;
return true;
cancel:
--
Samba Shared Repository
More information about the samba-cvs
mailing list