summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-03-06 09:27:13 +0000
committerfukachan <fukachan>2003-03-06 09:27:13 +0000
commiteff38e21ae943a7b4b28bfb0b19bf932e8dc641e (patch)
tree199bcb19a7178d2d7213a72641bbafca052570a9 /fml/lib/FML/Process
parentdeef97e85ca7ad654027155b0b6bca7eeaa13eb1 (diff)
downloadfml8-eff38e21ae943a7b4b28bfb0b19bf932e8dc641e.tar.gz
fml8-eff38e21ae943a7b4b28bfb0b19bf932e8dc641e.tar.bz2
fml8-eff38e21ae943a7b4b28bfb0b19bf932e8dc641e.zip
switched to use FML::Sys::User
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Addr.pm28
1 files changed, 9 insertions, 19 deletions
diff --git a/fml/lib/FML/Process/Addr.pm b/fml/lib/FML/Process/Addr.pm
index fa7232c6..59230bc2 100644
--- a/fml/lib/FML/Process/Addr.pm
+++ b/fml/lib/FML/Process/Addr.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Addr.pm,v 1.5 2003/01/07 08:38:34 fukachan Exp $
+# $FML: Addr.pm,v 1.6 2003/01/29 13:28:22 fukachan Exp $
#
package FML::Process::Addr;
@@ -226,24 +226,14 @@ sub _fmladdr
mode => $mode,
});
- # XXX-TODO: all unix system has /etc/passwd ?
- # XXX-TODO: we should implement another mothod to get accounts.
- # read addresses from password file
- if (-f "/etc/passwd") {
- use FileHandle;
- my $fh = new FileHandle "/etc/passwd";
- if (defined $fh) {
- my ($user, $buf);
- while ($buf = <$fh>) {
- ($user) = split(/:/, $buf);
-
- # which definition survives ? alias > user ?
- unless (defined $aliases->{ $user }) {
- $aliases->{ $user } = "$user (LOCAL USER)";
- }
- }
-
- $fh->close();
+ use FML::Sys::User;
+ my $sys = new FML::Sys::User $curproc;
+ my $list = $sys->get_user_list();
+
+ for my $user (keys %$list) {
+ # which definition survives ? alias > user ?
+ unless (defined $aliases->{ $user }) {
+ $aliases->{ $user } = "$user (LOCAL USER)";
}
}