From 18feaab9d556c4bd41a19823b3982e2bc30a2055 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 25 Jul 2006 19:59:35 +0000 Subject: r17239: BUG 3959: patch from William Charles to fix a segv in the DNS SRV lookups dur to calling rand() (This used to be commit be12519fd8a7ccd8400fd298e05921eda56b4e16) --- source3/libads/dns.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/dns.c b/source3/libads/dns.c index 570f9583f0..558c7f75ba 100644 --- a/source3/libads/dns.c +++ b/source3/libads/dns.c @@ -245,17 +245,11 @@ static BOOL ads_dns_parse_rr_ns( TALLOC_CTX *ctx, uint8 *start, uint8 *end, static int dnssrvcmp( struct dns_rr_srv *a, struct dns_rr_srv *b ) { - BOOL init = False; - - if ( !init ) { - srand( (uint32)time(NULL) ); - } - if ( a->priority == b->priority ) { /* randomize entries with an equal weight and priority */ if ( a->weight == b->weight ) - return rand() % 2 ? -1 : 1; + return 0; /* higher weights should be sorted lower */ if ( a->weight > b->weight ) -- cgit