summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-09-02 17:19:13 +0000
committerobrien <obrien@FreeBSD.org>2001-09-02 17:19:13 +0000
commitac3e3d43d4bfa5d6b9dcc48360ec6bf36b03ed82 (patch)
treef360f5a4cfde557f960abf8a2685577136e077fd
parentaf59541d88274a855749824b48db3943f4e68c34 (diff)
downloadFreeBSD-src-ac3e3d43d4bfa5d6b9dcc48360ec6bf36b03ed82.zip
FreeBSD-src-ac3e3d43d4bfa5d6b9dcc48360ec6bf36b03ed82.tar.gz
Virgin import of AMD (am-utils) v6.0.7
-rw-r--r--contrib/amd/AUTHORS39
-rw-r--r--contrib/amd/BUGS48
-rw-r--r--contrib/amd/COPYING2
-rw-r--r--contrib/amd/ChangeLog3023
-rw-r--r--contrib/amd/INSTALL14
-rw-r--r--contrib/amd/MIRRORS11
-rw-r--r--contrib/amd/NEWS140
-rw-r--r--contrib/amd/README19
-rw-r--r--contrib/amd/README.ldap25
-rw-r--r--contrib/amd/README.y2k2
-rw-r--r--contrib/amd/amd/am_ops.c66
-rw-r--r--contrib/amd/amd/amd.84
-rw-r--r--contrib/amd/amd/amd.c8
-rw-r--r--contrib/amd/amd/amd.h25
-rw-r--r--contrib/amd/amd/amfs_auto.c109
-rw-r--r--contrib/amd/amd/amfs_direct.c4
-rw-r--r--contrib/amd/amd/amfs_error.c6
-rw-r--r--contrib/amd/amd/amfs_host.c15
-rw-r--r--contrib/amd/amd/amfs_inherit.c4
-rw-r--r--contrib/amd/amd/amfs_link.c4
-rw-r--r--contrib/amd/amd/amfs_linkx.c4
-rw-r--r--contrib/amd/amd/amfs_nfsl.c4
-rw-r--r--contrib/amd/amd/amfs_nfsx.c6
-rw-r--r--contrib/amd/amd/amfs_program.c4
-rw-r--r--contrib/amd/amd/amfs_root.c4
-rw-r--r--contrib/amd/amd/amfs_toplvl.c10
-rw-r--r--contrib/amd/amd/amfs_union.c6
-rw-r--r--contrib/amd/amd/amq_subr.c88
-rw-r--r--contrib/amd/amd/amq_svc.c15
-rw-r--r--contrib/amd/amd/autil.c8
-rw-r--r--contrib/amd/amd/clock.c4
-rw-r--r--contrib/amd/amd/conf.c53
-rw-r--r--contrib/amd/amd/conf_parse.y4
-rw-r--r--contrib/amd/amd/conf_tok.l4
-rw-r--r--contrib/amd/amd/get_args.c9
-rw-r--r--contrib/amd/amd/info_file.c8
-rw-r--r--contrib/amd/amd/info_hesiod.c4
-rw-r--r--contrib/amd/amd/info_ldap.c28
-rw-r--r--contrib/amd/amd/info_ndbm.c4
-rw-r--r--contrib/amd/amd/info_nis.c6
-rw-r--r--contrib/amd/amd/info_nisplus.c8
-rw-r--r--contrib/amd/amd/info_passwd.c4
-rw-r--r--contrib/amd/amd/info_union.c4
-rw-r--r--contrib/amd/amd/map.c24
-rw-r--r--contrib/amd/amd/mapc.c42
-rw-r--r--contrib/amd/amd/mntfs.c30
-rw-r--r--contrib/amd/amd/nfs_prot_svc.c34
-rw-r--r--contrib/amd/amd/nfs_start.c4
-rw-r--r--contrib/amd/amd/nfs_subr.c62
-rw-r--r--contrib/amd/amd/ops_TEMPLATE.c12
-rw-r--r--contrib/amd/amd/ops_autofs.c22
-rw-r--r--contrib/amd/amd/ops_cdfs.c4
-rw-r--r--contrib/amd/amd/ops_efs.c4
-rw-r--r--contrib/amd/amd/ops_lofs.c6
-rw-r--r--contrib/amd/amd/ops_mfs.c4
-rw-r--r--contrib/amd/amd/ops_nfs.c12
-rw-r--r--contrib/amd/amd/ops_nfs3.c4
-rw-r--r--contrib/amd/amd/ops_nullfs.c4
-rw-r--r--contrib/amd/amd/ops_pcfs.c4
-rw-r--r--contrib/amd/amd/ops_tfs.c4
-rw-r--r--contrib/amd/amd/ops_tmpfs.c4
-rw-r--r--contrib/amd/amd/ops_ufs.c4
-rw-r--r--contrib/amd/amd/ops_umapfs.c4
-rw-r--r--contrib/amd/amd/ops_unionfs.c4
-rw-r--r--contrib/amd/amd/ops_xfs.c6
-rw-r--r--contrib/amd/amd/opts.c31
-rw-r--r--contrib/amd/amd/restart.c4
-rw-r--r--contrib/amd/amd/rpc_fwd.c6
-rw-r--r--contrib/amd/amd/sched.c6
-rw-r--r--contrib/amd/amd/srvr_amfs_auto.c9
-rw-r--r--contrib/amd/amd/srvr_nfs.c41
-rw-r--r--contrib/amd/amq/amq.836
-rw-r--r--contrib/amd/amq/amq.c395
-rw-r--r--contrib/amd/amq/amq.h4
-rw-r--r--contrib/amd/amq/amq_clnt.c4
-rw-r--r--contrib/amd/amq/amq_xdr.c4
-rw-r--r--contrib/amd/amq/pawd.14
-rw-r--r--contrib/amd/amq/pawd.c4
-rw-r--r--contrib/amd/aux_conf.h.in56
-rw-r--r--contrib/amd/conf/checkmount/checkmount_bsd44.c4
-rw-r--r--contrib/amd/conf/mtab/mtab_bsd.c4
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_darwin.h259
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h4
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h4
-rw-r--r--contrib/amd/conf/transp/transp_sockets.c16
-rw-r--r--contrib/amd/conf/umount/umount_bsd44.c4
-rw-r--r--contrib/amd/doc/am-utils.texi361
-rw-r--r--contrib/amd/doc/stamp-vti6
-rw-r--r--contrib/amd/doc/texinfo.tex2383
-rw-r--r--contrib/amd/doc/version.texi6
-rw-r--r--contrib/amd/fixmount/fixmount.86
-rw-r--r--contrib/amd/fixmount/fixmount.c4
-rw-r--r--contrib/amd/fsinfo/fsi_analyze.c4
-rw-r--r--contrib/amd/fsinfo/fsi_data.h4
-rw-r--r--contrib/amd/fsinfo/fsi_dict.c4
-rw-r--r--contrib/amd/fsinfo/fsi_gram.y4
-rw-r--r--contrib/amd/fsinfo/fsi_lex.l6
-rw-r--r--contrib/amd/fsinfo/fsi_util.c14
-rw-r--r--contrib/amd/fsinfo/fsinfo.84
-rw-r--r--contrib/amd/fsinfo/fsinfo.c7
-rw-r--r--contrib/amd/fsinfo/fsinfo.h22
-rw-r--r--contrib/amd/fsinfo/wr_atab.c4
-rw-r--r--contrib/amd/fsinfo/wr_bparam.c4
-rw-r--r--contrib/amd/fsinfo/wr_dumpset.c4
-rw-r--r--contrib/amd/fsinfo/wr_exportfs.c4
-rw-r--r--contrib/amd/fsinfo/wr_fstab.c4
-rw-r--r--contrib/amd/hlfsd/hlfsd.84
-rw-r--r--contrib/amd/hlfsd/hlfsd.c12
-rw-r--r--contrib/amd/hlfsd/hlfsd.h21
-rw-r--r--contrib/amd/hlfsd/homedir.c4
-rw-r--r--contrib/amd/hlfsd/nfs_prot_svc.c34
-rw-r--r--contrib/amd/hlfsd/stubs.c57
-rw-r--r--contrib/amd/include/am_compat.h15
-rw-r--r--contrib/amd/include/am_defs.h74
-rw-r--r--contrib/amd/include/am_utils.h101
-rw-r--r--contrib/amd/include/am_xdr_func.h6
-rw-r--r--contrib/amd/include/amq_defs.h4
-rw-r--r--contrib/amd/include/mount_headers1.h167
-rw-r--r--contrib/amd/include/mount_headers2.h29
-rw-r--r--contrib/amd/ldap-id.ms306
-rw-r--r--contrib/amd/ldap-id.txt360
-rw-r--r--contrib/amd/libamu/amu.h4
-rw-r--r--contrib/amd/libamu/hasmntopt.c4
-rw-r--r--contrib/amd/libamu/misc_rpc.c40
-rw-r--r--contrib/amd/libamu/mount_fs.c40
-rw-r--r--contrib/amd/libamu/mtab.c72
-rw-r--r--contrib/amd/libamu/nfs_prot_xdr.c4
-rw-r--r--contrib/amd/libamu/util.c4
-rw-r--r--contrib/amd/libamu/wire.c29
-rw-r--r--contrib/amd/libamu/xdr_func.c115
-rw-r--r--contrib/amd/libamu/xutil.c103
-rw-r--r--contrib/amd/mk-amd-map/mk-amd-map.84
-rw-r--r--contrib/amd/mk-amd-map/mk-amd-map.c4
-rw-r--r--contrib/amd/scripts/am-eject.in9
-rw-r--r--contrib/amd/scripts/amd.conf-sample19
-rw-r--r--contrib/amd/scripts/amd.conf.540
-rw-r--r--contrib/amd/scripts/automount2amd.84
-rwxr-xr-xcontrib/amd/scripts/ctl-amd.in38
-rwxr-xr-xcontrib/amd/scripts/ctl-hlfsd.in3
-rw-r--r--contrib/amd/scripts/expn.12
-rwxr-xr-xcontrib/amd/scripts/expn.in4
-rw-r--r--contrib/amd/tasks16
-rw-r--r--contrib/amd/wire-test/wire-test.86
-rw-r--r--contrib/amd/wire-test/wire-test.c4
144 files changed, 5802 insertions, 3869 deletions
diff --git a/contrib/amd/AUTHORS b/contrib/amd/AUTHORS
index 2618766..5a6aa1d 100644
--- a/contrib/amd/AUTHORS
+++ b/contrib/amd/AUTHORS
@@ -1,6 +1,5 @@
# -*- text -*-
PRIMARY AUTHORS AND MAJOR CONTRIBUTORS TO AM_UTILS:
-
Original authors of amd were the Berkeley team and especially Jan-Simon
Pendry. Since then many people have contributed patches.
@@ -85,6 +84,8 @@ syslog and/or syslog facilities.
January 29, 1998: fix for 0.0.0.0 loopback on SunOS 3.X which defines
IFF_ROUTE instead of IFF_LOOPBACK.
+May 30, 2000: correct logging types for addopts/mergeopts messages.
+
* Daniel S. Riley <dsr@mail.lns.cornell.edu>
July 11, 1997: fixes to DU-4.0 to support string POSIX.1 signals, and struct
@@ -125,6 +126,12 @@ systems. More misc fixes.
February 3, 1998: don't start autofs listener unless autofs maps were in
use.
+December 10, 1999: assorted fixed and lots of fixes to support in-kernel
+mount tables in Solaris 8.
+
+February 9, 2000: new debug options hrtime (hi-res timer) and xdrtrace. bug
+fixes.
+
* Jason Thorpe <thorpej@nas.nasa.gov>
August 25, 1997: make amd work when talking to NIS+ servers in NIS
@@ -274,3 +281,33 @@ September 5, 1999: pawd works for type:=nfsl.
* Nick Williams <njw@ms.com>
September 1, 1999: bug fix for incorrect symlinks when two locations are
requested simultaneously.
+
+November 1, 1999: fixes to sync maps even if they are set to mapcache:=sync.
+
+January 19, 2000: fix (and reduce the incidence of) stale file handles when
+doing rapid mounts and umounts in succession.
+
+June 5, 2000: better handling of potential race-conditions during rapid
+u/mounts. Correctly update d_drops stats for amq -s.
+
+* Johann Pfefferl <johann.pfefferl.jp@germany.agfa.com>
+November 16, 1999: fix to ldap code so repeated calls to string2he don't
+corrupt the string passed.
+
+* Amitha Perera <perera@cs.rpi.edu>
+December 9, 1999: detect all wire() interfaces correctly.
+
+* Steven Danz <sdanz@awc.kc.noaa.gov>
+January 25, 2000: allow browsable auto maps.
+
+* Wolfram Klaus <klaus@physik.fu-berlin.de>.
+November 21, 2000: recognize proplist mnttab flag.
+
+* Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+November 21, 2000: lots of NetBSD fixes (many of which are generic).
+
+* Olaf Kirch <okir@caldera.de>
+February 1, 2001: important Linux NFS error number mapping fixed
+
+* Ahmon Dancy <dancy@franz.com>
+February 9, 2001: Apple Rhapsody/Darwin/OS X port
diff --git a/contrib/amd/BUGS b/contrib/amd/BUGS
index 3bd0f16..a9f1906 100644
--- a/contrib/amd/BUGS
+++ b/contrib/amd/BUGS
@@ -117,12 +117,46 @@ time. (Please let amd-dev know if you know of a fix.)
(7) *-aix4.3.2.0
-The plock() function appears to fail with ENOMEM (Not Enough Space). When
-it fails, it consumes a lot of memory. This appears to be an AIX bug. I
-think plock returns an error code, but it partially succeeds to lock some
-pages, thus increasing memory consumption. When partial failures occur, it
-is possible that AIX fails to unlock those pages it did lock. Solution:
-turn off usage of plock on AIX. Put plock=no in your amd.conf file (which
-is the default if you do nothing).
+The plock() function will pre-reserve all of the memory up to the maximum
+listed in the ulimit. If the ulimit is infinite, plock() will try to take
+all of the system's memory, and fail with ENOMEM (Not Enough Space).
+Normally ulimit may be set to a few gigs of max memory usage, but even that
+is too much; Amd doesn't need more than a few megs of resident memory size
+(depending on the particular usage, number of maps, etc.) Solution: lower
+your ulimit before starting amd. This can be done inside the ctl-amd
+script, but be careful not to limit it too low. Alternatively, don't use
+plock on aix-4.3: set it to plock=no in amd.conf (which is the default if
+you do nothing).
+
+
+(8) *-linux-gnu (systems using glibc 2.1, such as RedHat-6.1)
+
+There's a UDP file descriptor leak in the nis routines in glibc, especially
+those that do yp_bind. Until this is bug fixed, do not set nis_domain in
+amd.conf, but let the system pick up the default domain name as set by your
+system. That would avoid using the buggy yp_bind routines in libc.
+
+
+(9) *-linux-gnu (SuSE systems using unfsd)
+
+The user-level nfsd (2.2beta44) on SuSE Linux systems (and possibly others)
+dies with a SEGV when amd tries to contact it for access to a volume that
+does not exist, or one for which there is no permission to mount.
+
+
+(10) *-*-hpux11
+
+If you're using NFSv3, you must install HP patches PHNE_20344 and
+PHNE_20371. If you don't, and you try to use amd with NFSv3 over TCP, your
+kernel will panic.
+
+(11) *-linux* (any system using a 2.2.18+ kernel)
+
+The Linux kernels don't support Amd's direct mounts very well, leading to
+erratic behavior: shares that don't get remounted after the first timeout,
+inability to restart Amd because its mount points cannot be unmounted,
+etc. There are some kernel patches on the am-utils Web site, which solve
+these problems.
+
Erez.
diff --git a/contrib/amd/COPYING b/contrib/amd/COPYING
index 040bc51..3f8436a 100644
--- a/contrib/amd/COPYING
+++ b/contrib/amd/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 1997-1999 Erez Zadok
+Copyright (c) 1997-2001 Erez Zadok
Copyright (c) 1989 Jan-Simon Pendry
Copyright (c) 1989 Imperial College of Science, Technology & Medicine
Copyright (c) 1989 The Regents of the University of California.
diff --git a/contrib/amd/ChangeLog b/contrib/amd/ChangeLog
index ca984a2..66ec451 100644
--- a/contrib/amd/ChangeLog
+++ b/contrib/amd/ChangeLog
@@ -1,3 +1,1203 @@
+2001-06-27 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Released am-utils-6.0.7 ***
+ *******************************************************************
+
+2001-06-25 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * config.guess, config.sub, doc/texinfo.tex: updates from the
+ latest GNU distributions.
+
+ * INSTALL, doc/am-utils.texi (Supported Platforms): update info on
+ freebsd5.0
+
+ * LSM.am-utils, NEWS, README.y2k, ChangeLog: make sure all
+ am-utils URL references use www.am-utils.org, not the columbia
+ URL.
+
+2001-05-24 Erez Zadok <ezk@fsl-gw.fsl.cs.sunysb.edu>
+
+ * conf/transp/transp_sockets.c (create_nfs_service): cast to u_long
+ to ensure clean compile on freebsd5 and bsdi2.
+
+2001-05-19 Erez Zadok <ezk@kosh.dyn.optonline.net>
+
+ * conf/mount/mount_linux.c: typo: added comma after '0' element.
+
+2001-05-19 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * conf/mount/mount_linux.c (linux_nfs_error): don't special case
+ the 0 result, just put it into the translation list
+
+2001-05-19 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * conf/mount/mount_linux.c (linux_nfs_error): don't report success
+ (0) as error (NE_IO)!
+
+2001-05-18 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * amd/amfs_host.c (amfs_host_mount): don't fail the mount if at
+ least one share is already mounted
+
+2001-05-02 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Released am-utils-6.0.6 ***
+ *******************************************************************
+
+2001-05-01 Ion Badulescu <ionut@gonzales.dev.hydraweb.com>
+
+ * conf/mount/mount_linux.c: fixed stupid error in the linux
+ nfs_errormap[], which was mapping ENOENT to success!!!
+
+2001-04-28 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * BUGS: added info about the direct mount problems on Linux and
+ about the kernel patches on www.am-utils.org.
+
+ * amd/autil.c (forcibly_timeout_mp): always log a message when the
+ forced unmount request is ignored
+
+2001-04-23 Ion Badulescu <ionut@buggy.dev.hydraweb.com>
+
+ * amd/ops_autofs.c (autofs_lookuppn): renamed
+ CFM_ENABLE_DEFAULT_SELECTORS to CFM_SELECTORS_IN_DEFAULTS
+ (leftover from 03/29/01)
+
+2001-04-14 Erez Zadok <ezk@whitestar.dyn.optonline.net>
+
+ * COPYING: update copyright year
+
+ * amd/amfs_auto.c, amd/amfs_host.c, amd/amfs_nfsx.c,
+ amd/amfs_toplvl.c, amd/amfs_union.c, amd/conf.c, amd/info_nis.c,
+ amd/info_nisplus.c, amd/mapc.c, amd/nfs_subr.c, amd/ops_nfs.c,
+ amd/rpc_fwd.c, amd/srvr_amfs_auto.c, amd/srvr_nfs.c,
+ conf/autofs/autofs_solaris_v1.c, conf/mtab/mtab_file.c,
+ conf/mtab/mtab_isc3.c, conf/mtab/mtab_svr4.c,
+ conf/transp/transp_sockets.c, conf/transp/transp_tli.c,
+ libamu/mount_fs.c, libamu/mtab.c: rewritten various dlog/plog
+ messages for clarity, to avoid duplication, to better recognize
+ what the message means and where it ran, and to fix typos.
+
+ * amd/nfs_subr.c (nfsproc_lookup_2_svc): moved trace message of
+ function's name to the beginning of the function, before any other
+ messages are logged.
+
+2001-04-05 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * include/am_defs.h: define NFSCLIENT, NFS, PCFS, LOFS, RFS,
+ MSDOSFS, MFS and CD9660 to 1, so that both #if FOO and #ifdef FOO
+ work (needed for MacOS X); removed duplicate definition of NFS.
+
+2001-04-05 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.6s2
+
+2001-03-29 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * amd/amd.h, amd/amfs_auto.c, amd/conf.c,
+ doc/am-utils.texi,
+ scripts/amd.conf-sample, scripts/amd.conf.5:
+ renamed selectors_on_default to selectors_in_defaults,
+ kept the former as a deprecated option;
+ renamed CFM_ENABLE_DEFAULT_SELECTORS to CFM_SELECTORS_IN_DEFAULTS;
+ renamed gopt_selectors_on_default() to gopt_selectors_in_defaults()
+
+2001-03-15 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * conf/mount/mount_linux.c (parse_opts): added support for lofs
+ (mount_linux): support lofs through bind mounts and/or FiST lofs
+
+ * scripts/ctl-hlfsd.in: search for /var/spool/mail in addition to
+ /var/mail and /usr/spool/mail
+
+ * conf/nfs_prot/nfs_prot_linux.h (MS_BIND): add define for it, if
+ kernel is newer than 2.4.0
+ (MNTTYPE_LOFS): ditto
+
+ * acconfig.h: added MNT2_GEN_OPT_BIND
+
+ * configure.in: bumped up library patchlevel; added detection for
+ the MS_BIND generic mount option
+
+2001-02-28 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * aux/macros/check_mount_trap.m4,
+ aux/macros/check_nfs_fh_dref.m4,
+ aux/macros/check_nfs_prot_headers.m4,
+ aux/macros/type_recvfrom_fromlen.m4,
+ aux/macros/type_yp_order_outorder.m4:
+ Fixed newer freebsd's fh type, expanded more aix3, osf2, hpux9 to
+ aix[1-3], osf[1-3] and hpux[6-9].
+
+2001-02-28 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * check_mount_style.m4, check_mount_trap.m4,
+ check_network_transport_type.m4, check_nfs_fh_dref.m4,
+ check_nfs_prot_headers.m4, check_nfs_sa_dref.m4,
+ check_nfs_socket_connection.m4, os_cflags.m4,
+ type_yp_order_outorder.m4: small fixes to Ion's cleanup, and more
+ cleanup (use [[0-1]] instead of M4 changequote commands).
+
+ * Makefile.am: removed unused conf/trap/trap_hpux11.h
+
+2001-02-27 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * aux/macros/check_network_transport_type.m4,
+ aux/macros/check_mount_style.m4,
+ aux/macros/check_mount_trap.m4,
+ aux/macros/check_network_transport_type.m4,
+ aux/macros/check_nfs_fh_dref.m4,
+ aux/macros/check_nfs_prot_headers.m4,
+ aux/macros/check_nfs_sa_dref.m4,
+ aux/macros/check_nfs_socket_connection.m4,
+ aux/macros/os_cflags.m4,
+ aux/macros/type_auth_create_gidlist.m4,
+ aux/macros/type_recvfrom_fromlen.m4,
+ aux/macros/type_yp_order_outorder.m4:
+ Reworked the scripts, so that a new _unknown_ version of a known OS
+ will use the option for the newest _known_ version of that OS. For
+ example, when freebsd6 comes out, it will use the stuff for
+ freebsd5, not the stuff for freebsd2. This makes configure more
+ likely to succeed on new systems/versions.
+
+2001-02-23 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * Makefile.am (EXTRA_DIST_CONF): include nfs_prot_darwin.h in
+ distributions.
+
+2001-02-21 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * libamu/mtab.c: added the functions hasmnteq and haseq to
+ ease checks for non-numeric values in opt=value strings.
+ Recoded hasmntval to qualify input as numeric, allow hex and
+ octal strings on rhs of =, and log when the value is missing
+ or invalid.
+
+ * conf/mount/mount_linux.c: revised mount_linux to use new
+ hasmnteq function to extract type of non-nfs mounts, and added
+ a log message to catch possible failure of strdup.
+
+ * amd/am_ops.c: revised merge_ops to use new haseq function
+
+ * amd/srvr_nfs.c: revised find_nfs_srvr to use hasmnteq to
+ discover protocol setting.
+
+ * include/am_utils.h: added function prototypes for hasmnteq
+ and haseq
+
+2001-02-19 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * include/mount_headers2.h (_LINUX_NFS3_H): define it, to avoid
+ pulling in unwanted declarations from 2.2.19pre and 2.4.1ac
+
+ * include/am_defs.h (_LINUX_NFS3_H): ditto
+
+ * conf/nfs_prot/nfs_prot_linux.h: whitespace, comments
+
+2001-02-19 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/macros/check_fs_mntent.m4 (ac_safe): remove debugging "echo"
+ command.
+
+2001-02-18 Erez Zadok <ezk@earth.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.6s1
+
+ * aux/macros/mount_headers.m4, include/mount_headers[12].h: split
+ mount_headers.h in two because one relative header (nfs_prot.h)
+ file cannot be included inside another from the start directory of
+ the first (it's relative to the directory of the first).
+
+2001-02-09 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * AUTHORS: added Ahmon Dancy <dancy@franz.com>
+
+ * (all): added Darwin/Rhapsody/Apple OS X support from Ahmon Dancy
+
+ * aux/macros/mount_headers.m4: moved all the C code into a
+ separate file, include/mount_headers.h; the effect is that
+ configure goes down in size by a factor of 2.5!
+
+ * include/mount_headers.h: new file, with C code from
+ aux/macros/mount_headers.m4
+
+2001-02-01 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * conf/mount/mount_linux.c: made linux_nfs_error() more robust.
+
+2001-02-02 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Released am-utils-6.0.5 ***
+ *******************************************************************
+
+2001-02-01 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * conf/nfs_prot/nfs_prot_linux.h (nfs_error): moved the definition
+ of nfs_error here, from mount_linux.c, so that it can actually be
+ used.
+
+ * conf/mount/mount_linux.c: added unused errno 41 to the
+ nfs_errormap array, lest the following errno's get shifted up by
+ one!
+
+2001-01-12 Ion Badulescu <ionut@buggy.dev.hydraweb.com>
+
+ * include/am_defs.h: don't allow linux/fs.h to be sucked in via
+ linux/auto_fs.h, it breaks the compile on glibc platforms.
+
+Sat Jan 13 00:04:38 2001 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * amd/amd.h (autofs_lookuppn): Fixup whitespace.
+ * amd/amfs_auto.c (amfs_auto_bgmount): Likewise.
+ * amd/amfs_error.c: (amfs_error_match): Likewise.
+ * amd/amfs_host.c (fetch_fhandle): Fixup whitespace. Remove
+ unnecessary temporary variable.
+ * amd/info_file.c (read_line): Likewise.
+ (search_or_reload_file): Likewise.
+ * amd/info_ldap.c (get_ldap_timestamp): Likewise.
+ * amd/nfs_prot_svc.c: Likewise.
+ * amd/ops_TEMPLATE.c (foofs_match, foofs_lookuppn,
+ foofs_readlink, foofs_ffserver): Likewise.
+ * amd/ops_autofs.c (autofs_bgmount): Likewise.
+ * amd/ops_lofs.c (lofs_match): Likewise.
+ * amd/ops_nfs.c (got_nfs_fh): Fixup whitespace.
+ * amd/ops_xfs.c (xfs_match): Likewise.
+ * amd/srvr_amfs_auto.c (srvrlog): Line break.
+ * amd/srvr_nfs.c (got_portmap, call_portmap, nfs_pinged,
+ nfs_srvr_port): Fixup whitespace.
+ * conf/nfs_prot/nfs_prot_bsdi2.h: Likewise.
+ * conf/nfs_prot/nfs_prot_hpux.h: Likewise.
+ * conf/nfs_prot/nfs_prot_hpux11.h: Likewise.
+ * conf/nfs_prot/nfs_prot_irix5.h: Likewise.
+ * conf/nfs_prot/nfs_prot_irix6.h: Likewise.
+ * conf/nfs_prot/nfs_prot_nextstep.h: Likewise.
+ * conf/nfs_prot/nfs_prot_osf2.h: Likewise.
+ * conf/nfs_prot/nfs_prot_osf4.h: Likewise.
+ * conf/nfs_prot/nfs_prot_osf5_1.h: Likewise.
+ * conf/nfs_prot/nfs_prot_sunos3.h: Likewise.
+ * conf/nfs_prot/nfs_prot_sunos4.h: Likewise.
+ * conf/nfs_prot/nfs_prot_ultrix.h: Likewise.
+ * conf/transp/transp_tli.c (get_mount_client): Likewise.
+ * hlfsd/nfs_prot_svc.c: Likewise.
+ * include/am_defs.h (sys_errlist): Likewise.
+ * include/am_utils.h (am_get_progname, am_get_hostname,
+ amq_program_1): Likewise.
+ (nfsxprt): Moved declaration.
+
+Fri Jan 12 23:46:31 2001 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * hlfsd/hlfsd.h (HLFSD_VERSION): Bump copyright year to 2001.
+
+Fri Jan 12 23:31:45 2001 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ Removed support for amq -M.
+
+ * acconfig.h (ENABLE_AMQ_MOUNT): Removed.
+ * aux/macros/opt_amq_mount.m4: Removed.
+ * Makefile.am (EXTRA_DIST_AUX): Don't distribute
+ opt_amq_mount.m4.
+ * configure.in (AC_OPT_AMQ_MOUNT): Removed invocation.
+
+ * amd/amq_subr.c (ok_security, amqproc_mount_1_svc): Removed.
+ * amd/amq_svc.c (amq_program_1): Removed amq -M support.
+ * amq/amq.c (mount_map): Removed.
+ (main): Removed -M option handling.
+ Removed transport-type specific CLIENT creation.
+ (get_secure_amd_client, amq_bind_resv_port, privsock): Removed.
+
+ * amq/amq.8: Removed -M documentation.
+ * doc/am-utils.texi (Top-level Filesystem): Removed amq -M
+ reference, but retain comment on mount -t amd.
+ (Controlling Amd): Likewise.
+
+ * tasks: Removed this task.
+
+2001-01-12 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * Makefile.am (EXTRA_DIST): distribute new LDAP files.
+
+ * README.ldap, ldap-id.txt, ldap-id.ms: LDAP status information,
+ proposed Schema, and internet draft.
+
+Fri Jan 12 22:27:07 2001 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * Support Tru64 UNIX V5.1:
+
+ * conf/nfs_prot/nfs_prot_osf5_1.h: New file.
+
+ * Makefile.am (EXTRA_DIST_CONF): Distribute it.
+
+ * aux/macros/check_nfs_prot_headers.m4: Tru64 UNIX V5.1 has
+ AutoFS, need to disable it until a port exists.
+
+ * INSTALL, doc/am-utils.texi (Supported Platforms): Mention new
+ minor port.
+
+2001-01-09 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * ALL: bump copyright year to 2001.
+
+2001-01-05 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * acconfig.h: correct comments for NODEV/NONDEV mount options
+
+Fri Jan 5 05:12:02 2001 Erez Zadok <ezk@subzero.cs.columbia.edu>
+
+ * libamu/xdr_func.c: removed ugly casts to "groups*", now that
+ irix6's nfs_prot.h is fixed.
+
+ * conf/nfs_prot/nfs_prot_irix6.h: copied relevant parts of
+ <rpcsvc/mount.h> here so we don't have to include this header.
+
+2001-01-04 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * conf/nfs_prot/nfs_prot_irix6.h: redefine "groups" typedef to
+ struct groups, not the pointer to this struct.
+
+ * include/am_xdr_func.h: prototype should take "groups *" as 2nd
+ arg.
+
+ * libamu/xdr_func.c (xdr_groupnode, xdr_exportnode): change
+ casting of second arg of xdr_groups to "groups *". It's only
+ needed for irix6, due to problems with xdr_groups on that platform.
+ (xdr_groups): prototype should take "groups *" as 2nd arg.
+
+ * conf/nfs_prot/nfs_prot_aix*.h: correct xdr_groups extern
+ definition. Report from Ahmon Dancy <dancy@franz.com>.
+
+2000-12-14 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.5s4
+
+ * minor port i386-unknown-freebsd4.2 (documented)
+
+2000-12-07 Ion Badulescu <lionut@gonzales.dev.hydraweb.com>
+
+ * configure.in (LIBTOOL_LDFLAGS): fix libtool version
+
+2000-12-02 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * doc/am-utils.texi (opts Option): document lock/nolock
+
+ * libamu/mount_fs.c (mnt_flags): allow the use of the "nolock"
+ option
+
+ * include/am_defs.h: don't include <linux/fs.h> on a glibc2 system
+
+ * include/am_compat.h: define the "nolock" mnttab option if the
+ NONLM NFS mount option is defined
+
+ * acconfig.h: added MNT2_NFS_OPT_NONLM
+
+ * configure.in: added detection of the NONLM Linux NFS mount
+ option; added a clarification for the library versioning rules and
+ increased the patchlevel
+
+2000-11-27 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * libamu/wire.c (getwire_lookup): truncate the hostname to
+ MAXHOSTNAMELEN characters.
+
+2000-11-26 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * include/am_utils.h (MAXHOSTNAMELEN): if not defined, set this to
+ 256 bytes, not 64. Suggestion form Kris Kennaway
+ <kris@FreeBSD.org>.
+
+2000-11-26 Erez Zadok <ezk@dmath5.geometrie.tuwien.ac.at>
+
+ * configure.in (AC_CHECK_MNT2_NFS_OPTS): check for NFS mount
+ options kerb, rdirplus, readdirsize, and xlatecookie
+ (NetBSD-1.5K).
+
+ * acconfig.h: recognize NFS mount options rdirplus, readdirsize,
+ and xlatecookie (NetBSD-1.5K)
+
+2000-11-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/srvr_nfs.c: comment on NFS proto search order.
+
+ * libamu/xutil.c (real_plog): don't try to write the last byte of
+ the fmt buf. Security suggestion from NetBSD: Thomas Klausner
+ <wiz@danbala.ifoer.tuwien.ac.at>
+
+2000-11-22 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * amd/amfs_auto.c (amfs_auto_bgmount),
+ amd/ops_autofs.c (autofs_bgmount): removed the initialization of
+ fattr.na_fileid, it is now done in map.c when the map is initialized
+
+ * amd/map.c (init_map): initialize fattr.na_fileid to am_gen, not
+ to 0, to avoid cache aliasing problems on Linux (and to follow the
+ NFS spec!)
+
+2000-11-22 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ * libamu/mount_fs.c (mount_fs): avoid using extra limited-size buf
+ (security)
+
+ * libamu/xutil.c, fsinfo/fsinfo.h, include/am_utils.h: use
+ __attribute__, __format__, and __printf__ for GCC string auditing.
+
+ * wire-test/wire-test.8: this is not a section 8L man page.
+
+ * libamu/xutil.c (expand_error): don't use sys_nerr on systems
+ that support strerror().
+ (dplog): fmt is const
+ (plog): fmt is const
+ (real_plog): fmt is const. use new expand_error function with its
+ new return value. be more careful about running off the end of
+ char[] fixed size buffers.
+
+ * libamu/wire.c (getwire): fix alignment error on alpha using an
+ extra automatic storage variable ifrpool.
+
+ * hlfsd/hlfsd.c (fatal): use proper printf style to plog.
+
+ * fsinfo/fsinfo.c (find_username): getlogin() returns a const.
+
+ * fsinfo/fsi_util.c (error, lerror, lwarning, fatal, log): use
+ vfprintf.
+
+ * fsinfo/fsi_lex.l (yyerror): use vfprintf.
+
+ * fixmount/fixmount.8: this is not a section 8L man page.
+
+ * doc/am-utils.texi (Hesiod maps): fixed typo.
+
+ * amd/sched.c (do_task_notify): typo in comment.
+
+ * amd/opts.c (expand_op): expand_error[] is a const char *.
+
+ * amd/amd.c (main): use proper printf style to plog.
+
+2000-11-22 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * libamu/mount_fs.c (mnt_flags, compute_nfs_args): recognize
+ proplist mnttab flag. Bug fix from Wolfram Klaus
+ <klaus@physik.fu-berlin.de>.
+
+2000-11-19 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.5s3
+
+ * updated config.guess, config.sub, and doc/texinfo.tex from
+ mirrors
+
+ * Makefile.am (update): proper updating of config.* and texinfo
+ from mirrors.
+
+ * aux/macros/check_nfs_prot_headers.m4: newer netbsd systems
+ reports their system name as "netbsdelf" in config.guess.
+
+2000-11-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.5s2
+
+2000-11-13 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (opts Option): document new mount option
+ "proplist"
+
+ * include/am_compat.h: define amd mount option "proplist" if the
+ system doesn't recognize it, but the NFS bit flag exists.
+
+ * configure.in, acconfig.h: recognize/support "proplist" NFS mount
+ option in Amd, useful under DU-4.0 to process ACLs over NFS
+ mounts.
+
+2000-11-10 Ion Badulescu <ib42@earth.cs.columbia.edu>
+
+ * conf/mount/mount_linux.c (mount_linux): removed unnecessary
+ rsize/wsize defaults -- performance killers on 2.2.18+ and 2.4.0+
+
+2000-11-01 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * MIRRORS (Note): added a mirror at ufl.edu
+
+2000-10-16 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * scripts/am-eject.in: accept "cdrom" and "floppy" as arguments.
+
+2000-10-11 Erez Zadok <ezk@lorien.dev.hydraweb.com>
+
+ * amq/amq.8: synchronize Amq's options with reality
+
+ * amq/amq.c (main): synchronize Amq's usage() string with reality
+
+2000-10-10 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * scripts/ctl-amd.in: add targets condrestart (redhat) and
+ reload.
+
+2000-10-04 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * scripts/lostaltmail.in (vrfy_user): ensure that MAILDIR is
+ defined.
+
+2000-10-02 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * aux/macros/mount_headers.m4: only include <linux/fs.h>
+ on a non-glibc2 system
+
+ * aux/macros/try_compile_anyfs.m4: ditto
+
+ * aux/macros/check_mount_type.m4: linux 2.4 stores loadable modules
+ in a different directory structure
+
+ * aux/macros/check_mnttab_type.m4: ditto
+
+ * aux/macros/check_fs_mntent.m4: ditto; also, replace the nfs3
+ linux hack with a hopefully more stable hack
+
+2000-09-18 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/opts.c (backslash): Bell char (ASCII 007) should be \g, not
+ \a.
+
+2000-09-17 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * include/am_utils.h: removed unused field opt_autopref
+
+ * amd/opts.c: removed unused variable $autopref
+
+2000-09-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.5s1
+
+2000-09-11 Ion Badulescu <ionut@moisil.dev.hydraweb.com>
+
+ * aux/macros/check_fs_mntent.m4 (_LINUX_NFS_XDR_H): define it so
+ linux/nfs_xdr.h doesn't get included (not intended for user space)
+
+2000-09-05 Erez Zadok <ezk@aladdin.dev.hydraweb.com>
+
+ * conf/mtab/mtab_svr4.c (lockfile): function not needed unless
+ MOUNT_TABLE_ON_FILE is defined.
+ mtlckname static var is onlyneeded if MOUNT_TABLE_ON_FILE.
+ (update_mnttab_fields): only needed if MOUNT_TABLE_ON_FILE.
+
+2000-09-03 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * buildall (Usage): typo in usage string
+
+2000-08-25 Erez Zadok <ezk@lynn.soscorp.com>
+
+ * conf/mount/mount_linux.c (mount_linux): MNT2_NFS_OPT_VER3 may
+ is no defined on older Linux systems (kernel 2.0.36)
+
+2000-08-19 Erez Zadok <ezk@earth.cs.columbia.edu>
+
+ * scripts/amd.conf.5: correct swapped descriptions for ldap_base
+ and ldap_hostports.
+
+ * doc/am-utils.texi: correct swapped descriptions for ldap_base
+ and ldap_hostports.
+
+ * scripts/amd.conf-sample: swap examples for ldap_base and
+ ldap_hostports.
+
+2000-08-13 Erez Zadok <ezk@earth.cs.columbia.edu>
+
+ * scripts/amd.conf-sample: -O is CLI equivalent to "os"
+ amd.conf parameter
+
+2000-07-30 Erez Zadok <ezk@earth.cs.columbia.edu>
+
+ * scripts/amd.conf-sample (nfs_retransmit_counter): correct
+ meaning and use of parameter
+
+2000-07-23 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi: updated URLs to www.am-utils.org.
+
+2000-07-08 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Released am-utils-6.0.4 ***
+ *******************************************************************
+
+2000-07-08 Erez Zadok <ezk@earth.cs.columbia.edu>
+
+ * configure.in: update shared library information
+
+2000-07-04 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * INSTALL: document osf4.0f
+
+ * doc/am-utils.texi (Supported Platforms): document osf4.0f
+
+2000-06-19 Erez Zadok <ezk@vir.cs.columbia.edu>
+
+ * doc/am-utils.texi (dollar Selector Variable): document
+ ${dollar}.
+
+ * amd/opts.c: special new variable ${dollar} which expands into a
+ literal '$' sign. Otherwise there is no way to include a literal
+ dollar symbol in an amd map.
+
+2000-06-11 Erez Zadok <ezk@earth.cs.columbia.edu>
+
+ * amd/opts.c: correct comment name at top of opt_fields.
+
+2000-06-11 Ion Badulescu <ionut@moisil.cs.columbia.edu>
+
+ * config.guess.long: munge config.guess' output so that intel
+ linux appears as i386-pc-linux
+
+Fri Jun 9 16:06:56 2000 Erez Zadok <ezk@defiant.dev.hydraweb.com>
+
+ * conf/nfs_prot/nfs_prot_bsdi2.h: getifaddrs() on bsdi2 is broken.
+ Don't use it.
+
+2000-06-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * amd/mapc.c (maptypes): Change default allocation mode to
+ MAPC_INC where reload support is missing to avoid warning in
+ mapc_create().
+
+2000-06-09 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * conf/nfs_prot/nfs_prot_sunos5_5.h: turn off autofs support for
+ solaris 2.5 until a full port can be done.
+
+2000-06-07 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.4s5
+
+ * Makefile.am, aux/GNUmakefile: fix maintainer rules to update
+ config.* and texinfo.tex files.
+
+ * amd/nfs_subr.c (nfsproc_getattr_2_svc): Don't conditionalize the
+ mtime update of the symlinks on the SYMTTL option, but rather
+ delay unmount of what was looked up using am_timeo_w. Patch from
+ Nick Williams <Nick.Williams@msdw.com>. As Nick says "Basically:
+ during unmount, increment the parent dir's mtime (fixes people
+ doing amq -u). During stat, increase the TTL (to fix bad-luck
+ timeouts), but leave the mtime alone."
+
+ (nfsproc_lookup_2_svc, nfsproc_readlink_2_svc, unlink_or_rmdir,
+ nfsproc_readdir_2_svc): correctly update d_drops stats for amq -s.
+ Patch from Nick Williams <Nick.Williams@msdw.com>.
+
+ * amd/map.c (unmount_mp): update mtime of amd symlink to further
+ reduce the chances of race conditions between unmounting and
+ looking up an entry again. Patch from Nick Williams
+ <Nick.Williams@msdw.com>.
+
+ * README: updated instructions
+
+ * bootstrap: remove log file before existing
+
+2000-06-06 Erez Zadok <ezk@aladdin.dev.hydraweb.com>
+
+ * configure.in: no longer using aux/ subdir. don't force autoconf
+ 2.14. comment out (but leave explanation) everything that's needed
+ for autoconf 2.14, so for now it works with autoconf-2.13, but the
+ code is ready for 2.14 when it is released. Similar changes to
+ make code work with automake-1.4, until the next release comes
+ out.
+
+ * libamu/Makefile.am: include definitions that are required in
+ automake 1.4, but won't be necessary when the next release of
+ automake comes out (see XXX comments).
+
+ * cache_check_dynamic.m4, check_checkmount_style.m4,
+ check_mnttab_style.m4, check_mount_style.m4,
+ check_network_transport_type.m4, check_nfs_prot_headers.m4,
+ check_umount_style.m4: use symlink creation code that works for
+ both autoconf 2.13 and 2.14 (when the latter comes out).
+
+ * bootstrap: new script for maintainers to run to update autoconf,
+ automake, and libtool related files. Has the same effect as
+ "buildall -K".
+
+ * removed dependencies on CVS versions of autoconf, automake, and
+ libtool, especially the modified automake I had. This is so that
+ maintainers could built the auto* files out of the latest released
+ GNU autoconf, automake, and libtool. However, without my nice
+ patches to automake, many files that used to live in the aux/
+ subdir now were moved to the top level source directory: acconfig.h,
+ acinclude.m4, aclocal.m4, aux_conf.h.in, config.guess,
+ config.guess.long, config.h.in, config.sub, configure.in, depcomp,
+ install-sh, ltconfig, ltmain.sh, missing, and mkinstalldirs. Also
+ texinfo.tex and mdate-sh moved from aux/ dir to doc/ dir.
+
+2000-06-05 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * cvs-server.txt: instructions for maintainers to access the CVS
+ server for am-utils.
+
+2000-06-02 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/am_ops.c (ops_match): changed XLOG_USER messages about
+ merging addopts options to the more appropriate XLOG_INFO. Patch
+ submitted by Tom Schmidt <tschmidt@micron.com>.
+
+ * config.{guess,sub}: make sure chmod'ed a+rx. Updated from
+ latest GNU copies.
+
+2000-05-30 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.4s4
+
+2000-05-29 Ion Badulescu <ionut@moisil.cs.columbia.edu>
+
+ * conf/transp/transp_sockets.c (amu_svc_getcaller): cast result of
+ svc_getcaller() to sockaddr_in, to appease glibc 2.2
+
+2000-05-28 Erez Zadok <ezk@mulberry.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (Network Filesystem Group): minor typos
+
+2000-05-27 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/amfs_auto.c (amfs_auto_readdir_browsable): cast pointers to
+ long for 64-bit architectures.
+
+ * libamu/xutil.c (amu_release_controlling_tty): eliminate an
+ unused variable "tempfile"
+
+ * libamu/wire.c (getwire_lookup): handle calling irs_gen_acc with
+ one or two arguments (bsdi3 vs. bsdi4)
+
+2000-05-26 Ion Badulescu <ionut@moisil.cs.columbia.edu>
+
+ * libamu/xutil.c (amu_release_controlling_tty): close standard
+ file descriptors, re-open them as /dev/null
+
+ * include/am_defs.h: don't try to include both <ndbm.h> and
+ <db1/ndbm.h>, it really doesn't work
+
+2000-05-16 Ion Badulescu <ib42@earth.cs.columbia.edu>
+
+ * hlfsd/stubs.c (nfsproc_lookup_2_svc): added code to update mtime
+ on lookup if MNT2_NFS_OPT_SYMTTL is not defined (copied from
+ getattr). This fixes the problem introduced by the Linux nfsv3
+ patches.
+
+2000-04-30 Erez Zadok <ezk@beetle.mcl.cs.columbia.edu>
+
+ * include/am_defs.h, aux/macros/mount_headers.m4,
+ aux/macros/try_compile_anyfs.m4: include linux/kdev_t.h and
+ linux/list.h before including linux/fs.h, and define __KERNEL__
+ for those two headers. All of this to get a couple of definitions
+ that are needed in the new struct vfsmount.
+
+ * aux/configure.in: look for <linux/kdev_t.h> and <linux/list.h>.
+
+ * include/am_defs.h, aux/macros/mount_headers.m4: avoid conflicts
+ between linux/in.h. and netinet/in.h (linux-2.3.99-pre6), by
+ defining _LINUX_IN_H so it doesn't get included.
+
+2000-04-03 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * minor new ports: i686-pc-linux-gnu-rh6.2,
+ i386-unknown-freebsdelf3.4, i586-pc-linux-gnu-rh6.2.
+
+2000-04-03 Erez Zadok <ezk@vir.cs.columbia.edu>
+
+ * aux/acconfig.h: move all #undef macros above @TOP@, so they can
+ be recognized by pickier autoconf.
+
+2000-04-03 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/macros/cache_check_dynamic.m4 (ac_tmp): use correct echo -n
+ or \c.
+
+2000-03-25 Erez Zadok <ezk@beetle.mcl.cs.columbia.edu>
+
+ * include/am_defs.h: ditto
+
+ * aux/macros/{mount_headers,try_compile_anyfs}.m4: force
+ non-inclusion of <linux/string.h>. Breaks build on newer 2.3
+ kernels.
+
+2000-02-26 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (Amq -w option): document new amq -w option.
+
+ * amq/amq.8: document new amq -w option.
+
+ * amq/amq.c: disable last remains of insecure amq -M code.
+ (main): add amq -H option to show usage.
+ (main): new amq -w option, translates getpwd() into an amd path.
+
+2000-02-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * minor new port: alphaev6-dec-osf5.0
+
+ * doc/am-utils.texi (Supported Platforms): hpux-11 supports NFSv3,
+ but only for UDP.
+
+ * released snapshot am-utils-6.0.4s3
+
+ * conf/nfs_prot/nfs_prot_hpux11.h: support NFSv3 in hpux-11. Note
+ that hpux-11 NFSv3 supports UDP only, and trying TCP locks up the
+ kernel! Must set nfs_proto=udp in amd.conf [global].
+
+ * aux/config.guess.long: set and export PATH separately. DU5
+ /bin/sh doesn't like setting it on the command line in a
+ back-tick'ed `script`.
+
+2000-02-24 Ion Badulescu <ionut@moisil.cs.columbia.edu>
+
+ * Makefile.am: removed struct_nfs_mount_data.m4
+
+ * aux/macros/struct_nfs_mount_data.m4: deleted
+
+ * aux/acconfig.h: removed definition for HAVE_NFS_MOUNT_DATA
+
+ * aux/configure.in: removed check for struct nfs_mount_data
+
+2000-02-24 Ion Badulescu <ib42@beetle.mcl.cs.columbia.edu>
+
+ * amd/amfs_auto.c (amfs_auto_bgmount): changed log message to
+ avoid having 'failed' in a message not indicating a failure
+ (amfs_auto_lookuppn): ditto
+
+ * amd/ops_autofs.c (autofs_bgmount): ditto
+ (autofs_lookuppn): ditto
+
+2000-02-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * added .cvsignore files into the CVS repository.
+
+ * remove files which can be regenerated: .in, configure, some
+ files in aux/, and more.
+
+2000-02-20 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (nfs_vers/nfs_proto): description of two
+ parameters was reversed. Reported by Paul Jenner
+ <p.jenner@eim.surrey.ac.uk>.
+
+2000-02-16 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.4s2
+
+ * amd/mntfs.c (realloc_mntfs): don't fallback on certain ops such
+ as inherit, error, and toplvl (failover code).
+
+ * amd/conf.c (gopt_nfs_vers, gopt_nfs_proto): two new (documented)
+ global options in amd.conf: one to set the NFS version globally
+ (i.e., nfs_vers=2), and one to set the NFS protocol globally
+ (i.e., nfs_proto=udp).
+
+ * amd/mntfs.c (realloc_mntfs): attempt to fix the failover code,
+ so when a matching mount entry failed, try the next one.
+
+2000-02-15 Erez Zadok <ezk@moisil.cs.columbia.edu>
+
+ * amd/amfs_auto.c: a new debug option "readdir" to trace the
+ progress of the browsable_dirs code.
+
+ * conf/mount/mount_linux.c (mount_linux): ensure that the new
+ linux NFSv3 code works for v2-only machines.
+
+2000-02-14 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/configure.in: cleanup unused dnl entries.
+
+ * conf/mount/mount_linux.c (parse_opts): typo: check for string
+ equality, not string inequality for pcfs and cdfs.
+
+ * aux/acconfig.h: look for MNT2_NFS_OPT_INTR as well.
+
+ * libamu/mount_fs.c (compute_mount_flags): check for INTR and
+ NOINTR options as well (intr was never passed to linux mount
+ syscall).
+
+2000-02-10 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.4s1
+
+ * aux/GNUmakefile: buildall -k (for maintainers) temporarily now
+ ignores autoconf warnings: "The macro `AC_OUTPUT_COMMANDS' is
+ obsolete". It is harmless but annoying, and will be fixed when
+ autoconf and automake in their respective CVS trees are working
+ and in sync again.
+
+ * scripts/amd.conf.5: document -D hrtime,xdrtrace
+
+ * all man pages: update copyright to 2000.
+
+ * doc/am-utils.texi: update copyright to 2000.
+
+Wed Feb 9 14:22:31 2000 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * include/am_utils.h (D_XDRTRACE): Define.
+ (D_TEST): Disable here.
+
+ * libamu/xutil.c (dbg_opt): Handle it.
+
+ * doc/am-utils.texi (-D-Option): Document it.
+
+ * libamu/xdr_func.c: Use it instead of D_TRACE.
+
+ * include/am_utils.h (D_HRTIME): Define.
+
+ * doc/am-utils.texi (-D-Option): Document it.
+
+ * libamu/xutil.c (show_time_host_and_name): Print high-resolution
+ timestamp if available and activated.
+
+ * aux/configure.in (clock_gettime): Check for it in -lrt and
+ -lposix4.
+
+ * hlfsd/hlfsd.c (mnttab_file_name): Initialize to MNTTAB_FILE_NAME
+ if defined, even for some systems with in kernel mount tables.
+
+2000-02-08 Ion Badulescu <ionut@moisil.cs.columbia.edu>
+
+ * aux/macros/mount_headers.m4: remove #if 0 around linux/nfs.h to
+ allow compiles against libc5
+
+ * aux/macros/check_mnttab_type.m4: avoid detecting nfs3 under
+ linux when the kernel doesn't support it
+
+ * include/am_compat.h: add workaround for linux efs
+
+2000-02-08 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/configure.in: test for ANSI C compiler (before AC_C_CONST).
+ Comment out unused AC_STRUCT_ST_RDEV (which is obsolete anyway).
+
+2000-02-07 Ion Badulescu <ionut@moisil.cs.columbia.edu>
+
+ * libamu/mount_fs.c (compute_nfs_args): turn on VER3 option for
+ nfs (linux NFSv3).
+
+ * include/am_defs.h: avoid reinclusion of some header files under
+ linux.
+
+ * conf/nfs_prot/nfs_prot_linux.h: support NFSv3.
+
+ * conf/mount/mount_linux.c (mount_linux): support nfs mount
+ (implementation) version 4 for NFSv3.
+
+ * aux/macros/try_compile_nfs.m4: use AC_MOUNT_HEADERS.
+
+ * aux/macros/mount_headers.m4: don't include <linux/fs.h> (may
+ need to fix the code on other linux machines).
+
+ * aux/macros/check_mnttab_type.m4 (ac_safe): ditto.
+
+ * aux/macros/check_fs_mntent.m4 (ac_safe): check for nfs3 option
+ under linux (depends on ac_cv variable, is that a good idea?)
+
+ * added NFSv3 support for linux
+
+ * aux/{configure.in,acconfig.h}: new option ver3
+
+ * aux/macros/mount_headers.m4: commented out inclusion of
+ linux/fs.h, it's not needed on rh61 (and actually generates
+ conflicts), we should see if it's still needed on libc5 systems
+
+ * aux/macros/try_compile_nfs.m4: use AC_MOUNT_HEADERS rather than
+ try to have its own (out of date) list of headers and ifdef's and
+ ...
+
+2000-02-07 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Released am-utils-6.0.3 ***
+ *******************************************************************
+
+2000-02-06 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * conf/mount/mount_default.c: dummy empty file to work around a
+ limitation of automake (it looks for LIBBOBJS in aclocal.m4 and
+ processes them even if they are optional, enclosed in if/else).
+
+2000-01-29 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.3s5
+
+2000-01-25 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * update to use latest version of autoconf, automake, and libtool.
+
+ * aux/GNUmakefile (depcomp): "make update" should also update the
+ depcomp script.
+
+ * Makefile.am (EXTRA_DIST_AUX): include depcomp in distribution.
+
+ * aux/configure.in: use renamed AC_CHECK_AMU_FS.
+
+ * aux/macros/check_amu_fs.m4: renamed macro name and file name to
+ say AMU_FS, not AM_FS.
+
+ * aux/acconfig.h: renamed HAVE_AM_FS_* to HAVE_AMU_FS_* because
+ latest version of autoconf doesn't handle it (bug in 2.14a)
+
+ * aux/configure.in: require version 2.14 of autoconf.
+
+ * amd/mapc.c (mapc_reload_map): more fixes from Nick Williams.
+
+ * doc/am-utils.texi (Automount Filesystem): document type:=auto
+ map browsability option.
+
+ * amd/mapc.c (make_entry_chain): patch from Steven Danz
+ <sdanz@awc.kc.noaa.gov> to allow browsable auto maps.
+
+2000-01-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.3s4
+
+ * amd/mapc.c (mapc_reload_map): fixes to sync maps even if they
+ are set to mapcache:=sync. Fix from Nick Williams
+ <Nick.Williams@msdw.com>.
+
+2000-01-20 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.3s3
+
+ * minor port to i386-unknown-netbsd1.4.1
+
+ * amd/nfs_subr.c (nfsproc_getattr_2_svc): patch from Nick Williams
+ <Nick.Williams@msdw.com> to fix (or reduce the incidence of) stale
+ file handles when doing rapid mounts and umounts in succession
+ such as "ls /vol/foo ; amq -u /vol/foo ; ls /vol/foo"
+
+2000-01-18 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * minor port to i386-pc-bsdi4.1.
+
+2000-01-13 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * libamu/wire.c (getwire_lookup): pass NULL as conf_file (2nd)
+ argument to irs_gen_acc(), which was changed in bsdi 4.1.
+
+2000-01-12 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/get_args.c (get_args): don't use MNTTAB_FILE_NAME for
+ systems with in-kernel mount tables unless this macro is defined
+ (Solaris 8).
+
+2000-01-01 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * ALL: bump copyright year to 2000.
+
+1999-12-16 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * conf/mount/mount_svr4.c (mount_svr4): optionstr exists on
+ solaris 7, but should not be used unless MAX_MNTOPT_STR also
+ exists (solaris 8).
+
+ * doc/am-utils.texi (opts Option): document new mount option:
+ optionstr.
+
+Fri Dec 10 01:31:53 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * conf/trap/trap_svr4.h (MOUNT_TRAP): Pass mount option string to
+ mount_svr4().
+ (mount_svr4): Adapt prototype.
+ * conf/mount/mount_svr4.c (mount_svr4): Pass them to kernel so
+ they are evaluated and show up in Solaris 8 in-kernel mnttab.
+
+ * aux/configure.in: Check for new Solaris 8 MS_OPTIONSTR mount(2)
+ option.
+ * aux/acconfig.h (MNT2_GEN_OPT_OPTIONSTR): Provide template.
+
+1999-12-10 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.3s2
+
+1999-12-09 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (opts Option): document noexec and nomnttab
+ (new to Solaris 8).
+
+ * Makefile.am (EXTRA_DIST_CONF): include nfs_prot_sunos5_8.h in
+ distribution.
+
+ * applied fixes from Reiner Orth for Solaris 8.
+
+ * libamu/wire.c (getwire): increment the cp pointer in the loop
+ body, because the ioctl() inside the "for" loop will overwrite the
+ ifr structure, thus not detecting all of the interfaces. Bug
+ reported and fixed by Amitha Perera <perera@cs.rpi.edu>.
+
+Thu Dec 9 19:09:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * conf/mtab/mtab_svr4.c (unlockmnttab, lockmnttab): No-ops if
+ MOUNT_TABLE_ON_FILE.
+
+ * amd/get_args.c (get_args): Initialize mnttab_file_name even for
+ in-kernel mount table. conf/mtab/mtab_svr4.c (read_mtab) depends
+ on a non-NULL value.
+
+ * amd/info_ldap.c (get_ldap_timestamp): Don't peek into opaque
+ LDAP structure to get error code, but use it directly.
+ (amu_ldap_search): Likewise.
+
+ * conf/nfs_prot/nfs_prot_sunos5_7.h: Rip superfluous and wrong
+ ldap support.
+ * conf/nfs_prot/nfs_prot_sunos5_8.h: Likewise.
+
+ * conf/nfs_prot/nfs_prot_sunos5_8.h: New file, doesn't typedef
+ nfsstat, already in <nfs/nfs.h>.
+ * aux/macros/check_nfs_prot_headers.m4: Use it for all Solaris
+ versions beyond 7.
+ Allow for micro versions of SunOS 5.[67].
+
+ * aux/configure.in: Check for new Solaris 8 Beta Refresh
+ MS_NOMNTTAB mount(2) option.
+ * aux/macros/check_mnttab_location.m4: Use it to test for
+ mntfs-based in-kernel mnttab.
+
+ * aux/macros/os_cflags.m4: Treat Solaris 8 and higher like 2.6/7.
+
+ * aux/macros/check_fs_headers.m4: Revert test for duplicate
+ objects.
+ * aux/macros/check_fs_mntent.m4: Likewise
+
+ * aux/macros/HEADER: Fixed typo.
+
+ * include/am_defs.h: Likewise.
+
+1999-12-01 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/macros/*.m4: prepare for hpux-12 (assume same as hpux-11)
+
+1999-11-16 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * BUGS: document glibc-2.1 nis file descriptor leak in yp_bind.
+
+ * amd/info_ldap.c (string2he): updated function which does not
+ corrupt strings when called more than once. Patch from
+ JOHANN.PFEFFERL.JP@germany.agfa.com.
+
+1999-11-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * MIRRORS (Asia): two new mirrors in Japan.
+
+1999-11-10 Erez Zadok <ezk@kosh.cs.columbia.edu>
+
+ * doc/am-utils.texi: document new variables for ${uid} and ${gid}.
+
+ * amd/nfs_subr.c (nfsproc_lookup_2_svc): find the uid/gid of the
+ last lookup from the RPC credentials.
+
+ * aux/configure.in: upped version-info to 4:0:2 because I've added
+ a new interface to libamu.
+
+ * libamu/misc_rpc.c (getcreds): moved function from hlfsd to here,
+ so it can be used by amd.
+
+ * amd/opts.c: new variables ${uid} and ${gid}.
+
+1999-10-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * scripts/ctl-amd.in: add "status" command that tells you if amd
+ is running on not (same output as RedHat scripts).
+ Added start_msg and stop_msg targets as they are used on HPUX.
+ reported by Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>.
+
1999-10-13 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
* released snapshot am-utils-6.0.3s1
@@ -1551,13 +2751,12 @@ Wed Feb 7 15:35:51 1998 Rainer Orth <ro@xayide.TechFak.Uni-Bielefeld.DE>
comment in <rpc/auth.h>
* include/am_defs.h: #define KERNEL to avoid definition of
- gt_names[]
- conf/mtab/mtab_ultrix.c: #include <sys/fs_types> before <config.h>
- to force single definition here
+ gt_names[] conf/mtab/mtab_ultrix.c: #include <sys/fs_types> before
+ <config.h> to force single definition here
* libamu/mount_fs.c (compute_nfs_args): Ultrix support for
- nfs_args.gfs_flags moved to callers
- store mount options in nap->optstr
+ nfs_args.gfs_flags moved to callers store mount options in
+ nap->optstr
* include/am_defs.h: fix _am_mntent mnt_{type, opts} field
descriptions
@@ -2520,7 +3719,7 @@ Mon Oct 20 01:59:25 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
* doc/Makefile.am (EXTRA_DIST): include am-utils.dvi and
am-utils.ps in the distribution sources.
(html): generate html documentation for
- http://www.cs.columbia.edu/~ezk/am-utils/
+ http://www.am-utils.org
Sun Oct 19 12:35:49 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
@@ -3716,1810 +4915,6 @@ Sat May 10 13:09:06 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
Solaris, which include NFS V3 support.
* conf/nfs_prot/nfs_prot_default.h: default NFS protocol headers.
- *** Released am-utils-6.0a15 ***
- * conf/transp/transp_{tli,sockets}.c (get_mount_client): use NFS
- protocol version while getting a mount client.
-
- * amd/ops_nfs.c (mount_nfs_fh): set the mount types, mnttab types,
- file handle size, and proper file handle based on the correct NFS
- version number.
- browsable_dirs=full, which will print *all* entries (other than
- * conf/mount/mount_svr4.c (mount_svr4): support NFS3 mounts under
- Solaris and other SVR4 systems.
-
- * amd/ops_nfs.c: store NFS file handle version and version
- specific handle in struct fh_cache.
- (got_nfs_fh): pick the correct RPC reply based on the NFS version
- of the server.
- (prime_nfs_fhandle_cache): figure out the right NFS file handle
- for a node, but now include NFS protocol version information.
- (call_mountd): set the correct version for the mount protocol,
- based on the NFS protocol version.
- (nfs_init): use the NFS protocol generic structure
- am_nfs_handle_t.
- to 1500.
- * include/am_utils.h: new structure am_nfs_handle_t to contain all
- possible versions of NFS file handles.
- * doc/am-utils.texi: fixed reversed documentation for NFS mount
- * amd/srvr_nfs.c (start_ping): ping program performs NFS version
- specific pings.
- (recompute_portmap): figure out the correct portmap version mount.
- (nfs_keepalive): call start_ping() with the correct NFS version.
- (find_nfs_srvr): if mount option "vers=" is given, use it. Get
- the NFS server version and verify that it is up.
-
- * conf/transp/transp_{tli,sockets}.c (get_nfs_version): a new
- function to find the best NFS version for a particular host.
- installing html files. Another new target "alldocs" is just for
- * libamu/amu.h: determine what is the highest version of NFS we
- should try.
-
- * include/am_utils.h (NFS_VERSION3): added definition for NFS V3
- protocol number.
- Added field fs_version to struct fserver, so we can now store the
- server protocol version.
- facility in the log_file option.
-Fri May 9 01:09:45 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
- * libamu/xutil.c (get_syslog_facility): allow users to specify the
- * aux/macros/check_field.m4 (AC_MOUNT_HEADERS): map '.' (dot) into
- underscores too, so I can test for sub-fields.
- will use the default LOG_DAEMON facility.
- * libamu/wire.c: use test that checks for sub-fields of struct
- ifreq.
-Thu Jan 8 04:05:10 1998 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-Sat May 6 10:20:17 2000 Erez Zadok <ezk@glory.soscorp.com>
- (intel).
- * port to BSD/OS 3.0 completed! Many xdr_ functions were broken
- into smaller files. M4 macros fixed to test for existence of
- file systems using getvfsbyname().
- before appending to it, on systems with two or more network
- * amd/sched.c (sigchld): signal handler must waitpid() for all
- possible children.
- the mntent for cachefs.
- * hlfsd/homedir.c: signal handler must waitpid() for all possible
- children.
- const for both arguments.
- * aux/macros/check_restartable_signals.m4: new macro to determine
- if need to reinstall signal handlers per OS is better than trying
- to figure these out based on system macros.
-
-Fri May 5 19:23:28 2000 Erez Zadok <ezk@glory.soscorp.com>
- * amq/pawd.c (cluster_server): don't use getccent() if the extern
- * amd/ops_nfs.c (mount_nfs_fh): set nfs_args_t version number.
- <cluster.h> and struct cct_entry do not exist.
- * amd/ops_afs.c (mount_toplvl): set nfs_args_t version number.
- hpux systems don't have it (hpux 10.20).
- * amd/ops_nfs.c (mount_nfs_fh): process nfs mount option resvport
- (must be supplied for bsdi 3.0)
-
- * libamu/wire.c: use HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR (and
- associated new macro) for determining the right way to compute the
- size of the interface structure.
- for new amq options -T/-U.
-Fri Apr 11 15:56:13 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/configure.in: need to include libc before libnsl if
- get_myaddress() is available because on irix libnsl has a buggy
- get_myaddress().
-
- * include/am_defs.h: make sure REINSTATE_SIGNAL_HANDLER is defined
- on Irix 6 (an SVR4 variant)
- * amq/pawd.c: a new program, Print Automounter Working Directory,
-Thu Mar 27 02:28:40 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * aux/macros/localconfig.m4: trivial support for am-utils
- *******************************************************************
- *** Released am-utils-6.0a4 ***
- *******************************************************************
- wish in a file called localconfig.h, located in the top build
-Wed Mar 26 21:15:36 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- * doc/am-utils.texi (Caching Filesystem): updated documents for
- * amd/amq_subr.c (ok_security): turned off insecure code unless
- user explicitly runs configure --enable-amq-mount.
- * amd/ops_cachefs.c: initial cachefs support, for solaris.
- * hlfsd/hlfsd.c (main): use new protoypes dor create_nfs_service().
-
- * amd/nfs_start.c (mount_automounter): use code that separately
- creates the NFS and the amq service. Register tcp and udp
- services for amd.
- cachefs file systems.
- * conf/transp/transp_*.c (create_amq_service): new function to
- separately create the amq service for amd. Simplified prototypes
- for create_nfs_service().
- mnttab type is.
-Wed Mar 19 20:40:56 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-Mon Jan 5 23:22:49 1998 Erez Zadok <ezk@lorien.cs.columbia.edu>
- *******************************************************************
- *** Released am-utils-6.0a3 ***
- *******************************************************************
-
-Wed Mar 19 17:49:18 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * amd/ops_nfsl.c (nfsl_ffserver, nfsl_match): also check if the
- * new port: rs6000-ibm-aix3.2.5 and rs6000-ibm-aix4.1.5.0. Lots
- of small changes to support these two.
- type:=nfs.
-Wed Mar 19 14:33:30 1997 Erez Zadok <ezk@grande.cs.columbia.edu>
- * updated all source files to add 1998 as a copyright year.
- * conf/umount/umount_default.c (umount_fs): bug: unlock_mntlist()
- should run if MOUNT_TABLE_ON_FILE, not otherwise.
- like type:=linkx if the pathname denoted by $fs exists, and like
-Mon Mar 17 22:02:43 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * hlfsd/hlfsd.c (main): fill in fhsize field if exists
- (freebsd-2.2).
-
- * amd/ops_{nfs,afs}.c (mount_toplvl): fill in fhsize field if
- exists (freebsd-2.2).
-
-Sat Mar 15 19:37:48 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * hlfsd/homedir.c (plt_init): make function exported, to save on
- * new port: i386-unknown-freebsd2.2. FreeBSD 2.2 and higher
- changed the filehandle type in struct nfs_args from nfsv2fh_t to
- u_char.
- instead.
-Sat Mar 14 10:11:03 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-Thu Jan 1 00:15:58 1998 Erez Zadok <ezk@chestnut.mcl.cs.columbia.edu>
- * SHARED LIBRARIES: too many change to list individually. Now,
- libamu can be built as a shared library, and other programs link
- with it.
-
-Tue Mar 11 22:24:09 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * aux/macros/opt_shared.m4: new macro for setting options for
- building shared am-utils libraries.
- * amd/ops_afs.c (mount_toplvl): Bug fix. Don't try to free() an
-Sun Mar 9 19:17:46 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * ALL SOURCES: change every direct call to free() to xfree(), so
- * fixmount/fixrmtab: cleaned up the script.
- call dxfree(), which will print the file name and line number
- * fixmount/Makefile.am (EXTRA_DIST): adde $(sbin_SCRIPTS) so that
- fixrmtab gets distributed too.
-
- * conf/nfs_prot/nfs_prot_bsdi2.h: added support for MOUNTPROC_DUMP.
- Added extern for xdr_mountlist().
-Tue Dec 23 04:24:28 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * aux/configure.in: trimmed down many tests for MNT2_GEN_OPT,
- MNT2_NFS_OPT, and MNTTAB_OPT that were not referenced anywhere in
- the sources.
-
-Sat Mar 8 00:23:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- calloc().
- * fixmount/hlfsd ported to bsd44, hpux, and linux systems.
-
- * aux/macros/check_fixmount_style.m4: add check for bsd44 systems.
- malloc().
- * conf/fixmount/fixmount_default.c: use lockf() if flock() is
- unavailable.
- zero its bytes.
- * include/am_defs.h: include <string.h> even if don't have
- STDC_HEADERS defined (sunos4).
- (seteuid): define seteuid() to be setresuid() for systems that
- have but not the other (hpux).
- * amq/amq.c: amq does not need its own definition of xfree().
- * aux/macros/check_extern.m4: test should include <strings.h>.
- look for function malloc_verify() in libmapmalloc.a, and function
-Tue Mar 4 17:16:52 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * lib/xutil.c (debug_option): moved from amd/getargs.c to this
- more proper file.
- uordbytes, because it does not always exist. Rather, compute it
- * include/am_utils.h: put in structure for debug options, for all
- progams to use.
- used when debugging memory references.
- * amd/get_args.c: moved structure for debug options out.
-Mon Dec 22 03:01:30 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-Sun Mar 2 00:13:07 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- Otherwise browsable_dirs fails on OpenBSD 2.2.
- * ported fixmount.
- * amd/mntfs.c (uninit_mntfs): bug fix. Moved freeing of
- * lib/ualarm.c: replacement function for systems that don't have a
- ualarm().
-Sat Dec 20 00:51:21 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * ported fsinfo.
- * amd/ops_host.c (host_umounted): don't use clnt_spcreateerror()
-Sun Mar 1 10:23:34 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- * include/am_defs.h: add missing extern definition for free().
- * ported mk-amd-map.
-
- * buildall: added -K option to buildall, to run mkconf.
- optional function.
-Fri Feb 28 01:10:25 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
- if they exist.
- *******************************************************************
- *** Released am-utils-6.0a2 ***
- *******************************************************************
- * aux/configure.in: check for missing functions clnt_create and
-Thu Feb 27 13:58:59 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * all *.[hcyl] files: add copyright line.
- * Makefile.am: updates for new sunos3 files distributed.
- * aux/macros/check_mount_type.m4: test for mount type for
- linux-like systems, by checking for loadable or statically linked
- kernel filesystem modules.
- * conf/fh_dref/fh_dref_sunos3.h: new file.
- * aux/macros/check_mnttab_type.m4: test for mount table entry
- for linux-like systems, by checking for loadable or statically
- linked kernel filesystem modules.
- * aux/macros/check_nfs_fh_dref.m4: added sunos3 case.
- * aux/configure.in: pcfs filesystems can use vfat type (linux)
- * doc/am-utils.texi (wire Selector Variable): updated manual for
- * aux/macros/check_fs_mntent.m4: test for filesystem existence for
- linux-like systems, by checking for loadable or statically linked
- kernel filesystem modules.
- in_network() function.
- * conf/trap/trap_hpux.h: ugly hack added because of stupide HPUX
- 9.0 header files. This should be removed when HPUX 9.0 is deemed
- defunct.
- functions. Converted wire, network, and netnumber all to use the
- * aux/acconfig.h: set an undefined variable for having an extern
- to clnt_sperrno().
- against all networks, not just primary.
- * include/am_defs.h: define extern for clnt_sperrno() if needed.
- * conf/nfs_prot/nfs_prot_linux.h: add special definitions for
- * aux/configure.in: test for extern clnt_sperrno().
- <rpc/des_auth.h> because it is incomplete on the same systems.
- * aux/macros/check_nfs_fh_dref.m4: HPUX's NFS fhandle dref is
- similar to irix.
- * hlfsd/homedir.c (table_add): cast uid field to int, for
- * aux/macros/check_mount_style.m4: use mount helper on HPUX.
- * include/am_defs.h: more coflicts with redhat alpha linux
- * aux/macros/check_mtype_type.m4: hpux's mount type is a char*,
- not integer (but may be mapped to one later).
- * aux/macros/{mount_headers,try_compile_anyfs,try_compile_nfs}.m4:
- * conf/mount/mount_hpux.c (mount_hpux): HPUX has confusing header
- files. They have mount(2) and vfsmount(2) which don't take same
- arguments, and they have string mount types MNTTYPE_* as well as
- integer types MOUNT_*. So I need this new mount function to map
- from string types to integer types for the vfsmount() function.
- redhat alpha linux.
- * conf/trap/trap_hpux.h (MOUNT_TRAP): instead of calling
- vfsmount(), call mount_hpux().
- the new "!" (negated) nomadic functions.
-Thu Feb 27 03:34:14 1997 Erez "HWank1" Zadok <ezk@okeeffe.cs.columbia.edu>
- rather than saying that any ARG is on a local network.
- * lib/mount_fs.c (mnt_flags): make sure SYNC option is on only if
- both MNTTAB_OPT_SYNC and MNT2_GEN_OPT_SYNC are defined.
-
-Thu Feb 27 00:26:00 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-Thu Dec 18 20:57:19 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * conf/nfs_prot/nfs_prot_hpux.h: NFS protocol definitions for
- hpux.
-
- * include/am_defs.h: no need to include rpc/auth.h or rpc/clnt.h.
- Finally, it looks as if OpenBSD 2.2's NFS 3 implementation may be
- * aux/configure.in: no need to test for rpc/auth.h and rpc/clnt.h.
- wait until they get it working in their version of the automounter
- * buildall: added ability to configure using other shells than
- /bin/sh, on those systems where /bin/sh is buggy or limited
- (HPUX).
- maxgrp.
- * aux/macros/struct_nfs_fh.m4: reinstated the macro but have it
- defined am_nfs_fh, and also test for plain typedef "nfs_fh".
- "maxgrps". Added test for mount table entry "maxgroups".
- * aux/acconfig.h: #undef am_nfs_fh, which is being defined by a
- reinstated macro.
- * libamu/mount_fs.c (compute_nfs_args): perform more careful tests
- * aux/configure.in: check for <nfs/export.h>
-
- * include/am_defs.h: include <nfs/export.h> (HPUX) if exists.
- including 9.x, should use "ignore" as the mount type to hide from
- * aux/macros/try_compile_nfs.m4: include <nfs/export.h> (HPUX) if
- exists.
-
- * aux/macros/mount_headers.m4 (define): removed some non-working
- (on HPUX) code that attempts to recreate the fhandle_t rather than
- load it up from system headers. Also added some NFS protocol
- header inclusion. include <nfs/export.h> (HPUX) if exists.
- every where in the sources.
-Wed Feb 26 00:32:35 1997 Erez "HWank1" Zadok <ezk@okeeffe.cs.columbia.edu>
-
- * aux/macros/mount_headers.m4 (define): Use M4 changequote to
- ensure [] brackets are correctly used.
- useful for detecting internal flags and options, as well as the
- * aux/macros/expand_cpp_{string,hex,int}.m4: encapsulate
- multi-line M4 inclusions in [].
- after /etc and before /etc/local.
-Tue Feb 25 22:19:44 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * aux/configure.in, libamu/Makefile.am: added support for linking
- * conf/mtab/mtab_bsd.c (mnt_dup): use statfs field f_fstypename if
- it exists.
-
- * aux/acconfig.h: HAVE_FIELD_STRUCT_STATFS_F_FSTYPENAME, new
- config.h macro for field f_fstypename of struct statfs.
- needed.
- * aux/configure.in: testing for field f_fstypename field of struct
- statfs (NetBSD).
- netbsd).
- * aux/acconfig.h: moved all of the "static" definitions out to a
- fixed file called include/am_defs.h. Added to all */Makefile.am
- files a dependency on am_defs.h. Created am_defs.h of course, and
- then added #include <amd_defs.h> to all of the source and header
- files that required it.
- for NetBSD-1.3_BETA and similarly for OpenBSD.
-Mon Feb 24 01:27:02 1997 Erez Zadok <ezk@defiant.soscorp.com>
- * conf/nfs_prot/nfs_prot_netbsd1_3.h: new header for the slight
- * aux/acconfig.h: two more externals for xdr functions that may be
- implemented by libamu.
- mktemp().
- * conf/nfs_prot/nfs_prot_bsdi2.h: added missing RPC and XDR
- definitions.
- * amd/ops_nfs.c (mount_nfs_fh): Systems that include the mount
-Sun Feb 23 15:25:26 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
- "nfs3", but to "nfs" and then they set "vers=3". Setting it to
- * buildall (default): added -D option for turning on even stricker
- developer options.
- systems, set it to "nfs".
- * */Makefile.am: make sure @AMU_NFS_PROT_HEADERS@ is used to
- determine dependencies on optional NFS protocol headers.
-
- * aux/acconfig.h: define and use HAVE_NFS_PROT_HEADERS as needed.
-
- * aux/macros/check_nfs_prot_header.m4: new test to determine what
- NFS protocol headers to use.
- system mount types under nextstep for mount(2).
- * conf/nfs_prot/nfs_prot_{irix6,sunos4,bsdi2}.h: new headers to
- complete missing system headers for NFS protocol definitions.
- integer and string types for file system mount types in mount(2),
-Sun Feb 16 15:58:42 1997 Erez "HWank1" Zadok <ezk@vir.cs.columbia.edu>
- (EPERM) instead of 0 (OK). Fixes m68k-next-nextstep3 which now
- * amd/ops_nfs.c (mount_nfs_fh): encapsulated some more code in
- #ifdef's as needed.
-
- * amd/ops_afs.c (mount_toplvl): make sure TIMEO/RETRANS code is
- suitable #ifdef'ed.
-
- * include/am_compat.h: a couple more mnttab options
- (timeo/retrans) setting just in case.
-
- * amd/autil.c (host_normalize): make sure hostent->h_name is
- passed a non-const char *.
-
- * conf/mount/mount_linux.c (mount_linux): cleaned up a block of code.
- inclusion of <nfs/nfs_mount.h> which only affects nextstep3, on
- * {lib,amq,amd}/*.c (many functions): cast xdr_entry to
- XDRPROC_T_TYPE.
- * libamu/mount_fs.c (mnt_flags): support either nfs or generic
- * lib/nfs_prot_svc.c (nfs_program_2): cast xdr_entry to
- XDRPROC_T_TYPE.
-
- * lib/nfs_prot_xdr.c (xdr_entry): cast xdr_entry to
- XDRPROC_T_TYPE.
-
- * lib/wire.c (getwire): Make sure safe assignment from const to
- none is done.
- file in the am-utils' home page, as well as a few other useful
-Sat Feb 15 19:38:51 1997 Erez "HWank1" Zadok <ezk@vir.cs.columbia.edu>
-Mon Nov 17 05:22:56 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * aux/macros/expand_cpp_int.m4: new macro for expanding integers.
- *******************************************************************
- * aux/configure.in: added linux/fs.h support in configure and
- several M4 macros.
-
- * conf/mount/mount_linux.c (mount_linux): use macro instead of
- "ugly" fixed hex number for mount() arguments.
- ports.
-Sat Feb 15 02:09:47 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/info_hesiod.c: removed macro HAVE_HS_ZONE_TRANSFER and
- turned all of its code always on. That code always seems to
- compile, as long as you have hesiod and libresolv.
- * scripts/amd.conf.5: corrected info for -o/-O options.
- * amd/mapc.c: removed macro HAVE_HS_ZONE_TRANSFER and turned all
- of its code always on.
- OS name.
- * aux/configure.in: removed superfluous test for hs_zone_transfer
- function (will never find it because it is an amd-internal
- function).
- -o and -O options.
- * amd/mapc.c (maptypes): must used correct new name for am-utils'
- hesiod initialization function: hesiod_am_init.
-
- * amd/info_hesiod.c (hesiod_am_init): renamed hesiod_init to
- hesiod_am_init so as not to conflict with libhesiod's
- hesiod_init() function.
- variable.
- * aux/configure.in: added test and explicit inclusion of
- libresolv.a for later resolution of library references with
- libhesiod.
- <metcalf@cag.lcs.mit.edu> to correctly set the nfs_prot headers
- * aux/macros/opt_cppflags.m4: new file. configure/compile C
- preprocessor flags.
- * doc/am-utils.texi (Distrib): typo in the subscription
- * aux/macros/opt_libs.m4: new file. configure/compile library
- flags.
- <vogel@physik-rzu.unizh.ch>.
- * Makefile.am (EXTRA_DIST_AUX): include two new macros
- opt_cppflags.m4 and opt_libs.m4.
-1997-11-15 Erez Zadok <ezk@amtrak.cs.columbia.edu>
- * aux/configure.in: test for libhesiod needs to additional
- libresolv to link completely. Additional configuration time
- options added for setting initial CPPFLAGS and LIBS.
-
-Tue Feb 10 02:15:40 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- * NFS3 works on powerpc-ibm-aix4.2.1.0.
-
- *** Released am-utils-6.0a1 ***
- static. Some compilers (gcc from egcs on aix 4.2.1) corrupt the
- stack of an automatic variable when pointer to it is passed around
-Thu Feb 6 02:55:19 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/info_ndbm.c (ndbm_search,ndbm_init): fixed the code so that
- it works on freebsd, where they map dbm_pagfno a non-existing
- macro on purpose, to force you to port the code to Berkeley DB.
- * libamu/xutil.c (real_plog): syslog like behavior for normal
-Fri Jan 31 01:35:09 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/ops_afs.c (mount_toplvl): added a sleep(1) right before the
- actual mount_toplvl, to avoid some possible race conditions.
-
-Thu Jan 30 02:31:49 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/rpc_fwd.c: removed all TLI (HAVE_T_OPEN) code.
-
-Wed Jan 29 18:25:07 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * lib/wire.c (getwire): removed HAVE_T_OPEN (TLI code)
- passed to it before. So now I have to dereference the pointer
- * amd/amd.c (main): fix local address using htonl(). Free up
- buffers allocated by netdir_*() functions.
-
-Wed Jan 22 23:53:24 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/fix-amd-map.in: new script that will convert old-style amd
- maps to new one.
- compute_nfs_args() and compute_automounter_nfs_args() functions.
-Tue Jan 21 01:18:16 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- and cleaner compute_nfs_args() and compute_automounter_nfs_args()
- * FIRST AMD IN AM-UTILS FINALLY WORKS (mounts itself as toplvl,
- and replies back to simple nfs/link type mount queries).
- relates for struct nfs_args. A new function sets the numerous
- * conf/mtab/mtab_svr4.c: reorganized the code in this file to be
- easier to read, and fixed a few bugs with un/setting the lock file
- descriptor.
- libamu. This saves on overall size of code.
-Wed Jan 8 15:27:49 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- mounting an automounter's mount point. Used by hlfsd and amd.
- * amd/sched.c: removed HAS_SVR3_SIGNALS code to handle older
- signals in Svr3 systems. Only stellix ever used this.
- * amq/amq.c (get_secure_amd_client): don't print any more
- * amd/rpc_fwd.c (fwd_reply): removed all code that was triggered
- by DYNAMIC_BUFFERS, since it was not in use.
- under DEBUG only.
-Tue Jan 7 00:45:59 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/opts.c (eval_opts): removed AMD_COMPAT code. Amd no longer
- takes '=' sign as old selector. Fix your maps.
- (deslashify): removed APOLLO code that treated two '//' as one.
- for file systems based on physical media (disk, cdrom, floppy) to
-Sun Jan 5 01:25:09 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- autoconf searches for all these types of mount table entries for a
- * amd/ops_nfsx.c (nfsx_init): removed HARD_NFSX_ERRORS, code which
- was not used. It made any submount error fail the whole group.
- the actual name found! Same for ufs, cdfs, pcfs, tmpfs, lofs,
- * amd/ops_nfs.c (make_nfs_auth): removed code dependent on
- HAS_NFS_QUALIFIED_NAMES.
- (mount_nfs_fh): removed macro for NFS_ARGS_NEEDS_PATH, assuming it
- is never on. So code that was triggered by #ifndef
- NFS_ARGS_NEEDS_PATH (osf1, aix3, and bsd44 variants) may have to
- be fixed later.
- Removed all ULTRIX_HACK code. Ultrix is DEAD!
- removed all PRESET_AC code, which was only on for Linux to preset
- the attribute cache values (otherwise they default to zero).
- (nfs_umounted): revobed KICK_KERNEL code (IRIX systems). Will
- have to fixed up later.
- (mount_nfs_fh): removed code that was never included, which
- attempted to set the port on which amd's nfs mounts on. This
- isn't supported by the ping algorithm yet. In any case, it is all
- done in nfs_init().
-
- * amd/srvr_nfs.c (find_nfs_srvr), amd/ops_nfs.c (mount_nfs_fh):
- removed HAS_TCP_NFS code. The whole use of NFS V.3 with TCP or
- specially hacked NFS V.2 that uses TCP (BSD 4.4 variants) will
- have to be addressed later.
-Sun Oct 26 19:32:57 1997 Erez Zadok <ezk@defiant.soscorp.com>
- * amd/nfs_subr.c (nfsproc_getattr_2): removed all code dependent
- on PRECISE_SYMLINKS.
- This works better on bsdi2 and bsdi3, because their portmapper
- * amd/mapc.c (mapc_meta_search): removed code that depended on
- HAS_DEPOT. It is known buggy code. The whole DEPOT support needs
- to be rethought.
- (mapc_add_kv): ported code to use standard regular expression
- (regexp) library.
- insecure).
- * amd/{map.c,ops_sfs.c,ops_ufs.c}: removed all code dependent on
- FLUSH_KERNEL_NAME_CACHE and the macro itself.
- *** Released am-utils-6.0a13 ***
-Sat Jan 4 15:46:58 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-Fri Oct 24 05:04:37 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * amd/map.c (exported_ap_alloc): removed all code triggered by
- SHRINK_EXPORTED_AP and the macro itself.
- struct datum typedef.
- * amd/info_nis.c: removed HAS_NIS_RELOAD macro, and left the code
- in all the time. Assuming that there is always NIS realod
- available.
- (yp_all_fixed): removed code for BROKEN_YP_ALL. If your yp_all()
- function is broken such that it does not release filedescriptors
- it created, then you are hosed. Get a fix for yp_all from your
- vendor or switch operating systems.
-
-Tue Dec 31 15:34:36 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- gid_t.
- * amd/info_hesiod.c: renamed macro HAS_HESIOD_RELOAD to
- HAVE_HS_ZONE_TRANSFER.
- * conf/transp/transp_tli.c (amu_clnt_create_best_vers): don't use
-Mon Dec 30 17:33:23 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/{nfs,host}_ops.cremoved INFORM_MOUNTD macro, so its code is
- always included. We should always try to inform the remove mount
- daemon of mounts we performed. If we want an option for this, it
- should be a run-time option.
-
- * amd/host_ops.c: removed all that optionally did not make the
- directory mount points for amd.
-
- * HOST_EXEC code removed from everywhere. There is no indication
- that it was used anywhere. If it needs to be used, then a
- run-time switch should control it.
-
-Thu Dec 26 00:06:52 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- passwdfile option. If hlfsd is started with -P passwdfile, then
- * amd/*_ops.c: removed all references to mntent_t's fields
- mnt_freq and mnt_passno, since they are no longe rused (and never
- have been).
- read and checked. All the rest are ignored. No NIS/netgroup
- * amd/am_ops.c: removed function sunos4_match, which was off
- anyway. This was one of the places where an '=' sign was allowed
- as an assignment operator (which is now ':=').
-
- * amd/afs_ops.c (afs_bgmount): removed SUNOS4_COMPAT code which
- was off anyway. This was one of the places where an '=' sign was
- allowed as an assignment operator (which is now ':=').
- -h is invoked.
-Tue Dec 24 01:53:52 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
-Wed Oct 22 00:16:39 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
- * amq/amq.c: ported to am-utils. Working.
-
- * conf/mount/mount_svr4.c (mount_svr4): changed mount type on svr4
- to be string, as it should be (rather than a string mapped to int
- and back mapped to string).
- which returns TRUE if 'arg' is any one of this host's networks.
-Sun Dec 22 13:26:05 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- all networks names and numbers in the order of the interface (not
- * lib/mount_fs.c (mount_fs): removed MNTINFO_PREF code.
-Mon Oct 20 01:59:25 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
- * lib/umount_fs.c: split this into three files: default, osf, and
- bsd44, that are in conf/umount/umount_*.c.
- * aux/configure.in: don't add ops_ufs.o on AIX twice. My code
-Thu Dec 19 17:33:46 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu>
- * doc/Makefile.am (EXTRA_DIST): include am-utils.dvi and
- * aux/configure.in, aux/aclocal.m4, aux/acconfig.h: added new
- macro to automatically figure out if an external definition for
- sys_errlist[] exists.
- (html): generate html documentation for
- * lib/xutil.c (xfree): removed "#undef free" because it's not
- needed there. Any system that redefines free() needs help.
-
- * conf/mtab/mtab_file.c (REWRITE_MTAB_IN_PLACE): removed code that
- was dependent on REWRITE_MTAB_IN_PLACE. It does not appear to be
- in active use anywhere. If added later, it should be a run-time
- configuration option.
- ypall_callback_fxn_t. The NetBSD team compiles all sources with
- * conf/mtab/mtab_mach3.c: removed code that was #ifdef'ed not to
- be MOUNT_TABLE_ON_FILE, since mach2 always stores its mount tables
- in a file in /etc.
- function typedef.
- * lib/util.c (str3cat): removed _AIX code. AIX should have a
- working realloc, or else find a cleaner solution to this.
- (mkdirs): removed SUNOS4_WORKAROUND code. This was to do a sync()
- after immediately making directories so that fsck will be able to
- fix the filesystem in the event of an immediate crash. This was
- because a bug in UFS which is fixed by now.
- * libamu/xutil.c (amu_release_controlling_tty): new function to
- * lib/hutil.c (domain_strip): removed PARTIAL_DOMAINS triggered
- code. Does not appear to be on and used anywhere.
- (dofork): removed MACH3 code, b/c mach3 NFS bugs are fixed by now.
- and hlfsd/hlfsd.c. Also avoid setpgrp(), because it works on some
- * lib/resvport.c: split the binding of reserved ports code to a
- separate file. A #define (HAVE_T_OPEN) separates the TLI (SVR4)
- from the BSD code.
-
-Thu Dec 19 02:08:35 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * lib/Makefile.am (amu_LIBADD): includs @LIBOBJS@ now, auto-filled
- in by automake and configure, for optional sources that need to be
- built as part of libamu.a.
-
- * aux/aclocal.m4: Make sure AC_CHECK_MOUNT_STYLE adds mountutil.o
- to LIBOBJS.
-
- * lib/memcmp.c (memcmp): new file added to replace a possible bad
- implementation of memcmp.
-
-Wed Dec 18 22:20:23 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * converted the sources to use memset/memmove/memcmp instead of
- bzero/bcopy/bcmp.
-
- * ran all sources through gnu Indent w/ options specified in
- aux/amindent.
-
-Wed Dec 11 22:19:29 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * At this point the initial genration of config.h via autoconf and
- some preliminary makefiles via automake is done. I will not begin
- modifying sources, so it's a good time to document from here.
-
-Wed Dec 10 22:19:29 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Initial ChangeLog Entry ***
- *******************************************************************
-
- * amd/ops_afs.c (mount_toplvl): turn on 'ignore' option in nfs
- mount flags of toplvl mounts. Important esp. for HPUX 10. Now
- hpux-10 will mount amd's mounts points as 'ignore' (by df).
-
- * aux/configure.in: check for NFS mount option 'ignore', useful in
- HPUX 10.
-
-Thu Oct 16 03:28:33 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/macros/check_hide_mount_type.m4: hpux 10 should use "ignore"
- mount type and not NFS, for the amd mount points.
-
- * conf/transp/transp_tli.c (amu_clnt_create_best_vers): don't log
- an RPC timeout as an error, but just an info message. From
- Andreas Stolcke <stolcke@speech.sri.com>
-
- * If the NFS server is down or does not support the portmapper
- call (such as certain Novell NFS servers) we mark it as version 2
- and we let the nfs code deal with the case that is down. If when
- the server comes back up, it can support NFS V.3 and/or TCP, it
- will use those. From christos@deshaw.com (Christos Zoulas).
-
- * hlfsd/homedir.c (plt_print): various compile time cleanups to
- printfs that take a long, but pass an int to print. From
- christos@deshaw.com (Christos Zoulas).
-
- * aux/macros/func_bad_yp_all.m4 (ac_cv_func_yp_all_clean,): new
- macro to determine if the OS has a bad yp_all(), based on the host
- OS name. So far only irix (all versions) have a bad yp_all, so
- they will use am_yp_all() instead (which is slower as it
- enumerates manually all of the map's entries).
-
-Thu Oct 16 03:14:37 1997 Erez Zadok <ezk@subzero.cs.columbia.edu>
-
- * amd/info_nis.c (am_yp_all): code for a replacement yp_all that
- avoids using a file-descriptor leaking yp_all() on some systems
- like irix.
-
-Wed Oct 15 21:52:35 1997 Erez Zadok <ezk>
-
- * fsinfo/fsinfo.h: avoid redefining yywrap incorrectly on DU-4.x
- systems using /usr/bin/flex.
-
- * amd/conf_tok.l (yywrap): avoid redefining yywrap for systems
- that have a modified GNU flex which does define yywrap (DU-4.x).
-
-Fri Sep 26 14:25:29 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/checkmount/checkmount_bsd44.c: include prototype.
-
-Fri Sep 26 01:26:24 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a12 ***
- *******************************************************************
-
-Fri Sep 26 00:13:48 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_irix6.h: completely turn off all autofs
- code in irix6 until it can be tested correctly
-
- * conf/transp/transp_tli.c (amu_clnt_create_best_vers): time out
- on clnt_create for 3 seconds, rather than wait for the much longer
- default.
-
- * conf/nfs_prot/nfs_prot_aix4_2.h: port to powerpc-ibm-aix4.2.1.0.
- Includes NFS3, untested.
-
-Thu Sep 25 11:03:11 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/ops_pcfs.c (mount_pcfs): fill in uid/gid fields of
- pcfs_args_t if they exist.
-
- * amd/ops_cdfs.c (mount_cdfs): fill in ssector field of
- cdfs_args_t if it exists.
-
- * new minor ports hppa1.1-hp-hpux10.10, hppa1.1-hp-hpux9.05,
- hppa1.1-hp-hpux9.07, m68k-hp-hpux9.00, and sparc-sun-sunos4.1.4.
-
-Wed Sep 24 00:48:05 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * doc/am-utils.texi (wire-test): updated documentation for the new
- option.
-
- * wire-test/wire-test.8: updated man page for new option.
-
- * wire-test/wire-test.c (main): added a test for various
- combinations of NFS proto/vers to a remote/local host.
-
- * aux/macros/try_compile_anyfs.m4 (AC_TRY_COMPILE): include
- <isofs/cd9660/cd9660_mount.h> and <msdosfs/msdosfsmount.h> so that
- freebsd will correctly set mount options for pcfs and cdfs.
-
- * amd/ops_pcfs.c (mount_pcfs): set mask field of pcfs_args to
- 0777 (if field exists).
-
- * aux/macros/try_compile_anyfs.m4 (AC_TRY_COMPILE): include
- <msdosfs/msdosfsmount.h> if available.
-
- * minor new port: rs6000-ibm-aix4.1.4.0.
-
- * libamu/mount_fs.c (mount_fs): fixed bug that caused HPUX not to
- write the "time" field in /etc/mnttab.
-
- * conf/mtab/mtab_file.c (mnt_dup): fixed typo in macro names for
- detecting mnt_time field of mntent_t.
-
- * libamu/mtab.c (mnt_free): fixed typo in macro names for
- detecting mnt_time field of mntent_t.
-
-Tue Sep 23 15:30:03 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/mtab/mtab_file.c (lock): Use flock() in preference over
- fcntl() to lock the mtab file.
-
-Mon Sep 22 23:04:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/transp/transp_sockets.c (get_nfs_version): define
- the try_again goto label only for NFS3.
- (pmap_ping): assume timeout failure of clnt_stat.
-
- * libamu/xdr_func.c (xdr_groupnode, xdr_exportnode): cast to
- "groups *".
-
-Mon Sep 22 20:34:33 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * conf/transp/transp_sockets.c (pmap_ping): patch from Dan Riley
- <dsr@mail.lns.cornell.edu> to make sure that amd works with more
- secure portmappers that do not allow forwarding of RPC messages to
- other services.
-
- * */Makefile.am: all source files should also depend on the new
- include/am_xdr_func.h header.
-
- * include/am_xdr_func.h: new file as part of the code cleanup from
- Christos Zoulas <christos@deshaw.com>.
-
- * Lots of fixes from Christos Zoulas <christos@deshaw.com> that
- involved missing prototypes, cleaned up ones, and removal of
- unused variables.
-
- * libamu/xdr_func.c (xdr_mountres3): some code cleanup. A switch
- statement with only one case is unclean.
-
-Mon Sep 22 17:26:38 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/ops_<FOO>fs.c (mount_<FOO>fs): initialize mntent_t fields to
- 0 so that all fields are initialized to zero at first. This way
- SunOS 4.x and other systems don't get /etc/mtab entries with
- random integers for the fsck/freq fields. Patch from Andreas
- Stolcke <stolcke@speech.sri.com>.
-
-Mon Sep 22 00:34:19 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_sunos4.h: include <nfs/nfs_clnt.h> so
- that the important definition for HOSTNAMESZ will be found.
-
- * amd/ops_afs.c (mount_toplvl): limit hostname size to HOSTNAMESZ
- (inside the nfs_args structure) if the system uses that macro.
- Otherwise systems like SunOS refuse to NFS mount long pathnames
- and result in ENAMETOOLONG errno's.
-
-Wed Sep 17 04:56:11 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * doc/am-utils.texi (Supported Platforms): specify new support for
- solaris 2.6, and hlfsd running on 2.5.1 too.
-
-Wed Sep 17 03:55:02 1997 Erez Zadok <ezk@amsterdam.psl.cs.columbia.edu>
-
- * conf/mount/mount_svr4.c (mount_svr4): don't attemt an autofs
- mount if it is not supported or was turned off.
-
-Wed Sep 17 03:19:36 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_sunos4.h: fixed so that it will nfs mount
- again. Apparently at some previous release SunOS 4 supported was
- broken and all nfs mounts resulted in ESTALE.
-
-Wed Sep 17 00:26:25 1997 Erez Zadok <ezk@amsterdam.psl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_sunos5_6.h: nfs protocol headers for
- solaris 2.6.
-
- * aux/macros/check_nfs_prot_headers.m4: added solaris 2.6 nfs
- protocol header selection.
-
-Sat Sep 13 14:31:51 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/transp/transp_tli.c (amu_clnt_create_best_vers): avoid
- infinite loop.
-
-Sun Sep 7 18:23:23 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a11 ***
- *******************************************************************
-
-Fri Sep 5 11:55:10 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/amd.c (main): if plock() succeeded, don't try to display
- errno message. Patch from Chris Metcalf
- <metcalf@catfish.lcs.mit.edu.
-
-Thu Sep 4 19:17:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * hlfsd/homedir.c (table_add): make sure duplicate passwd entries
- are ignored. Only the first entry should ever be used, because
- that's how lookup in passwd database works.
-
- * conf/transp/transp_sockets.c (get_nfs_version): when determining
- if a remote host is up or down, use NFS v.2. Fix suggested by
- Enami Tsugutomo <enami@cv.sony.co.jp>.
-
- * conf/transp/transp_tli.c (amu_clnt_create_best_vers): new
- function to get the best possible NFS version, but also timeout
- faster than normal defaults, so remote hosts which are down can be
- detected in a reasonable time.
- (get_nfs_version): use the new "best" function.
-
-Tue Sep 2 00:41:00 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a10 ***
- *******************************************************************
-
-Mon Sep 1 15:39:51 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/transp/transp_tli.c (get_nfs_version): don't use
- clnt_tp_create_timed() on systems that don'e have it (Solaris 2.4
- and earlier).
-
- * aux/configure.in: test for existence of clnt_tp_create_timed(),
- since Solaris 2.4 (and possibly earlier) do not have it.
-
-Mon Sep 1 15:23:18 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu>
-
- * amd/ops_autofs.c (autofs_unmount_1_svc): only display rdevid
- field if it exists (solaris 2.4's autofs does not have it).
-
-Mon Sep 1 14:45:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/macros/type_auth_create_gidlist.m4: a new test to determine
- the correct type to the 5th argument of authunix_create().
-
-Mon Sep 1 03:44:32 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu>
-
- * libamu/xdr_func.c (xdr_umntrequest): add test for autofs
- structure umntrequest, if it has the field rdevid. Seems Solaris
- 2.4 and earlier didn't have it.
-
-Mon Sep 1 01:10:53 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * hlfsd/hlfsd.c (hlfsd_init): moved initialization upwards, so it
- can be done before primary process forks.
- (main): bug fix: wait a bit to give child a chance to initialize.
- Without this, hlfsd got into a busy infinite loop while, never
- completing the mount.
-
- * amd/info_nis.c: patch from Jason Thorpe <thorpej@nas.nasa.gov>
- to make amd works when talking to NIS+ servers in NIS
- compatibility mode.
-
-Mon Sep 1 00:46:56 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/mapc.c (MAX_CHAIN): increased maximum chain size to 1024.
-
-Sun Aug 31 20:20:40 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/conf.c (gopt_fully_qualified_hosts): a new function to
- process another new global variable.
-
- * amd/ops_nfs.c (make_nfs_auth): if a new global variable
- fully_qualified_hosts is on, use FQHN in RPC/NFS authentications.
- Patch from Chris Metcalf <metcalf@catfish.lcs.mit.edu>.
-
- * amd/conf.c (process_last_regular_map): If the amd.conf file only
- has a [global] section (pretty useless IMHO), do not try to
- process a map that does not exist.
-
- * scripts/amd.conf.5: fixed typos (repeated 'as' word).
-
- * doc/am-utils.texi: MAJOR DOCUMENTATION REVISION COMPLETED!!!
-
- * amd/conf.c (reset_cf_map): Bug fix. Reset 'tag' field of cfm
- structure, so it does not carry over from map entry to another.
-
-Sat Aug 30 18:39:21 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/amd.c (main): fixed the meaning of the plock option. A bug
- caused it to be reversed.
-
-Sat Aug 30 15:13:18 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * hlfsd/stubs.c: don't initialize some statics here. They are
- better initialized in hlfsd_init_filehandles().
-
-Fri Aug 22 14:47:16 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/conf.c (gopt_show_statfs_entries): new function and a global
- amd.conf key show_statfs_entries. Defaults to 'no'. If 'yes',
- then all maps flagged as browsable will also show a count of the
- number of entries (keys) in that map.
-
- * amd/nfs_subr.c (count_map_entries): new function to count number
- of entries in a map. Now used if browsable is turned on in a map,
- to return a count of available keys in a given map.
-
- * hlfsd/stubs.c (eq_fh): use correct memcmp(). BUG fixed! hlfsd
- confused the file handles for ".", "..", and the symlink, causing
- mess.
-
- * aux/macros/func_bad_memcmp.m4: new test, based on autoconf 2.12,
- but also defines HAVE_BAD_MEMCMP, so I avoid linkage conflicts
- with bad memcmp() in libc's (nextstep3).
-
-Thu Aug 21 17:38:41 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/configure.in: check if autofs_args_t has a field named
- addr. Solaris has it for specifying the address of the daemon,
- but Irix does not. So how does irix tell the kernel the daemon's
- address? I suspect that it is hardcoded to "localhost" using a
- "private well-known port" (#define AUTOFS_PORT 2048).
-
- * conf/nfs_prot/nfs_prot_linux.h: added missing autofs
- definitions.
-
- * README.autofs: new file listing autofs support notes
-
- * very preliminary autofs code working. Call it pre-alpha
- quality.
-
-Sun Aug 17 02:25:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/conf.c (ropt_mount_type, gopt_mount_type): don't accept
- "autofs" if system does not support it.
-
- * amd/amd.c (main): log am-utils version string (same as amd -v)
- at start of run.
-
- * conf/transp/transp_sockets.c (get_nfs_version): in order to tell
- if a remote host is available, try to contact its portmapper and
- timeout if no answer is received in 3 seconds.
-
-Thu Aug 14 16:12:04 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/macros/check_extern.m4 (pattern): use a simpler pattern for
- match for external function definitions. The function could span
- multiple lines, so only match the opening parenthesis, not the
- closing one too.
-
- * aux/macros/os_cpp-flags.m4 (ac_cv_os_cppflags,): do NOT turn on
- posix mode for nextstep3. It is broken.
-
- * amd/amd.c (init_global_options): run uname() only if
- <sys/utsname.h> and uname(2) exist.
-
- * amd/rpc_fwd.c (fwd_packet): if remote host is down, the
- forwarding socket is null, so declare this an error.
-
- * include/am_utils.h (AM_ERRNO_HOST_DOWN): find best errno to set
- for when a remote host is down. Try, in order, "host down", "host
- unreachable", "invalid argument".
-
- * amd/ops_nfs.c (discard_fh): don't dereference a null pointer
- (happens when remote host is down, and fp->fh_fs is NULL).
- (prime_nfs_fhandle_cache): ditto, and set fs flags to !FSF_VALID
- and FSF_DOWN.
-
- * amd/sched.c: nobody uses "union wait" any more, or so it
- appears, so clean up that code.
-
- * conf/transp/transp_tli.c (get_nfs_version): if remote host is
- down, time it out faster than default (3 seconds).
- (get_mount_client): free netconfig entry when done with it.
-
- * conf/nfs_prot/nfs_prot_nextstep.h: initial (and somewhat ugly)
- port to nextstep3 (m68k-next-nextstep3).
-
- * fsinfo/Makefile.am (LDADD): needs to link with libamu in case
- system does not have strdup().
-
- * include/am_defs.h: complete external definition for getlogin()
- if needed.
-
- * conf/transp/transp_tli.c (get_nfs_version): no need to keep
- static versout variable.
-
- * amd/rpc_fwd.c (fwd_packet): if fwdto packet is null, remote
- server is probably down. Don't use sendto() in that case.
-
- * buildall (default): run gmake if found, before trying plain
- make. GNU make is always preferable.
-
-Tue Aug 12 21:23:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/macros/host_macros.m4: cleanup of os_version and os
- overrides. Solaris 2.5.1 for example will come up as solaris2 and
- 2.5.1, rather than sunos5 and 5.5.1. Both can be overridden in
- the amd.conf file.
-
-Fri Aug 8 14:37:30 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a9 ***
- *******************************************************************
-
-Thu Aug 7 00:52:14 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_ncr2.h: new file, for NCR2
- (i486-ncr-sysv4.3.03) headers. Needed to complete missing stuff
- from <ndbm.h> and <sys/resource.h>.
-
- * scripts/amd.conf.5: new map page.
-
- * amd/info_hesiod.c: define extern for hesiod_resolve, since bsdi3
- does not.
-
- * amd/amd.8: updated man page.
-
- * amd/get_args.c (get_args): removed defunct -h option to amd.
-
- * amq/amq.8: updated man page.
-
- * amd/info_nisplus.c (nisplus_search): prototype fixes so Sun
- SparcCompiler CC won't complain.
-
- * amd/info_hesiod.c (hesiod_search): small fixes to compile with
- hesiod-1.3, as per Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>.
-
- * aux/macros/opt_ldflags.m4: new option added to configure
- --enable-ldflags, to specify -L option for configuring/compiling.
- The older one --enable-libs is now to be used only for -l options.
-
- * amd/ops_nfs.c (mount_nfs_fh): bug fixed. Should initialize
- nc_protoname from nfs_proto if available for all TLI systems, not
- just those that have NFS V3.
-
- * amd/info_ldap.c: ldap patches from Leif Johansson
- <leifj@matematik.su.se>, adding two new amd.conf ldap variables:
- ldap_cache_seconds and ldap_cache_maxmem.
-
- * hlfsd/hlfsd.c (main): bug fixed. port number must be wrapped in
- htons().
-
-Sun Aug 3 17:20:05 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/nfs_start.c (mount_automounter): register amd with the rpc
- program number that may have been overridden by amd.conf.
-
- * libamu/xutil.c (set_amd_program_number, get_amd_program_number):
- allow storing and retrieving alternate amd program numbers.
-
- * amd/conf.c (gopt_portmap_program): new function to parse
- amd.conf entry portmap_program=1234.
-
- * amq/amq.c (main): allow specifying an alternate rpc program
- number for amd via -P prognum.
-
- * new amq RPC to get the process id of the running amd. This is
- used in ctl-amd to quickly find the pid of the amd that is to be
- killed.
-
- * expanded shared libraries support. Using GNU libtool-1.0,
- am-utils now builds shared libraries on many platforms that have
- support for it and proper compilers/linkers. See "INSTALL" file
- for compatibility chart.
-
-Thu Jul 31 13:07:23 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * fsinfo/fsi_lex.l: removed code that was in support of very old
- versions of flex. No longer needed.
-
-Tue Jul 29 12:00:13 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/amd.c (init_global_options): find the kernel architecture
- from uname() if possible.
-
-Mon Jul 28 03:53:59 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * new working port: i386-unknown-openbsd2.1
-
-Fri Jul 25 03:16:31 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu>
-
- * working port: sparc-sun-solaris2.4. Had to fix fhandle_t from
- structure to actual char[], because the structure was passed to
- xdr_fhandle as data and not a pointer. Surprisingly, gcc
- -fpcc-struct-return did not help.
-
- * conf/nfs_prot/nfs_prot_sunos5_4.h: special nfs protocol
- definitions for solaris 2.4 have to be different from 2.3, and
- different from 2.5.
-
- * libamu/xdr_fhstatus.c (xdr_fhstatus): minor code cleanup.
-
-Thu Jul 24 16:22:39 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/mount/mount_svr4.c (mount_svr4): use STREQ to compare mount
- types, not ==. Fix from Christos Zoulas <christos@deshaw.com>.
-
- * mk-amd-map/mk-amd-map.8: man page taken from bsd44.
-
-Thu Jul 24 00:01:55 1997 Erez Zadok <ezk@moisil.cs.columbia.edu>
-
- * conf/mount/mount_linux.c: made the nfs error mapping code into a
- small function.
-
-Wed Jul 23 16:11:49 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_linux.h (NFS_ERROR_MAPPING): special
- error mappings from errno numbers to NFS errors. From Debian
- Linux.
-
- * scripts/am-eject.in (fs): new script (taken from Debian Linux
- folks) to auto-unmount floppy/cd devices before ejecting them.
-
- * fsinfo/wr_exportfs.c (write_exportfs): from Debian folks, pass
- '5' as second arg to show_area_being_processed. I'm not sure why.
-
- * fsinfo/wr_atab.c (write_atab): from Debian folks, pass '5' as
- second arg to show_area_being_processed. I'm not sure why.
-
- * conf/mount/mount_linux.c (parse_opts): as per Debian Linux,
- ensure that you have a buffer in *xopts to strcat onto.
- (mount_linux): fixed from Debian folks to ensure that NFS mount
- sockets are connected only for kernels prior to 1.3.10 (avoids
- hangs for multi-homed hosts).
-
- * amd/mapc.c (make_entry_chain): from Debian folks: don't skip
- over amd map keys that have a prefix, and include the prefix in
- the returned readdir().
-
- * amd/info_passwd.c (passwd_init, passwd_search): format
- enhancements from the Debian Linux folks. They added
- - var0:=pw-prefix:=anydir
- - var1:=pw-rhost:=dom3.dom2.dom1
- - var2:=pw-user:=user
- - var3:=pw-home:=/anydir/dom1/dom2/dom3/user
-
- * new ports: sparc-sun-solaris2.4 and sparc-sun-sunos4.1.1.
-
- * amd/ops_afs.c (afs_retry): patches from Debian Linux. If
- afs_mount timed out, then explicitly forbid further retries after
- the timeout. (afs_bgmount): buf fix from Debian Linux. Timeout
- values (17 and 5) were mistakenly swapped.
-
-Wed Jul 23 15:53:25 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_sunos5_3.h: turn off non-existent NFS V.3
- support for Solaris 2.4 (the header files incorrectly define parts
- of the NFS V.3 protocol, but the kernel does not support it).
-
-Wed Jul 23 00:07:12 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/info_hesiod.c: minor cleanup to use hes_init and hesiod_init
- for determining if using old or new hesiod libraries,
- respectively.
-
- * amd/ops_nfs.c (mount_nfs_fh): If "noconn" option exists in NFS
- V.3 then use non-connected sockets (both TCP and UDP). Otherwise
- they cause hangs of mounts from multi-homed hosts when the return
- route is not the same as the outgoing route (esp. on NetBSD
- 1.2.1). If "conn" option was supplied, then don't turn on the
- "noconn" mount option. Otherwise default to "noconn" mount
- option.
-
- * aux/configure.in: better check for systems that need libgdbm and
- <ndbm.h>
-
-Tue Jul 22 04:02:05 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * hlfsd/hlfsd.c (main), amd/ops_afs.c (mount_toplvl): ensure that
- mounts are hidden from df(1) on systems that keep mount tables in
- kernel, such as osf1.
-
-Tue Jul 22 02:26:55 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a8 ***
- *******************************************************************
-
-Mon Jul 21 21:33:19 1997 Erez Zadok <ezk@stone.mcl.cs.columbia.edu>
-
- * hlfsd/hlfsd.c (main): bug fixed: forgot to set sin_family to
- AF_INET when hlfsd mounts itself, thus getting an errno "protocol
- family not supported".
-
-Mon Jul 21 20:46:59 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * verified that amd on NetBSD 1.2.1 (i386) works, but the OS
- itself is flaky.
-
- * verified that amd AIX 3 works w/ the new readdir() code.
-
-Mon Jul 21 18:59:30 1997 Erez Zadok <ezk@chestnut.mcl.cs.columbia.edu>
-
- * amd/mapc.c (maptypes): changed the default map caching type for
- nis and ndbm maps to "MAPC_ALL", so that all possible entries will
- be available to amd for browsable_dirs=yes.
-
-Mon Jul 21 18:04:16 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/ops_afs.c (afs_readdir, afs_readdir_browsable): split
- afs_readdir into a browsable version and a non-browsable one.
- Fixed bugs that resulted in an infinite nfs_readdir loop on the
- localhost for some operating systems.
-
-Sat Jul 19 19:38:38 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/ops_afs.c (afs_readdir): fixed up the browsable code to
- comply with nfs_readdir specs. It was returning all entries at
- once, even if there was not enough space in the RPC packet. Now,
- it sends a reasonably sized chunk, and sets static state to resume
- it for the next continuation RPC of readdir.
-
- * amd/conf.c (set_conf_kv): fixed bug that resulted in the first
- regular map not getting all of the [global] options defaulted from.
-
-Fri Jul 18 00:45:12 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amq/amq.c (main): fixed so that portmapper "ping" will only fail
- upon an RPC timeout
-
- * scripts/ctl-{amd,hlfsd}.in (killproc): better method to find the
- amd/hlfsd process to kill.
-
- * amd/ops_afs.c (mount_toplvl), hlfsd/hlfsd.c (main): code to
- determine how to avoid df from seeing amd's toplvl mounts. Moved
- from libamu/mount_fs.c and include/am_utils.h. Ensure that hlfsd
- is hidden from df.
- (mount_toplvl): fixed df types for irix.
-
-Thu Jul 17 21:59:45 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu>
-
- * amq/amq.c (main): fixed bug that caused the 5 second timeout for
- TLI amq using udp to be ignored.
- (main): if amq cannot contact remote host's portmapper within 5
- seconds, timeout and fail faster than the default longer timeout
- (this is for non-TLI systems).
-
-Thu Jul 17 17:08:13 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amq/amq.c (get_secure_amd_client): if amq cannot contact
- remote host's portmapper within 5 seconds, timeout and fail faster
- than the default TLI timeout of over 4 minutes.
-
- * amd/am_ops.c (ops_showfstypes): added styles for new bsd44
- file systems nullfs, unionfs, and umapfs.
- (ops_show1): cleanup code and and reuse this function.
- (vops): empty placeholders for nullfs, unionfs, and umapfs.
-
- * amd/ops_{nullfs, unionfs, umapfs}.c: 3 new empty templates for
- bsd44 style file systems.
-
- * fsinfo/fsinfo.8: man page for fsinfo rewritten from bsd44
- sources.
-
- * amd/conf_tok.l, fsinof/fsi_lex.c: undefine ECHO to avoid
- conflict with systems that define it in <sys/ioctl.h> and also
- define a conflicting one via lex. Newer versions of f/lex are ok.
-
-Wed Jul 16 00:17:45 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/ops_nfs.c (mount_nfs_fh): fill in nfs_args' fields
- acdirmin/max and acregmin/max only if they exist.
-
- * aux/configure.in: test for nfs_args fields acdirmin and
- acregmin.
-
-Tue Jul 15 17:24:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/configure.in: commented out checking for MNT2_GEN_OPT_* for
- "nondev" and commented back in checking for "nodev". This was a
- typo.
-
- * include/am_compat.h: more compatibility options: define "ro"
- mnttab option all the time. Define "overlay" as needed. Added
- more fillers of mnttab options (as per Daniel S. Riley
- <dsr@mail.lns.cornell.edu>), for acdirmax, acdirmin, acregmax,
- acregmin, noac, grpid, nosuid, and actimo.
-
- * libamu/mount_fs.c (mnt_flags): fixed a typo in "ro" option as
- per dsr@mail.lns.cornell.edu (Daniel S. Riley). Then cleaned up
- the same code for other options in struct opt_tab.
-
-Mon Jul 14 22:36:37 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/get_args.c (get_args): moved amd.conf file parsing to before
- the switching the default log/debug options. Suggested by
- dsr@mail.lns.cornell.edu (Daniel S. Riley).
-
- * aux/update_build_version: new script to record the build version
- of amd, along with the rest of the info thet comes up with amd -v.
-
-Sun Jul 13 00:30:24 1997 Erez Zadok <ezk@decca.damtp.cam.ac.uk>
-
- * aux/macros/os_cflags.m4: new macro, to add additional
- compilation options (also used during configuration), based on the
- OS and the compiler. Used for solaris-2.6, osf, and irix6.
-
-Fri Jul 11 10:15:11 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/conf_tok.l, conf_parse.y: allow values of keys to include
- white spaces, if they are double-quoted (key="some value")
-
- * amd/info_hesiod.c (hesiod_search): cleanup and minor bug fixes
- of hesiod from Danny Braniss <danny@cs.huji.ac.il>.
-
-Fri Jul 11 02:16:06 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a7 ***
- *******************************************************************
-
-Thu Jul 10 12:19:25 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * include/am_defs.h: fill in extern definition of innetgr() in
- case system headers don't.
-
- * aux/macros/path_prog_lex.m4 aux/configure.in: using macros that
- will show the full pathname to yacc/bison and f/lex. Some systems
- have older or bad versions of those and this way the user will
- know for sure what is being invoked.
-
- * tasks: file populated with todo items.
-
- * scripts/amd2ldif.in: Script to convert amd maps to plain text
- LDAP object files. Contributed by Leif Johansson
- <leifj@matematik.su.se>.
-
- * aux/config.guess: added recognition for sun3's running 4.2bsd,
- from Tom Schmidt <tschmidt@micron.com>. Fixed one small typo.
-
- * amd/conf.c: several variables that were local to a map, were
- also added to [global], where they apply to all maps. Each map
- can then individually override those defaults. Flags
- affected: browsable_dirs and mount_type. Options affected:
- map_type, map_options, and search_path.
-
- * amd/amd.h: eliminated several global flags each of which took an
- int, in favor of one global flags variable used as a bit field.
-
- * amd/amd.c (init_global_options): moved all global variables into
- a single struct amu_global_options, so it is easier to add new
- ones and/or identify existing ones.
-
- * amd/get_args.c (get_args): removed unused amd -m option.
-
- * amd/conf.c (gopt_cluster): added new amd.conf option for cluster
- name, same as amd -C.
-
- * amd/info_ldap.c: LDAP info map functions from Leif Johansson
- <leifj@matematik.su.se>.
-
- * amd/conf.c (gopt_ldap_base, gopt_ldap_hostports): put in global
- amd.conf options for ldap_base and ldap_hostports.
-
- * amd/opts.c (f_netgrp): new amd map function netgrp(ARG) to test
- if the current host is in the ARG host netgroup.
-
- * aux/configure.in: some systems replaced dbm in libc with GNU's
- libgdbm, so check for libgdbm, but only if dbm_open is not in
- libc already. This was a recommendation from Tom Schmidt
- <tschmidt@micron.com>.
-
- * conf/nfs_prot/nfs_prot_sunos5_3.h: port to sparc-sun-solaris2.3
- completed.
-
-Wed Jul 9 18:14:59 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * port to sparc-unknown-netbsd1.2E done, not tested. Includes NFS
- V.3.
-
-Tue Jul 8 17:35:07 1997 Erez Zadok <ezk@elk.mcl.cs.columbia.edu>
-
- * port to i386-unknown-freebsd3.0 done and working. Includes NFS
- V.3.
-
- * aux/macros/check_nfs_fh_dref.m4: freebsd3 should use
- file handle dereferencing style similar to freebsd22.
-
- * include/am_defs.h: need to include <net/if_var.h> before
- <netinet/if_ether.h> on freebsd3.
-
- * conf/nfs_prot/nfs_prot_freebsd3.h: new protocol header additions
- for freeBSD 3.0.
-
-Tue Jul 8 16:53:41 1997 Erez Zadok <ezk@moisil.cs.columbia.edu>
-
- * amd/info_nis.c (nis_reload): cast nis' callback function so
- picky compilers won't complain.
-
- * libamu/xdr_mountres3.c (xdr_mountres3): make sure this function
- gets compiled only if the system has NFS V3 and does not have
- xdr_mountres3.
-
-Tue Jul 8 12:42:03 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * COPYING: put in some legal stuff in this file.
-
-Mon Jul 7 19:10:44 1997 Erez Zadok <ezk@prometheus.soscorp.com>
-
- * NFS V3 now works under Irix5, thanks to patches from
- Andreas Stolcke <stolcke@speech.sri.com>.
-
- * conf/mount/mount_irix5.c: sparate mount_irix.c into an irix5
- version and an irix6 version, since irix5's NFS V3 code is broken
- and hacky.
-
- * amd/info_hesiod.c (hs_zone_transfer): minor fixes to buffer
- sizes for some hesiod queries. Patch from Danny Braniss
- <danny@cs.huji.ac.il>.
-
-Mon Jul 7 19:04:14 1997 Erez Zadok <ezk@glory.soscorp.com>
-
- * amd/ops_nfs.c (mount_nfs_fh): fixed NFS V.3 support for bsdi3.
-
-Sun Jul 6 14:22:24 1997 Erez Zadok <ezk@glory.soscorp.com>
-
- * aux/{configure.in,acconfig.h}: added checks for struct
- nfs_args's fields proto and sotype (bsdi3).
-
- * amd/ops_nfs.c (mount_nfs_fh): added nfsv3 option to
- nfs_args.flags for bsdi3. Set field proto to 0. Set sotype field
- to SOCK_STREAM or SOCK_DGRAM.
-
- * aux/macros/check_mount_style.m4: add case for bsdi3.
-
- * amd/info_hesiod.c: got hesiod support for bsdi3.
-
-Sun Jul 6 11:14:47 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/configure.in: look for hesiod on libc (bsdi3)
-
- * amd/get_args.c (get_args): reformat usage so it fits in 80
- columns.
-
- * scripts/ctl-amd.in: changed directory name for optional tftpboot
- map to /tftpboot/.amd.
-
-Sat Jul 5 17:46:45 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a6 ***
- *******************************************************************
-
-Sat Jul 5 03:17:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * scripts/ctl-amd.in: include -T tag for tftpboot.
-
- * new port: mips-sgi-irix5.3. Compiled with gcc, but NFS V3 code
- is broken and needs work on the specific nfs_args that irix5 uses
- for V3 mounts.
-
-Sat Jul 5 01:44:25 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/get_args.c (get_args): new options amd -T tag. A map with
- tag=foo matching the -T tag will be processed. All untagged maps
- get processed all the time.
-
-Fri Jul 4 16:19:26 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/configure.in: need to check for strcasecmp in libucb (ncr2)
-
- * aux/macros/check_os_libs.m4: a new macro to set the usage of
- libnsl and libsocket based on the OS.
-
- * libamu/mount_fs.c (mnt_flags): used MNTTAB_OPT_GRPID if it is
- defined (problem on osf4).
-
- * conf/nfs_prot/nfs_prot_irix5.h: new file for irix5 headers.
-
- * include/am_defs.h, aux/macros/try_compile_nfs.m4,
- aux/macros/mount_headers.m4: do include <sys/proc.h> because it
- failes on irix5. Rather, put in the individual
- conf/nfs_prot/nfs_prot_*.h headers.
-
- * amd/conf.c: AIX3 doesn't like strdup() being passed a constant
- char*, so cast all strdup()'s args to a non-const char*.
-
- * amd/mapc.c (root_newmap): don't try to strdup only a "const
- char *".
-
-Fri Jul 4 15:47:10 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_sunos4.h: added rpc/rpc.h and
- sys/errno.h.
-
-Thu Jul 3 17:49:00 1997 Erez Zadok <ezk@prometheus.soscorp.com>
-
- * made sure am-utils compiles, links, and runs properly on Irix
- 6.2 using "cc -32 -Wl,-woff,"
-
- * aux/macros/check_lib2.m4: a bug fix version to autoconf 2.12
- AC_CHECK_LIB. If OTHER-LIBRARIES are defined and used, then add
- them to $LIBS.
-
- * aux/configure.in: some cleanup of which libraries are needed.
- Espectially ensure that libnsl is included only on Solaris, where
- so far it is the only system on which it is absolutely necessary.
- Also no longer need to include libc explicitly.
-
- * amd/amd.c,wire-test/wire-test.c (main): convert IP address to
- network-long order before printing it.
-
- * wire-test/wire-test.c (main): also check and report on the IP
- address of the local host, since some systems have bad versions of
- get_myaddress, or ones that conflict with other versions in
- multiple libraries (SunOS 4 and Irix especially).
-
-Wed Jul 2 18:19:02 1997 Erez Zadok <ezk@starblazers.soscorp.com>
-
- * scripts/ctl-amd.in: don't use full pathname so killproc() works
- better. Also run bsd44 and irix style ps programs.
-
- * aux/macros/check_lib_funcs.m4: bug fixed: used to define usage
- of library no matter if it was found or not.
-
-Wed Jul 2 02:11:48 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * aux/macros/check_mnt2_gen_opt.m4: turned back on the checking
- for M_* macros, but ensure that <sys/stream.h> is not included at
- all so it won't conflict with other M_* macros.
-
-Tue Jul 1 21:16:51 1997 Erez Zadok <ezk@mako.cs.columbia.edu>
-
- * conf/mount/mount_irix.c (mount_irix): first arg to mount(2) on
- irix should be "spec" (host:/path), not the dir of the mnt point.
-
- * amd/ops_afs.c (afs_lookuppn): bug in enable_default_selectors
- fixed. If on, it essentially ignored the setting in a
- selector-controlled /defaults if there were 2 or more entries in it.
-
-Tue Jul 1 12:23:38 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * scripts/ctl-{amd,hlfsd}.in (killproc): if failed to find process
- using BSD style ps, then try SVR4 style ps.
-
- * include/am_utils.h (amuDebug): renamed Debug macro to amuDebug
- etc., to avoid conflicts with similar named macros in <ldap.h>.
-
- * aux/configure.in, amd/info_ldap.c, etc.: put in all the autoconf
- support needed for LDAP. Now the code has to be written mostly in
- amd/info_ldap.c.
-
- * Included additional patches from Andreas Stolcke
- <stolcke@speech.sri.com> to support using the best possible
- combination of NFS version (2,3) and protocol (udp,tcp) for any
- given host, since it appears that some Irix versions have NFS V3,
- but do not support TCP.
-
- * scripts/ctl-amd.in: updated amd control script to look for and
- use amd.conf file.
-
-Tue Jul 1 00:28:23 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/mapc.c (mapc_create): now, each map in the amd.conf can be
- initialized off of a different type, or default to cycling through
- all maps until one of them matches.
-
-Mon Jun 30 20:49:13 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/ops_afs.c (afs_readdir): per-map browsing (readdir) done.
- if browsable_dirs=yes is set in the map section in amd.conf, that
- map will return all entries back to a readdir(2).
-
-Sun Jun 29 16:22:11 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * rudimentary amd.conf file support included. You may even
- override things like os=sos5, to get "backwards" compatibilty with
- upl102.
-
-Sat Jun 28 13:35:02 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/conf.c: new file to process amd.conf file.
-
- * amd/get_args.c (get_args): new options -H to print help.
-
- * moved enable_default_selectors to be amd.conf controlled, and
- not compiler controlled.
-
- * amd/get_args.c (get_args): new options -F <conf-file> to parse an
- amd configuration file.
-
-Wed Jun 25 23:15:42 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * converted all files that used strcmp() == 0 or != 0 to using
- the STREQ() macro.
-
-Mon Jun 23 22:31:14 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * aux/macros/check_lib_funcs.m4: new M4 macro that can be used to
- search for any number of functions in any given library.
-
-Mon Jun 23 01:04:23 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/mapc.c: Included patch from Leif Johansson
- <leifj@matematik.su.se> to ensure that systems without an RE
- library can compile.
-
- * libamu/mount_fs.c (mount_fs): Included patch from Andreas
- Stolcke <stolcke@speech.sri.com>, to ensure that mount options on
- table are properly delimited by a comma.
-
- * amd/ops_nfs.c (mount_nfs_fh): Included patch from Andreas
- Stolcke <stolcke@speech.sri.com>, to allow users to override the
- proto= and vers= mount options.
-
-Sun Jun 22 01:00:11 1997 Eric Dana (edana@ncr2.bgs.com)
-
- * conf/nfs_prot/nfs_prot_svr4.h: port completed to
- i486-ncr-sysv4.3.03. Assorted source cleanups done.
-
- * include/am_defs.h, aux/macros/mount_headers.m4: don't include
- mnttab.h if sys/mnttab.h was already included, because on ncr2,
- they contain conflicting entries for struct mnttab.
-
-Sat Jun 21 23:52:15 1997 Eric Dana (edana@ncr2.bgs.com)
-
- * aux/macros/check_nfs_prot_headers.m4: added support for ncr2.
-
-Fri Jun 20 06:14:17 1997 Erez Zadok <ezk>
-
- * amd/*.c: lots of 64-bit "ugly" ports like casts to long ints.
-
- * aux/macros/struct_nfs_fh.m4: check for "struct nfssvcfh" because
- on DU-4.0 it is better than the next one to be picked (nfsv2fh_t).
-
-Wed Jun 18 18:59:49 1997 Erez Zadok <ezk@defiant.soscorp.com>
-
- * aux/macros/struct_nfs_fh.m4 (AC_TRY_COMPILE_NFS): check for
- nfsv2fh_t before fhandle_t becasue on bsdi2.1 the former is
- better.
-
-Tue Jun 10 17:06:58 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/rpc_fwd.c (fwd_packet): TLI bug fix. if fwdto socket is
- NULL, set the maxlen and len fields in netbuf to zero.
-
-Wed May 28 22:52:28 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * scripts/fix-amd-map.in (name): replace all matching patterns on
- line.
-
-Sun May 25 19:33:41 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- *******************************************************************
- *** Released am-utils-6.0a5 ***
- *******************************************************************
-
-Sun May 25 13:37:24 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amd/amq_subr.c (amqproc_getvers_1_svc): amq's RPC service
- procedure now returns the full string that amd -v returns.
-
- * amd/get_args.c (get_version_string): new function to return
- complete version/info string so it could be used more flexibly.
-
- * amd/am_ops.c (ops_showamfstypes, ops_showfstypes): put the list
- of Fs types into a string buffer, rather than a FILE*.
-
- * amd/mapc.c (mapc_showtypes): put the list of map types into a
- string buffer, rather than a FILE*.
-
-Sun May 25 01:25:36 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/get_args.c (get_args): amd -v also prints user who built
- amd, hostname built on, and date of configuration.
-
-Sat May 24 13:40:50 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * scripts/lostaltmail.conf-sample: sample lostaltmail
- configuration file.
-
- * scripts/lostaltmail.in: new script lostaltmail used to redeliver
- "lost" mail that hlfsd redirected to a temp location because the
- primary home file system of the user was full.
-
- * scripts/amd2sun.in: new script amd2sun. Used to convert Sub
- automount maps to amd maps.
-
- * scripts/ctl-hlfsd.in: new script ctl-hlfsd. Used to start,
- stop, or restart hlfsd.
-
- * scripts/expn.1: man page for expn command.
-
- * scripts/ctl-amd.in: new script ctl-amd. Used to start, stop, or
- restart amd.
-
- * scripts/expn.in: new script expn. Actually taken from David
- Muir Sharnoff <muir@idiom.com>. Used by hlfsd's mail re-delivery
- script.
-
- * scripts/wait4amd.in: new script wait4amd added. Waits for amd
- to come up on a host, and then runs a command (rsh $hostname by
- default).
-
- * scripts/Makefile.am: new directory now holds all shell/perl
- scripts that belong to am-utils.
-
- * conf/mount/mount_linux.c (parse_opts): new parser for
- linux-specific mounts. Handles fs-type specific mount-options
- correctly. Currently implemented: msdos, iso9660.
-
- * amd/ops_pcfs.c (pcfs_ops): don't timeout cdfs mounts by default
- (fix for linux).
-
- * amd/ops_cdfs.c (cdfs_ops): don't timeout cdfs mounts by default
- (fix for linux).
-
- * amd/mapc.c (make_entry_chain): fixed bug that resulted in amd
- core dumps upon "ls" of a mount point; an invalid pointer was
- being returned and dereferenced.
-
- * port to Linux sparc working!
-
- * hlfsd/homedir.c (hlfsd_diskspace): close file descriptor if
- failed to write test file, or else the fd will leak.
-
-Sun May 18 00:42:41 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * amd/info_hesiod.c (hs_strip_our_domain): use strcasecmp()
- instead of strcmp().
-
- * Port to Digital Unix 4.0 (OSF) done.
-
- * hlfsd/hlfsd.c: renamed dirname to dir_name to avoid conflicts
- with dirname() function in <string.h> on OSF systems.
-
- * fsinfo/fsi_util.c (set_ether_if): take out extern defintion of
- inet_addr(). It should come from <arpa/inet.h> instead.
-
- * conf/mtab/mtab_osf.c: fixed macros and added NFS V3 specs.
-
- * include/am_utils.h: renamed FIRST/LAST to AM_FIRST/AM_LAST to
- avoid conflicts with DU 4.0 system header.
-
-Thu May 15 22:49:12 1997 Erez Zadok <ezk@subzero.cs.columbia.edu>
-
- * libamu/mount_fs.c (mount_fs): pass along NFS version so I can
- determine if to include additional options in the mount table file
- entry (such as proto=tcp, and vers=3).
-
-Thu May 15 00:42:12 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
-
- * libamu/mount_fs.c (mount_fs): include NFS version number in the
- mount table options, as well as proto={tcp,udp}.
-
-Wed May 14 14:30:19 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * NFS V3 code ported to most other systems, so it compiles for V2
- and V3 NFS systems.
-
- * NFS VERSION 3 support, first pass. Working for Solaris and
- using TCP.
-
-Sun May 11 01:14:29 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * amq/amq.c: many newline characters were missing from various
- stderr printfs.
-
-Sat May 10 13:09:06 1997 Erez Zadok <ezk@lorien.cs.columbia.edu>
-
- * conf/nfs_prot/nfs_prot_sunos5.h: protocol defintions for
- Solaris, which include NFS V3 support.
-
- * conf/nfs_prot/nfs_prot_default.h: default NFS protocol headers.
* conf/transp/transp_{tli,sockets}.c (get_mount_client): use NFS
protocol version while getting a mount client.
@@ -6141,7 +5536,7 @@ Thu Dec 19 02:08:35 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
Wed Dec 18 22:20:23 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
* converted the sources to use memset/memmove/memcmp instead of
- bzero/becopy/bcmp.
+ bzero/bcopy/bcmp.
* ran all sources through gnu Indent w/ options specified in
aux/amindent.
@@ -6151,3 +5546,9 @@ Wed Dec 11 22:19:29 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
* At this point the initial genration of config.h via autoconf and
some preliminary makefiles via automake is done. I will not begin
modifying sources, so it's a good time to document from here.
+
+Wed Dec 10 22:19:29 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Initial ChangeLog Entry ***
+ *******************************************************************
diff --git a/contrib/amd/INSTALL b/contrib/amd/INSTALL
index 8a21b41..9824026 100644
--- a/contrib/amd/INSTALL
+++ b/contrib/amd/INSTALL
@@ -9,11 +9,15 @@ SYSTEM AUTOCONF COMPILE RUN SHLIB
========================= ======== ========= ======= =====
alpha-dec-osf2.1 ezk ezk ezk !ezk
alpha-dec-osf4.0 ezk ezk dsr[3] ezk
+alpha-dec-osf4.0f ezk ezk dsr[3] ezk
+alpha-dec-osf5.1 ro ro ro ro
alphaev5-unknown-linux-gnu ezk ezk finkel ezk
alphaev5-unknown-linux-gnu-rh5.2 ezk ezk ezk ezk
-hppa1.0-hp-hpux11.00 ezk ezk ezk
+alphaev6-dec-osf5.0 ezk ezk dsr[3] ezk
+hppa1.0-hp-hpux11.00 ezk ezk ezk ezk
hppa1.1-hp-hpux10.10 ezk ezk ezk ezk
hppa1.1-hp-hpux10.20 ezk ezk ezk ezk
+hppa1.1-hp-hpux11.00 ezk ezk ezk ezk
hppa1.1-hp-hpux9.01 ezk[4] ezk[4] nrh/ezk ezk
hppa1.1-hp-hpux9.05 ezk[4] ezk[4] nrh/ezk ezk
hppa1.1-hp-hpux9.07 ezk[4] ezk[4] nrh/ezk ezk
@@ -23,6 +27,7 @@ i386-pc-bsdi3.0 ezk ezk ezk !ezk
i386-pc-bsdi3.1 ezk ezk ezk !ezk
i386-pc-bsdi4.0 ezk ezk ezk ezk
i386-pc-bsdi4.0.1 ezk ezk ezk ezk
+i386-pc-bsdi4.1 ezk ezk ezk ezk
i386-pc-solaris2.5.1 ezk ezk ezk ezk
i386-pc-solaris2.6 ezk ezk ezk ezk
i386-pc-solaris2.7 ezk ezk ezk ezk
@@ -32,10 +37,13 @@ i386-unknown-freebsd2.2.6 ezk ezk ezk ezk
i386-unknown-freebsd2.2.7 ezk ezk ezk ezk
i386-unknown-freebsd2.2.8 ezk ezk ezk ezk
i386-unknown-freebsd3.0 ezk ezk ezk ezk
+i386-unknown-freebsd4.2 ezk ezk ezk ezk
+i386-unknown-freebsd5.0 ezk ezk ezk ezk
i386-unknown-freebsdelf3.0 ezk ezk ezk ezk
i386-unknown-freebsdelf3.1 ezk ezk ezk ezk
i386-unknown-freebsdelf3.2 ezk ezk ezk ezk
i386-unknown-freebsdelf3.3 ezk ezk ezk ezk
+i386-unknown-freebsdelf3.4 ezk ezk ezk ezk
i386-unknown-freebsdelf4.0 ezk ezk ezk ezk
i386-unknown-netbsd1.2.1 ezk ezk ezk ezk
i386-unknown-netbsd1.3 ezk ezk ezk ezk
@@ -43,6 +51,7 @@ i386-unknown-netbsd1.3.1 ezk ezk ezk ezk
i386-unknown-netbsd1.3.2 ezk ezk ezk ezk
i386-unknown-netbsd1.3.3 ezk ezk ezk ezk
i386-unknown-netbsd1.4 ezk ezk ezk ezk
+i386-unknown-netbsd1.4.1 ezk ezk ezk ezk
i386-unknown-openbsd2.1 ezk ezk ezk ezk
i386-unknown-openbsd2.2 ezk ezk ezk ezk
i386-unknown-openbsd2.3 ezk ezk ezk ezk
@@ -57,11 +66,13 @@ i586-pc-linux-gnu ezk ezk ezk ezk
i586-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
i586-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
i586-pc-linux-gnu-rh6.1 ezk ezk ezk ezk
+i586-pc-linux-gnu-rh6.2 ezk ezk ezk ezk
i586-pc-linux-gnulibc1 ezk ezk ezk ezk
i586-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk
i686-pc-linux-gnu ezk ezk ezk ezk
i686-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
i686-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
+i686-pc-linux-gnu-rh6.2 ezk ezk ezk ezk
i686-pc-linux-gnulibc ezk ezk ezk ezk
i686-pc-linux-gnulibc1 ezk ezk ezk ezk
m68k-hp-hpux9.00 ezk[4] ezk[4] nrh/ezk
@@ -87,6 +98,7 @@ sparc-sun-solaris2.5 ezk ezk ezk ezk
sparc-sun-solaris2.5.1 ezk ezk ezk ezk
sparc-sun-solaris2.6 ezk ezk[2] ezk ezk
sparc-sun-solaris2.7 ezk ezk[2] ezk ezk
+sparc-sun-solaris2.8 ro ro ro ro
sparc-sun-sunos4.1.1 ezk ezk ezk ezk
sparc-sun-sunos4.1.3 ezk ezk ezk ezk
sparc-sun-sunos4.1.3C ezk ezk ezk ezk
diff --git a/contrib/amd/MIRRORS b/contrib/amd/MIRRORS
index f1f163e..37acaf0 100644
--- a/contrib/amd/MIRRORS
+++ b/contrib/amd/MIRRORS
@@ -1,6 +1,6 @@
# -*- text -*-
- AM-UTILS-6.0 MIRRORS
+ AM-UTILS-6.x MIRRORS
Note: in case of any problems accessing the individual FTP sites, please
contact their respective maintainers. If you wish to be added to the
@@ -21,6 +21,9 @@ U.S.A:
Ohio (Kent State University):
ftp://info.mcs.kent.edu/pub/am-utils
Maintainer: root@mcs.kent.edu
+ Florida (University of Florida)
+ ftp://ftp.cise.ufl.edu/pub/am-utils
+ Maintainer: mirror@cise.ufl.edu
Europe:
Germany:
@@ -43,6 +46,12 @@ Asia:
Japan:
ftp://ftp.u-aizu.ac.jp/pub/net/amd/am-utils
Maintainer: ftp-admin@u-aizu.ac.jp
+ Japan:
+ ftp://core.ring.gr.jp/pub/net/am-utils/
+ Maintainer: ftpadmin@ring.gr.jp
+ Japan:
+ ftp://ftp.ring.gr.jp/pub/net/am-utils/
+ Maintainer: ftpadmin@ring.gr.jp
Australia:
Melbourne:
diff --git a/contrib/amd/NEWS b/contrib/amd/NEWS
index c33358f..aa4b7ca 100644
--- a/contrib/amd/NEWS
+++ b/contrib/amd/NEWS
@@ -1,5 +1,143 @@
# -*- text -*-
+*** Notes specific to am-utils version 6.0.7:
+
+- minor new ports: i386-unknown-freebsd5.0
+
+- bug fixes:
+ type:=host, don't fail mount if one share is already mounted
+ don't report NFS NE_IO error as success (Linux)
+
+*** Notes specific to am-utils version 6.0.6:
+
+- new ports:
+ Apple OS X support (Darwin, Rhapsody)
+
+- reworked autoconf scripts so that newer versions of known OSs will default
+ their configuration to the last known version (better chance that it will
+ pass autoconf and work).
+
+- linux support for lofs and "bind" mounts, so type:=lofs can work (whether
+ you're using autofs or not)
+
+- renamed amd.conf option "selectors_on_default" to "selectors_in_defaults"
+ (on -> in, and added "s"). Old name remains in place for compatibility.
+
+- lots of cleanups of debugging and logging messages
+
+- Bugs fixed:
+ lots of Linux-related ones, so it compiles for recent kernels
+ better checking on various mount options of the form foo=N or foo=STR
+ fixed NFS errno mapping bug which mapped ENOENT to success on Linux
+
+*** Notes specific to am-utils version 6.0.5:
+
+- Minor ports:
+ alphaev6-dec-osf5.1
+ i386-unknown-freebsd4.2
+ support for Linux 2.4 kernels and newer GLIBC versions
+ cleanup of AIX and IRIX6 ports
+
+- Support new mount options:
+ proplist (ACLs over NFS, DU-4.0)
+ kerb, rdirplus, readdirsize, and xlatecookie (NetBSD-1.5K+)
+ nonlm, lock, nolock (Linux)
+
+- Don't force rsize/wsize on Linux 2.2.18+ and 2.4.x. Improves performance
+ a lot.
+
+- Lots of documentation updates: texinfo, man pages, scripts, and more.
+
+- LDAP: included proposed Schema and Internet Draft for LDAP Schema. See
+ README.ldap for more information.
+
+- Removed all remains of the dangerous amq -M code.
+
+- Major bug fix: initialize NFS fileid field correctly, to avoid cache
+ aliasing problems, esp. on Linux.
+
+- Major Linux bug fix: map errnos to NFS errors (mistakenly turned off a
+ while back). Also support unused errno 41.
+
+- Other bugs fixes:
+ default MAXHOSTNAMELEN (if undefined) is 256, not 64
+ truncate hostnames to MAXHOSTNAMELEN (security fix)
+ alignment problem in getwire() on ALPHA
+ other buf overflow problems (security fixes)
+ ctl-amd supports "condrestart" (Red Hat)
+ bell char is \g not \a
+ lostaltmail verify MAILDIR is defined
+ am-eject accepts "floppy" and "cdrom" as args
+ other assorted small bug fixes
+
+*** Notes specific to am-utils version 6.0.4:
+
+- NFSv3 support for Linux and HPUX-11
+
+- new amd.conf [global] options:
+ nfs_vers: force all NFS mounts to version 2 or 3
+ nfs_proto: force all NFS mounts to udp or tcp
+
+- new debug_options (amd -D):
+ hrtime: turns on high-resolution timer if available
+ readdir: traces browsable_dirs code
+ xdrtrace: traces XDR routines
+ (trace: only traces NFS and RPC)
+
+- new amq options:
+ -H: shows usage
+ -w: translate getpwd() into an Amd path
+
+- new map syntax:
+ ${dollar}: to include a literal '$' in assignments
+
+- new "opts:=" options:
+ ver3: turns on NFS version 3 on some systems (linux)
+
+- updated or minor new ports:
+ alpha-dec-osf4.0f
+ alphaev6-dec-osf5.0
+ i386-pc-linux-rh6.2
+ i386-unknown-freebsd3.4
+
+- bugs fixed:
+ symlink mtime fixes to avoid u/mount race conditions
+ update amq -s failed umounts count correctly
+ linux compiles even if efs is available
+ linux works with mount(2) option "intr"
+ linux works with pcfs and cdfs
+ handle std{in,out,err} correctly when releasing controlling tty
+ browsable_readdir works on 64-bit kernel architectures
+ irs/wire routines compile for bsdi{2,3,4}
+
+*** Notes specific to am-utils version 6.0.3:
+
+- updated or minor new ports:
+ hppa1.0-hp-hpux11.00
+ i386-pc-bsdi4.1
+ i386-unknown-netbsd1.4.1
+ sparc-sun-solaris2.8
+ i*86-pc-linux-gnu-rh6.1
+ (some preparations for Compaq Tru64)
+
+- new variables ${uid} and ${gid}, return the numeric UID/GID of the user
+ (not root) who invokes an amd pathname. Similar to what hlfsd does.
+
+- automake now uses automatic dependency tracking
+
+- new mount options: optionstr, noexec, nomnttab
+
+- maps of type:=auto are now browsable (using map option "browsable")
+
+- ctl-amd has "status" argument (same as RedHat)
+
+- bugs fixed:
+ document buggy AIX 4.3 plock() behavior
+ fixes to stale file handle on symlinks
+ reduce race conditions upon rapid umount/mount sequences
+ use vsnprintf, more secure than vsprintf
+ more assorted and smaller bugs
+
*** Notes specific to am-utils version 6.0.2:
- safe map reloads: when a map needs to be reloaded, it is reloaded into a
@@ -340,7 +478,7 @@ machine to NFS V.2 and retry again later.
- minor code cleanups for netbsd
-- html docs now in http://www.cs.columbia.edu/~ezk/am-utils/
+- html docs now in http://www.am-utils.org
- added README file in binaries ftp directory
diff --git a/contrib/amd/README b/contrib/amd/README
index b7d1406..33db6bc 100644
--- a/contrib/amd/README
+++ b/contrib/amd/README
@@ -74,18 +74,21 @@ for example to add hesiod support, do so as follows:
hlfsd, lib, etc, all you need to do to get a new version of am-utils is run
make.
-If you modify any of the files in the aux/ or conf/ directories, then you
-must rebuild the configure script, Makefile.in files, aclocal.m4, etc. The
-best way to do so is to run
+If you modify any of the files in the aux/ or conf/ directories, or any *.in
+or *.am file, then you must rebuild the configure script, Makefile.in files,
+aclocal.m4, etc. The best way to do so is to run
- ./aux/mkconf
+ ./bootstrap
or
./buildall -K
-To be a developer and be able to run mkconf, you must have autoconf-2.12,
-GNU make-3.75 or later, and automake-1.2 (plus my fixes to it) installed on
-your system. You may find my version of automake-1.2 where you ftp'ed this
-version of am-utils. You may also need GNU libtool 1.0.
+To be a developer and be able to run "bootstrap", you must have
+autoconf-2.13, automake-1.4, and libtool 1.3.5 installed on your system (or
+later versions thereof). You no longer need to get my special version of
+automake. Note also the the bootstrap script and several other tools are
+not available in the regular distribution of am-utils, only though the CVS
+server for am-utils. Contact me if you'd like to be a maintainer and get
+access to the CVS server.
After you've remade the basic configuration files you must rerun the
buildall script to rerun configure and then remake the binaries.
diff --git a/contrib/amd/README.ldap b/contrib/amd/README.ldap
new file mode 100644
index 0000000..49c6f9b
--- /dev/null
+++ b/contrib/amd/README.ldap
@@ -0,0 +1,25 @@
+LDAP support for am-utils was originally done by Leif Johansson
+<leifj@it.su.se>. He no longer maintains it.
+
+The current LDAP support for am-utils is for LDAPv2 only. Reportedly,
+small changes are needed to support LDAPv3. Volunteers and patches are
+welcome.
+
+There are two files in this directory that relate to LDAP:
+
+ldap-id.txt:
+
+ This is an experimental schema for amd mount maps in LDAP. Since
+ LDAP isn't maintained now, this code may not match with either the
+ current ldap_info.c code or with Amd mount maps in general.
+
+ The schema is written in the form of an internet-draft but it has
+ not been published as such. We need volunteers who know and use
+ LDAP to clean it up and further its process of submission.
+
+ldap-id.ms:
+
+ This is the NROFF source of the draft. To generate the text from
+ it, run "nroff -ms ldap-id.ms > ldap-id.txt"
+
+Erez.
diff --git a/contrib/amd/README.y2k b/contrib/amd/README.y2k
index 300cf38..4a87a18 100644
--- a/contrib/amd/README.y2k
+++ b/contrib/amd/README.y2k
@@ -26,4 +26,4 @@ CERTIFY AM-UTILS AS Y2K COMPLIANT. USE AT YOUR OWN RISK.
Erez Zadok.
Maintainer, am-utils package and AMD-DEV list.
Email: amd-dev-owner@majordomo.cs.columbia.edu
-WWW: http://www.cs.columbia.edu/~ezk/am-utils/
+WWW: http://www.am-utils.org
diff --git a/contrib/amd/amd/am_ops.c b/contrib/amd/amd/am_ops.c
index 49db91e..9f56562 100644
--- a/contrib/amd/amd/am_ops.c
+++ b/contrib/amd/amd/am_ops.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_ops.c,v 1.4 1999/03/13 17:03:26 ezk Exp $
+ * $Id: am_ops.c,v 1.6.2.3 2001/02/23 01:03:39 ezk Exp $
*
*/
@@ -53,7 +53,7 @@
* The order of these entries matters, since lookups in this table are done
* on a first-match basis. The entries below are a mixture of native
* filesystems supported by the OS (HAVE_FS_FOO), and some meta-filesystems
- * supported by amd (HAVE_AM_FS_FOO). The order is set here in expected
+ * supported by amd (HAVE_AMU_FS_FOO). The order is set here in expected
* match-hit such that more popular filesystems are listed first (nfs is the
* most popular, followed by a symlink F/S)
*/
@@ -62,34 +62,34 @@ static am_ops *vops[] =
#ifdef HAVE_FS_NFS
&nfs_ops, /* network F/S (version 2) */
#endif /* HAVE_FS_NFS */
-#ifdef HAVE_AM_FS_LINK
+#ifdef HAVE_AMU_FS_LINK
&amfs_link_ops, /* symlink F/S */
-#endif /* HAVE_AM_FS_LINK */
+#endif /* HAVE_AMU_FS_LINK */
/*
* Other amd-supported meta-filesystems.
*/
-#ifdef HAVE_AM_FS_NFSX
+#ifdef HAVE_AMU_FS_NFSX
&amfs_nfsx_ops, /* multiple-nfs F/S */
-#endif /* HAVE_AM_FS_NFSX */
-#ifdef HAVE_AM_FS_NFSL
+#endif /* HAVE_AMU_FS_NFSX */
+#ifdef HAVE_AMU_FS_NFSL
&amfs_nfsl_ops, /* NFS with local link existence check */
-#endif /* HAVE_AM_FS_NFSL */
-#ifdef HAVE_AM_FS_HOST
+#endif /* HAVE_AMU_FS_NFSL */
+#ifdef HAVE_AMU_FS_HOST
&amfs_host_ops, /* multiple exported nfs F/S */
-#endif /* HAVE_AM_FS_HOST */
-#ifdef HAVE_AM_FS_LINKX
+#endif /* HAVE_AMU_FS_HOST */
+#ifdef HAVE_AMU_FS_LINKX
&amfs_linkx_ops, /* symlink F/S with link target verify */
-#endif /* HAVE_AM_FS_LINKX */
-#ifdef HAVE_AM_FS_PROGRAM
+#endif /* HAVE_AMU_FS_LINKX */
+#ifdef HAVE_AMU_FS_PROGRAM
&amfs_program_ops, /* program F/S */
-#endif /* HAVE_AM_FS_PROGRAM */
-#ifdef HAVE_AM_FS_UNION
+#endif /* HAVE_AMU_FS_PROGRAM */
+#ifdef HAVE_AMU_FS_UNION
&amfs_union_ops, /* union F/S */
-#endif /* HAVE_AM_FS_UNION */
-#ifdef HAVE_AM_FS_INHERIT
+#endif /* HAVE_AMU_FS_UNION */
+#ifdef HAVE_AMU_FS_INHERIT
&amfs_inherit_ops, /* inheritance F/S */
-#endif /* HAVE_AM_FS_INHERIT */
+#endif /* HAVE_AMU_FS_INHERIT */
/*
* A few more native filesystems.
@@ -133,21 +133,21 @@ static am_ops *vops[] =
* (4) autofs
* (5) amfs_error
*/
-#ifdef HAVE_AM_FS_AUTO
+#ifdef HAVE_AMU_FS_AUTO
&amfs_auto_ops, /* Automounter F/S */
-#endif /* HAVE_AM_FS_AUTO */
-#ifdef HAVE_AM_FS_DIRECT
+#endif /* HAVE_AMU_FS_AUTO */
+#ifdef HAVE_AMU_FS_DIRECT
&amfs_direct_ops, /* direct-mount F/S */
-#endif /* HAVE_AM_FS_DIRECT */
-#ifdef HAVE_AM_FS_TOPLVL
+#endif /* HAVE_AMU_FS_DIRECT */
+#ifdef HAVE_AMU_FS_TOPLVL
&amfs_toplvl_ops, /* top-level mount F/S */
-#endif /* HAVE_AM_FS_TOPLVL */
+#endif /* HAVE_AMU_FS_TOPLVL */
#ifdef HAVE_FS_AUTOFS
&autofs_ops, /* autofs mount F/S */
#endif /* HAVE_FS_AUTOFS */
-#ifdef HAVE_AM_FS_ERROR
+#ifdef HAVE_AMU_FS_ERROR
&amfs_error_ops, /* error F/S */
-#endif /* HAVE_AM_FS_ERROR */
+#endif /* HAVE_AMU_FS_ERROR */
0
};
@@ -320,7 +320,7 @@ merge_opts(const char *opts1, const char *opts2)
mntent_t mnt2; /* place holder for opts2 */
char *newstr; /* new string to return (malloc'ed) */
char *tmpstr; /* temp */
- char *eq; /* pointer to '=' within temp */
+ char *eq; /* pointer to whatever follows '=' within temp */
char oneopt[80]; /* one option w/o value if any */
char *revoneopt; /* reverse of oneopt */
int len = strlen(opts1) + strlen(opts2) + 2; /* space for "," and NULL */
@@ -338,8 +338,8 @@ merge_opts(const char *opts1, const char *opts2)
strncpy(oneopt, tmpstr, 80);
oneopt[79] = '\0';
/* if option has a value such as rsize=1024, chop the value part */
- if ((eq = strchr(oneopt, '=')))
- eq[1] = '\0';
+ if ((eq = haseq(oneopt)))
+ *eq = '\0';
/* find reverse option of oneopt */
revoneopt = reverse_option(oneopt);
/* if option orits reverse exist in opts2, ignore it */
@@ -420,7 +420,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map
/* optimize things for the common case where opts==remopts */
char *mergedstr;
mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts);
- plog(XLOG_USER, "merge rem/opts \"%s\" add \"%s\" => \"%s\"",
+ plog(XLOG_INFO, "merge rem/opts \"%s\" add \"%s\" => \"%s\"",
fo->opt_opts, fo->opt_addopts, mergedstr);
XFREE(fo->opt_opts);
XFREE(fo->opt_remopts);
@@ -429,12 +429,12 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map
} else {
char *mergedstr, *remmergedstr;
mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts);
- plog(XLOG_USER, "merge opts \"%s\" add \"%s\" => \"%s\"",
+ plog(XLOG_INFO, "merge opts \"%s\" add \"%s\" => \"%s\"",
fo->opt_opts, fo->opt_addopts, mergedstr);
XFREE(fo->opt_opts);
fo->opt_opts = mergedstr;
remmergedstr = merge_opts(fo->opt_remopts, fo->opt_addopts);
- plog(XLOG_USER, "merge remopts \"%s\" add \"%s\" => \"%s\"",
+ plog(XLOG_INFO, "merge remopts \"%s\" add \"%s\" => \"%s\"",
fo->opt_remopts, fo->opt_addopts, remmergedstr);
XFREE(fo->opt_remopts);
fo->opt_remopts = remmergedstr;
diff --git a/contrib/amd/amd/amd.8 b/contrib/amd/amd/amd.8
index 0e68d0f..1bebce6 100644
--- a/contrib/amd/amd/amd.8
+++ b/contrib/amd/amd/amd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1989 Jan-Simon Pendry
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amd.8,v 1.3 1999/09/30 21:01:29 ezk Exp $
+.\" $Id: amd.8,v 1.4.2.1 2001/01/10 03:22:59 ezk Exp $
.\"
.TH AMD 8 "3 November 1989"
.SH NAME
diff --git a/contrib/amd/amd/amd.c b/contrib/amd/amd/amd.c
index 3f3da1b..cc10a83 100644
--- a/contrib/amd/amd/amd.c
+++ b/contrib/amd/amd/amd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amd.c,v 1.6 1999/09/30 21:01:29 ezk Exp $
+ * $Id: amd.c,v 1.8.2.3 2001/01/10 03:22:59 ezk Exp $
*
*/
@@ -177,8 +177,8 @@ daemon_mode(void)
if (gopt.flags & CFM_PRINT_PID) {
if (STREQ(gopt.pid_file, "/dev/stdout")) {
printf("%ld\n", (long) am_mypid);
+ /* flush stdout, just in case */
fflush(stdout);
- /* do not fclose stdout */
} else {
FILE *f;
mode_t prev_umask = umask(0022); /* set secure temporary umask */
@@ -476,7 +476,7 @@ main(int argc, char *argv[])
verstr = strtok(get_version_string(), "\n");
plog(XLOG_INFO, "AM-UTILS VERSION INFORMATION:");
while (verstr) {
- plog(XLOG_INFO, verstr);
+ plog(XLOG_INFO, "%s", verstr);
verstr = strtok(NULL, "\n");
}
diff --git a/contrib/amd/amd/amd.h b/contrib/amd/amd/amd.h
index c896022..b37978b 100644
--- a/contrib/amd/amd/amd.h
+++ b/contrib/amd/amd/amd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amd.h,v 1.4 1999/09/30 21:01:29 ezk Exp $
+ * $Id: amd.h,v 1.8.2.3 2001/04/07 00:47:41 ib42 Exp $
*
*/
@@ -53,7 +53,7 @@
/* options for amd.conf */
#define CFM_BROWSABLE_DIRS 0x0001
#define CFM_MOUNT_TYPE_AUTOFS 0x0002
-#define CFM_ENABLE_DEFAULT_SELECTORS 0x0004
+#define CFM_SELECTORS_IN_DEFAULTS 0x0004
#define CFM_NORMALIZE_HOSTNAMES 0x0008
#define CFM_PROCESS_LOCK 0x0010
#define CFM_PRINT_PID 0x0020
@@ -134,6 +134,8 @@ struct amu_global_options {
#ifdef HAVE_MAP_NIS
char *nis_domain; /* YP domain name */
#endif /* HAVE_MAP_NIS */
+ char *nfs_proto; /* NFS protocol (NULL, udp, tcp) */
+ int nfs_vers; /* NFS version (0, 2, 3, 4) */
};
/* if you add anything here, update conf.c:reset_cf_map() */
@@ -227,7 +229,7 @@ extern voidp amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp);
/* other external definitions */
extern am_nfs_fh *root_fh(char *dir);
-extern am_node * autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
+extern am_node *autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
extern am_node *find_ap(char *);
extern am_node *find_ap2(char *, am_node *);
extern bool_t xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead);
@@ -252,8 +254,10 @@ extern void root_newmap(const char *, const char *, const char *, const cf_map_t
/* amd global variables */
extern FILE *yyin;
-extern SVCXPRT *nfs_program_2_transp; /* For quick_reply() */
+extern SVCXPRT *nfs_program_2_transp; /* For quick_reply() */
extern char *conf_tag;
+extern char *opt_gid;
+extern char *opt_uid;
extern int NumChild;
extern int fwd_sock;
extern int select_intr_valid;
@@ -261,20 +265,21 @@ extern int usage;
extern int use_conf_file; /* use amd configuration file */
extern jmp_buf select_intr;
extern qelem mfhead;
-extern struct amu_global_options gopt; /* where global options are stored */
+extern struct am_opts fs_static; /* copy of the options to play with */
+extern struct amu_global_options gopt; /* where global options are stored */
#ifdef HAVE_SIGACTION
extern sigset_t masked_sigs;
#endif /* HAVE_SIGACTION */
-#if defined(HAVE_AM_FS_LINK) || defined(HAVE_AM_FS_LINKX)
+#if defined(HAVE_AMU_FS_LINK) || defined(HAVE_AMU_FS_LINKX)
extern char *amfs_link_match(am_opts *fo);
extern int amfs_link_fumount(mntfs *mf);
-#endif /* defined(HAVE_AM_FS_LINK) || defined(HAVE_AM_FS_LINKX) */
+#endif /* defined(HAVE_AMU_FS_LINK) || defined(HAVE_AMU_FS_LINKX) */
-#ifdef HAVE_AM_FS_NFSL
+#ifdef HAVE_AMU_FS_NFSL
extern char *nfs_match(am_opts *fo);
-#endif /* HAVE_AM_FS_NFSL */
+#endif /* HAVE_AMU_FS_NFSL */
#if defined(HAVE_FS_NFS3) && !defined(HAVE_XDR_MOUNTRES3)
extern bool_t xdr_mountres3(XDR *xdrs, mountres3 *objp);
diff --git a/contrib/amd/amd/amfs_auto.c b/contrib/amd/amd/amfs_auto.c
index f04cc50..dd9b746 100644
--- a/contrib/amd/amd/amfs_auto.c
+++ b/contrib/amd/amd/amfs_auto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_auto.c,v 1.5 1999/09/30 21:01:29 ezk Exp $
+ * $Id: amfs_auto.c,v 1.9.2.7 2001/04/14 21:08:19 ezk Exp $
*
*/
@@ -57,10 +57,7 @@
****************************************************************************/
#define IN_PROGRESS(cp) ((cp)->mp->am_mnt->mf_flags & MFF_MOUNTING)
-/* DEVELOPERS: turn this on for special debugging of readdir code */
-#undef DEBUG_READDIR
-
-#define DOT_DOT_COOKIE (u_int) 1
+#define DOT_DOT_COOKIE (u_int) 1
/****************************************************************************
*** STRUCTURES ***
@@ -70,7 +67,7 @@
/****************************************************************************
*** FORWARD DEFINITIONS ***
****************************************************************************/
-static int amfs_auto_bgmount(struct continuation * cp, int mpe);
+static int amfs_auto_bgmount(struct continuation *cp, int mpe);
static int amfs_auto_mount(am_node *mp);
static int amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count, int fully_browsable);
static void amfs_auto_umounted(am_node *mp);
@@ -504,7 +501,7 @@ For each location:
endfor
*/
static int
-amfs_auto_bgmount(struct continuation * cp, int mpe)
+amfs_auto_bgmount(struct continuation *cp, int mpe)
{
mntfs *mf = cp->mp->am_mnt; /* Current mntfs */
mntfs *mf_retry = 0; /* First mntfs which needed retrying */
@@ -580,7 +577,7 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
* Note whether this is a real mount attempt
*/
if (p == &amfs_error_ops) {
- plog(XLOG_MAP, "Map entry %s for %s failed to match", *cp->ivec, mp->am_path);
+ plog(XLOG_MAP, "Map entry %s for %s did not match", *cp->ivec, mp->am_path);
if (this_error <= 0)
this_error = ENOENT;
continue;
@@ -606,7 +603,7 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
mp->am_link = strdup(link_dir);
} else {
/*
- * try getting fs option from continuation, not mountpoint!
+ * Try getting fs option from continuation, not mountpoint!
* Don't try logging the string from mf, since it may be bad!
*/
if (cp->fs_opts.opt_fs != mf->mf_fo->opt_fs)
@@ -671,8 +668,6 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
else
mk_fattr(mp, NFLNK);
- mp->am_fattr.na_fileid = mp->am_gen;
-
if (p->fs_init)
this_error = (*p->fs_init) (mf);
}
@@ -722,7 +717,10 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
untimeout(cp->callout);
cp->callout = 0;
}
+
+ /* actually run the task, backgrounding as necessary */
run_task(try_mount, (voidp) mp, amfs_auto_cont, (voidp) cp);
+
mf->mf_flags |= MFF_MKMNT; /* XXX */
if (mf_retry)
free_mntfs(mf_retry);
@@ -1120,7 +1118,7 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op)
*/
rvec = strsplit(dfl, ' ', '\"');
- if (gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) {
+ if (gopt.flags & CFM_SELECTORS_IN_DEFAULTS) {
/*
* Pick whichever first entry matched the list of selectors.
* Strip the selectors from the string, and assign to dfl the
@@ -1132,11 +1130,18 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op)
char **sp = rvec;
while (*sp) { /* loop until you find something, if any */
memset((char *) &ap, 0, sizeof(am_opts));
+ /*
+ * This next routine cause many spurious "expansion of ... is"
+ * messages, which are ignored, b/c all we need out of this
+ * routine is to match selectors. These spurious messages may
+ * be wrong, esp. if they try to expand ${key} b/c it will
+ * get expanded to "/defaults"
+ */
pt = ops_match(&ap, *sp, "", mp->am_path, "/defaults",
mp->am_parent->am_mnt->mf_info);
free_opts(&ap); /* don't leak */
if (pt == &amfs_error_ops) {
- plog(XLOG_MAP, "failed to match defaults for \"%s\"", *sp);
+ plog(XLOG_MAP, "did not match defaults for \"%s\"", *sp);
} else {
dfl = strip_selectors(*sp, "/defaults");
plog(XLOG_MAP, "matched default selectors \"%s\"", dfl);
@@ -1159,7 +1164,7 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op)
/*
* Log error if there were other values
*/
- if (!(gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) && rvec[1]) {
+ if (!(gopt.flags & CFM_SELECTORS_IN_DEFAULTS) && rvec[1]) {
# ifdef DEBUG
dlog("/defaults chopped into %s", dfl);
# endif /* DEBUG */
@@ -1305,6 +1310,10 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
u_int gen = *(u_int *) cookie;
am_node *xp;
mntent_t mnt;
+#ifdef DEBUG
+ nfsentry *ne;
+ static int j;
+#endif /* DEBUG */
dp->dl_eof = FALSE; /* assume readdir not done */
@@ -1317,6 +1326,7 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
return amfs_auto_readdir_browsable(mp, cookie, dp, ep, count, FALSE);
}
+ /* when gen is 0, we start reading from the beginning of the directory */
if (gen == 0) {
/*
* In the default instance (which is used to start a search) we return
@@ -1361,6 +1371,12 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
if (!xp)
dp->dl_eof = TRUE; /* by default assume readdir done */
+#ifdef DEBUG
+ amuDebug(D_READDIR)
+ for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
+ plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%d ck=%d",
+ j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+#endif /* DEBUG */
return 0;
}
#ifdef DEBUG
@@ -1373,6 +1389,10 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
#endif /* DEBUG */
dp->dl_eof = TRUE;
dp->dl_entries = 0;
+#ifdef DEBUG
+ amuDebug(D_READDIR)
+ plog(XLOG_DEBUG, "end of readdir eof=TRUE, dl_entries=0\n");
+#endif /* DEBUG */
return 0;
}
@@ -1415,6 +1435,12 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
ep->ne_nextentry = 0;
+#ifdef DEBUG
+ amuDebug(D_READDIR)
+ for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
+ plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%d ck=%d",
+ j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+#endif /* DEBUG */
return 0;
}
return ESTALE;
@@ -1428,17 +1454,18 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
u_int gen = *(u_int *) cookie;
int chain_length, i;
static nfsentry *te, *te_next;
-#ifdef DEBUG_READDIR
+#ifdef DEBUG
nfsentry *ne;
static int j;
-#endif /* DEBUG_READDIR */
+#endif /* DEBUG */
dp->dl_eof = FALSE; /* assume readdir not done */
-#ifdef DEBUG_READDIR
- plog(XLOG_INFO, "amfs_auto_readdir_browsable gen=%u, count=%d",
- gen, count);
-#endif /* DEBUG_READDIR */
+#ifdef DEBUG
+ amuDebug(D_READDIR)
+ plog(XLOG_DEBUG, "amfs_auto_readdir_browsable gen=%u, count=%d",
+ gen, count);
+#endif /* DEBUG */
if (gen == 0) {
/*
@@ -1488,6 +1515,7 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
ep[1].ne_fileid = mp->am_parent->am_gen;
else
ep[1].ne_fileid = mp->am_gen;
+
ep[1].ne_name = "..";
ep[1].ne_nextentry = 0;
*(u_int *) ep[1].ne_cookie = DOT_DOT_COOKIE;
@@ -1501,10 +1529,11 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
te = make_entry_chain(mp, dp->dl_entries, fully_browsable);
if (!te)
return 0;
-#ifdef DEBUG_READDIR
- for (j=0,ne=te; ne; ne=ne->ne_nextentry)
- plog(XLOG_INFO, "gen1 key %4d \"%s\"", j++, ne->ne_name);
-#endif /* DEBUG_READDIR */
+#ifdef DEBUG
+ amuDebug(D_READDIR)
+ for (j=0,ne=te; ne; ne=ne->ne_nextentry)
+ plog(XLOG_DEBUG, "gen1 key %4d \"%s\"", j++, ne->ne_name);
+#endif /* DEBUG */
/* return only "chain_length" entries */
te_next = te;
@@ -1522,13 +1551,15 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
dp->dl_eof = TRUE; /* tell readdir that's it */
}
ep[1].ne_nextentry = te; /* append this chunk of "te" chain */
-#ifdef DEBUG_READDIR
- for (j=0,ne=te; ne; ne=ne->ne_nextentry)
- plog(XLOG_INFO, "gen2 key %4d \"%s\"", j++, ne->ne_name);
- for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
- plog(XLOG_INFO, "gen2+ key %4d \"%s\" fi=%d ck=%d",
- j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
- plog(XLOG_INFO, "EOF is %d", dp->dl_eof);
+#ifdef DEBUG
+ amuDebug(D_READDIR) {
+ for (j=0,ne=te; ne; ne=ne->ne_nextentry)
+ plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->ne_name);
+ for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
+ plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%d ck=%d",
+ j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+ plog(XLOG_DEBUG, "EOF is %d", dp->dl_eof);
+ }
#endif /* DEBUG_READDIR */
return 0;
} /* end of "if (gen == 0)" statement */
@@ -1579,12 +1610,14 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
}
ep = te; /* send next chunk of "te" chain */
dp->dl_entries = ep;
-#ifdef DEBUG_READDIR
- plog(XLOG_INFO, "dl_entries=0x%x, te_next=0x%x, dl_eof=%d",
- (int) dp->dl_entries, (int) te_next, dp->dl_eof);
- for (ne=te; ne; ne=ne->ne_nextentry)
- plog(XLOG_INFO, "gen3 key %4d \"%s\"", j++, ne->ne_name);
-#endif /* DEBUG_READDIR */
+#ifdef DEBUG
+ amuDebug(D_READDIR) {
+ plog(XLOG_DEBUG, "dl_entries=0x%lx, te_next=0x%lx, dl_eof=%d",
+ (long) dp->dl_entries, (long) te_next, dp->dl_eof);
+ for (ne=te; ne; ne=ne->ne_nextentry)
+ plog(XLOG_DEBUG, "gen3 key %4d \"%s\"", j++, ne->ne_name);
+ }
+#endif /* DEBUG */
return 0;
}
diff --git a/contrib/amd/amd/amfs_direct.c b/contrib/amd/amd/amfs_direct.c
index 475f388..dad917b 100644
--- a/contrib/amd/amd/amfs_direct.c
+++ b/contrib/amd/amd/amfs_direct.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_direct.c,v 1.2 1999/01/10 21:53:41 ezk Exp $
+ * $Id: amfs_direct.c,v 1.3.2.1 2001/01/10 03:23:00 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_error.c b/contrib/amd/amd/amfs_error.c
index 4d4d865..cf71186 100644
--- a/contrib/amd/amd/amfs_error.c
+++ b/contrib/amd/amd/amfs_error.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_error.c,v 1.2 1999/01/10 21:53:41 ezk Exp $
+ * $Id: amfs_error.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp $
*
*/
@@ -56,7 +56,7 @@
#include <am_defs.h>
#include <amd.h>
-static char * amfs_error_match(am_opts *fo);
+static char *amfs_error_match(am_opts *fo);
static int amfs_error_fmount(mntfs *mf);
static int amfs_error_fumount(mntfs *mf);
static void amfs_error_umounted(am_node *mp);
diff --git a/contrib/amd/amd/amfs_host.c b/contrib/amd/amd/amfs_host.c
index 71b08df..082016c 100644
--- a/contrib/amd/amd/amfs_host.c
+++ b/contrib/amd/amd/amfs_host.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_host.c,v 1.3 1999/01/13 23:30:57 ezk Exp $
+ * $Id: amfs_host.c,v 1.4.2.4 2001/05/19 02:00:58 ib42 Exp $
*
*/
@@ -204,7 +204,7 @@ sortfun(const voidp x, const voidp y)
* Get filehandle
*/
static int
-fetch_fhandle(CLIENT * client, char *dir, am_nfs_handle_t *fhp, u_long nfs_version)
+fetch_fhandle(CLIENT *client, char *dir, am_nfs_handle_t *fhp, u_long nfs_version)
{
struct timeval tv;
enum clnt_stat clnt_stat;
@@ -256,8 +256,7 @@ fetch_fhandle(CLIENT * client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versi
(SVC_IN_ARG_TYPE) &fhp->v2,
tv);
if (clnt_stat != RPC_SUCCESS) {
- const char *msg = clnt_sperrno(clnt_stat);
- plog(XLOG_ERROR, "mountd rpc failed: %s", msg);
+ plog(XLOG_ERROR, "mountd rpc failed: %s", clnt_sperrno(clnt_stat));
return EIO;
}
/* Check status of filehandle */
@@ -403,7 +402,6 @@ amfs_host_fmount(mntfs *mf)
* Figure out how many exports were returned
*/
for (n_export = 0, ex = exlist; ex; ex = ex->ex_next) {
- /* printf("export %s\n", ex->ex_dir); */
n_export++;
}
@@ -415,7 +413,10 @@ amfs_host_fmount(mntfs *mf)
ep = (exports *) xmalloc(n_export * sizeof(exports));
for (j = 0, ex = exlist; ex; ex = ex->ex_next) {
make_mntpt(mntpt, ex, mf);
- if (!already_mounted(mlist, mntpt))
+ if (already_mounted(mlist, mntpt))
+ /* we have at least one mounted f/s, so don't fail the mount */
+ ok = TRUE;
+ else
ep[j++] = ex;
}
n_export = j;
diff --git a/contrib/amd/amd/amfs_inherit.c b/contrib/amd/amd/amfs_inherit.c
index 891afea..905254a 100644
--- a/contrib/amd/amd/amfs_inherit.c
+++ b/contrib/amd/amd/amfs_inherit.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_inherit.c,v 1.2 1999/01/10 21:53:41 ezk Exp $
+ * $Id: amfs_inherit.c,v 1.3.2.1 2001/01/10 03:23:01 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_link.c b/contrib/amd/amd/amfs_link.c
index fcb142d..6e357e1 100644
--- a/contrib/amd/amd/amfs_link.c
+++ b/contrib/amd/amd/amfs_link.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_link.c,v 1.2 1999/01/10 21:53:42 ezk Exp $
+ * $Id: amfs_link.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_linkx.c b/contrib/amd/amd/amfs_linkx.c
index 728597f..5e77cc9 100644
--- a/contrib/amd/amd/amfs_linkx.c
+++ b/contrib/amd/amd/amfs_linkx.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_linkx.c,v 1.2 1999/01/10 21:53:42 ezk Exp $
+ * $Id: amfs_linkx.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_nfsl.c b/contrib/amd/amd/amfs_nfsl.c
index 42e0102..4b193fb 100644
--- a/contrib/amd/amd/amfs_nfsl.c
+++ b/contrib/amd/amd/amfs_nfsl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_nfsl.c,v 1.3 1999/01/10 21:53:42 ezk Exp $
+ * $Id: amfs_nfsl.c,v 1.4.2.1 2001/01/10 03:23:02 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_nfsx.c b/contrib/amd/amd/amfs_nfsx.c
index a253e50..098970f 100644
--- a/contrib/amd/amd/amfs_nfsx.c
+++ b/contrib/amd/amd/amfs_nfsx.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_nfsx.c,v 1.2 1999/01/10 21:53:42 ezk Exp $
+ * $Id: amfs_nfsx.c,v 1.3.2.2 2001/04/14 21:08:20 ezk Exp $
*
*/
@@ -149,7 +149,7 @@ amfs_nfsx_match(am_opts *fo)
*/
xmtab = str3cat((char *) 0, fo->opt_rhost, ":", fo->opt_rfs);
#ifdef DEBUG
- dlog("NFS: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"",
+ dlog("NFSX: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"",
fo->opt_rhost, fo->opt_rfs, fo->opt_fs);
#endif /* DEBUG */
diff --git a/contrib/amd/amd/amfs_program.c b/contrib/amd/amd/amfs_program.c
index fd03231..3067a93 100644
--- a/contrib/amd/amd/amfs_program.c
+++ b/contrib/amd/amd/amfs_program.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_program.c,v 1.5 1999/09/30 21:01:30 ezk Exp $
+ * $Id: amfs_program.c,v 1.6.2.1 2001/01/10 03:23:03 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_root.c b/contrib/amd/amd/amfs_root.c
index 91f770d..4abd23f 100644
--- a/contrib/amd/amd/amfs_root.c
+++ b/contrib/amd/amd/amfs_root.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_root.c,v 1.2 1999/01/10 21:53:43 ezk Exp $
+ * $Id: amfs_root.c,v 1.3.2.1 2001/01/10 03:23:03 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_toplvl.c b/contrib/amd/amd/amfs_toplvl.c
index 5d07f62..29d35a6 100644
--- a/contrib/amd/amd/amfs_toplvl.c
+++ b/contrib/amd/amd/amfs_toplvl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_toplvl.c,v 1.5 1999/02/04 07:24:14 ezk Exp $
+ * $Id: amfs_toplvl.c,v 1.7.2.2 2001/04/14 21:08:20 ezk Exp $
*
*/
@@ -275,10 +275,10 @@ amfs_toplvl_mount(am_node *mp)
mnttype = "indirect";
else if (mf->mf_ops == &amfs_direct_ops)
mnttype = "direct";
-#ifdef HAVE_AM_FS_UNION
+#ifdef HAVE_AMU_FS_UNION
else if (mf->mf_ops == &amfs_union_ops)
mnttype = "union";
-#endif /* HAVE_AM_FS_UNION */
+#endif /* HAVE_AMU_FS_UNION */
else
mnttype = "auto";
@@ -309,7 +309,7 @@ amfs_toplvl_mount(am_node *mp)
error = mount_amfs_toplvl(mf->mf_mount, opts);
if (error) {
errno = error;
- plog(XLOG_FATAL, "mount_amfs_toplvl: %m");
+ plog(XLOG_FATAL, "amfs_toplvl_mount: mount_amfs_toplvl failed: %m");
return error;
}
return 0;
diff --git a/contrib/amd/amd/amfs_union.c b/contrib/amd/amd/amfs_union.c
index 6e079a4..08c4206 100644
--- a/contrib/amd/amd/amfs_union.c
+++ b/contrib/amd/amd/amfs_union.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_union.c,v 1.2 1999/01/10 21:53:43 ezk Exp $
+ * $Id: amfs_union.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp $
*
*/
@@ -92,7 +92,7 @@ create_amfs_union_node(char *dir, voidp arg)
(void) amfs_toplvl_ops.lookuppn(arg, dir, &error, VLOOK_CREATE);
if (error > 0) {
errno = error; /* XXX */
- plog(XLOG_ERROR, "Could not mount %s: %m", dir);
+ plog(XLOG_ERROR, "unionfs: could not mount %s: %m", dir);
}
return error;
}
diff --git a/contrib/amd/amd/amq_subr.c b/contrib/amd/amd/amq_subr.c
index c75fd16..eea1d25 100644
--- a/contrib/amd/amd/amq_subr.c
+++ b/contrib/amd/amd/amq_subr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_subr.c,v 1.5 1999/08/24 21:31:06 ezk Exp $
+ * $Id: amq_subr.c,v 1.6.2.2 2001/01/12 22:43:42 ro Exp $
*
*/
/*
@@ -171,90 +171,6 @@ amqproc_getmntfs_1_svc(voidp argp, struct svc_req *rqstp)
return (amq_mount_info_list *) &mfhead; /* XXX */
}
-#ifdef ENABLE_AMQ_MOUNT
-/*
- * This is code that is vulnerable to IP spoofing attacks. Unless you
- * absolutely need it, I suggest you do not enable it
- * (using configure --enable-amq-mount)
- */
-static int
-ok_security(struct svc_req *rqstp)
-{
- struct sockaddr_in *sin = (struct sockaddr_in *) NULL;
-
- if ((sin = amu_svc_getcaller(rqstp->rq_xprt)) == NULL) {
- plog(XLOG_ERROR, "amu_svc_getcaller returned NULL");
- return(0); /* assume security is therefore not OK */
- }
-
- if (ntohs(sin->sin_port) >= IPPORT_RESERVED ||
- !(sin->sin_addr.s_addr == htonl(0x7f000001) ||
- sin->sin_addr.s_addr == myipaddr.s_addr)) {
- char dq[20];
- plog(XLOG_INFO, "AMQ request from %s.%d DENIED",
- inet_dquad(dq, sin->sin_addr.s_addr),
- ntohs(sin->sin_port));
- return (0);
- }
-
- return (1);
-}
-
-
-int *
-amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp)
-{
- static int rc = EINVAL;
- char s[AMQ_STRLEN];
- char *cp;
- char dq[20];
- struct sockaddr_in *sin;
-
- if ((sin = amu_svc_getcaller(rqstp->rq_xprt)) == NULL) {
- plog(XLOG_ERROR, "amu_svc_getcaller returned NULL");
- return &rc;
- }
-
- strncpy(s, *(amq_string *) argp, AMQ_STRLEN-1);
- s[AMQ_STRLEN-1] = '\0'; /* null terminate, to be sure */
- plog(XLOG_ERROR,
- "amq requested mount of %s from %s.%d",
- s, inet_dquad(dq, sin->sin_addr.s_addr),
- ntohs(sin->sin_port));
-
- /*
- * Minimalist security check.
- */
- if (!ok_security(rqstp)) {
- rc = EACCES;
- return &rc;
- }
- /*
- * Find end of key
- */
- for (cp = (char *) s; *cp && (!isascii(*cp) || !isspace(*cp)); cp++) ;
-
- if (!*cp) {
- plog(XLOG_INFO, "amqproc_mount: Invalid arguments");
- rc = EINVAL;
- return &rc;
- }
- *cp++ = '\0';
-
- /*
- * Find start of value
- */
- while (*cp && isascii(*cp) && isspace(*cp))
- cp++;
-
- root_newmap(s, cp, (char *) 0, NULL);
- rc = mount_auto_node(s, (voidp) root_node);
- if (rc < 0)
- return 0;
- return &rc;
-}
-#endif /* ENABLE_AMQ_MOUNT */
-
amq_string *
amqproc_getvers_1_svc(voidp argp, struct svc_req *rqstp)
diff --git a/contrib/amd/amd/amq_svc.c b/contrib/amd/amd/amq_svc.c
index c22f219..6626c40 100644
--- a/contrib/amd/amd/amq_svc.c
+++ b/contrib/amd/amd/amq_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_svc.c,v 1.3 1999/08/24 21:31:06 ezk Exp $
+ * $Id: amq_svc.c,v 1.4.2.2 2001/01/12 22:43:42 ro Exp $
*
*/
@@ -59,9 +59,6 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp)
amq_string amqproc_mnttree_1_arg;
amq_string amqproc_umnt_1_arg;
amq_setopt amqproc_setopt_1_arg;
-#ifdef ENABLE_AMQ_MOUNT
- amq_string amqproc_mount_1_arg;
-#endif /* ENABLE_AMQ_MOUNT */
} argument;
char *result;
xdrproc_t xdr_argument, xdr_result;
@@ -111,14 +108,6 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp)
local = (amqsvcproc_t) amqproc_getmntfs_1_svc;
break;
-#ifdef ENABLE_AMQ_MOUNT
- case AMQPROC_MOUNT:
- xdr_argument = (xdrproc_t) xdr_amq_string;
- xdr_result = (xdrproc_t) xdr_int;
- local = (amqsvcproc_t) amqproc_mount_1_svc;
- break;
-#endif /* ENABLE_AMQ_MOUNT */
-
case AMQPROC_GETVERS:
xdr_argument = (xdrproc_t) xdr_void;
xdr_result = (xdrproc_t) xdr_amq_string;
diff --git a/contrib/amd/amd/autil.c b/contrib/amd/amd/autil.c
index 006c755..f76b67a 100644
--- a/contrib/amd/amd/autil.c
+++ b/contrib/amd/amd/autil.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: autil.c,v 1.3 1999/01/10 21:53:44 ezk Exp $
+ * $Id: autil.c,v 1.4.2.2 2001/04/29 05:08:35 ib42 Exp $
*
*/
@@ -219,7 +219,9 @@ forcibly_timeout_mp(am_node *mp)
*/
if (mf && ((mp->am_flags & AMF_ROOT) ||
(mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)))) {
- if (!(mf->mf_flags & MFF_UNMOUNTING))
+ if (mf->mf_flags & MFF_UNMOUNTING)
+ plog(XLOG_WARNING, "node %s is currently being unmounted, ignoring timeout request", mp->am_path);
+ else
plog(XLOG_WARNING, "ignoring timeout request for active node %s", mp->am_path);
} else {
plog(XLOG_INFO, "\"%s\" forcibly timed out", mp->am_path);
diff --git a/contrib/amd/amd/clock.c b/contrib/amd/amd/clock.c
index 72d4719..64afa3f 100644
--- a/contrib/amd/amd/clock.c
+++ b/contrib/amd/amd/clock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: clock.c,v 1.3 1999/01/13 23:30:58 ezk Exp $
+ * $Id: clock.c,v 1.4.2.1 2001/01/10 03:23:04 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/conf.c b/contrib/amd/amd/conf.c
index a45e130..b53c594 100644
--- a/contrib/amd/amd/conf.c
+++ b/contrib/amd/amd/conf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf.c,v 1.5 1999/09/30 21:01:30 ezk Exp $
+ * $Id: conf.c,v 1.7.2.3 2001/04/14 21:08:21 ezk Exp $
*
*/
@@ -98,8 +98,10 @@ static int gopt_map_type(const char *val);
static int gopt_mount_type(const char *val);
static int gopt_pid_file(const char *val);
static int gopt_portmap_program(const char *val);
+static int gopt_nfs_proto(const char *val);
static int gopt_nfs_retransmit_counter(const char *val);
static int gopt_nfs_retry_interval(const char *val);
+static int gopt_nfs_vers(const char *val);
static int gopt_nis_domain(const char *val);
static int gopt_normalize_hostnames(const char *val);
static int gopt_os(const char *val);
@@ -109,7 +111,7 @@ static int gopt_print_pid(const char *val);
static int gopt_print_version(const char *val);
static int gopt_restart_mounts(const char *val);
static int gopt_search_path(const char *val);
-static int gopt_selectors_on_default(const char *val);
+static int gopt_selectors_in_defaults(const char *val);
static int gopt_show_statfs_entries(const char *val);
static int gopt_unmount_on_exit(const char *val);
static int gopt_vendor(const char *val);
@@ -154,8 +156,10 @@ static struct _func_map glob_functable[] = {
{"mount_type", gopt_mount_type},
{"pid_file", gopt_pid_file},
{"portmap_program", gopt_portmap_program},
+ {"nfs_proto", gopt_nfs_proto},
{"nfs_retransmit_counter", gopt_nfs_retransmit_counter},
{"nfs_retry_interval", gopt_nfs_retry_interval},
+ {"nfs_vers", gopt_nfs_vers},
{"nis_domain", gopt_nis_domain},
{"normalize_hostnames", gopt_normalize_hostnames},
{"os", gopt_os},
@@ -165,7 +169,8 @@ static struct _func_map glob_functable[] = {
{"print_version", gopt_print_version},
{"restart_mounts", gopt_restart_mounts},
{"search_path", gopt_search_path},
- {"selectors_on_default", gopt_selectors_on_default},
+ {"selectors_on_default", gopt_selectors_in_defaults},
+ {"selectors_in_defaults", gopt_selectors_in_defaults},
{"show_statfs_entries", gopt_show_statfs_entries},
{"unmount_on_exit", gopt_unmount_on_exit},
{"vendor", gopt_vendor},
@@ -230,7 +235,7 @@ reset_cf_map(cf_map_t *cfm)
cfm->cfm_flags = gopt.flags & (CFM_BROWSABLE_DIRS |
CFM_BROWSABLE_DIRS_FULL |
CFM_MOUNT_TYPE_AUTOFS |
- CFM_ENABLE_DEFAULT_SELECTORS);
+ CFM_SELECTORS_IN_DEFAULTS);
}
@@ -480,7 +485,7 @@ gopt_ldap_cache_seconds(const char *val)
}
return 0;
#else /* not HAVE_MAP_LDAP */
- fprintf(stderr, "conf: ldap_cache option ignored. No LDAP support available.\n");
+ fprintf(stderr, "conf: ldap_cache_seconds option ignored. No LDAP support available.\n");
return 1;
#endif /* not HAVE_MAP_LDAP */
}
@@ -499,7 +504,7 @@ gopt_ldap_cache_maxmem(const char *val)
}
return 0;
#else /* not HAVE_MAP_LDAP */
- fprintf(stderr, "conf: ldap_cache option ignored. No LDAP support available.\n");
+ fprintf(stderr, "conf: ldap_cache_maxmem option ignored. No LDAP support available.\n");
return 1;
#endif /* not HAVE_MAP_LDAP */
}
@@ -590,7 +595,7 @@ gopt_portmap_program(const char *val)
gopt.portmap_program > AMQ_PROGRAM + 10) {
gopt.portmap_program = AMQ_PROGRAM;
set_amd_program_number(gopt.portmap_program);
- fprintf(stderr, "conf: illegal amd program numver \"%s\"\n", val);
+ fprintf(stderr, "conf: illegal amd program number \"%s\"\n", val);
return 1;
}
@@ -600,6 +605,18 @@ gopt_portmap_program(const char *val)
static int
+gopt_nfs_proto(const char *val)
+{
+ if (STREQ(val, "udp") || STREQ(val, "tcp")) {
+ gopt.nfs_proto = strdup((char *)val);
+ return 0;
+ }
+ fprintf(stderr, "conf: illegal nfs_proto \"%s\"\n", val);
+ return 1;
+}
+
+
+static int
gopt_nfs_retransmit_counter(const char *val)
{
gopt.amfs_auto_retrans = atoi(val);
@@ -616,6 +633,20 @@ gopt_nfs_retry_interval(const char *val)
static int
+gopt_nfs_vers(const char *val)
+{
+ int i = atoi(val);
+
+ if (i == 2 || i == 3) {
+ gopt.nfs_vers = i;
+ return 0;
+ }
+ fprintf(stderr, "conf: illegal nfs_vers \"%s\"\n", val);
+ return 1;
+}
+
+
+static int
gopt_nis_domain(const char *val)
{
#ifdef HAVE_MAP_NIS
@@ -732,13 +763,13 @@ gopt_search_path(const char *val)
static int
-gopt_selectors_on_default(const char *val)
+gopt_selectors_in_defaults(const char *val)
{
if (STREQ(val, "yes")) {
- gopt.flags |= CFM_ENABLE_DEFAULT_SELECTORS;
+ gopt.flags |= CFM_SELECTORS_IN_DEFAULTS;
return 0;
} else if (STREQ(val, "no")) {
- gopt.flags &= ~CFM_ENABLE_DEFAULT_SELECTORS;
+ gopt.flags &= ~CFM_SELECTORS_IN_DEFAULTS;
return 0;
}
diff --git a/contrib/amd/amd/conf_parse.y b/contrib/amd/amd/conf_parse.y
index fb426ec..64006a7 100644
--- a/contrib/amd/amd/conf_parse.y
+++ b/contrib/amd/amd/conf_parse.y
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf_parse.y,v 1.3 1999/04/16 14:20:59 ezk Exp $
+ * $Id: conf_parse.y,v 1.4.2.1 2001/01/10 03:23:05 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/conf_tok.l b/contrib/amd/amd/conf_tok.l
index 0756711..61ab7e4 100644
--- a/contrib/amd/amd/conf_tok.l
+++ b/contrib/amd/amd/conf_tok.l
@@ -1,6 +1,6 @@
%{
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -39,7 +39,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf_tok.l,v 1.2 1999/01/10 21:53:45 ezk Exp $
+ * $Id: conf_tok.l,v 1.3.2.1 2001/01/10 03:23:05 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/get_args.c b/contrib/amd/amd/get_args.c
index 6c4445a..6590326 100644
--- a/contrib/amd/amd/get_args.c
+++ b/contrib/amd/amd/get_args.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: get_args.c,v 1.4 1999/09/30 21:01:31 ezk Exp $
+ * $Id: get_args.c,v 1.7.2.1 2001/01/10 03:23:05 ezk Exp $
*
*/
@@ -85,7 +85,7 @@ get_version_string(void)
vers = xmalloc(2048 + wire_buf_len);
sprintf(vers, "%s\n%s\n%s\n%s\n",
- "Copyright (c) 1997-1999 Erez Zadok",
+ "Copyright (c) 1997-2001 Erez Zadok",
"Copyright (c) 1990 Jan-Simon Pendry",
"Copyright (c) 1990 Imperial College of Science, Technology & Medicine",
"Copyright (c) 1990 The Regents of the University of California.");
@@ -334,6 +334,9 @@ get_args(int argc, char *argv[])
if (debug_flags & D_MTAB)
dlog("-D mtab option ignored");
# endif /* DEBUG */
+# ifdef MNTTAB_FILE_NAME
+ mnttab_file_name = MNTTAB_FILE_NAME;
+# endif /* MNTTAB_FILE_NAME */
#endif /* not MOUNT_TABLE_ON_FILE */
if (switch_to_logfile(gopt.logfile, orig_umask) != 0)
diff --git a/contrib/amd/amd/info_file.c b/contrib/amd/amd/info_file.c
index e235752..2978de6 100644
--- a/contrib/amd/amd/info_file.c
+++ b/contrib/amd/amd/info_file.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_file.c,v 1.2 1999/01/10 21:53:45 ezk Exp $
+ * $Id: info_file.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp $
*
*/
@@ -62,7 +62,7 @@ int file_mtime(mnt_map *m, char *map, time_t *tp);
static int
-read_line(char *buf, int size, FILE * fp)
+read_line(char *buf, int size, FILE *fp)
{
int done = 0;
@@ -97,7 +97,7 @@ read_line(char *buf, int size, FILE * fp)
* Try to locate a key in a file
*/
static int
-search_or_reload_file(FILE * fp, char *map, char *key, char **val, mnt_map *m, void (*fn) (mnt_map *m, char *, char *))
+search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m, void (*fn) (mnt_map *m, char *, char *))
{
char key_val[MAX_LINE_LEN];
int chuck = 0;
diff --git a/contrib/amd/amd/info_hesiod.c b/contrib/amd/amd/info_hesiod.c
index 62007d6..d3e9077 100644
--- a/contrib/amd/amd/info_hesiod.c
+++ b/contrib/amd/amd/info_hesiod.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_hesiod.c,v 1.5 1999/02/04 07:24:15 ezk Exp $
+ * $Id: info_hesiod.c,v 1.6.2.1 2001/01/10 03:23:05 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_ldap.c b/contrib/amd/amd/info_ldap.c
index a2bd9ba..35e0d64 100644
--- a/contrib/amd/amd/info_ldap.c
+++ b/contrib/amd/amd/info_ldap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_ldap.c,v 1.6 1999/09/30 21:01:31 ezk Exp $
+ * $Id: info_ldap.c,v 1.9.2.2 2001/01/12 23:28:56 ro Exp $
*
*/
@@ -127,24 +127,25 @@ he_free(HE *h)
static HE *
-string2he(char *s)
+string2he(char *s_orig)
{
char *c, *p;
+ char *s;
HE *new, *old = NULL;
- if (s == NULL)
- return (NULL);
+ if (NULL == s_orig || NULL == (s = strdup(s_orig)))
+ return NULL;
for (p = s; p; p = strchr(p, ',')) {
if (old != NULL) {
- new = (HE *) xmalloc(sizeof(HE));
+ new = ALLOC(HE);
old->next = new;
old = new;
} else {
- old = (HE *) xmalloc(sizeof(HE));
+ old = ALLOC(HE);
old->next = NULL;
}
c = strchr(p, ':');
- if (c) { /* Host and port */
+ if (c) { /* Host and port */
*c++ = '\0';
old->host = strdup(p);
old->port = atoi(c);
@@ -152,6 +153,7 @@ string2he(char *s)
old->host = strdup(p);
}
+ XFREE(s);
return (old);
}
@@ -196,8 +198,8 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts)
}
#endif /* DEBUG */
- aldh = (ALD *) xmalloc(sizeof(ALD));
- creds = (CR *) xmalloc(sizeof(CR));
+ aldh = ALLOC(ALD);
+ creds = ALLOC(CR);
aldh->hostent = string2he(gopt.ldap_hostports);
if (aldh->hostent == NULL) {
@@ -278,7 +280,7 @@ amu_ldap_rebind(ALD *a)
static int
-get_ldap_timestamp(LDAP * ld, char *map, time_t *ts)
+get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
{
struct timeval tv;
char **vals, *end;
@@ -313,7 +315,7 @@ get_ldap_timestamp(LDAP * ld, char *map, time_t *ts)
if (err != LDAP_SUCCESS) {
*ts = 0;
plog(XLOG_USER, "LDAP timestamp search failed: %s\n",
- ldap_err2string(ld->ld_errno));
+ ldap_err2string(err));
return (ENOENT);
}
@@ -413,7 +415,7 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
return (ENOENT);
default:
plog(XLOG_USER, "LDAP search failed: %s\n",
- ldap_err2string(a->ldap->ld_errno));
+ ldap_err2string(err));
ldap_msgfree(res);
return (EIO);
}
diff --git a/contrib/amd/amd/info_ndbm.c b/contrib/amd/amd/info_ndbm.c
index 91cb8e0..981aea7 100644
--- a/contrib/amd/amd/info_ndbm.c
+++ b/contrib/amd/amd/info_ndbm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_ndbm.c,v 1.2 1999/01/10 21:53:46 ezk Exp $
+ * $Id: info_ndbm.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_nis.c b/contrib/amd/amd/info_nis.c
index 17699d4..81e19a3 100644
--- a/contrib/amd/amd/info_nis.c
+++ b/contrib/amd/amd/info_nis.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_nis.c,v 1.5 1999/08/22 05:12:51 ezk Exp $
+ * $Id: info_nis.c,v 1.6.2.2 2001/04/14 21:08:21 ezk Exp $
*
*/
@@ -321,7 +321,7 @@ nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
return ENOENT;
default:
- plog(XLOG_ERROR, "%s: %s", map, yperr_string(res));
+ plog(XLOG_ERROR, "nis_search: %s: %s", map, yperr_string(res));
return EIO;
}
}
diff --git a/contrib/amd/amd/info_nisplus.c b/contrib/amd/amd/info_nisplus.c
index ea7a3d7..f954354 100644
--- a/contrib/amd/amd/info_nisplus.c
+++ b/contrib/amd/amd/info_nisplus.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_nisplus.c,v 1.2 1999/01/10 21:53:46 ezk Exp $
+ * $Id: info_nisplus.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp $
*
*/
@@ -207,7 +207,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
XFREE(index);
if (result == NULL) {
- plog(XLOG_ERROR, "%s: %s", map, strerror(ENOMEM));
+ plog(XLOG_ERROR, "nisplus_search: %s: %s", map, strerror(ENOMEM));
return ENOMEM;
}
@@ -254,7 +254,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
break;
default:
- plog(XLOG_ERROR, "%s: %s", map, nis_sperrno(result->status));
+ plog(XLOG_ERROR, "nisplus_search: %s: %s", map, nis_sperrno(result->status));
error = EIO;
break;
}
diff --git a/contrib/amd/amd/info_passwd.c b/contrib/amd/amd/info_passwd.c
index d367f38..1f19593 100644
--- a/contrib/amd/amd/info_passwd.c
+++ b/contrib/amd/amd/info_passwd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_passwd.c,v 1.2 1999/01/10 21:53:46 ezk Exp $
+ * $Id: info_passwd.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_union.c b/contrib/amd/amd/info_union.c
index d81602b..8f608fd 100644
--- a/contrib/amd/amd/info_union.c
+++ b/contrib/amd/amd/info_union.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_union.c,v 1.2 1999/01/10 21:53:47 ezk Exp $
+ * $Id: info_union.c,v 1.3.2.1 2001/01/10 03:23:07 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/map.c b/contrib/amd/amd/map.c
index 4bfb058..ebf4894d 100644
--- a/contrib/amd/amd/map.c
+++ b/contrib/amd/amd/map.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: map.c,v 1.5 1999/08/22 05:12:51 ezk Exp $
+ * $Id: map.c,v 1.6.2.3 2001/01/10 03:23:07 ezk Exp $
*
*/
@@ -65,6 +65,7 @@
* there is no way that 2^32 generation numbers could ever
* be allocated by a single run of amd - there is simply
* not enough cpu time available.
+ * Famous last words... -Ion
*/
static u_int am_gen = 2; /* Initial generation number */
static int timeout_mp_id; /* Id from last call to timeout */
@@ -307,7 +308,7 @@ init_map(am_node *mp, char *dir)
{
/*
* mp->am_mapno is initialized by exported_ap_alloc
- * other fields don't need to be set to zero.
+ * other fields don't need to be initialized.
*/
mp->am_mnt = new_mntfs();
mp->am_name = strdup(dir);
@@ -318,7 +319,7 @@ init_map(am_node *mp, char *dir)
mp->am_attr.ns_status = NFS_OK;
mp->am_fattr = gen_fattr;
mp->am_fattr.na_fsid = 42;
- mp->am_fattr.na_fileid = 0;
+ mp->am_fattr.na_fileid = mp->am_gen;
mp->am_fattr.na_atime.nt_seconds = clocktime();
mp->am_fattr.na_atime.nt_useconds = 0;
mp->am_fattr.na_mtime = mp->am_fattr.na_ctime = mp->am_fattr.na_atime;
@@ -937,6 +938,21 @@ unmount_mp(am_node *mp)
int was_backgrounded = 0;
mntfs *mf = mp->am_mnt;
+#ifndef MNT2_NFS_OPT_SYMTTL
+ /*
+ * This code is needed to defeat Solaris 2.4's (and newer) symlink
+ * values cache. It forces the last-modified time of the symlink to be
+ * current. It is not needed if the O/S has an nfs flag to turn off the
+ * symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
+ */
+ if (mp->am_parent) {
+ /* defensive programming... can't we assert the above condition? */
+ nfsattrstat *attrp = &mp->am_parent->am_attr;
+ if (++attrp->ns_u.ns_attr_u.na_mtime.nt_useconds == 0)
+ ++attrp->ns_u.ns_attr_u.na_mtime.nt_seconds;
+ }
+#endif /* not MNT2_NFS_OPT_SYMTTL */
+
#ifdef notdef
plog(XLOG_INFO, "\"%s\" on %s timed out", mp->am_path, mp->am_mnt->mf_mount);
#endif /* notdef */
diff --git a/contrib/amd/amd/mapc.c b/contrib/amd/amd/mapc.c
index e27928b..865e07a 100644
--- a/contrib/amd/amd/mapc.c
+++ b/contrib/amd/amd/mapc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mapc.c,v 1.5 1999/09/30 21:01:31 ezk Exp $
+ * $Id: mapc.c,v 1.7.2.3 2001/04/14 21:08:22 ezk Exp $
*
*/
@@ -230,7 +230,7 @@ static map_type maptypes[] =
NULL, /* isup function */
passwd_search,
error_mtime,
- MAPC_ALL
+ MAPC_INC
},
#endif /* HAVE_MAP_PASSWD */
#ifdef HAVE_MAP_HESIOD
@@ -241,7 +241,7 @@ static map_type maptypes[] =
hesiod_isup, /* is Hesiod up or not? */
hesiod_search,
error_mtime,
- MAPC_ALL
+ MAPC_INC
},
#endif /* HAVE_MAP_HESIOD */
#ifdef HAVE_MAP_LDAP
@@ -252,7 +252,7 @@ static map_type maptypes[] =
NULL, /* isup function */
amu_ldap_search,
amu_ldap_mtime,
- MAPC_ALL
+ MAPC_INC
},
#endif /* HAVE_MAP_LDAP */
#ifdef HAVE_MAP_UNION
@@ -296,7 +296,7 @@ static map_type maptypes[] =
NULL, /* isup function */
ndbm_search,
ndbm_mtime,
- MAPC_ALL
+ MAPC_INC
},
#endif /* HAVE_MAP_NDBM */
#ifdef HAVE_MAP_FILE
@@ -498,26 +498,25 @@ mapc_reload_map(mnt_map *m)
{
int error;
kv *maphash[NKVHASH], *tmphash[NKVHASH];
+ time_t t;
+
+ error = (*m->mtime) (m, m->map_name, &t);
+ if (error) {
+ t = m->modify;
+ }
/*
* skip reloading maps that have not been modified, unless
* amq -f was used (do_mapc_reload is 0)
*/
if (m->reloads != 0 && do_mapc_reload != 0) {
- time_t t;
- error = (*m->mtime) (m, m->map_name, &t);
- if (!error) {
- if (t <= m->modify) {
+ if (t <= m->modify) {
plog(XLOG_INFO, "reload of map %s is not needed (in sync)", m->map_name);
#ifdef DEBUG
dlog("map %s last load time is %d, last modify time is %d",
m->map_name, (int) m->modify, (int) t);
#endif /* DEBUG */
return;
- } else {
- /* reload of the map is needed, update map reload time */
- m->modify = t;
- }
}
}
@@ -547,6 +546,7 @@ mapc_reload_map(mnt_map *m)
memcpy((voidp) m->kvhash, (voidp) maphash, sizeof(m->kvhash));
mapc_clear(m);
memcpy((voidp) m->kvhash, (voidp) tmphash, sizeof(m->kvhash));
+ m->modify = t;
}
m->wildcard = 0;
@@ -584,7 +584,7 @@ mapc_create(char *map, char *opt, const char *type)
mt < maptypes + sizeof(maptypes) / sizeof(maptypes[0]);
mt++) {
if (STREQ(type, mt->name)) {
- plog(XLOG_INFO, "initializing amd conf map %s of type %s", map, type);
+ plog(XLOG_INFO, "initializing amd.conf map %s of type %s", map, type);
if ((*mt->init) (m, map, &modify) == 0) {
break;
} else {
@@ -780,6 +780,7 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse)
plog(XLOG_ERROR, "Null map request for %s", key);
return ENOENT;
}
+
if (m->flags & MAPC_SYNC) {
/*
* Get modify time...
@@ -787,7 +788,6 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse)
time_t t;
error = (*m->mtime) (m, m->map_name, &t);
if (error || t > m->modify) {
- m->modify = t;
plog(XLOG_INFO, "Map %s is out of date", m->map_name);
mapc_sync(m);
}
@@ -1122,6 +1122,9 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable
return retval;
}
+ if (mp->am_pref)
+ preflen = strlen(mp->am_pref);
+
/* iterate over keys */
for (i = 0; i < NKVHASH; i++) {
kv *k;
@@ -1142,12 +1145,15 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable
/*
* If the map has a prefix-string then check if the key starts with
- * this * string, and if it does, skip over this prefix.
+ * this string, and if it does, skip over this prefix. If it has a
+ * prefix and it doesn't match the start of the key, skip it.
*/
- if (preflen) {
+ if (preflen && (preflen <= (strlen(key)))) {
if (!NSTREQ(key, mp->am_pref, preflen))
continue;
key += preflen;
+ } else if (preflen) {
+ continue;
}
/* no more '/' are allowed, unless browsable_dirs=full was used */
diff --git a/contrib/amd/amd/mntfs.c b/contrib/amd/amd/mntfs.c
index 7e67959..e875519 100644
--- a/contrib/amd/amd/mntfs.c
+++ b/contrib/amd/amd/mntfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mntfs.c,v 1.2 1999/01/10 21:53:47 ezk Exp $
+ * $Id: mntfs.c,v 1.5.2.1 2001/01/10 03:23:07 ezk Exp $
*
*/
@@ -174,8 +174,8 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char
mf->mf_server = fs;
}
return dup_mntfs(mf);
- }
- }
+ } /* end of "if (STREQ(mf-> ..." */
+ } /* end of ITER */
return alloc_mntfs(ops, mo, mp, info, auto_opts, mopts, remopts);
}
@@ -310,7 +310,9 @@ realloc_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *a
{
mntfs *mf2;
- if (mf->mf_refc == 1 && mf->mf_ops == &amfs_inherit_ops && STREQ(mf->mf_mount, mp)) {
+ if (mf->mf_refc == 1 &&
+ mf->mf_ops == &amfs_inherit_ops &&
+ STREQ(mf->mf_mount, mp)) {
/*
* If we are inheriting then just return
* the same node...
@@ -331,5 +333,23 @@ realloc_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *a
mf2 = find_mntfs(ops, mo, mp, info, auto_opts, mopts, remopts);
free_mntfs(mf);
+#if 0
+ /*
+ * XXX: EZK IS THIS RIGHT???
+ * The next "if" statement is what supposedly fixes bgmount() in
+ * that it will actually use the ops structure of the next mount
+ * entry, if the previous one failed.
+ */
+ if (mf2 &&
+ ops &&
+ mf2->mf_ops != ops &&
+ mf2->mf_ops != &amfs_inherit_ops &&
+ mf2->mf_ops != &amfs_toplvl_ops &&
+ mf2->mf_ops != &amfs_error_ops) {
+ plog(XLOG_WARNING, "realloc_mntfs: copy fallback ops \"%s\" over \"%s\"",
+ ops->fs_type, mf2->mf_ops->fs_type);
+ mf2->mf_ops = ops;
+ }
+#endif
return mf2;
}
diff --git a/contrib/amd/amd/nfs_prot_svc.c b/contrib/amd/amd/nfs_prot_svc.c
index 7c0048b..19bd4c5 100644
--- a/contrib/amd/amd/nfs_prot_svc.c
+++ b/contrib/amd/amd/nfs_prot_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_svc.c,v 1.4 1999/08/22 21:12:30 ezk Exp $
+ * $Id: nfs_prot_svc.c,v 1.5.2.2 2001/01/12 23:28:56 ro Exp $
*
*/
@@ -50,23 +50,23 @@
/* external definitions */
extern voidp nfsproc_null_2_svc(voidp, struct svc_req *);
-extern nfsattrstat * nfsproc_getattr_2_svc(am_nfs_fh *, struct svc_req *);
-extern nfsattrstat * nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
+extern nfsattrstat *nfsproc_getattr_2_svc(am_nfs_fh *, struct svc_req *);
+extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
extern voidp nfsproc_root_2_svc(voidp, struct svc_req *);
-extern nfsdiropres * nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsreadlinkres * nfsproc_readlink_2_svc(am_nfs_fh *, struct svc_req *);
-extern nfsreadres * nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsreadlinkres *nfsproc_readlink_2_svc(am_nfs_fh *, struct svc_req *);
+extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
extern voidp nfsproc_writecache_2_svc(voidp, struct svc_req *);
-extern nfsattrstat * nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
-extern nfsdiropres * nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
-extern nfsstat * nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsstat * nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
-extern nfsstat * nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
-extern nfsstat * nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
-extern nfsdiropres * nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
-extern nfsstat * nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsreaddirres * nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
-extern nfsstatfsres * nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *);
+extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
+extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
+extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
+extern nfsstatfsres *nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *);
/* global variables */
SVCXPRT *nfs_program_2_transp;
diff --git a/contrib/amd/amd/nfs_start.c b/contrib/amd/amd/nfs_start.c
index 48d6f06..5aaea5c 100644
--- a/contrib/amd/amd/nfs_start.c
+++ b/contrib/amd/amd/nfs_start.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_start.c,v 1.4 1999/02/04 07:24:16 ezk Exp $
+ * $Id: nfs_start.c,v 1.5.2.1 2001/01/10 03:23:08 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/nfs_subr.c b/contrib/amd/amd/nfs_subr.c
index d06d008..540202a 100644
--- a/contrib/amd/amd/nfs_subr.c
+++ b/contrib/amd/amd/nfs_subr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_subr.c,v 1.3 1999/01/13 23:31:00 ezk Exp $
+ * $Id: nfs_subr.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp $
*
*/
@@ -108,6 +108,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
static nfsattrstat res;
am_node *mp;
int retry;
+ time_t now = clocktime();
#ifdef DEBUG
amuDebug(D_TRACE)
@@ -122,33 +123,31 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
plog(XLOG_DEBUG, "\tretry=%d", retry);
#endif /* DEBUG */
- if (retry < 0)
+ if (retry < 0) {
+ amd_stats.d_drops++;
return 0;
+ }
res.ns_status = nfs_error(retry);
} else {
nfsattrstat *attrp = &mp->am_attr;
#ifdef DEBUG
amuDebug(D_TRACE)
- plog(XLOG_DEBUG, "\tstat(%s), size = %d", mp->am_path,
- (int) attrp->ns_u.ns_attr_u.na_size);
+ plog(XLOG_DEBUG, "\tstat(%s), size = %d, mtime=%ld",
+ mp->am_path,
+ (int) attrp->ns_u.ns_attr_u.na_size,
+ (long) attrp->ns_u.ns_attr_u.na_mtime.nt_seconds);
#endif /* DEBUG */
+ /* Delay unmount of what was looked up */
+ if (mp->am_timeo_w < 4 * gopt.am_timeo_w)
+ mp->am_timeo_w += gopt.am_timeo_w;
+ mp->am_ttl = now + mp->am_timeo_w;
+
mp->am_stats.s_getattr++;
return attrp;
}
-#ifndef MNT2_NFS_OPT_SYMTTL
- /*
- * This code is needed to defeat Solaris 2.4's (and newer) symlink values
- * cache. It forces the last-modified time of the symlink to be current.
- * It is not needed if the O/S has an nfs flag to turn off the
- * symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
- */
- if (++res.ns_u.ns_attr_u.na_mtime.nt_useconds == 0)
- ++res.ns_u.ns_attr_u.na_mtime.nt_seconds;
-#endif /* not MNT2_NFS_OPT_SYMTTL */
-
return &res;
}
@@ -182,16 +181,26 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
static nfsdiropres res;
am_node *mp;
int retry;
+ uid_t uid;
+ gid_t gid;
#ifdef DEBUG
amuDebug(D_TRACE)
plog(XLOG_DEBUG, "lookup:");
#endif /* DEBUG */
+ /* finally, find the effective uid/gid from RPC request */
+ if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0)
+ plog(XLOG_ERROR, "cannot get uid/gid from RPC credentials");
+ sprintf(opt_uid, "%d", (int) uid);
+ sprintf(opt_gid, "%d", (int) gid);
+
mp = fh_to_mp2(&argp->da_fhandle, &retry);
if (mp == 0) {
- if (retry < 0)
+ if (retry < 0) {
+ amd_stats.d_drops++;
return 0;
+ }
res.dr_status = nfs_error(retry);
} else {
int error;
@@ -203,9 +212,6 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
ap = (*mp->am_mnt->mf_ops->lookuppn) (mp, argp->da_name, &error, VLOOK_CREATE);
if (ap == 0) {
if (error < 0) {
-#ifdef DEBUG
- dlog("Not sending RPC reply");
-#endif /* DEBUG */
amd_stats.d_drops++;
return 0;
}
@@ -289,8 +295,10 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
mp = fh_to_mp2(argp, &retry);
if (mp == 0) {
readlink_retry:
- if (retry < 0)
+ if (retry < 0) {
+ amd_stats.d_drops++;
return 0;
+ }
res.rlr_status = nfs_error(retry);
} else {
char *ln = do_readlink(mp, &retry, (nfsattrstat **) 0);
@@ -367,8 +375,10 @@ unlink_or_rmdir(nfsdiropargs *argp, struct svc_req *rqstp, int unlinkp)
am_node *mp = fh_to_mp3(&argp->da_fhandle, &retry, VLOOK_DELETE);
if (mp == 0) {
- if (retry < 0)
+ if (retry < 0) {
+ amd_stats.d_drops++;
return 0;
+ }
res = nfs_error(retry);
goto out;
}
@@ -500,8 +510,10 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp)
mp = fh_to_mp2(&argp->rda_fhandle, &retry);
if (mp == 0) {
- if (retry < 0)
+ if (retry < 0) {
+ amd_stats.d_drops++;
return 0;
+ }
res.rdr_status = nfs_error(retry);
} else {
#ifdef DEBUG
@@ -533,8 +545,10 @@ nfsproc_statfs_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
mp = fh_to_mp2(argp, &retry);
if (mp == 0) {
- if (retry < 0)
+ if (retry < 0) {
+ amd_stats.d_drops++;
return 0;
+ }
res.sfr_status = nfs_error(retry);
} else {
nfsstatfsokres *fp;
diff --git a/contrib/amd/amd/ops_TEMPLATE.c b/contrib/amd/amd/ops_TEMPLATE.c
index 34fd308..17c55b3 100644
--- a/contrib/amd/amd/ops_TEMPLATE.c
+++ b/contrib/amd/amd/ops_TEMPLATE.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_TEMPLATE.c,v 1.2 1999/01/10 21:53:48 ezk Exp $
+ * $Id: ops_TEMPLATE.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp $
*
*/
@@ -60,18 +60,18 @@
#include <amd.h>
/* forward declarations */
-static char * foofs_match(am_opts *fo);
+static char *foofs_match(am_opts *fo);
static int foofs_init(mntfs *mf);
static int foofs_mount(am_node *mp);
static int foofs_fmount(mntfs *mf);
static int foofs_umount(am_node *mp);
static int foofs_fumount(mntfs *mf);
-static am_node * foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
+static am_node *foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
static int foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count);
-static am_node * foofs_readlink(am_node *mp, int *error_return);
+static am_node *foofs_readlink(am_node *mp, int *error_return);
static void foofs_mounted(mntfs *mf);
static void foofs_umounted(am_node *mp);
-fserver * foofs_ffserver(mntfs *mf);
+fserver *foofs_ffserver(mntfs *mf);
/*
diff --git a/contrib/amd/amd/ops_autofs.c b/contrib/amd/amd/ops_autofs.c
index da77af1..bd0bb12 100644
--- a/contrib/amd/amd/ops_autofs.c
+++ b/contrib/amd/amd/ops_autofs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_autofs.c,v 1.4 1999/01/13 23:31:00 ezk Exp $
+ * $Id: ops_autofs.c,v 1.7.2.4 2001/04/24 06:17:40 ib42 Exp $
*
*/
@@ -138,10 +138,10 @@ autofs_mount(am_node *mp)
mnttype = "indirect";
else if (mf->mf_ops == &amfs_direct_ops)
mnttype = "direct";
-#ifdef HAVE_AM_FS_UNION
+#ifdef HAVE_AMU_FS_UNION
else if (mf->mf_ops == &amfs_union_ops)
mnttype = "union";
-#endif /* HAVE_AM_FS_UNION */
+#endif /* HAVE_AMU_FS_UNION */
else
mnttype = "auto";
@@ -510,7 +510,7 @@ out:
endfor
*/
static int
-autofs_bgmount(struct continuation * cp, int mpe)
+autofs_bgmount(struct continuation *cp, int mpe)
{
mntfs *mf = cp->mp->am_mnt; /* Current mntfs */
mntfs *mf_retry = 0; /* First mntfs which needed retrying */
@@ -586,7 +586,7 @@ autofs_bgmount(struct continuation * cp, int mpe)
* Note whether this is a real mount attempt
*/
if (p == &amfs_error_ops) {
- plog(XLOG_MAP, "Map entry %s for %s failed to match", *cp->ivec, mp->am_path);
+ plog(XLOG_MAP, "Map entry %s for %s did not match", *cp->ivec, mp->am_path);
if (this_error <= 0)
this_error = ENOENT;
continue;
@@ -677,8 +677,6 @@ autofs_bgmount(struct continuation * cp, int mpe)
else
mk_fattr(mp, NFLNK);
- mp->am_fattr.na_fileid = mp->am_gen;
-
if (p->fs_init)
this_error = (*p->fs_init) (mf);
}
@@ -1122,7 +1120,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
*/
rvec = strsplit(dfl, ' ', '\"');
- if (gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) {
+ if (gopt.flags & CFM_SELECTORS_IN_DEFAULTS) {
/*
* Pick whichever first entry matched the list of selectors.
* Strip the selectors from the string, and assign to dfl the
@@ -1138,7 +1136,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
mp->am_parent->am_mnt->mf_info);
free_opts(&ap); /* don't leak */
if (pt == &amfs_error_ops) {
- plog(XLOG_MAP, "failed to match defaults for \"%s\"", *sp);
+ plog(XLOG_MAP, "did not match defaults for \"%s\"", *sp);
} else {
dfl = strip_selectors(*sp, "/defaults");
plog(XLOG_MAP, "matched default selectors \"%s\"", dfl);
@@ -1147,7 +1145,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
++sp;
}
}
- } else { /* not enable_default_selectors */
+ } else { /* not selectors_in_defaults */
/*
* Extract first value
*/
@@ -1161,7 +1159,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
/*
* Log error if there were other values
*/
- if (!(gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) && rvec[1]) {
+ if (!(gopt.flags & CFM_SELECTORS_IN_DEFAULTS) && rvec[1]) {
# ifdef DEBUG
dlog("/defaults chopped into %s", dfl);
# endif /* DEBUG */
diff --git a/contrib/amd/amd/ops_cdfs.c b/contrib/amd/amd/ops_cdfs.c
index 0f104d6..0fae196 100644
--- a/contrib/amd/amd/ops_cdfs.c
+++ b/contrib/amd/amd/ops_cdfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_cdfs.c,v 1.3 1999/03/30 17:22:46 ezk Exp $
+ * $Id: ops_cdfs.c,v 1.4.2.1 2001/01/10 03:23:09 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_efs.c b/contrib/amd/amd/ops_efs.c
index 5c8b27e..a8cdd04 100644
--- a/contrib/amd/amd/ops_efs.c
+++ b/contrib/amd/amd/ops_efs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_efs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $
+ * $Id: ops_efs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_lofs.c b/contrib/amd/amd/ops_lofs.c
index a7cccba..1dbeff8 100644
--- a/contrib/amd/amd/ops_lofs.c
+++ b/contrib/amd/amd/ops_lofs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_lofs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $
+ * $Id: ops_lofs.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp $
*
*/
@@ -53,7 +53,7 @@
#include <amd.h>
/* forward definitions */
-static char * lofs_match(am_opts *fo);
+static char *lofs_match(am_opts *fo);
static int lofs_fmount(mntfs *mf);
static int lofs_fumount(mntfs *mf);
static int mount_lofs(char *dir, char *fs_name, char *opts);
diff --git a/contrib/amd/amd/ops_mfs.c b/contrib/amd/amd/ops_mfs.c
index 87178b0..468a8aa 100644
--- a/contrib/amd/amd/ops_mfs.c
+++ b/contrib/amd/amd/ops_mfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_mfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
+ * $Id: ops_mfs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_nfs.c b/contrib/amd/amd/ops_nfs.c
index 01cdcee..14bf5de 100644
--- a/contrib/amd/amd/ops_nfs.c
+++ b/contrib/amd/amd/ops_nfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_nfs.c,v 1.5 1999/03/13 17:03:28 ezk Exp $
+ * $Id: ops_nfs.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp $
*
*/
@@ -167,7 +167,7 @@ find_nfs_fhandle_cache(voidp idv, int done)
* Called when a filehandle appears
*/
static void
-got_nfs_fh(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia, voidp idv, int done)
+got_nfs_fh(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, voidp idv, int done)
{
fh_cache *fp;
@@ -397,14 +397,14 @@ make_nfs_auth(void)
#ifdef HAVE_TRANSPORT_TYPE_TLI
if (gopt.flags & CFM_FULLY_QUALIFIED_HOSTS) {
- plog(XLOG_INFO, "Using NFS auth for fqhn \"%s\"", hostd);
+ plog(XLOG_INFO, "Using NFS auth for FQHN \"%s\"", hostd);
nfs_auth = authsys_create(hostd, 0, 0, 1, &group_wheel);
} else {
nfs_auth = authsys_create_default();
}
#else /* not HAVE_TRANSPORT_TYPE_TLI */
if (gopt.flags & CFM_FULLY_QUALIFIED_HOSTS) {
- plog(XLOG_INFO, "Using NFS auth for fqhn \"%s\"", hostd);
+ plog(XLOG_INFO, "Using NFS auth for FQHN \"%s\"", hostd);
nfs_auth = authunix_create(hostd, 0, 0, 1, &group_wheel);
} else {
nfs_auth = authunix_create_default();
@@ -664,7 +664,7 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *
#ifdef DEBUG
amuDebug(D_TRACE) {
print_nfs_args(&nfs_args, nfs_version);
- plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags);
+ plog(XLOG_DEBUG, "Generic mount flags 0x%x used for NFS mount", genflags);
}
#endif /* DEBUG */
error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type,
diff --git a/contrib/amd/amd/ops_nfs3.c b/contrib/amd/amd/ops_nfs3.c
index 0a9a198..91b83de 100644
--- a/contrib/amd/amd/ops_nfs3.c
+++ b/contrib/amd/amd/ops_nfs3.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_nfs3.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
+ * $Id: ops_nfs3.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_nullfs.c b/contrib/amd/amd/ops_nullfs.c
index bd2e5ba..e35fb31 100644
--- a/contrib/amd/amd/ops_nullfs.c
+++ b/contrib/amd/amd/ops_nullfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_nullfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
+ * $Id: ops_nullfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_pcfs.c b/contrib/amd/amd/ops_pcfs.c
index bca33ae..c7f1e6e 100644
--- a/contrib/amd/amd/ops_pcfs.c
+++ b/contrib/amd/amd/ops_pcfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_pcfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
+ * $Id: ops_pcfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_tfs.c b/contrib/amd/amd/ops_tfs.c
index f370eb9..8dbb91b 100644
--- a/contrib/amd/amd/ops_tfs.c
+++ b/contrib/amd/amd/ops_tfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_tfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
+ * $Id: ops_tfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_tmpfs.c b/contrib/amd/amd/ops_tmpfs.c
index 99f47dc..e361e46 100644
--- a/contrib/amd/amd/ops_tmpfs.c
+++ b/contrib/amd/amd/ops_tmpfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_tmpfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
+ * $Id: ops_tmpfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_ufs.c b/contrib/amd/amd/ops_ufs.c
index 0b2ff2d..0b2bc1d 100644
--- a/contrib/amd/amd/ops_ufs.c
+++ b/contrib/amd/amd/ops_ufs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_ufs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
+ * $Id: ops_ufs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_umapfs.c b/contrib/amd/amd/ops_umapfs.c
index 9862933..e524517 100644
--- a/contrib/amd/amd/ops_umapfs.c
+++ b/contrib/amd/amd/ops_umapfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_umapfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
+ * $Id: ops_umapfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_unionfs.c b/contrib/amd/amd/ops_unionfs.c
index 2e914a9..d0260ce 100644
--- a/contrib/amd/amd/ops_unionfs.c
+++ b/contrib/amd/amd/ops_unionfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_unionfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
+ * $Id: ops_unionfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_xfs.c b/contrib/amd/amd/ops_xfs.c
index 86ebfa0..83f9641 100644
--- a/contrib/amd/amd/ops_xfs.c
+++ b/contrib/amd/amd/ops_xfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_xfs.c,v 1.2 1999/01/10 21:53:52 ezk Exp $
+ * $Id: ops_xfs.c,v 1.3.2.2 2001/01/12 23:28:58 ro Exp $
*
*/
@@ -53,7 +53,7 @@
#include <amd.h>
/* forward declarations */
-static char * xfs_match(am_opts *fo);
+static char *xfs_match(am_opts *fo);
static int xfs_fmount(mntfs *mf);
static int xfs_fumount(mntfs *mf);
diff --git a/contrib/amd/amd/opts.c b/contrib/amd/amd/opts.c
index d564e69..2fda3b7 100644
--- a/contrib/amd/amd/opts.c
+++ b/contrib/amd/amd/opts.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: opts.c,v 1.6 1999/09/30 21:01:32 ezk Exp $
+ * $Id: opts.c,v 1.8.2.4 2001/01/10 03:23:11 ezk Exp $
*
*/
@@ -103,7 +103,6 @@ static int f_true(char *);
/*
* STATICS:
*/
-static struct am_opts fs_static; /* copy of the options to play with */
static char NullStr[] = "<NULL>";
static char nullstr[] = "";
static char *opt_dkey = NullStr;
@@ -113,7 +112,16 @@ static char *opt_key = nullstr;
static char *opt_keyd = nullstr;
static char *opt_map = nullstr;
static char *opt_path = nullstr;
+static char uid_str[12], gid_str[12];
+char *opt_uid = uid_str;
+char *opt_gid = gid_str;
static char *vars[8];
+static char *literal_dollar = "$"; /* ${dollar}: a literal '$' in maps */
+
+/*
+ * GLOBALS
+ */
+struct am_opts fs_static; /* copy of the options to play with */
/*
@@ -122,7 +130,7 @@ static char *vars[8];
*/
static struct opt opt_fields[] = {
/* Name and length.
- Option str. Selector str. boolean fxn. flags */
+ Option str. Selector str. boolean fxn. case sensitive */
{ S("opts"),
&fs_static.opt_opts, 0, 0, FALSE },
{ S("host"),
@@ -149,8 +157,6 @@ static struct opt opt_fields[] = {
&fs_static.opt_dev, 0, 0, FALSE },
{ S("pref"),
&fs_static.opt_pref, 0, 0, FALSE },
- { S("autopref"),
- &fs_static.opt_autopref,0, 0, FALSE },
{ S("path"),
0, &opt_path, 0, FALSE },
{ S("autodir"),
@@ -195,12 +201,19 @@ static struct opt opt_fields[] = {
0, &opt_dkey, 0, FALSE },
{ S("key."),
0, &opt_keyd, 0, FALSE },
+ /* XXX: should maptype really be a variable? I think selector. -Erez */
{ S("maptype"),
&fs_static.opt_maptype, 0, 0, FALSE },
{ S("cachedir"),
&fs_static.opt_cachedir, 0, 0, FALSE },
{ S("addopts"),
- &fs_static.opt_addopts, 0, 0, FALSE },
+ &fs_static.opt_addopts, 0, 0, FALSE },
+ { S("uid"),
+ 0, &opt_uid, 0, FALSE },
+ { S("gid"),
+ 0, &opt_gid, 0, FALSE },
+ { S("dollar"),
+ &literal_dollar, 0, 0, FALSE },
{ S("var0"),
&vars[0], 0, 0, FALSE },
{ S("var1"),
@@ -303,7 +316,7 @@ backslash(char **p)
if (**p == '\\') {
(*p)++;
switch (**p) {
- case 'a':
+ case 'g':
c = '\007'; /* Bell */
break;
case 'b':
@@ -856,7 +869,7 @@ normalize_slash(char *p)
static void
expand_op(opt_apply *p, int sel_p)
{
- static char expand_error[] = "No space to expand \"%s\"";
+ static const char expand_error[] = "No space to expand \"%s\"";
char expbuf[MAXPATHLEN + 1];
char nbuf[NLEN + 1];
char *ep = expbuf;
diff --git a/contrib/amd/amd/restart.c b/contrib/amd/amd/restart.c
index bd8e4aa..cf628ce 100644
--- a/contrib/amd/amd/restart.c
+++ b/contrib/amd/amd/restart.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: restart.c,v 1.2 1999/01/10 21:53:52 ezk Exp $
+ * $Id: restart.c,v 1.3.2.1 2001/01/10 03:23:12 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/rpc_fwd.c b/contrib/amd/amd/rpc_fwd.c
index 5a74f3b..5422def 100644
--- a/contrib/amd/amd/rpc_fwd.c
+++ b/contrib/amd/amd/rpc_fwd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: rpc_fwd.c,v 1.2 1999/01/10 21:53:52 ezk Exp $
+ * $Id: rpc_fwd.c,v 1.3.2.2 2001/04/14 21:08:23 ezk Exp $
*
*/
@@ -187,7 +187,7 @@ fwd_init(void)
* Some things we talk to require a priv port - so make one here
*/
if (bind_resv_port(fwd_sock, (u_short *) 0) < 0)
- plog(XLOG_ERROR, "can't bind privileged port");
+ plog(XLOG_ERROR, "can't bind privileged port (rpc_fwd)");
if (fcntl(fwd_sock, F_SETFL, FNDELAY) < 0
#ifdef FIONBIO
diff --git a/contrib/amd/amd/sched.c b/contrib/amd/amd/sched.c
index e5cf679..46346ae 100644
--- a/contrib/amd/amd/sched.c
+++ b/contrib/amd/amd/sched.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: sched.c,v 1.3 1999/01/13 23:31:01 ezk Exp $
+ * $Id: sched.c,v 1.4.2.2 2001/01/10 03:23:12 ezk Exp $
*
*/
@@ -219,7 +219,7 @@ do_task_notify(void)
/*
* Keep taking the first item off the list and processing it.
*
- * Done this way because the the callback can, quite reasonably,
+ * Done this way because the callback can, quite reasonably,
* queue a new task, so no local reference into the list can be
* held here.
*/
diff --git a/contrib/amd/amd/srvr_amfs_auto.c b/contrib/amd/amd/srvr_amfs_auto.c
index a8ddd17..78c586f 100644
--- a/contrib/amd/amd/srvr_amfs_auto.c
+++ b/contrib/amd/amd/srvr_amfs_auto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: srvr_amfs_auto.c,v 1.2 1999/01/10 21:53:53 ezk Exp $
+ * $Id: srvr_amfs_auto.c,v 1.3.2.3 2001/04/14 21:08:23 ezk Exp $
*
*/
@@ -208,7 +208,8 @@ dup_srvr(fserver *fs)
/*
* Log state change
*/
-void srvrlog(fserver *fs, char *state)
+void
+srvrlog(fserver *fs, char *state)
{
- plog(XLOG_INFO, "file server %s type %s %s", fs->fs_host, fs->fs_type, state);
+ plog(XLOG_INFO, "file server %s, type %s, state %s", fs->fs_host, fs->fs_type, state);
}
diff --git a/contrib/amd/amd/srvr_nfs.c b/contrib/amd/amd/srvr_nfs.c
index b204be1..f267447 100644
--- a/contrib/amd/amd/srvr_nfs.c
+++ b/contrib/amd/amd/srvr_nfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: srvr_nfs.c,v 1.5 1999/09/08 23:36:39 ezk Exp $
+ * $Id: srvr_nfs.c,v 1.7.2.5 2001/04/14 21:08:23 ezk Exp $
*
*/
@@ -93,7 +93,13 @@ static int ping_len;
static char ping_buf[sizeof(struct rpc_msg) + 32];
#if defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3)
-/* protocols we know about, in order of preference */
+/*
+ * Protocols we know about, in order of preference.
+ *
+ * Note that Solaris 8 and newer NetBSD systems are switching to UDP first,
+ * so this order may have to be adjusted for Amd in the future once more
+ * vendors make that change. -Erez 11/24/2000
+ */
static char *protocols[] = { "tcp", "udp", NULL };
#endif /* defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) */
@@ -168,7 +174,7 @@ start_ping(u_long nfs_version)
* Called when a portmap reply arrives
*/
static void
-got_portmap(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia, voidp idv, int done)
+got_portmap(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, voidp idv, int done)
{
fserver *fs2 = (fserver *) idv;
fserver *fs = 0;
@@ -227,7 +233,7 @@ got_portmap(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia
* Obtain portmap information
*/
static int
-call_portmap(fserver *fs, AUTH * auth, u_long prog, u_long vers, u_long prot)
+call_portmap(fserver *fs, AUTH *auth, u_long prog, u_long vers, u_long prot)
{
struct rpc_msg pmap_msg;
int len;
@@ -301,7 +307,7 @@ recompute_portmap(fserver *fs)
* structure when the ping was transmitted.
*/
static void
-nfs_pinged(voidp pkt, int len, struct sockaddr_in * sp, struct sockaddr_in * tsp, voidp idv, int done)
+nfs_pinged(voidp pkt, int len, struct sockaddr_in *sp, struct sockaddr_in *tsp, voidp idv, int done)
{
int xid = (long) idv; /* for 64-bit archs */
fserver *fs;
@@ -541,7 +547,7 @@ nfs_keepalive(voidp v)
int
-nfs_srvr_port(fserver *fs, u_short * port, voidp wchan)
+nfs_srvr_port(fserver *fs, u_short *port, voidp wchan)
{
int error = -1;
if ((fs->fs_flags & FSF_VALID) == FSF_VALID) {
@@ -644,15 +650,11 @@ find_nfs_srvr(mntfs *mf)
#ifdef MNTTAB_OPT_PROTO
{
- char *proto_opt = hasmntopt(&mnt, MNTTAB_OPT_PROTO);
+ char *proto_opt = hasmnteq(&mnt, MNTTAB_OPT_PROTO);
if (proto_opt) {
char **p;
-
- proto_opt += sizeof(MNTTAB_OPT_PROTO) - 1; /* skip the "proto" */
-
for (p = protocols; *p; p ++)
- if (proto_opt[0] == '=' &&
- NSTREQ(&proto_opt[1], *p, strlen(*p))) {
+ if (NSTREQ(proto_opt, *p, strlen(*p))) {
nfs_proto = *p;
break;
}
@@ -668,10 +670,21 @@ find_nfs_srvr(mntfs *mf)
if (hasmntopt(&mnt, "nfsv2")) {
nfs_version = (u_long) 2; /* nullify any ``vers=X'' statements */
nfs_proto = "udp"; /* nullify any ``proto=tcp'' statements */
- plog(XLOG_WARNING, "found compatiblity option \"nfsv2\": set options vers=2, proto=udp for host %s", host);
+ plog(XLOG_WARNING, "found compatiblity option \"nfsv2\": set options vers=2,proto=udp for host %s", host);
}
#endif /* HAVE_NFS_NFSV2_H */
+ /* check if we globally overridden the NFS version/protocol */
+ if (gopt.nfs_vers) {
+ nfs_version = gopt.nfs_vers;
+ plog(XLOG_INFO, "find_nfs_srvr: force NFS version to %d",
+ (int) nfs_version);
+ }
+ if (gopt.nfs_proto) {
+ nfs_proto = gopt.nfs_proto;
+ plog(XLOG_INFO, "find_nfs_srvr: force NFS protocol transport to %s", nfs_proto);
+ }
+
/*
* lookup host address and canonical name
*/
diff --git a/contrib/amd/amq/amq.8 b/contrib/amd/amq/amq.8
index fc428e6..a4f0805 100644
--- a/contrib/amd/amq/amq.8
+++ b/contrib/amd/amq/amq.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amq.8,v 1.2 1999/01/10 21:53:58 ezk Exp $
+.\" $Id: amq.8,v 1.3.2.4 2001/01/12 22:43:43 ro Exp $
.\"
.TH AMQ 8 "25 April 1989"
.SH NAME
@@ -46,7 +46,7 @@ amq \- automounter query tool
.SH SYNOPSIS
.B amq
[
-.BI \-fmpsuvTU
+.BI \-fmpsvwHTU
] [
.BI \-h " hostname"
] [
@@ -56,12 +56,12 @@ amq \- automounter query tool
] [
.BI \-D " debug_options"
] [
-.BI \-M " mountmap entry"
-] [
.BI \-P " program_number"
-] [
-.I directory
-] .\|.\|.
+] [[
+.B \-u
+]
+.I directory .\|.\|.
+]
.SH DESCRIPTION
.B Amq
provides a simple way of determining the current state of
@@ -139,6 +139,16 @@ information output by
option.
.TP
+.B \-w
+Translate a full pathname as returned by
+.IR getpwd (3)
+into a short
+.B Amd
+pathname that goes through its mount points. This option requires that
+.B Amd
+is running.
+
+.TP
.BI \-x " log_options"
Ask the automounter to use the logging options specified in
.I log_options
@@ -151,14 +161,8 @@ Ask the automounter to use the debugging options specified in
from now on.
.TP
-.BI \-M " map_ent"
-Pass a mount map entry to
-.B amd
-and wait for it to be evaluated, possible causing a mount. This option is
-highly insecure. By default, amd and amq do not support it. You have to
-configure am-utils with
-.I \-\-enable\-amq\-mount
-to enable this option.
+.B \-H
+Display short usage message.
.TP
.BI \-P " program_number"
diff --git a/contrib/amd/amq/amq.c b/contrib/amd/amq/amq.c
index acad7bc..9e8deef 100644
--- a/contrib/amd/amq/amq.c
+++ b/contrib/amd/amq/amq.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $
+ * $Id: amq.c,v 1.7.2.5 2001/01/12 22:43:43 ro Exp $
*
*/
@@ -48,13 +48,13 @@
#ifndef lint
char copyright[] = "\
-@(#)Copyright (c) 1997-1999 Erez Zadok\n\
+@(#)Copyright (c) 1997-2001 Erez Zadok\n\
@(#)Copyright (c) 1990 Jan-Simon Pendry\n\
@(#)Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n\
@(#)Copyright (c) 1990 The Regents of the University of California.\n\
@(#)All rights reserved.\n";
#if __GNUC__ < 2
-static char rcsid[] = "$Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $";
+static char rcsid[] = "$Id: amq.c,v 1.7.2.5 2001/01/12 22:43:43 ro Exp $";
static char sccsid[] = "%W% (Berkeley) %G%";
#endif /* __GNUC__ < 2 */
#endif /* not lint */
@@ -74,9 +74,9 @@ static int stats_flag;
static int getvers_flag;
static int amd_program_number = AMQ_PROGRAM;
static int use_tcp_flag, use_udp_flag;
+static int getpwd_flag;
static char *debug_opts;
static char *amq_logfile;
-static char *mount_map;
static char *xlog_optstr;
static char localhost[] = "localhost";
static char *def_server = localhost;
@@ -85,14 +85,6 @@ static char *def_server = localhost;
extern int optind;
extern char *optarg;
-/* forward declarations */
-#ifdef HAVE_TRANSPORT_TYPE_TLI
-static CLIENT *get_secure_amd_client(char *host, struct timeval *tv, int *sock);
-static int amq_bind_resv_port(int td, u_short *pp);
-#else /* not HAVE_TRANSPORT_TYPE_TLI */
-static int privsock(int ty);
-#endif /* not HAVE_TRANSPORT_TYPE_TLI */
-
/* structures */
enum show_opt {
Full, Stats, Calc, Short, ShowDone
@@ -184,6 +176,31 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid)
}
}
+
+/*
+ * Display a pwd data
+ */
+static void
+show_pwd(amq_mount_tree *mt, char *path, int *flag)
+{
+ int len;
+
+ while (mt) {
+ len = strlen(mt->mt_mountpoint);
+ if (NSTREQ(path, mt->mt_mountpoint, len) &&
+ !STREQ(mt->mt_directory, mt->mt_mountpoint)) {
+ char buf[MAXPATHLEN+1];
+ strcpy(buf, mt->mt_directory);
+ strcat(buf, &path[len]);
+ strcpy(path, buf);
+ *flag = 1;
+ }
+ show_pwd(mt->mt_next, path, flag);
+ mt = mt->mt_child;
+ }
+}
+
+
/*
* Display a mount tree.
*/
@@ -197,6 +214,7 @@ show_mt(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *pwid)
}
}
+
static void
show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twid)
{
@@ -301,16 +319,11 @@ main(int argc, char *argv[])
int errs = 0;
char *server;
struct sockaddr_in server_addr;
- int s; /* to pass the Amd security check, we must use a priv port */
CLIENT *clnt = NULL;
struct hostent *hp;
int nodefault = 0;
struct timeval tv;
char *progname = NULL;
-#ifndef HAVE_TRANSPORT_TYPE_TLI
- enum clnt_stat cs;
-#endif /* not HAVE_TRANSPORT_TYPE_TLI */
-
/*
* Compute program name
@@ -329,12 +342,12 @@ main(int argc, char *argv[])
/*
* Parse arguments
*/
-#ifdef ENABLE_AMQ_MOUNT
- while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != -1)
-#else /* not ENABLE_AMQ_MOUNT */
- while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:pP:TU")) != -1)
-#endif /* not ENABLE_AMQ_MOUNT */
+ while ((opt_ch = getopt(argc, argv, "Hfh:l:msuvx:D:pP:TUw")) != -1)
switch (opt_ch) {
+ case 'H':
+ goto show_usage;
+ break;
+
case 'f':
flush_flag = 1;
nodefault = 1;
@@ -384,13 +397,6 @@ main(int argc, char *argv[])
nodefault = 1;
break;
-#ifdef ENABLE_AMQ_MOUNT
- case 'M':
- mount_map = optarg;
- nodefault = 1;
- break;
-#endif /* ENABLE_AMQ_MOUNT */
-
case 'P':
amd_program_number = atoi(optarg);
break;
@@ -403,6 +409,10 @@ main(int argc, char *argv[])
use_udp_flag = 1;
break;
+ case 'w':
+ getpwd_flag = 1;
+ break;
+
default:
errs = 1;
break;
@@ -415,21 +425,15 @@ main(int argc, char *argv[])
if (errs) {
show_usage:
fprintf(stderr, "\
-Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
-\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts]%s\n\
-\t[-P prognum] [-T] [-U]\n",
- am_get_progname(),
-#ifdef ENABLE_AMQ_MOUNT
- " [-M mapent]"
-#else /* not ENABLE_AMQ_MOUNT */
- ""
-#endif /* not ENABLE_AMQ_MOUNT */
+Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\
+\t[-x log_options] [-D debug_options]\n\
+\t[-P program_number] [[-u] directory ...]\n",
+ am_get_progname()
);
exit(1);
}
-
/* set use_udp and use_tcp flags both to on if none are defined */
if (!use_tcp_flag && !use_udp_flag)
use_tcp_flag = use_udp_flag = 1;
@@ -468,9 +472,7 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
tv.tv_sec = 5; /* 5 seconds for timeout or per retry */
tv.tv_usec = 0;
-#ifdef HAVE_TRANSPORT_TYPE_TLI
- clnt = get_secure_amd_client(server, &tv, &s);
- if (!clnt && use_tcp_flag) /* try tcp first */
+ if (use_tcp_flag) /* try tcp first */
clnt = clnt_create(server, amd_program_number, AMQ_VERSION, "tcp");
if (!clnt && use_udp_flag) { /* try udp next */
clnt = clnt_create(server, amd_program_number, AMQ_VERSION, "udp");
@@ -478,29 +480,6 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
if (clnt)
clnt_control(clnt, CLSET_RETRY_TIMEOUT, (char *) &tv);
}
-#else /* not HAVE_TRANSPORT_TYPE_TLI */
-
- /* first check if remote portmapper is up */
- cs = pmap_ping(&server_addr);
- if (cs == RPC_TIMEDOUT) {
- fprintf(stderr, "%s: failed to contact portmapper on host \"%s\". %s\n",
- am_get_progname(), server, clnt_sperrno(cs));
- exit(1);
- }
-
- /* portmapper exists: get remote amd info from it */
- if (!clnt && use_tcp_flag) { /* try tcp first */
- s = RPC_ANYSOCK;
- clnt = clnttcp_create(&server_addr, amd_program_number,
- AMQ_VERSION, &s, 0, 0);
- }
- if (!clnt && use_udp_flag) { /* try udp next */
- /* XXX: do we need to close(s) ? */
- s = privsock(SOCK_DGRAM);
- clnt = clntudp_create(&server_addr, amd_program_number,
- AMQ_VERSION, tv, &s);
- }
-#endif /* not HAVE_TRANSPORT_TYPE_TLI */
if (!clnt) {
fprintf(stderr, "%s: ", am_get_progname());
clnt_pcreateerror(server);
@@ -576,6 +555,34 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
}
/*
+ * getpwd info
+ */
+ if (getpwd_flag) {
+ char path[MAXPATHLEN+1];
+ char *wd = getcwd(path, MAXPATHLEN+1);
+ amq_mount_tree_list *mlp = amqproc_export_1((voidp) 0, clnt);
+ amq_mount_tree_p mt;
+ int i, flag;
+
+ if (!wd) {
+ perror("getcwd");
+ exit(1);
+ }
+ for (i = 0; mlp && i < mlp->amq_mount_tree_list_len; i++) {
+ mt = mlp->amq_mount_tree_list_val[i];
+ while (1) {
+ flag = 0;
+ show_pwd(mt, path, &flag);
+ if (!flag) {
+ printf("%s\n", path);
+ break;
+ }
+ }
+ }
+ exit(0);
+ }
+
+ /*
* Mount info
*/
if (minfo_flag) {
@@ -596,24 +603,6 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
}
/*
- * Mount map
- */
- if (mount_map) {
- int *rc;
- do {
- rc = amqproc_mount_1(&mount_map, clnt);
- } while (rc && *rc < 0);
- if (!rc || *rc > 0) {
- if (rc)
- errno = *rc;
- else
- errno = ETIMEDOUT;
- fprintf(stderr, "%s: could not start new ", am_get_progname());
- perror("automount point");
- }
- }
-
- /*
* Get Version
*/
if (getvers_flag) {
@@ -720,241 +709,3 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
exit(errs);
return errs; /* should never reach here */
}
-
-
-#ifdef HAVE_TRANSPORT_TYPE_TLI
-
-/*
- * How to bind to reserved ports.
- * TLI handle (socket) and port version.
- */
-/* defined here so that it does not have to resolve it with libamu.a */
-static int
-amq_bind_resv_port(int td, u_short *pp)
-{
- int rc = -1, port;
- struct t_bind *treq, *tret;
- struct sockaddr_in *sin;
-
- treq = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR);
- if (!treq) {
- plog(XLOG_ERROR, "t_alloc 1");
- return -1;
- }
- tret = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR);
- if (!tret) {
- t_free((char *) treq, T_BIND);
- plog(XLOG_ERROR, "t_alloc 2");
- return -1;
- }
- memset((char *) treq->addr.buf, 0, treq->addr.len);
- sin = (struct sockaddr_in *) treq->addr.buf;
- sin->sin_family = AF_INET;
- treq->qlen = 0;
- treq->addr.len = treq->addr.maxlen;
- errno = EADDRINUSE;
- port = IPPORT_RESERVED;
-
- do {
- --port;
- sin->sin_port = htons(port);
- rc = t_bind(td, treq, tret);
- if (rc < 0) {
- } else {
- if (memcmp(treq->addr.buf, tret->addr.buf, tret->addr.len) == 0)
- break;
- else
- t_unbind(td);
- }
- } while ((rc < 0 || errno == EADDRINUSE) && (int) port > IPPORT_RESERVED / 2);
-
- if (pp) {
- if (rc == 0)
- *pp = port;
- else
- plog(XLOG_ERROR, "could not t_bind to any reserved port");
- }
- t_free((char *) tret, T_BIND);
- t_free((char *) treq, T_BIND);
- return rc;
-}
-
-
-/*
- * Create a secure rpc client attached to the amd daemon.
- */
-static CLIENT *
-get_secure_amd_client(char *host, struct timeval *tv, int *sock)
-{
- CLIENT *client;
- struct netbuf nb;
- struct netconfig *nc, *pm_nc;
- struct sockaddr_in sin;
-
-
- nb.maxlen = sizeof(sin);
- nb.buf = (char *) &sin;
-
- /*
- * Ensure that remote portmapper is alive
- * (must use connectionless netconfig).
- */
- if ((pm_nc = getnetconfigent(NC_UDP)) != NULL) {
- enum clnt_stat cs;
-
- cs = rpcb_rmtcall(pm_nc,
- host,
- amd_program_number,
- AMQ_VERSION,
- AMQPROC_NULL,
- (XDRPROC_T_TYPE) xdr_void,
- NULL,
- (XDRPROC_T_TYPE) xdr_void,
- NULL,
- *tv,
- NULL);
- if (cs == RPC_TIMEDOUT) {
- fprintf(stderr, "%s: failed to contact portmapper on host \"%s\". %s\n",
- am_get_progname(), host, clnt_sperrno(cs));
- exit(1);
- }
- }
-
- /*
- * First transport type to try: TCP
- */
- if (use_tcp_flag) {
- /* Find amd address on TCP */
- nc = getnetconfigent(NC_TCP);
- if (!nc) {
- fprintf(stderr, "getnetconfig for tcp failed: %s\n", nc_sperror());
- goto tryudp;
- }
-
- if (!rpcb_getaddr(amd_program_number, AMQ_VERSION, nc, &nb, host)) {
- /*
- * don't print error messages here, since amd might legitimately
- * serve udp only
- */
- goto tryudp;
- }
- /* Create privileged TCP socket */
- *sock = t_open(nc->nc_device, O_RDWR, 0);
-
- if (*sock < 0) {
- fprintf(stderr, "t_open %s: %m\n", nc->nc_device);
- goto tryudp;
- }
- if (amq_bind_resv_port(*sock, (u_short *) 0) < 0)
- goto tryudp;
-
- client = clnt_vc_create(*sock, &nb, amd_program_number, AMQ_VERSION, 0, 0);
- if (!client) {
- fprintf(stderr, "clnt_vc_create failed");
- t_close(*sock);
- goto tryudp;
- }
- /* tcp succeeded */
- return client;
- }
-
-tryudp:
- /*
- * TCP failed so try UDP
- */
- if (use_udp_flag) {
- /* find amd address on UDP */
- nc = getnetconfigent(NC_UDP);
- if (!nc) {
- fprintf(stderr, "getnetconfig for udp failed: %s\n", nc_sperror());
- return NULL;
- }
- if (!rpcb_getaddr(amd_program_number, AMQ_VERSION, nc, &nb, host)) {
- fprintf(stderr, "%s\n",
- clnt_spcreateerror("couldn't get amd address on udp"));
- return NULL;
- }
- /* create privileged UDP socket */
- *sock = t_open(nc->nc_device, O_RDWR, 0);
-
- if (*sock < 0) {
- fprintf(stderr, "t_open %s: %m\n", nc->nc_device);
- return NULL; /* neither tcp not udp succeeded */
- }
- if (amq_bind_resv_port(*sock, (u_short *) 0) < 0)
- return NULL;
-
- client = clnt_dg_create(*sock, &nb, amd_program_number, AMQ_VERSION, 0, 0);
- if (!client) {
- fprintf(stderr, "clnt_dg_create failed\n");
- t_close(*sock);
- return NULL; /* neither tcp not udp succeeded */
- }
- if (clnt_control(client, CLSET_RETRY_TIMEOUT, (char *) tv) == FALSE) {
- fprintf(stderr, "clnt_control CLSET_RETRY_TIMEOUT for udp failed\n");
- clnt_destroy(client);
- return NULL; /* neither tcp not udp succeeded */
- }
- /* udp succeeded */
- return client;
- }
-
- /* should never get here */
- return NULL;
-}
-
-#else /* not HAVE_TRANSPORT_TYPE_TLI */
-
-/*
- * inetresport creates a datagram socket and attempts to bind it to a
- * secure port.
- * returns: The bound socket, or -1 to indicate an error.
- */
-static int
-inetresport(int ty)
-{
- int alport;
- struct sockaddr_in addr;
- int fd;
-
- /* Use internet address family */
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = INADDR_ANY;
- if ((fd = socket(AF_INET, ty, 0)) < 0)
- return -1;
-
- for (alport = IPPORT_RESERVED - 1; alport > IPPORT_RESERVED / 2 + 1; alport--) {
- addr.sin_port = htons((u_short) alport);
- if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) >= 0)
- return fd;
- if (errno != EADDRINUSE) {
- close(fd);
- return -1;
- }
- }
- close(fd);
- errno = EAGAIN;
- return -1;
-}
-
-
-/*
- * Privsock() calls inetresport() to attempt to bind a socket to a secure
- * port. If inetresport() fails, privsock returns a magic socket number which
- * indicates to RPC that it should make its own socket.
- * returns: A privileged socket # or RPC_ANYSOCK.
- */
-static int
-privsock(int ty)
-{
- int sock = inetresport(ty);
-
- if (sock < 0) {
- errno = 0;
- /* Couldn't get a secure port, let RPC make an insecure one */
- sock = RPC_ANYSOCK;
- }
- return sock;
-}
-
-#endif /* not HAVE_TRANSPORT_TYPE_TLI */
diff --git a/contrib/amd/amq/amq.h b/contrib/amd/amq/amq.h
index cebe624..879b19e 100644
--- a/contrib/amd/amq/amq.h
+++ b/contrib/amd/amq/amq.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq.h,v 1.2 1999/01/10 21:53:59 ezk Exp $
+ * $Id: amq.h,v 1.14.2.1 2001/01/10 03:23:14 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/amq_clnt.c b/contrib/amd/amq/amq_clnt.c
index 1251c87..e46b840 100644
--- a/contrib/amd/amq/amq_clnt.c
+++ b/contrib/amd/amq/amq_clnt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_clnt.c,v 1.2 1999/01/10 21:53:59 ezk Exp $
+ * $Id: amq_clnt.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/amq_xdr.c b/contrib/amd/amq/amq_xdr.c
index 26b93b3..535d8c1 100644
--- a/contrib/amd/amq/amq_xdr.c
+++ b/contrib/amd/amq/amq_xdr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_xdr.c,v 1.2 1999/01/10 21:53:59 ezk Exp $
+ * $Id: amq_xdr.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/pawd.1 b/contrib/amd/amq/pawd.1
index 1785afa..b5815c7 100644
--- a/contrib/amd/amq/pawd.1
+++ b/contrib/amd/amq/pawd.1
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: pawd.1,v 1.2 1999/01/10 21:53:59 ezk Exp $
+.\" $Id: pawd.1,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
.\"
.TH PAWD 1 "6 Jan 1998"
.SH NAME
diff --git a/contrib/amd/amq/pawd.c b/contrib/amd/amq/pawd.c
index cf9dce6..63f1f98 100644
--- a/contrib/amd/amq/pawd.c
+++ b/contrib/amd/amq/pawd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: pawd.c,v 1.5 1999/09/08 23:36:40 ezk Exp $
+ * $Id: pawd.c,v 1.6.2.1 2001/01/10 03:23:14 ezk Exp $
*
*/
diff --git a/contrib/amd/aux_conf.h.in b/contrib/amd/aux_conf.h.in
new file mode 100644
index 0000000..7740d75
--- /dev/null
+++ b/contrib/amd/aux_conf.h.in
@@ -0,0 +1,56 @@
+/*
+ * aux_conf.h:
+ * This file gets "filled in" for each architecture.
+ * @configure_input@
+ */
+
+#ifndef _AUX_CONF_H
+#define _AUX_CONF_H
+
+/*
+ * The next line is a literal inclusion of a file which includes a
+ * definition for the MOUNT_TRAP macro for a particular architecture.
+ * If it defines the wrong entry, check the AC_CHECK_MOUNT_TRAP m4 macro
+ * in $srcdir/aux/macros.
+ */
+@am_utils_mount_trap@
+/* End of included MOUNT_TRAP macro definition file */
+
+/*
+ * The next line is a literal replacement of a variable which defines the
+ * the UNMOUNT_TRAP macro for a particular architecture.
+ * If it defines the wrong entry, check the AC_CHECK_UNMOUNT_CALL m4 macro
+ * in $srcdir/aclocal.m4. If the arguments are being defined wrong, check
+ * the macro AC_CHECK_UNMOUNT_ARGS in $srcdir/aux/macros.
+ */
+#define UNMOUNT_TRAP(mnt) @am_utils_unmount_call@(@am_utils_unmount_args@)
+/* End of replaced UNMOUNT_TRAP macro definition */
+
+/*
+ * The next line is a literal inclusion of a file which includes a
+ * definition for the NFS_FH_DREF macro for a particular architecture.
+ * If it defines the wrong entry, check the AC_CHECK_NFS_FH_DREF m4 macro
+ * in $srcdir/aux/macros.
+ */
+@am_utils_nfs_fh_dref@
+/* End of included NFS_FH_DREF macro definition file */
+
+/*
+ * The next line is a literal inclusion of a file which includes a
+ * definition for the NFS_SA_DREF macro for a particular architecture.
+ * If it defines the wrong entry, check the AC_CHECK_NFS_SA_DREF m4 macro
+ * in $srcdir/aux/macros.
+ */
+@am_utils_nfs_sa_dref@
+/* End of included NFS_SA_DREF macro definition file */
+
+/*
+ * The next line is a literal inclusion of a file which includes a
+ * definition for the NFS_HN_DREF macro for a particular architecture.
+ * If it defines the wrong entry, check the AC_CHECK_NFS_HN_DREF m4 macro
+ * in $srcdir/aux/macros.
+ */
+@am_utils_nfs_hn_dref@
+/* End of included NFS_HN_DREF macro definition file */
+
+#endif /* not _AUX_CONF_H */
diff --git a/contrib/amd/conf/checkmount/checkmount_bsd44.c b/contrib/amd/conf/checkmount/checkmount_bsd44.c
index 4aa61dd..2021513 100644
--- a/contrib/amd/conf/checkmount/checkmount_bsd44.c
+++ b/contrib/amd/conf/checkmount/checkmount_bsd44.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: checkmount_bsd44.c,v 1.2 1999/01/10 21:54:06 ezk Exp $
+ * $Id: checkmount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp $
*
*/
diff --git a/contrib/amd/conf/mtab/mtab_bsd.c b/contrib/amd/conf/mtab/mtab_bsd.c
index 5849c6a..8a7c09e 100644
--- a/contrib/amd/conf/mtab/mtab_bsd.c
+++ b/contrib/amd/conf/mtab/mtab_bsd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mtab_bsd.c,v 1.2 1999/01/10 21:54:11 ezk Exp $
+ * $Id: mtab_bsd.c,v 1.3.2.1 2001/01/10 03:23:18 ezk Exp $
*
*/
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h b/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
new file mode 100644
index 0000000..83c65f7
--- /dev/null
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1990 Jan-Simon Pendry
+ * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Jan-Simon Pendry at Imperial College, London.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * %W% (Berkeley) %G%
+ *
+ * $Id: nfs_prot_darwin.h,v 1.1.2.1 2001/02/10 03:52:57 ib42 Exp $
+ *
+ */
+
+#ifndef _AMU_NFS_PROT_H
+#define _AMU_NFS_PROT_H
+
+#ifdef HAVE_RPCSVC_NFS_PROT_H
+# include <rpcsvc/nfs_prot.h>
+#endif /* HAVE_RPCSVC_NFS_PROT_H */
+#ifdef HAVE_NFS_RPCV2_H
+# include <nfs/rpcv2.h>
+#endif /* HAVE_NFS_RPCV2_H */
+#ifdef HAVE_NFS_NFS_H
+# include <nfs/nfs.h>
+#endif /* HAVE_NFS_NFS_H */
+#ifdef HAVE_UFS_UFS_UFSMOUNT_H
+# include <ufs/ufs/ufsmount.h>
+#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
+
+#define MOUNTVERS3 ((unsigned long)(3))
+
+typedef struct {
+ u_int fhandle3_len;
+ char *fhandle3_val;
+} fhandle3;
+
+
+enum mountstat3 {
+ MNT3_OK = 0,
+ MNT3ERR_PERM = 1,
+ MNT3ERR_NOENT = 2,
+ MNT3ERR_IO = 5,
+ MNT3ERR_ACCES = 13,
+ MNT3ERR_NOTDIR = 20,
+ MNT3ERR_INVAL = 22,
+ MNT3ERR_NAMETOOLONG = 63,
+ MNT3ERR_NOTSUPP = 10004,
+ MNT3ERR_SERVERFAULT = 10006
+};
+typedef enum mountstat3 mountstat3;
+
+struct mountres3_ok {
+ fhandle3 fhandle;
+ struct {
+ u_int auth_flavors_len;
+ int *auth_flavors_val;
+ } auth_flavors;
+};
+typedef struct mountres3_ok mountres3_ok;
+
+struct mountres3 {
+ mountstat3 fhs_status;
+ union {
+ mountres3_ok mountinfo;
+ } mountres3_u;
+};
+typedef struct mountres3 mountres3;
+
+
+/*
+ * MACROS:
+ */
+#define dr_drok_u diropres
+#define ca_attributes attributes
+#define ca_where where
+#define da_fhandle dir
+#define da_name name
+#define dl_entries entries
+#define dl_eof eof
+#define dr_status status
+#define dr_u diropres_u
+#define drok_attributes attributes
+#define drok_fhandle file
+#define fh_data data
+#define la_fhandle from
+#define la_to to
+#define na_atime atime
+#define na_ctime ctime
+#define na_fileid fileid
+#define na_fsid fsid
+#define na_gid gid
+#define na_mode mode
+#define na_mtime mtime
+#define na_nlink nlink
+#define na_size size
+#define na_type type
+#define na_uid uid
+#define na_blocks blocks
+#define na_blocksize blocksize
+#define na_rdev rdev
+#define ne_cookie cookie
+#define ne_fileid fileid
+#define ne_name name
+#define ne_nextentry nextentry
+#define ns_attr_u attributes
+#define ns_status status
+#define ns_u attrstat_u
+#define nt_seconds seconds
+#define nt_useconds useconds
+#define ra_count count
+#define ra_fhandle file
+#define ra_offset offset
+#define ra_totalcount totalcount
+#define raok_attributes attributes
+#define raok_len_u data_len
+#define raok_u data
+#define raok_val_u data_val
+#define rda_cookie cookie
+#define rda_count count
+#define rda_fhandle dir
+#define rdr_reply_u reply
+#define rdr_status status
+#define rdr_u readdirres_u
+#define rlr_data_u data
+#define rlr_status status
+#define rlr_u readlinkres_u
+#define rna_from from
+#define rna_to to
+#define rr_reply_u reply
+#define rr_status status
+#define rr_u readres_u
+#define sa_atime atime
+#define sa_gid gid
+#define sa_mode mode
+#define sa_mtime mtime
+#define sa_size size
+#define sa_uid uid
+#define sag_attributes attributes
+#define sag_fhandle file
+#define sfr_reply_u reply
+#define sfr_status status
+#define sfr_u statfsres_u
+#define sfrok_bavail bavail
+#define sfrok_bfree bfree
+#define sfrok_blocks blocks
+#define sfrok_bsize bsize
+#define sfrok_tsize tsize
+#define sla_attributes attributes
+#define sla_from from
+#define sla_to to
+#define wra_beginoffset beginoffset
+#define wra_fhandle file
+#define wra_len_u data_len
+#define wra_offset offset
+#define wra_totalcount totalcount
+#define wra_u data
+#define wra_val_u data_val
+
+/*
+ * TYPEDEFS:
+ */
+typedef attrstat nfsattrstat;
+typedef createargs nfscreateargs;
+typedef dirlist nfsdirlist;
+typedef diropargs nfsdiropargs;
+typedef diropokres nfsdiropokres;
+typedef diropres nfsdiropres;
+typedef entry nfsentry;
+typedef fattr nfsfattr;
+typedef ftype nfsftype;
+typedef linkargs nfslinkargs;
+typedef readargs nfsreadargs;
+typedef readdirargs nfsreaddirargs;
+typedef readdirres nfsreaddirres;
+typedef readlinkres nfsreadlinkres;
+typedef readokres nfsreadokres;
+typedef readres nfsreadres;
+typedef renameargs nfsrenameargs;
+typedef sattr nfssattr;
+typedef sattrargs nfssattrargs;
+typedef statfsokres nfsstatfsokres;
+typedef statfsres nfsstatfsres;
+typedef symlinkargs nfssymlinkargs;
+typedef writeargs nfswriteargs;
+
+
+/*
+ *
+ * FreeBSD-3.0-RELEASE has NFS V3. Older versions had it only defined
+ * in the rpcgen source file. If you are on an older system, and you
+ * want NFSv3 support, you need to regenerate the rpcsvc header files as
+ * follows:
+ * cd /usr/include/rpcsvc
+ * rpcgen -h -C -DWANT_NFS3 mount.x
+ * rpcgen -h -C -DWANT_NFS3 nfs_prot.x
+ * If you don't want NFSv3, then you will have to turn off the NFSMNT_NFSV3
+ * macro below. If the code doesn't compile, upgrade to the latest 3.0
+ * version...
+ */
+#ifdef NFSMNT_NFSV3
+
+# define MOUNT_NFS3 "nfs" /* is this right? */
+# define MNTOPT_NFS3 "nfs"
+
+/*
+ * as of 3.0-RELEASE the nfs_fh3 that is defined in the system headers
+ * (or the one generated by rpcgen) lacks the proper full definition,
+ * listed below. A special macro (aux/macros/struct_nfs_fh3.m4) searches
+ * for this special name before other names.
+ */
+
+#define NFS3_FHSIZE 64
+#define FHSIZE3 64
+
+struct nfs_fh3_freebsd3 {
+ u_int fh3_length;
+ union nfs_fh3_u {
+ struct nfs_fh3_i {
+ fhandle_t fh3_i;
+ } nfs_fh3_i;
+ char data[NFS3_FHSIZE];
+ } fh3_u;
+};
+typedef struct nfs_fh3_freebsd3 nfs_fh3;
+
+#endif /* NFSMNT_NFSV3 */
+
+#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h
index d6c756e..4c8590b 100644
--- a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_freebsd2.h,v 1.2 1999/01/10 21:54:14 ezk Exp $
+ * $Id: nfs_prot_freebsd2.h,v 1.3.2.1 2001/01/10 03:23:21 ezk Exp $
*
*/
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h
index dba7b4c..db66c74 100644
--- a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_freebsd3.h,v 1.4 1999/03/30 17:22:54 ezk Exp $
+ * $Id: nfs_prot_freebsd3.h,v 1.5.2.1 2001/01/10 03:23:22 ezk Exp $
*
*/
diff --git a/contrib/amd/conf/transp/transp_sockets.c b/contrib/amd/conf/transp/transp_sockets.c
index 3dbd9dc..8a6a8b7 100644
--- a/contrib/amd/conf/transp/transp_sockets.c
+++ b/contrib/amd/conf/transp/transp_sockets.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: transp_sockets.c,v 1.5 1999/08/22 21:12:31 ezk Exp $
+ * $Id: transp_sockets.c,v 1.6.2.5 2001/06/08 18:50:40 ezk Exp $
*
* Socket specific utilities.
* -Erez Zadok <ezk@cs.columbia.edu>
@@ -119,7 +119,7 @@ get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv,
* Bind to a privileged port
*/
if (bind_resv_port(*sock, (u_short *) 0) < 0)
- plog(XLOG_ERROR, "can't bind privileged port");
+ plog(XLOG_ERROR, "can't bind privileged port (socket)");
/*
* Find mountd port to connect to.
@@ -174,7 +174,8 @@ get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv,
struct sockaddr_in *
amu_svc_getcaller(SVCXPRT *xprt)
{
- return svc_getcaller(xprt);
+ /* glibc 2.2 returns a sockaddr_storage ??? */
+ return (struct sockaddr_in *)svc_getcaller(xprt);
}
@@ -188,7 +189,7 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
*soNFSp = socket(AF_INET, SOCK_DGRAM, 0);
if (*soNFSp < 0 || bind_resv_port(*soNFSp, NULL) < 0) {
- plog(XLOG_FATAL, "Can't create privileged nfs port");
+ plog(XLOG_FATAL, "Can't create privileged nfs port (socket)");
return 1;
}
if ((*nfs_xprtp = svcudp_create(*soNFSp)) == NULL) {
@@ -200,7 +201,8 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
return 1;
}
if (!svc_register(*nfs_xprtp, NFS_PROGRAM, NFS_VERSION, dispatch_fxn, 0)) {
- plog(XLOG_FATAL, "unable to register (NFS_PROGRAM, NFS_VERSION, 0)");
+ plog(XLOG_FATAL, "unable to register (%ld, %ld, 0)",
+ (u_long) NFS_PROGRAM, (u_long) NFS_VERSION);
return 3;
}
@@ -328,7 +330,7 @@ try_again:
if (clnt == NULL) {
#ifdef HAVE_CLNT_SPCREATEERROR
- plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s :%s",
+ plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s: %s",
(int) nfs_version, proto, host, clnt_spcreateerror(""));
#else /* not HAVE_CLNT_SPCREATEERROR */
plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s",
diff --git a/contrib/amd/conf/umount/umount_bsd44.c b/contrib/amd/conf/umount/umount_bsd44.c
index 1c4380e..22b3021 100644
--- a/contrib/amd/conf/umount/umount_bsd44.c
+++ b/contrib/amd/conf/umount/umount_bsd44.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: umount_bsd44.c,v 1.2 1999/01/10 21:54:22 ezk Exp $
+ * $Id: umount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:28 ezk Exp $
*
*/
diff --git a/contrib/amd/doc/am-utils.texi b/contrib/amd/doc/am-utils.texi
index 12bda8f..9e080fa 100644
--- a/contrib/amd/doc/am-utils.texi
+++ b/contrib/amd/doc/am-utils.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c
-@c Copyright (c) 1997-1999 Erez Zadok
+@c Copyright (c) 1997-2001 Erez Zadok
@c Copyright (c) 1989 Jan-Simon Pendry
@c Copyright (c) 1989 Imperial College of Science, Technology & Medicine
@c Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
@c
@c %W% (Berkeley) %G%
@c
-@c $Id: am-utils.texi,v 1.12 1999/09/30 21:01:39 ezk Exp $
+@c $Id: am-utils.texi,v 1.21.2.17 2001/07/03 23:50:31 ezk Exp $
@c
@setfilename am-utils.info
@@ -60,7 +60,7 @@
(Originally by Jan-Simon Pendry and Nick Williams)
@page
-Copyright @copyright{} 1997-1999 Erez Zadok
+Copyright @copyright{} 1997-2001 Erez Zadok
@*
Copyright @copyright{} 1989 Jan-Simon Pendry
@*
@@ -194,17 +194,17 @@ THE POSSIBILITY OF SUCH DAMAGE.
The @i{Am-utils} home page is located in
@example
-@url{http://www.cs.columbia.edu/~ezk/am-utils/}
+@url{http://www.am-utils.org/}
@end example
You can get the latest distribution version of @i{Am-utils} from
@example
-@url{ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/am-utils.tar.gz}
+@url{ftp://ftp.am-utils.org/pub/am-utils/am-utils.tar.gz}
@end example
-Alpha and beta distributions are available in
+Additional alpha, beta, and release distributions are available in
@example
-@url{ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/}.
+@url{ftp://ftp.am-utils.org/pub/am-utils/}.
@end example
Revision 5.2 was part of the 4.3BSD Reno distribution.
@@ -221,7 +221,7 @@ part of his @uref{http://www.cs.columbia.edu/~ezk/research/tp/thesis_proposal.ht
@cindex Bug reports
Before reporting a bug, see if it is a known one in the
-@uref{http://www.cs.columbia.edu/~ezk/am-utils/BUGS.txt,bugs} file.
+@uref{http://www.am-utils.org/BUGS.txt,bugs} file.
Send all bug reports to @email{amd-dev@@majordomo.cs.columbia.edu}
quoting the details of the release and your configuration. These can be
obtained by running the command @samp{amd -v}. It would greatly help if
@@ -230,7 +230,7 @@ reporting.
Providing working patches is highly encouraged. Every patch
incorporated, however small, will get its author an honorable mention in
-the @uref{http://www.cs.columbia.edu/~ezk/am-utils/AUTHORS.txt,authors
+the @uref{http://www.am-utils.org/AUTHORS.txt,authors
file}.
@unnumberedsec Mailing List
@@ -701,6 +701,14 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{alpha-dec-osf4.0f}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
+@item @b{alpha-dec-osf5.1}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{alphaev5-unknown-linux-gnu}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -709,9 +717,13 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+@item @b{alphaev6-dec-osf5.0}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{hppa1.0-hp-hpux11.00}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
-@tab yes @tab yes @tab yes @tab no @tab yes @tab ?
+@tab yes @tab yes @tab yes @tab no @tab yes @tab yes
@item @b{hppa1.1-hp-hpux10.10}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@@ -721,6 +733,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab no @tab no @tab ?
+@item @b{hppa1.1-hp-hpux11.00}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab UDP @tab yes @tab yes
+
@item @b{hppa1.1-hp-hpux9.01}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -757,6 +773,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-pc-bsdi4.1}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{i386-pc-solaris2.5.1}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
@@ -793,6 +813,14 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-unknown-freebsd4.2}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
+@item @b{i386-unknown-freebsd5.0}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{i386-unknown-freebsdelf3.0}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
@@ -809,6 +837,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-unknown-freebsdelf3.4}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{i386-unknown-freebsdelf4.0}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
@@ -837,6 +869,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-unknown-netbsd1.4.1}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{i386-unknown-openbsd2.1}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
@@ -893,6 +929,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+@item @b{i586-pc-linux-gnu-rh6.2}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+
@item @b{i586-pc-linux-gnulibc1}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -901,7 +941,6 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
-
@item @b{i686-pc-linux-gnu}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -914,6 +953,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+@item @b{i686-pc-linux-gnu-rh6.2}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab n/a @tab yes @tab yes
+
@item @b{i686-pc-linux-gnulibc}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -956,7 +999,7 @@ features.
@item @b{mips-sgi-irix6.5}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
-@tab yes @tab yes @tab ? @tab yes @tab yes @tab ?
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
@item @b{powerpc-ibm-aix4.1.5.0}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@@ -1014,6 +1057,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+@item @b{sparc-sun-solaris2.8}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+
@item @b{sparc-sun-sunos4.1.1}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -1262,7 +1309,7 @@ using the @dfn{Hesiod} name server. The string following the dot is
used as a name qualifier and is prepended with the key being located.
The entire string is then resolved in the @code{automount} context, or
the @i{amd.conf} parameter @samp{hesiod_base} (@pxref{hesiod_base
-Parameter}). For example, if the the key is @samp{jsp} and map name is
+Parameter}). For example, if the key is @samp{jsp} and map name is
@samp{hesiod.homes} then @dfn{Hesiod} is asked to resolve
@samp{jsp.homes.automount}.
@@ -1629,7 +1676,7 @@ The default value of many of the selectors listed here can be overridden
by an @i{Amd} command line switch or in an @i{Amd} configuration file.
@xref{Amd Configuration File}.
-These are the selectors currently implemented.
+The following selectors are currently implemented.
@menu
* arch Selector Variable::
@@ -1637,6 +1684,7 @@ These are the selectors currently implemented.
* byte Selector Variable::
* cluster Selector Variable::
* domain Selector Variable::
+* dollar Selector Variable::
* host Selector Variable::
* hostd Selector Variable::
* karch Selector Variable::
@@ -1651,6 +1699,8 @@ These are the selectors currently implemented.
* network Selector Variable::
* path Selector Variable::
* wire Selector Variable::
+* uid Selector Variable::
+* gid Selector Variable::
* exists Selector Function::
* false Selector Function::
@@ -1716,7 +1766,7 @@ filesystems. @code{$@{cluster@}} defaults to the value of
command line option.
@c ----------------------------------------------------------------
-@node domain Selector Variable, host Selector Variable, cluster Selector Variable, Selectors
+@node domain Selector Variable, dollar Selector Variable, cluster Selector Variable, Selectors
@comment node-name, next, previous, up
@subsubsection domain Selector Variable
@cindex domain Selector Variable
@@ -1728,7 +1778,22 @@ The local domain name as specified by the @code{-d} command line option.
@xref{host Selector Variable}.
@c ----------------------------------------------------------------
-@node host Selector Variable, hostd Selector Variable, domain Selector Variable, Selectors
+@node dollar Selector Variable, host Selector Variable, domain Selector Variable, Selectors
+@comment node-name, next, previous, up
+@subsubsection dollar Selector Variable
+@cindex dollar Selector Variable
+
+This is a special variable, whose sole purpose is to produce a literal
+dollar sign in the value of another variable. For example, if you have
+a remote file system whose name is @samp{/disk$s}, you can mount it by
+setting the remote file system variable as follows:
+
+@example
+rfs:=/disk$@{dollar@}s
+@end example
+
+@c ----------------------------------------------------------------
+@node host Selector Variable, hostd Selector Variable, dollar Selector Variable, Selectors
@comment node-name, next, previous, up
@subsubsection host Selector Variable
@cindex host Selector Variable
@@ -1832,6 +1897,7 @@ automatically determined at compile time. The name of the vendor can be
displayed by running the command @samp{amd -v}. @xref{Supported
Platforms}.@refill
+
@c ----------------------------------------------------------------
@ifhtml
<HR>
@@ -1912,7 +1978,7 @@ The full pathname of the name being resolved. For example
@file{/home/foo} in the example above.
@c ----------------------------------------------------------------
-@node wire Selector Variable, exists Selector Function, path Selector Variable, Selectors
+@node wire Selector Variable, uid Selector Variable, path Selector Variable, Selectors
@comment node-name, next, previous, up
@subsubsection wire Selector Variable
@cindex wire Selector Variable
@@ -1927,6 +1993,43 @@ to. The names and numbers of all attached interfaces are available from
the output of @samp{amd -v}.
@c ----------------------------------------------------------------
+@node uid Selector Variable, gid Selector Variable, wire Selector Variable, Selectors
+@comment node-name, next, previous, up
+@subsubsection uid Selector Variable
+@cindex uid Selector Variable
+@cindex uid, mount selector
+@cindex Mount selector; uid
+@cindex Selector; uid
+
+This selector provides the numeric effective user ID (UID) of the user
+which last accessed an automounted path name. This simple example shows
+how floppy mounting can be assigned only to machine owners:
+
+@example
+floppy -type:=pcfs \
+ uid==2301;host==shekel;dev:=/dev/floppy \
+ uid==6712;host==titan;dev=/dev/fd0 \
+ uid==0;dev:=/dev/fd0c \
+ type:=error
+@end example
+
+The example allows two machine owners to mount floppies on their
+designated workstations, allows the root user to mount on any host, and
+otherwise forces an error.
+
+@c ----------------------------------------------------------------
+@node gid Selector Variable, exists Selector Function, uid Selector Variable, Selectors
+@comment node-name, next, previous, up
+@subsubsection gid Selector Variable
+@cindex gid Selector Variable
+@cindex gid, mount selector
+@cindex Mount selector; gid
+@cindex Selector; gid
+
+This selector provides the numeric effective group ID (GID) of the user
+which last accessed an automounted path name.
+
+@c ----------------------------------------------------------------
@ifhtml
<HR>
@end ifhtml
@@ -1937,7 +2040,7 @@ be compared with a value. Each of these may be negated by prepending
@samp{!} to their name.
@c ----------------------------------------------------------------
-@node exists Selector Function, false Selector Function, wire Selector Variable, Selectors
+@node exists Selector Function, false Selector Function, gid Selector Variable, Selectors
@comment node-name, next, previous, up
@subsubsection exists Selector Function
@cindex exists Selector Function
@@ -2270,6 +2373,10 @@ Use BSD directory group-id semantics.
@cindex Mount flags; intr
Allow keyboard interrupts on hard mounts.
+@item lock
+@cindex Mount flags; lock
+Use the NFS locking protocol (default)
+
@item multi
@cindex Mount flags; multi
Perform multi-component lookup on files.
@@ -2316,10 +2423,23 @@ ISO-9660.
@cindex Mount flags; nodevs
Don't allow local special devices on this filesystem.
+@item noexec
+@cindex Mount flags; noexec
+Don't allow program execution.
+
@item noint
@cindex Mount flags; noint
Do not allow keyboard interrupts for this mount
+@item nolock
+@cindex Mount flags; nolock
+Do not use the NFS locking protocol
+
+@item nomnttab
+@cindex Mount flags; nomnttab
+This option is used internally to tell Amd that a Solaris 8 system using
+mntfs is in use.
+
@item norrip
@cindex Mount flags; norrip
Turn off using of the Rock Ridge Interchange Protocol (RRIP) extensions
@@ -2338,6 +2458,11 @@ Don't allow set-uid or set-gid executables on this filesystem.
Strip the extension @samp{;#} from the version string of files recorded
on an ISO-9660 CD-ROM.
+@item optionstr
+@cindex Mount flags; optionstr
+Under Solaris 8, provide the kernel a string of options to parse and
+show as part of the special in-kernel mount file system.
+
@item overlay
@cindex Mount flags; overlay
Overlay this mount on top of an existing mount, if any.
@@ -2354,6 +2479,10 @@ Set the NFS port to @var{n}.
@cindex Mount flags; posix
Turn on POSIX static pathconf for mounts.
+@item proplist
+@cindex Mount flags; proplist
+Support property lists (ACLs) for this mount, useful primarily for DU-4.0.
+
@item proto=@var{s}
@cindex Mount flags; proto
Use transport protocol @var{s} for NFS (can be @code{"tcp"} or @code{"udp"}).
@@ -2414,7 +2543,7 @@ Allow set-uid programs on this mount.
@item symttl
@cindex Mount flags; symttl
-Turn of the symbolic link cache time-to-live.
+Turn off the symbolic link cache time-to-live.
@item sync
@cindex Mount flags; sync
@@ -3005,6 +3134,8 @@ enter daemon mode
fork server
@item full
program trace
+@item hrtime
+print high resolution time stamps (only if @b{syslog}(3) is not used)
@item info
@cindex debugging hesiod resolver service
@cindex Hesiod: turning on RES_DEBUG
@@ -3014,12 +3145,16 @@ hesiod maps, turns on the hesiod RES_DEBUG internal debugging option.
trace memory allocations
@item mtab
use local @file{./mtab} file
+@item readdir
+show readdir progress
@item str
debug string munging
@item test
full debug but no daemon
@item trace
trace RPC protocol and NFS mount arguments
+@item xdrtrace
+trace XDR routines
@end table
You may also refer to the program source for a more detailed explanation
@@ -3295,17 +3430,16 @@ The options are the same as for the @samp{nfs} filesystem with one
difference.
@noindent
-The following options must be specified:
+The following options should be specified:
@table @code
@item rhost
-the remote fileserver. This must be an entry in the hosts database. IP
-addresses are not accepted. The default value is taken from the local
+the remote fileserver. The default value is taken from the local
host name (@code{$@{host@}}) if no other value is specified.
@item rfs
-as a list of filesystems to mount. The list is in the form of a comma
-separated strings.
+is a list of filesystems to mount, and must be specified.
+The list is in the form of a comma separated strings.
@end table
@noindent
@@ -3861,6 +3995,13 @@ we are now stuck with it due to historical accident.
alters the name that is looked up in the mount map. If
@code{$@{pref@}}, the @dfn{prefix}, is non-null then it is prepended to
the name requested by the kernel @dfn{before} the map is searched.
+
+@item opts
+Normally, @samp{auto} style maps are not browsable even if you turn on
+directory browsability (@pxref{browsable_dirs Parameter}). To enable
+browsing entries in @samp{auto} maps, specify @samp{opts:=browsable} in
+the description of this map.
+
@end table
The server @samp{dylan.doc.ic.ac.uk} has two user disks:
@@ -3972,10 +4113,7 @@ The error filesystem is not directly accessible.
The @dfn{toplvl} (@samp{type:=toplvl}) filesystems is derived from the @samp{auto} filesystem
and is used to mount the top-level automount nodes. Requests of this
-type are automatically generated from the command line arguments and can
-also be passed in by using the @code{-M} option of the @dfn{Amq} command.
-That option is insecure, and is unavailable unless am-utils was
-configured with @samp{--with-amq-mount}.
+type are automatically generated from the command line arguments.
@c ----------------------------------------------------------------
@node Root Filesystem, Inheritance Filesystem, Autofs Filesystem, Filesystem Types
@@ -4241,8 +4379,10 @@ The following parameters are applicable to the @samp{[global]} section only.
* local_domain Parameter::
* log_file Parameter::
* log_options Parameter::
+* nfs_proto Parameter::
* nfs_retransmit_counter Parameter::
* nfs_retry_interval Parameter::
+* nfs_vers Parameter::
* nis_domain Parameter::
* normalize_hostnames Parameter::
* os Parameter::
@@ -4253,7 +4393,7 @@ The following parameters are applicable to the @samp{[global]} section only.
* print_pid Parameter::
* print_version Parameter::
* restart_mounts Parameter::
-* selectors_on_default Parameter::
+* selectors_in_defaults Parameter::
* show_statfs_entries Parameter::
* unmount_on_exit Parameter::
* vendor Parameter::
@@ -4400,8 +4540,9 @@ sun4m, sun4u, etc.) Note that if not specified, @i{Amd} will use
@subsection @t{ldap_base} Parameter
@cindex ldap_base Parameter
-(type=string, default not set). Specify the base name for
-LDAP.
+(type=string, default not set).
+Specify the base name for LDAP. This often includes LDAP-specific
+values such as country and organization.
@c ----------------------------------------------------------------
@node ldap_cache_maxmem Parameter, ldap_cache_seconds Parameter, ldap_base Parameter, Global Parameters
@@ -4427,8 +4568,8 @@ entries in the cache.
@subsection @t{ldap_hostports} Parameter
@cindex ldap_hostports Parameter
-(type=string, default not set). Specify
-LDAP-specific values such as country and organization.
+(type=string, default not set).
+Specify the LDAP host and port values.
@c ----------------------------------------------------------------
@node local_domain Parameter, log_file Parameter, ldap_hostports Parameter, Global Parameters
@@ -4466,7 +4607,7 @@ is generally a bad idea to use those reserved for other services such as
@samp{kern}, @samp{lpr}, @samp{cron}, etc.
@c ----------------------------------------------------------------
-@node log_options Parameter, nfs_retransmit_counter Parameter, log_file Parameter, Global Parameters
+@node log_options Parameter, nfs_proto Parameter, log_file Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{log_options} Parameter
@cindex log_options Parameter
@@ -4503,7 +4644,21 @@ warnings
@end table
@c ----------------------------------------------------------------
-@node nfs_retransmit_counter Parameter, nfs_retry_interval Parameter, log_options Parameter, Global Parameters
+@node nfs_proto Parameter, nfs_retransmit_counter Parameter, log_options Parameter, Global Parameters
+@comment node-name, next, previous, up
+@subsection @t{nfs_proto} Parameter
+@cindex nfs_proto Parameter
+
+(type=string, default to trying version tcp then udp). By default,
+@i{Amd} tries @code{tcp} and then @code{udp}. This option forces the
+overall NFS protocol used to TCP or UDP. It overrides what is in the
+@i{Amd} maps, and is useful when @i{Amd} is compiled with NFSv3 support
+that may not be stable. With this option you can turn off the complete
+usage of NFSv3 dynamically (without having to recompile @i{Amd}) until
+such time as NFSv3 support is desired again.
+
+@c ----------------------------------------------------------------
+@node nfs_retransmit_counter Parameter, nfs_retry_interval Parameter, nfs_proto Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{nfs_retransmit_counter} Parameter
@cindex nfs_retransmit_counter Parameter
@@ -4514,7 +4669,7 @@ number of NFS retransmissions that the kernel will use to communicate
with @i{Amd}. @xref{-t Option}.
@c ----------------------------------------------------------------
-@node nfs_retry_interval Parameter, nis_domain Parameter, nfs_retransmit_counter Parameter, Global Parameters
+@node nfs_retry_interval Parameter, nfs_vers Parameter, nfs_retransmit_counter Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{nfs_retry_interval} Parameter
@cindex nfs_retry_interval Parameter
@@ -4525,14 +4680,28 @@ timeout interval, in @emph{tenths} of seconds, between NFS/RPC retries
(for UDP only). This is the value that the kernel will use to
communicate with @i{Amd}. @xref{-t Option}.
-Amd relies on the kernel RPC retransmit mechanism to trigger mount
+@i{Amd} relies on the kernel RPC retransmit mechanism to trigger mount
retries. The values of the @i{nfs_retransmit_counter} and the
@i{nfs_retry_interval} parameters change the overall retry interval.
Too long an interval gives poor interactive response; too short an
interval causes excessive retries.
@c ----------------------------------------------------------------
-@node nis_domain Parameter, normalize_hostnames Parameter, nfs_retry_interval Parameter, Global Parameters
+@node nfs_vers Parameter, nis_domain Parameter, nfs_retry_interval Parameter, Global Parameters
+@comment node-name, next, previous, up
+@subsection @t{nfs_vers} Parameter
+@cindex nfs_vers Parameter
+
+(type=numeric, default to trying version 3 then 2). By default, @i{Amd}
+tries version 3 and then version 2. This option forces the overall NFS
+protocol used to version 3 or 2. It overrides what is in the @i{Amd}
+maps, and is useful when @i{Amd} is compiled with NFSv3 support that may not
+be stable. With this option you can turn off the complete usage of
+NFSv3 dynamically (without having to recompile @i{Amd}) until such time as
+NFSv3 support is desired again.
+
+@c ----------------------------------------------------------------
+@node nis_domain Parameter, normalize_hostnames Parameter, nfs_vers Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{nis_domain} Parameter
@cindex nis_domain Parameter
@@ -4647,7 +4816,7 @@ will print its version information string, which includes some
configuration and compilation values.
@c ----------------------------------------------------------------
-@node restart_mounts Parameter, selectors_on_default Parameter, print_version Parameter, Global Parameters
+@node restart_mounts Parameter, selectors_in_defaults Parameter, print_version Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{restart_mounts} Parameter
@cindex restart_mounts Parameter
@@ -4658,13 +4827,13 @@ systems are currently mounted. Whenever one of these would have been
auto-mounted, @i{Amd} inherits it.
@c ----------------------------------------------------------------
-@node selectors_on_default Parameter, show_statfs_entries Parameter, restart_mounts Parameter, Global Parameters
+@node selectors_in_defaults Parameter, show_statfs_entries Parameter, restart_mounts Parameter, Global Parameters
@comment node-name, next, previous, up
-@subsection @t{selectors_on_default} Parameter
-@cindex selectors_on_default Parameter
+@subsection @t{selectors_in_defaults} Parameter
+@cindex selectors_in_defaults Parameter
(type=boolean, default=@samp{no}). If @samp{yes}, then the @samp{/defaults} entry of
-maps will be looked for and any selectors processed before setting defaults
+maps will search for and process any selectors before setting defaults
for all other keys in that map. Useful when you want to set different
options for a complete map based on some parameters. For example, you
may want to better the NFS performance over slow slip-based networks as
@@ -4676,8 +4845,10 @@ follows:
wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
@end example
+Deprecated form: selectors_on_default.
+
@c ----------------------------------------------------------------
-@node show_statfs_entries Parameter, unmount_on_exit Parameter, selectors_on_default Parameter, Global Parameters
+@node show_statfs_entries Parameter, unmount_on_exit Parameter, selectors_in_defaults Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{show_statfs_entries} Parameter
@cindex show_statfs_entries Parameter
@@ -4767,7 +4938,7 @@ log_file = /var/log/amd
log_options = all
#debug_options = all
plock = no
-selectors_on_default = yes
+selectors_in_defaults = yes
# config.guess picks up "sunos5" and I don't want to edit my maps yet
os = sos5
# if you print_version after setting up "os", it will show it.
@@ -4925,9 +5096,9 @@ mount point.
* Amq default:: Default command behavior.
* Amq -f option:: Flushing the map cache.
* Amq -h option:: Controlling a non-local host.
+* Amq -H-option:: Print help message.
* Amq -l option:: Controlling the log file.
* Amq -m option:: Obtaining mount statistics.
-* Amq -M-option:: Mounting a volume.
* Amq -p option:: Getting Amd's process ID.
* Amq -P-option:: Contacting alternate Amd processes.
* Amq -s option:: Obtaining global statistics.
@@ -4935,6 +5106,7 @@ mount point.
* Amq -U-option:: Use UDP transport.
* Amq -u option:: Forcing volumes to time out.
* Amq -v option:: Version information.
+* Amq -w option:: Print Amd current working directory.
* Other Amq options:: Three other special options.
@end menu
@@ -5027,7 +5199,27 @@ also be synchronized with the map source by using the @samp{sync} option
(@pxref{Automount Filesystem}).@refill
@c ----------------------------------------------------------------
-@node Amq -l option, Amq -m option, Amq -h option, Controlling Amd
+@node Amq -h option, Amq -H-option, Amq -f option, Controlling Amd
+@comment node-name, next, previous, up
+@subsection @i{Amq} @code{-h} option
+@cindex Querying an alternate host
+
+By default the local host is used. In an HP-UX cluster the root server
+is used since that is the only place in the cluster where @i{Amd} will
+be running. To query @i{Amd} on another host the @code{-h} option should
+be used.
+
+@c ----------------------------------------------------------------
+@node Amq -H-option, Amq -l option, Amq -h option, Controlling Amd
+@comment node-name, next, previous, up
+@subsection @i{Amq} @code{-H} option
+@cindex Displaying brief help
+@cindex Help; showing from Amq
+
+Print a brief help and usage string.
+
+@c ----------------------------------------------------------------
+@node Amq -l option, Amq -m option, Amq -H-option, Controlling Amd
@comment node-name, next, previous, up
@subsection @i{Amq} @code{-l} option
@cindex Resetting the Amd log file
@@ -5041,18 +5233,7 @@ file handle on the log file, so that it can be rotated and compressed
via daily cron jobs.
@c ----------------------------------------------------------------
-@node Amq -h option, Amq -l option, Amq -f option, Controlling Amd
-@comment node-name, next, previous, up
-@subsection @i{Amq} @code{-h} option
-@cindex Querying an alternate host
-
-By default the local host is used. In an HP-UX cluster the root server
-is used since that is the only place in the cluster where @i{Amd} will
-be running. To query @i{Amd} on another host the @code{-h} option should
-be used.
-
-@c ----------------------------------------------------------------
-@node Amq -m option, Amq -M-option, Amq -l option, Controlling Amd
+@node Amq -m option, Amq -p option, Amq -l option, Controlling Amd
@comment node-name, next, previous, up
@subsection @i{Amq} @code{-m} option
@@ -5094,32 +5275,9 @@ the mount point and server information is still being maintained
by @i{Amd}.
@c ----------------------------------------------------------------
-@node Amq -M-option, Amq -p option, Amq -m option, Controlling Amd
-@comment node-name, next, previous, up
-@subsection @i{Amq} @code{-M} option
-
-The @code{-M} option passes a new map entry to @i{Amd} and waits for it to
-be evaluated, possibly causing a mount. For example, the following
-command would cause @samp{/home/toytown} on host @samp{toytown} to be
-mounted locally on @samp{/mnt/toytown}.
-
-@example
-amq -M '/mnt/toytown type:=nfs;rfs:=/home/toytown;rhost:=toytown;fs:=$@{key@}'
-@end example
-
-@i{Amd} applies some simple security checks before allowing this
-operation. The check tests whether the incoming request is from a
-privileged UDP port on the local machine. ``Permission denied'' is
-returned if the check fails.
-
-This option is very insecure as it is vulnerable to attacks such as IP
-Spoofing. In other words, it is relatively easy for an attacker who
-really wants to, to make your @i{Amd} process mount any filesystem from
-the Internet! Therefore, the @emph{complete} code which supports the
-@code{-M} option in @i{Amd} and @i{Amq} is turned off by default. To turn
-it on, you have to reconfigure am-utils with @code{configure
---enable-amq-mount}. Think twice before doing so, and use this option
-only if you absolutely need to.
+@ignore
+@comment Retained for future consideration: from the description of the
+@comment amq -M option removed in amd 6.0.5.
A future release of @i{Amd} will include code to allow the @b{mount}(8)
command to mount automount points:
@@ -5131,8 +5289,10 @@ mount -t amd /vol hesiod.vol
This will then allow @i{Amd} to be controlled from the standard system
filesystem mount list.
+@end ignore
+
@c ----------------------------------------------------------------
-@node Amq -p option, Amq -P-option, Amq -M-option, Controlling Amd
+@node Amq -p option, Amq -P-option, Amq -m option, Controlling Amd
@comment node-name, next, previous, up
@subsection @i{Amq} @code{-p} option
@cindex Process ID; Amd
@@ -5240,11 +5400,11 @@ safe way to unmount an automounted filesystem. It is not possible to
unmount a filesystem which has been mounted with the @samp{nounmount}
flag.
-@c The @code{-H} option informs @i{Amd} that the specified mount point has hung -
-@c as if its keepalive timer had expired.
+@c The @code{-H} option informs @i{Amd} that the specified mount point
+@c has hung - as if its keepalive timer had expired.
@c ----------------------------------------------------------------
-@node Amq -v option, Other Amq options, Amq -u option, Controlling Amd
+@node Amq -v option, Amq -w option, Amq -u option, Controlling Amd
@comment node-name, next, previous, up
@subsection @i{Amq} @code{-v} option
@cindex Version information at run-time
@@ -5253,7 +5413,17 @@ The @code{-v} option displays the version of @i{Amd} in a similar way to
@i{Amd}'s @code{-v} option.
@c ----------------------------------------------------------------
-@node Other Amq options, , Amq -v option, Controlling Amd
+@node Amq -w option, Other Amq options, Amq -v option, Controlling Amd
+@comment node-name, next, previous, up
+@subsection @i{Amq} @code{-w} option
+@cindex Getting real working directory
+
+The @code{-w} option translates a full pathname as returned by
+@b{getpwd}(3) into a short @i{Amd} pathname that goes through its mount
+points. This option requires that @i{Amd} is running.
+
+@c ----------------------------------------------------------------
+@node Other Amq options, , Amq -w option, Controlling Amd
@comment node-name, next, previous, up
@subsection Other @i{Amq} options
@cindex Logging options via Amq
@@ -6197,7 +6367,7 @@ to @file{stdout} on a line starting with a @samp{#} character.
@node -D-FSinfo Option, -I FSinfo Option, -v FSinfo Option, FSinfo Command Line Options
@comment node-name, next, previous, up
-@subsection @code{-D} @var{name[=defn]}
+@subsection @code{-D} @var{name}@i{[=defn]}
Defines a symbol @dfn{name} for the preprocessor when reading the
configuration files. Equivalent to @code{#define} directive.
@@ -7720,8 +7890,8 @@ bsd -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \
It is sometimes useful to have different defaults for a given map. To
achieve this, the @samp{/defaults} entry must be able to process normal
selectors. This feature is turned on by setting
-@samp{selectors_on_default = yes} in the @file{amd.conf} file.
-@xref{selectors_on_default Parameter}.
+@samp{selectors_in_defaults = yes} in the @file{amd.conf} file.
+@xref{selectors_in_defaults Parameter}.
In this example, I set different default NFS mount options for hosts
which are running over a slower network link. By setting a smaller size
@@ -8055,7 +8225,7 @@ Developers} mailing list through the months developing am-utils. These
members have contributed to the discussions, ideas, code and
documentation, and subjected their systems to alpha quality code.
Special thanks go to those
-@uref{http://www.cs.columbia.edu/~ezk/am-utils/AUTHORS.txt,authors} who
+@uref{http://www.am-utils.org/AUTHORS.txt,authors} who
have submitted patches.
Thanks to the Formal Methods Group at Imperial College for suffering
@@ -8140,4 +8310,5 @@ All other registered trademarks are owned by their respective owners.
@c LocalWords: serv maxgroups nfsl cachedir copt cfsadmin efs addopts fg ROMs
@c LocalWords: nointr extatt setchapternewpage columnfractions alphaev gnulibc
@c LocalWords: freebsdelf gnuoldld ifhtml defperm nodefperm norrip RRIP rrip
-@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp
+@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp uid gid noexec mntfs
+@c LocalWords: nomnttab optionstr hrtime xdrtrace getpwd proplist
diff --git a/contrib/amd/doc/stamp-vti b/contrib/amd/doc/stamp-vti
index 6032c23..3705a9f 100644
--- a/contrib/amd/doc/stamp-vti
+++ b/contrib/amd/doc/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 7 October 1999
-@set EDITION 6.0.3s1
-@set VERSION 6.0.3s1
+@set UPDATED 3 July 2001
+@set EDITION 6.0.7
+@set VERSION 6.0.7
diff --git a/contrib/amd/doc/texinfo.tex b/contrib/amd/doc/texinfo.tex
index 2b8a9cc..2896248 100644
--- a/contrib/amd/doc/texinfo.tex
+++ b/contrib/amd/doc/texinfo.tex
@@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{1998-11-13}%
+\def\texinfoversion{2001-06-21.10}
%
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
-% Free Software Foundation, Inc.
+% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+% 2000, 01 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -29,30 +29,34 @@
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
-% ftp://ftp.gnu.org/pub/gnu/texinfo.tex
-% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
+% ftp://ftp.gnu.org/gnu/texinfo.tex
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
-% ftp://tug.org/tex/texinfo.tex
-% ftp://ctan.org/macros/texinfo/texinfo.tex
-% (and all CTAN mirrors, finger ctan@ctan.org for a list).
-% The texinfo.tex in the texinfo distribution itself could well be out
+% ftp://texinfo.org/tex/texinfo.tex
+% ftp://us.ctan.org/macros/texinfo/texinfo.tex
+% (and all CTAN mirrors, finger ctan@us.ctan.org for a list).
+% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
+% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
-%
-% Send bug reports to bug-texinfo@gnu.org.
-% Please include a precise test case in each bug report,
-% including a complete document with which we can reproduce the problem.
-%
+% Texinfo has a small home page at http://texinfo.org/.
+%
+% Send bug reports to bug-texinfo@gnu.org. Please include including a
+% complete document in each bug report with which we can reproduce the
+% problem. Patches are, of course, greatly appreciated.
+%
% To process a Texinfo manual with TeX, it's most reliable to use the
-% texi2dvi shell script that comes with the distribution. For simple
-% manuals, however, you can get away with:
+% texi2dvi shell script that comes with the distribution. For a simple
+% manual foo.texi, however, you can get away with this:
% tex foo.texi
% texindex foo.??
% tex foo.texi
% tex foo.texi
-% dvips foo.dvi -o # or whatever, to process the dvi file.
+% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
% The extra runs of TeX get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
+%
+% It is possible to adapt texinfo.tex for other languages. You can get
+% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
\message{Loading texinfo [version \texinfoversion]:}
@@ -63,7 +67,6 @@
\catcode`+=\active \catcode`\_=\active}
% Save some parts of plain tex whose names we will redefine.
-
\let\ptexb=\b
\let\ptexbullet=\bullet
\let\ptexc=\c
@@ -83,7 +86,6 @@
% For @tex, we can use \tabalign.
\let\+ = \relax
-
\message{Basics,}
\chardef\other=12
@@ -92,19 +94,46 @@
\newlinechar = `^^J
% Set up fixed words for English if not already set.
-\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
-\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
-\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
-\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
-\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
-\ifx\putwordon\undefined \gdef\putwordon{on}\fi
-\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
-\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
-\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
-\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
-\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
-\ifx\putwordShortContents\undefined \gdef\putwordShortContents{Short Contents}\fi
-\ifx\putwordTableofContents\undefined\gdef\putwordTableofContents{Table of Contents}\fi
+\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
+\ifx\putwordin\undefined \gdef\putwordin{in}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
+\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
+\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
+\ifx\putwordof\undefined \gdef\putwordof{of}\fi
+\ifx\putwordon\undefined \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
+\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
+\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
+%
+\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
+\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
+\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
+\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
+\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
+\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
+\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
+\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
+\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
+\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
+\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
+\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
+%
+\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
+\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
+\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
+\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
+\ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi
+\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
+\ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi
% Ignore a token.
%
@@ -141,9 +170,19 @@
}%
\fi
+% add check for \lastpenalty to plain's definitions. If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi\fi}
+
% For @cropmarks command.
% Do @cropmarks to get crop marks.
-%
+%
\newif\ifcropmarks
\let\cropmarks = \cropmarkstrue
%
@@ -185,6 +224,9 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
\shipout\vbox{%
+ % Do this early so pdf references go to the beginning of the page.
+ \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi
+ %
\ifcropmarks \vbox to \outervsize\bgroup
\hsize = \outerhsize
\vskip-\topandbottommargin
@@ -399,7 +441,7 @@
% environments. --karl, 6may93
%{\advance \baselineskip by -\singlespaceskip
%\kern \baselineskip}%
- \setleading \singlespaceskip
+ \setleading\singlespaceskip
}
%% Simple single-character @ commands
@@ -568,36 +610,42 @@ where each line of input produces a line of output.}
%}}
\def\needx#1{%
- % Go into vertical mode, so we don't make a big box in the middle of a
+ % Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
\par
%
- % Don't add any leading before our big empty box, but allow a page
- % break, since the best break might be right here.
- \allowbreak
- \nointerlineskip
- \vtop to #1\mil{\vfil}%
- %
- % TeX does not even consider page breaks if a penalty added to the
- % main vertical list is 10000 or more. But in order to see if the
- % empty box we just added fits on the page, we must make it consider
- % page breaks. On the other hand, we don't want to actually break the
- % page after the empty box. So we use a penalty of 9999.
- %
- % There is an extremely small chance that TeX will actually break the
- % page at this \penalty, if there are no other feasible breakpoints in
- % sight. (If the user is using lots of big @group commands, which
- % almost-but-not-quite fill up a page, TeX will have a hard time doing
- % good page breaking, for example.) However, I could not construct an
- % example where a page broke at this \penalty; if it happens in a real
- % document, then we can reconsider our strategy.
- \penalty9999
- %
- % Back up by the size of the box, whether we did a page break or not.
- \kern -#1\mil
- %
- % Do not allow a page break right after this kern.
- \nobreak
+ % If the @need value is less than one line space, it's useless.
+ \dimen0 = #1\mil
+ \dimen2 = \ht\strutbox
+ \advance\dimen2 by \dp\strutbox
+ \ifdim\dimen0 > \dimen2
+ %
+ % Do a \strut just to make the height of this box be normal, so the
+ % normal leading is inserted relative to the preceding line.
+ % And a page break here is fine.
+ \vtop to #1\mil{\strut\vfil}%
+ %
+ % TeX does not even consider page breaks if a penalty added to the
+ % main vertical list is 10000 or more. But in order to see if the
+ % empty box we just added fits on the page, we must make it consider
+ % page breaks. On the other hand, we don't want to actually break the
+ % page after the empty box. So we use a penalty of 9999.
+ %
+ % There is an extremely small chance that TeX will actually break the
+ % page at this \penalty, if there are no other feasible breakpoints in
+ % sight. (If the user is using lots of big @group commands, which
+ % almost-but-not-quite fill up a page, TeX will have a hard time doing
+ % good page breaking, for example.) However, I could not construct an
+ % example where a page broke at this \penalty; if it happens in a real
+ % document, then we can reconsider our strategy.
+ \penalty9999
+ %
+ % Back up by the size of the box, whether we did a page break or not.
+ \kern -#1\mil
+ %
+ % Do not allow a page break right after this kern.
+ \nobreak
+ \fi
}
% @br forces paragraph break
@@ -618,7 +666,7 @@ where each line of input produces a line of output.}
}
% @enddots{} is an end-of-sentence ellipsis.
-%
+%
\def\enddots{%
\leavevmode
\hbox to 2em{%
@@ -650,16 +698,54 @@ where each line of input produces a line of output.}
\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
\leftline{\hskip\leftskip{\rm#1}}}}
-% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
-
-\def\inmargin#1{%
-\strut\vadjust{\nobreak\kern-\strutdepth
- \vtop to \strutdepth{\baselineskip\strutdepth\vss
- \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
+% paragraph. For more general purposes, use the \margin insertion
+% class. WHICH is `l' or `r'.
+%
\newskip\inmarginspacing \inmarginspacing=1cm
\def\strutdepth{\dp\strutbox}
-
-%\hbox{{\rm#1}}\hfil\break}}
+%
+\def\doinmargin#1#2{\strut\vadjust{%
+ \nobreak
+ \kern-\strutdepth
+ \vtop to \strutdepth{%
+ \baselineskip=\strutdepth
+ \vss
+ % if you have multiple lines of stuff to put here, you'll need to
+ % make the vbox yourself of the appropriate size.
+ \ifx#1l%
+ \llap{\ignorespaces #2\hskip\inmarginspacing}%
+ \else
+ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
+ \fi
+ \null
+ }%
+}}
+\def\inleftmargin{\doinmargin l}
+\def\inrightmargin{\doinmargin r}
+%
+% @inmargin{TEXT [, RIGHT-TEXT]}
+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
+% else use TEXT for both).
+%
+\def\inmargin#1{\parseinmargin #1,,\finish}
+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \def\lefttext{#1}% have both texts
+ \def\righttext{#2}%
+ \else
+ \def\lefttext{#1}% have only one text
+ \def\righttext{#1}%
+ \fi
+ %
+ \ifodd\pageno
+ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
+ \else
+ \def\temp{\inleftmargin\lefttext}%
+ \fi
+ \temp
+}
% @include file insert text of that file as input.
% Allow normal characters that we make active in the argument (a file name).
@@ -705,353 +791,43 @@ where each line of input produces a line of output.}
\let\c=\comment
-% @paragraphindent is defined for the Info formatting commands only.
-\let\paragraphindent=\comment
-
-% Prevent errors for section commands.
-% Used in @ignore and in failing conditionals.
-\def\ignoresections{%
-\let\chapter=\relax
-\let\unnumbered=\relax
-\let\top=\relax
-\let\unnumberedsec=\relax
-\let\unnumberedsection=\relax
-\let\unnumberedsubsec=\relax
-\let\unnumberedsubsection=\relax
-\let\unnumberedsubsubsec=\relax
-\let\unnumberedsubsubsection=\relax
-\let\section=\relax
-\let\subsec=\relax
-\let\subsubsec=\relax
-\let\subsection=\relax
-\let\subsubsection=\relax
-\let\appendix=\relax
-\let\appendixsec=\relax
-\let\appendixsection=\relax
-\let\appendixsubsec=\relax
-\let\appendixsubsection=\relax
-\let\appendixsubsubsec=\relax
-\let\appendixsubsubsection=\relax
-\let\contents=\relax
-\let\smallbook=\relax
-\let\titlepage=\relax
-}
-
-% Used in nested conditionals, where we have to parse the Texinfo source
-% and so want to turn off most commands, in case they are used
-% incorrectly.
-%
-\def\ignoremorecommands{%
- \let\defcodeindex = \relax
- \let\defcv = \relax
- \let\deffn = \relax
- \let\deffnx = \relax
- \let\defindex = \relax
- \let\defivar = \relax
- \let\defmac = \relax
- \let\defmethod = \relax
- \let\defop = \relax
- \let\defopt = \relax
- \let\defspec = \relax
- \let\deftp = \relax
- \let\deftypefn = \relax
- \let\deftypefun = \relax
- \let\deftypevar = \relax
- \let\deftypevr = \relax
- \let\defun = \relax
- \let\defvar = \relax
- \let\defvr = \relax
- \let\ref = \relax
- \let\xref = \relax
- \let\printindex = \relax
- \let\pxref = \relax
- \let\settitle = \relax
- \let\setchapternewpage = \relax
- \let\setchapterstyle = \relax
- \let\everyheading = \relax
- \let\evenheading = \relax
- \let\oddheading = \relax
- \let\everyfooting = \relax
- \let\evenfooting = \relax
- \let\oddfooting = \relax
- \let\headings = \relax
- \let\include = \relax
- \let\lowersections = \relax
- \let\down = \relax
- \let\raisesections = \relax
- \let\up = \relax
- \let\set = \relax
- \let\clear = \relax
- \let\item = \relax
-}
-
-% Ignore @ignore ... @end ignore.
-%
-\def\ignore{\doignore{ignore}}
-
-% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
-%
-\def\ifinfo{\doignore{ifinfo}}
-\def\ifhtml{\doignore{ifhtml}}
-\def\ifnottex{\doignore{ifnottex}}
-\def\html{\doignore{html}}
-\def\menu{\doignore{menu}}
-\def\direntry{\doignore{direntry}}
-
-% @dircategory CATEGORY -- specify a category of the dir file
-% which this file should belong to. Ignore this in TeX.
-\let\dircategory = \comment
-
-% Ignore text until a line `@end #1'.
-%
-\def\doignore#1{\begingroup
- % Don't complain about control sequences we have declared \outer.
- \ignoresections
- %
- % Define a command to swallow text until we reach `@end #1'.
- % This @ is a catcode 12 token (that is the normal catcode of @ in
- % this texinfo.tex file). We change the catcode of @ below to match.
- \long\def\doignoretext##1@end #1{\enddoignore}%
- %
- % Make sure that spaces turn into tokens that match what \doignoretext wants.
- \catcode32 = 10
- %
- % Ignore braces, too, so mismatched braces don't cause trouble.
- \catcode`\{ = 9
- \catcode`\} = 9
- %
- % We must not have @c interpreted as a control sequence.
- \catcode`\@ = 12
- %
- % Make the letter c a comment character so that the rest of the line
- % will be ignored. This way, the document can have (for example)
- % @c @end ifinfo
- % and the @end ifinfo will be properly ignored.
- % (We've just changed @ to catcode 12.)
- \catcode`\c = 14
- %
- % And now expand that command.
- \doignoretext
-}
-
-% What we do to finish off ignored text.
-%
-\def\enddoignore{\endgroup\ignorespaces}%
-
-\newif\ifwarnedobs\warnedobsfalse
-\def\obstexwarn{%
- \ifwarnedobs\relax\else
- % We need to warn folks that they may have trouble with TeX 3.0.
- % This uses \immediate\write16 rather than \message to get newlines.
- \immediate\write16{}
- \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
- \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
- \immediate\write16{If you are running another version of TeX, relax.}
- \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
- \immediate\write16{ Then upgrade your TeX installation if you can.}
- \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
- \immediate\write16{If you are stuck with version 3.0, run the}
- \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
- \immediate\write16{ to use a workaround.}
- \immediate\write16{}
- \global\warnedobstrue
- \fi
-}
-
-% **In TeX 3.0, setting text in \nullfont hangs tex. For a
-% workaround (which requires the file ``dummy.tfm'' to be installed),
-% uncomment the following line:
-%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
-
-% Ignore text, except that we keep track of conditional commands for
-% purposes of nesting, up to an `@end #1' command.
-%
-\def\nestedignore#1{%
- \obstexwarn
- % We must actually expand the ignored text to look for the @end
- % command, so that nested ignore constructs work. Thus, we put the
- % text into a \vbox and then do nothing with the result. To minimize
- % the change of memory overflow, we follow the approach outlined on
- % page 401 of the TeXbook: make the current font be a dummy font.
- %
- \setbox0 = \vbox\bgroup
- % Don't complain about control sequences we have declared \outer.
- \ignoresections
- %
- % Define `@end #1' to end the box, which will in turn undefine the
- % @end command again.
- \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
- %
- % We are going to be parsing Texinfo commands. Most cause no
- % trouble when they are used incorrectly, but some commands do
- % complicated argument parsing or otherwise get confused, so we
- % undefine them.
- %
- % We can't do anything about stray @-signs, unfortunately;
- % they'll produce `undefined control sequence' errors.
- \ignoremorecommands
- %
- % Set the current font to be \nullfont, a TeX primitive, and define
- % all the font commands to also use \nullfont. We don't use
- % dummy.tfm, as suggested in the TeXbook, because not all sites
- % might have that installed. Therefore, math mode will still
- % produce output, but that should be an extremely small amount of
- % stuff compared to the main input.
- %
- \nullfont
- \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
- \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
- \let\tensf = \nullfont
- % Similarly for index fonts (mostly for their use in
- % smallexample)
- \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
- \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
- \let\indsf = \nullfont
- %
- % Don't complain when characters are missing from the fonts.
- \tracinglostchars = 0
- %
- % Don't bother to do space factor calculations.
- \frenchspacing
- %
- % Don't report underfull hboxes.
- \hbadness = 10000
- %
- % Do minimal line-breaking.
- \pretolerance = 10000
- %
- % Do not execute instructions in @tex
- \def\tex{\doignore{tex}}%
- % Do not execute macro definitions.
- % `c' is a comment character, so the word `macro' will get cut off.
- \def\macro{\doignore{ma}}%
-}
-
-% @set VAR sets the variable VAR to an empty value.
-% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
-%
-% Since we want to separate VAR from REST-OF-LINE (which might be
-% empty), we can't just use \parsearg; we have to insert a space of our
-% own to delimit the rest of the line, and then take it out again if we
-% didn't need it. Make sure the catcode of space is correct to avoid
-% losing inside @example, for instance.
-%
-\def\set{\begingroup\catcode` =10
- \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
- \parsearg\setxxx}
-\def\setxxx#1{\setyyy#1 \endsetyyy}
-\def\setyyy#1 #2\endsetyyy{%
- \def\temp{#2}%
- \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
- \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
- \fi
- \endgroup
-}
-% Can't use \xdef to pre-expand #2 and save some time, since \temp or
-% \next or other control sequences that we've defined might get us into
-% an infinite loop. Consider `@set foo @cite{bar}'.
-\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
-
-% @clear VAR clears (i.e., unsets) the variable VAR.
-%
-\def\clear{\parsearg\clearxxx}
-\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
-
-% @value{foo} gets the text saved in variable foo.
-%
-{
- \catcode`\_ = \active
- %
- % We might end up with active _ or - characters in the argument if
- % we're called from @code, as @code{@value{foo-bar_}}. So \let any
- % such active characters to their normal equivalents.
- \gdef\value{\begingroup
- \catcode`\-=12 \catcode`\_=12
- \indexbreaks \let_\normalunderscore
- \valuexxx}
-}
-\def\valuexxx#1{\expandablevalue{#1}\endgroup}
-
-% We have this subroutine so that we can handle at least some @value's
-% properly in indexes (we \let\value to this in \indexdummies). Ones
-% whose names contain - or _ still won't work, but we can't do anything
-% about that. The command has to be fully expandable, since the result
-% winds up in the index file. This means that if the variable's value
-% contains other Texinfo commands, it's almost certain it will fail
-% (although perhaps we could fix that with sufficient work to do a
-% one-level expansion on the result, instead of complete).
+% @paragraphindent NCHARS
+% We'll use ems for NCHARS, close enough.
+% We cannot implement @paragraphindent asis, though.
%
-\def\expandablevalue#1{%
- \expandafter\ifx\csname SET#1\endcsname\relax
- {[No value for ``#1'']}%
- \else
- \csname SET#1\endcsname
- \fi
-}
-
-% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
-% with @set.
+\def\asisword{asis} % no translation, these are keywords
+\def\noneword{none}
%
-\def\ifset{\parsearg\ifsetxxx}
-\def\ifsetxxx #1{%
- \expandafter\ifx\csname SET#1\endcsname\relax
- \expandafter\ifsetfail
+\def\paragraphindent{\parsearg\doparagraphindent}
+\def\doparagraphindent#1{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
\else
- \expandafter\ifsetsucceed
+ \ifx\temp\noneword
+ \defaultparindent = 0pt
+ \else
+ \defaultparindent = #1em
+ \fi
\fi
+ \parindent = \defaultparindent
}
-\def\ifsetsucceed{\conditionalsucceed{ifset}}
-\def\ifsetfail{\nestedignore{ifset}}
-\defineunmatchedend{ifset}
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
-% defined with @set, or has been undefined with @clear.
-%
-\def\ifclear{\parsearg\ifclearxxx}
-\def\ifclearxxx #1{%
- \expandafter\ifx\csname SET#1\endcsname\relax
- \expandafter\ifclearsucceed
+% @exampleindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+% It seems @exampleindent asis isn't necessary, but
+% I preserve it to make it similar to @paragraphindent.
+\def\exampleindent{\parsearg\doexampleindent}
+\def\doexampleindent#1{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
\else
- \expandafter\ifclearfail
+ \ifx\temp\noneword
+ \lispnarrowing = 0pt
+ \else
+ \lispnarrowing = #1em
+ \fi
\fi
}
-\def\ifclearsucceed{\conditionalsucceed{ifclear}}
-\def\ifclearfail{\nestedignore{ifclear}}
-\defineunmatchedend{ifclear}
-
-% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
-% following, through the first @end iftex (etc.). Make `@end iftex'
-% (etc.) valid only after an @iftex.
-%
-\def\iftex{\conditionalsucceed{iftex}}
-\def\ifnothtml{\conditionalsucceed{ifnothtml}}
-\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
-\defineunmatchedend{iftex}
-\defineunmatchedend{ifnothtml}
-\defineunmatchedend{ifnotinfo}
-
-% We can't just want to start a group at @iftex (for example) and end it
-% at @end iftex, since then @set commands inside the conditional have no
-% effect (they'd get reverted at the end of the group). So we must
-% define \Eiftex to redefine itself to be its previous value. (We can't
-% just define it to fail again with an ``unmatched end'' error, since
-% the @ifset might be nested.)
-%
-\def\conditionalsucceed#1{%
- \edef\temp{%
- % Remember the current value of \E#1.
- \let\nece{prevE#1} = \nece{E#1}%
- %
- % At the `@end #1', redefine \E#1 to be its previous value.
- \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
- }%
- \temp
-}
-
-% We need to expand lots of \csname's, but we don't want to expand the
-% control sequences after we've constructed them.
-%
-\def\nece#1{\expandafter\noexpand\csname#1\endcsname}
% @asis just yields its argument. Used with @table, for example.
%
@@ -1088,7 +864,7 @@ where each line of input produces a line of output.}
% So open here the files we need to have open while reading the input.
% This makes it possible to make a .fmt file for texinfo.
\def\setfilename{%
- \iflinks
+ \iflinks
\readauxfile
\fi % \openindices needs to do some work in any case.
\openindices
@@ -1107,7 +883,7 @@ where each line of input produces a line of output.}
}
% Called from \setfilename.
-%
+%
\def\openindices{%
\newindex{cp}%
\newcodeindex{fn}%
@@ -1121,6 +897,183 @@ where each line of input produces a line of output.}
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+\message{pdf,}
+% adobe `portable' document format
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+\newtoks\toksA
+\newtoks\toksB
+\newtoks\toksC
+\newtoks\toksD
+\newbox\boxA
+\newcount\countA
+\newif\ifpdf
+\newif\ifpdfmakepagedest
+
+\ifx\pdfoutput\undefined
+ \pdffalse
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\linkcolor = \relax
+ \let\pdfmakeoutlines = \relax
+\else
+ \pdftrue
+ \pdfoutput = 1
+ \input pdfcolor
+ \def\dopdfimage#1#2#3{%
+ \def\imagewidth{#2}%
+ \def\imageheight{#3}%
+ \ifnum\pdftexversion < 14
+ \pdfimage
+ \else
+ \pdfximage
+ \fi
+ \ifx\empty\imagewidth\else width \imagewidth \fi
+ \ifx\empty\imageheight\else height \imageheight \fi
+ \ifnum\pdftexversion<13
+ #1.pdf%
+ \else
+ {#1.pdf}%
+ \fi
+ \ifnum\pdftexversion < 14 \else
+ \pdfrefximage \pdflastximage
+ \fi}
+ \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
+ \def\pdfmkpgn#1{#1@}
+ \let\linkcolor = \Blue % was Cyan, but that seems light?
+ \def\endlink{\Black\pdfendlink}
+ % Adding outlines to PDF; macros for calculating structure of outlines
+ % come from Petr Olsak
+ \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+ \else \csname#1\endcsname \fi}
+ \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+ \advance\tempnum by1
+ \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+ \def\pdfmakeoutlines{{%
+ \openin 1 \jobname.toc
+ \ifeof 1\else\bgroup
+ \closein 1
+ \indexnofonts
+ \def\tt{}
+ \let\_ = \normalunderscore
+ % Thanh's hack / proper braces in bookmarks
+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
+ %
+ \def\chapentry ##1##2##3{}
+ \def\unnumbchapentry ##1##2{}
+ \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
+ \def\unnumbsecentry ##1##2{}
+ \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
+ \def\unnumbsubsecentry ##1##2{}
+ \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
+ \def\unnumbsubsubsecentry ##1##2{}
+ \input \jobname.toc
+ \def\chapentry ##1##2##3{%
+ \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
+ \def\unnumbchapentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\secentry ##1##2##3##4{%
+ \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
+ \def\unnumbsecentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\subsecentry ##1##2##3##4##5{%
+ \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
+ \def\unnumbsubsecentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\subsubsecentry ##1##2##3##4##5##6{%
+ \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
+ \def\unnumbsubsubsecentry ##1##2{%
+ \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \input \jobname.toc
+ \egroup\fi
+ }}
+ \def\makelinks #1,{%
+ \def\params{#1}\def\E{END}%
+ \ifx\params\E
+ \let\nextmakelinks=\relax
+ \else
+ \let\nextmakelinks=\makelinks
+ \ifnum\lnkcount>0,\fi
+ \picknum{#1}%
+ \startlink attr{/Border [0 0 0]}
+ goto name{\pdfmkpgn{\the\pgn}}%
+ \linkcolor #1%
+ \advance\lnkcount by 1%
+ \endlink
+ \fi
+ \nextmakelinks
+ }
+ \def\picknum#1{\expandafter\pn#1}
+ \def\pn#1{%
+ \def\p{#1}%
+ \ifx\p\lbrace
+ \let\nextpn=\ppn
+ \else
+ \let\nextpn=\ppnn
+ \def\first{#1}
+ \fi
+ \nextpn
+ }
+ \def\ppn#1{\pgn=#1\gobble}
+ \def\ppnn{\pgn=\first}
+ \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \ifx\p\space\else\addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \fi
+ \nextsp}
+ \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \ifnum\pdftexversion < 14
+ \let \startlink \pdfannotlink
+ \else
+ \let \startlink \pdfstartlink
+ \fi
+ \def\pdfurl#1{%
+ \begingroup
+ \normalturnoffactive\def\@{@}%
+ \let\value=\expandablevalue
+ \leavevmode\Red
+ \startlink attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ % #1
+ \endgroup}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \linkcolor #1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\fi % \ifx\pdfoutput
+
+
\message{fonts,}
% Font-change commands.
@@ -1133,9 +1086,29 @@ where each line of input produces a line of output.}
% We don't need math for this one.
\def\ttsl{\tenttsl}
+% Default leading.
+\newdimen\textleading \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+\def\setleading#1{%
+ \normalbaselineskip = #1\relax
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
% Use Computer Modern fonts at \magstephalf (11pt).
-\newcount\mainmagstep
-\mainmagstep=\magstephalf
+\newcount\mainmagstep \mainmagstep=\magstephalf
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
@@ -1190,23 +1163,29 @@ where each line of input produces a line of output.}
\setfont\deftt\ttshape{10}{\magstep1}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
-% Fonts for indices and small examples (9pt).
-% We actually use the slanted font rather than the italic,
-% because texinfo normally uses the slanted fonts for that.
-% Do not make many font distinctions in general in the index, since they
-% aren't very useful.
-\setfont\ninett\ttshape{9}{1000}
-\setfont\ninettsl\ttslshape{10}{900}
-\setfont\indrm\rmshape{9}{1000}
-\setfont\indit\itshape{9}{1000}
-\setfont\indsl\slshape{9}{1000}
-\let\indtt=\ninett
-\let\indttsl=\ninettsl
-\let\indsf=\indrm
-\let\indbf=\indrm
-\setfont\indsc\scshape{10}{900}
-\font\indi=cmmi9
-\font\indsy=cmsy9
+% Fonts for indices, footnotes, small examples (9pt).
+\setfont\smallrm\rmshape{9}{1000}
+\setfont\smalltt\ttshape{9}{1000}
+\setfont\smallbf\bfshape{10}{900}
+\setfont\smallit\itshape{9}{1000}
+\setfont\smallsl\slshape{9}{1000}
+\setfont\smallsf\sfshape{9}{1000}
+\setfont\smallsc\scshape{10}{900}
+\setfont\smallttsl\ttslshape{10}{900}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+
+% Fonts for small examples (8pt).
+\setfont\smallerrm\rmshape{8}{1000}
+\setfont\smallertt\ttshape{8}{1000}
+\setfont\smallerbf\bfshape{10}{800}
+\setfont\smallerit\itshape{8}{1000}
+\setfont\smallersl\slshape{8}{1000}
+\setfont\smallersf\sfshape{8}{1000}
+\setfont\smallersc\scshape{10}{800}
+\setfont\smallerttsl\ttslshape{10}{800}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
% Fonts for title page:
\setfont\titlerm\rmbshape{12}{\magstep3}
@@ -1296,7 +1275,7 @@ where each line of input produces a line of output.}
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
- \resetmathfonts}
+ \resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
@@ -1320,11 +1299,19 @@ where each line of input produces a line of output.}
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
\resetmathfonts \setleading{15pt}}
\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
-\def\indexfonts{%
- \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
- \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
- \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
- \resetmathfonts \setleading{12pt}}
+\def\smallfonts{%
+ \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
+ \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
+ \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
+ \let\tenttsl=\smallttsl
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallerfonts{%
+ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
+ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
+ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
+ \let\tenttsl=\smallerttsl
+ \resetmathfonts \setleading{9.5pt}}
+\let\smallexamplefonts = \smallerfonts
% Set up the default fonts, so we can use them for creating boxes.
%
@@ -1373,9 +1360,9 @@ where each line of input produces a line of output.}
}
\let\ttfont=\t
\def\samp#1{`\tclose{#1}'\null}
-\setfont\smallrm\rmshape{8}{1000}
-\font\smallsy=cmsy9
-\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
+\setfont\keyrm\rmshape{8}{1000}
+\font\keysy=cmsy9
+\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
\raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
\vbox{\hrule\kern-0.4pt
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
@@ -1479,24 +1466,50 @@ where each line of input produces a line of output.}
\let\env=\code
\let\command=\code
-% @uref (abbreviation for `urlref') takes an optional second argument
-% specifying the text to display. First (mandatory) arg is the url.
-% Perhaps eventually put in a hypertex \special here.
-%
-\def\uref#1{\urefxxx #1,,\finish}
-\def\urefxxx#1,#2,#3\finish{%
- \setbox0 = \hbox{\ignorespaces #2}%
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself. First (mandatory) arg is the url. Perhaps eventually put in
+% a hypertex \special here.
+%
+\def\uref#1{\douref #1,,,\finish}
+\def\douref#1,#2,#3,#4\finish{\begingroup
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt
- \unhbox0\ (\code{#1})%
+ \unhbox0 % third arg given, show only that
\else
- \code{#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \code{#1}% only url given, so show it
+ \fi
\fi
-}
+ \endlink
+\endgroup}
-% rms does not like the angle brackets --karl, 17may97.
-% So now @email is just like @uref.
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
%\def\email#1{\angleleft{\tt #1}\angleright}
-\let\email=\uref
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+\else
+ \let\email=\uref
+\fi
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
@@ -1539,8 +1552,8 @@ where each line of input produces a line of output.}
\newif\iffinishedtitlepage
% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @contentsaftertitlepage or @shortcontentsaftertitlepage.
-%
+% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
+%
\newif\ifsetcontentsaftertitlepage
\let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
\newif\ifsetshortcontentsaftertitlepage
@@ -1615,6 +1628,8 @@ where each line of input produces a line of output.}
\global\let\shortcontents = \relax
\fi
%
+ \ifpdf \pdfmakepagedesttrue \fi
+ %
\HEADINGSon
}
@@ -1748,23 +1763,23 @@ where each line of input produces a line of output.}
}
% Subroutines used in generating headings
-% Produces Day Month Year style of output.
-\def\today{\number\day\space
-\ifcase\month\or
-January\or February\or March\or April\or May\or June\or
-July\or August\or September\or October\or November\or December\fi
-\space\number\year}
-
-% Use this if you want the Month Day, Year style of output.
-%\def\today{\ifcase\month\or
-%January\or February\or March\or April\or May\or June\or
-%July\or August\or September\or October\or November\or December\fi
-%\space\number\day, \number\year}
-
-% @settitle line... specifies the title of the document, for headings
-% It generates no output of its own
-
-\def\thistitle{No Title}
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\undefined
+\def\today{%
+ \number\day\space
+ \ifcase\month
+ \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
+ \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
+ \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
+ \fi
+ \space\number\year}
+\fi
+
+% @settitle line... specifies the title of the document, for headings.
+% It generates no output of its own.
+\def\thistitle{\putwordNoTitle}
\def\settitle{\parsearg\settitlezzz}
\def\settitlezzz #1{\gdef\thistitle{#1}}
@@ -1841,7 +1856,7 @@ July\or August\or September\or October\or November\or December\fi
\itemxneedsnegativevskipfalse
\else
% The item text fits into the space. Start a paragraph, so that the
- % following text (if any) will end up on the same line.
+ % following text (if any) will end up on the same line.
\noindent
% Do this with kerns and \unhbox so that if there is a footnote in
% the item text, it can migrate to the main vertical list and
@@ -2138,46 +2153,60 @@ July\or August\or September\or October\or November\or December\fi
\multitablelinespace=0pt
% Macros used to set up halign preamble:
-%
+%
\let\endsetuptable\relax
\def\xendsetuptable{\endsetuptable}
\let\columnfractions\relax
\def\xcolumnfractions{\columnfractions}
\newif\ifsetpercent
-% 2/1/96, to allow fractions to be given with more than one digit.
-\def\pickupwholefraction#1 {\global\advance\colcount by1 %
-\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
-\setuptable}
+% #1 is the part of the @columnfraction before the decimal point, which
+% is presumably either 0 or the empty string (but we don't check, we
+% just throw it away). #2 is the decimal part, which we use as the
+% percent of \hsize for this column.
+\def\pickupwholefraction#1.#2 {%
+ \global\advance\colcount by 1
+ \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}%
+ \setuptable
+}
\newcount\colcount
-\def\setuptable#1{\def\firstarg{#1}%
-\ifx\firstarg\xendsetuptable\let\go\relax%
-\else
- \ifx\firstarg\xcolumnfractions\global\setpercenttrue%
+\def\setuptable#1{%
+ \def\firstarg{#1}%
+ \ifx\firstarg\xendsetuptable
+ \let\go = \relax
\else
- \ifsetpercent
- \let\go\pickupwholefraction % In this case arg of setuptable
- % is the decimal point before the
- % number given in percent of hsize.
- % We don't need this so we don't use it.
+ \ifx\firstarg\xcolumnfractions
+ \global\setpercenttrue
\else
- \global\advance\colcount by1
- \setbox0=\hbox{#1 }% Add a normal word space as a separator;
- % typically that is always in the input, anyway.
- \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \ifsetpercent
+ \let\go\pickupwholefraction
+ \else
+ \global\advance\colcount by 1
+ \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator;
+ % typically that is always in the input, anyway.
+ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \fi
+ \fi
+ \ifx\go\pickupwholefraction
+ % Put the argument back for the \pickupwholefraction call, so
+ % we'll always have a period there to be parsed.
+ \def\go{\pickupwholefraction#1}%
+ \else
+ \let\go = \setuptable
\fi%
- \fi%
-\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
-\fi\go}
+ \fi
+ \go
+}
-% multitable syntax
-\def\tab{&\hskip1sp\relax} % 2/2/96
- % tiny skip here makes sure this column space is
- % maintained, even if it is never used.
+% This used to have \hskip1sp. But then the space in a template line is
+% not enough. That is bad. So let's go back to just & until we
+% encounter the problem it was intended to solve again.
+% --karl, nathan@acm.org, 20apr99.
+\def\tab{&}
% @multitable ... @end multitable definitions:
-
+%
\def\multitable{\parsearg\dotable}
\def\dotable#1{\bgroup
\vskip\parskip
@@ -2216,15 +2245,15 @@ July\or August\or September\or October\or November\or December\fi
% In order to keep entries from bumping into each other
% we will add a \leftskip of \multitablecolspace to all columns after
% the first one.
- %
+ %
% If a template has been used, we will add \multitablecolspace
% to the width of each template entry.
- %
+ %
% If the user has set preamble in terms of percent of \hsize we will
% use that dimension as the width of the column, and the \leftskip
% will keep entries from bumping into each other. Table will start at
% left margin and final column will justify at right margin.
- %
+ %
% Make sure we don't inherit \rightskip from the outer environment.
\rightskip=0pt
\ifnum\colcount=1
@@ -2255,15 +2284,18 @@ July\or August\or September\or October\or November\or December\fi
% If so, do nothing. If not, give it an appropriate dimension based on
% current baselineskip.
\ifdim\multitablelinespace=0pt
+\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
+\global\advance\multitablelinespace by-\ht0
%% strut to put in table in case some entry doesn't have descenders,
%% to keep lines equally spaced
\let\multistrut = \strut
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%% If so, set to same dimension as multitablelinespace.
\else
+%% FIXME: what is \box0 supposed to be?
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
width0pt\relax} \fi
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
@@ -2276,6 +2308,360 @@ width0pt\relax} \fi
\fi}
+\message{conditionals,}
+% Prevent errors for section commands.
+% Used in @ignore and in failing conditionals.
+\def\ignoresections{%
+ \let\chapter=\relax
+ \let\unnumbered=\relax
+ \let\top=\relax
+ \let\unnumberedsec=\relax
+ \let\unnumberedsection=\relax
+ \let\unnumberedsubsec=\relax
+ \let\unnumberedsubsection=\relax
+ \let\unnumberedsubsubsec=\relax
+ \let\unnumberedsubsubsection=\relax
+ \let\section=\relax
+ \let\subsec=\relax
+ \let\subsubsec=\relax
+ \let\subsection=\relax
+ \let\subsubsection=\relax
+ \let\appendix=\relax
+ \let\appendixsec=\relax
+ \let\appendixsection=\relax
+ \let\appendixsubsec=\relax
+ \let\appendixsubsection=\relax
+ \let\appendixsubsubsec=\relax
+ \let\appendixsubsubsection=\relax
+ \let\contents=\relax
+ \let\smallbook=\relax
+ \let\titlepage=\relax
+}
+
+% Used in nested conditionals, where we have to parse the Texinfo source
+% and so want to turn off most commands, in case they are used
+% incorrectly.
+%
+\def\ignoremorecommands{%
+ \let\defcodeindex = \relax
+ \let\defcv = \relax
+ \let\deffn = \relax
+ \let\deffnx = \relax
+ \let\defindex = \relax
+ \let\defivar = \relax
+ \let\defmac = \relax
+ \let\defmethod = \relax
+ \let\defop = \relax
+ \let\defopt = \relax
+ \let\defspec = \relax
+ \let\deftp = \relax
+ \let\deftypefn = \relax
+ \let\deftypefun = \relax
+ \let\deftypeivar = \relax
+ \let\deftypeop = \relax
+ \let\deftypevar = \relax
+ \let\deftypevr = \relax
+ \let\defun = \relax
+ \let\defvar = \relax
+ \let\defvr = \relax
+ \let\ref = \relax
+ \let\xref = \relax
+ \let\printindex = \relax
+ \let\pxref = \relax
+ \let\settitle = \relax
+ \let\setchapternewpage = \relax
+ \let\setchapterstyle = \relax
+ \let\everyheading = \relax
+ \let\evenheading = \relax
+ \let\oddheading = \relax
+ \let\everyfooting = \relax
+ \let\evenfooting = \relax
+ \let\oddfooting = \relax
+ \let\headings = \relax
+ \let\include = \relax
+ \let\lowersections = \relax
+ \let\down = \relax
+ \let\raisesections = \relax
+ \let\up = \relax
+ \let\set = \relax
+ \let\clear = \relax
+ \let\item = \relax
+}
+
+% Ignore @ignore ... @end ignore.
+%
+\def\ignore{\doignore{ignore}}
+
+% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
+%
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\html{\doignore{html}}
+\def\menu{\doignore{menu}}
+\def\direntry{\doignore{direntry}}
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory = \comment
+
+% Ignore text until a line `@end #1'.
+%
+\def\doignore#1{\begingroup
+ % Don't complain about control sequences we have declared \outer.
+ \ignoresections
+ %
+ % Define a command to swallow text until we reach `@end #1'.
+ % This @ is a catcode 12 token (that is the normal catcode of @ in
+ % this texinfo.tex file). We change the catcode of @ below to match.
+ \long\def\doignoretext##1@end #1{\enddoignore}%
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \catcode32 = 10
+ %
+ % Ignore braces, too, so mismatched braces don't cause trouble.
+ \catcode`\{ = 9
+ \catcode`\} = 9
+ %
+ % We must not have @c interpreted as a control sequence.
+ \catcode`\@ = 12
+ %
+ % Make the letter c a comment character so that the rest of the line
+ % will be ignored. This way, the document can have (for example)
+ % @c @end ifinfo
+ % and the @end ifinfo will be properly ignored.
+ % (We've just changed @ to catcode 12.)
+ \catcode`\c = 14
+ %
+ % And now expand that command.
+ \doignoretext
+}
+
+% What we do to finish off ignored text.
+%
+\def\enddoignore{\endgroup\ignorespaces}%
+
+\newif\ifwarnedobs\warnedobsfalse
+\def\obstexwarn{%
+ \ifwarnedobs\relax\else
+ % We need to warn folks that they may have trouble with TeX 3.0.
+ % This uses \immediate\write16 rather than \message to get newlines.
+ \immediate\write16{}
+ \immediate\write16{WARNING: for users of Unix TeX 3.0!}
+ \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
+ \immediate\write16{If you are running another version of TeX, relax.}
+ \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
+ \immediate\write16{ Then upgrade your TeX installation if you can.}
+ \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
+ \immediate\write16{If you are stuck with version 3.0, run the}
+ \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
+ \immediate\write16{ to use a workaround.}
+ \immediate\write16{}
+ \global\warnedobstrue
+ \fi
+}
+
+% **In TeX 3.0, setting text in \nullfont hangs tex. For a
+% workaround (which requires the file ``dummy.tfm'' to be installed),
+% uncomment the following line:
+%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
+
+% Ignore text, except that we keep track of conditional commands for
+% purposes of nesting, up to an `@end #1' command.
+%
+\def\nestedignore#1{%
+ \obstexwarn
+ % We must actually expand the ignored text to look for the @end
+ % command, so that nested ignore constructs work. Thus, we put the
+ % text into a \vbox and then do nothing with the result. To minimize
+ % the change of memory overflow, we follow the approach outlined on
+ % page 401 of the TeXbook: make the current font be a dummy font.
+ %
+ \setbox0 = \vbox\bgroup
+ % Don't complain about control sequences we have declared \outer.
+ \ignoresections
+ %
+ % Define `@end #1' to end the box, which will in turn undefine the
+ % @end command again.
+ \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
+ %
+ % We are going to be parsing Texinfo commands. Most cause no
+ % trouble when they are used incorrectly, but some commands do
+ % complicated argument parsing or otherwise get confused, so we
+ % undefine them.
+ %
+ % We can't do anything about stray @-signs, unfortunately;
+ % they'll produce `undefined control sequence' errors.
+ \ignoremorecommands
+ %
+ % Set the current font to be \nullfont, a TeX primitive, and define
+ % all the font commands to also use \nullfont. We don't use
+ % dummy.tfm, as suggested in the TeXbook, because not all sites
+ % might have that installed. Therefore, math mode will still
+ % produce output, but that should be an extremely small amount of
+ % stuff compared to the main input.
+ %
+ \nullfont
+ \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
+ \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
+ \let\tensf=\nullfont
+ % Similarly for index fonts.
+ \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
+ \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
+ \let\smallsf=\nullfont
+ % Similarly for smallexample fonts.
+ \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont
+ \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont
+ \let\smallersf=\nullfont
+ %
+ % Don't complain when characters are missing from the fonts.
+ \tracinglostchars = 0
+ %
+ % Don't bother to do space factor calculations.
+ \frenchspacing
+ %
+ % Don't report underfull hboxes.
+ \hbadness = 10000
+ %
+ % Do minimal line-breaking.
+ \pretolerance = 10000
+ %
+ % Do not execute instructions in @tex
+ \def\tex{\doignore{tex}}%
+ % Do not execute macro definitions.
+ % `c' is a comment character, so the word `macro' will get cut off.
+ \def\macro{\doignore{ma}}%
+}
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it. Make sure the catcode of space is correct to avoid
+% losing inside @example, for instance.
+%
+\def\set{\begingroup\catcode` =10
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \parsearg\setxxx}
+\def\setxxx#1{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ \def\temp{#2}%
+ \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
+ \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
+ \fi
+ \endgroup
+}
+% Can't use \xdef to pre-expand #2 and save some time, since \temp or
+% \next or other control sequences that we've defined might get us into
+% an infinite loop. Consider `@set foo @cite{bar}'.
+\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\def\clear{\parsearg\clearxxx}
+\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
+
+% @value{foo} gets the text saved in variable foo.
+{
+ \catcode`\_ = \active
+ %
+ % We might end up with active _ or - characters in the argument if
+ % we're called from @code, as @code{@value{foo-bar_}}. So \let any
+ % such active characters to their normal equivalents.
+ \gdef\value{\begingroup
+ \catcode`\-=12 \catcode`\_=12
+ \indexbreaks \let_\normalunderscore
+ \valuexxx}
+}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we \let\value to this in \indexdummies). Ones
+% whose names contain - or _ still won't work, but we can't do anything
+% about that. The command has to be fully expandable, since the result
+% winds up in the index file. This means that if the variable's value
+% contains other Texinfo commands, it's almost certain it will fail
+% (although perhaps we could fix that with sufficient work to do a
+% one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {[No value for ``#1'']}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+\def\ifset{\parsearg\ifsetxxx}
+\def\ifsetxxx #1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \expandafter\ifsetfail
+ \else
+ \expandafter\ifsetsucceed
+ \fi
+}
+\def\ifsetsucceed{\conditionalsucceed{ifset}}
+\def\ifsetfail{\nestedignore{ifset}}
+\defineunmatchedend{ifset}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+\def\ifclear{\parsearg\ifclearxxx}
+\def\ifclearxxx #1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \expandafter\ifclearsucceed
+ \else
+ \expandafter\ifclearfail
+ \fi
+}
+\def\ifclearsucceed{\conditionalsucceed{ifclear}}
+\def\ifclearfail{\nestedignore{ifclear}}
+\defineunmatchedend{ifclear}
+
+% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
+% following, through the first @end iftex (etc.). Make `@end iftex'
+% (etc.) valid only after an @iftex.
+%
+\def\iftex{\conditionalsucceed{iftex}}
+\def\ifnothtml{\conditionalsucceed{ifnothtml}}
+\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
+\defineunmatchedend{iftex}
+\defineunmatchedend{ifnothtml}
+\defineunmatchedend{ifnotinfo}
+
+% We can't just want to start a group at @iftex (for example) and end it
+% at @end iftex, since then @set commands inside the conditional have no
+% effect (they'd get reverted at the end of the group). So we must
+% define \Eiftex to redefine itself to be its previous value. (We can't
+% just define it to fail again with an ``unmatched end'' error, since
+% the @ifset might be nested.)
+%
+\def\conditionalsucceed#1{%
+ \edef\temp{%
+ % Remember the current value of \E#1.
+ \let\nece{prevE#1} = \nece{E#1}%
+ %
+ % At the `@end #1', redefine \E#1 to be its previous value.
+ \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
+ }%
+ \temp
+}
+
+% We need to expand lots of \csname's, but we don't want to expand the
+% control sequences after we've constructed them.
+%
+\def\nece#1{\expandafter\noexpand\csname#1\endcsname}
+
+% @defininfoenclose.
+\let\definfoenclose=\comment
+
+
\message{indexing,}
% Index generation facilities
@@ -2302,42 +2688,48 @@ width0pt\relax} \fi
}
% @defindex foo == \newindex{foo}
-
+%
\def\defindex{\parsearg\newindex}
% Define @defcodeindex, like @defindex except put all entries in @code.
-
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
\def\newcodeindex#1{%
\iflinks
\expandafter\newwrite \csname#1indfile\endcsname
\openout \csname#1indfile\endcsname \jobname.#1
\fi
\expandafter\xdef\csname#1index\endcsname{%
- \noexpand\docodeindex{#1}}
+ \noexpand\docodeindex{#1}}%
}
-\def\defcodeindex{\parsearg\newcodeindex}
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
-% The \closeout helps reduce unnecessary open files; the limit on the
-% Acorn RISC OS is a mere 16 files.
-\def\synindex#1 #2 {%
- \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
- \expandafter\closeout\csname#1indfile\endcsname
- \expandafter\let\csname#1indfile\endcsname=\synindexfoo
- \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
- \noexpand\doindex{#2}}%
-}
-
+%
% @syncodeindex foo bar similar, but put all entries made for index foo
% inside @code.
-\def\syncodeindex#1 #2 {%
- \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
- \expandafter\closeout\csname#1indfile\endcsname
- \expandafter\let\csname#1indfile\endcsname=\synindexfoo
- \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
- \noexpand\docodeindex{#2}}%
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+ % Only do \closeout if we haven't already done it, else we'll end up
+ % closing the target index.
+ \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+ % The \closeout helps reduce unnecessary open files; the limit on the
+ % Acorn RISC OS is a mere 16 files.
+ \expandafter\closeout\csname#2indfile\endcsname
+ \expandafter\let\csname\donesynindex#2\endcsname = 1
+ \fi
+ % redefine \fooindfile:
+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+ \expandafter\let\csname#2indfile\endcsname=\temp
+ % redefine \fooindex:
+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
% Define \doindex, the driver for all \fooindex macros.
@@ -2388,8 +2780,11 @@ width0pt\relax} \fi
% (Must be a way to avoid doing expansion at all, and thus not have to
% laboriously list every single command here.)
\def\@{@}% will be @@ when we switch to @ as escape char.
-%\let\{ = \lbracecmd
-%\let\} = \rbracecmd
+% Need these in case \tex is in effect and \{ is a \delimiter again.
+% But can't use \lbracecmd and \rbracecmd because texindex assumes
+% braces and backslashes are used only as delimiters.
+\let\{ = \mylbrace
+\let\} = \myrbrace
\def\_{{\realbackslash _}}%
\def\w{\realbackslash w }%
\def\bf{\realbackslash bf }%
@@ -2439,6 +2834,8 @@ width0pt\relax} \fi
\let\value = \expandablevalue
%
\unsepspaces
+% Turn off macro expansion
+\turnoffmacros
}
% If an index command is used in an @example environment, any spaces
@@ -2498,6 +2895,7 @@ width0pt\relax} \fi
\let\url=\indexdummyfont
\let\uref=\indexdummyfont
\let\env=\indexdummyfont
+\let\acronym=\indexdummyfont
\let\command=\indexdummyfont
\let\option=\indexdummyfont
\let\file=\indexdummyfont
@@ -2524,14 +2922,14 @@ width0pt\relax} \fi
\def\emptymacro{\empty}
% Most index entries go through here, but \dosubind is the general case.
-%
+%
\def\doind#1#2{\dosubind{#1}{#2}\empty}
% Workhorse for all \fooindexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% \empty if called from \doind, as we usually are. The main exception
% is with defuns, which call us directly.
-%
+%
\def\dosubind#1#2#3{%
% Put the index entry in the margin if desired.
\ifx\SETmarginindex\relax\else
@@ -2556,24 +2954,29 @@ width0pt\relax} \fi
\def\subentry{ #3}%
\fi
%
- % First process the index-string with all font commands turned off
- % to get the string to sort by.
+ % First process the index entry with all font commands turned
+ % off to get the string to sort by.
{\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
%
- % Now produce the complete index entry, with both the sort key and the
- % original text, including any font commands.
+ % Now the real index entry with the fonts.
\toks0 = {#2}%
+ %
+ % If the third (subentry) arg is present, add it to the index
+ % line to write.
+ \ifx\thirdarg\emptymacro \else
+ \toks0 = \expandafter{\the\toks0{#3}}%
+ \fi
+ %
+ % Set up the complete index entry, with both the sort key and
+ % the original text, including any font commands. We write
+ % three arguments to \entry to the .?? file (four in the
+ % subentry case), texindex reduces to two when writing the .??s
+ % sorted result.
\edef\temp{%
\write\csname#1indfile\endcsname{%
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
}%
%
- % If third (subentry) arg is present, add it to the index string.
- \ifx\thirdarg\emptymacro \else
- \toks0 = {#3}%
- \edef\temp{\temp{\the\toks0}}%
- \fi
- %
% If a skip is the last thing on the list now, preserve it
% by backing up by \lastskip, doing the \write, then inserting
% the skip again. Otherwise, the whatsit generated by the
@@ -2585,12 +2988,12 @@ width0pt\relax} \fi
% will have extra space inserted, because the \medbreak in the
% start of the @defun won't see the skip inserted by the @end of
% the previous defun.
- %
+ %
% But don't do any of this if we're not in vertical mode. We
% don't want to do a \vskip and prematurely end a paragraph.
- %
+ %
% Avoid page breaks due to these extra skips, too.
- %
+ %
\iflinks
\ifvmode
\skip0 = \lastskip
@@ -2599,7 +3002,7 @@ width0pt\relax} \fi
%
\temp % do the write
%
- %
+ %
\ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
\fi
}%
@@ -2647,7 +3050,7 @@ width0pt\relax} \fi
\def\doprintindex#1{\begingroup
\dobreak \chapheadingskip{10000}%
%
- \indexfonts \rm
+ \smallfonts \rm
\tolerance = 9500
\indexbreaks
%
@@ -2663,7 +3066,7 @@ width0pt\relax} \fi
% and it loses the chapter title and the aux file entries for the
% index. The easiest way to prevent this problem is to make sure
% there is some text.
- (Index is nonexistent)
+ \putwordIndexNonexistent
\else
%
% If the index file exists but is empty, then \openin leaves \ifeof
@@ -2671,7 +3074,7 @@ width0pt\relax} \fi
% it can discover if there is anything in it.
\read 1 to \temp
\ifeof 1
- (Index is empty)
+ \putwordIndexIsEmpty
\else
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
@@ -2696,7 +3099,7 @@ width0pt\relax} \fi
%
% Remove any glue we may have, we'll be inserting our own.
\removelastskip
- %
+ %
% We like breaks before the index initials, so insert a bonus.
\penalty -300
%
@@ -2704,7 +3107,7 @@ width0pt\relax} \fi
% baselineskips increases the chance of the dots lining up from column
% to column. It still won't often be perfect, because of the stretch
% we need before each entry, but it's better.
- %
+ %
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus .5\baselineskip
\leftline{\secbf #1}%
@@ -2774,7 +3177,11 @@ width0pt\relax} \fi
% The `\ ' here is removed by the implicit \unskip that TeX does as
% part of (the primitive) \par. Without it, a spurious underfull
% \hbox ensues.
- \ #2% The page number ends the paragraph.
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ \ #2% The page number ends the paragraph.
+ \fi
\fi%
\par
\endgroup}
@@ -2786,11 +3193,18 @@ width0pt\relax} \fi
\def\primary #1{\line{#1\hfil}}
\newskip\secondaryindent \secondaryindent=0.5cm
-
-\def\secondary #1#2{
-{\parfillskip=0in \parskip=0in
-\hangindent =1in \hangafter=1
-\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
+\def\secondary#1#2{{%
+ \parfillskip=0in
+ \parskip=0in
+ \hangindent=1in
+ \hangafter=1
+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ #2
+ \fi
+ \par
}}
% Define two-column mode, which we use to typeset indexes.
@@ -2803,24 +3217,26 @@ width0pt\relax} \fi
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
- \output = {\global\setbox\partialpage = \vbox{%
- %
+ \output = {%
+ %
% Here is a possibility not foreseen in manmac: if we accumulate a
% whole lot of material, we might end up calling this \output
% routine twice in a row (see the doublecol-lose test, which is
% essentially a couple of indexes with @setchapternewpage off). In
- % that case, we must prevent the second \partialpage from
- % simply overwriting the first, causing us to lose the page.
- % This will preserve it until a real output routine can ship it
- % out. Generally, \partialpage will be empty when this runs and
- % this will be a no-op.
- \unvbox\partialpage
+ % that case we just ship out what is in \partialpage with the normal
+ % output routine. Generally, \partialpage will be empty when this
+ % runs and this will be a no-op. See the indexspread.tex test case.
+ \ifvoid\partialpage \else
+ \onepageout{\pagecontents\partialpage}%
+ \fi
%
- % Unvbox the main output page.
- \unvbox255
- \kern-\topskip \kern\baselineskip
- }}%
- \eject
+ \global\setbox\partialpage = \vbox{%
+ % Unvbox the main output page.
+ \unvbox\PAGE
+ \kern-\topskip \kern\baselineskip
+ }%
+ }%
+ \eject % run that output routine to set \partialpage
%
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
@@ -2848,13 +3264,12 @@ width0pt\relax} \fi
%
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
- \advance\vsize by -\ht\partialpage
\vsize = 2\vsize
}
% The double-column output routine for all double-column pages except
% the last.
-%
+%
\def\doublecolumnout{%
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
@@ -2862,6 +3277,7 @@ width0pt\relax} \fi
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
+ \advance\dimen@ by -\ht\partialpage
%
% box0 will be the left-hand column, box2 the right.
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
@@ -2869,19 +3285,21 @@ width0pt\relax} \fi
\unvbox255
\penalty\outputpenalty
}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
\def\pagesofar{%
- % Re-output the contents of the output page -- any previous material,
- % followed by the two boxes we just split, in box0 and box2.
- \advance\vsize by \ht\partialpage
\unvbox\partialpage
%
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize
\hbox to\pagewidth{\box0\hfil\box2}%
}
+%
+% All done with double columns.
\def\enddoublecolumns{%
\output = {%
- % Split the last of the double-column material. Leave on the
+ % Split the last of the double-column material. Leave it on the
% current page, no automatic page break.
\balancecolumns
%
@@ -2893,17 +3311,19 @@ width0pt\relax} \fi
% called on to balance too much material, but if it is, this makes
% the output somewhat more palatable.)
\global\output = {\onepageout{\pagecontents\PAGE}}%
- %
- % \pagegoal was set to the doubled \vsize above, since we restarted
- % the current page. We're now back to normal single-column
- % typesetting, so reset \pagegoal to the normal \vsize.
- \pagegoal = \vsize
}%
\eject
\endgroup % started in \begindoublecolumns
+ %
+ % \pagegoal was set to the doubled \vsize above, since we restarted
+ % the current page. We're now back to normal single-column
+ % typesetting, so reset \pagegoal to the normal \vsize (after the
+ % \endgroup where \vsize got restored).
+ \pagegoal = \vsize
}
+%
+% Called at the end of the double column material.
\def\balancecolumns{%
- % Called at the end of the double column material.
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
@@ -2931,7 +3351,7 @@ width0pt\relax} \fi
\message{sectioning,}
-% Define chapters, sections, etc.
+% Chapters, sections, etc.
\newcount\chapno
\newcount\secno \secno=0
@@ -2940,7 +3360,43 @@ width0pt\relax} \fi
% This counter is funny since it counts through charcodes of letters A, B, ...
\newcount\appendixno \appendixno = `\@
-\def\appendixletter{\char\the\appendixno}
+% \def\appendixletter{\char\the\appendixno}
+% We do the following for the sake of pdftex, which needs the actual
+% letter in the expansion, not just typeset.
+\def\appendixletter{%
+ \ifnum\appendixno=`A A%
+ \else\ifnum\appendixno=`B B%
+ \else\ifnum\appendixno=`C C%
+ \else\ifnum\appendixno=`D D%
+ \else\ifnum\appendixno=`E E%
+ \else\ifnum\appendixno=`F F%
+ \else\ifnum\appendixno=`G G%
+ \else\ifnum\appendixno=`H H%
+ \else\ifnum\appendixno=`I I%
+ \else\ifnum\appendixno=`J J%
+ \else\ifnum\appendixno=`K K%
+ \else\ifnum\appendixno=`L L%
+ \else\ifnum\appendixno=`M M%
+ \else\ifnum\appendixno=`N N%
+ \else\ifnum\appendixno=`O O%
+ \else\ifnum\appendixno=`P P%
+ \else\ifnum\appendixno=`Q Q%
+ \else\ifnum\appendixno=`R R%
+ \else\ifnum\appendixno=`S S%
+ \else\ifnum\appendixno=`T T%
+ \else\ifnum\appendixno=`U U%
+ \else\ifnum\appendixno=`V V%
+ \else\ifnum\appendixno=`W W%
+ \else\ifnum\appendixno=`X X%
+ \else\ifnum\appendixno=`Y Y%
+ \else\ifnum\appendixno=`Z Z%
+ % The \the is necessary, despite appearances, because \appendixletter is
+ % expanded while writing the .toc file. \char\appendixno is not
+ % expandable, thus it is written literally, thus all appendixes come out
+ % with the same letter (or @) in the toc without it.
+ \else\char\the\appendixno
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
% Each @chapter defines this as the name of the chapter.
% page headings and footings can use it. @section does likewise.
@@ -3413,15 +3869,16 @@ width0pt\relax} \fi
\message{toc,}
+% Table of contents.
\newwrite\tocfile
% Write an entry to the toc file, opening it if necessary.
% Called from @chapter, etc. We supply {\folio} at the end of the
% argument, which will end up as the last argument to the \...entry macro.
-%
+%
% We open the .toc file here instead of at @setfilename or any other
% given time so that @contents can be put in the document anywhere.
-%
+%
\newif\iftocfileopened
\def\writetocentry#1{%
\iftocfileopened\else
@@ -3437,7 +3894,7 @@ width0pt\relax} \fi
% Finish up the main text and prepare to read what we've written
% to \tocfile.
-%
+%
\def\startcontents#1{%
% If @setchapternewpage on, and @headings double, the contents should
% start on an odd page, unlike chapters. Thus, we maintain
@@ -3465,13 +3922,15 @@ width0pt\relax} \fi
% Normal (long) toc.
\def\contents{%
- \startcontents{\putwordTableofContents}%
+ \startcontents{\putwordTOC}%
\openin 1 \jobname.toc
\ifeof 1 \else
\closein 1
\input \jobname.toc
\fi
\vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \pdfmakeoutlines
\endgroup
\lastnegativepageno = \pageno
\pageno = \savepageno
@@ -3479,7 +3938,7 @@ width0pt\relax} \fi
% And just the chapters.
\def\summarycontents{%
- \startcontents{\putwordShortContents}%
+ \startcontents{\putwordShortTOC}%
%
\let\chapentry = \shortchapentry
\let\unnumbchapentry = \shortunnumberedentry
@@ -3501,12 +3960,17 @@ width0pt\relax} \fi
\input \jobname.toc
\fi
\vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
\endgroup
\lastnegativepageno = \pageno
\pageno = \savepageno
}
\let\shortcontents = \summarycontents
+\ifpdf
+ \pdfcatalog{/PageMode /UseOutlines}%
+\fi
+
% These macros generate individual entries in the table of contents.
% The first argument is the chapter or section name.
% The last argument is the page number.
@@ -3517,7 +3981,7 @@ width0pt\relax} \fi
% See comments in \dochapentry re vbox and related settings
\def\shortchapentry#1#2#3{%
- \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
}
% Typeset the label for a chapter or appendix for the short contents.
@@ -3525,10 +3989,14 @@ width0pt\relax} \fi
% We could simplify the code here by writing out an \appendixentry
% command in the toc file for appendices, instead of using \chapentry
% for both, but it doesn't seem worth it.
-\setbox0 = \hbox{\shortcontrm \putwordAppendix }
-\newdimen\shortappendixwidth \shortappendixwidth = \wd0
-
+%
+\newdimen\shortappendixwidth
+%
\def\shortchaplabel#1{%
+ % Compute width of word "Appendix", may change with language.
+ \setbox0 = \hbox{\shortcontrm \putwordAppendix}%
+ \shortappendixwidth = \wd0
+ %
% We typeset #1 in a box of constant width, regardless of the text of
% #1, so the chapter titles will come out aligned.
\setbox0 = \hbox{#1}%
@@ -3543,7 +4011,7 @@ width0pt\relax} \fi
}
\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
-\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
+\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
% Sections.
\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
@@ -3570,24 +4038,24 @@ width0pt\relax} \fi
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
\chapentryfonts
- \tocentry{#1}{\dopageno{#2}}%
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup
\nobreak\vskip .25\baselineskip plus.1\baselineskip
}
\def\dosecentry#1#2{\begingroup
\secentryfonts \leftskip=\tocindent
- \tocentry{#1}{\dopageno{#2}}%
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
\def\dosubsecentry#1#2{\begingroup
\subsecentryfonts \leftskip=2\tocindent
- \tocentry{#1}{\dopageno{#2}}%
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
\def\dosubsubsecentry#1#2{\begingroup
\subsubsecentryfonts \leftskip=3\tocindent
- \tocentry{#1}{\dopageno{#2}}%
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
% Final typesetting of a toc entry; we use the same \entry macro as for
@@ -3615,6 +4083,7 @@ width0pt\relax} \fi
\message{environments,}
+% @foo ... @end foo.
% Since these characters are used in examples, it should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
@@ -3730,9 +4199,17 @@ width0pt\relax} \fi
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
% start of the next paragraph will insert \parskip
%
-\def\aboveenvbreak{{\advance\envskipamount by \parskip
-\endgraf \ifdim\lastskip<\envskipamount
-\removelastskip \penalty-50 \vskip\envskipamount \fi}}
+\def\aboveenvbreak{{%
+ \ifnum\lastpenalty < 10000
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
+ \penalty-50
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
\let\afterenvbreak = \aboveenvbreak
@@ -3825,7 +4302,7 @@ width0pt\relax} \fi
% Define the \E... control sequence only if we are inside the particular
% environment, so the error checking in \end will work.
-%
+%
% To end an @example-like environment, we first end the paragraph (via
% \afterenvbreak's vertical glue), and then the group. That way we keep
% the zero \parskip that the environments set -- \parskip glue will be
@@ -3850,7 +4327,7 @@ width0pt\relax} \fi
% redefines). We must call \example (or whatever) last in the
% definition, since it reads the return following the @example (or
% whatever) command.
-%
+%
% This actually allows (for example) @end display inside an
% @smalldisplay. Too bad, but makeinfo will catch the error anyway.
%
@@ -3864,7 +4341,7 @@ width0pt\relax} \fi
\def\smalllispx{\begingroup
\def\Esmalllisp{\nonfillfinish\endgroup}%
\def\Esmallexample{\nonfillfinish\endgroup}%
- \indexfonts
+ \smallexamplefonts
\lisp
}
@@ -3875,12 +4352,12 @@ width0pt\relax} \fi
\let\Edisplay = \nonfillfinish
\gobble
}
-
+%
% @smalldisplay (when @smallbook): @display plus smaller fonts.
%
\def\smalldisplayx{\begingroup
\def\Esmalldisplay{\nonfillfinish\endgroup}%
- \indexfonts \rm
+ \smallexamplefonts \rm
\display
}
@@ -3892,12 +4369,12 @@ width0pt\relax} \fi
\let\Eformat = \nonfillfinish
\gobble
}
-
+%
% @smallformat (when @smallbook): @format plus smaller fonts.
%
\def\smallformatx{\begingroup
\def\Esmallformat{\nonfillfinish\endgroup}%
- \indexfonts \rm
+ \smallexamplefonts \rm
\format
}
@@ -3906,7 +4383,7 @@ width0pt\relax} \fi
\def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format}
% @flushright.
-%
+%
\def\flushright{\begingroup
\let\nonarrowing = t
\nonfillstart
@@ -3915,6 +4392,7 @@ width0pt\relax} \fi
\gobble
}
+
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins.
%
@@ -3937,9 +4415,162 @@ width0pt\relax} \fi
}
+% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> as delimiter,
+% we need the curly braces so that makeinfo sees the @verb command, eg:
+% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
+%
+% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
+%
+% [Knuth] p. 344; only we need to do '@' too
+\def\dospecials{%
+ \do\ \do\\\do\@\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
+%
+% [Knuth] p. 380
+\def\uncatcodespecials{%
+ \def\do##1{\catcode`##1=12}\dospecials}
+%
+% [Knuth] pp. 380,381,391
+% Disable Spanish ligatures ?` and !` of \tt font
+\begingroup
+ \catcode`\`=\active\gdef`{\relax\lq}
+\endgroup
+%
+% Setup for the @verb command.
+%
+% Eight spaces for a tab
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
+\endgroup
+%
+\def\setupverb{%
+ \tt % easiest (and conventionally used) font for verbatim
+ \def\par{\leavevmode\endgraf}%
+ \catcode`\`=\active
+ \tabeightspaces
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+}
+
+% Setup for the @verbatim environment
+%
+% Real tab expansion
+\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
+%
+\def\starttabbox{\setbox0=\hbox\bgroup}
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabexpand{%
+ \catcode`\^^I=\active
+ \def^^I{\leavevmode\egroup
+ \dimen0=\wd0 % the width so far, or since the previous tab
+ \divide\dimen0 by\tabw
+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw
+ \advance\dimen0 by\tabw % advance to next multiple of \tabw
+ \wd0=\dimen0 \box0 \starttabbox
+ }%
+ }
+\endgroup
+\def\setupverbatim{%
+ % Easiest (and conventionally used) font for verbatim
+ \tt
+ \def\par{\leavevmode\egroup\box0\endgraf}%
+ \catcode`\`=\active
+ \tabexpand
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+ \everypar{\starttabbox}%
+}
+
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters. Before first delimiter expect a
+% right brace, after last delimiter expect closing brace:
+%
+% \def\doverb'{'<char>#1<char>'}'{#1}
+%
+% [Knuth] p. 382; only eat outer {}
+\begingroup
+ \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12
+ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
+\endgroup
+%
+\def\verb{\begingroup\setupverb\doverb}
+%
+%
+% Do the @verbatim magic: define the macro \doverbatim so that
+% the (first) argument ends when '@end verbatim' is reached, ie:
+%
+% \def\doverbatim#1@end verbatim{#1}
+%
+% For Texinfo it's a lot easier than for LaTeX,
+% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
+% we need not redefine '\', '{' and '}'
+%
+% Inspired by LaTeX's verbatim command set [latex.ltx]
+%% Include LaTeX hack for completeness -- never know
+%% \begingroup
+%% \catcode`|=0 \catcode`[=1
+%% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active
+%% \catcode`\\=12|gdef|doverbatim#1@end verbatim[
+%% #1|endgroup|def|Everbatim[]|end[verbatim]]
+%% |endgroup
+\begingroup
+ \catcode`\ =\active
+ \gdef\doverbatim#1@end verbatim{#1\end{verbatim}}
+\endgroup
+%
+\def\verbatim{%
+ \def\Everbatim{\nonfillfinish\endgroup}%
+ \begingroup
+ \nonfillstart
+ \advance\leftskip by -\defbodyindent
+ \begingroup\setupverbatim\doverbatim
+}
+
+% @verbatiminclude FILE - insert text of file in verbatim environment.
+%
+% Allow normal characters that we make active in the argument (a file name).
+\def\verbatiminclude{%
+ \begingroup
+ \catcode`\\=12
+ \catcode`~=12
+ \catcode`^=12
+ \catcode`_=12
+ \catcode`|=12
+ \catcode`<=12
+ \catcode`>=12
+ \catcode`+=12
+ \parsearg\doverbatiminclude
+}
+\def\setupverbatiminclude{%
+ \begingroup
+ \nonfillstart
+ \advance\leftskip by -\defbodyindent
+ \begingroup\setupverbatim
+}
+%
+\def\doverbatiminclude#1{%
+ % Restore active chars for included file.
+ \endgroup
+ \begingroup
+ \def\thisfile{#1}%
+ \expandafter\expandafter\setupverbatiminclude\input\thisfile
+ \endgroup\nonfillfinish\endgroup
+}
+
+
\message{defuns,}
-% Define formatter for defuns
-% First, allow user to change definition object font (\df) internally
+% @defun etc.
+
+% Allow user to change definition object font (\df) internally
\def\setdeffont #1 {\csname DEF#1\endcsname}
\newskip\defbodyindent \defbodyindent=.4in
@@ -3993,10 +4624,16 @@ width0pt\relax} \fi
%% contained text. This is especially needed for [ and ]
\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
-\def\ampnr{\&}
+\let\ampnr = \&
\def\lbrb{{\bf\char`\[}}
\def\rbrb{{\bf\char`\]}}
+% Active &'s sneak into the index arguments, so make sure it's defined.
+{
+ \catcode`& = 13
+ \global\let& = \ampnr
+}
+
% First, defname, which formats the header line itself.
% #1 should be the function name.
% #2 should be the type of definition, such as "Function".
@@ -4048,7 +4685,7 @@ width0pt\relax} \fi
% #2 is the \...x control sequence for consecutive fns (which we define).
% #3 is the control sequence to call to resume processing.
% #4, delimited by the space, is the class name.
-%
+%
\def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
\medbreak %
% Define the end token that this defining construct specifies
@@ -4060,23 +4697,39 @@ width0pt\relax} \fi
\exdentamount=\defbodyindent
\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
-% @deftypemethod has an extra argument that nothing else does. Sigh.
+% Used for @deftypemethod and @deftypeivar.
% #1 is the \E... control sequence to end the definition (which we define).
% #2 is the \...x control sequence for consecutive fns (which we define).
% #3 is the control sequence to call to resume processing.
-% #4, delimited by the space, is the class name.
+% #4, delimited by a space, is the class name.
% #5 is the method's return type.
+%
+\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV
+ \medbreak
+ \def#1{\endgraf\endgroup\medbreak}%
+ \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+ \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
+
+% Used for @deftypeop. The change from \deftypemethparsebody is an
+% extra argument at the beginning which is the `category', instead of it
+% being the hardwired string `Method' or `Instance Variable'. We have
+% to account for this both in the \...x definition and in parsing the
+% input at hand. Thus also need a control sequence (passed as #5) for
+% the \E... definition to assign the category name to.
%
-\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
+\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV
+ \medbreak
+ \def#1{\endgraf\endgroup\medbreak}%
+ \def#2##1 ##2 ##3 {%
+ \def#4{##1}%
+ \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+ \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}}
\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
\medbreak %
@@ -4187,12 +4840,13 @@ width0pt\relax} \fi
% First, define the processing that is wanted for arguments of \defun
% Use this to expand the args and terminate the paragraph they make up
-\def\defunargs #1{\functionparens \sl
+\def\defunargs#1{\functionparens \sl
% Expand, preventing hyphenation at `-' chars.
% Note that groups don't affect changes in \hyphenchar.
-\hyphenchar\tensl=0
+% Set the font temporarily and use \font in case \setfont made \tensl a macro.
+{\tensl\hyphenchar\font=0}%
#1%
-\hyphenchar\tensl=45
+{\tensl\hyphenchar\font=45}%
\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
\interlinepenalty=10000
\advance\rightskip by 0pt plus 1fil
@@ -4226,7 +4880,7 @@ width0pt\relax} \fi
\def\defun{\defparsebody\Edefun\defunx\defunheader}
\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
-\begingroup\defname {#1}{Function}%
+\begingroup\defname {#1}{\putwordDeffunc}%
\defunargs {#2}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4240,7 +4894,7 @@ width0pt\relax} \fi
% #1 is the data type, #2 the name, #3 the args.
\def\deftypefunheaderx #1#2 #3\relax{%
\doind {fn}{\code{#2}}% Make entry in function index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}%
+\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}%
\deftypefunargs {#3}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4271,7 +4925,7 @@ width0pt\relax} \fi
\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
-\begingroup\defname {#1}{Macro}%
+\begingroup\defname {#1}{\putwordDefmac}%
\defunargs {#2}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4281,36 +4935,39 @@ width0pt\relax} \fi
\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
-\begingroup\defname {#1}{Special Form}%
+\begingroup\defname {#1}{\putwordDefspec}%
\defunargs {#2}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
-% This definition is run if you use @defunx
-% anywhere other than immediately after a @defun or @defunx.
-
-\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
-\def\defunx #1 {\errmessage{@defunx in invalid context}}
-\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
-\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
-\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
-\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
-\def\deftypefunx #1 {\errmessage{@deftypefunx in invalid context}}
-
-% @defmethod, and so on
-
% @defop CATEGORY CLASS OPERATION ARG...
-
+%
\def\defop #1 {\def\defoptype{#1}%
\defopparsebody\Edefop\defopx\defopheader\defoptype}
-
-\def\defopheader #1#2#3{%
+%
+\def\defopheader#1#2#3{%
\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
-\begingroup\defname {#2}{\defoptype{} on #1}%
+\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}%
\defunargs {#3}\endgroup %
}
-% @deftypemethod CLASS RETURN-TYPE METHOD ARG...
+% @deftypeop CATEGORY CLASS TYPE OPERATION ARG...
+%
+\def\deftypeop #1 {\def\deftypeopcategory{#1}%
+ \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader
+ \deftypeopcategory}
+%
+% #1 is the class name, #2 the data type, #3 the operation name, #4 the args.
+\def\deftypeopheader#1#2#3#4{%
+ \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
+ \begingroup
+ \defname{\defheaderxcond#2\relax$$$#3}
+ {\deftypeopcategory\ \putwordon\ \code{#1}}%
+ \deftypefunargs{#4}%
+ \endgroup
+}
+
+% @deftypemethod CLASS TYPE METHOD ARG...
%
\def\deftypemethod{%
\deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
@@ -4324,6 +4981,21 @@ width0pt\relax} \fi
\endgroup
}
+% @deftypeivar CLASS TYPE VARNAME
+%
+\def\deftypeivar{%
+ \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader}
+%
+% #1 is the class name, #2 the data type, #3 the variable name.
+\def\deftypeivarheader#1#2#3{%
+ \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
+ \begingroup
+ \defname{\defheaderxcond#2\relax$$$#3}
+ {\putwordInstanceVariableof\ \code{#1}}%
+ \defvarargs{#3}%
+ \endgroup
+}
+
% @defmethod == @defop Method
%
\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
@@ -4343,31 +5015,24 @@ width0pt\relax} \fi
\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
\def\defcvarheader #1#2#3{%
-\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
-\begingroup\defname {#2}{\defcvtype{} of #1}%
+\dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index
+\begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}%
\defvarargs {#3}\endgroup %
}
-% @defivar == @defcv {Instance Variable}
-
+% @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME
+%
\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
-
-\def\defivarheader #1#2#3{%
-\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
-\begingroup\defname {#2}{Instance Variable of #1}%
-\defvarargs {#3}\endgroup %
+%
+\def\defivarheader#1#2#3{%
+ \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index
+ \begingroup
+ \defname{#2}{\putwordInstanceVariableof\ #1}%
+ \defvarargs{#3}%
+ \endgroup
}
-% These definitions are run if you use @defmethodx, etc.,
-% anywhere other than immediately after a @defmethod, etc.
-
-\def\defopx #1 {\errmessage{@defopx in invalid context}}
-\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
-\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
-\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
-
-% Now @defvar
-
+% @defvar
% First, define the processing that is wanted for arguments of @defvar.
% This is actually simple: just print them in roman.
% This must expand the args and terminate the paragraph they make up
@@ -4387,7 +5052,7 @@ width0pt\relax} \fi
\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
-\begingroup\defname {#1}{Variable}%
+\begingroup\defname {#1}{\putwordDefvar}%
\defvarargs {#2}\endgroup %
}
@@ -4396,7 +5061,7 @@ width0pt\relax} \fi
\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
-\begingroup\defname {#1}{User Option}%
+\begingroup\defname {#1}{\putwordDefopt}%
\defvarargs {#2}\endgroup %
}
@@ -4408,7 +5073,7 @@ width0pt\relax} \fi
% is actually part of the data type, which should not be put into the index.
\def\deftypevarheader #1#2{%
\dovarind#2 \relax% Make entry in variables index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
+\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}%
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@@ -4424,15 +5089,6 @@ width0pt\relax} \fi
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
-% This definition is run if you use @defvarx
-% anywhere other than immediately after a @defvar or @defvarx.
-
-\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
-\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
-\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
-\def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}}
-\def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}}
-
% Now define @deftp
% Args are printed in bold, a slight difference from @defvar.
@@ -4445,23 +5101,45 @@ width0pt\relax} \fi
\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
-% This definition is run if you use @deftpx, etc
-% anywhere other than immediately after a @deftp, etc.
-
-\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
+% These definitions are used if you use @defunx (etc.)
+% anywhere other than immediately after a @defun or @defunx.
+%
+\def\defcvx#1 {\errmessage{@defcvx in invalid context}}
+\def\deffnx#1 {\errmessage{@deffnx in invalid context}}
+\def\defivarx#1 {\errmessage{@defivarx in invalid context}}
+\def\defmacx#1 {\errmessage{@defmacx in invalid context}}
+\def\defmethodx#1 {\errmessage{@defmethodx in invalid context}}
+\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
+\def\defopx#1 {\errmessage{@defopx in invalid context}}
+\def\defspecx#1 {\errmessage{@defspecx in invalid context}}
+\def\deftpx#1 {\errmessage{@deftpx in invalid context}}
+\def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}}
+\def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}}
+\def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}}
+\def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}}
+\def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}}
+\def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}}
+\def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}}
+\def\defunx#1 {\errmessage{@defunx in invalid context}}
+\def\defvarx#1 {\errmessage{@defvarx in invalid context}}
+\def\defvrx#1 {\errmessage{@defvrx in invalid context}}
\message{macros,}
% @macro.
-% To do this right we need a feature of e-TeX, \scantokens,
+% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
\ifx\eTeXversion\undefined
\newwrite\macscribble
\def\scanmacro#1{%
\begingroup \newlinechar`\^^M
+ % Undo catcode changes of \startcontents and \doprintindex
+ \catcode`\@=0 \catcode`\\=12 \escapechar=`\@
+ % Append \endinput to make sure that TeX does not see the ending newline.
+ \toks0={#1\endinput}%
\immediate\openout\macscribble=\jobname.tmp
- \immediate\write\macscribble{#1}%
+ \immediate\write\macscribble{\the\toks0}%
\immediate\closeout\macscribble
\let\xeatspaces\eatspaces
\input \jobname.tmp
@@ -4470,12 +5148,16 @@ width0pt\relax} \fi
\else
\def\scanmacro#1{%
\begingroup \newlinechar`\^^M
-\let\xeatspaces\eatspaces\scantokens{#1}\endgroup}
+% Undo catcode changes of \startcontents and \doprintindex
+\catcode`\@=0 \catcode`\\=12 \escapechar=`\@
+\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup}
\fi
\newcount\paramno % Count of parameters
\newtoks\macname % Macro name
\newif\ifrecursive % Is it recursive?
+\def\macrolist{} % List of all defined macros in the form
+ % \do\macro1\do\macro2...
% Utility routines.
% Thisdoes \let #1 = #2, except with \csnames.
@@ -4507,8 +5189,8 @@ width0pt\relax} \fi
% all characters are catcode 10, 11 or 12, except \ which is active
% (as in normal texinfo). It is necessary to change the definition of \.
-% It's necessary to have hard CRs when the macro is executed. This is
-% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% It's necessary to have hard CRs when the macro is executed. This is
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
\def\macrobodyctxt{%
@@ -4537,7 +5219,7 @@ width0pt\relax} \fi
\catcode`\\=12}
% \mbodybackslash is the definition of \ in @macro bodies.
-% It maps \foo\ => \csname macarg.foo\endcsname => #N
+% It maps \foo\ => \csname macarg.foo\endcsname => #N
% where N is the macro parameter number.
% We define \csname macarg.\endcsname to be \realbackslash, so
% \\ in macro replacement text gets you a backslash.
@@ -4556,25 +5238,48 @@ width0pt\relax} \fi
\ifx\argl\empty % no arguments
\paramno=0%
\else
- \expandafter\parsemargdef \argl;%
+ \expandafter\parsemargdef \argl;%
\fi
- \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
- \cslet{macsave.\the\macname}{\the\macname}%
- \else
+ \if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
+ \else
+ \expandafter\ifx\csname \the\macname\endcsname \relax
+ \else \errmessage{The name \the\macname\space is reserved}\fi
+ \global\cslet{macsave.\the\macname}{\the\macname}%
+ \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
+ % Add the macroname to \macrolist
+ \toks0 = \expandafter{\macrolist\do}%
+ \xdef\macrolist{\the\toks0
+ \expandafter\noexpand\csname\the\macname\endcsname}%
\fi
\begingroup \macrobodyctxt
\ifrecursive \expandafter\parsermacbody
- \else \expandafter\parsemacbody
+ \else \expandafter\parsemacbody
\fi}
\def\unmacro{\parsearg\unmacroxxx}
\def\unmacroxxx#1{%
- \expandafter\ifx \csname macsave.\the\macname\endcsname \relax
- \errmessage{Macro \the\macname\ not defined.}%
+ \if1\csname ismacro.#1\endcsname
+ \global\cslet{#1}{macsave.#1}%
+ \global\expandafter\let \csname ismacro.#1\endcsname=0%
+ % Remove the macro name from \macrolist
+ \begingroup
+ \edef\tempa{\expandafter\noexpand\csname#1\endcsname}%
+ \def\do##1{%
+ \def\tempb{##1}%
+ \ifx\tempa\tempb
+ % remove this
+ \else
+ \toks0 = \expandafter{\newmacrolist\do}%
+ \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}%
+ \fi}%
+ \def\newmacrolist{}%
+ % Execute macro list to define \newmacrolist
+ \macrolist
+ \global\let\macrolist\newmacrolist
+ \endgroup
\else
- \cslet{#1}{macsave.#1}%
- \expandafter\let \csname macsave.\the\macname\endcsname \undefined
+ \errmessage{Macro #1 not defined}%
\fi
}
@@ -4633,19 +5338,20 @@ width0pt\relax} \fi
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
- \noexpand\braceorline\csname\the\macname xxx\endcsname}%
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
\else % many
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}
+ \noexpand\csname\the\macname xx\endcsname}%
\expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
- \csname\the\macname xxx\endcsname
+ \csname\the\macname xxx\endcsname
\paramlist{\egroup\noexpand\scanmacro{\temp}}%
\fi
\else
@@ -4657,7 +5363,8 @@ width0pt\relax} \fi
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
- \noexpand\braceorline\csname\the\macname xxx\endcsname}%
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup
\noexpand\norecurse{\the\macname}%
@@ -4665,9 +5372,9 @@ width0pt\relax} \fi
\else % many
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
\expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
@@ -4688,11 +5395,29 @@ width0pt\relax} \fi
\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
- \expandafter\parsearg
+ \expandafter\parsearg
\fi \next}
+% We mant to disable all macros during \shipout so that they are not
+% expanded by \write.
+\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
+ \edef\next{\macrolist}\expandafter\endgroup\next}
+
+
+% @alias.
+% We need some trickery to remove the optional spaces around the equal
+% sign. Just make them active and then expand them all to nothing.
+\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx}
+\def\aliasxxx #1{\aliasyyy#1\relax}
+\def\aliasyyy #1=#2\relax{\ignoreactivespaces
+\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=%
+ \expandafter\noexpand\csname#2\endcsname}%
+\expandafter\endgroup\next}
+
\message{cross references,}
+% @xref etc.
+
\newwrite\auxfile
\newif\ifhavexrefs % True if xref values are known.
@@ -4734,21 +5459,24 @@ width0pt\relax} \fi
% @anchor{NAME} -- define xref target at arbitrary point.
-%
-\def\anchor#1{\setref{#1}{Ynothing}}
-
+%
+\newcount\savesfregister
+\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
+\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
+\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
% to set \indexdummies so commands such as @code in a section title
% aren't expanded. It would be nicer not to expand the titles in the
% first place, but there's so many layers that that is hard to do.
-%
+%
\def\setref#1#2{{%
\indexdummies
+ \pdfmkdest{#1}%
\dosetq{#1-title}{Ytitle}%
\dosetq{#1-pg}{Ypagenumber}%
- \dosetq{#1-snt}{#2}
+ \dosetq{#1-snt}{#2}%
}}
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
@@ -4760,6 +5488,7 @@ width0pt\relax} \fi
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+ \unsepspaces
\def\printedmanual{\ignorespaces #5}%
\def\printednodename{\ignorespaces #3}%
\setbox1=\hbox{\printedmanual}%
@@ -4793,8 +5522,23 @@ width0pt\relax} \fi
% are best written with fairly long node names, containing hyphens, this
% is a loss. Therefore, we give the text of the node name again, so it
% is as if TeX is seeing it for the first time.
+ \ifpdf
+ \leavevmode
+ \getfilename{#4}%
+ {\normalturnoffactive
+ \ifnum\filenamelength>0
+ \startlink attr{/Border [0 0 0]}%
+ goto file{\the\filename.pdf} name{#1}%
+ \else
+ \startlink attr{/Border [0 0 0]}%
+ goto name{#1}%
+ \fi
+ }%
+ \linkcolor
+ \fi
+ %
\ifdim \wd1 > 0pt
- \putwordsection{} ``\printednodename'' in \cite{\printedmanual}%
+ \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}%
\else
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
@@ -4807,11 +5551,12 @@ width0pt\relax} \fi
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
- % [mynode],
+ % [mynode],
[\printednodename],\space
% page 3
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi
+ \endlink
\endgroup}
% \dosetq is the interface for calls from other macros
@@ -4819,7 +5564,7 @@ width0pt\relax} \fi
% Use \normalturnoffactive so that punctuation chars such as underscore
% and backslash work in node names. (\turnoffactive doesn't do \.)
\def\dosetq#1#2{%
- {\let\folio=0
+ {\let\folio=0%
\normalturnoffactive
\edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
\iflinks
@@ -4896,7 +5641,7 @@ width0pt\relax} \fi
}
% This is the macro invoked by entries in the aux file.
-%
+%
\def\xrdef#1{\begingroup
% Reenable \ as an escape while reading the second argument.
\catcode`\\ = 0
@@ -5048,6 +5793,8 @@ width0pt\relax} \fi
\xspaceskip\z@skip
\parindent\defaultparindent
%
+ \smallfonts \rm
+ %
% Hang the footnote text off the number.
\hang
\textindent{\thisfootno}%
@@ -5062,28 +5809,10 @@ width0pt\relax} \fi
\else\let\next\f@t\fi \next}
\def\f@@t{\bgroup\aftergroup\@foot\let\next}
\def\f@t#1{#1\@foot}
-\def\@foot{\strut\egroup}
+\def\@foot{\strut\par\egroup}
}%end \catcode `\@=11
-% Set the baselineskip to #1, and the lineskip and strut size
-% correspondingly. There is no deep meaning behind these magic numbers
-% used as factors; they just match (closely enough) what Knuth defined.
-%
-\def\lineskipfactor{.08333}
-\def\strutheightpercent{.70833}
-\def\strutdepthpercent {.29167}
-%
-\def\setleading#1{%
- \normalbaselineskip = #1\relax
- \normallineskip = \lineskipfactor\normalbaselineskip
- \normalbaselines
- \setbox\strutbox =\hbox{%
- \vrule width0pt height\strutheightpercent\baselineskip
- depth \strutdepthpercent \baselineskip
- }%
-}
-
% @| inserts a changebar to the left of the current line. It should
% surround any changed text. This approach does *not* work if the
% change spans more than two lines of output. To handle that, we would
@@ -5121,7 +5850,7 @@ width0pt\relax} \fi
% @image. We use the macros from epsf.tex to support this.
% If epsf.tex is not installed and @image is used, we complain.
-%
+%
% Check for and read epsf.tex up front. If we read it only at @image
% time, we might be inside a group, and then its definitions would get
% undone and the next image would fail.
@@ -5134,12 +5863,12 @@ width0pt\relax} \fi
\input epsf.tex
\fi
%
+% We will only complain once about lack of epsf.tex.
\newif\ifwarnednoepsf
\newhelp\noepsfhelp{epsf.tex must be installed for images to
work. It is also included in the Texinfo distribution, or you can get
- it from ftp://ftp.tug.org/tex/epsf.tex.}
+ it from ftp://tug.org/tex/epsf.tex.}
%
-% Only complain once about lack of epsf.tex.
\def\image#1{%
\ifx\epsfbox\undefined
\ifwarnednoepsf \else
@@ -5155,26 +5884,73 @@ width0pt\relax} \fi
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
% #2 is (optional) width, #3 is (optional) height.
-% #4 is just the usual extra ignored arg for parsing this stuff.
-\def\imagexxx#1,#2,#3,#4\finish{%
- % \epsfbox itself resets \epsf?size at each figure.
- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
- \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
- % If the image is by itself, center it.
- \ifvmode
- \nobreak\medskip
- \nobreak
- \centerline{\epsfbox{#1.eps}}%
- \bigbreak
+% #4 is (ignored optional) html alt text.
+% #5 is (ignored optional) extension.
+% #6 is just the usual extra ignored arg for parsing this stuff.
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
+ \ifpdf
+ \centerline{\dopdfimage{#1}{#2}{#3}}%
\else
- \epsfbox{#1.eps}%
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \begingroup
+ \catcode`\^^M = 5 % in case we're inside an example
+ \normalturnoffactive % allow _ et al. in names
+ % If the image is by itself, center it.
+ \ifvmode
+ \nobreak\bigskip
+ % Usually we'll have text after the image which will insert
+ % \parskip glue, so insert it here too to equalize the space
+ % above and below.
+ \nobreak\vskip\parskip
+ \nobreak
+ \centerline{\epsfbox{#1.eps}}%
+ \bigbreak
+ \else
+ % In the middle of a paragraph, no extra space.
+ \epsfbox{#1.eps}%
+ \fi
+ \endgroup
+ \fi
+}
+
+
+\message{localization,}
+% and i18n.
+
+% @documentlanguage is usually given very early, just after
+% @setfilename. If done too late, it may not override everything
+% properly. Single argument is the language abbreviation.
+% It would be nice if we could set up a hyphenation file here.
+%
+\def\documentlanguage{\parsearg\dodocumentlanguage}
+\def\dodocumentlanguage#1{%
+ \tex % read txi-??.tex file in plain TeX.
+ % Read the file if it exists.
+ \openin 1 txi-#1.tex
+ \ifeof1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \let\temp = \relax
+ \else
+ \def\temp{\input txi-#1.tex }%
\fi
+ \temp
+ \endgroup
}
+\newhelp\nolanghelp{The given language definition file cannot be found or
+is empty. Maybe you need to install it? In the current directory
+should work if nowhere else does.}
+
+% @documentencoding should change something in TeX eventually, most
+% likely, but for now just recognize it.
+\let\documentencoding = \comment
-\message{paper sizes,}
-% And other related parameters.
+% Page size parameters.
+%
\newdimen\defaultparindent \defaultparindent = 15pt
\chapheadingskip = 15pt plus 4pt minus 2pt
@@ -5194,22 +5970,21 @@ width0pt\relax} \fi
% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
% using an old version of TeX, don't do anything. We want the amount of
% stretch added to depend on the line length, hence the dependence on
-% \hsize. This makes it come to about 9pt for the 8.5x11 format. We
-% call this whenever the paper size is set.
+% \hsize. We call this whenever the paper size is set.
%
\def\setemergencystretch{%
\ifx\emergencystretch\thisisundefined
% Allow us to assign to \emergencystretch anyway.
\def\emergencystretch{\dimen0}%
\else
- \emergencystretch = \hsize
- \divide\emergencystretch by 45
+ \emergencystretch = .15\hsize
\fi
}
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
-% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
-% set \parskip and call \setleading for \baselineskip.
+% 4) hoffset; 5) binding offset; 6) topskip. We also call
+% \setleading{\textleading}, so the caller should define \textleading.
+% The caller should also set \parskip.
%
\def\internalpagesizes#1#2#3#4#5#6{%
\voffset = #3\relax
@@ -5230,14 +6005,25 @@ width0pt\relax} \fi
\normaloffset = #4\relax
\bindingoffset = #5\relax
%
+ \setleading{\textleading}
+ %
\parindent = \defaultparindent
\setemergencystretch
}
+% Use `small' versions.
+%
+\def\smallenvironments{%
+ \let\smalldisplay = \smalldisplayx
+ \let\smallexample = \smalllispx
+ \let\smallformat = \smallformatx
+ \let\smalllisp = \smalllispx
+}
+
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
- \setleading{13.2pt}%
+ \textleading = 13.2pt
%
% If page is nothing but text, make it come out even.
\internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
@@ -5246,7 +6032,7 @@ width0pt\relax} \fi
% Use @smallbook to reset parameters for 7x9.5 (or so) format.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
- \setleading{12pt}%
+ \textleading = 12pt
%
\internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
%
@@ -5256,17 +6042,13 @@ width0pt\relax} \fi
\contentsrightmargin = 0pt
\deftypemargin = 0pt
\defbodyindent = .5cm
- %
- \let\smalldisplay = \smalldisplayx
- \let\smallexample = \smalllispx
- \let\smallformat = \smallformatx
- \let\smalllisp = \smalllispx
+ \smallenvironments
}}
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
- \setleading{12pt}%
\parskip = 3pt plus 2pt minus 1pt
+ \textleading = 12pt
%
\internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
%
@@ -5274,29 +6056,45 @@ width0pt\relax} \fi
\hfuzz = 1pt
}}
+% Use @afivepaper to print on European A5 paper.
+% From romildo@urano.iceb.ufop.br, 2 July 2000.
+% He also recommends making @example and @lisp be small.
+\def\afivepaper{{\globaldefs = 1
+ \parskip = 2pt plus 1pt minus 0.1pt
+ \textleading = 12.5pt
+ %
+ \internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
+ %
+ \lispnarrowing = 0.2in
+ \tolerance = 800
+ \hfuzz = 1.2pt
+ \contentsrightmargin = 0mm
+ \deftypemargin = 0pt
+ \defbodyindent = 2mm
+ \tableindent = 12mm
+ %
+ \smallenvironments
+}}
+
% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
\def\afourlatex{{\globaldefs = 1
- \setleading{13.6pt}%
+ \textleading = 13.6pt
%
\afourpaper
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
- %
- \globaldefs = 0
}}
% Use @afourwide to print on European A4 paper in wide format.
\def\afourwide{%
\afourpaper
- \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
- %
- \globaldefs = 0
+ \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
}
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
% Perhaps we should allow setting the margins, \topskip, \parskip,
% and/or leading, also. Or perhaps we should compute them somehow.
-%
+%
\def\pagesizes{\parsearg\pagesizesxxx}
\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
\def\pagesizesyyy#1,#2,#3\finish{{%
@@ -5304,15 +6102,16 @@ width0pt\relax} \fi
\globaldefs = 1
%
\parskip = 3pt plus 2pt minus 1pt
- \setleading{13.2pt}%
+ \setleading{\textleading}%
%
\internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
}}
% Set default to letter.
-%
+%
\letterpaper
+
\message{and turning on texinfo input format.}
% Define macros to output various characters with catcode for normal text.
@@ -5324,6 +6123,7 @@ width0pt\relax} \fi
\catcode`\<=\other
\catcode`\>=\other
\catcode`\+=\other
+\catcode`\$=\other
\def\normaldoublequote{"}
\def\normaltilde{~}
\def\normalcaret{^}
@@ -5332,6 +6132,7 @@ width0pt\relax} \fi
\def\normalless{<}
\def\normalgreater{>}
\def\normalplus{+}
+\def\normaldollar{$}
% This macro is used to make a character print one way in ttfont
% where it can probably just be output, and another way in other fonts,
@@ -5342,7 +6143,13 @@ width0pt\relax} \fi
% interword stretch (and shrink), and it is reasonable to expect all
% typewriter fonts to have this, we can check that font parameter.
%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
% Turn off all special characters except @
% (and those which the user can use as if they were ordinary).
@@ -5373,6 +6180,8 @@ width0pt\relax} \fi
\def>{{\tt \gtr}}
\catcode`\+=\active
\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}
%\catcode 27=\active
%\def^^[{$\diamondsuit$}
@@ -5403,9 +6212,6 @@ width0pt\relax} \fi
% \normalbackslash outputs one backslash in fixed width font.
\def\normalbackslash{{\tt\rawbackslashxx}}
-% Say @foo, not \foo, in error messages.
-\escapechar=`\@
-
% \catcode 17=0 % Define control-q
\catcode`\\=\active
@@ -5419,7 +6225,8 @@ width0pt\relax} \fi
@let|=@normalverticalbar
@let<=@normalless
@let>=@normalgreater
-@let+=@normalplus}
+@let+=@normalplus
+@let$=@normaldollar}
@def@normalturnoffactive{@let"=@normaldoublequote
@let\=@normalbackslash
@@ -5429,7 +6236,8 @@ width0pt\relax} \fi
@let|=@normalverticalbar
@let<=@normalless
@let>=@normalgreater
-@let+=@normalplus}
+@let+=@normalplus
+@let$=@normaldollar}
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
@@ -5448,20 +6256,29 @@ width0pt\relax} \fi
% Also back turn on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
%
-@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
- @catcode`+=@active @catcode`@_=@active}
+@gdef@fixbackslash{%
+ @ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active
+ @catcode`@_=@active
+}
+
+% Say @foo, not \foo, in error messages.
+@escapechar = `@@
-% These look ok in all fonts, so just make them not special. The @rm below
-% makes sure that the current font starts out as the newly loaded cmr10
-@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
+% These look ok in all fonts, so just make them not special.
+@catcode`@& = @other
+@catcode`@# = @other
+@catcode`@% = @other
+@c Set initial fonts.
@textfonts
@rm
+
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
@c page-delimiter: "^\\\\message"
@c time-stamp-start: "def\\\\texinfoversion{"
-@c time-stamp-format: "%:y-%02m-%02d"
+@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@c End:
diff --git a/contrib/amd/doc/version.texi b/contrib/amd/doc/version.texi
index 6032c23..3705a9f 100644
--- a/contrib/amd/doc/version.texi
+++ b/contrib/amd/doc/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 7 October 1999
-@set EDITION 6.0.3s1
-@set VERSION 6.0.3s1
+@set UPDATED 3 July 2001
+@set EDITION 6.0.7
+@set VERSION 6.0.7
diff --git a/contrib/amd/fixmount/fixmount.8 b/contrib/amd/fixmount/fixmount.8
index 66f4d22..99ede83 100644
--- a/contrib/amd/fixmount/fixmount.8
+++ b/contrib/amd/fixmount/fixmount.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,9 +38,9 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: fixmount.8,v 1.2 1999/01/10 21:54:26 ezk Exp $
+.\" $Id: fixmount.8,v 1.3.2.2 2001/01/10 03:23:32 ezk Exp $
.\"
-.TH FIXMOUNT 8L "26 Feb 1993"
+.TH FIXMOUNT 8 "26 Feb 1993"
.SH NAME
fixmount \- fix remote mount entries
.SH SYNOPSIS
diff --git a/contrib/amd/fixmount/fixmount.c b/contrib/amd/fixmount/fixmount.c
index ec15230..626381f 100644
--- a/contrib/amd/fixmount/fixmount.c
+++ b/contrib/amd/fixmount/fixmount.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fixmount.c,v 1.4 1999/02/04 07:24:42 ezk Exp $
+ * $Id: fixmount.c,v 1.5.2.1 2001/01/10 03:23:32 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_analyze.c b/contrib/amd/fsinfo/fsi_analyze.c
index 7ba7a95..45d867b 100644
--- a/contrib/amd/fsinfo/fsi_analyze.c
+++ b/contrib/amd/fsinfo/fsi_analyze.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_analyze.c,v 1.2 1999/01/10 21:54:27 ezk Exp $
+ * $Id: fsi_analyze.c,v 1.3.2.1 2001/01/10 03:23:32 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_data.h b/contrib/amd/fsinfo/fsi_data.h
index 96472bb..867866f 100644
--- a/contrib/amd/fsinfo/fsi_data.h
+++ b/contrib/amd/fsinfo/fsi_data.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_data.h,v 1.2 1999/01/10 21:54:27 ezk Exp $
+ * $Id: fsi_data.h,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_dict.c b/contrib/amd/fsinfo/fsi_dict.c
index 395317d..141c9e4 100644
--- a/contrib/amd/fsinfo/fsi_dict.c
+++ b/contrib/amd/fsinfo/fsi_dict.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_dict.c,v 1.2 1999/01/10 21:54:28 ezk Exp $
+ * $Id: fsi_dict.c,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_gram.y b/contrib/amd/fsinfo/fsi_gram.y
index 97a76bf..2d0ba33 100644
--- a/contrib/amd/fsinfo/fsi_gram.y
+++ b/contrib/amd/fsinfo/fsi_gram.y
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_gram.y,v 1.3 1999/04/16 14:21:14 ezk Exp $
+ * $Id: fsi_gram.y,v 1.4.2.1 2001/01/10 03:23:33 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_lex.l b/contrib/amd/fsinfo/fsi_lex.l
index 545ed5c..f9a6d7c 100644
--- a/contrib/amd/fsinfo/fsi_lex.l
+++ b/contrib/amd/fsinfo/fsi_lex.l
@@ -1,6 +1,6 @@
%{
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -39,7 +39,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_lex.l,v 1.3 1999/09/30 21:01:41 ezk Exp $
+ * $Id: fsi_lex.l,v 1.4.2.2 2001/01/10 03:23:33 ezk Exp $
*
*/
@@ -236,7 +236,7 @@ yyerror(char *fmt, ...)
va_start(ap, fmt);
col_cleanup(0);
fprintf(stderr, "%s:%d: ", fsi_filename ? fsi_filename : "/dev/stdin", yylineno);
- fprintf(stderr, fmt, ap);
+ vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
parse_errors++;
va_end(ap);
diff --git a/contrib/amd/fsinfo/fsi_util.c b/contrib/amd/fsinfo/fsi_util.c
index f3fe793..e619bd9 100644
--- a/contrib/amd/fsinfo/fsi_util.c
+++ b/contrib/amd/fsinfo/fsi_util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -35,7 +35,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_util.c,v 1.2 1999/01/10 21:54:28 ezk Exp $
+ * $Id: fsi_util.c,v 1.3.2.2 2001/01/10 03:23:33 ezk Exp $
*
*/
@@ -115,7 +115,7 @@ error(char *fmt, ...)
va_start(ap, fmt);
col_cleanup(0);
fprintf(stderr, "%s: Error, ", progname);
- fprintf(stderr, fmt, ap);
+ vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
errors++;
va_end(ap);
@@ -130,7 +130,7 @@ lerror(ioloc *l, char *fmt, ...)
va_start(ap, fmt);
col_cleanup(0);
fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
- fprintf(stderr, fmt, ap);
+ vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
errors++;
va_end(ap);
@@ -145,7 +145,7 @@ lwarning(ioloc *l, char *fmt, ...)
va_start(ap, fmt);
col_cleanup(0);
fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
- fprintf(stderr, fmt, ap);
+ vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
va_end(ap);
}
@@ -159,7 +159,7 @@ fatal(char *fmt, ...)
va_start(ap, fmt);
col_cleanup(1);
fprintf(stderr, "%s: Fatal, ", progname);
- fprintf(stderr, fmt, ap);
+ vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
va_end(ap);
exit(1);
@@ -178,7 +178,7 @@ log(char *fmt, ...)
va_start(ap, fmt);
fputc('#', stdout);
fprintf(stdout, "%s: ", progname);
- fprintf(stdout, fmt, ap);
+ vfprintf(stdout, fmt, ap);
putc('\n', stdout);
va_end(ap);
}
diff --git a/contrib/amd/fsinfo/fsinfo.8 b/contrib/amd/fsinfo/fsinfo.8
index 4d254d9..b9a330a 100644
--- a/contrib/amd/fsinfo/fsinfo.8
+++ b/contrib/amd/fsinfo/fsinfo.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1993 Jan-Simon Pendry.
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93
-.\" $Id: fsinfo.8,v 1.2 1999/01/10 21:54:28 ezk Exp $
+.\" $Id: fsinfo.8,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
.\"
.TH FSINFO 8 "June 28, 1993"
.SH NAME
diff --git a/contrib/amd/fsinfo/fsinfo.c b/contrib/amd/fsinfo/fsinfo.c
index 0e1cb40..c9c7546 100644
--- a/contrib/amd/fsinfo/fsinfo.c
+++ b/contrib/amd/fsinfo/fsinfo.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsinfo.c,v 1.4 1999/02/04 07:24:44 ezk Exp $
+ * $Id: fsinfo.c,v 1.5.2.2 2001/01/10 03:23:34 ezk Exp $
*
*/
@@ -196,7 +196,7 @@ Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\
static char *
find_username(void)
{
- char *u = getlogin();
+ const char *u = getlogin();
if (!u) {
struct passwd *pw = getpwuid(getuid());
@@ -233,6 +233,7 @@ main(int argc, char *argv[])
perror("gethostname");
exit(1);
}
+ hostname[sizeof(hostname) - 1] = '\0';
/*
* Get the username
diff --git a/contrib/amd/fsinfo/fsinfo.h b/contrib/amd/fsinfo/fsinfo.h
index a828d7b..4fc6cd9 100644
--- a/contrib/amd/fsinfo/fsinfo.h
+++ b/contrib/amd/fsinfo/fsinfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsinfo.h,v 1.3 1999/01/10 21:54:29 ezk Exp $
+ * $Id: fsinfo.h,v 1.4.2.2 2001/01/10 03:23:34 ezk Exp $
*
*/
@@ -83,15 +83,20 @@ extern void analyze_automounts(qelem *);
extern void analyze_hosts(qelem *);
extern void compute_automount_point(char *, host *, char *);
extern void dict_add(dict *, char *, char *);
-extern void error(char *fmt, ...);
-extern void fatal(char *fmt, ...);
+extern void error(char *fmt, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
+extern void fatal(char *fmt, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
extern void gen_hdr(FILE *ef, char *hn);
extern void info_hdr(FILE *ef, char *info);
extern void init_que(qelem *);
extern void ins_que(qelem *, qelem *);
-extern void lerror(ioloc *l, char *fmt, ...);
-extern void log(char *fmt, ...);
-extern void lwarning(ioloc *l, char *fmt, ...);
+extern void lerror(ioloc *l, char *fmt, ...)
+ __attribute__((__format__(__printf__, 2, 3)));
+extern void log(char *fmt, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
+extern void lwarning(ioloc *l, char *fmt, ...)
+ __attribute__((__format__(__printf__, 2, 3)));
extern void rem_que(qelem *);
extern void set_disk_fs(disk_fs *, int, char *);
extern void set_fsmount(fsmount *, int, char *);
@@ -100,7 +105,8 @@ extern void show_area_being_processed(char *area, int n);
extern void show_new(char *msg);
extern void warning(void);
-extern int yyerror(char *fmt, ...);
+extern int yyerror(char *fmt, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
extern void domain_strip(char *otherdom, char *localdom);
/*
* some systems such as DU-4.x have a different GNU flex in /usr/bin
diff --git a/contrib/amd/fsinfo/wr_atab.c b/contrib/amd/fsinfo/wr_atab.c
index bf6bb40..fcec8ee 100644
--- a/contrib/amd/fsinfo/wr_atab.c
+++ b/contrib/amd/fsinfo/wr_atab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_atab.c,v 1.2 1999/01/10 21:54:29 ezk Exp $
+ * $Id: wr_atab.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_bparam.c b/contrib/amd/fsinfo/wr_bparam.c
index 61956c6..0245799 100644
--- a/contrib/amd/fsinfo/wr_bparam.c
+++ b/contrib/amd/fsinfo/wr_bparam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_bparam.c,v 1.2 1999/01/10 21:54:29 ezk Exp $
+ * $Id: wr_bparam.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_dumpset.c b/contrib/amd/fsinfo/wr_dumpset.c
index 0428c09..205d55a 100644
--- a/contrib/amd/fsinfo/wr_dumpset.c
+++ b/contrib/amd/fsinfo/wr_dumpset.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_dumpset.c,v 1.2 1999/01/10 21:54:30 ezk Exp $
+ * $Id: wr_dumpset.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_exportfs.c b/contrib/amd/fsinfo/wr_exportfs.c
index 16e18c8..d81c28b 100644
--- a/contrib/amd/fsinfo/wr_exportfs.c
+++ b/contrib/amd/fsinfo/wr_exportfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_exportfs.c,v 1.2 1999/01/10 21:54:30 ezk Exp $
+ * $Id: wr_exportfs.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_fstab.c b/contrib/amd/fsinfo/wr_fstab.c
index a63d47d..f618b26 100644
--- a/contrib/amd/fsinfo/wr_fstab.c
+++ b/contrib/amd/fsinfo/wr_fstab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_fstab.c,v 1.2 1999/01/10 21:54:30 ezk Exp $
+ * $Id: wr_fstab.c,v 1.3.2.1 2001/01/10 03:23:35 ezk Exp $
*
*/
diff --git a/contrib/amd/hlfsd/hlfsd.8 b/contrib/amd/hlfsd/hlfsd.8
index 956f30c..0c1f2c3 100644
--- a/contrib/amd/hlfsd/hlfsd.8
+++ b/contrib/amd/hlfsd/hlfsd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1989 Jan-Simon Pendry
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1989 The Regents of the University of California.
@@ -36,7 +36,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: hlfsd.8,v 1.2 1999/01/10 21:54:32 ezk Exp $
+.\" $Id: hlfsd.8,v 1.3.2.1 2001/01/10 03:23:35 ezk Exp $
.\"
.\" HLFSD was written at Columbia University Computer Science Department, by
.\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>
diff --git a/contrib/amd/hlfsd/hlfsd.c b/contrib/amd/hlfsd/hlfsd.c
index 6b0f78f..8e5e83f 100644
--- a/contrib/amd/hlfsd/hlfsd.c
+++ b/contrib/amd/hlfsd/hlfsd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.c,v 1.5 1999/09/08 23:36:51 ezk Exp $
+ * $Id: hlfsd.c,v 1.7.2.2 2001/01/10 03:23:35 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -95,11 +95,11 @@ nfstime startup;
u_short nfs_port;
/* symbol must be available always */
-#ifdef MOUNT_TABLE_ON_FILE
+#ifdef MNTTAB_FILE_NAME
char *mnttab_file_name = MNTTAB_FILE_NAME;
-#else /* not MOUNT_TABLE_ON_FILE */
+#else /* not MNTTAB_FILE_NAME */
char *mnttab_file_name = NULL;
-#endif /* not MOUNT_TABLE_ON_FILE */
+#endif /* not MNTTAB_FILE_NAME */
/* forward declarations */
void hlfsd_going_down(int rc);
@@ -947,7 +947,7 @@ fatal(char *mess)
am_get_progname(), lessmess, errno);
}
}
- plog(XLOG_FATAL, mess);
+ plog(XLOG_FATAL, "%s", mess);
hlfsd_going_down(1);
}
diff --git a/contrib/amd/hlfsd/hlfsd.h b/contrib/amd/hlfsd/hlfsd.h
index e306ea3..c0e9fa9 100644
--- a/contrib/amd/hlfsd/hlfsd.h
+++ b/contrib/amd/hlfsd/hlfsd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.h,v 1.2 1999/01/10 21:54:32 ezk Exp $
+ * $Id: hlfsd.h,v 1.4.2.2 2001/01/12 22:47:21 ro Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -52,7 +52,7 @@
* MACROS AND CONSTANTS:
*/
-#define HLFSD_VERSION "hlfsd 1.1 (March 4, 1997-1999)"
+#define HLFSD_VERSION "hlfsd 1.1 (1993-2001)"
#define PERS_SPOOLMODE 0755
#define OPEN_SPOOLMODE 01777
#define DOTSTRING "."
@@ -70,21 +70,16 @@
* which define uid_t to be unsigned short, so I used the lowest common
* size which is unsigned short.
*/
-#ifdef EXPERIMENTAL_UID_SIZE
-#define UID_SHIFT 30
-# define ROOTID ((1 << UID_SHIFT) - 1)
-# define SLINKID ((1 << UID_SHIFT) - 2)
-# define INVALIDID ((1 << UID_SHIFT) - 3)
-#else /* not EXPERIMENTAL_UID_SIZE */
/*
* XXX: this will cause problems to systems with UIDs greater than
* MAX_UNSIGNED_SHORT-3.
*/
-# define ROOTID (((unsigned short) ~0) - 1)
-# define SLINKID (((unsigned short) ~0) - 2)
+#define ROOTID (((unsigned short) ~0) - 1)
+#define SLINKID (((unsigned short) ~0) - 2)
+#ifndef INVALIDID
+/* this is also defined in include/am_utils.h */
# define INVALIDID (((unsigned short) ~0) - 3)
-#endif /* not EXPERIMENTAL_UID_SIZE */
-
+#endif /* not INVALIDID */
#define DOTCOOKIE 1
#define DOTDOTCOOKIE 2
diff --git a/contrib/amd/hlfsd/homedir.c b/contrib/amd/hlfsd/homedir.c
index b2897bf..e17418e 100644
--- a/contrib/amd/hlfsd/homedir.c
+++ b/contrib/amd/hlfsd/homedir.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: homedir.c,v 1.4 1999/01/13 23:31:19 ezk Exp $
+ * $Id: homedir.c,v 1.5.2.1 2001/01/10 03:23:36 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
diff --git a/contrib/amd/hlfsd/nfs_prot_svc.c b/contrib/amd/hlfsd/nfs_prot_svc.c
index 3fdd196..26cead4 100644
--- a/contrib/amd/hlfsd/nfs_prot_svc.c
+++ b/contrib/amd/hlfsd/nfs_prot_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_svc.c,v 1.3 1999/01/13 23:31:19 ezk Exp $
+ * $Id: nfs_prot_svc.c,v 1.4.2.2 2001/01/12 23:29:01 ro Exp $
*
*/
@@ -50,23 +50,23 @@
/* EXTERNAL FUNCTIONS */
extern voidp nfsproc_null_2_svc(voidp, struct svc_req *);
-extern nfsattrstat * nfsproc_getattr_2_svc(am_nfs_fh *, struct svc_req *);
-extern nfsattrstat * nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
+extern nfsattrstat *nfsproc_getattr_2_svc(am_nfs_fh *, struct svc_req *);
+extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
extern voidp nfsproc_root_2_svc(voidp, struct svc_req *);
-extern nfsdiropres * nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsreadlinkres * nfsproc_readlink_2_svc(am_nfs_fh *, struct svc_req *);
-extern nfsreadres * nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsreadlinkres *nfsproc_readlink_2_svc(am_nfs_fh *, struct svc_req *);
+extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
extern voidp nfsproc_writecache_2_svc(voidp, struct svc_req *);
-extern nfsattrstat * nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
-extern nfsdiropres * nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
-extern nfsstat * nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsstat * nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
-extern nfsstat * nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
-extern nfsstat * nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
-extern nfsdiropres * nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
-extern nfsstat * nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsreaddirres * nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
-extern nfsstatfsres * nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *);
+extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
+extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
+extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
+extern nfsstatfsres *nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *);
/* GLOBALS */
SVCXPRT *nfs_program_2_transp;
diff --git a/contrib/amd/hlfsd/stubs.c b/contrib/amd/hlfsd/stubs.c
index 490166a..2d9b341 100644
--- a/contrib/amd/hlfsd/stubs.c
+++ b/contrib/amd/hlfsd/stubs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: stubs.c,v 1.3 1999/01/13 23:31:19 ezk Exp $
+ * $Id: stubs.c,v 1.5.2.2 2001/01/10 03:23:36 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -61,7 +61,6 @@ static nfsfattr slinkfattr = {NFLNK, 0120777, 1, 0, 0, NFS_MAXPATHLEN, 512, 0,
/* user name file attributes */
static nfsfattr un_fattr = {NFLNK, 0120777, 1, 0, 0, NFS_MAXPATHLEN, 512, 0,
(NFS_MAXPATHLEN + 1) / 512, 0, INVALIDID};
-static int getcreds(struct svc_req *, uid_t *, gid_t *);
static int started;
static am_nfs_fh slink;
static am_nfs_fh un_fhandle;
@@ -144,7 +143,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
res.ns_u.ns_attr_u = slinkfattr;
} else {
- if (getcreds(rqstp, &uid, &gid) < 0) {
+ if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0) {
res.ns_status = NFSERR_STALE;
return &res;
}
@@ -223,13 +222,23 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
}
if (STREQ(argp->da_name, slinkname)) {
+#ifndef MNT2_NFS_OPT_SYMTTL
+ /*
+ * This code is needed to defeat Solaris 2.4's (and newer) symlink
+ * values cache. It forces the last-modified time of the symlink to be
+ * current. It is not needed if the O/S has an nfs flag to turn off the
+ * symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
+ */
+ if (++slinkfattr.na_mtime.nt_useconds == 0)
+ ++slinkfattr.na_mtime.nt_seconds;
+#endif /* not MNT2_NFS_OPT_SYMTTL */
res.dr_u.dr_drok_u.drok_fhandle = slink;
res.dr_u.dr_drok_u.drok_attributes = slinkfattr;
res.dr_status = NFS_OK;
return &res;
}
- if (getcreds(rqstp, &uid, &gid) < 0 || gid != hlfs_gid) {
+ if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0 || gid != hlfs_gid) {
res.dr_status = NFSERR_NOENT;
return &res;
}
@@ -260,40 +269,6 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
return &res;
}
-static int
-getcreds(struct svc_req *rp, uid_t *u, gid_t *g)
-{
- struct authunix_parms *aup = (struct authunix_parms *) NULL;
-#ifdef HAVE_RPC_AUTH_DES_H
- struct authdes_cred *adp;
-#endif /* HAVE_RPC_AUTH_DES_H */
-
- switch (rp->rq_cred.oa_flavor) {
-
- case AUTH_UNIX:
- aup = (struct authunix_parms *) rp->rq_clntcred;
- *u = aup->aup_uid;
- *g = aup->aup_gid;
- break;
-
-#ifdef HAVE_RPC_AUTH_DES_H
- case AUTH_DES:
- adp = (struct authdes_cred *) rp->rq_clntcred;
- *g = INVALIDID; /* some unknown group id */
- if (sscanf(adp->adc_fullname.name, "unix.%lu@", (u_long *) u) == 1)
- break;
- /* fall through */
-#endif /* HAVE_RPC_AUTH_DES_H */
-
- default:
- *u = *g = INVALIDID; /* just in case */
- svcerr_weakauth(nfsxprt);
- return -1;
- }
-
- return 0; /* everything is ok */
-}
-
nfsreadlinkres *
nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
@@ -309,7 +284,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
if (eq_fh(argp, &root)) {
res.rlr_status = NFSERR_ISDIR;
} else if (eq_fh(argp, &slink)) {
- if (getcreds(rqstp, &userid, &groupid) < 0)
+ if (getcreds(rqstp, &userid, &groupid, nfsxprt) < 0)
return (nfsreadlinkres *) NULL;
gettimeofday((struct timeval *) &slinkfattr.na_atime, (struct timezone *) 0);
@@ -328,7 +303,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
} else { /* check if asked for user mailbox */
- if (getcreds(rqstp, &userid, &groupid) < 0) {
+ if (getcreds(rqstp, &userid, &groupid, nfsxprt) < 0) {
return (nfsreadlinkres *) NULL;
}
diff --git a/contrib/amd/include/am_compat.h b/contrib/amd/include/am_compat.h
index 876f2ea..639e9a1 100644
--- a/contrib/amd/include/am_compat.h
+++ b/contrib/amd/include/am_compat.h
@@ -86,6 +86,14 @@
# define MNTTAB_OPT_MAXGROUPS "maxgroups"
#endif /* defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS) */
+#if defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST)
+# define MNTTAB_OPT_PROPLIST "proplist"
+#endif /* defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST) */
+
+#if defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK)
+# define MNTTAB_OPT_NOLOCK "nolock"
+#endif /* defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK) */
+
/*
* Complete MNTTAB_OPT_* options based on MNT2_CDFS_OPT_* mount options.
*/
@@ -250,6 +258,13 @@ struct hsfs_args {
# define ufs_args_t u_int
#endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */
+/*
+ * if does not define struct efs_args, assume integer bit-field (linux)
+ */
+#if defined(HAVE_FS_EFS) && !defined(efs_args_t)
+# define efs_args_t u_int
+#endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
+
#if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
# define MNTTYPE_AUTOFS "autofs"
#endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */
diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h
index dbf266b..136abe1 100644
--- a/contrib/amd/include/am_defs.h
+++ b/contrib/amd/include/am_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_defs.h,v 1.11 1999/09/18 08:38:05 ezk Exp $
+ * $Id: am_defs.h,v 1.15.2.9 2001/04/07 00:47:44 ib42 Exp $
*
*/
@@ -331,14 +331,15 @@ extern int errno;
/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
# define DATUM
# endif /* not DATUM */
-#endif /* HAVE_NDBM_H */
-#ifdef HAVE_DB1_NDBM_H
-# include <db1/ndbm.h>
-# ifndef DATUM
+#else /* not HAVE_NDBM_H */
+# ifdef HAVE_DB1_NDBM_H
+# include <db1/ndbm.h>
+# ifndef DATUM
/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
-# define DATUM
-# endif /* not DATUM */
-#endif /* HAVE_DB1_NDBM_H */
+# define DATUM
+# endif /* not DATUM */
+# endif /* HAVE_DB1_NDBM_H */
+#endif /* HAVE_NDBM_H */
/*
* Actions to take if <net/errno.h> exists.
@@ -457,32 +458,29 @@ struct ypall_callback;
* NFS and other definitions included.
*/
# ifndef NFSCLIENT
-# define NFSCLIENT
+# define NFSCLIENT 1
# endif /* not NFSCLIENT */
# ifndef NFS
-# define NFS
+# define NFS 1
# endif /* not NFS */
# ifndef PCFS
-# define PCFS
+# define PCFS 1
# endif /* not PCFS */
# ifndef LOFS
-# define LOFS
+# define LOFS 1
# endif /* not LOFS */
# ifndef RFS
-# define RFS
+# define RFS 1
# endif /* not RFS */
# ifndef MSDOSFS
-# define MSDOSFS
+# define MSDOSFS 1
# endif /* not MSDOSFS */
# ifndef MFS
-# define MFS
+# define MFS 1
# endif /* not MFS */
# ifndef CD9660
-# define CD9660
+# define CD9660 1
# endif /* not CD9660 */
-# ifndef NFS
-# define NFS
-# endif /* not NFS */
# include <sys/mount.h>
#endif /* HAVE_SYS_MOUNT_H */
@@ -492,8 +490,10 @@ struct ypall_callback;
/*
* Actions to take if <linux/fs.h> exists.
+ * There is no point in including this on a glibc2 system,
+ * we're only asking for trouble
*/
-#ifdef HAVE_LINUX_FS_H
+#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
/*
* There are various conflicts in definitions between RedHat Linux, newer
* 2.2 kernels, and <netinet/in.h> and <linux/fs.h>.
@@ -559,8 +559,21 @@ struct ypall_callback;
/* conflicts with <statfsbuf.h> */
# define _SYS_STATFS_H
# endif /* _SYS_MOUNT_H */
+# ifndef _LINUX_STRING_H_
+# define _LINUX_STRING_H_
+# endif /* not _LINUX_STRING_H_ */
+# ifdef HAVE_LINUX_KDEV_T_H
+# define __KERNEL__
+# include <linux/kdev_t.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_KDEV_T_H */
+# ifdef HAVE_LINUX_LIST_H
+# define __KERNEL__
+# include <linux/list.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_LIST_H */
# include <linux/fs.h>
-#endif /* HAVE_LINUX_FS_H */
+#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
#ifdef HAVE_CDFS_CDFS_MOUNT_H
# include <cdfs/cdfs_mount.h>
@@ -572,7 +585,11 @@ struct ypall_callback;
/*
* Actions to take if <linux/auto_fs.h> exists.
+ * We really don't want <linux/fs.h> pulled in here
*/
+#ifndef _LINUX_FS_H
+#define _LINUX_FS_H
+#endif /* _LINUX_FS_H */
#ifdef HAVE_LINUX_AUTO_FS_H
# include <linux/auto_fs.h>
#endif /* HAVE_LINUX_AUTO_FS_H */
@@ -586,7 +603,11 @@ struct ypall_callback;
/*
* Actions to take if <sys/fs/autofs_prot.h> exists.
+ * We really don't want <linux/fs.h> pulled in here
*/
+#ifndef _LINUX_FS_H
+#define _LINUX_FS_H
+#endif /* _LINUX_FS_H */
#ifdef HAVE_SYS_FS_AUTOFS_PROT_H
# include <sys/fs/autofs_prot.h>
#endif /* HAVE_SYS_FS_AUTOFS_PROT_H */
@@ -632,7 +653,7 @@ struct ypall_callback;
# include <nfs/mount.h>
#endif /* HAVE_NFS_MOUNT_H */
#ifdef HAVE_NFS_NFS_MOUNT_H_off
-/* broken on nexttep3 (includes non-existing headers) */
+/* broken on nextstep3 (includes non-existing headers) */
# include <nfs/nfs_mount.h>
#endif /* HAVE_NFS_NFS_MOUNT_H */
#ifdef HAVE_NFS_PATHCONF_H
@@ -648,6 +669,11 @@ struct ypall_callback;
# include <sys/fs/nfs_clnt.h>
#endif /* HAVE_SYS_FS_NFS_CLNT_H */
#ifdef HAVE_LINUX_NFS_MOUNT_H
+# define _LINUX_NFS_H
+# define _LINUX_NFS2_H
+# define _LINUX_NFS3_H
+# define _LINUX_NFS_FS_H
+# define _LINUX_IN_H
# include <linux/nfs_mount.h>
#endif /* HAVE_LINUX_NFS_MOUNT_H */
@@ -1275,7 +1301,7 @@ typedef struct _am_mntent {
*/
#ifndef HAVE_EXTERN_SYS_ERRLIST
-extern const char * const sys_errlist[];
+extern const char *const sys_errlist[];
#endif /* not HAVE_EXTERN_SYS_ERRLIST */
#ifndef HAVE_EXTERN_OPTARG
diff --git a/contrib/amd/include/am_utils.h b/contrib/amd/include/am_utils.h
index 4098cd4..f43eed2 100644
--- a/contrib/amd/include/am_utils.h
+++ b/contrib/amd/include/am_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_utils.h,v 1.6 1999/08/22 05:12:55 ezk Exp $
+ * $Id: am_utils.h,v 1.11.2.6 2001/02/23 01:03:40 ezk Exp $
*
*/
@@ -76,11 +76,19 @@
# ifdef HOSTNAMESZ
# define MAXHOSTNAMELEN HOSTNAMESZ
# else /* not HOSTNAMESZ */
-# define MAXHOSTNAMELEN 64
+# define MAXHOSTNAMELEN 256
# endif /* not HOSTNAMESZ */
#endif /* not MAXHOSTNAMELEN */
/*
+ * for hlfsd, and amd for detecting uid/gid
+ */
+#ifndef INVALIDID
+/* this is also defined in include/am_utils.h */
+# define INVALIDID (((unsigned short) ~0) - 3)
+#endif /* not INVALIDID */
+
+/*
* String comparison macros
*/
#define STREQ(s1, s2) (strcmp((s1), (s2)) == 0)
@@ -178,9 +186,9 @@ extern int umount_fs(char *fs_name, const char *mnttabname);
#define MFF_LOGDOWN 0x0040 /* Logged that this mount is down */
#define MFF_RSTKEEP 0x0080 /* Don't timeout this filesystem - restarted */
#define MFF_WANTTIMO 0x0100 /* Need a timeout call when not busy */
-#ifdef HAVE_AM_FS_NFSL
+#ifdef HAVE_AMU_FS_NFSL
# define MFF_NFSLINK 0x0200 /* nfsl type, and deemed a link */
-#endif /* HAVE_AM_FS_NFSL */
+#endif /* HAVE_AMU_FS_NFSL */
/*
* macros for struct am_node (map of auto-mount points).
@@ -295,7 +303,6 @@ struct am_opts {
char *opt_opts;
char *opt_remopts;
char *opt_pref;
- char *opt_autopref;
char *opt_cache;
char *opt_rfs;
char *opt_rhost;
@@ -499,6 +506,7 @@ extern char version[]; /* Version info */
*/
extern AUTH *nfs_auth; /* Dummy authorization for remote servers */
extern FILE *logfp; /* Log file */
+extern SVCXPRT *nfsxprt;
extern am_node **exported_ap; /* List of nodes */
extern am_node *root_node; /* Node for "root" */
extern char *PrimNetName; /* Name of primary connected network */
@@ -506,21 +514,13 @@ extern char *PrimNetNum; /* Name of primary connected network */
extern char *SubsNetName; /* Name of subsidiary connected network */
extern char *SubsNetNum; /* Name of subsidiary connected network */
-#if 0
-extern char *progname; /* "amd" */
-#endif
-extern void am_set_progname(char *pn); /* "amd" */
-extern const char * am_get_progname(void); /* "amd" */
+extern void am_set_progname(char *pn); /* "amd" */
+extern const char *am_get_progname(void); /* "amd" */
extern void am_set_hostname(char *hn);
-extern const char * am_get_hostname(void);
+extern const char *am_get_hostname(void);
extern pid_t am_set_mypid(void);
extern pid_t am_mypid;
-#if 0
-extern char hostname[]; /* "kiska" */
-extern pid_t mypid; /* Current process id */
-#endif
-
extern int first_free_map; /* First free node */
extern int foreground; /* Foreground process */
extern int immediate_abort; /* Should close-down unmounts be retried */
@@ -542,7 +542,6 @@ extern u_short nfs_port; /* Our NFS service port */
*/
extern CLIENT *get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv, int *sock, u_long mnt_version);
extern RETSIGTYPE sigchld(int);
-extern SVCXPRT *nfsxprt;
extern am_node *efs_lookuppn(am_node *, char *, int *, int);
extern am_node *exported_ap_alloc(void);
extern am_node *fh_to_mp(am_nfs_fh *);
@@ -574,7 +573,10 @@ extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *);
extern int fwd_init(void);
extern int fwd_packet(int, voidp, int, struct sockaddr_in *, struct sockaddr_in *, voidp, fwd_fun);
extern int get_amd_program_number(void);
+extern int getcreds(struct svc_req *, uid_t *, gid_t *, SVCXPRT *);
extern int hasmntval(mntent_t *, char *);
+extern char *hasmnteq(mntent_t *, char *);
+extern char *haseq(char *);
extern int is_network_member(const char *net);
extern int islocalnet(u_long);
extern int make_nfs_auth(void);
@@ -606,7 +608,7 @@ extern struct sockaddr_in *amu_svc_getcaller(SVCXPRT *xprt);
extern time_t time(time_t *);
extern void am_mounted(am_node *);
extern void am_unmounted(am_node *);
-extern void amq_program_1(struct svc_req *rqstp, SVCXPRT * transp);
+extern void amq_program_1(struct svc_req *rqstp, SVCXPRT *transp);
extern void amu_get_myaddress(struct in_addr *iap);
extern void amu_release_controlling_tty(void);
extern void compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp);
@@ -643,7 +645,7 @@ extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp);
extern void normalize_slash(char *);
extern void ops_showamfstypes(char *buf);
extern void ops_showfstypes(char *outbuf);
-extern void plog(int, char *,...)
+extern void plog(int, const char *,...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern void rem_que(qelem *);
extern void reschedule_timeout_mp(void);
@@ -782,7 +784,7 @@ extern am_ops ufs_ops; /* Un*x file system */
/*
* Automount File System
*/
-#ifdef HAVE_AM_FS_AUTO
+#ifdef HAVE_AMU_FS_AUTO
extern am_ops amfs_auto_ops; /* Automount file system (this!) */
extern am_ops amfs_toplvl_ops; /* Top-level automount file system */
extern am_ops amfs_root_ops; /* Root file system */
@@ -795,94 +797,94 @@ extern int amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfse
extern int amfs_auto_umount(am_node *mp);
extern int amfs_auto_fmount(am_node *mp);
extern int amfs_auto_fumount(am_node *mp);
-#endif /* HAVE_AM_FS_AUTO */
+#endif /* HAVE_AMU_FS_AUTO */
/*
* Toplvl Automount File System
*/
-#ifdef HAVE_AM_FS_TOPLVL
+#ifdef HAVE_AMU_FS_TOPLVL
extern am_ops amfs_toplvl_ops; /* Toplvl Automount file system */
extern int amfs_toplvl_mount(am_node *mp);
extern int amfs_toplvl_umount(am_node *mp);
extern void amfs_toplvl_mounted(mntfs *mf);
-#endif /* HAVE_AM_FS_TOPLVL */
+#endif /* HAVE_AMU_FS_TOPLVL */
/*
* Direct Automount File System
*/
-#ifdef HAVE_AM_FS_DIRECT
+#ifdef HAVE_AMU_FS_DIRECT
extern am_ops amfs_direct_ops; /* Direct Automount file system (this too) */
-#endif /* HAVE_AM_FS_DIRECT */
+#endif /* HAVE_AMU_FS_DIRECT */
/*
* Error File System
*/
-#ifdef HAVE_AM_FS_ERROR
+#ifdef HAVE_AMU_FS_ERROR
extern am_ops amfs_error_ops; /* Error file system */
extern am_node *amfs_error_lookuppn(am_node *mp, char *fname, int *error_return, int op);
extern int amfs_error_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count);
-#endif /* HAVE_AM_FS_ERROR */
+#endif /* HAVE_AMU_FS_ERROR */
/*
* Inheritance File System
*/
-#ifdef HAVE_AM_FS_INHERIT
+#ifdef HAVE_AMU_FS_INHERIT
extern am_ops amfs_inherit_ops; /* Inheritance file system */
-#endif /* HAVE_AM_FS_INHERIT */
+#endif /* HAVE_AMU_FS_INHERIT */
/*
* NFS mounts with local existence check.
*/
-#ifdef HAVE_AM_FS_NFSL
+#ifdef HAVE_AMU_FS_NFSL
extern am_ops amfs_nfsl_ops; /* NFSL */
-#endif /* HAVE_AM_FS_NFSL */
+#endif /* HAVE_AMU_FS_NFSL */
/*
* Multi-nfs mounts.
*/
-#ifdef HAVE_AM_FS_NFSX
+#ifdef HAVE_AMU_FS_NFSX
extern am_ops amfs_nfsx_ops; /* NFSX */
-#endif /* HAVE_AM_FS_NFSX */
+#endif /* HAVE_AMU_FS_NFSX */
/*
* NFS host - a whole tree.
*/
-#ifdef HAVE_AM_FS_HOST
+#ifdef HAVE_AMU_FS_HOST
extern am_ops amfs_host_ops; /* NFS host */
-#endif /* HAVE_AM_FS_HOST */
+#endif /* HAVE_AMU_FS_HOST */
/*
* Program File System
* This is useful for things like RVD.
*/
-#ifdef HAVE_AM_FS_PROGRAM
+#ifdef HAVE_AMU_FS_PROGRAM
extern am_ops amfs_program_ops; /* Program File System */
-#endif /* HAVE_AM_FS_PROGRAM */
+#endif /* HAVE_AMU_FS_PROGRAM */
/*
* Symbolic-link file system.
* A "filesystem" which is just a symbol link.
*/
-#ifdef HAVE_AM_FS_LINK
+#ifdef HAVE_AMU_FS_LINK
extern am_ops amfs_link_ops; /* Symlink FS */
extern int amfs_link_fmount(mntfs *mf);
-#endif /* HAVE_AM_FS_LINK */
+#endif /* HAVE_AMU_FS_LINK */
/*
* Symbolic-link file system, which also checks that the target of
* the symlink exists.
* A "filesystem" which is just a symbol link.
*/
-#ifdef HAVE_AM_FS_LINKX
+#ifdef HAVE_AMU_FS_LINKX
extern am_ops amfs_linkx_ops; /* Symlink FS with existence check */
-#endif /* HAVE_AM_FS_LINKX */
+#endif /* HAVE_AMU_FS_LINKX */
/*
* Union file system
*/
-#ifdef HAVE_AM_FS_UNION
+#ifdef HAVE_AMU_FS_UNION
extern am_ops amfs_union_ops; /* Union FS */
-#endif /* HAVE_AM_FS_UNION */
+#endif /* HAVE_AMU_FS_UNION */
/*
* Autofs file system
@@ -914,14 +916,17 @@ extern am_ops autofs_ops; /* (Sun) Autofs FS */
# define D_FORK 0x0080 /* Fork server */
/* info service specific debugging (hesiod, nis, etc) */
# define D_INFO 0x0100
+# define D_HRTIME 0x0200 /* Print high resolution time stamps */
+# define D_XDRTRACE 0x0400 /* Trace xdr routines */
+# define D_READDIR 0x0800 /* show browsable_dir progress */
/*
- * Normally, don't enter daemon mode, and don't register amq
+ * Normally, don't enter daemon mode, don't register amq, and don't trace xdr
*/
# ifdef DEBUG_MEM
-# define D_TEST (~(D_DAEMON|D_MEM|D_STR))
+# define D_TEST (~(D_DAEMON|D_MEM|D_STR|D_XDRTRACE))
# else /* not DEBUG_MEM */
-# define D_TEST (~(D_DAEMON|D_STR))
+# define D_TEST (~(D_DAEMON|D_STR|D_XDRTRACE))
# endif /* not DEBUG_MEM */
# define amuDebug(x) if (debug_flags & (x))
@@ -965,7 +970,7 @@ extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
extern int debug_flags; /* Debug options */
extern int debug_option (char *opt);
extern struct opt_tab dbg_opt[];
-extern void dplog(char *fmt, ...)
+extern void dplog(const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
/**************************************************************************/
diff --git a/contrib/amd/include/am_xdr_func.h b/contrib/amd/include/am_xdr_func.h
index b50e008..c974f1c 100644
--- a/contrib/amd/include/am_xdr_func.h
+++ b/contrib/amd/include/am_xdr_func.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_xdr_func.h,v 1.2 1999/01/10 21:54:35 ezk Exp $
+ * $Id: am_xdr_func.h,v 1.3.2.2 2001/01/10 03:23:38 ezk Exp $
*
*/
@@ -99,7 +99,7 @@ bool_t xdr_ftype(XDR *xdrs, nfsftype *objp);
bool_t xdr_groupnode(XDR *xdrs, groupnode *objp);
#endif /* not HAVE_XDR_GROUPNODE */
#ifndef HAVE_XDR_GROUPS
-bool_t xdr_groups(XDR *xdrs, groups objp);
+bool_t xdr_groups(XDR *xdrs, groups *objp);
#endif /* not HAVE_XDR_GROUPS */
#ifndef HAVE_XDR_LINKARGS
bool_t xdr_linkargs(XDR *xdrs, nfslinkargs *objp);
diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h
index 6564e24..2f4a6ed 100644
--- a/contrib/amd/include/amq_defs.h
+++ b/contrib/amd/include/amq_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_defs.h,v 1.3 1999/09/08 23:36:52 ezk Exp $
+ * $Id: amq_defs.h,v 1.4.2.1 2001/01/10 03:23:38 ezk Exp $
*
*/
diff --git a/contrib/amd/include/mount_headers1.h b/contrib/amd/include/mount_headers1.h
new file mode 100644
index 0000000..87455a9
--- /dev/null
+++ b/contrib/amd/include/mount_headers1.h
@@ -0,0 +1,167 @@
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_ERRNO_H
+# include <sys/errno.h>
+#endif /* HAVE_SYS_ERRNO_H */
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif /* HAVE_SYS_TIME_H */
+#ifdef HAVE_SYS_UCRED_H
+# include <sys/ucred.h>
+#endif /* HAVE_SYS_UCRED_H */
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_NET_IF_H
+# include <net/if.h>
+#endif /* HAVE_NET_IF_H */
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif /* HAVE_STDIO_H */
+
+#ifndef KERNEL
+# define KERNEL_off_for_now_breaks_FreeBSD
+#endif /* not KERNEL */
+
+#ifdef HAVE_SYS_MNTENT_H
+# include <sys/mntent.h>
+#endif /* HAVE_SYS_MNTENT_H */
+#ifdef HAVE_MNTENT_H
+# include <mntent.h>
+#endif /* HAVE_MNTENT_H */
+#ifdef HAVE_SYS_MNTTAB_H
+# include <sys/mnttab.h>
+#endif /* HAVE_SYS_MNTTAB_H */
+#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
+/*
+ * Do not include it if MNTTAB is already defined because it probably
+ * came from <sys/mnttab.h> and we do not want conflicting definitions.
+ */
+# include <mnttab.h>
+#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
+
+#ifdef HAVE_SYS_MOUNT_H
+# ifndef NFSCLIENT
+# define NFSCLIENT
+# endif /* not NFSCLIENT */
+# ifndef PCFS
+# define PCFS
+# endif /* not PCFS */
+# ifndef LOFS
+# define LOFS
+# endif /* not LOFS */
+# ifndef RFS
+# define RFS
+# endif /* not RFS */
+# ifndef MSDOSFS
+# define MSDOSFS
+# endif /* not MSDOSFS */
+# ifndef MFS
+# define MFS
+# endif /* not MFS */
+# ifndef CD9660
+# define CD9660
+# endif /* not CD9660 */
+# ifndef NFS
+# define NFS
+# endif /* not NFS */
+# include <sys/mount.h>
+#endif /* HAVE_SYS_MOUNT_H */
+
+#ifdef HAVE_SYS_VMOUNT_H
+# include <sys/vmount.h>
+#endif /* HAVE_SYS_VMOUNT_H */
+
+/*
+ * There is no point in including this on a glibc2 system
+ * we're only asking for trouble
+ */
+#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
+/*
+ * There's a conflict of definitions on redhat alpha linux between
+ * <netinet/in.h> and <linux/fs.h>.
+ * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
+ * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
+ */
+# ifdef HAVE_SOCKETBITS_H
+# define _LINUX_SOCKET_H
+# undef BLKFLSBUF
+# undef BLKGETSIZE
+# undef BLKRAGET
+# undef BLKRASET
+# undef BLKROGET
+# undef BLKROSET
+# undef BLKRRPART
+# undef MS_MGC_VAL
+# undef MS_RMT_MASK
+# endif /* HAVE_SOCKETBITS_H */
+# ifdef HAVE_LINUX_POSIX_TYPES_H
+# include <linux/posix_types.h>
+# endif /* HAVE_LINUX_POSIX_TYPES_H */
+# ifndef _LINUX_BYTEORDER_GENERIC_H
+# define _LINUX_BYTEORDER_GENERIC_H
+# endif /* _LINUX_BYTEORDER_GENERIC_H */
+# ifndef _LINUX_STRING_H_
+# define _LINUX_STRING_H_
+# endif /* not _LINUX_STRING_H_ */
+# ifdef HAVE_LINUX_KDEV_T_H
+# define __KERNEL__
+# include <linux/kdev_t.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_KDEV_T_H */
+# ifdef HAVE_LINUX_LIST_H
+# define __KERNEL__
+# include <linux/list.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_LIST_H */
+# include <linux/fs.h>
+#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
+
+#ifdef HAVE_SYS_FS_TYPES_H
+# include <sys/fs_types.h>
+#endif /* HAVE_SYS_FS_TYPES_H */
+
+#ifdef HAVE_UFS_UFS_MOUNT_H
+# include <ufs/ufs_mount.h>
+#endif /* HAVE_UFS_UFS_MOUNT_H */
+#ifdef HAVE_UFS_UFS_UFSMOUNT_H
+# ifndef MAXQUOTAS
+# define MAXQUOTAS 2
+# endif /* not MAXQUOTAS */
+struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */
+/* netbsd-1.4 does't protect <ufs/ufs/ufsmount.h> */
+# ifndef _UFS_UFS_UFSMOUNT_H
+# include <ufs/ufs/ufsmount.h>
+# define _UFS_UFS_UFSMOUNT_H
+# endif /* not _UFS_UFS_UFSMOUNT_H */
+#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
+
+#ifdef HAVE_CDFS_CDFS_MOUNT_H
+# include <cdfs/cdfs_mount.h>
+#endif /* HAVE_CDFS_CDFS_MOUNT_H */
+#ifdef HAVE_CDFS_CDFSMOUNT_H
+# include <cdfs/cdfsmount.h>
+#endif /* HAVE_CDFS_CDFSMOUNT_H */
+#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
+# include <isofs/cd9660/cd9660_mount.h>
+#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
+
+#ifdef HAVE_RPC_RPC_H
+# include <rpc/rpc.h>
+#endif /* HAVE_RPC_RPC_H */
+#ifdef HAVE_RPC_TYPES_H
+# include <rpc/types.h>
+#endif /* HAVE_RPC_TYPES_H */
+/* Prevent multiple inclusion on Ultrix 4 */
+#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
+# include <rpc/xdr.h>
+#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
+
+/* ALWAYS INCLUDE AM-UTILS' SPECIFIC NFS PROTOCOL HEADER NEXT! */
diff --git a/contrib/amd/include/mount_headers2.h b/contrib/amd/include/mount_headers2.h
new file mode 100644
index 0000000..bd9f567
--- /dev/null
+++ b/contrib/amd/include/mount_headers2.h
@@ -0,0 +1,29 @@
+
+#ifdef HAVE_RPCSVC_MOUNT_H
+# include <rpcsvc/mount.h>
+#endif /* HAVE_RPCSVC_MOUNT_H */
+
+#ifdef HAVE_MOUNT_H
+# include <mount.h>
+#endif /* HAVE_MOUNT_H */
+
+#ifdef HAVE_NFS_NFS_GFS_H
+# include <nfs/nfs_gfs.h>
+#endif /* HAVE_NFS_NFS_GFS_H */
+
+#ifdef HAVE_NFS_MOUNT_H
+# include <nfs/mount.h>
+#endif /* HAVE_NFS_MOUNT_H */
+
+#ifdef HAVE_SYS_FS_NFS_CLNT_H
+# include <sys/fs/nfs_clnt.h>
+#endif /* HAVE_SYS_FS_NFS_CLNT_H */
+
+#ifdef HAVE_LINUX_NFS_MOUNT_H
+# define _LINUX_NFS_H
+# define _LINUX_NFS2_H
+# define _LINUX_NFS3_H
+# define _LINUX_NFS_FS_H
+# define _LINUX_IN_H
+# include <linux/nfs_mount.h>
+#endif /* HAVE_LINUX_NFS_MOUNT_H */
diff --git a/contrib/amd/ldap-id.ms b/contrib/amd/ldap-id.ms
new file mode 100644
index 0000000..54ba0af
--- /dev/null
+++ b/contrib/amd/ldap-id.ms
@@ -0,0 +1,306 @@
+.pl 10.0i
+.po 0
+.ll 8.5i
+.lt 8.5i
+.nr LL 8.5i
+.nr LT 8.5i
+.ds LF Johansson
+.ds RF [Page %]
+.ds CF
+.ds LH Internet draft
+.ds RH 30 March 1998
+.ds CH Berkeley AMD LDAP Schema
+.hy 0
+.ad l
+.in 0
+INTERNET-DRAFT Leif Johansson
+Intented Category: Experimental Stockholm University
+
+
+
+.ce
+A directory (X.500 and LDAPv3) schema for Berkely automounter
+
+
+.ti 0
+1. Status of this Memo
+
+.fi
+.in 3
+This memo describes a directory (LDAP or X.500) schema for storing
+amd (Berkely-style automounter) mount info maps. The schema is currently
+beeing supported by the (beta version of the) am-utils version 6 package
+[AMUTILS].
+
+.ti 0
+2. Overview and Rationale
+
+Directory services such as X.500 [X500] or LDAP [RFC2251] are a natural
+choice of repository for amd mount map databases. All Object Identifiers
+in this document are prefixed by amdSchema-id to be assigned later. The
+relation between this schema and the automount schema elements in [HOWARD]
+are mostly superficial. The model for the elements in [HOWARD] was the SUN
+automounter which has quite a different syntax for mount maps. Furthermore
+the intended usage of this schema differs from that of [HOWARD] in many
+respects.
+
+.ti 0
+3. DSA requirements
+
+Directory servers implementing this schema SHOULD maintain the
+modifyTimestamp operational attribute. If not the amdMapCacheTtl
+attribute SHOULD be set to 0 indicating to clients that caching of
+map entries SHOULD be turned off. Clients wishing to use the amdMap
+schema MAY use the modifyTimestamp information to set the ttl for
+internal caching schemes. A value of 0 for the amdMapCacheTtl must
+result in clients turning off any local caching.
+
+.ti 0
+4. Syntax definitions
+
+The following attribute syntax is defined in this document:
+
+ amdlocationlist
+
+This syntax represents a amd map value. This is the syntax expressed
+in BNF using definitions from [RFC2252]:
+
+ amdlocationlist = amdlocationselection |
+ amdlocationlist whsp "||" whsp amdlocationselection
+
+ amdlocationselection = amdlocation |
+ amdlocationselection whsp amdlocation
+
+ amdlocation = amdlocationinfo |
+ "-" amdlocationinfo |
+ "-"
+
+ amdlocationinfo = seloropt |
+ amdlocationinfo ";" seloropt |
+ ";"
+
+ seloropt = seletion |
+ optass
+
+ selection = keystring "==" printablestring
+ keystring "!=" printablestring
+
+ optass = keystring \":=\" printablestring
+
+X.500 servers or LDAPv3 servers (supporting the binary attribute
+option) may use the following syntax definition:
+
+ AmdLocationList ::= SEQUENCE OF {
+ SEQUENCE OF {
+ location AmdLocation
+ }
+ }
+
+ AmdLocation ::= SET OF {
+ CHOICE {
+ location [0] AmdLocationInfo
+ notlocation [1] AmdLocationInfo
+ not [2] NULL
+ }
+ }
+
+ AmdLocationInfo ::= SET OF {
+ CHOICE {
+ selection [0] AmdSelection
+ option [1] AmdOption
+ }
+ }
+
+ AmdSelection ::= CHOICE {
+ eq [0] AttributeAndValue
+ ne [1] AttributeAndValue
+ }
+
+ AmdOption ::= AttributeAndValue
+
+ AttributeAndValue ::= SEQUENCE {
+ attribute IA5String
+ value IA5String
+ }
+
+.ti 0
+5. Attribute types
+
+The following attribute types are defined in this document:
+
+ amdMapName
+ amdMapCacheTtl
+ amdMapEntry
+ amdMapEntryKey
+ amdMapEntryValue
+
+ amdSchema-a OBJECT IDENTIFIER ::= { amdSchema-id 1 }
+
+ amdMapName
+ ATTRIBUTE ::= {
+ WITH SYNTAX IA5String
+ EQUALITY MATCHING RULE caseIgoreExactMatch
+ --ID { amdSchema-a 1 }
+ DESCRIPTION
+ "This attribute is the symbolic and in the naming
+ context unique name of an amd map. This corresponds
+ in the case of a flat file database to the name of
+ the file or the mount-point of the map."
+ }
+
+
+ amdMapCacheTtl
+ ATTRIBUTE ::= {
+ WITH SYNTAX Integer
+ EQUALITY MATCHING RULE integerExactMatch
+ --ID { amdSchema-a 2 }
+ SINGLE VALUED
+ DESCRIPTION
+ "The maximum time-to-live for the entries in this
+ map. After this many milliseconds the map has to
+ be cleared from local caches and reloaded. A value
+ of 0 disables caching."
+ }
+
+ amdMapEntry
+ ATTRIBUTE ::= {
+ WITH SYNTAX DistinguishedName
+ EQUALITY MATHCING RULE dNCaseIgnoreExactMatch
+ --ID { amdSchema-a 3 }
+ DESCRIPTION
+ "A multivalued attribute listing the distinguished
+ names of the amdMapEntries making up this amdMap
+ object."
+ }
+
+ amdMapEntryKey ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX IA5String
+ EQUALITY MATCHING RULE stringExactMatch
+ --ID { amdSchema-a 4 }
+ SINGLE VALUED
+ DESCRIPTION
+ "The value of this attribute is usually the name of
+ a mountpoint for this amdMapEntry."
+ }
+
+ amdMapEntryValue ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX AmdLocationList
+ --ID { amdSchema-a 5 }
+ DESCRIPTION
+ "This is the actual mount information for the amdMapEntry
+ using the syntax described above."
+ }
+
+ amdMapEntryKey ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX IA5String
+ EQUALITY MATCHING RULE stringExactMatch
+ --ID { amdSchema-a 4 }
+ SINGLE VALUED
+ DESCRIPTION
+ "The value of this attribute is usually the name of
+ a mountpoint for this amdMapEntry."
+ }
+
+ amdMapEntryValue ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX AmdLocationList
+ --ID { amdSchema-a 5 }
+ DESCRIPTION
+ "This is the actual mount information for the amdMapEntry
+ using the syntax described above."
+ }
+
+.ti 0
+6. Object classes
+
+The following object classes are defined in this document:
+
+ amdMap
+ amdMapEntry
+
+defined as follows:
+
+ amdSchema-oc ::= { amdSchema-id 2 }
+
+ amdMap OBJECT-CLASS ::= {
+ SUBCLASS OF { top }
+ KIND auxiliary
+ --ID { amdSchema-oc 1 }
+ MAY CONTAIN { amdMapCacheTtl , cn }
+ MUST CONTAIN { amdMapName , amdMapEntry }
+ }
+
+ amdMapEntry OBJECT-CLASS ::= {
+ SUBCLASS OF { top }
+ KIND structural
+ --ID { amdSchema-oc 2 }
+ MUST CONTAIN {
+ amdMapName ,
+ amdEntryKey ,
+ amdEntryValue ,
+ }
+ MAY CONTAIN { cn }
+ DESCRIPTION
+ "An entry of this object class describes mount
+ information relative to a certain amdMap entry"
+ }
+
+.ti 0
+7. Examples
+
+
+
+.ti 0
+8. Security Considerations
+
+Due to the security problems posed by NFS care should be taken not to
+advertise exported filesystems. Therefore it is often desirable to limit
+access to entries carrying amd mount map information to those systems
+to which the corresponding filesystems have been exported.
+
+.ti 0
+9. References
+
+ [AMUTILS]
+ am-utils homepage: http://shekel.cs.columbia.edu/~erez/am-utils.html
+
+ [RFC2251]
+ M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access
+ Protocol (v3)", RFC 2251, December 1997.
+
+ [RFC2252]
+ M. Wahl, A. Coulbeck, T. Howes, S. Kille, "Lightweight Directory
+ Access Protocol (v3): Attribute Syntax Definitions", RFC 2252,
+ December 1997.
+
+ [RFC2253]
+ M. Wahl, S. Kille, T. Howes, "Lightweight Directory Access
+ Protocol (v3): UTF-8 String Representation of Distinguished
+ Names", RFC 2253, December 1997.
+
+ [HOWARD]
+ Luke Howard, "An Approach for Using LDAP as a Network
+ Information Service", draft-howard-nis-schema-??.txt, Internet
+ draft.
+
+ [X500]
+ ITU something or other.
+
+.in 3
+
+
+.ti 0
+Author's Address
+
+.nf
+
+Leif Johansson
+Department of Mathematics
+Stockholm University
+S-106 91 Stockholm
+ SWEDEN
+
+Email: leifj@matematik.su.se
diff --git a/contrib/amd/ldap-id.txt b/contrib/amd/ldap-id.txt
new file mode 100644
index 0000000..162f663
--- /dev/null
+++ b/contrib/amd/ldap-id.txt
@@ -0,0 +1,360 @@
+
+
+
+
+
+
+INTERNET-DRAFT Leif Johansson
+Intented Category: Experimental Stockholm University
+
+
+
+ A directory (X.500 and LDAPv3) schema for Berkely automounter
+
+
+1. Status of this Memo
+
+ This memo describes a directory (LDAP or X.500) schema for storing amd (Berkely-
+ style automounter) mount info maps. The schema is currently beeing supported by
+ the (beta version of the) am-utils version 6 package [AMUTILS].
+
+2. Overview and Rationale
+
+ Directory services such as X.500 [X500] or LDAP [RFC2251] are a natural choice of
+ repository for amd mount map databases. All Object Identifiers in this document
+ are prefixed by amdSchema-id to be assigned later. The relation between this
+ schema and the automount schema elements in [HOWARD] are mostly superficial. The
+ model for the elements in [HOWARD] was the SUN automounter which has quite a
+ different syntax for mount maps. Furthermore the intended usage of this schema
+ differs from that of [HOWARD] in many respects.
+
+3. DSA requirements
+
+ Directory servers implementing this schema SHOULD maintain the modifyTimestamp
+ operational attribute. If not the amdMapCacheTtl attribute SHOULD be set to 0
+ indicating to clients that caching of map entries SHOULD be turned off. Clients
+ wishing to use the amdMap schema MAY use the modifyTimestamp information to set
+ the ttl for internal caching schemes. A value of 0 for the amdMapCacheTtl must
+ result in clients turning off any local caching.
+
+4. Syntax definitions
+
+ The following attribute syntax is defined in this document:
+
+ amdlocationlist
+
+ This syntax represents a amd map value. This is the syntax expressed in BNF using
+ definitions from [RFC2252]:
+
+ amdlocationlist = amdlocationselection |
+ amdlocationlist whsp "||" whsp amdlocationselection
+
+ amdlocationselection = amdlocation |
+ amdlocationselection whsp amdlocation
+
+
+
+
+Johansson [Page 1]
+
+
+
+
+
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
+
+
+ amdlocation = amdlocationinfo |
+ "-" amdlocationinfo |
+ "-"
+
+ amdlocationinfo = seloropt |
+ amdlocationinfo ";" seloropt |
+ ";"
+
+ seloropt = seletion |
+ optass
+
+ selection = keystring "==" printablestring
+ keystring "!=" printablestring
+
+ optass = keystring
+
+ X.500 servers or LDAPv3 servers (supporting the binary attribute option) may use
+ the following syntax definition:
+
+ AmdLocationList ::= SEQUENCE OF {
+ SEQUENCE OF {
+ location AmdLocation
+ }
+ }
+
+ AmdLocation ::= SET OF {
+ CHOICE {
+ location [0] AmdLocationInfo
+ notlocation [1] AmdLocationInfo
+ not [2] NULL
+ }
+ }
+
+ AmdLocationInfo ::= SET OF {
+ CHOICE {
+ selection [0] AmdSelection
+ option [1] AmdOption
+ }
+ }
+
+ AmdSelection ::= CHOICE {
+ eq [0] AttributeAndValue
+ ne [1] AttributeAndValue
+ }
+
+ AmdOption ::= AttributeAndValue
+ AttributeAndValue ::= SEQUENCE {
+ attribute IA5String
+
+
+
+Johansson [Page 2]
+
+
+
+
+
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
+
+
+ value IA5String
+ }
+
+5. Attribute types
+
+ The following attribute types are defined in this document:
+
+ amdMapName
+ amdMapCacheTtl
+ amdMapEntry
+ amdMapEntryKey
+ amdMapEntryValue
+
+ amdSchema-a OBJECT IDENTIFIER ::= { amdSchema-id 1 }
+
+ amdMapName ATTRIBUTE ::= {
+ WITH SYNTAX IA5String
+ EQUALITY MATCHING RULE caseIgoreExactMatch
+ --ID { amdSchema-a 1 }
+ DESCRIPTION
+ "This attribute is the symbolic and in the naming
+ context unique name of an amd map. This corresponds
+ in the case of a flat file database to the name of
+ the file or the mount-point of the map."
+ }
+
+
+ amdMapCacheTtl
+ ATTRIBUTE ::= {
+ WITH SYNTAX Integer
+ EQUALITY MATCHING RULE integerExactMatch
+ --ID { amdSchema-a 2 }
+ SINGLE VALUED
+ DESCRIPTION
+ "The maximum time-to-live for the entries in this
+ map. After this many milliseconds the map has to
+ be cleared from local caches and reloaded. A value
+ of 0 disables caching."
+ }
+
+ amdMapEntry
+ ATTRIBUTE ::= {
+ WITH SYNTAX DistinguishedName
+ EQUALITY MATHCING RULE dNCaseIgnoreExactMatch
+ --ID { amdSchema-a 3 }
+ DESCRIPTION
+ "A multivalued attribute listing the distinguished
+ names of the amdMapEntries making up this amdMap
+
+
+
+Johansson [Page 3]
+
+
+
+
+
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
+
+
+ object."
+ }
+
+ amdMapEntryKey ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX IA5String
+ EQUALITY MATCHING RULE stringExactMatch
+ --ID { amdSchema-a 4 }
+ SINGLE VALUED
+ DESCRIPTION
+ "The value of this attribute is usually the name of
+ a mountpoint for this amdMapEntry."
+ }
+
+ amdMapEntryValue ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX AmdLocationList
+ --ID { amdSchema-a 5 }
+ DESCRIPTION
+ "This is the actual mount information for the amdMapEntry
+ using the syntax described above."
+ }
+
+ amdMapEntryKey ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX IA5String
+ EQUALITY MATCHING RULE stringExactMatch
+ --ID { amdSchema-a 4 }
+ SINGLE VALUED
+ DESCRIPTION
+ "The value of this attribute is usually the name of
+ a mountpoint for this amdMapEntry."
+ }
+
+ amdMapEntryValue ::= {
+ ATTRIBUTE ::= {
+ WITH SYNTAX AmdLocationList
+ --ID { amdSchema-a 5 }
+ DESCRIPTION
+ "This is the actual mount information for the amdMapEntry
+ using the syntax described above."
+ }
+
+6. Object classes
+
+ The following object classes are defined in this document:
+
+ amdMap
+
+
+
+Johansson [Page 4]
+
+
+
+
+
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
+
+
+ amdMapEntry
+
+ defined as follows:
+
+ amdSchema-oc ::= { amdSchema-id 2 }
+
+ amdMap OBJECT-CLASS ::= {
+ SUBCLASS OF { top }
+ KIND auxiliary
+ --ID { amdSchema-oc 1 }
+ MAY CONTAIN { amdMapCacheTtl , cn }
+ MUST CONTAIN { amdMapName , amdMapEntry }
+ }
+
+ amdMapEntry OBJECT-CLASS ::= {
+ SUBCLASS OF { top }
+ KIND structural
+ --ID { amdSchema-oc 2 }
+ MUST CONTAIN {
+ amdMapName ,
+ amdEntryKey ,
+ amdEntryValue ,
+ } MAY CONTAIN
+ { cn } DESCRIPTION "An entry of this
+ object class describes mount information relative to a
+ certain amdMap entry"
+ }
+
+7. Examples
+
+
+
+8. Security Considerations
+
+ Due to the security problems posed by NFS care should be taken not to advertise
+ exported filesystems. Therefore it is often desirable to limit access to entries
+ carrying amd mount map information to those systems to which the corresponding
+ filesystems have been exported.
+
+9. References
+
+ [AMUTILS]
+ am-utils homepage: http://shekel.cs.columbia.edu/~erez/am-utils.html
+
+ [RFC2251]
+ M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access
+ Protocol (v3)", RFC 2251, December 1997.
+
+
+
+
+Johansson [Page 5]
+
+
+
+
+
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
+
+
+ [RFC2252]
+ M. Wahl, A. Coulbeck, T. Howes, S. Kille, "Lightweight Directory
+ Access Protocol (v3): Attribute Syntax Definitions", RFC 2252,
+ December 1997.
+
+ [RFC2253]
+ M. Wahl, S. Kille, T. Howes, "Lightweight Directory Access
+ Protocol (v3): UTF-8 String Representation of Distinguished
+ Names", RFC 2253, December 1997.
+
+ [HOWARD]
+ Luke Howard, "An Approach for Using LDAP as a Network
+ Information Service", draft-howard-nis-schema-??.txt, Internet
+ draft.
+
+ [X500]
+ ITU something or other.
+
+
+
+Author's Address
+
+
+ Leif Johansson
+ Department of Mathematics
+ Stockholm University
+ S-106 91 Stockholm
+ SWEDEN
+
+ Email: leifj@matematik.su.se
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Johansson [Page 6]
+
+
diff --git a/contrib/amd/libamu/amu.h b/contrib/amd/libamu/amu.h
index a22371e..3769652 100644
--- a/contrib/amd/libamu/amu.h
+++ b/contrib/amd/libamu/amu.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amu.h,v 1.2 1999/01/10 21:54:36 ezk Exp $
+ * $Id: amu.h,v 1.3.2.1 2001/01/10 03:23:38 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/hasmntopt.c b/contrib/amd/libamu/hasmntopt.c
index 5f19e71..9e76752 100644
--- a/contrib/amd/libamu/hasmntopt.c
+++ b/contrib/amd/libamu/hasmntopt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@ n * modification, are permitted provided that the following conditions
*
* %W% (Berkeley) %G%
*
- * $Id: hasmntopt.c,v 1.2 1999/01/10 21:54:37 ezk Exp $
+ * $Id: hasmntopt.c,v 1.3.2.1 2001/01/10 03:23:39 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/misc_rpc.c b/contrib/amd/libamu/misc_rpc.c
index fa402c3..616ceed 100644
--- a/contrib/amd/libamu/misc_rpc.c
+++ b/contrib/amd/libamu/misc_rpc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: misc_rpc.c,v 1.2 1999/01/10 21:54:37 ezk Exp $
+ * $Id: misc_rpc.c,v 1.4.2.1 2001/01/10 03:23:39 ezk Exp $
*
*/
@@ -166,3 +166,39 @@ make_rpc_packet(char *buf, int buflen, u_long proc, struct rpc_msg *mp, voidp ar
return len;
}
+
+
+/* get uid/gid from RPC credentials */
+int
+getcreds(struct svc_req *rp, uid_t *u, gid_t *g, SVCXPRT *nfsxprt)
+{
+ struct authunix_parms *aup = (struct authunix_parms *) NULL;
+#ifdef HAVE_RPC_AUTH_DES_H
+ struct authdes_cred *adp;
+#endif /* HAVE_RPC_AUTH_DES_H */
+
+ switch (rp->rq_cred.oa_flavor) {
+
+ case AUTH_UNIX:
+ aup = (struct authunix_parms *) rp->rq_clntcred;
+ *u = aup->aup_uid;
+ *g = aup->aup_gid;
+ break;
+
+#ifdef HAVE_RPC_AUTH_DES_H
+ case AUTH_DES:
+ adp = (struct authdes_cred *) rp->rq_clntcred;
+ *g = INVALIDID; /* some unknown group id */
+ if (sscanf(adp->adc_fullname.name, "unix.%lu@", (u_long *) u) == 1)
+ break;
+ /* fall through */
+#endif /* HAVE_RPC_AUTH_DES_H */
+
+ default:
+ *u = *g = INVALIDID; /* just in case */
+ svcerr_weakauth(nfsxprt);
+ return -1;
+ }
+
+ return 0; /* everything is ok */
+}
diff --git a/contrib/amd/libamu/mount_fs.c b/contrib/amd/libamu/mount_fs.c
index eb9f8b1..c914663 100644
--- a/contrib/amd/libamu/mount_fs.c
+++ b/contrib/amd/libamu/mount_fs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mount_fs.c,v 1.8 1999/09/18 08:38:06 ezk Exp $
+ * $Id: mount_fs.c,v 1.11.2.5 2001/04/14 21:08:25 ezk Exp $
*
*/
@@ -105,6 +105,14 @@ struct opt_tab mnt_flags[] =
{MNTTAB_OPT_OVERLAY, MNT2_GEN_OPT_OVERLAY},
#endif /* defined(MNT2_GEN_OPT_OVERLAY) && defined(MNTTAB_OPT_OVERLAY) */
+#if defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST)
+ {MNTTAB_OPT_PROPLIST, MNT2_NFS_OPT_PROPLIST},
+#endif /* defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST) */
+
+#if defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK)
+ {MNTTAB_OPT_NOLOCK, MNT2_NFS_OPT_NONLM},
+#endif /* defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK) */
+
{0, 0}
};
@@ -177,14 +185,10 @@ mount_fs(mntent_t *mnt, int flags, caddr_t mnt_data, int retry, MTYPE_TYPE type,
char optsbuf[48];
# endif /* defined(MNTTAB_OPT_DEV) || (defined(HAVE_FS_NFS3) && defined(MNTTAB_OPT_VERS)) || defined(MNTTAB_OPT_PROTO) */
#endif /* MOUNT_TABLE_ON_FILE */
-#ifdef DEBUG
- char buf[80]; /* buffer for sprintf */
-#endif /* DEBUG */
#ifdef DEBUG
- sprintf(buf, "%s%s%s",
- "%s fstype ", MTYPE_PRINTF_TYPE, " (%s) flags %#x (%s)");
- dlog(buf, mnt->mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts);
+ dlog("%s fstype " MTYPE_PRINTF_TYPE " (%s) flags %#x (%s)",
+ mnt->mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts);
#endif /* DEBUG */
again:
@@ -384,6 +388,9 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_
# ifdef MNT2_NFS_OPT_NFSV3
nap->flags |= MNT2_NFS_OPT_NFSV3;
# endif /* MNT2_NFS_OPT_NFSV3 */
+# ifdef MNT2_NFS_OPT_VER3
+ nap->flags |= MNT2_NFS_OPT_VER3;
+# endif /* MNT2_NFS_OPT_VER3 */
} else
#endif /* HAVE_FS_NFS3 */
NFS_FH_DREF(nap->NFS_FH_FIELD, &(fhp->v2.fhs_fh));
@@ -645,6 +652,12 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_
* Either turn on the "allow interrupts" option, or
* turn off the "disallow interrupts" option"
*/
+# ifdef MNT2_NFS_OPT_INTR
+ nap->flags |= MNT2_NFS_OPT_INTR;
+# endif /* MNT2_NFS_OPT_INTR */
+# ifdef MNT2_NFS_OPT_NOINTR
+ nap->flags &= ~MNT2_NFS_OPT_NOINTR;
+# endif /* MNT2_NFS_OPT_NOINTR */
# ifdef MNT2_NFS_OPT_INT
nap->flags |= MNT2_NFS_OPT_INT;
# endif /* MNT2_NFS_OPT_INT */
@@ -690,6 +703,11 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_
}
#endif /* MNT2_NFS_OPT_POSIX && MNTTAB_OPT_POSIX */
+#if defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST)
+ if (hasmntopt(mntp, MNTTAB_OPT_PROPLIST) != NULL)
+ nap->flags |= MNT2_NFS_OPT_PROPLIST;
+#endif /* defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST) */
+
#if defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS)
nap->maxgrouplist = hasmntval(mntp, MNTTAB_OPT_MAXGROUPS);
if (nap->maxgrouplist != NULL)
@@ -725,7 +743,7 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp)
* Don't let the kernel cache symbolic links we generate, or else lookups
* will bypass amd and fail to remount stuff as needed.
*/
- plog(XLOG_INFO, "turning on NFS option symttl and setting value to %d", 0);
+ plog(XLOG_INFO, "turning on NFS option symttl and setting value to 0");
nap->flags |= MNT2_NFS_OPT_SYMTTL;
nap->symttl = 0;
#endif /* MNT2_NFS_OPT_SYMTTL */
@@ -747,8 +765,8 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp)
#ifdef MNT2_NFS_OPT_DUMBTIMR
/*
- * Don't let the kernel start computing throughput of Amd The numbers will
- * be meaningless because of the way Amd does mount retries.
+ * Don't let the kernel start computing throughput of Amd. The numbers
+ * will be meaningless because of the way Amd does mount retries.
*/
plog(XLOG_INFO, "%s: disabling nfs congestion window", mntp->mnt_dir);
nap->flags |= MNT2_NFS_OPT_DUMBTIMR;
diff --git a/contrib/amd/libamu/mtab.c b/contrib/amd/libamu/mtab.c
index 3bcc38d..1fb3a33 100644
--- a/contrib/amd/libamu/mtab.c
+++ b/contrib/amd/libamu/mtab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mtab.c,v 1.2 1999/01/10 21:54:37 ezk Exp $
+ * $Id: mtab.c,v 1.3.2.3 2001/04/14 21:08:25 ezk Exp $
*
*/
@@ -101,6 +101,43 @@ free_mntlist(mntlist *mp)
/*
+ * Utility routine which returns a pointer to whatever follows an = in a
+ * string. Returns null if = is not found in the string.
+ */
+char *
+haseq(char *instr)
+{
+ if (instr) {
+ char *eq = strchr(instr, '=');
+ if (eq) return ++eq;
+ }
+ return NULL;
+}
+
+
+/*
+ * Utility routine which returns a pointer to whatever
+ * follows an = in a mount option. Returns null if option
+ * doesn't exist or doesn't have an '='. Won't fall for opt,foo=.
+ */
+char *
+hasmnteq(mntent_t *mnt, char *opt)
+{
+ if (mnt && opt) { /* disallow null input pointers */
+ if ( *opt ) { /* disallow the null string as an opt */
+ char *str = hasmntopt(mnt, opt);
+ if ( str ) { /* option was there */
+ char *eq = str + strlen(opt); /* Look at char just after option */
+ if (*eq == '=') /* Is it '=' ? */
+ return ++eq; /* If so, return pointer to remaining str */
+ }
+ }
+ }
+ return NULL;
+}
+
+
+/*
* Utility routine which determines the value of a
* numeric option in the mount options (such as port=%d).
* Returns 0 if the option is not specified.
@@ -110,12 +147,31 @@ hasmntval(mntent_t *mnt, char *opt)
{
char *str = hasmntopt(mnt, opt);
- if (str) {
- char *eq = strchr(str, '=');
- if (eq)
- return atoi(eq + 1);
- else
- plog(XLOG_USER, "bad numeric option \"%s\" in \"%s\"", opt, str);
+ if (str) { /* The option was there */
+
+ char *eq = hasmnteq(mnt, opt);
+
+ if (eq) { /* and had an = after it */
+
+ char *endptr = NULL;
+ long int i = strtol(eq,&endptr,0); /* hex and octal allowed ;-) */
+
+ if ( (! endptr) || /* endptr == NULL means all chars valid */
+ /*
+ * endptr set means strtol saw a non-digit. If the
+ * non-digit is a comma, it's probably the start of the next
+ * option. If the comma is the first char though, complain about
+ * it (foo=,bar is made noticeable by this).
+ */
+ ((endptr == strchr(eq, ',')) && (endptr != eq))
+ )
+ return((int) i);
+ /* whatever was after = wasn't a number */
+ plog(XLOG_MAP, "invalid numeric option in \"%s\": \"%s\"", opt, str);
+ } else {
+ /* No argument to option (= was missing) */
+ plog(XLOG_MAP, "numeric option to \"%s\" missing", opt);
+ }
}
return 0;
}
diff --git a/contrib/amd/libamu/nfs_prot_xdr.c b/contrib/amd/libamu/nfs_prot_xdr.c
index 874f57a..c126471 100644
--- a/contrib/amd/libamu/nfs_prot_xdr.c
+++ b/contrib/amd/libamu/nfs_prot_xdr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_xdr.c,v 1.2 1999/01/10 21:54:38 ezk Exp $
+ * $Id: nfs_prot_xdr.c,v 1.3.2.1 2001/01/10 03:23:40 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/util.c b/contrib/amd/libamu/util.c
index 72fcdad..ff84997 100644
--- a/contrib/amd/libamu/util.c
+++ b/contrib/amd/libamu/util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: util.c,v 1.2 1999/01/10 21:54:39 ezk Exp $
+ * $Id: util.c,v 1.3.2.1 2001/01/10 03:23:41 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/wire.c b/contrib/amd/libamu/wire.c
index c8ed892..25a4427 100644
--- a/contrib/amd/libamu/wire.c
+++ b/contrib/amd/libamu/wire.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wire.c,v 1.5 1999/09/08 23:36:52 ezk Exp $
+ * $Id: wire.c,v 1.8.2.5 2001/01/10 03:23:41 ezk Exp $
*
*/
@@ -60,7 +60,6 @@
#include <am_defs.h>
#include <amu.h>
-
#ifdef HAVE_IFADDRS_H
#include <ifaddrs.h>
#endif /* HAVE_IFADDRS_H */
@@ -169,7 +168,17 @@ getwire_lookup(u_long address, u_long netmask, int ishost)
u_char addr[4];
if (irs_gen == NULL)
+#ifdef irs_irp_acc
+ /*
+ * bsdi4 added another argument to this function, without changing
+ * its name. The irs_irp_acc is the one (hacky) distinguishing
+ * feature found in <irs.h> that can differentiate between bsdi3 and
+ * bsdi4.
+ */
+ irs_gen = irs_gen_acc("", NULL);
+#else /* not irs_irp_acc */
irs_gen = irs_gen_acc("");
+#endif /* not irs_irp_acc */
if (irs_gen && irs_nw == NULL)
irs_nw = (*irs_gen->nw_map)(irs_gen);
net = ntohl(address) & (mask = ntohl(netmask));
@@ -233,6 +242,12 @@ getwire_lookup(u_long address, u_long netmask, int ishost)
/* fill in network name (string) */
al->ip_net_name = strdup(s);
+ /* Let's be cautious here about buffer overflows -Ion */
+ if (strlen(s) > MAXHOSTNAMELEN) {
+ al->ip_net_name[MAXHOSTNAMELEN] = '\0';
+ plog(XLOG_WARNING, "Long hostname %s truncated to %d characters",
+ s, MAXHOSTNAMELEN);
+ }
return (al);
}
@@ -376,7 +391,7 @@ void
getwire(char **name1, char **number1)
{
struct ifconf ifc;
- struct ifreq *ifr;
+ struct ifreq *ifr, ifrpool;
caddr_t cp, cplim;
int fd = -1;
u_long address;
@@ -430,8 +445,10 @@ getwire(char **name1, char **number1)
/*
* Scan the list looking for a suitable interface
*/
- for (cp = buf; cp < cplim; cp += SIZE(ifr)) {
- ifr = (struct ifreq *) cp;
+ for (cp = buf; cp < cplim; /* increment in the loop body */) {
+ memcpy(&ifrpool, cp, sizeof(ifrpool));
+ ifr = &ifrpool;
+ cp += SIZE(ifr);
if (ifr->ifr_addr.sa_family != AF_INET)
continue;
diff --git a/contrib/amd/libamu/xdr_func.c b/contrib/amd/libamu/xdr_func.c
index deeb205..1e8085d 100644
--- a/contrib/amd/libamu/xdr_func.c
+++ b/contrib/amd/libamu/xdr_func.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: xdr_func.c,v 1.2 1999/01/10 21:54:39 ezk Exp $
+ * $Id: xdr_func.c,v 1.4.2.4 2001/02/02 18:28:27 ezk Exp $
*
*/
@@ -51,6 +51,7 @@
#include <am_defs.h>
#include <amu.h>
+
/*
* MACROS:
*/
@@ -77,7 +78,7 @@ bool_t
xdr_attrstat(XDR *xdrs, nfsattrstat *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_attrstat:");
#endif /* DEBUG */
@@ -103,7 +104,7 @@ bool_t
xdr_createargs(XDR *xdrs, nfscreateargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_createargs:");
#endif /* DEBUG */
@@ -123,7 +124,7 @@ bool_t
xdr_dirlist(XDR *xdrs, nfsdirlist *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_dirlist:");
#endif /* DEBUG */
@@ -143,7 +144,7 @@ bool_t
xdr_diropargs(XDR *xdrs, nfsdiropargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_diropargs:");
#endif /* DEBUG */
@@ -163,7 +164,7 @@ bool_t
xdr_diropokres(XDR *xdrs, nfsdiropokres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_diropokres:");
#endif /* DEBUG */
@@ -183,7 +184,7 @@ bool_t
xdr_diropres(XDR *xdrs, nfsdiropres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_diropres:");
#endif /* DEBUG */
@@ -209,7 +210,7 @@ bool_t
xdr_dirpath(XDR *xdrs, dirpath *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_dirpath:");
#endif /* DEBUG */
@@ -226,7 +227,7 @@ bool_t
xdr_entry(XDR *xdrs, nfsentry *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_entry:");
#endif /* DEBUG */
@@ -252,18 +253,14 @@ bool_t
xdr_exportnode(XDR *xdrs, exportnode *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_exportnode:");
#endif /* DEBUG */
if (!xdr_dirpath(xdrs, &objp->ex_dir)) {
return (FALSE);
}
- /*
- * This cast to (groups) is needed for Irix6. If you change it, it
- * may produce a warning/error on other systems.
- */
- if (!xdr_groups(xdrs, (groups) &objp->ex_groups)) {
+ if (!xdr_groups(xdrs, &objp->ex_groups)) {
return (FALSE);
}
if (!xdr_exports(xdrs, &objp->ex_next)) {
@@ -279,7 +276,7 @@ bool_t
xdr_exports(XDR *xdrs, exports *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_exports:");
#endif /* DEBUG */
@@ -296,7 +293,7 @@ bool_t
xdr_fattr(XDR *xdrs, nfsfattr *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_fattr:");
#endif /* DEBUG */
@@ -352,7 +349,7 @@ bool_t
xdr_fhandle(XDR *xdrs, fhandle objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_fhandle:");
#endif /* DEBUG */
@@ -369,7 +366,7 @@ bool_t
xdr_fhstatus(XDR *xdrs, fhstatus *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_fhstatus:");
#endif /* DEBUG */
@@ -389,7 +386,7 @@ bool_t
xdr_filename(XDR *xdrs, filename *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_filename:");
#endif /* DEBUG */
@@ -406,7 +403,7 @@ bool_t
xdr_ftype(XDR *xdrs, nfsftype *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_ftype:");
#endif /* DEBUG */
@@ -423,18 +420,14 @@ bool_t
xdr_groupnode(XDR *xdrs, groupnode *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_groupnode:");
#endif /* DEBUG */
if (!xdr_name(xdrs, &objp->gr_name)) {
return (FALSE);
}
- /*
- * This cast to (groups) is needed for Irix6. If you change it, it
- * may produce a warning/error on other systems.
- */
- if (!xdr_groups(xdrs, (groups) &objp->gr_next)) {
+ if (!xdr_groups(xdrs, &objp->gr_next)) {
return (FALSE);
}
return (TRUE);
@@ -444,10 +437,10 @@ xdr_groupnode(XDR *xdrs, groupnode *objp)
#ifndef HAVE_XDR_GROUPS
bool_t
-xdr_groups(XDR *xdrs, groups objp)
+xdr_groups(XDR *xdrs, groups *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_groups:");
#endif /* DEBUG */
@@ -464,7 +457,7 @@ bool_t
xdr_linkargs(XDR *xdrs, nfslinkargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_linkargs:");
#endif /* DEBUG */
@@ -484,7 +477,7 @@ bool_t
xdr_mountbody(XDR *xdrs, mountbody *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mountbody:");
#endif /* DEBUG */
@@ -507,7 +500,7 @@ bool_t
xdr_mountlist(XDR *xdrs, mountlist *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mountlist:");
#endif /* DEBUG */
@@ -531,7 +524,7 @@ bool_t
xdr_fhandle3(XDR *xdrs, fhandle3 *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_fhandle3:");
#endif /* DEBUG */
@@ -548,7 +541,7 @@ bool_t
xdr_mountstat3(XDR *xdrs, mountstat3 *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mountstat3:");
#endif /* DEBUG */
@@ -562,7 +555,7 @@ bool_t
xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mountres3_ok:");
#endif /* DEBUG */
@@ -583,7 +576,7 @@ bool_t
xdr_mountres3(XDR *xdrs, mountres3 *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mountres3:");
#endif /* DEBUG */
@@ -604,7 +597,7 @@ bool_t
xdr_name(XDR *xdrs, name *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_name:");
#endif /* DEBUG */
@@ -621,7 +614,7 @@ bool_t
xdr_nfs_fh(XDR *xdrs, am_nfs_fh *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_nfs_fh:");
#endif /* DEBUG */
@@ -638,7 +631,7 @@ bool_t
xdr_nfscookie(XDR *xdrs, nfscookie objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_nfscookie:");
#endif /* DEBUG */
@@ -655,7 +648,7 @@ bool_t
xdr_nfspath(XDR *xdrs, nfspath *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_nfspath:");
#endif /* DEBUG */
@@ -672,7 +665,7 @@ bool_t
xdr_nfsstat(XDR *xdrs, nfsstat *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_nfsstat:");
#endif /* DEBUG */
@@ -689,7 +682,7 @@ bool_t
xdr_nfstime(XDR *xdrs, nfstime *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_nfstime:");
#endif /* DEBUG */
@@ -709,7 +702,7 @@ bool_t
xdr_pointer(register XDR *xdrs, char **objpp, u_int obj_size, XDRPROC_T_TYPE xdr_obj)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_pointer:");
#endif /* DEBUG */
@@ -735,7 +728,7 @@ bool_t
xdr_readargs(XDR *xdrs, nfsreadargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_readargs:");
#endif /* DEBUG */
@@ -761,7 +754,7 @@ bool_t
xdr_readdirargs(XDR *xdrs, nfsreaddirargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_readdirargs:");
#endif /* DEBUG */
@@ -784,7 +777,7 @@ bool_t
xdr_readdirres(XDR *xdrs, nfsreaddirres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_readdirres:");
#endif /* DEBUG */
@@ -810,7 +803,7 @@ bool_t
xdr_readlinkres(XDR *xdrs, nfsreadlinkres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_readlinkres:");
#endif /* DEBUG */
@@ -836,7 +829,7 @@ bool_t
xdr_readokres(XDR *xdrs, nfsreadokres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_readokres:");
#endif /* DEBUG */
@@ -859,7 +852,7 @@ bool_t
xdr_readres(XDR *xdrs, nfsreadres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_readres:");
#endif /* DEBUG */
@@ -885,7 +878,7 @@ bool_t
xdr_renameargs(XDR *xdrs, nfsrenameargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_renameargs:");
#endif /* DEBUG */
@@ -905,7 +898,7 @@ bool_t
xdr_sattr(XDR *xdrs, nfssattr *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_sattr:");
#endif /* DEBUG */
@@ -937,7 +930,7 @@ bool_t
xdr_sattrargs(XDR *xdrs, nfssattrargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_sattrargs:");
#endif /* DEBUG */
@@ -957,7 +950,7 @@ bool_t
xdr_statfsokres(XDR *xdrs, nfsstatfsokres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_statfsokres:");
#endif /* DEBUG */
@@ -986,7 +979,7 @@ bool_t
xdr_statfsres(XDR *xdrs, nfsstatfsres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_statfsres:");
#endif /* DEBUG */
@@ -1012,7 +1005,7 @@ bool_t
xdr_symlinkargs(XDR *xdrs, nfssymlinkargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_symlinkargs:");
#endif /* DEBUG */
@@ -1035,7 +1028,7 @@ bool_t
xdr_writeargs(XDR *xdrs, nfswriteargs *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_writeargs:");
#endif /* DEBUG */
@@ -1071,7 +1064,7 @@ bool_t
xdr_mntrequest(XDR *xdrs, mntrequest *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mntrequest:");
#endif /* DEBUG */
@@ -1097,7 +1090,7 @@ bool_t
xdr_mntres(XDR *xdrs, mntres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mntres:");
#endif /* DEBUG */
@@ -1114,7 +1107,7 @@ bool_t
xdr_umntrequest(XDR *xdrs, umntrequest *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_umntrequest:");
#endif /* DEBUG */
@@ -1142,7 +1135,7 @@ bool_t
xdr_umntres(XDR *xdrs, umntres *objp)
{
#ifdef DEBUG
- amuDebug(D_TRACE)
+ amuDebug(D_XDRTRACE)
plog(XLOG_DEBUG, "xdr_mntres:");
#endif /* DEBUG */
diff --git a/contrib/amd/libamu/xutil.c b/contrib/amd/libamu/xutil.c
index a8b15bf..998d0d8 100644
--- a/contrib/amd/libamu/xutil.c
+++ b/contrib/amd/libamu/xutil.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: xutil.c,v 1.8 1999/09/30 21:01:42 ezk Exp $
+ * $Id: xutil.c,v 1.11.2.6 2001/01/10 03:23:41 ezk Exp $
*
*/
@@ -80,7 +80,11 @@ static int orig_mem_bytes;
#endif /* DEBUG_MEM */
/* forward definitions */
-static void real_plog(int lvl, char *fmt, va_list vargs);
+static void real_plog(int lvl, const char *fmt, va_list vargs)
+ __attribute__((__format__(__printf__, 2, 0)));
+/* for GCC format string auditing */
+static const char *expand_error(const char *f, char *e, int maxlen)
+ __attribute__((__format_arg__(1)));
#ifdef DEBUG
/*
@@ -93,15 +97,20 @@ struct opt_tab dbg_opt[] =
{"daemon", D_DAEMON}, /* Enter daemon mode */
{"fork", D_FORK}, /* Fork server (nofork = don't fork) */
{"full", D_FULL}, /* Program trace */
+#ifdef HAVE_CLOCK_GETTIME
+ {"hrtime", D_HRTIME}, /* Print high resolution time stamps */
+#endif /* HAVE_CLOCK_GETTIME */
/* info service specific debugging (hesiod, nis, etc) */
{"info", D_INFO},
# ifdef DEBUG_MEM
{"mem", D_MEM}, /* Trace memory allocations */
# endif /* DEBUG_MEM */
{"mtab", D_MTAB}, /* Use local mtab file */
+ {"readdir", D_READDIR}, /* check on browsable_dirs progress */
{"str", D_STR}, /* Debug string munging */
{"test", D_TEST}, /* Full debug - but no daemon */
{"trace", D_TRACE}, /* Protocol trace */
+ {"xdrtrace", D_XDRTRACE}, /* Trace xdr routines */
{0, 0}
};
#endif /* DEBUG */
@@ -280,18 +289,31 @@ checkup_mem(void)
* with the current error code taken from errno. Make sure
* 'e' never gets longer than maxlen characters.
*/
-static void
-expand_error(char *f, char *e, int maxlen)
+static const char *
+expand_error(const char *f, char *e, int maxlen)
{
+#ifndef HAVE_STRERROR
+ /*
+ * XXX: we are assuming that if a system doesn't has strerror,
+ * then it has sys_nerr. If this assumption turns out to be wrong on
+ * some systems, we'll have to write a separate test to detect if
+ * a system has sys_nerr. -Erez
+ */
extern int sys_nerr;
- char *p, *q;
+#endif /* not HAVE_STRERROR */
+ const char *p;
+ char *q;
int error = errno;
int len = 0;
for (p = f, q = e; (*q = *p) && len < maxlen; len++, q++, p++) {
if (p[0] == '%' && p[1] == 'm') {
const char *errstr;
+#ifdef HAVE_STRERROR
+ if (error < 0)
+#else /* not HAVE_STRERROR */
if (error < 0 || error >= sys_nerr)
+#endif /* not HAVE_STRERROR */
errstr = NULL;
else
#ifdef HAVE_STRERROR
@@ -309,6 +331,7 @@ expand_error(char *f, char *e, int maxlen)
}
}
e[maxlen-1] = '\0'; /* null terminate, to be sure */
+ return e;
}
@@ -320,13 +343,34 @@ show_time_host_and_name(int lvl)
{
static time_t last_t = 0;
static char *last_ctime = 0;
- time_t t = clocktime();
+ time_t t;
+#ifdef HAVE_CLOCK_GETTIME
+ struct timespec ts;
+#endif /* HAVE_CLOCK_GETTIME */
+ char nsecs[11] = ""; /* '.' + 9 digits + '\0' */
char *sev;
+#ifdef HAVE_CLOCK_GETTIME
+ /*
+ * Some systems (AIX 4.3) seem to implement clock_gettime() as stub
+ * returning ENOSYS.
+ */
+ if (clock_gettime(CLOCK_REALTIME, &ts) == 0) {
+ t = ts.tv_sec;
+#ifdef DEBUG
+ amuDebug(D_HRTIME)
+ sprintf(nsecs, ".%09ld", ts.tv_nsec);
+#endif /* DEBUG */
+ }
+ else
+#endif /* HAVE_CLOCK_GETTIME */
+ t = clocktime();
+
if (t != last_t) {
last_ctime = ctime(&t);
last_t = t;
}
+
switch (lvl) {
case XLOG_FATAL:
sev = "fatal:";
@@ -356,8 +400,8 @@ show_time_host_and_name(int lvl)
sev = "hmm: ";
break;
}
- fprintf(logfp, "%15.15s %s %s[%ld]/%s ",
- last_ctime + 4, am_get_hostname(),
+ fprintf(logfp, "%15.15s%s %s %s[%ld]/%s ",
+ last_ctime + 4, nsecs, am_get_hostname(),
am_get_progname(),
(long) am_mypid,
sev);
@@ -376,7 +420,7 @@ debug_option(char *opt)
void
-dplog(char *fmt, ...)
+dplog(const char *fmt, ...)
{
va_list ap;
@@ -391,7 +435,7 @@ dplog(char *fmt, ...)
void
-plog(int lvl, char *fmt, ...)
+plog(int lvl, const char *fmt, ...)
{
va_list ap;
@@ -405,7 +449,7 @@ plog(int lvl, char *fmt, ...)
static void
-real_plog(int lvl, char *fmt, va_list vargs)
+real_plog(int lvl, const char *fmt, va_list vargs)
{
char msg[1024];
char efmt[1024];
@@ -420,17 +464,21 @@ real_plog(int lvl, char *fmt, va_list vargs)
checkup_mem();
#endif /* DEBUG_MEM */
- expand_error(fmt, efmt, 1024);
-
#ifdef HAVE_VSNPRINTF
- vsnprintf(ptr, 1024, efmt, vargs);
+ /*
+ * XXX: ptr is 1024 bytes long, but we may write to ptr[strlen(ptr) + 2]
+ * (to add an '\n', see code below) so we have to limit the string copy
+ * to 1023 (including the '\0').
+ */
+ vsnprintf(ptr, 1023, expand_error(fmt, efmt, 1024), vargs);
+ msg[1022] = '\0'; /* null terminate, to be sure */
#else /* not HAVE_VSNPRINTF */
/*
* XXX: ptr is 1024 bytes long. It is possible to write into it
* more than 1024 bytes, if efmt is already large, and vargs expand
* as well. This is not as safe as using vsnprintf().
*/
- vsprintf(ptr, efmt, vargs);
+ vsprintf(ptr, expand_error(fmt, efmt, 1023), vargs);
msg[1023] = '\0'; /* null terminate, to be sure */
#endif /* not HAVE_VSNPRINTF */
@@ -873,6 +921,7 @@ amu_release_controlling_tty(void)
#ifdef TIOCNOTTY
int fd;
#endif /* TIOCNOTTY */
+ int tempfd;
#ifdef HAVE_SETSID
/* XXX: one day maybe use vhangup(2) */
@@ -884,6 +933,28 @@ amu_release_controlling_tty(void)
}
#endif /* HAVE_SETSID */
+ /*
+ * In daemon mode, leaving open file descriptors to terminals or pipes
+ * can be a really bad idea.
+ * Case in point: the redhat startup script calls us through their 'initlog'
+ * program, which exits as soon as the original amd process exits. If, at some
+ * point, a misbehaved library function decides to print something to the screen,
+ * we get a SIGPIPE and die.
+ * More precisely: NIS libc functions will attempt to print to stderr
+ * "YPBINDPROC_DOMAIN: Domain not bound" if ypbind is running but can't find
+ * a ypserver.
+ *
+ * So we close all of our "terminal" filedescriptors, i.e. 0, 1 and 2, then
+ * reopen them as /dev/null.
+ *
+ * XXX We should also probably set the SIGPIPE handler to SIG_IGN.
+ */
+ tempfd = open("/dev/null", O_RDWR);
+ fflush(stdin); close(0); dup2(tempfd, 0);
+ fflush(stdout); close(1); dup2(tempfd, 1);
+ fflush(stderr); close(2); dup2(tempfd, 2);
+ close(tempfd);
+
#ifdef TIOCNOTTY
fd = open("/dev/tty", O_RDWR);
if (fd < 0) {
diff --git a/contrib/amd/mk-amd-map/mk-amd-map.8 b/contrib/amd/mk-amd-map/mk-amd-map.8
index cba055b..69f6101 100644
--- a/contrib/amd/mk-amd-map/mk-amd-map.8
+++ b/contrib/amd/mk-amd-map/mk-amd-map.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1993 Jan-Simon Pendry
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)mk-amd-map.8 8.1 (Berkeley) 6/28/93
-.\" $Id: mk-amd-map.8,v 1.2 1999/01/10 21:54:41 ezk Exp $
+.\" $Id: mk-amd-map.8,v 1.3.2.1 2001/01/10 03:23:42 ezk Exp $
.\"
.TH MK-AMD-MAP 8 "June 28, 1993"
.SH NAME
diff --git a/contrib/amd/mk-amd-map/mk-amd-map.c b/contrib/amd/mk-amd-map/mk-amd-map.c
index 7399f33..4177e89 100644
--- a/contrib/amd/mk-amd-map/mk-amd-map.c
+++ b/contrib/amd/mk-amd-map/mk-amd-map.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mk-amd-map.c,v 1.4 1999/02/04 07:24:50 ezk Exp $
+ * $Id: mk-amd-map.c,v 1.5.2.1 2001/01/10 03:23:42 ezk Exp $
*/
/*
diff --git a/contrib/amd/scripts/am-eject.in b/contrib/amd/scripts/am-eject.in
index ed7e2d0..1f7f14d 100644
--- a/contrib/amd/scripts/am-eject.in
+++ b/contrib/amd/scripts/am-eject.in
@@ -12,7 +12,7 @@ PATH=@sbindir@:@bindir@:/usr/ucb:/usr/bin:/bin:${PATH}
export PATH
if [ $# -ne 1 ]; then
- echo "Usage: $0 cd|fd"
+ echo "Usage: $0 cd|cdrom|fd|floppy"
exit 2
fi
@@ -26,7 +26,7 @@ fi
# append name of medium
case "$1" in
cd|fd) fs=$fs/$1;;
- *) echo "Usage: $0 cd|fd"; exit 2;;
+ *) echo "Usage: $0 cd|cdrom|fd|floppy"; exit 2;;
esac
# is the medium mounted?
@@ -47,6 +47,7 @@ else
fi
case $1 in
- cd) eject;; # eject CD-ROM
- fd) echo "Ok to remove disk";;
+ cd|cdrom) eject cdrom || eject ;; # eject CD-ROM
+ fd|floppy) eject floppy || eject
+ echo "Ok to remove disk" ;;
esac
diff --git a/contrib/amd/scripts/amd.conf-sample b/contrib/amd/scripts/amd.conf-sample
index 9a60e2d..a1c2f0d 100644
--- a/contrib/amd/scripts/amd.conf-sample
+++ b/contrib/amd/scripts/amd.conf-sample
@@ -22,6 +22,7 @@ local_domain = cs.columbia.edu
karch = sun4m
arch = sun4
# if you don't like autoconf picking up "sunos5" as the os-type, override it
+# (amd -O)
os = sos5
# (amd -o)
osver = 2.5.1
@@ -35,7 +36,7 @@ print_version = yes | no
log_file = /var/log/amd | syslog | syslog:facility
# NFS (RPC/UDP) retry interval, in tenths of secs (amd -t interval.counter)
nfs_retry_interval = 8
-nfs_retransmit_counter = 110
+nfs_retransmit_counter = 11 (eleven retransmission attempts)
# (amd -w)
dismount_interval = 120
# (amd -y)
@@ -43,18 +44,19 @@ nis_domain = nisDom-CS.columbia.edu
# (amd -x)
log_options = fatal,error,user,warn,info,map,stats,all
# (amd -D)
-debug_options = all,amq,daemon,fork,full,info,mem,mtab,str,test,trace
+debug_options = all,amq,daemon,fork,full,hrtime,info,mem,mtab,\
+ str,readdir,test,trace,xdrtrace
# (amd -S)
plock = no | yes
-# selectors on /defaults are off by default
-selectors_on_default = yes | no
+# selectors are not recognized by default in the /defaults entry
+selectors_in_defaults = yes | no
# should browsable maps show number of entries to df/statfs (default=no)
show_statfs_entries = yes | no
# (hpux) cluster name (amd -C)
cluster = ???
# LDAP (Lightweight Directory Access Protocol) options
-ldap_base = ldap.your.domain:389
-ldap_hostports = "ou=Marketing, o=AMD Ltd, c=US"
+ldap_base = "ou=Marketing, o=AMD Ltd, c=US"
+ldap_hostports = ldap.your.domain:389
ldap_cache_seconds = 0 (default)
ldap_cache_maxmem = 131072 (default)
# default base name for hesiod maps
@@ -67,8 +69,11 @@ mount_type = nfs | autofs
search_path = /etc/local:/etc/amdmaps:/misc/yp
# alternate RPC program number to register with the port mapper
portmap_program = 300019-300029
-# Use fully qualified host names
+# use fully qualified host names
fully_qualified_hosts = yes | no
+# force NFS version or NFS protocol
+nfs_vers = 2 | 3
+nfs_proto = udp | tcp
##############################################################################
# DEFINE AN AMD MOUNT POINT
diff --git a/contrib/amd/scripts/amd.conf.5 b/contrib/amd/scripts/amd.conf.5
index ed90a6d..ad843c5 100644
--- a/contrib/amd/scripts/amd.conf.5
+++ b/contrib/amd/scripts/amd.conf.5
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amd.conf.5,v 1.4 1999/09/30 21:01:43 ezk Exp $
+.\" $Id: amd.conf.5,v 1.7.2.3 2001/04/07 00:47:45 ib42 Exp $
.\"
.TH AMD.CONF 8 "7 August 1997"
.SH NAME
@@ -208,12 +208,15 @@ meaning. You can get the list of supported debugging options by running amd
\fBdaemon\fR enter daemon mode
\fBfork\fR fork server
\fBfull\fR program trace
+\fBhrtime\fR print high resolution time stamps (only if syslog(3) is not used)
\fBinfo\fR info service specific debugging (hesiod, nis, etc.)
\fBmem\fR trace memory allocations
\fBmtab\fR use local "./mtab" file
+\fBreaddir\fR show browsable_dirs progress
\fBstr\fR debug string munging
\fBtest\fR full debug but no daemon
-\fBtrace\fR trace RPC protocol and NFS mount arguments
+\fBtrace\fR trace protocol and NFS mount arguments
+\fBxdrtrace\fR trace XDR routines
.fi
.TP
@@ -260,7 +263,8 @@ the machine.
.TP
.BR ldap_base " (string, default not set)"
-Specify the base name for LDAP.
+Specify the base name for LDAP. This often includes LDAP-specific
+values such as country and organization.
.TP
.BR ldap_cache_maxmem " (numeric, default=131072)"
@@ -272,7 +276,7 @@ Specify the number of seconds to keep entries in the cache.
.TP
.BR ldap_hostports " (string, default not set)"
-Specify LDAP-specific values such as country and organization.
+Specify the LDAP host and port values.
.TP
.BR local_domain " (string, default no sub-domain)"
@@ -328,6 +332,15 @@ options by running amd \-H. Possible values are:
.fi
.TP
+.BR nfs_proto " (numeric, default to trying version 3 then 2)"
+By default, amd tries version 3 and then version 2. This option forces the
+overall NFS protocol used to version 3 or 2. It overrides what is in the
+amd maps, and is useful when amd is compiled with NFSv3 support that may not
+be stable. With this option you can turn off the complete usage of NFSv3
+dynamically (without having to recompile amd) until such time as NFSv3
+support is desired again.
+
+.TP
.BR nfs_retransmit_counter " (numeric, default=11)"
Same as the
.I retransmit
@@ -358,6 +371,15 @@ parameters change the overall retry interval. Too long an interval gives
poor interactive response; too short an interval causes excessive retries.
.TP
+.BR nfs_vers " (string, default to trying version tcp then udp)"
+By default, amd tries TCP and then UDP. This option forces the overall NFS
+protocol used to TCP or UDP. It overrides what is in the amd maps, and is
+useful when amd is compiled with NFSv3 support that may not be stable. With
+this option you can turn off the complete usage of NFSv3 dynamically
+(without having to recompile amd) until such time as NFSv3 support is
+desired again.
+
+.TP
.BR nis_domain " (string, default to local NIS domain name)"
Same as the
.B \-y
@@ -456,8 +478,8 @@ mounted. Whenever one of these would have been auto-mounted,
inherits it.
.TP
-.BR selectors_on_default " (boolean, default=no)"
-If "yes", then the /default entry of maps will be look for and process any
+.BR selectors_in_defaults " (boolean, default=no)"
+If "yes", then the /defaults entry of maps will search for and process any
selectors before setting defaults for all other keys in that map. Useful
when you want to set different options for a complete map based on some
parameters. For example, you may want to better the NFS performance over
@@ -469,6 +491,8 @@ slow slip-based networks as follows:
wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
.fi
+Deprecated form: selectors_on_default
+
.TP
.BR show_statfs_entries " (boolean), default=no)"
If "yes", then all maps which are browsable will also show the number of
@@ -522,7 +546,7 @@ log_file = /var/log/amd
log_options = all
#debug_options = all
plock = no
-selectors_on_default = yes
+selectors_in_defaults = yes
# config.guess picks up "sunos5" and I don't want to edit my maps yet
os = sos5
# if you print_version after setting up "os", it will show it.
diff --git a/contrib/amd/scripts/automount2amd.8 b/contrib/amd/scripts/automount2amd.8
index c1c1d8b..d9f234d 100644
--- a/contrib/amd/scripts/automount2amd.8
+++ b/contrib/amd/scripts/automount2amd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: automount2amd.8,v 1.1 1999/08/16 01:16:36 ezk Exp $
+.\" $Id: automount2amd.8,v 1.2.2.1 2001/01/10 03:23:43 ezk Exp $
.\"
.TH AUTOMOUNT2AMD 8L "24 May 1993"
.SH NAME
diff --git a/contrib/amd/scripts/ctl-amd.in b/contrib/amd/scripts/ctl-amd.in
index 22c3677..9b2fa26 100755
--- a/contrib/amd/scripts/ctl-amd.in
+++ b/contrib/amd/scripts/ctl-amd.in
@@ -1,13 +1,13 @@
#!/bin/sh
# control starting, stopping, or restarting amd.
-# usage: ctl-amd [start | stop | restart]
+# usage: ctl-amd [start|stop|status|restart|condrestart|reload]
#
# Package: am-utils-6.0
# Author: Erez Zadok <ezk@cs.columbia.edu>
#
# chkconfig: - 72 28
# description: Runs the automount daemon that mounts devices and NFS hosts \
-# on demand.
+# on demand.
# processname: amd
# config: /etc/amd.conf
#
@@ -85,9 +85,7 @@ fi
case "$1" in
'start')
- #
# Start the amd automounter.
- #
if [ -x @sbindir@/amd ]
then
# do not specify full path of amd so killproc() works
@@ -115,7 +113,37 @@ case "$1" in
fi
;;
+'condrestart')
+ if [ -f /var/lock/subsys/amd ]; then
+ ctl-amd stop
+ ctl-amd start
+ fi
+ ;;
+
+'reload')
+ amq -f
+ ;;
+
+'status')
+ # run amq -v to produce status
+ pid=`amq -p 2>/dev/null`
+ if [ $? = 0 ]
+ then
+ echo "amd (pid $pid) is running..."
+ else
+ echo "amd is stopped"
+ fi
+ ;;
+
+# start_msg and stop_msg are for HPUX
+'start_msg')
+ echo "Start am-utils 6.0 automounter"
+ ;;
+'stop_msg')
+ echo "Stop am-utils 6.0 automounter"
+ ;;
+
*)
- echo "Usage: @sbindir@/ctl-amd [ start | stop | restart ]"
+ echo "Usage: @sbindir@/ctl-amd [start|stop|status|restart|condrestart|reload]"
;;
esac
diff --git a/contrib/amd/scripts/ctl-hlfsd.in b/contrib/amd/scripts/ctl-hlfsd.in
index ebb12b8..4712604 100755
--- a/contrib/amd/scripts/ctl-hlfsd.in
+++ b/contrib/amd/scripts/ctl-hlfsd.in
@@ -62,6 +62,9 @@ fi
if [ -d /var/mail/. ]; then
maildir="/var/mail"
altmaildir="/var/alt_mail"
+elif [ -d /var/spool/mail/. ]; then
+ maildir="/var/spool/mail"
+ altmaildir="/var/spool/alt_mail"
else
maildir="/usr/spool/mail"
altmaildir="/usr/spool/alt_mail"
diff --git a/contrib/amd/scripts/expn.1 b/contrib/amd/scripts/expn.1
index 5795241..7295a39 100644
--- a/contrib/amd/scripts/expn.1
+++ b/contrib/amd/scripts/expn.1
@@ -16,7 +16,7 @@ $sockaddr = 'S n a4 x8';
# system requirements:
# must have 'nslookup' and 'hostname' programs.
-# $Header: /src/cvsroot/am-utils-6.0/scripts/expn.1,v 1.1.1.1 1998/11/05 02:04:58 ezk Exp $
+# $Header: /proj/bank/cvsroot/am-utils/scripts/expn.1,v 1.1.1.1 1998/11/05 02:04:58 ezk Exp $
# TODO:
# less magic should apply to command-line addresses
diff --git a/contrib/amd/scripts/expn.in b/contrib/amd/scripts/expn.in
index de48f8d..4591a4d 100755
--- a/contrib/amd/scripts/expn.in
+++ b/contrib/amd/scripts/expn.in
@@ -15,7 +15,7 @@ $SOCK_STREAM = &SOCK_STREAM;
# system requirements:
# must have 'nslookup' and 'hostname' programs.
-# $Header: /src/cvsroot/am-utils-6.0/scripts/expn.in,v 1.2 1999/09/18 08:38:07 ezk Exp $
+# $Header: /proj/bank/cvsroot/am-utils/scripts/expn.in,v 1.2.2.1 2000/06/14 01:58:48 ionut Exp $
# TODO:
# less magic should apply to command-line addresses
@@ -114,7 +114,7 @@ $0 = "$av0 - lookup host FQDN and IP addr";
($hostname,$aliases,$type,$len,$thisaddr) = gethostbyname($name);
$0 = "$av0 - parsing args";
-$usage = "Usage: $av0 [-1avwd] user[\@host] [user2[host2] ...]";
+$usage = "Usage: $av0 [-1avwd] user[\@host] [user2[\@host2] ...]";
for $a (@ARGV) {
die $usage if $a eq "-";
while ($a =~ s/^(-.*)([1avwd])/$1/) {
diff --git a/contrib/amd/tasks b/contrib/amd/tasks
index 976d3b2..94da544 100644
--- a/contrib/amd/tasks
+++ b/contrib/amd/tasks
@@ -95,10 +95,24 @@ amd.conf file (right now amd.conf overrides cmd-line options).
- ALLOWED_MOUNT_TIME of 40 seconds is way too long!
- need option to turn off pings of portmapper before trying a mount
-- type:=program should not require umount command. can use defult
+- type:=program should not require umount command. can use default
umount(). it works for smbmount/umount.
- document var[0-7] variables/selectors
- need a way to export a nfs-mount point after it is being mounted (jukebox
mounts). can do this with type:=program.
+
+- support port=n, for machines that use NFS on a different port
+
+- support WebNFS (cf. Solaris mount_nfs(1M) -o public)
+
+- nfsl may be buggy when fs:= is specified explicitly (lockup?)
+
+- detecting down'ed hosts faster: use default portmap TTL variables?
+
+- entries w/ $key in /defaults, see "defaults" instead of the actual entry.
+
+- y2k: amq /home (mounted time uses YY instead of YYYY)
+
+- new amd.conf option to disable amq listener altogether (security)
diff --git a/contrib/amd/wire-test/wire-test.8 b/contrib/amd/wire-test/wire-test.8
index a7ee523..75281e6 100644
--- a/contrib/amd/wire-test/wire-test.8
+++ b/contrib/amd/wire-test/wire-test.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1999 Erez Zadok
+.\" Copyright (c) 1997-2001 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,9 +38,9 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: wire-test.8,v 1.2 1999/01/10 21:54:44 ezk Exp $
+.\" $Id: wire-test.8,v 1.3.2.2 2001/01/10 03:23:43 ezk Exp $
.\"
-.TH WIRE-TEST 8L "26 Feb 1993"
+.TH WIRE-TEST 8 "26 Feb 1993"
.SH NAME
wire-test \- test your network interfaces and local IP address
.SH SYNOPSIS
diff --git a/contrib/amd/wire-test/wire-test.c b/contrib/amd/wire-test/wire-test.c
index c659496..636eca2 100644
--- a/contrib/amd/wire-test/wire-test.c
+++ b/contrib/amd/wire-test/wire-test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2001 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wire-test.c,v 1.4 1999/02/04 07:24:54 ezk Exp $
+ * $Id: wire-test.c,v 1.5.2.1 2001/01/10 03:23:43 ezk Exp $
*
*/
OpenPOWER on IntegriCloud