Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2007 09:59:07 -0400
From:      =?UTF-8?B?6Z+T5a625qiZIEJpbGwgSGFja2Vy?= <askbill@conducive.net>
To:        freebsd-current@freebsd.org
Subject:   Re: Broken su in current - trying to fix myself, help needed!
Message-ID:  <471766AB.1040306@conducive.net>
In-Reply-To: <01b801c8118b$9baa1340$0c00a8c0@Artem>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 
<something> 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"
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?471766AB.1040306>