[krbdev.mit.edu #6525] man pages can have incorrect path names in them
The RT System itself via RT
rt-comment at krbdev.mit.edu
Tue Jul 7 10:06:02 EDT 2009
>From krb5-bugs-incoming-bounces at PCH.mit.edu Tue Jul 7 14:06:01 2009
Return-Path: <krb5-bugs-incoming-bounces at PCH.mit.edu>
X-Original-To: krb5-send-pr-nospam1 at krbdev.mit.edu
Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90])
by krbdev.mit.edu (Postfix) with ESMTP id A914CCC83D;
Tue, 7 Jul 2009 14:06:01 +0000 (UTC)
Received: from pch.mit.edu (pch.mit.edu [127.0.0.1])
by pch.mit.edu (8.13.6/8.12.8) with ESMTP id n67E61Hx004518;
Tue, 7 Jul 2009 10:06:01 -0400
Received: from fort-point-station.mit.edu (FORT-POINT-STATION.MIT.EDU
[18.7.7.76])
by pch.mit.edu (8.13.6/8.12.8) with ESMTP id n66K7s7A023068
for <krb5-bugs-incoming at PCH.mit.edu>; Mon, 6 Jul 2009 16:08:00 -0400
Received: from mit.edu (W92-130-BARRACUDA-2.MIT.EDU [18.7.21.223])
by fort-point-station.mit.edu (8.13.6/8.9.2) with ESMTP id
n66K7ls0021941
for <krb5-bugs at mit.edu>; Mon, 6 Jul 2009 16:07:47 -0400 (EDT)
Received: from mx1.redhat.com (localhost [127.0.0.1])
by mit.edu (Spam Firewall) with ESMTP id E1997232B7A4
for <krb5-bugs at mit.edu>; Mon, 6 Jul 2009 16:07:45 -0400 (EDT)
Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by mit.edu with
ESMTP id cAAEbed1dCxdW75Q for <krb5-bugs at mit.edu>;
Mon, 06 Jul 2009 16:07:45 -0400 (EDT)
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com
[172.16.52.254])
by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n66K7jSQ020367
for <krb5-bugs at mit.edu>; Mon, 6 Jul 2009 16:07:45 -0400
Received: from blade.bos.redhat.com (blade.bos.redhat.com [10.16.0.23])
by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n66K7iPP013334
for <krb5-bugs at mit.edu>; Mon, 6 Jul 2009 16:07:44 -0400
Received: from blade.bos.redhat.com (localhost.localdomain [127.0.0.1])
by blade.bos.redhat.com (8.14.3/8.14.2) with ESMTP id n66K7ic1003110
for <krb5-bugs at mit.edu>; Mon, 6 Jul 2009 16:07:44 -0400
Received: (from nalin at localhost)
by blade.bos.redhat.com (8.14.3/8.14.3/Submit) id n66K7ioG003108;
Mon, 6 Jul 2009 16:07:44 -0400
Date: Mon, 6 Jul 2009 16:07:44 -0400
Message-Id: <200907062007.n66K7ioG003108 at blade.bos.redhat.com>
To: krb5-bugs at mit.edu
Subject: preprocessing manual pages to get correct file paths
From: nalin at redhat.com
X-send-pr-version: 3.99
X-Scanned-By: MIMEDefang 2.42
X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254
X-Spam-Score: 0.00
X-Spam-Flag: NO
X-Mailman-Approved-At: Tue, 07 Jul 2009 10:05:59 -0400
X-BeenThere: krb5-bugs-incoming at mailman.mit.edu
X-Mailman-Version: 2.1.6
Precedence: list
Reply-To: nalin at redhat.com
Sender: krb5-bugs-incoming-bounces at PCH.mit.edu
Errors-To: krb5-bugs-incoming-bounces at PCH.mit.edu
>Submitter-Id: net
>Originator:
>Organization:
>Confidential: no
>Synopsis: man pages can have incorrect path names in them
>Severity: non-critical
>Priority: low
>Category: krb5-misc
>Class: doc-bug
>Release: 1.7
>Environment:
System: Linux blade.bos.redhat.com 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27 17:27:08 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64
>Description:
Several of the man pages include the paths to daemon binaries and other
files which are read or used by various applications in the
distribution. The paths listed in them aren't updated to reflect the
settings passed to configure at build-time, so they can be incorrect
on an installed system.
>How-To-Repeat:
From the source tree, configure with a prefix of /tmp/krb5, build,
and compare the path listed for kdc.conf in kdc.conf(5) against the
value of DEFAULT_KDC_PROFILE (from include/osconf.h) that's been
compiled into krb5kdc.
>Fix:
This patch adds logic to the various configure.in files to resolve
the names of configured directories to paths, and to turn the man
pages in the tree into templates which can then be preprocessed to
yield the files that 'make install' will install.
After applying this patch, each of the affected files needs to be
renamed by putting a ".in" on the end of its name:
appl/bsd/klogind.M
appl/bsd/kshd.M
appl/sample/sserver/sserver.M
appl/telnet/telnetd/telnetd.8
config-files/kdc.conf.M
config-files/krb5.conf.M
kadmin/cli/kadmin.M
slave/kpropd.M
slave/kprop.M
Other man pages could be renamed and preprocessed, but for the
moment they don't appear to need to be.
Index: src/configure.in
===================================================================
--- src/configure.in (revision 22425)
+++ src/configure.in (working copy)
@@ -1043,6 +1043,16 @@
AC_CONFIG_SUBDIRS(appl/libpty appl/bsd appl/gssftp appl/telnet)
AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config])
+
+V5_AC_OUTPUT_MANPAGE([
+ appl/sample/sserver/sserver.M
+ config-files/kdc.conf.M
+ config-files/krb5.conf.M
+ kadmin/cli/kadmin.M
+ slave/kpropd.M
+ slave/kprop.M
+])
+
V5_AC_OUTPUT_MAKEFILE(.
util util/support util/profile util/send-pr
Index: src/appl/sample/sserver/sserver.M
===================================================================
--- src/appl/sample/sserver/sserver.M (revision 22425)
+++ src/appl/sample/sserver/sserver.M (working copy)
@@ -59,7 +59,7 @@
using a line in
/etc/inetd.conf that looks like this:
.PP
-sample stream tcp nowait root /usr/local/sbin/sserver sserver
+sample stream tcp nowait root @mansbindir@/sserver sserver
.PP
Since \fBsample\fP is normally not a port defined in /etc/services, you will
usually have to add a line to /etc/services which looks like this:
Index: src/appl/gssftp/configure.in
===================================================================
--- src/appl/gssftp/configure.in (revision 22425)
+++ src/appl/gssftp/configure.in (working copy)
@@ -65,4 +65,9 @@
dnl
dnl
KRB5_BUILD_PROGRAM
+
+V5_AC_OUTPUT_MANPAGE([
+ ftpd/ftpd.M
+])
+
V5_AC_OUTPUT_MAKEFILE(. ftp ftpd)
Index: src/appl/gssftp/ftpd/ftpd.M
===================================================================
--- src/appl/gssftp/ftpd/ftpd.M (revision 22425)
+++ src/appl/gssftp/ftpd/ftpd.M (working copy)
@@ -35,7 +35,7 @@
.SH NAME
ftpd \- DARPA Internet File Transfer Protocol server
.SH SYNOPSIS
-.B ftpd
+.B @mansbindir@/ftpd
[\fB\-A \fP|\fB -a\fP] [\fB\-C\fP] [\fB\-c\fP] [\fB\-d\fP] [\fB-E\fP]
[\fB\-l\fP] [\fB\-v\fP] [\fB\-T\fP \fImaxtimeout\fP] [\fB\-t\fP \fItimeout\fP]
[\fB\-p\fP \fIport\fP] [\fB\-U\fP \fIftpusers-file\fP] [\fB\-u\fP \fIumask\fP]
Index: src/appl/bsd/klogind.M
===================================================================
--- src/appl/bsd/klogind.M (revision 22425)
+++ src/appl/bsd/klogind.M (working copy)
@@ -27,7 +27,7 @@
the port indicated in /etc/inetd.conf. A typical /etc/inetd.conf
configuration line for \fIklogind\fP might be:
-klogin stream tcp nowait root /usr/cygnus/sbin/klogind klogind -e5c
+klogin stream tcp nowait root @mansbindir@/klogind klogind -e5c
When a service request is received, the following protocol is initiated:
Index: src/appl/bsd/kshd.M
===================================================================
--- src/appl/bsd/kshd.M (revision 22425)
+++ src/appl/bsd/kshd.M (working copy)
@@ -8,7 +8,7 @@
.SH NAME
kshd \- kerberized remote shell server
.SH SYNOPSIS
-.B /usr/local/sbin/kshd
+.B @mansbindir@/kshd
[
.B \-kr45ec
]
@@ -30,7 +30,7 @@
on the port indicated in /etc/inetd.conf. A typical /etc/inetd.conf
configuration line for \fIkrshd\fP might be:
-kshell stream tcp nowait root /usr/local/sbin/kshd kshd -5c
+kshell stream tcp nowait root @mansbindir@/kshd kshd -5c
When a service request is received, the following protocol is initiated:
Index: src/appl/bsd/configure.in
===================================================================
--- src/appl/bsd/configure.in (revision 22425)
+++ src/appl/bsd/configure.in (working copy)
@@ -156,4 +156,10 @@
KRB5_AC_LIBUTIL
KRB5_BUILD_PROGRAM
+
+V5_AC_OUTPUT_MANPAGE([
+ klogind.M
+ kshd.M
+])
+
V5_AC_OUTPUT_MAKEFILE
Index: src/appl/telnet/telnetd/telnetd.8
===================================================================
--- src/appl/telnet/telnetd/telnetd.8 (revision 22425)
+++ src/appl/telnet/telnetd/telnetd.8 (working copy)
@@ -37,7 +37,7 @@
.SM DARPA TELNET
protocol server
.SH SYNOPSIS
-.B /usr/libexec/telnetd
+.B @mansbindir@/telnetd
[\fB\-a\fP \fIauthmode\fP] [\fB\-B\fP] [\fB\-D\fP] [\fIdebugmode\fP]
[\fB\-e\fP] [\fB\-h\fP] [\fB\-I\fP\fIinitid\fP] [\fB\-l\fP]
[\fB\-k\fP] [\fB\-n\fP] [\fB\-r\fP\fIlowpty-highpty\fP] [\fB\-s\fP]
Index: src/appl/telnet/configure.in
===================================================================
--- src/appl/telnet/configure.in (revision 22425)
+++ src/appl/telnet/configure.in (working copy)
@@ -161,4 +161,9 @@
LIBS="$old_LIBS"
dnl
KRB5_AC_LIBUTIL
+
+V5_AC_OUTPUT_MANPAGE([
+ telnetd/telnetd.8
+])
+
V5_AC_OUTPUT_MAKEFILE(. libtelnet telnet telnetd)
Index: src/kadmin/cli/kadmin.M
===================================================================
--- src/kadmin/cli/kadmin.M (revision 22425)
+++ src/kadmin/cli/kadmin.M (working copy)
@@ -850,9 +850,9 @@
.RS
.TP
EXAMPLE:
-kadmin: ktremove -k /usr/local/var/krb5kdc/kadmind.keytab kadmin/admin
+kadmin: ktremove -k @manlocalstatedir@/krb5kdc/kadmind.keytab kadmin/admin
Entry for principal kadmin/admin with kvno 3 removed
- from keytab WRFILE:/usr/local/var/krb5kdc/kadmind.keytab.
+ from keytab WRFILE:@manlocalstatedir@/krb5kdc/kadmind.keytab.
kadmin:
.RE
.fi
@@ -894,7 +894,7 @@
.SH HISTORY
The
.B kadmin
-prorgam was originally written by Tom Yu at MIT, as an interface to the
+program was originally written by Tom Yu at MIT, as an interface to the
OpenVision Kerberos administration program.
.SH SEE ALSO
.IR kerberos (1),
Index: src/config-files/kdc.conf.M
===================================================================
--- src/config-files/kdc.conf.M (revision 22425)
+++ src/config-files/kdc.conf.M (working copy)
@@ -82,14 +82,14 @@
.B string
specifies the location of the access control list (acl) file that
kadmin uses to determine which principals are allowed which permissions
-on the database. The default value is /usr/local/var/krb5kdc/kadm5.acl.
+on the database. The default value is @manlocalstatedir@/krb5kdc/kadm5.acl.
.IP admin_keytab
This
.B string
Specifies the location of the keytab file that kadmin uses to
authenticate to the database. The default value is
-/usr/local/var/krb5kdc/kadm5.keytab.
+ at manlocalstatedir@/krb5kdc/kadm5.keytab.
.IP database_name
This
@@ -257,7 +257,7 @@
realm names and the [capaths] section of its krb5.conf file
.SH FILES
-/usr/local/var/krb5kdc/kdc.conf
+ at manlocalstatedir@/krb5kdc/kdc.conf
.SH SEE ALSO
krb5.conf(5), krb5kdc(8)
Index: src/config-files/krb5.conf.M
===================================================================
--- src/config-files/krb5.conf.M (revision 22425)
+++ src/config-files/krb5.conf.M (working copy)
@@ -643,6 +643,6 @@
This LDAP specific tag indicates the number of connections to be maintained per
LDAP server.
.SH FILES
-/etc/krb5.conf
+ at mansysconfdir@/krb5.conf
.SH SEE ALSO
syslog(3)
Index: src/slave/kprop.M
===================================================================
--- src/slave/kprop.M (revision 22425)
+++ src/slave/kprop.M (working copy)
@@ -39,7 +39,7 @@
This is done by transmitting the dumped database file to the slave
server over an encrypted, secure channel. The dump file must be created
by kdb5_util, and is normally KPROP_DEFAULT_FILE
-(/usr/local/var/krb5kdc/slave_datatrans).
+(@manlocalstatedir@/krb5kdc/slave_datatrans).
.SH OPTIONS
.TP
\fB\-r\fP \fIrealm\fP
@@ -51,7 +51,7 @@
\fB\-f\fP \fIfile\fP
specifies the filename where the dumped principal database file is to be
found; by default the dumped database file is KPROP_DEFAULT_FILE
-(normally /usr/local/var/krb5kdc/slave_datatrans).
+(normally @manlocalstatedir@/krb5kdc/slave_datatrans).
.TP
\fB\-P\fP \fIport\fP
specifies the port to use to contact the
Index: src/slave/kpropd.M
===================================================================
--- src/slave/kpropd.M (revision 22425)
+++ src/slave/kpropd.M (working copy)
@@ -74,7 +74,7 @@
This is done by adding a line to the inetd.conf file which looks like
this:
-kprop stream tcp nowait root /usr/local/sbin/kpropd kpropd
+kprop stream tcp nowait root @mansbindir@/kpropd kpropd
However, kpropd can also run as a standalone deamon, if the
.B \-S
@@ -111,13 +111,13 @@
\fB\-f\fP \fIfile\fP
specifies the filename where the dumped principal database file is to be
stored; by default the dumped database file is KPROPD_DEFAULT_FILE
-(normally /usr/local/var/krb5kdc/from_master).
+(normally @manlocalstatedir@/krb5kdc/from_master).
.TP
.B \-p
allows the user to specify the pathname to the
.IR kdb5_util (8)
program; by default the pathname used is KPROPD_DEFAULT_KDB5_UTIL
-(normally /usr/local/sbin/kdb5_util).
+(normally @mansbindir@/kdb5_util).
.TP
.B \-S
turn on standalone mode. Normally, kpropd is invoked out of
@@ -148,14 +148,14 @@
allows the user to specify the path to the
kpropd.acl
file; by default the path used is KPROPD_ACL_FILE
-(normally /usr/local/var/krb5kdc/kpropd.acl).
+(normally @manlocalstatedir@/krb5kdc/kpropd.acl).
.SH FILES
.TP "\w'kpropd.acl\ \ 'u"
kpropd.acl
Access file for
.BR kpropd ;
the default location is KPROPD_ACL_FILE (normally
-/usr/local/var/krb5kdc/kpropd.acl).
+ at manlocalstatedir@/krb5kdc/kpropd.acl).
Each entry is a line containing the principal of a host from which the
local machine will allow Kerberos database propagation via kprop.
.SH SEE ALSO
Index: src/aclocal.m4
===================================================================
--- src/aclocal.m4 (revision 22425)
+++ src/aclocal.m4 (working copy)
@@ -1784,3 +1784,28 @@
]))
])dnl
dnl
+dnl Preprocess the file in question, and define some substitution variables
+dnl which represent "interesting" directory paths which those pages might
+dnl need to refer to.
+AC_DEFUN(V5_AC_OUTPUT_MANPAGE,[
+mansysconfdir=$sysconfdir
+mansysconfdir=`eval echo $mansysconfdir | sed -e "s,NONE,$prefix,g"`
+mansysconfdir=`eval echo $mansysconfdir | sed -e "s,NONE,$ac_default_prefix,g"`
+mansbindir=$sbindir
+mansbindir=`eval echo $mansbindir | sed -e "s,NONE,$exec_prefix,g"`
+mansbindir=`eval echo $mansbindir | sed -e "s,NONE,$prefix,g"`
+mansbindir=`eval echo $mansbindir | sed -e "s,NONE,$ac_default_prefix,g"`
+manlocalstatedir=$localstatedir
+manlocalstatedir=`eval echo $manlocalstatedir | sed -e "s,NONE,$prefix,g"`
+manlocalstatedir=`eval echo $manlocalstatedir | sed -e "s,NONE,$ac_default_prefix,g"`
+manlibexecdir=$libexecdir
+manlibexecdir=`eval echo $manlibexecdir | sed -e "s,NONE,$exec_prefix,g"`
+manlibexecdir=`eval echo $manlibexecdir | sed -e "s,NONE,$prefix,g"`
+manlibexecdir=`eval echo $manlibexecdir | sed -e "s,NONE,$ac_default_prefix,g"`
+AC_SUBST(mansysconfdir)
+AC_SUBST(mansbindir)
+AC_SUBST(manlocalstatedir)
+AC_SUBST(manlibexecdir)
+AC_CONFIG_FILES($1)
+])dnl
+dnl
More information about the krb5-bugs
mailing list