docs-xml: Use &pathconfig.WINBINDD_SOCKET_DIR; to avoid reference to old /tmp/.winbindd
authorAndrew Bartlett <abartlet@samba.org>
Mon, 20 Jun 2022 02:35:19 +0000 (14:35 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 22 Jun 2022 15:50:33 +0000 (15:50 +0000)
We can now write docs that follow how the software on this system was
built, which is much less confusing for users.  Also /tmp/.winbindd
has not been used for a long time.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15101

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
docs-xml/Makefile
docs-xml/generate-pathconf-entities.sh [new file with mode: 0755]
docs-xml/manpages/winbindd.8.xml
docs-xml/smbdotconf/generate-file-list.sh

index c614097f6c0ecd2b43a9dd72874903a880d6d7a2..ae50b14d79aa5986625e60612ee1a52bddb4b518 100644 (file)
@@ -17,7 +17,7 @@ DBLATEX_OPTIONS = -p xslt/latex.xsl -i xslt/latex
 
 DATETIME := $(shell date +%Y%m%d%H%M%S)
 
-XSLTPROC_DEPS = build/catalog.xml build/DTD/samba.build.version
+XSLTPROC_DEPS = build/catalog.xml build/DTD/samba.build.version build/DTD/samba.build.pathconfig
 
 ifeq ($(PROFILE), Y)
 XSLTPROC += --profile --load-trace --timing
@@ -57,6 +57,7 @@ clean::
        rm -f xslt/figures/*pdf
        rm -f $(SMBDOTCONFDOC)/parameters.*.xml
        rm -f build/catalog.xml
+       rm -f DTD/samba.build.pathconfig
 
 # Output format targets
 pdf:: $(patsubst %,$(PDFDIR)/%.pdf,$(MAIN_DOCS))
@@ -177,13 +178,18 @@ $(MANPAGEDIR)/smb.conf.5.xml: parameters
 # the parameters xml files. Otherwise, when parameters.*.xml does not exist
 # yet, the parameters are not generated when smb.conf.5.xml is newer than
 # any smbdotconf/*/*.xml file ...
-.PHONY: parameters
+.PHONY: parameters pathconf
 
 parameters: $(SMBDOTCONFDOC)/parameters.all.xml
 
+pathconf: build/DTD/samba.build.pathconfig
+
 $(SMBDOTCONFDOC)/parameters.all.xml: $(wildcard $(SMBDOTCONFDOC)/*/*.xml) $(SMBDOTCONFDOC)/generate-file-list.sh
        $(SMBDOTCONFDOC)/generate-file-list.sh $(SMBDOTCONFDOC) > $@
 
+build/DTD/samba.build.pathconfig: generate-pathconf-entities.sh
+       ./generate-pathconf-entities.sh > $@
+
 $(OUTPUTDIR):
        test -d $@ || mkdir $@
 
diff --git a/docs-xml/generate-pathconf-entities.sh b/docs-xml/generate-pathconf-entities.sh
new file mode 100755 (executable)
index 0000000..cb3a346
--- /dev/null
@@ -0,0 +1,20 @@
+
+# This is the fallback table for when we use the docs-xml build
+# system.  When build as part of the main waf build, these are set to
+# the full correct path for the system.
+#
+echo "
+<!ENTITY pathconfig.SCRIPTSBINDIR        '\${prefix}/sbin'>
+<!ENTITY pathconfig.LOCKDIR              '\${prefix}/var/lock'>
+<!ENTITY pathconfig.NCALRPCDIR           '\${prefix}/var/run/ncalrpc'>
+<!ENTITY pathconfig.PIDDIR               '\${prefix}/var/run'>
+<!ENTITY pathconfig.STATEDIR             '\${prefix}/var/locks'>
+<!ENTITY pathconfig.PRIVATE_DIR          '\${prefix}/private'>
+<!ENTITY pathconfig.BINDDNS_DIR          '\${prefix}/bind-dns'>
+<!ENTITY pathconfig.SMB_PASSWD_FILE      '\${prefix}/private/smbpasswd'>
+<!ENTITY pathconfig.WINBINDD_SOCKET_DIR  '\${prefix}/var/run/winbindd'>
+<!ENTITY pathconfig.CACHEDIR             '\${prefix}/var/cache'>
+<!ENTITY pathconfig.NTP_SIGND_SOCKET_DIR '\${prefix}/var/lib/ntp_signd'>
+<!ENTITY pathconfig.MITKDCPATH           '\${prefix}/sbin/krb5kdc'>
+<!ENTITY pathconfig.SAMBA_DATADIR        '\${prefix}/var/samba'>
+"
index 7a643b8879cb2d4efc3eb19b9217471a90faed8e..e60bd655ec07aee9387df1abb04b4b5e6b738167 100644 (file)
@@ -432,28 +432,36 @@ auth  required    /lib/security/pam_unix.so \
                </varlistentry>
 
                <varlistentry>
-               <term>/tmp/.winbindd/pipe</term>
+               <term>&pathconfig.WINBINDD_SOCKET_DIR;/pipe</term>
                <listitem><para>The UNIX pipe over which clients communicate with
                the <command>winbindd</command> program.  For security reasons, the
                winbind client will only attempt to connect to the winbindd daemon
-               if both the <filename>/tmp/.winbindd</filename> directory
-               and <filename>/tmp/.winbindd/pipe</filename> file are owned by
-               root. </para></listitem>
+               if both the <filename>&pathconfig.WINBINDD_SOCKET_DIR;</filename> directory
+               and <filename>&pathconfig.WINBINDD_SOCKET_DIR;/pipe</filename> file are owned by
+               root. </para>
+
+               <para><smbconfoption name="winbindd socket directory"/>
+               overrides this default.</para>
+
+               </listitem>
                </varlistentry>
 
                <varlistentry>
-               <term>$LOCKDIR/winbindd_privileged/pipe</term>
+               <term>$STATEDIR/winbindd_privileged/pipe</term>
                <listitem><para>The UNIX pipe over which 'privileged' clients
                 communicate with the <command>winbindd</command> program.  For security
                 reasons, access to some winbindd functions - like those needed by
                 the <command>ntlm_auth</command> utility - is restricted.  By default,
                 only users in the 'root' group will get this access, however the administrator
-                may change the group permissions on $LOCKDIR/winbindd_privileged to allow
+                may change the group permissions on $STATEDIR/winbindd_privileged to allow
                 programs like 'squid' to use ntlm_auth.
                Note that the winbind client will only attempt to connect to the winbindd daemon
-               if both the <filename>$LOCKDIR/winbindd_privileged</filename> directory
-               and <filename>$LOCKDIR/winbindd_privileged/pipe</filename> file are owned by
-               root. </para></listitem>
+               if both the <filename>$STATEDIR/winbindd_privileged</filename> directory
+               and <filename>$STATEDIR/winbindd_privileged/pipe</filename> file are owned by
+               root. </para>
+               <para><smbconfoption name="state dir"/> controls what
+               $STATEDIR refers to.</para>
+               </listitem>
                </varlistentry>
 
                <varlistentry>
@@ -463,11 +471,12 @@ auth  required    /lib/security/pam_unix.so \
                </varlistentry>
 
                <varlistentry>
-               <term>$LOCKDIR/winbindd_idmap.tdb</term>
+               <term>$STATEDIR/winbindd_idmap.tdb</term>
                <listitem><para>Storage for the Windows NT rid to UNIX user/group
-               id mapping.  The lock directory is specified when Samba is initially
-               compiled using the <parameter>--with-lockdir</parameter> option.
-               This directory is by default <filename>/usr/local/samba/var/locks
+               id mapping.  The directory is specified when Samba is initially
+               compiled using the
+               <parameter>--with-statedir</parameter> option or <smbconfoption name="state dir"/>.
+               The default directory in this installation is <filename>&pathconfig.STATEDIR;
                </filename>. </para></listitem>
                </varlistentry>
 
index 27c9c5b753ed8de7c776386bf1b1f4d076154757..dd981b3c4720b343f6aa3901877e71b0960b56c3 100755 (executable)
@@ -1,24 +1,10 @@
 #!/bin/sh
 #
-# This is the fallback table for when we use the docs-xml build
-# system.  When build as part of the main waf build, these are set to
-# the full correct path for the system.
-#
-echo "<!DOCTYPE section [
-<!ENTITY pathconfig.SCRIPTSBINDIR        '\${prefix}/sbin'>
-<!ENTITY pathconfig.LOCKDIR              '\${prefix}/var/lock'>
-<!ENTITY pathconfig.NCALRPCDIR           '\${prefix}/var/run/ncalrpc'>
-<!ENTITY pathconfig.PIDDIR               '\${prefix}/var/run'>
-<!ENTITY pathconfig.STATEDIR             '\${prefix}/var/locks'>
-<!ENTITY pathconfig.PRIVATE_DIR          '\${prefix}/private'>
-<!ENTITY pathconfig.BINDDNS_DIR          '\${prefix}/bind-dns'>
-<!ENTITY pathconfig.SMB_PASSWD_FILE      '\${prefix}/private/smbpasswd'>
-<!ENTITY pathconfig.WINBINDD_SOCKET_DIR  '\${prefix}/var/run/winbindd'>
-<!ENTITY pathconfig.CACHEDIR             '\${prefix}/var/cache'>
-<!ENTITY pathconfig.NTP_SIGND_SOCKET_DIR '\${prefix}/var/lib/ntp_signd'>
-<!ENTITY pathconfig.MITKDCPATH           '\${prefix}/sbin/krb5kdc'>
-<!ENTITY pathconfig.SAMBA_DATADIR        '\${prefix}/var/samba'>
-]>"
+set -e
+echo "<!DOCTYPE section ["
+$(dirname $0)/../generate-pathconf-entities.sh
+
+echo "]>"
 
 DIR=.
 if [ "x$1" != "x" ]; then