summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/serverid.c3
-rw-r--r--source3/lib/util.c5
-rw-r--r--source3/librpc/idl/server_id.idl1
3 files changed, 9 insertions, 0 deletions
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index b1f6a5711e..e63818e1b8 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -26,6 +26,7 @@
struct serverid_key {
pid_t pid;
+ uint32_t task_id;
uint32_t vnn;
};
@@ -72,6 +73,7 @@ static void serverid_fill_key(const struct server_id *id,
{
ZERO_STRUCTP(key);
key->pid = id->pid;
+ key->task_id = id->task_id;
key->vnn = id->vnn;
}
@@ -275,6 +277,7 @@ static bool serverid_rec_parse(const struct db_record *rec,
memcpy(&data, rec->value.dptr, sizeof(data));
id->pid = key.pid;
+ id->task_id = key.task_id;
id->vnn = key.vnn;
id->unique_id = data.unique_id;
*msg_flags = data.msg_flags;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index af5f63995b..a0b6d9f55d 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1924,6 +1924,7 @@ struct server_id pid_to_procid(pid_t pid)
{
struct server_id result;
result.pid = pid;
+ result.task_id = 0;
result.unique_id = my_unique_id;
result.vnn = my_vnn;
return result;
@@ -1938,6 +1939,8 @@ bool procid_equal(const struct server_id *p1, const struct server_id *p2)
{
if (p1->pid != p2->pid)
return False;
+ if (p1->task_id != p2->task_id)
+ return False;
if (p1->vnn != p2->vnn)
return False;
return True;
@@ -1953,6 +1956,8 @@ bool procid_is_me(const struct server_id *pid)
{
if (pid->pid != sys_getpid())
return False;
+ if (pid->task_id != 0)
+ return False;
if (pid->vnn != my_vnn)
return False;
return True;
diff --git a/source3/librpc/idl/server_id.idl b/source3/librpc/idl/server_id.idl
index ed727881c7..095405af56 100644
--- a/source3/librpc/idl/server_id.idl
+++ b/source3/librpc/idl/server_id.idl
@@ -19,6 +19,7 @@ interface server_id
typedef [public] struct {
uint32 pid;
+ uint32 task_id;
uint32 vnn;
udlong unique_id;
} server_id;