diff options
Diffstat (limited to 'jni/ruby/sample/drb/acl.rb')
-rw-r--r-- | jni/ruby/sample/drb/acl.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jni/ruby/sample/drb/acl.rb b/jni/ruby/sample/drb/acl.rb new file mode 100644 index 0000000..d93eb9c --- /dev/null +++ b/jni/ruby/sample/drb/acl.rb @@ -0,0 +1,15 @@ +require 'drb/acl' + +list = %w(deny all + allow 192.168.1.1 + allow ::ffff:192.168.1.2 + allow 192.168.1.3 +) + +addr = ["AF_INET", 10, "lc630", "192.168.1.3"] + +acl = ACL.new +p acl.allow_addr?(addr) + +acl = ACL.new(list, ACL::DENY_ALLOW) +p acl.allow_addr?(addr) |