From owner-freebsd-current@FreeBSD.ORG Wed Oct 17 20:20:47 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 224EA16A418 for ; Wed, 17 Oct 2007 20:20:47 +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 63F8213C458 for ; Wed, 17 Oct 2007 20:20:46 +0000 (UTC) (envelope-from matrix@itlegion.ru) Received: (qmail 37739 invoked from network); 18 Oct 2007 00:20:44 +0400 Received: from unknown (HELO Artem) (192.168.0.12) by 84.21.226.211 with SMTP; 18 Oct 2007 00:20:44 +0400 X-AntiVirus: Checked by Dr.Web [version: 4.44, engine: 4.44.0.09170, virus records: 249970, updated: 17.10.2007] Message-ID: <005201c810fb$2f8e26a0$0c00a8c0@Artem> From: "Artem Kuchin" To: References: <00bd01c810ec$10371230$0c00a8c0@Artem><8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com><012c01c810f3$aafeecf0$0c00a8c0@Artem><20071017193615.GO9006@server.vk2pj.dyndns.org> <471667DB.1010601@conducive.net> Date: Thu, 18 Oct 2007 00:20:35 +0400 Organization: IT Legion MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response 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 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 20:20:47 -0000 Peter Jeremy wrote: > On Wed, Oct 17, 2007 at 11:26:48PM +0400, Artem Kuchin wrote: >> 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. > > This bug (or another one with identical symptoms) affects the 'su' > commands within the ports build system if you are using tcsh or zsh > and maybe related to the gdb-with-tcsh problems that have been > reported. It appeared in -current in the middle of 2006. The > suggestions to date have been that there's something wrong with the > signal handling in the kernel but you have opened a new line of > attack. Hmm. midnight commaner uses tcsh as his run shell, so i might related to what you say. So, it also might be tcsh/zsh problem? As for the kernel. i have read the sources of getpgid and all sorcess for called syscalls. I think it comes down to p_cansee (cr_cansee). THis is just a hunch. How can i print debug data from syscall to syslog or anywhere else, or at least from getpgid? fprintf works? So i can save the output of p_cansee and check what it returns. Don't lough - i have never worked with kernel sources before. -- Artem