diff options
author | Michael Adam <obnox@samba.org> | 2011-07-06 16:49:34 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-07-29 12:23:13 +0200 |
commit | 2414fc88d85c8dcc22ddbb389255d6c36838cbad (patch) | |
tree | 541152a6f4fa0fd538c5a14138928417a7bead1d /source3/lib/dbwrap.c | |
parent | 1abdd9b2bb09d072496db5207814aefefe403f60 (diff) | |
download | samba-2414fc88d85c8dcc22ddbb389255d6c36838cbad.tar.gz samba-2414fc88d85c8dcc22ddbb389255d6c36838cbad.tar.bz2 samba-2414fc88d85c8dcc22ddbb389255d6c36838cbad.zip |
s3:dbwrap: move db_is_local() from dbwrap.c to dbwrap_open.c
Diffstat (limited to 'source3/lib/dbwrap.c')
-rw-r--r-- | source3/lib/dbwrap.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/source3/lib/dbwrap.c b/source3/lib/dbwrap.c index 0774974ced..3d70fcdcd6 100644 --- a/source3/lib/dbwrap.c +++ b/source3/lib/dbwrap.c @@ -22,11 +22,6 @@ #include "includes.h" #include "dbwrap.h" #include "dbwrap/dbwrap_private.h" -#include "util_tdb.h" -#ifdef CLUSTER_SUPPORT -#include "ctdb_private.h" -#endif - /* * Fall back using fetch_locked if no genuine fetch operation is provided @@ -69,30 +64,3 @@ int dbwrap_fallback_parse_record(struct db_context *db, TDB_DATA key, TALLOC_FREE(data.dptr); return res; } - -bool db_is_local(const char *name) -{ -#ifdef CLUSTER_SUPPORT - const char *sockname = lp_ctdbd_socket(); - - if(!sockname || !*sockname) { - sockname = CTDB_PATH; - } - - if (lp_clustering() && socket_exist(sockname)) { - const char *partname; - /* ctdb only wants the file part of the name */ - partname = strrchr(name, '/'); - if (partname) { - partname++; - } else { - partname = name; - } - /* allow ctdb for individual databases to be disabled */ - if (lp_parm_bool(-1, "ctdb", partname, True)) { - return false; - } - } -#endif - return true; -} |