diff --git a/etc/sample.scm b/etc/sample.scm index 878252a..2eb11be 100644 --- a/etc/sample.scm +++ b/etc/sample.scm @@ -3,7 +3,7 @@ (define (open-anonymous-ldap-v3-session host) (let ((session (ldap-init host))) (set-ldap-session-option! (ldap-session-option-value protocol-version) 3 session) - (ldap-simple-bind-as-nobody session) + (ldap-simple-bind-anonymous session) session)) (define (get-value-alist entry) @@ -17,11 +17,11 @@ (with-ldap-session (open-anonymous-ldap-v3-session host) (lambda () - (let ((first-entry + (let ((result (ldap-search root-dn (ldap-scope-arguments onelevel) "(objectClass=*)" ldap-attributes-all-user-attributes #f))) - (let lp ((entry (ldap-first-entry first-entry)) + (let lp ((entry (ldap-first-entry result)) (res '())) (if (not entry) res