almost working
This commit is contained in:
+1
-10
@@ -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:
|
dc=pvincent,dc=re:
|
||||||
cn:
|
cn:
|
||||||
- Top object
|
- Top object
|
||||||
@@ -19,3 +9,4 @@ cn=admin,dc=pvincent,dc=re:
|
|||||||
- Vincentdmin
|
- Vincentdmin
|
||||||
mail:
|
mail:
|
||||||
- admin@pvincent.re
|
- admin@pvincent.re
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -26,7 +26,7 @@ class HashOperation < LDAP::Server::Operation
|
|||||||
version = protocolOp.value[0].value
|
version = protocolOp.value[0].value
|
||||||
authentication = protocolOp.value[2]
|
authentication = protocolOp.value[2]
|
||||||
password = authentication.value
|
password = authentication.value
|
||||||
$logger.info("AUTHENTICATION ..version=#{version}, dn=#{dn}")
|
$logger.info("AUTHENTICATION ..version=#{version}, dn=#{dn}, password=#{password}")
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -51,12 +51,14 @@ class HashOperation < LDAP::Server::Operation
|
|||||||
obj = @hash[basedn]
|
obj = @hash[basedn]
|
||||||
raise LDAP::ResultError::NoSuchObject unless obj
|
raise LDAP::ResultError::NoSuchObject unless obj
|
||||||
|
|
||||||
|
$logger.info('BaseObject')
|
||||||
result = send_SearchResultEntry(basedn, obj) if LDAP::Server::Filter.run(filter, obj)
|
result = send_SearchResultEntry(basedn, obj) if LDAP::Server::Filter.run(filter, obj)
|
||||||
when LDAP::Server::WholeSubtree
|
when LDAP::Server::WholeSubtree
|
||||||
@hash.each do |dn, av|
|
@hash.each do |dn, av|
|
||||||
next unless dn.index(basedn, -basedn.length) # under basedn?
|
next unless dn.index(basedn, -basedn.length) # under basedn?
|
||||||
next unless LDAP::Server::Filter.run(filter, av) # attribute filter?
|
next unless LDAP::Server::Filter.run(filter, av) # attribute filter?
|
||||||
|
|
||||||
|
$logger.info('WholeSubtree')
|
||||||
result = send_SearchResultEntry(dn, av)
|
result = send_SearchResultEntry(dn, av)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -65,7 +67,7 @@ class HashOperation < LDAP::Server::Operation
|
|||||||
|
|
||||||
end
|
end
|
||||||
$logger.info "result=#{result}"
|
$logger.info "result=#{result}"
|
||||||
result
|
# result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user