Date: Thu, 18 Oct 2007 15:31:57 -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: <4717B4AD.6000706@conducive.net> In-Reply-To: <20071018174506.GB420@dragon.NUXI.org> References: <00bd01c810ec$10371230$0c00a8c0@Artem> <8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com> <012c01c810f3$aafeecf0$0c00a8c0@Artem> <20071017193615.GO9006@server.vk2pj.dyndns.org> <20071018174506.GB420@dragon.NUXI.org>
next in thread | previous in thread | raw e-mail | index | archive | help
David O'Brien wrote: > On Thu, Oct 18, 2007 at 05:36:15AM +1000, Peter Jeremy wrote: >> This bug (or another one with identical symptoms) affects the 'su' >> commands within the ports build system if you are using tcsh or zsh > > or bash > > It has been suggested that reverting rev 1.79 of su.c may address the issue. > > ---------------------------- > revision 1.79 > date: 2006/01/03 09:17:04; author: brian; state: Exp; lines: +14 -1 > Fix the other su bug reintroduced two commits ago, namely > > $ su > % kill -STOP $$ > > where su is executing (t)csh. csh's job handling is a little more > special than that of (a)sh, bash and even zsh and blows up a little > more spectacularly. This modification restores the original mucking > about with the tty pgrp, but is careful to only do it when su (or > su's child) is the foreground process > ---------------------------- Well.... if 'blows up...' wasn't hyperbole, back in 2006, and IF calling for a pid on a dead/nonexistent process reliably returns the *same* invalid pid tday (100000 was cited) it might be safer for the time being to do a compare on that value then continue the march if matched. Belt and braces - at least 'til it can be better checked and cleaned up properly. JFWIW, pkgdb here lists around 600 packages and on each of three test slices, 2 i386, 1 amd64. Probably 90% were invoked from a csh, the rest with bash. Maybe 80% were built from a terminal in xfce4, and guessing that 80% were pkg_add'ed, rest were: cd /usr/ports/<whichever>/<whatever> make install [-DFORCE_PKG_REGISTER]. Quite a few more attempted and failed did so for clear reasons not related to su. Not ONE instance of any *detectable* difficulty with su as-it-is-now. But 100% were built su'ed to root *before* running. Bill
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4717B4AD.6000706>