summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-07-04 16:51:06 +0200
committerVolker Lendecke <vl@samba.org>2010-07-05 11:06:23 +0200
commit849f72b254ee52501ba46e8419938d3bf5e31900 (patch)
tree61b679179e2d5803eed9a8debbb1535611761b45 /source3
parentda35836dd50e7f8036ca79efafc4009eae58222f (diff)
downloadsamba-849f72b254ee52501ba46e8419938d3bf5e31900.tar.gz
samba-849f72b254ee52501ba46e8419938d3bf5e31900.tar.bz2
samba-849f72b254ee52501ba46e8419938d3bf5e31900.zip
s3: Create a unique id for the smbd parent
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index f30d761865..b870fa7b9d 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -808,6 +808,7 @@ extern void build_options(bool screen);
struct smbd_parent_context *parent = NULL;
TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
NTSTATUS status;
+ uint64_t unique_id;
smbd_init_globals();
@@ -985,6 +986,9 @@ extern void build_options(bool screen);
become_daemon(Fork, no_process_group, log_stdout);
}
+ generate_random_buffer((uint8_t *)&unique_id, sizeof(unique_id));
+ set_my_unique_id(unique_id);
+
#if HAVE_SETPGID
/*
* If we're interactive we want to set our own process group for