From c17aa8be39231eff30e899b4777596e193876650 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 27 Mar 2012 15:59:00 +0200 Subject: [eldap] Add rudimentary docs --- lib/eldap/doc/src/Makefile | 115 ++++++++++++ lib/eldap/doc/src/book.xml | 47 +++++ lib/eldap/doc/src/eldap.xml | 342 ++++++++++++++++++++++++++++++++++++ lib/eldap/doc/src/fascicules.xml | 18 ++ lib/eldap/doc/src/note.gif | Bin 0 -> 1539 bytes lib/eldap/doc/src/notes.xml | 38 ++++ lib/eldap/doc/src/ref_man.xml | 37 ++++ lib/eldap/doc/src/release_notes.xml | 37 ++++ lib/eldap/doc/src/usersguide.xml | 38 ++++ lib/eldap/doc/src/warning.gif | Bin 0 -> 1498 bytes 10 files changed, 672 insertions(+) create mode 100644 lib/eldap/doc/src/Makefile create mode 100644 lib/eldap/doc/src/book.xml create mode 100644 lib/eldap/doc/src/eldap.xml create mode 100644 lib/eldap/doc/src/fascicules.xml create mode 100644 lib/eldap/doc/src/note.gif create mode 100644 lib/eldap/doc/src/notes.xml create mode 100644 lib/eldap/doc/src/ref_man.xml create mode 100644 lib/eldap/doc/src/release_notes.xml create mode 100644 lib/eldap/doc/src/usersguide.xml create mode 100644 lib/eldap/doc/src/warning.gif (limited to 'lib/eldap/doc/src') diff --git a/lib/eldap/doc/src/Makefile b/lib/eldap/doc/src/Makefile new file mode 100644 index 0000000000..4c827319b4 --- /dev/null +++ b/lib/eldap/doc/src/Makefile @@ -0,0 +1,115 @@ +# ``The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved via the world wide web at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# The Initial Developer of the Original Code is Ericsson Utvecklings AB. +# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings +# AB. All Rights Reserved.'' +# +# $Id$ +# +include $(ERL_TOP)/make/target.mk +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Application version +# ---------------------------------------------------- +include ../../vsn.mk +VSN=$(ELDAP_VSN) +APPLICATION=eldap + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- +XML_APPLICATION_FILES = ref_man.xml +XML_REF3_FILES = eldap.xml + +XML_PART_FILES = release_notes.xml usersguide.xml +XML_CHAPTER_FILES = notes.xml + +BOOK_FILES = book.xml + +XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \ + $(XML_PART_FILES) $(XML_CHAPTER_FILES) + +GIF_FILES = + +# ---------------------------------------------------- + +HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ + $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) + +INFO_FILE = ../../info + +MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) +MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6) + +HTML_REF_MAN_FILE = $(HTMLDIR)/index.html + +TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf + +# ---------------------------------------------------- +# FLAGS +# ---------------------------------------------------- +XML_FLAGS += + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- +$(HTMLDIR)/%.gif: %.gif + $(INSTALL_DATA) $< $@ + + +docs: pdf html man + +$(TOP_PDF_FILE): $(XML_FILES) + +pdf: $(TOP_PDF_FILE) + +html: gifs $(HTML_REF_MAN_FILE) + +man: $(MAN3_FILES) $(MAN6_FILES) + +gifs: $(GIF_FILES:%=$(HTMLDIR)/%) + +debug opt valgrind: + +clean clean_docs clean_tex: + rm -rf $(HTMLDIR)/* + rm -f $(MAN3DIR)/* + rm -f $(MAN6DIR)/* + rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) + rm -f errs core *~ + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +release_docs_spec: docs + $(INSTALL_DIR) $(RELSYSDIR)/doc/pdf + $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf + $(INSTALL_DIR) $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(HTMLDIR)/* \ + $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR) + $(INSTALL_DIR) $(RELEASE_PATH)/man/man3 + $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3 +# $(INSTALL_DIR) $(RELEASE_PATH)/man/man6 +# $(INSTALL_DATA) $(MAN6DIR)/* $(RELEASE_PATH)/man/man6 + + +release_spec: + diff --git a/lib/eldap/doc/src/book.xml b/lib/eldap/doc/src/book.xml new file mode 100644 index 0000000000..74f1c37cdc --- /dev/null +++ b/lib/eldap/doc/src/book.xml @@ -0,0 +1,47 @@ + + + + +
+ + 2012 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + eldap + OTP team + + 1999-01-21 + A + book.xml +
+ eldap + + + + + + + + + + + + + + +
+ diff --git a/lib/eldap/doc/src/eldap.xml b/lib/eldap/doc/src/eldap.xml new file mode 100644 index 0000000000..7040085c49 --- /dev/null +++ b/lib/eldap/doc/src/eldap.xml @@ -0,0 +1,342 @@ + + + + +
+ + 2012 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + eldap + Peter Högfeldt + + 2000-06-20 + B +
+ eldap + Eldap Functions + +

This module provides a client api to the Lightweight Directory Access Protocol (LDAP). +

+

References:

+ +

RFC 4510 - RFC 4519

+
+

The above publications can be found at IETF. +

+

Types

+
+handle()    Connection handle
+attribute() {Type = string(), Values=[string()]}
+modify_op() See mod_add/2, mod_delete/2, mod_replace/2
+scope()     See baseObject/0, singleLevel/0, wholeSubtree/0
+dereference() See neverDerefAliases/0, derefInSearching/0, derefFindingBaseObj/0, derefAlways/0
+filter()    See present/1, substrings/2,
+                equalityMatch/2, greaterOrEqual/2, lessOrEqual/2,
+                approxMatch/2,
+                'and'/1, 'or'/1, 'not'/1.
+    
+

+
+ + + open([Host]) -> {ok, Handle} | {error, Reason} + Open a connection to an LDAP server. + + Handle = handle() + + +

Setup a connection to an LDAP server, the HOST's are tried in order.

+
+
+ + open([Host], [Option]) -> {ok, Handle} | {error, Reason} + Open a connection to an LDAP server. + + Handle = handle() + Option = {port, integer()} | {log, function()} | {timeout, integer()} | {ssl, boolean()} + + +

Setup a connection to an LDAP server, the HOST's are tried in order.

+

The log function takes three arguments, fun(Level, FormatString, [FormatArg]) end.

+

Timeout set the maximum time in milliseconds that each server request may take.

+
+
+ + close(Handle) -> ok + Shutdown the connection. + + Handle = handle() + + +

Shutdown the connection.

+
+
+ + simple_bind(Handle, Dn, Password) -> ok | {error, Reason} + Authenticate the connection. + + Handle = handle() + Dn = string() + Password = string() + + +

Authenticate the connection using simple authentication.

+
+
+ + add(Handle, Dn, [Attribute]) -> ok | {error, Reason} + Add an entry. + + Handle = handle() + Dn = string() + Attribute = attribute() + + +

Add an entry. The entry must not exist.

+
+  add(Handle,
+      "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com",
+       [{"objectclass", ["person"]},
+        {"cn", ["Bill Valentine"]},
+        {"sn", ["Valentine"]},
+        {"telephoneNumber", ["545 555 00"]}]
+     )
+	
+
+
+ + delete(Handle, Dn) -> ok | {error, Reason} + Delete an entry. + + Dn = string() + + +

Delete an entry.

+
+  delete(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com")
+	
+
+
+ + + mod_add(Type, [Value]) -> modify_op() + Create a modification operation. + + Type = string() + Value = string() + +

Create an add modification operation.

+
+ + mod_delete(Type, [Value]) -> modify_op() + Create a modification operation. + + Type = string() + Value = string() + +

Create a delete modification operation.

+
+ + mod_replace(Type, [Value]) -> modify_op() + Create a modification operation. + + Type = string() + Value = string() + +

Create a replace modification operation.

+
+ + + modify(Handle, Dn, [ModifyOp]) -> ok | {error, Reason} + Modify an entry. + + Dn = string() + ModifyOp = modify_op() + + +

Modify an entry.

+
+  modify(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com",
+         [eldap:mod_replace("telephoneNumber", ["555 555 00"]),
+	  eldap:mod_add("description", ["LDAP Hacker"]) ])
+	
+
+
+ + modify_dn(Handle, Dn, NewRDN, DeleteOldRDN, NewSupDN) -> ok | {error, Reason} + Modify the DN of an entry. + + Dn = string() + NewRDN = string() + DeleteOldRDN = boolean() + NewSupDN = string() + + +

Modify the DN of an entry. DeleteOldRDN indicates + whether the current RDN should be removed after operation. + NewSupDN should be "" if the RDN should not be moved or the new parent which + the RDN will be moved to.

+
+  modify_dn(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com ",
+            "cn=Bill Jr Valentine", true, "")
+	
+
+
+ + search(Handle, SearchOptions) -> {ok, #eldap_search_result{}} | {error, Reason} + Search the Directory + + SearchOptions = #eldap_search{} | [SearchOption] + SearchOption = {base, string()} | {filter, filter()} | {scope, scope()} + | {attributes, [string()]} | {deref, dereference()} | + | {types_only, boolean()} | {timeout, integer()} + + + +

Search the directory with the supplied the SearchOptions. + The base and filter options must be supplied. + Default values: scope is wholeSubtree(), deref is derefAlways(), + types_only is false and timeout is 0 (meaning infinity). +

+
+  Filter = eldap:substrings("cn", [{any,"V"}]),
+  search(Handle, [{base, "dc=example, dc=com"}, {filter, Filter}, {attributes, ["cn"]}]),
+	
+
+
+ + + baseObject() -> scope() + Create search scope. +

Search baseobject only.

+
+ + singleLevel() -> scope() + Create search scope. +

Search the specified level only, i.e. do not recurse.

+
+ + wholeSubtree() -> scope() + Create search scope. +

Search the entire subtree.

+
+ + + neverDerefAliases() -> dereference() + Create search option. +

Never derefrence aliases, treat aliases as entries.

+
+ + derefAlways() -> dereference() + Create search option. +

Always derefrence aliases.

+
+ + derefInSearching() -> dereference() + Create search option. +

Derefrence aliases only when searching.

+
+ + derefFindingBaseObj() -> dereference() + Create search option. +

Derefrence aliases only in finding the base.

+
+ + + present(Type) -> filter() + Create search filter option. + + Type = string() + +

Create a filter which filters on attribute type presence.

+
+ + substrings(Type, [SubString]) -> filter() + Create search filter option. + + Type = string() + SubString = {StringPart, string()} + StringPart = initial | any | final + +

Create a filter which filters on substrings.

+
+ + equalityMatch(Type, Value) -> filter() + Create search filter option. + + Type = string() + Value = string() + +

Create a equality filter.

+
+ + greaterOrEqual(Type, Value) -> filter() + Create search filter option. + + Type = string() + Value = string() + +

Create a greater or equal filter.

+
+ + lessOrEqual(Type, Value) -> filter() + Create search filter option. + + Type = string() + Value = string() + +

Create a less or equal filter.

+
+ + approxMatch(Type, Value) -> filter() + Create search filter option. + + Type = string() + Value = string() + +

Create a approximation match filter.

+
+ + 'and'([Filter]) -> filter() + Create search filter option. + + Filter = filter() + +

Creates a filter where all Filter must be true.

+
+ + 'or'([Filter]) -> filter() + Create search filter option. + + Filter = filter() + +

Create a filter where at least one of the Filter must be true.

+
+ + 'not'(Filter) -> filter() + Create search filter option. + + Filter = filter() + +

Negate a filter.

+
+ +
+ +
+ diff --git a/lib/eldap/doc/src/fascicules.xml b/lib/eldap/doc/src/fascicules.xml new file mode 100644 index 0000000000..8fc250bc75 --- /dev/null +++ b/lib/eldap/doc/src/fascicules.xml @@ -0,0 +1,18 @@ + + + + + + User's Guide + + + Reference Manual + + + Release Notes + + + Off-Print + + + diff --git a/lib/eldap/doc/src/note.gif b/lib/eldap/doc/src/note.gif new file mode 100644 index 0000000000..6fffe30419 Binary files /dev/null and b/lib/eldap/doc/src/note.gif differ diff --git a/lib/eldap/doc/src/notes.xml b/lib/eldap/doc/src/notes.xml new file mode 100644 index 0000000000..4ded452bc3 --- /dev/null +++ b/lib/eldap/doc/src/notes.xml @@ -0,0 +1,38 @@ + + + + +
+ + 2012 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + Crypto Release Notes + Peter Högfeldt + + 2003-06-06 + B + notes.xml +
+

This document describes the changes made to the Eldap application.

+ +
+ Eldap 1.0 +

New application.

+
+
+ diff --git a/lib/eldap/doc/src/ref_man.xml b/lib/eldap/doc/src/ref_man.xml new file mode 100644 index 0000000000..70c4cee16d --- /dev/null +++ b/lib/eldap/doc/src/ref_man.xml @@ -0,0 +1,37 @@ + + + + +
+ + 2012 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + Eldap Reference Manual + OTP team + + 2003-06-01 + B + refman.sgml +
+ +

The Eldap application provides an api for accessing an LDAP server.

+

The original code was developed by Torbjörn Törnkvist.

+
+ +
+ diff --git a/lib/eldap/doc/src/release_notes.xml b/lib/eldap/doc/src/release_notes.xml new file mode 100644 index 0000000000..65c1d09bb6 --- /dev/null +++ b/lib/eldap/doc/src/release_notes.xml @@ -0,0 +1,37 @@ + + + + +
+ + 2012 + Ericsson AB, All Rights Reserved + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + The Initial Developer of the Original Code is Ericsson AB. + + + Crypto Release Notes + Peter Hjögfeldt + + 2003-06-01 + B + release_notes.xml +
+ +

+
+ +
+ diff --git a/lib/eldap/doc/src/usersguide.xml b/lib/eldap/doc/src/usersguide.xml new file mode 100644 index 0000000000..828588e88e --- /dev/null +++ b/lib/eldap/doc/src/usersguide.xml @@ -0,0 +1,38 @@ + + + + +
+ + 2012 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + Eldap User's Guide + OTP Team + + 2003-06-01 + C + usersguide.xml +
+ +

The Eldap application provides an api for accessing an LDAP server.

+

The original code was developed by Torbjörn Törnkvist.

+
+ + +
+ diff --git a/lib/eldap/doc/src/warning.gif b/lib/eldap/doc/src/warning.gif new file mode 100644 index 0000000000..96af52360e Binary files /dev/null and b/lib/eldap/doc/src/warning.gif differ -- cgit v1.2.3