[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-3239-g1002507
Michael Adam
obnox at samba.org
Tue Jul 15 15:53:34 GMT 2008
The branch, v3-3-test has been updated
via 1002507b56a13420d8178c5397610edd839a7584 (commit)
via 308fc7d5bf5f5ccfc73677b052a4e6ecede25921 (commit)
via b9c008d9bd8b8119007e7ad03a40235998af4f5c (commit)
via b5829e04eaf2408858b34f53b849aaf8b969a925 (commit)
via 111d802b5c0dfdf556f736b6c53df74e077a6238 (commit)
via 013d29c70438bfd43bd11cbb13ba707b256f9b18 (commit)
via 33188a991f7e2f8dc1b5beed1dde1b7f77403e1a (commit)
from 5a0883a7f28538fad542293e1d9361e8c4bed1fd (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 1002507b56a13420d8178c5397610edd839a7584
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 15 16:43:26 2008 +0200
dbwrap: don't panic in db_open_trans() if called with TDB_CLEAR_IF_FIRST.
return NULL instead and leave appropriated measures to the caller.
Michael
commit 308fc7d5bf5f5ccfc73677b052a4e6ecede25921
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 15 15:27:46 2008 +0200
dbwrap: don't panic in db_open_trans() when attaching to ctdb fails.
Michael
commit b9c008d9bd8b8119007e7ad03a40235998af4f5c
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 15 15:27:14 2008 +0200
dbwrap: don't panic in db_open() when attaching to ctdb fails.
Michael
commit b5829e04eaf2408858b34f53b849aaf8b969a925
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 15 14:25:00 2008 +0200
registry: bump debug level to 1 in regdb_init() if storing version string fails.
Higher level callers should take care of level 0 messages.
Michael
commit 111d802b5c0dfdf556f736b6c53df74e077a6238
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 15 14:22:55 2008 +0200
registry: bump debug level to 1 in regdb_init() if opening the registry fails.
Higher level callers take care of level 0 messages or more drastic measures.
Michael
commit 013d29c70438bfd43bd11cbb13ba707b256f9b18
Author: Michael Adam <obnox at samba.org>
Date: Mon Jul 14 10:53:06 2008 +0200
dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open_trans.
Michael
commit 33188a991f7e2f8dc1b5beed1dde1b7f77403e1a
Author: Michael Adam <obnox at samba.org>
Date: Mon Jul 14 10:43:28 2008 +0200
dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open
Michael
-----------------------------------------------------------------------
Summary of changes:
source/lib/dbwrap.c | 25 ++++++++++++++++++-------
source/registry/reg_backend_db.c | 4 ++--
2 files changed, 20 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/dbwrap.c b/source/lib/dbwrap.c
index 7fe1631..eec15a8 100644
--- a/source/lib/dbwrap.c
+++ b/source/lib/dbwrap.c
@@ -60,8 +60,15 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
sockname = CTDB_PATH;
}
- if (lp_clustering() && socket_exist(sockname)) {
+ if (lp_clustering()) {
const char *partname;
+
+ if (!socket_exist(sockname)) {
+ DEBUG(1, ("ctdb socket does not exist - is ctdb not "
+ "running?\n"));
+ return NULL;
+ }
+
/* ctdb only wants the file part of the name */
partname = strrchr(name, '/');
if (partname) {
@@ -76,8 +83,7 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
if (result == NULL) {
DEBUG(0,("failed to attach to ctdb %s\n",
partname));
- smb_panic("failed to attach to a ctdb "
- "database");
+ return NULL;
}
}
}
@@ -112,7 +118,7 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx,
if (tdb_flags & TDB_CLEAR_IF_FIRST) {
DEBUG(0,("db_open_trans: called with TDB_CLEAR_IF_FIRST: %s\n",
name));
- smb_panic("db_open_trans: called with TDB_CLEAR_IF_FIRST");
+ return NULL;
}
#ifdef CLUSTER_SUPPORT
@@ -120,8 +126,15 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx,
sockname = CTDB_PATH;
}
- if (lp_clustering() && socket_exist(sockname)) {
+ if (lp_clustering()) {
const char *partname;
+
+ if (!socket_exist(sockname)) {
+ DEBUG(1, ("ctdb socket does not exist - is ctdb not "
+ "running?\n"));
+ return NULL;
+ }
+
/* ctdb only wants the file part of the name */
partname = strrchr(name, '/');
if (partname) {
@@ -137,8 +150,6 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx,
if (result == NULL) {
DEBUG(0,("failed to attach to ctdb %s\n",
partname));
- smb_panic("failed to attach to a ctdb "
- "database");
}
return result;
}
diff --git a/source/registry/reg_backend_db.c b/source/registry/reg_backend_db.c
index e0a7277..d216e0e 100644
--- a/source/registry/reg_backend_db.c
+++ b/source/registry/reg_backend_db.c
@@ -397,7 +397,7 @@ WERROR regdb_init(void)
REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600);
if (!regdb) {
werr = ntstatus_to_werror(map_nt_error_from_unix(errno));
- DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",
+ DEBUG(1,("regdb_init: Failed to open registry %s (%s)\n",
state_path("registry.tdb"), strerror(errno) ));
return werr;
}
@@ -416,7 +416,7 @@ WERROR regdb_init(void)
vers_id, REGVER_V1));
status = dbwrap_trans_store_int32(regdb, vstring, REGVER_V1);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("regdb_init: error storing %s = %d: %s\n",
+ DEBUG(1, ("regdb_init: error storing %s = %d: %s\n",
vstring, REGVER_V1, nt_errstr(status)));
return ntstatus_to_werror(status);
} else {
--
Samba Shared Repository
More information about the samba-cvs
mailing list