Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2005 00:05:28 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Midnight Oil <jamie@gnulife.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Permissions on ps
Message-ID:  <20050607050528.GQ255@dan.emsphone.com>
In-Reply-To: <20050606234735.D21034@floyd.gnulife.org>
References:  <20050606234735.D21034@floyd.gnulife.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607050528.GQ255>