Subject: | uid/euid info not collected accurately in FreeBSD 7.1 |
Date: | Mon, 23 May 2011 15:21:39 -0700 |
To: | bug-Proc-ProcessTable [...] rt.cpan.org |
From: | "Jesse Manning" <jmanning [...] yahoo-inc.com> |
Proc::ProcessTable displays all uids and euids as 0, when ps shows it
correctly. The process running in this example is running as user bind
(uid 53).
$ perl -e 'use File::Find; print $File::Find::VERSION . "\n";'
1.07
$ uname -srm
FreeBSD 7.1-YAHOO-20090204 amd64
$ perl --version
This is perl, v5.8.5 built for i386-freebsd-thread-multi
...
===snip===
use 5.008;
use Proc::ProcessTable;
print "Proc::ProcessTable Version: " . $Proc::ProcessTable::VERSION . "\n";
my $ps = Proc::ProcessTable->new();
my $t = $ps->table;
foreach my $p ( @{$t} ) {
if( $p->fname eq "named" ) {
print $p->fname . " " . $p->pid . " " . $p->uid . " " . $p->euid . "\n";
}
}
===/snip===
$ ./t.pl
Proc::ProcessTable Version: 0.45
perl: warning: /var/run/dev.db: No such file or directory
named 29592 0 0
$ ps -p 29592 -o uid,args
UID COMMAND
53 /home/y/sbin64/named -n 1 -u bind -t /var/named