Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Tue, 5 Mar 2002 13:44:14 +0100 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: Alloc_sd() fragile? Message-ID: <20020305134414.V13590@cygbert.vinschen.de> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i On Tue, Mar 05, 2002 at 11:26:43PM +1100, Robert Collins wrote: > > > > -----Original Message----- > > From: Corinna Vinschen [mailto:vinschen AT redhat DOT com] > > > > Just guessing. One parameter to alloc_sd is a > > PSECURITY_DESCRIPTOR called `sd_ret'. This SD must be > > initialized since it's used as in/out parameter. Take a look > > into set_security_attribute() and especially into > > set_nt_attribute(). You will see what I mean. > > Thank you!, that was it. It wasn't my bug however :[, as the CreateFile > is still failing, but the alloc_sd failures are gone (different sd's are > used). > > *sigh*. Something is tromping on a static class member and invalidating > the sd. Are sd's ever corrupted by system calls, or can one reuse an sd > indefinately? Hmm, in theory they should be reusable unless explicitely used as in/out parameter... otherwise we should have encountered problems already since we have those sec_none[_nih] and sec_all[_nih] statics. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.