summaryrefslogtreecommitdiff
path: root/fml/lib/IO
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-28 09:53:26 +0000
committerfukachan <fukachan>2001-01-28 09:53:26 +0000
commit12d80bb93d743fa4d771e55e431688d821018eae (patch)
tree804078be1ce954d7773e75b1d4336fee1edf6cf7 /fml/lib/IO
parent8c3f6a813b0ac01777ed98826bfc8af389a5824b (diff)
downloadfml8-12d80bb93d743fa4d771e55e431688d821018eae.tar.gz
fml8-12d80bb93d743fa4d771e55e431688d821018eae.tar.bz2
fml8-12d80bb93d743fa4d771e55e431688d821018eae.zip
enabe NIS
Diffstat (limited to 'fml/lib/IO')
-rw-r--r--fml/lib/IO/MapAdapter.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/fml/lib/IO/MapAdapter.pm b/fml/lib/IO/MapAdapter.pm
index 58ff89e5..e0644c63 100644
--- a/fml/lib/IO/MapAdapter.pm
+++ b/fml/lib/IO/MapAdapter.pm
@@ -64,8 +64,9 @@ This wrapper maps IO for some object to usual file IO.
unix.group unix.group:$group_name
For example, unix.group:fml
- nis NIS "Netork Information System" (YP)
- *** not yet implemented ***
+ nis.group nis.group:$group_name
+ the NIS "Netork Information System" (YP) map "group.byname"
+ For example, nis.group:fml
mysql mysql:$schema_name
*** not yet implemented ***
@@ -112,6 +113,17 @@ sub new
my (@members) = split ' ', $x[3];
$me->{_array_reference} = \@members;
}
+ elsif ($map =~ /nis\.group:(\S+)/) {
+ my $key = $1;
+ $pkg = 'IO::Adapter::Array';
+ $me->{_name} = $key;
+ $me->{_type} = 'nis.group';
+
+ # emulate an array on memory
+ my (@x) = `ypmatch $key group.byname`;
+ my (@members) = split ',', $x[3];
+ $me->{_array_reference} = \@members;
+ }
elsif ($map =~ /(ldap|mysql|postgresql):(\S+)/) {
$me->{_type} = $1;
$me->{_schema} = $2;