123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869(* Functions which resemble the command line tools, useful in the
interactive environment
Copyright (C) 2004 Eric Stokes, and The California State University
at Northridge
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*)openLdap_ooclientletevals=letl=Lexing.from_stringsinletph=!Toploop.parse_toplevel_phraselinassert(Toploop.execute_phrasefalseFormat.err_formatterph);;eval"#install_printer Ldap_ooclient.format_entries;;";;eval"#install_printer Ldap_ooclient.format_entry;;";;eval"#install_printer Ldap_schemaparser.format_oid;;";;eval"#install_printer Ldap_schemaparser.format_lcstring;;";;eval"#install_printer Ldap_schemaparser.format_schema;;";;letldap_cmd_harness~h~d~wf=letldap=newldapcon[h]intryldap#bindd~cred:w;letres=fldapinldap#unbind;reswithexn->ldap#unbind;raiseexn;;letldapsearch?(s=`SUBTREE)?(a=[])?(b="")?(d="")?(w="")~hfilter=ldap_cmd_harness~h~d~w(funldap->ldap#search~base:b~scope:s~attrs:afilter);;letldapmodify~h~d~wmods=ldap_cmd_harness~h~d~w(funldap->List.iter(fun(dn,ldmod)->ldap#modifydnldmod)mods);;letldapadd~h~d~wentries=ldap_cmd_harness~h~d~w(funldap->List.iter(funentry->ldap#addentry)entries);;