update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
|
|
@ -0,0 +1,7 @@
|
|||
-module(ldap_example).
|
||||
-export( [main/1] ).
|
||||
|
||||
main( [Host, DN, Password] ) ->
|
||||
{ok, Handle} = eldap:open( [Host] ),
|
||||
ok = eldap:simple_bind( Handle, DN, Password ),
|
||||
eldap:close( Handle ).
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#lang racket
|
||||
|
||||
(require ffi/unsafe ffi/unsafe/define)
|
||||
|
||||
(define-ffi-definer defldap (ffi-lib "libldap"))
|
||||
(defldap ldap_init (_fun _string _int -> _pointer))
|
||||
(defldap ldap_unbind (_fun _pointer -> _void))
|
||||
(defldap ldap_simple_bind_s (_fun _pointer _string _string -> _int))
|
||||
(defldap ldap_err2string (_fun _int -> _string))
|
||||
|
||||
(define name ...)
|
||||
(define password ...)
|
||||
(define ld (ldap_init "ldap.somewhere.com" 389))
|
||||
(ldap_simple_bind_s ld name password)
|
||||
|
||||
(ldap_unbind ld)
|
||||
Loading…
Add table
Add a link
Reference in a new issue