summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/dbwrap.c b/source3/lib/dbwrap.c
index a686ba6b7c..6dfe0b3766 100644
--- a/source3/lib/dbwrap.c
+++ b/source3/lib/dbwrap.c
@@ -127,8 +127,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) {