Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 45367 invoked by uid 500); 17 Jul 2002 20:32:32 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 45347 invoked from network); 17 Jul 2002 20:32:32 -0000 Message-ID: <3D35D460.1010209@yahoo.com> Date: Wed, 17 Jul 2002 13:32:32 -0700 From: David Shane Holden User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: cvs commit: apr/misc/win32 rand.c References: <20020717201935.89027.qmail@icarus.apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ya forgot to remove the unnecessary header files in rand.c 'cause that's where the problem lies. Shane wrowe@apache.org wrote: >wrowe 2002/07/17 13:19:35 > > Modified: . libapr.dsp > misc/win32 rand.c > Log: > Skip the entire CoAPI garbage and go right for UuidCreate(), which on > Win2000/XP no longer reveals the mac address. > > Submitted by: David Shane Holden > > > > > 1.16 +5 -2 apr/misc/win32/rand.c > > Index: rand.c > =================================================================== > RCS file: /home/cvs/apr/misc/win32/rand.c,v > retrieving revision 1.15 > retrieving revision 1.16 > diff -u -r1.15 -r1.16 > --- rand.c 17 Jul 2002 04:11:33 -0000 1.15 > +++ rand.c 17 Jul 2002 20:19:35 -0000 1.16 > @@ -93,9 +93,12 @@ > * possible misuse/abuse since uuid is based on the NIC address, and > * is therefore not only a uniqifier, but an identity (which might not > * be appropriate in all cases. > + * > + * Note that Win2000, XP and later no longer suffer from this problem, > + * a scrambling fix is only needed for (apr_os_level < APR_WIN_2000) > */ > - if (FAILED(CoCreateGuid((LPGUID)uuid_data))) { > - return APR_EGENERAL; > + if (FAILED(UuidCreate((UUID *)uuid_data))) { > + return APR_EGENERAL; > } > return APR_SUCCESS; > } > > > > > >