From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MYJcQ-0003Dj-Tn for garchives@archives.gentoo.org; Tue, 04 Aug 2009 12:59:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7FBEE0564; Tue, 4 Aug 2009 12:59:53 +0000 (UTC) Received: from mail.informasoftware.com (mail.informasoftware.com [66.193.169.4]) by pigeon.gentoo.org (Postfix) with ESMTP id 9E4D9E0564 for ; Tue, 4 Aug 2009 12:59:53 +0000 (UTC) Received: from [192.168.100.74] ([192.168.100.74] RDNS failed) by mail.informasoftware.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 4 Aug 2009 08:59:52 -0400 Message-ID: <4A7830CC.6020405@kutulu.org> Date: Tue, 04 Aug 2009 08:59:56 -0400 From: Mike Edenfield User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: bash stopped running python scripts... References: <4A774F13.1060307@kutulu.org> <87prbbq1bk.fsf@newton.gmurray.org.uk> In-Reply-To: <87prbbq1bk.fsf@newton.gmurray.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Aug 2009 12:59:52.0387 (UTC) FILETIME=[74E72130:01CA1503] X-Archives-Salt: 54d69c03-d29d-416d-b135-35750eba3e47 X-Archives-Hash: 64470974958d1d7f85d7cbfc81be4cd9 On 8/4/2009 7:13 AM, Graham Murray wrote: > Remy Blank writes: > >> The whole issue seems to be handled quite strangely IMO. You would think >> breaking Python for all ~x86 is a major offense... > > It did not break for all ~x86. I have 2 systems both running ~x86, both > have emerged (but not made active) python-3.1, /usr/bin/python is a bash > script on both yet emerge works with no problems. The only non-standard > things are that I have unmasked gcc-4.4.1 and am using git 2.6.31-rc > kernels. Aha. I think I've discovered the "problem". There was a change in the kernel execl() call between 2.6.27 and 2.6.28: --- linux-2.6.27-hardened-r3/fs/binfmt_script.c 2008-10-09 18:13:53.000000000 -0400 +++ linux-2.6.28-hardened/fs/binfmt_script.c 2008-12-24 18:26:37.000000000 -0500 @@ -22,14 +22,15 @@ char interp[BINPRM_BUF_SIZE]; int retval; - if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') || (bprm->sh_bang)) + if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') || + (bprm->recursion_depth > BINPRM_MAX_RECURSION)) return -ENOEXEC; /* * This section does the #! interpretation. * Sorta complicated, but hopefully it will work. -TYT */ - bprm->sh_bang = 1; + bprm->recursion_depth++; allow_write_access(bprm->file); fput(bprm->file); bprm->file = NULL; The kernel >= 2.6.28 now supports nesting up to 4 levels of script in the #! lines, if I'm reading that right, whereas < 2.6.28 it only supported 1 level. I'll go update the b.g.o entry and try upgrading my kernel. Though I dunno what that means for Gentoo/FreeBSD. --Mike