Subject: Re: RFC: /kern/summary
To: Soren S. Jorvang <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 03/10/1999 10:18:20
"Soren S. Jorvang" <email@example.com> writes:
> I have been trying to see how other systems that have such a syscall
> do it. AIX has getprocs(). Does anyone know of others?
uh, sysctl w/CTL_KERN+KERN_PROC does approximately this, with a couple
* the things it returns aren't necessarily as generalized or abstract
as one would like.
* it can't return some information, like process argument list,
because the kernel really doesn't have any idea of what that
information is (outside of exec time), or how the process wants that
information to be represented to other processes (e.g. changes
made via setproctitle(3)). I'd actually argue that if you want proces
information for others' processes, you should be root anyway.
as far as I know, the only reason why our 'ps' isn't at all functional
when not set-id is that it's coded to _require_ set-id operation.
(i.e. it's broken). if the set-id is stripped, it still should be
able to show just the basic process information provided by sysctl().
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.