]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Do not crash in ctdbd_traverse if ctdbd is not around
authorVolker Lendecke <vl@samba.org>
Mon, 4 May 2009 12:39:56 +0000 (14:39 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 6 May 2009 06:52:43 +0000 (08:52 +0200)
source/lib/ctdbd_conn.c

index 7c32d578c131179328ec4857dd5c9d389396b07e..465c09a32dbbd7d51a5b794fc29081f69852e0c4 100644 (file)
@@ -1094,6 +1094,11 @@ NTSTATUS ctdbd_traverse(uint32 db_id,
        struct ctdbd_traverse_state state;
 
        status = ctdbd_init_connection(NULL, &conn);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(0, ("ctdbd_init_connection failed: %s\n",
+                         nt_errstr(status)));
+               return status;
+       }
 
        t.db_id = db_id;
        t.srvid = conn->rand_srvid;