s3: Create a unique id for the smbd parent
authorVolker Lendecke <vl@samba.org>
Sun, 4 Jul 2010 14:51:06 +0000 (16:51 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 5 Jul 2010 09:06:23 +0000 (11:06 +0200)
source3/smbd/server.c

index f30d7618654ab1e868ffe086b43b5b790677a6ae..b870fa7b9dc37a281e2e720b3552ec54321bd39a 100644 (file)
@@ -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