| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] | 
Procedures for accessing via LDAP.
binds the LDAP server.
hostname is a hostname, dc is a dc of a LDAP manager
and password is a password.
An example is shown as follows.
(define ldap-connection
  (bind-ldap-service
     "hostname"  ; hostname
     "cn=Manager,dc=example,dc=com"  ; dc
     "secret"))  ; password
gets information from the LDAP server.
ldap-connection is a LDAP connection create by bind-ldap-service
and dn is a dn to search.
The syntax of cond is shown as follows.
cond-expression
: (=  attr value)  ; equals
| (~= attr value)  ; nearly equals
| (<= attr value)  ; less than
| (>= attr value)  ; grater than
| (and cond-expression …)
| (or  cond-expression …)
| (not cond-expression)
level is the symbol shown as follows.
| object | until the object | 
| 1level | until one level | 
| subtree | until subtree | 
An example is shown as follows.
(select-ldap-service
  ldap-connection  ; bound LDAP connection
  "ou=User,dc=example,dc=com"  ; dn to search
  '(or (= "cn" "User*")
       (= "sn" "aaa*"))  ; searching condition
  'subtree)  ; object, 1level, subtree
inserts information to the LDAP server.
ldap-connection is a LDAP connection create by bind-ldap-service
and dn is a dn to insert.
value is a list whose format is shown as follows.
(("attr" "value1" …)
 ("attr" "value2" …)
 ...)
An example is shown as follows.
(insert-ldap-service!
  ldap-connection  ; bound LDAP connection
  "cn=User0001,ou=User,dc=example,dc=com"
  '(("cn" "User0001")
    ("sn" "aaaaa")
    ("objectclass" "top" "person" "organizationalPerson")))
updates information of the LDAP server.
ldap-connection is a LDAP connection create by bind-ldap-service
and dn is a dn to update.
value is a list whose format is shown as follows.
((replace "attr" "value1" …)  ; update
 (add     "attr" "value2" …)  ; add
 (remove  "attr")  ; remove
 ...)
An example is shown as follows.
(update-ldap-service!
  ldap-connection  ; bound LDAP connection
  "cn=User0001,ou=User,dc=example,dc=com"
  '((replace "sn" "bbbb")
    (add     "description" "A description")
    (remove "mail")))
deletes information of the LDAP server.
ldap-connection is a LDAP connection create by bind-ldap-service
and dn is a dn to delete.
An example is shown as follows.
(delete-ldap-service! ldap-connection ; bound LDAP connection "cn=User0001,ou=User,dc=example,dc=com")
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | 
 
  This document was generated on August 9, 2012 using texi2html 5.0.