From owner-freebsd-stable@FreeBSD.ORG Thu Oct 8 07:38:11 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 F01DF106566B for ; Thu, 8 Oct 2009 07:38:10 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-yw0-f186.google.com (mail-yw0-f186.google.com [209.85.211.186]) by mx1.freebsd.org (Postfix) with ESMTP id A124C8FC13 for ; Thu, 8 Oct 2009 07:38:10 +0000 (UTC) Received: by ywh16 with SMTP id 16so5119313ywh.13 for ; Thu, 08 Oct 2009 00:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=AqHLofz69gPa6+kLdTNEyJhfzdjY7ka3dK/G0SY0k7Q=; b=trIXv/bxoFgr4Rz27ptX3ySFwfDI1pNELJ2CyAOqDlQ/i9ImqD2Tr5AA64pk4qGtcc Yb9r3Bw4JwYnbVbY0WEZ0J1rSxyDBGrMJnzU8VcgLP+DPPluC7zrLRKVmqjtPlmnHbto XYRx6MP+SaJsvaBcpu4BrFEclLKlXy+lR5Mog= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=E37BUO2gXVUNPZFA6o8rsPmYM2C+mdBzMxlnialIr6z1mNo7gmGvPu+2LO3qoRrF4u lPok2JfqLAgBhxhfc1oIIJYK125PWAkoEZgQkY1whnFQV734SHTDR4E0PE7JMHh/mORe zEx4ljuUi2jJaIZbUXnuI8hnr839/t8PNhR88= Received: by 10.150.131.5 with SMTP id e5mr1722201ybd.262.1254987485164; Thu, 08 Oct 2009 00:38:05 -0700 (PDT) Received: from dimension.5p.local (adsl-99-19-46-114.dsl.klmzmi.sbcglobal.net [99.19.46.114]) by mx.google.com with ESMTPS id 15sm942275gxk.4.2009.10.08.00.38.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 08 Oct 2009 00:38:04 -0700 (PDT) Sender: "J. Hellenthal" Date: Thu, 8 Oct 2009 03:37:52 -0400 From: jhell To: Barney Wolff In-Reply-To: <20091008052946.GA42664@pit.databus.com> Message-ID: References: <20091008052946.GA42664@pit.databus.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: jhell , 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 07:38:11 -0000 On Thu, 8 Oct 2009 01:29 -0400, barney@ wrote: > 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*" ? > > Yeah, maybe. I might be just mixing up that I actually ran this as root instead of sudo from a user account. Its late and it had confused me as I had not seen a pam timeout error like that before that sh revision. My belief behind it was just that it was a subshell starting using sh but not handing it self back to sudo in time for authentication or something like that... "IDK" Ill keep investigating it later. Maybe something else is actually going on with my system that has not yielded its ugly head yet. Thanks for the feedback. -- ;; dataix.net!jhell 2048R/89D8547E 2009-09-30 ;; BSD since FreeBSD 4.2 Linux since Slackware 2.1 ;; 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E