#include "includes.h"
#include "cluster/cluster.h"
#include "cluster/cluster_private.h"
-#include "lib/tdb/include/tdb.h"
-#include "db_wrap.h"
+#include "../tdb/include/tdb.h"
+#include "tdb_wrap.h"
#include "system/filesys.h"
#include "param/param.h"
+#include "librpc/gen_ndr/misc.h"
/*
server a server_id for the local node
*/
-static struct server_id local_id(struct cluster_ops *ops, uint32_t id)
+static struct server_id local_id(struct cluster_ops *ops, uint64_t id, uint32_t id2)
{
struct server_id server_id;
ZERO_STRUCT(server_id);
server_id.id = id;
+ server_id.id2 = id2;
return server_id;
}
static const char *local_id_string(struct cluster_ops *ops,
TALLOC_CTX *mem_ctx, struct server_id id)
{
- return talloc_asprintf(mem_ctx, "%u.%u", id.node, id.id);
+ return talloc_asprintf(mem_ctx, "%u.%llu.%u", id.node, (unsigned long long)id.id, id.id2);
}
TDB_CLEAR_IF_FIRST as the tmp path is wiped at startup
*/
static struct tdb_wrap *local_tdb_tmp_open(struct cluster_ops *ops,
- TALLOC_CTX *mem_ctx, const char *dbname,
- int flags)
+ TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
+ const char *dbname, int flags)
{
- char *path = smbd_tmp_path(mem_ctx, dbname);
+ char *path = smbd_tmp_path(mem_ctx, lp_ctx, dbname);
struct tdb_wrap *w;
w = tdb_wrap_open(mem_ctx, path, 0, flags,
O_RDWR|O_CREAT, 0600);