From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2046 Path: news.gmane.org!not-for-mail From: "Todd C. Miller" Newsgroups: gmane.comp.tools.sudo.user,gmane.comp.sysutils.supervision.general Subject: Re: Improper setting / resetting of the signals mask Date: Tue, 14 Sep 2010 09:49:45 -0400 Message-ID: <201009141349.o8EDnjZm013606@core.courtesan.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1284472275 31717 80.91.229.12 (14 Sep 2010 13:51:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Sep 2010 13:51:15 +0000 (UTC) Cc: supervision@list.skarnet.org, sudo-users@sudo.ws Original-X-From: sudo-users-bounces@courtesan.com Tue Sep 14 15:51:10 2010 Return-path: Envelope-to: gcsu-sudo-users@gmane.org Original-Received: from courtesan.com ([64.85.164.38] helo=core.courtesan.com) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OvVud-00037e-TI for gcsu-sudo-users@gmane.org; Tue, 14 Sep 2010 15:51:08 +0200 Original-Received: from localhost.courtesan.com (localhost.courtesan.com [IPv6:::1]) by core.courtesan.com (8.14.3/8.14.3) with ESMTP id o8EDnpBc027532; Tue, 14 Sep 2010 09:49:52 -0400 (EDT) Original-Received: from core.courtesan.com (localhost.courtesan.com [127.0.0.1]) by core.courtesan.com (8.14.3/8.14.3) with ESMTP id o8EDnjZm013606; Tue, 14 Sep 2010 09:49:46 -0400 (EDT) jo: "Ciprian Dorin, Craciun" In-reply-to: Your message of "Tue, 14 Sep 2010 14:14:45 +0300." X-BeenThere: sudo-users@sudo.ws X-Mailman-Version: 2.1.13 Precedence: list List-Id: General sudo questions and discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: sudo-users-bounces@courtesan.com Errors-To: sudo-users-bounces@courtesan.com Xref: news.gmane.org gmane.comp.tools.sudo.user:3362 gmane.comp.sysutils.supervision.general:2046 Archived-At: In message so spake "Ciprian Dorin, Craciun" (ciprian.craciun): > In short `sudo` doesn't seem to reset (zero out) its inherited > signal mask, and `runit` seems to leave some signals blocked when > exec-ing children. (And the side-effect is breaking some service > management scripts.) The following patch should address that. - todd --- sudo.c.orig Mon Sep 6 08:16:09 2010 +++ sudo.c Tue Sep 14 09:48:48 2010 @@ -1050,9 +1050,14 @@ initial_setup() { int miss[3], devnull = -1; + sigset_t mask; #if defined(__linux__) || (defined(RLIMIT_CORE) && !defined(SUDO_DEVEL)) struct rlimit rl; #endif + + /* Reset signal mask. */ + (void) sigemptyset(&mask); + (void) sigprocmask(SIG_SETMASK, &mask, NULL); #if defined(__linux__) /* ____________________________________________________________ sudo-users mailing list For list information, options, or to unsubscribe, visit: http://www.sudo.ws/mailman/listinfo/sudo-users