From 82024a6efb2ceb148afbe47d7a99ec9579ab4fe3 Mon Sep 17 00:00:00 2001 From: pvincent Date: Fri, 12 Jun 2026 06:16:48 +0000 Subject: [PATCH] almost working --- examples/ldapdb.yaml | 11 +---------- examples/server2.rb | 6 ++++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/examples/ldapdb.yaml b/examples/ldapdb.yaml index 9529bef..5959cf1 100644 --- a/examples/ldapdb.yaml +++ b/examples/ldapdb.yaml @@ -1,14 +1,4 @@ --- -dc=zourit,dc=re: - cn: - - Top object -cn=pvincent,dc=zourit,dc=re: - cn: - - pvincent - sn: - - P.Vincent - mail: - - pvincent@zourit.re dc=pvincent,dc=re: cn: - Top object @@ -19,3 +9,4 @@ cn=admin,dc=pvincent,dc=re: - Vincentdmin mail: - admin@pvincent.re + diff --git a/examples/server2.rb b/examples/server2.rb index 15faefa..28468d3 100755 --- a/examples/server2.rb +++ b/examples/server2.rb @@ -26,7 +26,7 @@ class HashOperation < LDAP::Server::Operation version = protocolOp.value[0].value authentication = protocolOp.value[2] password = authentication.value - $logger.info("AUTHENTICATION ..version=#{version}, dn=#{dn}") + $logger.info("AUTHENTICATION ..version=#{version}, dn=#{dn}, password=#{password}") super end @@ -51,12 +51,14 @@ class HashOperation < LDAP::Server::Operation obj = @hash[basedn] raise LDAP::ResultError::NoSuchObject unless obj + $logger.info('BaseObject') result = send_SearchResultEntry(basedn, obj) if LDAP::Server::Filter.run(filter, obj) when LDAP::Server::WholeSubtree @hash.each do |dn, av| next unless dn.index(basedn, -basedn.length) # under basedn? next unless LDAP::Server::Filter.run(filter, av) # attribute filter? + $logger.info('WholeSubtree') result = send_SearchResultEntry(dn, av) end @@ -65,7 +67,7 @@ class HashOperation < LDAP::Server::Operation end $logger.info "result=#{result}" - result + # result end end