The Samba-Bugzilla – Attachment 7501 Details for
Bug 8872
Concurrent connections to sysvol fail in s3fs Configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to use generate_random() not random() for unique ID values
0001-s4-messaging-Use-generate_random-to-get-a-unique-ID-.patch (text/plain), 1.04 KB, created by
Andrew Bartlett
on 2012-04-25 08:14:42 UTC
(
hide
)
Description:
Patch to use generate_random() not random() for unique ID values
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2012-04-25 08:14:42 UTC
Size:
1.04 KB
patch
obsolete
>From 9683a7894c67a8bc8f909716bd7e65f18c4cb48d Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 25 Apr 2012 17:53:18 +1000 >Subject: [PATCH] s4-messaging: Use generate_random() to get a unique ID for > messaging clients > >The call to random() resulted in duplicate values for s3fs configurations >which, due to the forked child, all started with the same random seed. > >A future improvement would be to move to a proven unique value. > >Andrew Bartlett >--- > source4/lib/messaging/messaging.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c >index 9c337f6..80812c2 100644 >--- a/source4/lib/messaging/messaging.c >+++ b/source4/lib/messaging/messaging.c >@@ -663,7 +663,8 @@ struct imessaging_context *imessaging_client_init(TALLOC_CTX *mem_ctx, > { > struct server_id id; > ZERO_STRUCT(id); >- id.pid = random() % 0x10000000; >+ id.pid = generate_random() % 0x10000000; >+ > return imessaging_init(mem_ctx, lp_ctx, id, ev, true); > } > /* >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8872
:
7460
|
7472
| 7501