From owner-freebsd-current@FreeBSD.ORG Sat Oct 20 10:44:49 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 605B316A418 for ; Sat, 20 Oct 2007 10:44:49 +0000 (UTC) (envelope-from matrix@itlegion.ru) Received: from corpmail.itlegion.ru (corpmail.itlegion.ru [84.21.226.211]) by mx1.freebsd.org (Postfix) with SMTP id 9497C13C442 for ; Sat, 20 Oct 2007 10:44:34 +0000 (UTC) (envelope-from matrix@itlegion.ru) Received: (qmail 34332 invoked from network); 20 Oct 2007 14:44:28 +0400 Received: from unknown (HELO Artem) (192.168.0.12) by 84.21.226.211 with SMTP; 20 Oct 2007 14:44:28 +0400 X-AntiVirus: Checked by Dr.Web [version: 4.44, engine: 4.44.0.09170, virus records: 250429, updated: 19.10.2007] Message-ID: <001301c81306$2ff3fdb0$0c00a8c0@Artem> From: "Artem Kuchin" To: References: <00bd01c810ec$10371230$0c00a8c0@Artem> <8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com> Date: Sat, 20 Oct 2007 14:44:06 +0400 Organization: IT Legion MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Cc: freebsd-current@freebsd.org Subject: Re: Broken su in current - trying to fix myself, help needed! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2007 10:44:49 -0000 Josh Carroll wrote: >> if you try to run a very simple perl script: >> >> #!/usr/bin/perl >> $com="/usr/bin/su root -c 'echo heck'"; >> system($com); >> print "done!\n"; > > This works fine for me. If I run it as root (and change the user it's > su'ing to to a normal user), it runs find and prints: > > heck > done > > If I run it as a normal user su'ing to root (e.g. the same as you're > doing), I get a Password: prompt, and entering my password it still > works: > > % ./su.pl > Password: > heck > done! > > Do you have another way to reproduce this? Because that particular > test is working fine here on a RELENG_7 box (csup'd last night). > You are a bit late for the discussion. If you look trough the list you will find two ways to reproduce it: 1)Try start building, for example, midnight commander port not being root 2) Start the exampe script from midnight commands by pressing ENTER on the script file (using subshell). Anyhow, patch was submiited and maybe MFCd by now. -- Artem