From 5aa2a86cef2d8c08c504e7c0cf2d1ba1579f716d Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 10 Aug 2012 10:40:32 -0400
Subject: [PATCH] MAN: Improve description of ldap_*_search_base options

It was ambiguous that these options supported the new multiple
search base format, as well as the search filters.
---
 src/man/include/ldap_search_bases.xml              |  26 ++++++
 src/man/include/ldap_search_bases_experimental.xml |  29 ++++++
 src/man/po/po4a.cfg                                |   2 +
 src/man/sssd-ldap.5.xml                            | 102 ++-------------------
 4 files changed, 63 insertions(+), 96 deletions(-)
 create mode 100644 src/man/include/ldap_search_bases.xml
 create mode 100644 src/man/include/ldap_search_bases_experimental.xml

diff --git a/src/man/include/ldap_search_bases.xml b/src/man/include/ldap_search_bases.xml
new file mode 100644
index 0000000000000000000000000000000000000000..32f8dd414cbb7af493008b7e72e37d148f9fd8c1
--- /dev/null
+++ b/src/man/include/ldap_search_bases.xml
@@ -0,0 +1,26 @@
+<listitem>
+    <para>
+        An optional base DN, search scope and LDAP filter
+        to restrict LDAP searches for this attribute type.
+    </para>
+    <para>
+        syntax:
+<programlisting>
+search_base[?scope?[filter][?search_base?scope?[filter]]*]
+</programlisting>
+    </para>
+    <para>
+        The scope can be one of "base", "onelevel" or
+        "subtree". The filter must be a valid LDAP search
+        filter as specified by
+        http://www.ietf.org/rfc/rfc2254.txt
+    </para>
+    <para>
+        For examples of this syntax, please refer to the
+        <quote>ldap_search_base</quote> examples section.
+    </para>
+    <para>
+        Default: the value of
+        <emphasis>ldap_search_base</emphasis>
+    </para>
+</listitem>
\ No newline at end of file
diff --git a/src/man/include/ldap_search_bases_experimental.xml b/src/man/include/ldap_search_bases_experimental.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6ba351cb01cd3eac55e210e77154c9202c7c9093
--- /dev/null
+++ b/src/man/include/ldap_search_bases_experimental.xml
@@ -0,0 +1,29 @@
+<listitem>
+    <para>
+        An optional base DN, search scope and LDAP filter
+        to restrict LDAP searches for this attribute type.
+    </para>
+    <para>
+        syntax:
+<programlisting>
+search_base[?scope?[filter][?search_base?scope?[filter]]*]
+</programlisting>
+    </para>
+    <para>
+        The scope can be one of "base", "onelevel" or
+        "subtree". The filter must be a valid LDAP search
+        filter as specified by
+        http://www.ietf.org/rfc/rfc2254.txt
+    </para>
+    <para>
+        For examples of this syntax, please refer to the
+        <quote>ldap_search_base</quote> examples section.
+    </para>
+    <para>
+        Default: the value of
+        <emphasis>ldap_search_base</emphasis>
+    </para>
+    <para>
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="experimental.xml" />
+    </para>
+</listitem>
\ No newline at end of file
diff --git a/src/man/po/po4a.cfg b/src/man/po/po4a.cfg
index e20b713641bdc028d391a843c3c44405cbdb1460..0aa9f61fd53e43e93b894576c1dee368a9acf173 100644
--- a/src/man/po/po4a.cfg
+++ b/src/man/po/po4a.cfg
@@ -32,3 +32,5 @@
 [type:docbook] include/experimental.xml $lang:$(builddir)/$lang/include/experimental.xml opt:"-k 0"
 [type:docbook] include/local.xml $lang:$(builddir)/$lang/include/local.xml opt:"-k 0"
 [type:docbook] include/seealso.xml $lang:$(builddir)/$lang/include/seealso.xml opt:"-k 0"
+[type:docbook] include/ldap_search_bases.xml $lang:$(builddir)/$lang/include/ldap_search_bases.xml opt:"-k 0"
+[type:docbook] include/ldap_search_bases_experimental.xml $lang:$(builddir)/$lang/include/ldap_search_bases_experimental.xml opt:"-k 0"
diff --git a/src/man/sssd-ldap.5.xml b/src/man/sssd-ldap.5.xml
index 175da346bc9a7970bde89b0ddbaf0814dc19c76c..02ec13488860fdcd5c781820cfa5700485c047d0 100644
--- a/src/man/sssd-ldap.5.xml
+++ b/src/man/sssd-ldap.5.xml
@@ -1041,21 +1041,7 @@
 
                 <varlistentry>
                     <term>ldap_service_search_base (string)</term>
-                    <listitem>
-                        <para>
-                            An optional base DN to restrict service searches
-                            to a specific subtree.
-                        </para>
-                        <para>
-                            See <quote>ldap_search_base</quote> for
-                            information about configuring multiple search
-                            bases.
-                        </para>
-                        <para>
-                            Default: the value of
-                            <emphasis>ldap_search_base</emphasis>
-                        </para>
-                    </listitem>
+                    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/ldap_search_bases.xml" />
                 </varlistentry>
 
                 <varlistentry>
@@ -2156,59 +2142,17 @@ ldap_access_filter = memberOf=cn=allowedusers,ou=Groups,dc=example,dc=com
             <variablelist>
                 <varlistentry>
                     <term>ldap_netgroup_search_base (string)</term>
-                    <listitem>
-                        <para>
-                            An optional base DN to restrict netgroup searches
-                            to a specific subtree.
-                        </para>
-                        <para>
-                            See <quote>ldap_search_base</quote> for
-                            information about configuring multiple search
-                            bases.
-                        </para>
-                        <para>
-                            Default: the value of
-                            <emphasis>ldap_search_base</emphasis>
-                        </para>
-                    </listitem>
+                    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/ldap_search_bases.xml" />
                 </varlistentry>
 
                 <varlistentry>
                     <term>ldap_user_search_base (string)</term>
-                    <listitem>
-                        <para>
-                            An optional base DN to restrict user searches
-                            to a specific subtree.
-                        </para>
-                        <para>
-                            See <quote>ldap_search_base</quote> for
-                            information about configuring multiple search
-                            bases.
-                        </para>
-                        <para>
-                            Default: the value of
-                            <emphasis>ldap_search_base</emphasis>
-                        </para>
-                    </listitem>
+                    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/ldap_search_bases.xml" />
                 </varlistentry>
 
                 <varlistentry>
                     <term>ldap_group_search_base (string)</term>
-                    <listitem>
-                        <para>
-                            An optional base DN to restrict group searches
-                            to a specific subtree.
-                        </para>
-                        <para>
-                            See <quote>ldap_search_base</quote> for
-                            information about configuring multiple search
-                            bases.
-                        </para>
-                        <para>
-                            Default: the value of
-                            <emphasis>ldap_search_base</emphasis>
-                        </para>
-                    </listitem>
+                    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/ldap_search_bases.xml" />
                 </varlistentry>
 
                 <varlistentry>
@@ -2257,46 +2201,12 @@ ldap_access_filter = memberOf=cn=allowedusers,ou=Groups,dc=example,dc=com
 
                 <varlistentry condition="with_sudo">
                     <term>ldap_sudo_search_base (string)</term>
-                    <listitem>
-                        <para>
-                            An optional base DN to restrict sudo rules searches
-                            to a specific subtree.
-                        </para>
-                        <para>
-                            See <quote>ldap_search_base</quote> for
-                            information about configuring multiple search
-                            bases.
-                        </para>
-                        <para>
-                            Default: the value of
-                            <emphasis>ldap_search_base</emphasis>
-                        </para>
-                        <para>
-                            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/experimental.xml" />
-                        </para>
-                    </listitem>
+                    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/ldap_search_bases_experimental.xml" />
                 </varlistentry>
 
                 <varlistentry condition="with_autofs">
                     <term>ldap_autofs_search_base (string)</term>
-                    <listitem>
-                        <para>
-                            An optional base DN to restrict automounter searches
-                            to a specific subtree.
-                        </para>
-                        <para>
-                            See <quote>ldap_search_base</quote> for
-                            information about configuring multiple search
-                            bases.
-                        </para>
-                        <para>
-                            Default: the value of
-                            <emphasis>ldap_search_base</emphasis>
-                        </para>
-                        <para>
-                            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/experimental.xml" />
-                        </para>
-                    </listitem>
+                    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/ldap_search_bases_experimental.xml" />
                 </varlistentry>
 
             </variablelist>
-- 
1.7.11.2

