From owner-freebsd-current@FreeBSD.ORG Wed Oct 17 19:26:58 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 190C616A420 for ; Wed, 17 Oct 2007 19:26:58 +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 419FA13C45B for ; Wed, 17 Oct 2007 19:26:56 +0000 (UTC) (envelope-from matrix@itlegion.ru) Received: (qmail 36459 invoked from network); 17 Oct 2007 23:26:55 +0400 Received: from unknown (HELO Artem) (192.168.0.12) by 84.21.226.211 with SMTP; 17 Oct 2007 23:26:55 +0400 X-AntiVirus: Checked by Dr.Web [version: 4.44, engine: 4.44.0.09170, virus records: 249943, updated: 17.10.2007] Message-ID: <012c01c810f3$aafeecf0$0c00a8c0@Artem> From: "Artem Kuchin" To: References: <00bd01c810ec$10371230$0c00a8c0@Artem> <8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com> Date: Wed, 17 Oct 2007 23:26:48 +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: Kostik Belousov , Andrey Chernov , freebsd-current@freebsd.org, ??? Bill Hacker 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: Wed, 17 Oct 2007 19:26:58 -0000 >> 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 > OH MY GOD!!! I have posted this problem before and saw many 'me too' reponses and thought that this problem is everywhere. After your and Kostik's posts and decided to make a clean test. Turned off jails and all custom kernel sysctls. Entered shell and run this cript - it printed: heck done! I have rerun all configs and started jails - still works. Then i remembered that i have always run this script fro midnight commander. Started mc Pressed ENTER on this script and it got suspended. Now i am lost, whose problem is this? su's or mc's? or both? If i remove su from the script and run simply system('echo heck'); from mc it work fine. With su it gets suspended. -- Rrgards, Artem