From owner-freebsd-current@FreeBSD.ORG Wed Oct 17 19:42:59 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 85CB416A41B for ; Wed, 17 Oct 2007 19:42:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from gnome.kiev.sovam.com (gnome.kiev.sovam.com [212.109.32.24]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9CF13C455 for ; Wed, 17 Oct 2007 19:42:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com ([62.64.120.197]) by gnome.kiev.sovam.com with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IiEnC-000OdP-BS for freebsd-current@freebsd.org; Wed, 17 Oct 2007 22:42:58 +0300 Received: from [212.82.216.226] (helo=deviant.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IiEnA-0001pC-U9 for freebsd-current@freebsd.org; Wed, 17 Oct 2007 22:42:57 +0300 Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l9HJgrvu081016; Wed, 17 Oct 2007 22:42:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1/Submit) id l9HJgq2j081015; Wed, 17 Oct 2007 22:42:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 17 Oct 2007 22:42:52 +0300 From: Kostik Belousov To: Artem Kuchin Message-ID: <20071017194252.GL6511@deviant.kiev.zoral.com.ua> References: <00bd01c810ec$10371230$0c00a8c0@Artem> <8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com> <012c01c810f3$aafeecf0$0c00a8c0@Artem> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vJI8q/aziP9idhqk" Content-Disposition: inline In-Reply-To: <012c01c810f3$aafeecf0$0c00a8c0@Artem> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: 3b10ce253585130f5293a5b36593fd37 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1631 [Oct 17 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: josh.carroll@gmail.com, 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:42:59 -0000 --vJI8q/aziP9idhqk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 17, 2007 at 11:26:48PM +0400, Artem Kuchin wrote: > >>if you try to run a very simple perl script: > >> > >>#!/usr/bin/perl > >>$com=3D"/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 > > >=20 > 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=20 > printed: >=20 > heck > done! >=20 > I have rerun all configs and started jails - still works. Then i remembe= red > that i have always run this script fro midnight commander. > Started mc > Pressed ENTER on this script and it got suspended. >=20 > 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. Ah, mc. Ok, it is reproducable in the following way: pooma% sh +m = ~ $ ~/work/scratch/su.pl Password: heck done! $ [1] + 1725 suspended (tty input) sh +m pooma% Note the +m, that turns off the job control. --vJI8q/aziP9idhqk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHFmW8C3+MBN1Mb4gRAt48AKDOl0SI5WxSq6uVhQnJqCG+UxfDMQCgzGjB GnDIql7Ygtc9OabiMFX/S/k= =YAZ8 -----END PGP SIGNATURE----- --vJI8q/aziP9idhqk--