Univention Bugzilla – Attachment 5829 Details for
Bug 34326
Site support for SYSVOL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dfs_samba4_randomize_referrals.patch
dfs_samba4_randomize_referrals.patch (text/plain), 676 bytes, created by
Arvid Requate
on 2014-03-13 18:57 CET
(
hide
)
Description:
dfs_samba4_randomize_referrals.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2014-03-13 18:57 CET
Size:
676 bytes
patch
obsolete
>--- a/samba-4.1.0/dfs_server/dfs_server_ad.c.orig 2014-01-07 16:23:00.516000000 +0100 >+++ b/samba-4.1.0/dfs_server/dfs_server_ad.c 2014-01-07 19:58:12.324000000 +0100 >@@ -38,6 +38,24 @@ > uint32_t count; > }; > >+static void shuffle_dc_set(struct dc_set *list) >+{ >+ uint32_t i; >+ >+ srandom(time(NULL)); >+ >+ for (i = list->count; i > 1; i--) { >+ uint32_t r; >+ const char *tmp; >+ >+ r = random() % i; >+ >+ tmp = list->names[i - 1]; >+ list->names[i - 1] = list->names[r]; >+ list->names[r] = tmp; >+ } >+} >+ > /* > fill a referral type structure > */ >@@ -252,6 +270,7 @@ > list->count++; > talloc_free(r2); > } >+ shuffle_dc_set(list); > > talloc_free(r); > return NT_STATUS_OK;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 34326
: 5829 |
5830