From owner-freebsd-questions@FreeBSD.ORG Tue Jun 7 05:05:33 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E77516A41C for ; Tue, 7 Jun 2005 05:05:33 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E933843D49 for ; Tue, 7 Jun 2005 05:05:32 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j5755SPG067698; Tue, 7 Jun 2005 00:05:28 -0500 (CDT) (envelope-from dan) Date: Tue, 7 Jun 2005 00:05:28 -0500 From: Dan Nelson To: Midnight Oil Message-ID: <20050607050528.GQ255@dan.emsphone.com> References: <20050606234735.D21034@floyd.gnulife.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050606234735.D21034@floyd.gnulife.org> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-questions@freebsd.org Subject: Re: Permissions on ps X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2005 05:05:33 -0000 In the last episode (Jun 06), Midnight Oil said: > I'm having difficulty understanding just how it is a regular with > simple priviliges is able to run ps. > > ps accesses /dev/kmem to get a process list. No, ps uses the kvm_getprocs library function, which by default uses the sysctl kern.proc.all to get the process list. You can force it to use /dev/kmem with the -M and -N commandline flags, but those are usually used to debug crashdumps, not live systems. -- Dan Nelson dnelson@allantgroup.com