From owner-freebsd-stable@FreeBSD.ORG Thu Oct 8 05:29:50 2009 Return-Path: Delivered-To: FreeBSD-Stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADABD1065694 for ; Thu, 8 Oct 2009 05:29:50 +0000 (UTC) (envelope-from barney@databus.com) Received: from mail1.aceinnovative.com (mail1.aceinnovative.com [66.114.74.12]) by mx1.freebsd.org (Postfix) with ESMTP id 57B4A8FC24 for ; Thu, 8 Oct 2009 05:29:50 +0000 (UTC) Received: from pit.databus.com ([71.167.133.111]) (authenticated bits=0) by mail1.aceinnovative.com (8.13.8/8.13.8) with ESMTP id n985TkZo013497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 8 Oct 2009 01:29:46 -0400 Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.14.3/8.14.3) with ESMTP id n985TkCA042886; Thu, 8 Oct 2009 01:29:46 -0400 (EDT) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.14.3/8.14.3/Submit) id n985TkH8042885; Thu, 8 Oct 2009 01:29:46 -0400 (EDT) (envelope-from barney) Date: Thu, 8 Oct 2009 01:29:46 -0400 From: Barney Wolff To: jhell Message-ID: <20091008052946.GA42664@pit.databus.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Stable Subject: Re: r197748 - base/stable/7/bin/sh/ 7.2-STABLE i386 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 05:29:50 -0000 I believe you are wrong about prior behavior. sudo is from a port and is in /usr/local/bin. Any shell is going to expand the list of args *before* giving control to the executable. So the system will churn for a while before sudo gets to ask for the password. On Thu, Oct 08, 2009 at 12:59:36AM -0400, jhell wrote: > > ------------------------------------------------------------------------ > r197748 | jilles | 2009-10-04 13:16:11 -0400 (Sun, 04 Oct 2009) | 7 lines > > MFC r197371: Mention that NUL characters are not allowed in sh(1) input. > > I do not consider this a bug because POSIX permits it and argument strings > and environment variables cannot contain '\0' anyway. > > PR: bin/25542 > > ------------------------------------------------------------------------ > > Recently I have been noticing strange happenings of what I believe to be > coming from the latest revision of /bin/sh. Prior to this revision it had > not happened to the following examples. I am taking this as it could just > be a following behavior in sudo due to fixing the first behavior in sh(1) > but I am not sure and looking for feedback. > > How to repeat: ( Let me know if this is only me. ) > # sudo rm -rf /usr/ports/*/*/work > > After issuing the above command the process waits for the list of (work) > directories to be collected and ends by bombing out with pam timeout > error. This could probably be easier seen with higher IO load but it has > struck me kind of odd since I have not seen it at all till now. Also once > it gets started you can not ^C the process until it has run the full > directory tree. > > Behavior before, you could issue the command and it would ask you for your > password before it would issue any IO to the disk. Is the new behavior > called for adjusting your command to sh -c "rm -rf /usr/blah/bloo/bla*" ? -- Barney Wolff I never met a computer I didn't like.