From owner-freebsd-hackers Thu Jun 20 23: 8:40 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by hub.freebsd.org (Postfix) with ESMTP id 1E8E137B435; Thu, 20 Jun 2002 23:07:18 -0700 (PDT) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.3/8.12.3) with ESMTP id g5L67DM1071831; Thu, 20 Jun 2002 23:07:17 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200206210607.g5L67DM1071831@gw.catspoiler.org> Date: Thu, 20 Jun 2002 23:07:32 -0700 (PDT) From: Don Lewis Subject: Re: fdcheckstd() test bug in execve() (was: Re: Suggested fixes for uidinfo "would sleep" messages) To: makonnen@pacbell.net Cc: bright@mu.org, jhb@FreeBSD.ORG, hackers@FreeBSD.ORG In-Reply-To: <20020620163441.5f204b3f.makonnen@pacbell.net> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 20 Jun, Mike Makonnen wrote: > On Thu, 20 Jun 2002 00:04:41 -0700 (PDT) > Don Lewis wrote: > >> >> Your patch also looks like it should fix the bug. I prefer my patch, >> though, because I think the resultant code is structured better and >> should be easier to understand. For instance, the reason for the >> assignment to oldcred in the "if (error != 0)" block in your patch is >> not immediately obvious. > > You can remove it, it was part of something else I was working on. When I looked at it last night, it appeared to be necessary, since if the fdcheckstd() test fails oldcred will be left pointing to the credential held by the process. On further review, I see that this assignment isn't necessary after all because of the code that calls crfree() just looks at the state of newcred. > I haven't taken a look at your patch. I was working on something else > and already had a patch for it, before I saw yours. I sent it as a > reference because there was something in the thread about > leaking p_args. I suprised that things didn't even get more mucked up because the process was never unlocked. > I really don't care which patch makes it into the tree. If it solves > the problem, it solves the problem. There's not much more to it. Alfred committed yours earlier today. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message