From owner-freebsd-current@FreeBSD.ORG Thu Oct 18 13:59:10 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74A8B16A418 for ; Thu, 18 Oct 2007 13:59:10 +0000 (UTC) (envelope-from askbill@conducive.net) Received: from conducive.net (lindfield.ch [203.194.153.81]) by mx1.freebsd.org (Postfix) with ESMTP id 30EED13C49D for ; Thu, 18 Oct 2007 13:59:09 +0000 (UTC) (envelope-from askbill@conducive.net) Received: from cm218-253-81-177.hkcable.com.hk ([218.253.81.177]:61277 helo=pb.local) by conducive.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1IiVu0-00064S-JQ for freebsd-current@freebsd.org; Thu, 18 Oct 2007 13:59:08 +0000 Message-ID: <471766AB.1040306@conducive.net> Date: Thu, 18 Oct 2007 09:59:07 -0400 From: =?UTF-8?B?6Z+T5a625qiZIEJpbGwgSGFja2Vy?= User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <00bd01c810ec$10371230$0c00a8c0@Artem> <8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com> <012c01c810f3$aafeecf0$0c00a8c0@Artem> <20071017193615.GO9006@server.vk2pj.dyndns.org> <471667DB.1010601@conducive.net> <47170FF1.3050602@moneybookers.com> <471746C7.20306@conducive.net><47174BE4.6020300@moneybookers.com> <4717523E.1000403@conducive.net><010f01c81184$cd375550$0c00a8c0@Artem> <47175E94.6090309@conducive.net> <01b801c8118b$9baa1340$0c00a8c0@Artem> In-Reply-To: <01b801c8118b$9baa1340$0c00a8c0@Artem> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Broken su in current - trying to fix myself, help needed! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 13:59:10 -0000 Artem Kuchin wrote: > 韓家標 Bill Hacker wrote: >> Artem Kuchin wrote: *trimmed in the interest of brevity* > Just MAUBE something was really badly broken in waitpid or lower, so > it was coded this way. But as i see it is no longer broken there and > su is broken here. > Correct. As you see it... But asking for a pid on a process that has gone tits-up in the meanwhile is not a 'bug' per se. The call cannot know that said process is gone until it makes the query. The 'bug' is not having a way to handle an unexpected response. That it does not matter that the process inquired after has gone walkabout in THIS CASE is not a guarantee that it is ALWAYS to be ignored. Otherwise, why ask at all? > > Perhaps I'm overly conservative, but one has to ask - should there be >> more selective code *added* to handle the case of a missing child >> process pid and carry on, rather than removing that snippet of code? > > Well, if you look at cvs history this strange code was added not so > long ago > to fix something which came up back then. I think it is no longer needed. > You may very well be correct. But let's look at it that way. A bit of *apparently* obsolete code that EITHER needs to be made able to return and carry-on, OR determined 'for sure' to now be superfluous in 'all cases' and be removed. >> JMNSHO, but 'su' is too important, in too many places to be trifled >> with lightly. > > Yes, and it su is broken now and must be fixed because it is > important. > Agreed. But among those who should look at that are (at least) the committer who made that change. I doubt it was done casually or without good reason. >> So - your query 'What will break if..' is a good starting point. More >> review and testing is in order. > > It is quite possible then commiter to su just overlooked this code > error because they do no use su the way some people do (like me) and > they have never seen this bug. I have tested the cases uneder all shells > and > su does not work correctly anywhere, so it is SU's fault. > > So, i ask people to fix their su and play around a bit and then submit > patch > to cvs. I am not a submitter and have no clue about the procedure. > We're only still 'talking' because you did a good and fast job of finding the lines involved. But more than 'play around a bit' will be needed. BNL Best, Bill > -- > Artem > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >