From a25e74e1e3be401f1452cb711fc89ac9b12efa50 Mon Sep 17 00:00:00 2001 From: blackhedd Date: Mon, 17 Apr 2006 00:35:42 +0000 Subject: [PATCH] added the ASN.1 syntax definition for a "present" filter. --- testserver/ldapserver.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/testserver/ldapserver.rb b/testserver/ldapserver.rb index e215dd5..64a495f 100644 --- a/testserver/ldapserver.rb +++ b/testserver/ldapserver.rb @@ -42,12 +42,13 @@ module LdapServer 3 => :array # LDAP SearchRequest }, :primitive => { - 2 => :string # ldapsearch sends this to unbind + 2 => :string, # ldapsearch sends this to unbind } }, :context_specific => { :primitive => { - 0 => :string # simple auth (password) + 0 => :string, # simple auth (password) + 7 => :string # present filter }, } } @@ -114,6 +115,8 @@ module LdapServer return end + # pdu[1][7] is the attributes. It's an empty array to signify ALL attributes. + puts "WARNING, not interpreting attributes specifier" =begin Search Response ::= CHOICE { @@ -187,10 +190,10 @@ if __FILE__ == $0 $logger.info "adding ../lib to loadpath, to pick up dev version of Net::LDAP." $:.unshift "../lib" - require 'netber' - require 'ldappdu' - require 'netldap' - require 'netldapfilter' + require 'net/ber' + require 'net/ldappdu' + require 'net/ldap' + require 'net/ldapfilter' EventMachine.run { $logger.info "starting LDAP server on 127.0.0.1 port 3890"