From nobody@FreeBSD.org  Thu Dec  7 06:53:01 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 435F737B400
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  7 Dec 2000 06:53:01 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id eB7Er1m58976;
	Thu, 7 Dec 2000 06:53:01 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200012071453.eB7Er1m58976@freefall.freebsd.org>
Date: Thu, 7 Dec 2000 06:53:01 -0800 (PST)
From: eugen@iname.com
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: killall(1) refuses to kill root-owned SUID-binary started by non-root
X-Send-Pr-Version: www-1.0

>Number:         23356
>Category:       bin
>Synopsis:       [PATCH] killall(1) refuses to kill root-owned SUID-binary started by non-root
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    ps
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 07 07:00:02 PST 2000
>Closed-Date:    Fri Feb 23 00:36:06 PST 2001
>Last-Modified:  Fri Feb 23 00:36:37 PST 2001
>Originator:     Eugene Grosbein
>Release:        4.2-STABLE
>Organization:
Svyaz Service ISP
>Environment:
FreeBSD D00015.dialonly.kemerovo.su 4.2-STABLE FreeBSD 4.2-STABLE #0: Sat Nov 25 14:45:55 KRAT 2000
root@D00015.dialonly.kemerovo.su:/usr/obj/usr/src/sys/DADV  i386
>Description:
New killall(1) is C-program that has replaced old perl-script.
It has a bug: sometimes it says "No matching processes belonging to you were found"
when user tries to kill any root-owned SUID-binary started by this
user. However, kill(1) still works.
>How-To-Repeat:
I discovered this bug while connecting to ISP using pppd using command
like 'pppd call isp' and then tried to disconnect using 'killall pppd'.
killall refused to work. This is 100% repeatable.
However, kill did a job.

>Fix:
Unknown for me

>Release-Note:
>Audit-Trail:

From: Maxim Konovalov <maxim@macomnet.ru>
To: freebsd-gnats-submit@FreeBSD.org, eugen@iname.com
Cc:  
Subject: Re: bin/23356: killall(1) refuses to kill root-owned SUID-binary
 started by non-root
Date: Tue, 12 Dec 2000 03:35:55 +0300 (MSK)

 Hi,
 
 There is a typo in the killall.c. Here is the patch:
 
 *** killall.c.orig	Tue Dec 12 00:00:01 2000
 --- killall.c	Tue Dec 12 02:49:25 2000
 ***************
 *** 248,254 ****
   	miblen = 3;
   
   	if (user && mib[2] == KERN_PROC_ALL) {
 ! 		mib[2] = KERN_PROC_UID;
   		mib[3] = uid;
   		miblen = 4;
   	}
 --- 248,254 ----
   	miblen = 3;
   
   	if (user && mib[2] == KERN_PROC_ALL) {
 ! 		mib[2] = KERN_PROC_RUID;
   		mib[3] = uid;
   		miblen = 4;
   	}
 
 
 The bin/17498 is obsolete, so you can close it too.
 
 - - maxim
 
 --
 Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
 phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru
 
 
Responsible-Changed-From-To: freebsd-bugs->ps 
Responsible-Changed-By: johan 
Responsible-Changed-When: Fri Dec 15 10:24:02 PST 2000 
Responsible-Changed-Why:  
Over to one of the authors. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23356 
State-Changed-From-To: open->closed 
State-Changed-By: ps 
State-Changed-When: Fri Feb 23 00:36:06 PST 2001 
State-Changed-Why:  
fix in stable and current 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23356 
>Unformatted:
