summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/idl/server_id.idl3
-rw-r--r--source3/include/serverid.h3
-rw-r--r--source4/cluster/local.c3
-rw-r--r--source4/lib/messaging/messaging.c7
4 files changed, 12 insertions, 4 deletions
diff --git a/librpc/idl/server_id.idl b/librpc/idl/server_id.idl
index ac2e9ab318..554e428bf2 100644
--- a/librpc/idl/server_id.idl
+++ b/librpc/idl/server_id.idl
@@ -11,6 +11,9 @@ interface server_id
const int NONCLUSTER_VNN = 0xFFFFFFFF;
+ /** Don't verify this unique id */
+ const int SERVERID_UNIQUE_ID_NOT_TO_VERIFY = 0xFFFFFFFFFFFFFFFFULL;
+
/* used to look like the following, note that unique_id was not
* marshalled at all...
diff --git a/source3/include/serverid.h b/source3/include/serverid.h
index 8fc06a15d8..1833f53d55 100644
--- a/source3/include/serverid.h
+++ b/source3/include/serverid.h
@@ -22,9 +22,6 @@
#include "includes.h"
-/** Don't verify this unique id */
-#define SERVERID_UNIQUE_ID_NOT_TO_VERIFY 0xFFFFFFFFFFFFFFFFULL
-
/*
* Register a server with its unique id
*/
diff --git a/source4/cluster/local.c b/source4/cluster/local.c
index 24cbe81c48..df67bcfa79 100644
--- a/source4/cluster/local.c
+++ b/source4/cluster/local.c
@@ -37,6 +37,9 @@ static struct server_id local_id(struct cluster_ops *ops, uint64_t pid, uint32_t
ZERO_STRUCT(server_id);
server_id.pid = pid;
server_id.task_id = task_id;
+ server_id.vnn = NONCLUSTER_VNN;
+ /* This is because we are not in the s3 serverid database */
+ server_id.unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY;
return server_id;
}
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 80812c2885..4d69b9424b 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -663,7 +663,12 @@ struct imessaging_context *imessaging_client_init(TALLOC_CTX *mem_ctx,
{
struct server_id id;
ZERO_STRUCT(id);
- id.pid = generate_random() % 0x10000000;
+ id.pid = getpid();
+ id.task_id = generate_random();
+ id.vnn = NONCLUSTER_VNN;
+
+ /* This is because we are not in the s3 serverid database */
+ id.unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY;
return imessaging_init(mem_ctx, lp_ctx, id, ev, true);
}