summaryrefslogtreecommitdiffstats
path: root/contrib/amd
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/amd')
-rw-r--r--contrib/amd/.cvsignore116
-rw-r--r--contrib/amd/FREEBSD-Xlist145
-rw-r--r--contrib/amd/FREEBSD-upgrade99
-rw-r--r--contrib/amd/LSM.am-utils20
-rw-r--r--contrib/amd/TODO177
-rw-r--r--contrib/amd/amd/.cvsignore1
-rw-r--r--contrib/amd/amd/amd.8488
-rw-r--r--contrib/amd/amd/amd.c7
-rw-r--r--contrib/amd/amd/amq_subr.c13
-rw-r--r--contrib/amd/amd/get_args.c7
-rw-r--r--contrib/amd/amd/ops_autofs.c1279
-rw-r--r--contrib/amd/amd/srvr_nfs.c5
-rw-r--r--contrib/amd/amq/.cvsignore1
-rw-r--r--contrib/amd/amq/amq.8327
-rw-r--r--contrib/amd/amq/amq.c20
-rw-r--r--contrib/amd/amq/pawd.152
-rw-r--r--contrib/amd/conf/mount/mount_freebsd3.c68
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h315
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_darwin.h259
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h5
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h23
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_osf5.h431
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h388
-rw-r--r--contrib/amd/conf/trap/trap_freebsd3.h3
-rw-r--r--contrib/amd/doc/.cvsignore11
-rw-r--r--contrib/amd/doc/stamp-vti3
-rw-r--r--contrib/amd/fixmount/.cvsignore1
-rw-r--r--contrib/amd/fixmount/fixmount.8197
-rw-r--r--contrib/amd/fixmount/fixmount.c5
-rw-r--r--contrib/amd/fsinfo/.cvsignore1
-rw-r--r--contrib/amd/fsinfo/fsinfo.8198
-rw-r--r--contrib/amd/fsinfo/fsinfo.c12
-rw-r--r--contrib/amd/hlfsd/.cvsignore1
-rw-r--r--contrib/amd/hlfsd/hlfsd.8375
-rw-r--r--contrib/amd/hlfsd/hlfsd.c7
-rw-r--r--contrib/amd/hlfsd/hlfsd.h5
-rw-r--r--contrib/amd/hlfsd/homedir.c5
-rw-r--r--contrib/amd/include/am_defs.h59
-rw-r--r--contrib/amd/libamu/.cvsignore1
-rw-r--r--contrib/amd/libamu/clnt_sperrno.c147
-rw-r--r--contrib/amd/libamu/mount_fs.c5
-rw-r--r--contrib/amd/mk-amd-map/.cvsignore1
-rw-r--r--contrib/amd/mk-amd-map/mk-amd-map.842
-rw-r--r--contrib/amd/mk-amd-map/mk-amd-map.c5
-rw-r--r--contrib/amd/scripts/.cvsignore1
-rw-r--r--contrib/amd/scripts/amd.conf.51068
-rwxr-xr-xcontrib/amd/scripts/fixrmtab24
-rw-r--r--contrib/amd/wire-test/.cvsignore1
-rw-r--r--contrib/amd/wire-test/wire-test.866
-rw-r--r--contrib/amd/wire-test/wire-test.c5
50 files changed, 1919 insertions, 4576 deletions
diff --git a/contrib/amd/.cvsignore b/contrib/amd/.cvsignore
deleted file mode 100644
index 56db94b..0000000
--- a/contrib/amd/.cvsignore
+++ /dev/null
@@ -1,116 +0,0 @@
-2be-mirror.txt
-A.alpha-dec-osf2.1
-A.alpha-dec-osf4.0
-A.alphaev5-unknown-linux-gnu-rh5.2
-A.hppa1.1-hp-hpux10.10
-A.hppa1.1-hp-hpux10.20
-A.hppa1.1-hp-hpux11.00
-A.hppa1.1-hp-hpux9.01
-A.hppa1.1-hp-hpux9.05
-A.hppa1.1-hp-hpux9.07
-A.i386-apple-darwin6.0
-A.i386-pc-bsdi2.1
-A.i386-pc-bsdi3.1
-A.i386-pc-bsdi4.1
-A.i386-pc-solaris2.5.1
-A.i386-pc-solaris2.6
-A.i386-pc-solaris2.7
-A.i386-pc-solaris2.8
-A.i386-unknown-freebsd2.2.7
-A.i386-unknown-freebsd2.2.8
-A.i386-unknown-freebsdelf3.2
-A.i386-unknown-freebsdelf3.3
-A.i386-unknown-freebsdelf4.0
-A.i386-unknown-netbsd1.3.3
-A.i386-unknown-netbsd1.4.1
-A.i386-unknown-openbsd2.5
-A.i486-ncr-sysv4.3.03
-A.i486-pc-linux-gnu-rh6.0
-A.i486-pc-linux-gnulibc1
-A.i486-pc-linux-gnulibc1-rh4.2
-A.i586-pc-linux-gnu-rh5.2
-A.i586-pc-linux-gnu-rh6.0
-A.i586-pc-linux-gnu-rh6.1
-A.i586-pc-linux-gnu-rh6.1.92
-A.i586-pc-linux-gnulibc1
-A.i586-pc-linux-gnulibc1-rh4.2
-A.i686-pc-linux-gnu-rh5.2
-A.i686-pc-linux-gnu-rh6.0
-A.i686-pc-linux-gnu-rh6.1
-A.m68k-next-nextstep3
-A.m68k-sun-sunos4.1.1
-A.mips-sgi-irix5.3
-A.mips-sgi-irix6.2
-A.mips-sgi-irix6.4
-A.mips-sgi-irix6.5
-A.powerpc-ibm-aix4.1.5.0
-A.powerpc-ibm-aix4.2.1.0
-A.powerpc-ibm-aix4.3.1.0
-A.rs6000-ibm-aix4.1.4.0
-A.rs6000-ibm-aix4.1.5.0
-A.sparc-sun-solaris2.3
-A.sparc-sun-solaris2.5
-A.sparc-sun-solaris2.5.1
-A.sparc-sun-solaris2.6
-A.sparc-sun-solaris2.7
-A.sparc-sun-solaris2.8
-A.sparc-sun-solaris2.9
-A.sparc-sun-sunos4.1.3
-A.sparc-sun-sunos4.1.3C
-A.sparc-sun-sunos4.1.3_U1
-A.sparc-sun-sunos4.1.4
-A.sparc-unknown-linux-gnulibc1-rh4.2
-A.sparc64-unknown-linux-gnu-rh5.2
-Makefile.in
-OLD
-ORIG
-amd-dev.txt
-configure
-diffs.txt
-reply-to
-signature
-tmp
-tutorial.txt
-A.i686-pc-linux-gnu-rh6.1.92
-A.i686-pc-linux-gnu-rh6.2
-A.i386-unknown-freebsdelf3.4
-A.i586-pc-linux-gnu-rh6.2
-acinclude.m4
-aclocal.m4
-config.h.in
-stamp-h.in
-A.i586-pc-linux-rh6.2
-A.i686-pc-linux-rh6.1
-A.alpha-dec-osf4.0f
-A.i386-pc-linux-rh6.1
-A.i386-unknown-freebsd3.3
-A.i386-unknown-freebsd3.4
-A.i386-pc-linux-gnulibc1-rh4.2
-A.i386-pc-linux-rh6.0
-A.i386-pc-linux-rh6.2
-A.i386-pc-linux-gnulibc1
-A.i386-unknown-freebsd3.2
-A.i386-unknown-freebsd4.0
-A.i386-pc-linux-rh5.2
-A.alphaev5-unknown-linux-rh5.2
-A.i386-unknown-freebsd4.2
-A.i386-pc-linux-rh7.0
-A.i386-pc-linux-rh7.1
-A.sparc64-unknown-linux-rh6.2
-A.i386-unknown-freebsd5.0
-autom4te.cache
-A.i386-unknown-freebsd4.4
-A.i386-pc-bsdi4.2
-A.ia64-hp-hpux11.20
-A.ia64-unknown-linux-rh7.1
-A.i386-unknown-netbsdelf1.5.1
-A.i386-pc-linuxlibc1-rh4.2
-A.i386-pc-linux-rh7.2
-A.i386-unknown-freebsd4.5
-A.i386-unknown-openbsd2.9
-A.i386-pc-linux-rh7.3
-configure.new
-A.sparc64-unknown-linux-suse7.3
-autom4te-2.53.cache
-A.i386-pc-linux-rh8.0
-A.i386-pc-linux-rh9
diff --git a/contrib/amd/FREEBSD-Xlist b/contrib/amd/FREEBSD-Xlist
new file mode 100644
index 0000000..474cf53
--- /dev/null
+++ b/contrib/amd/FREEBSD-Xlist
@@ -0,0 +1,145 @@
+$FreeBSD$
+*LSM.am-utils
+*Makefile.*
+*README.autofs
+*ac*.m4
+*.old
+*acconfig.h
+*aux
+*autom4te.cache*
+*buildall
+*config*
+*depcomp
+*install-sh
+*lt*
+*missing
+*mkinstalldirs
+*stamp-h.in
+*amd/Makefile.*
+*amq/Makefile.*
+*commit
+*cvs-server.txt
+*conf/checkmount/checkmount_aix.c
+*conf/checkmount/checkmount_default.c
+*conf/checkmount/checkmount_osf.c
+*conf/checkmount/checkmount_svr4.c
+*conf/checkmount/checkmount_ultrix.c
+*conf/fh_dref/fh_dref_aix3.h
+*conf/fh_dref/fh_dref_aix42.h
+*conf/fh_dref/fh_dref_bsd44.h
+*conf/fh_dref/fh_dref_default.h
+*conf/fh_dref/fh_dref_hpux.h
+*conf/fh_dref/fh_dref_irix.h
+*conf/fh_dref/fh_dref_isc3.h
+*conf/fh_dref/fh_dref_linux.h
+*conf/fh_dref/fh_dref_nextstep.h
+*conf/fh_dref/fh_dref_osf2.h
+*conf/fh_dref/fh_dref_osf4.h
+*conf/fh_dref/fh_dref_sunos3.h
+*conf/fh_dref/fh_dref_sunos4.h
+*conf/fh_dref/fh_dref_svr4.h
+*conf/hn_dref/hn_dref_isc3.h
+*conf/hn_dref/hn_dref_linux.h
+*conf/mount/mount_aix.c
+*conf/mount/mount_bsdi3.c
+*conf/mount/mount_freebsd3.c
+*conf/mount/mount_hpux.c
+*conf/mount/mount_irix5.c
+*conf/mount/mount_irix6.c
+*conf/mount/mount_isc3.c
+*conf/mount/mount_linux.c
+*conf/mount/mount_mach3.c
+*conf/mount/mount_stellix.c
+*conf/mount/mount_svr4.c
+*conf/mtab/mtab_aix.c
+*conf/mtab/mtab_file.c
+*conf/mtab/mtab_isc3.c
+*conf/mtab/mtab_mach3.c
+*conf/mtab/mtab_osf.c
+*conf/mtab/mtab_svr4.c
+*conf/mtab/mtab_ultrix.c
+*conf/nfs_prot/nfs_prot_aix3.h
+*conf/nfs_prot/nfs_prot_aix4.h
+*conf/nfs_prot/nfs_prot_aix4_2.h
+*conf/nfs_prot/nfs_prot_aix4_3.h
+*conf/nfs_prot/nfs_prot_aix5_1.h
+*conf/nfs_prot/nfs_prot_bsdi2.h
+*conf/nfs_prot/nfs_prot_bsdi3.h
+*conf/nfs_prot/nfs_prot_darwin.h
+*conf/nfs_prot/nfs_prot_default.h
+*conf/nfs_prot/nfs_prot_hpux.h
+*conf/nfs_prot/nfs_prot_hpux11.h
+*conf/nfs_prot/nfs_prot_irix5.h
+*conf/nfs_prot/nfs_prot_irix6.h
+*conf/nfs_prot/nfs_prot_linux.h
+*conf/nfs_prot/nfs_prot_ncr2.h
+*conf/nfs_prot/nfs_prot_netbsd.h
+*conf/nfs_prot/nfs_prot_netbsd1_3.h
+*conf/nfs_prot/nfs_prot_netbsd1_4.h
+*conf/nfs_prot/nfs_prot_nextstep.h
+*conf/nfs_prot/nfs_prot_openbsd.h
+*conf/nfs_prot/nfs_prot_osf2.h
+*conf/nfs_prot/nfs_prot_osf4.h
+*conf/nfs_prot/nfs_prot_osf5.h
+*conf/nfs_prot/nfs_prot_osf5_1.h
+*conf/nfs_prot/nfs_prot_sunos3.h
+*conf/nfs_prot/nfs_prot_sunos4.h
+*conf/nfs_prot/nfs_prot_sunos5_3.h
+*conf/nfs_prot/nfs_prot_sunos5_4.h
+*conf/nfs_prot/nfs_prot_sunos5_5.h
+*conf/nfs_prot/nfs_prot_sunos5_6.h
+*conf/nfs_prot/nfs_prot_sunos5_7.h
+*conf/nfs_prot/nfs_prot_sunos5_8.h
+*conf/nfs_prot/nfs_prot_svr4.h
+*conf/nfs_prot/nfs_prot_ultrix.h
+*conf/sa_dref/sa_dref_386bsd.h
+*conf/sa_dref/sa_dref_aix3.h
+*conf/sa_dref/sa_dref_aoi.h
+*conf/sa_dref/sa_dref_default.h
+*conf/sa_dref/sa_dref_isc3.h
+*conf/sa_dref/sa_dref_linux.h
+*conf/sa_dref/sa_dref_svr4.h
+*conf/transp/transp_tli.c
+*conf/trap/trap_aix3.h
+*conf/trap/trap_aux.h
+*conf/trap/trap_dgux.h
+*conf/trap/trap_hcx.h
+*conf/trap/trap_hpux.h
+*conf/trap/trap_hpux11.h
+*conf/trap/trap_irix.h
+*conf/trap/trap_isc3.h
+*conf/trap/trap_linux.h
+*conf/trap/trap_mach3.h
+*conf/trap/trap_news4.h
+*conf/trap/trap_rtu6.h
+*conf/trap/trap_stellix.h
+*conf/trap/trap_svr4.h
+*conf/trap/trap_ultrix.h
+*conf/umount/umount_default.c
+*conf/umount/umount_osf.c
+*doc/Makefile.am
+*doc/Makefile.in
+*doc/am-utils.dvi
+*doc/am-utils.info
+*doc/am-utils.info-1
+*doc/am-utils.info-2
+*doc/am-utils.info-3
+*doc/am-utils.info-4
+*doc/am-utils.info-5
+*doc/am-utils.info-6
+*doc/am-utils.info-7
+*doc/am-utils.ps
+*doc/hlfsd.ps
+*doc/mdate-sh
+*fixmount/Makefile.*
+*fsinfo/Makefile.*
+*hlfsd/Makefile.*
+*libamu/Makefile.*
+*libamu/clnt_sperrno.c
+*libamu/memcmp.c
+*libamu/strcasecmp.c
+*libamu/strdup.c
+*libamu/strstr.c
+*libamu/ualarm.c
+*mk-amd-map/Makefile.*
+*wire-test/Makefile.*
diff --git a/contrib/amd/FREEBSD-upgrade b/contrib/amd/FREEBSD-upgrade
new file mode 100644
index 0000000..a8e6d53
--- /dev/null
+++ b/contrib/amd/FREEBSD-upgrade
@@ -0,0 +1,99 @@
+# ex:ts=8
+$FreeBSD$
+
+AMD (am-utils) 6.0.9
+ originals can be found at: ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/
+ (http://www.cs.columbia.edu/~ezk/am-utils/index.html)
+
+
+For the import of AMD many files were pruned by:
+
+ tar -X FREEBSD-Xlist -xzf am-utils-6.0.9.tar.gz
+
+and `find . -name '.cvsignore' -delete`
+
+Then imported by:
+
+ cvs import -m 'Virgin import of AMD (am-utils) v6.0.9' \
+ src/contrib/amd COLUMBIA amd_6_0_9
+
+After the import, a separate extraction of am-utils was GNU configured in
+the "normal" way. The resulting config.h file should be compared with
+src/usr.sbin/amd/include/config.h, and src/usr.sbin/amd/include/config.h
+updated as needed.
+
+To make local changes to amd, simply patch and commit to the main
+branch (aka HEAD). Never make local changes on the vendor (COLUMBIA) branch.
+
+All local changes should be submitted to "amd-dev@majordomo.cs.columbia.edu"
+for inclusion in the next vendor release.
+
+Local changes:
+
+ amd/amd.8
+ r1.17 Uniformly refer to a file system as "file system"
+ r1.16 Add the am-utils homepage to SEE ALSO
+ r1.15 s/BSD/.Bx/ where appropriate
+ r1.14 Avoid using parenthesis enclosure macros
+ r1.13 split punctuation characters + misc fixes
+ r1.12 mdoc(7)NG
+ r1.11 Catch a left over reference to "/a"
+ r1.10 Document change to the default mount dir.
+ r1.9 Mention "amd -H" in the synopsis
+ r1.8 Fix miscellaneous mdoc macro argument limit infringements
+ r1.7 Don't refer to non-existent automount(8)
+ r1.6 Fix errors in .Xr usage
+ r1.3 un-mandocafied, un4.4BSD'ed
+ r1.2 sort cross references
+ amd/amd.c
+ r1.7 use /.amd_mnt as default for -a
+ amq/amq.8
+ r1.9 Uniformly refer to a file system as "file system".
+ r1.8 s/BSD/.Bx/ where appropriate.
+ r1.6 mdoc(7)NG.
+ r1.5 Remove reference to non-existent manpage
+ r1.4 Fix typos
+ r1.3 un-mandocafied, un4.4BSD'ed
+ amq/pawd.1
+ r1.3 un-mandocafied, un4.4BSD'ed
+ r1.2 sorting of references
+ conf/nfs_prot/nfs_prot_freebsd3.h
+ r1.11 Userland part of nfs client/server split and cleanup
+ r1.6 restore the standard name nfs_fh3
+ r1.3 Fully use our own generated files for NFSv3
+ r1.2 rpcgen our own files for NFSv3 support
+ fixmount/fixmount.8
+ r1.8 Uniformly refer to a file system as "file system"
+ r1.6 split punctuation characters + misc fixes.
+ r1.5 mdoc(7)NG.
+ r1.4 ".Mn mountd" -> ".Nm mountd"
+ r1.3 un-mandocafied, un4.4BSD'ed
+ r1.2 More sorting of references.
+ fsinfo/fsinfo.8
+ r1.9 add section number to .Xr directive
+ r1.7 Uniformly refer to a file system as "file system"
+ r1.6 split punctuation characters + misc fixes
+ r1.5 mdoc(7)NG
+ r1.3 describe all of the command line options
+ r1.2 un-mandocafied, un4.4BSD'ed
+ mk-amd-map/mk-amd-map.8
+ r1.4 removed HISTORY info from the .Os call.
+ r1.2 un-mandocafied, un4.4BSD'ed
+ scripts/amd.conf.5
+ r1.15 Bring man page back in shape
+ r1.13 Uniformly refer to a file system as "file system"
+ r1.12 Avoid using parenthesis enclosure macros
+ r1.11 mdoc(7)NG
+ r1.10 Fix miscellaneous mdoc macro argument limit infringements
+ r1.8 Fix a bunch of broken cross-references
+ r1.7 Bad reference of uname(2) -> uname(3)
+ r1.6 Grammer fix and style nits.
+ r1.5 xfer typo
+ r1.4 un-mandocafied, un4.4BSD'ed
+ r1.3 More sorting of references.
+ wire-test/wire-test.8
+ r1.2 un-mandocafied, un4.4BSD'ed
+
+mbr@FreeBSD.org
+obrien@NUXI.com
+05-November-1999
diff --git a/contrib/amd/LSM.am-utils b/contrib/amd/LSM.am-utils
deleted file mode 100644
index 07b736f..0000000
--- a/contrib/amd/LSM.am-utils
+++ /dev/null
@@ -1,20 +0,0 @@
-Begin3
-Title: am-utils
-Version: 6.0.1
-Entered-date: 08SEP99
-Description: BSD Automounter Utilities
- Replaces the old amd-upl102. Offers NFS V3 support, many
- new features, and numerous ports. The home page for
- am-utils is in http://www.am-utils.org
-Keywords: amd amq hlfsd fsinfo wire-test fixmount mk-amd-map automount
-Author: ezk@cs.columbia.edu (Erez Zadok)
-Maintained-by: ezk@cs.columbia.edu (Erez Zadok)
-Primary-site: shekel.mcl.cs.columbia.edu /pub/am-utils
- 1.3MB am-utils-6.0.1.tar.gz
- 1.3MB am-utils.tar.gz
- 1.3MB am-utils-snapshot.tar.gz
-Alternate-site: http://www.am-utils.org/mirrors.html
-Original-site: ftp.cs.columbia.edu /pub/amd
-Platforms: all modern Unix systems
-Copying-policy: BSD
-End
diff --git a/contrib/amd/TODO b/contrib/amd/TODO
deleted file mode 100644
index 07fb555..0000000
--- a/contrib/amd/TODO
+++ /dev/null
@@ -1,177 +0,0 @@
-# -*- text -*-
-
-Make a tasks file that people can pick jobs off of.
-
-take a look at am_compat.h and fix everything there...
-
-fix all $Id bla bla bla $ on every file.
-add my own copyright 1997 etc.
-
-NOT NEEDED: convert DEBUG symbol to ENABLE_DEBUG
-NOT NEEDED: convert DEBUG_MEM symbol to ENABLE_DEBUG_MEM
-
-Use these two somewhere:
-AC_DEFINE(AM_UTILS_NAME_PACKAGE, "am-utils")
-AC_DEFINE(AM_UTILS_VERSION, "6.0a1)
-
-check all "dnl XXX: in configure.in
-
-check for: INLINE, Const->const, P_void, VOIDP
-
-rename DEBUG_MTAB to DEBUG_MNTTAB
-rename UPDATE_MTAB to MOUNT_TABLE_ON_FILE
-rename HAS_NIS_MAPS to HAVE_MAP_NIS
-rename HAS_TFS to HAVE_FS_TFS
-rename SIG_HNDL_TYP to RETSIGTYPE
-
-remove HOST_EXEC #define from everywhere. add to am_ops.c a static flag
-initialized_vops, which if not true, should set the host_ops vector field to
-0 or host_umounted. This way let the feature be turned on if -h option to
-amd is given.
-
-nuke all code that is ifdef'd SUNOS4_COMPAT
-
-rename NEED_MNTOPT_PARSER to HAVE_HASMNTOPT and cleanup the code. also take
-the supplied code in amd/mount_fs.c and include it as the library function
-libamd/hasmntopt.c
-
-TLI code needs to be fixed.
-
-a way to include a site-specific configuration file IFF it exists from
-directory local/<${target}.h>
-
-replace #include WAIT with nothing (HAVE_SYS_WAIT_H?)
-
-replace SYS5_SIGNALS with HAVE_SYS_WAIT_H (which is on only if it sys/wait.h
-exists and is using the newer "int" for type, not "union wait". The macro
-AC_HEADER_SYS_WAIT turns on HAVE_SYS_WAIT_H iff wait*() functions are
-posix.1 compliant. Make sure you don't remove SYS5_SIGNALS ifdef's that are
-not related to wait*() syscalls.
-
-add username, hostname, and date at which time amd was compiled.
-
-No more need for MOUNT_HELPER_SOURCE.
-
-any code which is included by NEED_UMOUNT_FS, should be on iff
-MOUNT_TABLE_ON_FILE is on.
-
-replace NFS_FH_FIELD with references fo ".fh" in calls to
-NFS_FH_DREF(src, dst) macro
-
-For *EVERY* M4 Macro with case/esac, check that the $host_os case entries
-are correct.
-
-I'm not using amd's regexp code. Instead, use generic system code. If the
-system has posix style regexp functions, then change amd/map.c to use
-correct new prototype.
-
-use HAVE_SVC_GETREQSET instead of RPC_4.
-
-replace all "jsp" in *.[hc] $Id: TODO,v 1.1.1.1 1998/11/05 02:04:19 ezk Exp $ with ezk.
-
-use MNTTAB_FILE_NAME instead of MOUNTED
-
-use MOUNT_TABLE_ON_FILE instead of READ_MTAB_FROM_FILE
-
-no more HAS_EMPTY_AUTOMOUNTS, which was used if a df(1) divide by zero bug
-was invoked. Instead, change nfs_statfs() code to always return non-zero
-values. Then nuke HAS_EMPTY_AUTOMOUNTS.
-
-REGEXP: use whatever regular expressionlibrary you have on the system,
-including regexp.h if available, and using regcomp/regexec. Amd was written
-with BSD regexps in mind, not Sys V, so if I use any of those, I have to
-watch for correct usage. Otherwise, I can include the older include/re.h
-and amd/re.c. Replace HAS_REGEXP with HAVE_REGEXEC.
-
-The regex code in amd/mapc.c has changed a lot. It probably has bugs. Must
-test and debug it!!!
-
-# string name of filesystem in /etc/mnttab file
-Use MNTTAB_TYPE_FOO instead of MTAB_TYPE_FOO.
-# string name of mount option in /etc/mnttab file
-Use MNTTAB_OPT_FOO instead of MNTOPT_FOO.
-# string (or integer?) name of filesystem type in mount(2) syscall
-Use MOUNT_TYPE_FOO instead of MNTTYPE_FOO or MOUNT_FOO.
-# hex/number of FS mount option in nfs_args passed to mount(2) syscall
-Use MNT2_NFS_OPT_FOO instead NFSMNT_FOO.
-# hex/number of generic FS mount option directly passed to mount(2) syscall
-Use MNT2_GEN_OPT_FOO instead of MS_FOO or M_FOO.
-
-
-update AMD_COMPAT to 6.0 in include/am_utils.h
-
-convert all mem* functions b* functions (memset to bzero, etc.) or vice
-verse.
-
-put my name/copyright on every src file
-
-change all struct mnttab/mntent to "mntent_t"
-
-cleanup lib/resvport.c (TLI vs. Sockets). TLI code is #defin'ed
-HAVE_T_OPEN.
-[
-setting MTAB_LOCK_FILE (mtab_svr4.c) should be an amd run-time configuration
-option.
-
-change all UMOUNT_FS macros to umount_fs() fxn calls.
-
-remove getnetbyaddr() from lib/getnetbyaddr.c and then link w/ -lsocket
-
-take care of various (hlfsd et al) scripts in Makefile.am files.
-
-rename HOSTNAMESZ to MAXHOSTNAMELEN
-
-turn on all the NEW_TOPLVL_READDIR code (for "ls" to work in an amd point)
-
-change all NEW_DEFAULTS to ENABLE_DEFAULT_SELECTOTS (which is now on by
-default)
-
-remove refereces to mnt_freq and mnt_passno in mntent_t since it's not in
-use any more.
-
-remove all the (lint?) comments /*ARGSUSED */
-
-change HAS_FOOFS to HAVE_AM_FS_FOO (for example HAS_NFSX -> HAVE_AM_FS_FOO),
-but change HAS_UNION_FS to HAVE_AM_FS_UNION.
-
-some code uses #ifdef M_NEWTYPE to tell if mount(2)'s type field is "char *"
-or int. Use MTYPE_TYPE declaration instead (not ifdef macro!)
-
-change DEBUG_MTAB to DEBUG_MNTTAB
-
-deal with the changes in values of $os, $arch, and $osver!
-
-replace SYS5_SIGNALS with REINSTATE_SIGNAL_HANDLER
-
-figure out how to auto-conf HAS_HESIOD_RELOAD (amd/info_hesiod.c). For now
-I've used the macro HAVE_HS_ZONE_TRANSFER.
-
-
-
-
-******************************************************************************
-PERL SCRIPT TO FIX OLD AMD MAPS:
-- fix '=' to ':='
-- fix sos5 -> solaris2, etc.
-
-******************************************************************************
-USE AS IS:
-
-- SVC_IN_ARG_TYPE (change from SVC_IN_ARGS_TYPE, with an 'S')
-- NFS_FH_TYPE
-- MTYPE_TYPE
-- MOUNT_TYPE_* NO!!!
-
-******************************************************************************
-NEW FEATURES:
-
-- autofs
-- cachefs
-- dbm/gdbm/db file maps
-- add amd option -O (override) to override $os, $osver, $arch, $karch, etc.
-
-******************************************************************************
-DONE:
-
-HAS_TFS is gone and all of it's code too.
-major code cleanup, removed if 0 code and if notdef
diff --git a/contrib/amd/amd/.cvsignore b/contrib/amd/amd/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/amd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/amd/amd.8 b/contrib/amd/amd/amd.8
index a3967a6..f98bae7 100644
--- a/contrib/amd/amd/amd.8
+++ b/contrib/amd/amd/amd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,320 +38,312 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amd.8,v 1.4.2.5 2004/01/06 03:15:16 ezk Exp $
+.\" $Id: amd.8,v 1.4.2.4 2003/03/16 01:46:59 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH AMD 8 "3 November 1989"
-.SH NAME
-amd \- automatically mount file systems
-.SH SYNOPSIS
-.B amd
-.B \-H
-.br
-.B amd
-[
-.BI \-F " conf_file"
-]
-.br
-.B amd
-[
-.B \-nprvHS
-] [
-.BI \-a " mount_point"
-] [
-.BI \-c " duration"
-] [
-.BI \-d " domain"
-] [
-.BI \-k " kernel-arch"
-] [
-.BI \-l " logfile"
-] [
-.BI \-o " op_sys_ver"
-] [
-.BI \-t " interval.interval"
-] [
-.BI \-w " interval"
-] [
-.BI \-x " log-option"
-] [
-.BI \-y " YP-domain"
-] [
-.BI \-C " cluster-name"
-] [
-.BI \-D " option"
-] [
-.BI \-F " conf_file"
-] [
-.BI \-O " op_sys_name"
-] [
-.BI \-T " tag"
-]
-[
-.I directory
-.I mapname
-.RI [ " \-map-options " ]
-] .\|.\|.
-.SH DESCRIPTION
-.B Amd
-is a daemon that automatically mounts filesystems
-whenever a file or directory
-within that filesystem is accessed.
-Filesystems are automatically unmounted when they
-appear to have become quiescent.
-.LP
-.B Amd
+.Dd April 19, 1994
+.Dt AMD 8
+.Os
+.Sh NAME
+.Nm amd
+.Nd automatically mount file systems
+.Sh SYNOPSIS
+.Nm amd
+.Fl H
+.Nm amd
+.Op Fl F Ar conf_file
+.Nm amd
+.Op Fl nprvHS
+.Op Fl a Ar mount_point
+.Op Fl c Ar duration
+.Op Fl d Ar domain
+.Bk -words
+.Op Fl k Ar kernel-arch
+.Ek
+.Op Fl l Ar logfile
+.Op Fl o Ar op_sys_ver
+.Op Fl t Ar timeout.retransmit
+.Bk -words
+.Op Fl w Ar interval
+.Ek
+.Op Fl x Ar log-option
+.Op Fl y Ar YP-domain
+.Bk -words
+.Op Fl C Ar cluster-name
+.Ek
+.Op Fl D Ar option
+.Op Fl F Ar conf_file
+.Op Fl O Ar op_sys_name
+.Op Fl T Ar tag
+.Oo
+.Ar directory mapname
+.Op Fl map-options
+.Oc
+.Ar ...
+.Sh DESCRIPTION
+.Nm Amd
+is a daemon that automatically mounts file systems whenever a file or directory
+within that file system is accessed. File systems are automatically unmounted
+when they appear to be quiescent.
+.Pp
+.Nm Amd
operates by attaching itself as an
-.SM NFS
+.Tn NFS
server to each of the specified
-.IB directories .
+.Ar directories .
Lookups within the specified directories
are handled by
-.BR amd ,
+.Nm amd ,
which uses the map defined by
-.I mapname
-to determine how to resolve the lookup.
-Generally, this will be a host name, some filesystem information
-and some mount options for the given filesystem.
-.LP
+.Ar mapname
+to determine how to resolve the lookup. Generally, this will be a host name,
+some file system information and some mount options for the given file system.
+.Pp
In the first form depicted above,
-.B amd
+.Nm amd
will print a short help string. In the second form, if no options are
-specified, or the
-.B -F
-is used,
-.B amd
-will read configuration parameters from the file
-.I conf_file
+specified, or if the
+.Fl F
+is used,
+.Nm amd
+will read configuration parameters from the file
+.Ar conf_file
which defaults to
-.BR /etc/amd.conf .
+.Pa /etc/amd.conf .
The last form is described below.
-.SH OPTIONS
-
-.\"*******************************************************"
-
-.TP
-.BI \-a " temporary-directory"
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl a Ar temporary-directory
Specify an alternative location for the real mount points.
The default is
-.BR /a .
-
-.TP
-.BI \-c " duration"
+.Pa /.amd_mnt .
+.It Fl c Ar duration
Specify a
-.IR duration ,
+.Ar duration ,
in seconds, that a looked up name remains
cached when not in use. The default is 5 minutes.
-
-.TP
-.BI \-d " domain"
+.It Fl d Ar domain
Specify the local domain name. If this option is not
given the domain name is determined from the hostname.
-
-.TP
-.BI \-k " kernel-arch"
+.It Fl k Ar kernel-arch
Specifies the kernel architecture. This is used solely
to set the ${karch} selector.
-
-.TP
-.BI \-l " logfile"
+.It Fl l Ar logfile
Specify a logfile in which to record mount and unmount events.
If
-.I logfile
+.Ar logfile
is the string
-.B syslog
-then the log messages will be sent to the system log daemon by
-.IR syslog (3).
-The default syslog facility used is LOG_DAEMON. If you
-wish to change it, append its name to the log file name, delimited by a
-single colon. For example, if
-.I logfile
+.Em syslog ,
+the log messages will be sent to the system log daemon by
+.Xr syslog 3 .
+The default syslog facility used is LOG_DAEMON.
+If you wish to change it, append its name to the log file name,
+delimited by a single colon.
+For example, if
+.Ar logfile
is the string
-.B syslog:local7
+.Dq Li syslog:local7
then
-.B Amd
-will log messages via
-.IR syslog (3)
+.Nm amd
+will log messages via
+.Xr syslog 3
using the LOG_LOCAL7 facility (if it exists on the system).
-
-.TP
-.B \-n
+.It Fl n
Normalize hostnames.
-The name refereed to by ${rhost} is normalized relative to the
+The name referred to by ${rhost} is normalized relative to the
host database before being used. The effect is to translate
aliases into ``official'' names.
-
-.TP
-.BI \-o " op_sys_ver"
-Override the compiled-in version number of the operating system. Useful
-when the built in version is not desired for backward compatibility reasons.
-For example, if the build in version is ``2.5.1'', you can override it to
-``5.5.1'', and use older maps that were written with the latter in mind.
-
-.TP
-.B \-p
-Print PID.
+.It Fl o Ar op_sys_ver
+Override the compiled-in version number of the operating system.
+Useful when the built in version is not desired for backward
+compatibility reasons.
+For example, if the build in version is
+.Dq 2.5.1 ,
+you can override it to
+.Dq 5.5.1 ,
+and use older maps that were written with the latter in mind.
+.It Fl p
+Print
+.Em PID .
Outputs the process-id of
-.B amd
+.Nm amd
to standard output where it can be saved into a file.
-
-.TP
-.B \-r
+.It Fl r
Restart existing mounts.
-.B Amd
-will scan the mount file table to determine which filesystems
+.Nm Amd
+will scan the mount file table to determine which file systems
are currently mounted. Whenever one of these would have
been auto-mounted,
-.B amd
-.I inherits
+.Nm amd
+.Em inherits
it.
-
-.TP
-.BI \-t " timeout.retransmit"
+.It Fl t Ar timeout.retransmit
Specify the NFS timeout
-.IR interval ,
-in tenths of a second, between NFS/RPC retries (for UDP only). The default
+.Ar interval ,
+in tenths of a second, between
+.Tn NFS/RPC
+retries (for UDP only). The default
is 0.8 seconds. The second value alters the retransmit counter, which
defaults to 11 retransmissions. Both of these values are used by the kernel
to communicate with amd. Useful defaults are supplied if either or both
values are missing.
-
+.Pp
Amd relies on the kernel RPC retransmit mechanism to trigger mount retries.
The values of these parameters change the overall retry interval. Too long
an interval gives poor interactive response; too short an interval causes
excessive retries.
-
-.TP
-.B \-v
+.It Fl v
Version. Displays version and configuration information on standard error.
-
-.TP
-.BI \-w " interval"
+.It Fl w Ar interval
Specify an
-.IR interval ,
-in seconds, between attempts to dismount
-filesystems that have exceeded their cached times.
-The default is 2 minutes.
-
-.TP
-.BI \-x " options"
-Specify run-time logging options. The options are a comma separated
-list chosen from: fatal, error, user, warn, info, map, stats, all.
-
-.TP
-.BI \-y " domain"
-Specify an alternative NIS domain from which to fetch the NIS maps.
-The default is the system domain name. This option is ignored if NIS
+.Ar interval ,
+in seconds, between attempts to dismount file systems that have exceeded their
+cached times. The default is 2 minutes.
+.It Fl x Ar options
+Specify run-time logging options. The options are a comma separated list
+chosen from: fatal, error, user, warn, info, map, stats, all.
+.It Fl y Ar domain
+Specify an alternative
+.Tn NIS
+domain from which to fetch the
+.Tn NIS
+maps.
+The default is the system domain name.
+This option is ignored if
+.Tn NIS
support is not available.
-
-.TP
-.BI \-C " cluster-name"
+.It Fl C Ar cluster-name
Specify an alternative HP-UX cluster name to use.
-
-.TP
-.BI \-D " option"
+.It Fl D Ar option
Select from a variety of debug options. Prefixing an
-option with the strings
-.B no
+option with the string
+.Em no
reverses the effect of that option. Options are cumulative.
The most useful option is
-.BR all .
+.Ar all .
+.Pp
Since
-.I \-D
+.Fl D
is only used for debugging other options are not documented here:
-the current supported set of options is listed by the \-v option
+the current supported set of options is listed by the
+.Fl v
+option
and a fuller description is available in the program source.
-
-.TP
-.BI \-F " conf_file"
-Specify an amd configuration file to use. See
-.BR amd.conf (5)
+.It Fl F Ar conf_file
+Specify an
+.Nm amd
+configuration file to use. See
+.Xr amd.conf 5
for description of this file's format. This configuration file is used to
specify any options in lieu of typing many of them on the command line. The
-.I amd.conf
-file includes directives for every command line option amd has, and many
-more that are only available via the configuration file facility. The
-configuration file specified by this option is processed after all other
-options had been processed, regardless of the actual location of this option
-on the command line.
-
-.TP
-.B \-H
+.Nm amd.conf
+file includes directives for every command line option amd has,
+and many more that are only available via the configuration file
+facility. The configuration file specified by this option is
+processed after all other options have been processed, regardless
+of the actual location of this option on the command line.
+.It Fl H
Print help and usage string.
-
-.TP
-.BI \-O " op_sys_name"
-Override the compiled-in name of the operating system. Useful when the
-built in name is not desired for backward compatibility reasons. For
-example, if the build in name is ``sunos5'', you can override it to
-``sos5'', and use older maps which were written with the latter in mind.
-
-.TP
-.B \-S
-Do not lock the running executable pages of amd into memory. To improve
-amd's performance, systems that support the
-.BR plock (3)
-call, could lock the amd process into memory. This way there is less chance
-the operating system will schedule, page out, and swap the amd process as
-needed. This tends improves amd's performance, at the cost of reserving the
-memory used by the amd process (making it unavailable for other processes).
+.It Fl O Ar op_sys_name
+Override the compiled-in name of the operating system.
+Useful when the built in name is not desired for backward
+compatibility reasons.
+For example, if the build in name is
+.Dq sunos5 ,
+you can override it to
+.Dq sos5
+and use older maps which were written with the latter in mind.
+.It Fl S
+Do not lock the running executable pages of
+.Nm amd
+into memory. To improve
+.Nm amd's
+performance, systems that support the
+.Xr plock 3
+call, could lock the
+.Nm amd
+process into memory. This way there is less chance the operating system will
+schedule, page out, and swap the
+.Nm amd
+process as needed. This tends to improve
+.Nm amd's
+performance, at the cost of reserving the memory used by the
+.Nm amd
+process
+(making it unavailable for other processes).
If this behavior is not desired, use the
-.B \-S
+.Fl S
option.
-
-.TP
-.BI \-T " tag"
+.It Fl T Ar tag
Specify a tag to use with
-.BR amd.conf (5).
-All map entries tagged with
-.I tag
-will be processed. Map entries that are not tagged are always processed.
+.Xr amd.conf 5 .
+All Map entries tagged with tag will be processed.
+Map entries that are not tagged are always processed.
Map entries that are tagged with a tag other than
-.I tag
+.Ar tag
will not be processed.
-
-.SH FILES
-.PD 0
-.TP 5
-.B /a
-directory under which filesystems are dynamically mounted
-.TP 5
-.B /etc/amd.conf
+.El
+.Sh FILES
+.Bl -tag -width /axx
+.It Pa /.amd_mnt
+directory under which file systems are dynamically mounted
+.It Pa /etc/amd.conf
default configuration file
-.PD
-.SH CAVEATS
+.El
+.Sh CAVEATS
Some care may be required when creating a mount map.
-.LP
-Symbolic links on an NFS filesystem can be incredibly inefficient.
-In most implementations of NFS, their interpolations are not cached
-by the kernel and each time a symlink is encountered during a
-.I lookuppn
-translation it costs an RPC call to the NFS server.
-It would appear that a large improvement in real-time
+.Pp
+Symbolic links on an
+.Tn NFS
+file system can be incredibly inefficient.
+In most implementations of
+.Tn NFS ,
+their interpolations are not cached by
+the kernel and each time a symbolic link is
+encountered during a
+.Em lookuppn
+translation it costs an
+.Tn RPC
+call to the
+.Tn NFS
+server.
+A large improvement in real-time
performance could be gained by adding a cache somewhere.
-Replacing symlinks with a suitable incarnation of the auto-mounter
+Replacing
+.Xr symlink 2
+with a suitable incarnation of the auto-mounter
results in a large real-time speedup, but also causes a large
number of process context switches.
-.LP
+.Pp
A weird imagination is most useful to gain full advantage of all
the features.
-.SH "SEE ALSO"
-.BR amd.conf (5),
-.BR amq (8),
-.BR domainname (1),
-.BR hostname (1),
-.BR automount (8),
-.BR mount (8),
-.BR umount (8),
-.BR mtab (5),
-.BR syslog (3).
-.LP
-.I "Amd \- The 4.4 BSD Automounter"
-.SH AUTHORS
-Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK.
-.P
-Erez Zadok <ezk@cs.columbia.edu>, Department of Computer Science, Columbia
-University, New York, USA.
-.P
+.Sh SEE ALSO
+.Xr domainname 1 ,
+.Xr hostname 1 ,
+.Xr syslog 3 ,
+.Xr amd.conf 5 ,
+.Xr mtab 5 ,
+.Xr amq 8 ,
+.Xr mount 8 ,
+.Xr umount 8
+.Rs
+.%T Amd \- The 4.4 BSD Automounter
+.Re
+.Pp
+.Pa http://www.cs.columbia.edu/~ezk/am-utils/
+.Sh AUTHORS
+.An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
+Department of Computing, Imperial College, London, UK.
+.Pp
+.An Erez Zadok Aq ezk@cs.columbia.edu ,
+Department of Computer Science, Columbia University,
+New York, USA.
+.Pp
Other authors and contributors to am-utils are listed in the
-.B AUTHORS
+.Pa AUTHORS
file distributed with am-utils.
+.Sh HISTORY
+The
+.Nm amd
+utility first appeared in
+.Bx 4.4 .
diff --git a/contrib/amd/amd/amd.c b/contrib/amd/amd/amd.c
index e2631ae..1cc97b7 100644
--- a/contrib/amd/amd/amd.c
+++ b/contrib/amd/amd/amd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amd.c,v 1.8.2.6 2004/01/06 03:15:16 ezk Exp $
+ * $Id: amd.c,v 1.8.2.5 2002/12/27 22:44:29 ezk Exp $
+ * $FreeBSD$
*
*/
@@ -224,7 +225,7 @@ init_global_options(void)
gopt.arch = HOST_ARCH;
/* automounter temp dir */
- gopt.auto_dir = "/a";
+ gopt.auto_dir = "/.amd_mnt";
/* cluster name */
gopt.cluster = NULL;
diff --git a/contrib/amd/amd/amq_subr.c b/contrib/amd/amd/amq_subr.c
index d0e49ba..6ce7bfa 100644
--- a/contrib/amd/amd/amq_subr.c
+++ b/contrib/amd/amd/amq_subr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_subr.c,v 1.6.2.6 2004/01/19 00:25:55 ezk Exp $
+ * $Id: amq_subr.c,v 1.6.2.4 2002/12/27 22:44:33 ezk Exp $
+ * $FreeBSD$
*
*/
/*
@@ -74,7 +75,7 @@ amqproc_mnttree_1_svc(voidp argp, struct svc_req *rqstp)
static am_node *mp;
mp = find_ap(*(char **) argp);
- return (amq_mount_tree_p *) ((void *)&mp);
+ return (amq_mount_tree_p *) &mp;
}
@@ -100,7 +101,7 @@ amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp)
amq_mount_stats *
amqproc_stats_1_svc(voidp argp, struct svc_req *rqstp)
{
- return (amq_mount_stats *) ((void *)&amd_stats);
+ return (amq_mount_stats *) &amd_stats;
}
@@ -168,7 +169,7 @@ amqproc_setopt_1_svc(voidp argp, struct svc_req *rqstp)
amq_mount_info_list *
amqproc_getmntfs_1_svc(voidp argp, struct svc_req *rqstp)
{
- return (amq_mount_info_list *) ((void *)&mfhead); /* XXX */
+ return (amq_mount_info_list *) &mfhead; /* XXX */
}
@@ -285,7 +286,7 @@ xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp)
if (!xdr_amq_mount_tree_node(xdrs, objp)) {
return (FALSE);
}
- if (!xdr_pointer(xdrs, (char **) ((void *)&mnil), sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
+ if (!xdr_pointer(xdrs, (char **) &mnil, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
return (FALSE);
}
if (!xdr_pointer(xdrs, (char **) &mp->am_child, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
diff --git a/contrib/amd/amd/get_args.c b/contrib/amd/amd/get_args.c
index df85683..cc9847d 100644
--- a/contrib/amd/amd/get_args.c
+++ b/contrib/amd/amd/get_args.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: get_args.c,v 1.7.2.6 2004/01/06 03:15:16 ezk Exp $
+ * $Id: get_args.c,v 1.7.2.5 2002/12/27 22:44:34 ezk Exp $
+ * $FreeBSD$
*
*/
@@ -85,7 +86,7 @@ get_version_string(void)
vers = xmalloc(2048 + wire_buf_len);
sprintf(vers, "%s\n%s\n%s\n%s\n",
- "Copyright (c) 1997-2004 Erez Zadok",
+ "Copyright (c) 1997-2003 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.");
diff --git a/contrib/amd/amd/ops_autofs.c b/contrib/amd/amd/ops_autofs.c
deleted file mode 100644
index bd0bb12..0000000
--- a/contrib/amd/amd/ops_autofs.c
+++ /dev/null
@@ -1,1279 +0,0 @@
-/*
- * 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: ops_autofs.c,v 1.7.2.4 2001/04/24 06:17:40 ib42 Exp $
- *
- */
-
-/*
- * Automounter filesystem
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* HAVE_CONFIG_H */
-#include <am_defs.h>
-#include <amd.h>
-
-/*
- * KLUDGE: wrap whole file in HAVE_FS_AUTOFS, because
- * not all systems with an automounter file system are supported
- * by am-utils yet...
- */
-
-#ifdef HAVE_FS_AUTOFS
-
-/*
- * MACROS:
- */
-#ifndef AUTOFS_NULL
-# define AUTOFS_NULL ((u_long)0)
-#endif /* not AUTOFS_NULL */
-
-/*
- * VARIABLES:
- */
-
-/* forward declarations */
-static int mount_autofs(char *dir, char *opts);
-static int autofs_mount_1_svc(struct mntrequest *mr, struct mntres *result, struct authunix_parms *cred);
-static int autofs_unmount_1_svc(struct umntrequest *ur, struct umntres *result, struct authunix_parms *cred);
-
-/* external declarations */
-extern bool_t xdr_mntrequest(XDR *, mntrequest *);
-extern bool_t xdr_mntres(XDR *, mntres *);
-extern bool_t xdr_umntrequest(XDR *, umntrequest *);
-extern bool_t xdr_umntres(XDR *, umntres *);
-
-/*
- * STRUCTURES:
- */
-
-/* Sun's kernel-based automounter-supporting file system */
-am_ops autofs_ops =
-{
- "autofs",
- amfs_auto_match,
- 0, /* amfs_auto_init */
- autofs_mount,
- 0,
- autofs_umount,
- 0,
- amfs_auto_lookuppn,
- amfs_auto_readdir, /* browsable version of readdir() */
- 0, /* autofs_readlink */
- autofs_mounted,
- 0, /* autofs_umounted */
- find_amfs_auto_srvr,
- FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY
-};
-
-
-/****************************************************************************
- *** FUNCTIONS ***
- ****************************************************************************/
-
-/*
- * Mount the top-level using autofs
- */
-int
-autofs_mount(am_node *mp)
-{
- mntfs *mf = mp->am_mnt;
- struct stat stb;
- char opts[256], preopts[256];
- int error;
- char *mnttype;
-
- /*
- * Mounting the automounter.
- * Make sure the mount directory exists, construct
- * the mount options and call the mount_autofs routine.
- */
-
- if (stat(mp->am_path, &stb) < 0) {
- return errno;
- } else if ((stb.st_mode & S_IFMT) != S_IFDIR) {
- plog(XLOG_WARNING, "%s is not a directory", mp->am_path);
- return ENOTDIR;
- }
- if (mf->mf_ops == &autofs_ops)
- mnttype = "indirect";
- else if (mf->mf_ops == &amfs_direct_ops)
- mnttype = "direct";
-#ifdef HAVE_AMU_FS_UNION
- else if (mf->mf_ops == &amfs_union_ops)
- mnttype = "union";
-#endif /* HAVE_AMU_FS_UNION */
- else
- mnttype = "auto";
-
- /*
- * Construct some mount options:
- *
- * Tack on magic map=<mapname> option in mtab to emulate
- * SunOS automounter behavior.
- */
- preopts[0] = '\0';
-#ifdef MNTTAB_OPT_INTR
- strcat(preopts, MNTTAB_OPT_INTR);
- strcat(preopts, ",");
-#endif /* MNTTAB_OPT_INTR */
-#ifdef MNTTAB_OPT_IGNORE
- strcat(preopts, MNTTAB_OPT_IGNORE);
- strcat(preopts, ",");
-#endif /* MNTTAB_OPT_IGNORE */
- sprintf(opts, "%s%s,%s=%d,%s=%d,%s=%d,%s,map=%s",
- preopts,
- MNTTAB_OPT_RW,
- MNTTAB_OPT_PORT, nfs_port,
- MNTTAB_OPT_TIMEO, gopt.amfs_auto_timeo,
- MNTTAB_OPT_RETRANS, gopt.amfs_auto_retrans,
- mnttype, mf->mf_info);
-
- /* now do the mount */
- error = mount_autofs(mf->mf_mount, opts);
- if (error) {
- errno = error;
- plog(XLOG_FATAL, "mount_autofs: %m");
- return error;
- }
- return 0;
-}
-
-
-void
-autofs_mounted(mntfs *mf)
-{
- amfs_auto_mkcacheref(mf);
-}
-
-
-/*
- * Unmount a top-level automount node
- */
-int
-autofs_umount(am_node *mp)
-{
- int error;
- struct stat stb;
-
- /*
- * The lstat is needed if this mount is type=direct. When that happens,
- * the kernel cache gets confused between the underlying type (dir) and
- * the mounted type (link) and so needs to be re-synced before the
- * unmount. This is all because the unmount system call follows links and
- * so can't actually unmount a link (stupid!). It was noted that doing an
- * ls -ld of the mount point to see why things were not working actually
- * fixed the problem - so simulate an ls -ld here.
- */
- if (lstat(mp->am_path, &stb) < 0) {
-#ifdef DEBUG
- dlog("lstat(%s): %m", mp->am_path);
-#endif /* DEBUG */
- }
- error = UMOUNT_FS(mp->am_path, mnttab_file_name);
- if (error == EBUSY && mp->am_flags & AMF_AUTOFS) {
- plog(XLOG_WARNING, "autofs_unmount of %s busy (autofs). exit", mp->am_path);
- error = 0; /* fake unmount was ok */
- }
- return error;
-}
-
-
-/*
- * Mount an automounter directory.
- * The automounter is connected into the system
- * as a user-level NFS server. mount_autofs constructs
- * the necessary NFS parameters to be given to the
- * kernel so that it will talk back to us.
- */
-static int
-mount_autofs(char *dir, char *opts)
-{
- char fs_hostname[MAXHOSTNAMELEN + MAXPATHLEN + 1];
- char *map_opt, buf[MAXHOSTNAMELEN];
- int retry, error, flags;
- struct utsname utsname;
- mntent_t mnt;
- autofs_args_t autofs_args;
- MTYPE_TYPE type = MOUNT_TYPE_AUTOFS;
-
- memset((voidp) &autofs_args, 0, sizeof(autofs_args)); /* Paranoid */
-
- memset((voidp) &mnt, 0, sizeof(mnt));
- mnt.mnt_dir = dir;
- mnt.mnt_fsname = pid_fsname;
- mnt.mnt_opts = opts;
- mnt.mnt_type = type;
-
- retry = hasmntval(&mnt, "retry");
- if (retry <= 0)
- retry = 2; /* XXX */
-
- /*
- * SET MOUNT ARGS
- */
- if (uname(&utsname) < 0) {
- strcpy(buf, "localhost.autofs");
- } else {
- strcpy(buf, utsname.nodename);
- strcat(buf, ".autofs");
- }
-#ifdef HAVE_FIELD_AUTOFS_ARGS_T_ADDR
- autofs_args.addr.buf = buf;
- autofs_args.addr.len = strlen(autofs_args.addr.buf);
- autofs_args.addr.maxlen = autofs_args.addr.len;
-#endif /* HAVE_FIELD_AUTOFS_ARGS_T_ADDR */
-
- autofs_args.path = dir;
- autofs_args.opts = opts;
-
- map_opt = hasmntopt(&mnt, "map");
- if (map_opt) {
- map_opt += sizeof("map="); /* skip the "map=" */
- if (map_opt == NULL) {
- plog(XLOG_WARNING, "map= has a null map name. reset to amd.unknown");
- map_opt = "amd.unknown";
- }
- }
- autofs_args.map = map_opt;
-
- /* XXX: these I set arbitrarily... */
- autofs_args.mount_to = 300;
- autofs_args.rpc_to = 60;
- autofs_args.direct = 0;
-
- /*
- * Make a ``hostname'' string for the kernel
- */
- sprintf(fs_hostname, "pid%ld@%s:%s",
- (long) (foreground ? am_mypid : getppid()),
- am_get_hostname(), dir);
-
- /*
- * Most kernels have a name length restriction.
- */
- if (strlen(fs_hostname) >= MAXHOSTNAMELEN)
- strcpy(fs_hostname + MAXHOSTNAMELEN - 3, "..");
-
- /*
- * Finally we can compute the mount flags set above.
- */
- flags = compute_mount_flags(&mnt);
-
- /*
- * This is it! Here we try to mount amd on its mount points.
- */
- error = mount_fs(&mnt, flags, (caddr_t) &autofs_args, retry, type, 0, NULL, mnttab_file_name);
- return error;
-}
-
-
-/****************************************************************************/
-/* autofs program dispatcher */
-void
-autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp)
-{
- int ret;
- union {
- mntrequest autofs_mount_1_arg;
- umntrequest autofs_umount_1_arg;
- } argument;
- union {
- mntres mount_res;
- umntres umount_res;
- } result;
-
- bool_t (*xdr_argument)(), (*xdr_result)();
- int (*local)();
-
- switch (rqstp->rq_proc) {
-
- case AUTOFS_NULL:
- svc_sendreply(transp,
- (XDRPROC_T_TYPE) xdr_void,
- (SVC_IN_ARG_TYPE) NULL);
- return;
-
- case AUTOFS_MOUNT:
- xdr_argument = xdr_mntrequest;
- xdr_result = xdr_mntres;
- local = (int (*)()) autofs_mount_1_svc;
- break;
-
- case AUTOFS_UNMOUNT:
- xdr_argument = xdr_umntrequest;
- xdr_result = xdr_umntres;
- local = (int (*)()) autofs_unmount_1_svc;
- break;
-
- default:
- svcerr_noproc(transp);
- return;
- }
-
- memset((char *) &argument, 0, sizeof(argument));
- if (!svc_getargs(transp,
- (XDRPROC_T_TYPE) xdr_argument,
- (SVC_IN_ARG_TYPE) &argument)) {
- plog(XLOG_ERROR,
- "AUTOFS xdr decode failed for %d %d %d",
- (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc);
- svcerr_decode(transp);
- return;
- }
-
- ret = (*local) (&argument, &result, rqstp);
- if (!svc_sendreply(transp,
- (XDRPROC_T_TYPE) xdr_result,
- (SVC_IN_ARG_TYPE) &result)) {
- svcerr_systemerr(transp);
- }
-
- if (!svc_freeargs(transp,
- (XDRPROC_T_TYPE) xdr_argument,
- (SVC_IN_ARG_TYPE) &argument)) {
- plog(XLOG_FATAL, "unable to free rpc arguments in autofs_program_1");
- going_down(1);
- }
-}
-
-
-static int
-autofs_mount_1_svc(struct mntrequest *mr, struct mntres *result, struct authunix_parms *cred)
-{
- int err = 0;
- am_node *anp, *anp2;
-
- plog(XLOG_INFO, "XXX: autofs_mount_1_svc: %s:%s:%s:%s",
- mr->map, mr->name, mr->opts, mr->path);
-
- /* look for map (eg. "/home") */
- anp = find_ap(mr->path);
- if (!anp) {
- plog(XLOG_ERROR, "map %s not found", mr->path);
- err = ENOENT;
- goto out;
- }
- /* turn on autofs in map flags */
- if (!(anp->am_flags & AMF_AUTOFS)) {
- plog(XLOG_INFO, "turning on AMF_AUTOFS for node %s", mr->path);
- anp->am_flags |= AMF_AUTOFS;
- }
-
- /*
- * Look for (and create if needed) the new node.
- *
- * If an error occurred, return it. If a -1 was returned, that indicates
- * that a mount is in progress, so sleep a while (while the backgrounded
- * mount is happening), and then signal the autofs to retry the mount.
- *
- * There's something I don't understand. I was thinking that this code
- * here is the one which will succeed eventually and will send an RPC
- * reply to the kernel, but apparently that happens somewhere else, not
- * here. It works though, just that I don't know how. Arg. -Erez.
- * */
- err = 0;
- anp2 = autofs_lookuppn(anp, mr->name, &err, VLOOK_CREATE);
- if (!anp2) {
- if (err == -1) { /* then tell autofs to retry */
- sleep(1);
- err = EAGAIN;
- }
- goto out;
- }
-
-out:
- result->status = err;
- return err;
-}
-
-
-static int
-autofs_unmount_1_svc(struct umntrequest *ur, struct umntres *result, struct authunix_parms *cred)
-{
- int err = 0;
-
-#ifdef HAVE_FIELD_UMNTREQUEST_RDEVID
- plog(XLOG_INFO, "XXX: autofs_unmount_1_svc: %d:%lu:%lu:0x%lx",
- ur->isdirect, (unsigned long) ur->devid, (unsigned long) ur->rdevid,
- (unsigned long) ur->next);
-#else /* HAVE_FIELD_UMNTREQUEST_RDEVID */
- plog(XLOG_INFO, "XXX: autofs_unmount_1_svc: %d:%lu:0x%lx",
- ur->isdirect, (unsigned long) ur->devid,
- (unsigned long) ur->next);
-#endif /* HAVE_FIELD_UMNTREQUEST_RDEVID */
-
- err = EINVAL; /* XXX: not implemented yet */
- goto out;
-
-out:
- result->status = err;
- return err;
-}
-
-
-/*
- * Pick a file system to try mounting and
- * do that in the background if necessary
- *
- For each location:
- if it is new -defaults then
- extract and process
- continue;
- fi
- if it is a cut then
- if a location has been tried then
- break;
- fi
- continue;
- fi
- parse mount location
- discard previous mount location if required
- find matching mounted filesystem
- if not applicable then
- this_error = No such file or directory
- continue
- fi
- if the filesystem failed to be mounted then
- this_error = error from filesystem
- elif the filesystem is mounting or unmounting then
- this_error = -1
- elif the fileserver is down then
- this_error = -1
- elif the filesystem is already mounted
- this_error = 0
- break
- fi
- if no error on this mount then
- this_error = initialize mount point
- fi
- if no error on this mount and mount is delayed then
- this_error = -1
- fi
- if this_error < 0 then
- retry = true
- fi
- if no error on this mount then
- make mount point if required
- fi
- if no error on this mount then
- if mount in background then
- run mount in background
- return -1
- else
- this_error = mount in foreground
- fi
- fi
- if an error occurred on this mount then
- update stats
- save error in mount point
- fi
- endfor
- */
-static int
-autofs_bgmount(struct continuation *cp, int mpe)
-{
- mntfs *mf = cp->mp->am_mnt; /* Current mntfs */
- mntfs *mf_retry = 0; /* First mntfs which needed retrying */
- int this_error = -1; /* Per-mount error */
- int hard_error = -1;
- int mp_error = mpe;
-
- /*
- * Try to mount each location.
- * At the end:
- * hard_error == 0 indicates something was mounted.
- * hard_error > 0 indicates everything failed with a hard error
- * hard_error < 0 indicates nothing could be mounted now
- */
- for (; this_error && *cp->ivec; cp->ivec++) {
- am_ops *p;
- am_node *mp = cp->mp;
- char *link_dir;
- int dont_retry;
-
- if (hard_error < 0)
- hard_error = this_error;
-
- this_error = -1;
-
- if (**cp->ivec == '-') {
- /*
- * Pick up new defaults
- */
- if (cp->auto_opts && *cp->auto_opts)
- cp->def_opts = str3cat(cp->def_opts, cp->auto_opts, ";", *cp->ivec + 1);
- else
- cp->def_opts = strealloc(cp->def_opts, *cp->ivec + 1);
-#ifdef DEBUG
- dlog("Setting def_opts to \"%s\"", cp->def_opts);
-#endif /* DEBUG */
- continue;
- }
- /*
- * If a mount has been attempted, and we find
- * a cut then don't try any more locations.
- */
- if (STREQ(*cp->ivec, "/") || STREQ(*cp->ivec, "||")) {
- if (cp->tried) {
-#ifdef DEBUG
- dlog("Cut: not trying any more locations for %s",
- mp->am_path);
-#endif /* DEBUG */
- break;
- }
- continue;
- }
-
- /* match the operators */
- p = ops_match(&cp->fs_opts, *cp->ivec, cp->def_opts, mp->am_path, cp->key, mp->am_parent->am_mnt->mf_info);
-
- /*
- * Find a mounted filesystem for this node.
- */
- mp->am_mnt = mf = realloc_mntfs(mf, p, &cp->fs_opts,
- cp->fs_opts.opt_fs,
- cp->fs_opts.fs_mtab,
- cp->auto_opts,
- cp->fs_opts.opt_opts,
- cp->fs_opts.opt_remopts);
-
- p = mf->mf_ops;
-#ifdef DEBUG
- dlog("Got a hit with %s", p->fs_type);
-#endif /* DEBUG */
-
- /*
- * Note whether this is a real mount attempt
- */
- if (p == &amfs_error_ops) {
- plog(XLOG_MAP, "Map entry %s for %s did not match", *cp->ivec, mp->am_path);
- if (this_error <= 0)
- this_error = ENOENT;
- continue;
- } else {
- if (cp->fs_opts.fs_mtab) {
- plog(XLOG_MAP, "Trying mount of %s on \"%s\" fstype %s",
- cp->fs_opts.fs_mtab, mp->am_path, p->fs_type);
- }
- cp->tried = TRUE;
- }
-
- this_error = 0;
- dont_retry = FALSE;
-
- if (mp->am_link) {
- XFREE(mp->am_link);
- mp->am_link = 0;
- }
- link_dir = mf->mf_fo->opt_sublink;
-
- if (link_dir && *link_dir) {
- if (*link_dir == '/') {
- mp->am_link = strdup(link_dir);
- } else {
- /*
- * 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)
- plog(XLOG_ERROR, "use %s instead of 0x%lx",
- cp->fs_opts.opt_fs, (unsigned long) mf->mf_fo->opt_fs);
-
- mp->am_link = str3cat((char *) 0,
- cp->fs_opts.opt_fs, "/", link_dir);
-
- normalize_slash(mp->am_link);
- }
- }
-
- if (mf->mf_error > 0) {
- this_error = mf->mf_error;
- } else if (mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)) {
- /*
- * Still mounting - retry later
- */
-#ifdef DEBUG
- dlog("Duplicate pending mount fstype %s", p->fs_type);
-#endif /* DEBUG */
- this_error = -1;
- } else if (FSRV_ISDOWN(mf->mf_server)) {
- /*
- * Would just mount from the same place
- * as a hung mount - so give up
- */
-#ifdef DEBUG
- dlog("%s is already hung - giving up", mf->mf_mount);
-#endif /* DEBUG */
- mp_error = EWOULDBLOCK;
- dont_retry = TRUE;
- this_error = -1;
- } else if (mf->mf_flags & MFF_MOUNTED) {
-#ifdef DEBUG
- dlog("duplicate mount of \"%s\" ...", mf->mf_info);
-#endif /* DEBUG */
-
- /*
- * Just call mounted()
- */
- am_mounted(mp);
-
- this_error = 0;
- break;
- }
-
- /*
- * Will usually need to play around with the mount nodes
- * file attribute structure. This must be done here.
- * Try and get things initialized, even if the fileserver
- * is not known to be up. In the common case this will
- * progress things faster.
- */
- if (!this_error) {
- /*
- * Fill in attribute fields.
- */
- if (mf->mf_ops->fs_flags & FS_DIRECTORY)
- mk_fattr(mp, NFDIR);
- else
- mk_fattr(mp, NFLNK);
-
- if (p->fs_init)
- this_error = (*p->fs_init) (mf);
- }
-
- /*
- * Make sure the fileserver is UP before doing any more work
- */
- if (!FSRV_ISUP(mf->mf_server)) {
-#ifdef DEBUG
- dlog("waiting for server %s to become available", mf->mf_server->fs_host);
-#endif /* DEBUG */
- this_error = -1;
- }
-
- if (!this_error && mf->mf_fo->opt_delay) {
- /*
- * If there is a delay timer on the mount
- * then don't try to mount if the timer
- * has not expired.
- */
- int i = atoi(mf->mf_fo->opt_delay);
- if (i > 0 && clocktime() < (cp->start + i)) {
-#ifdef DEBUG
- dlog("Mount of %s delayed by %lds", mf->mf_mount, i - clocktime() + cp->start);
-#endif /* DEBUG */
- this_error = -1;
- }
- }
-
- if (this_error < 0 && !dont_retry) {
- if (!mf_retry)
- mf_retry = dup_mntfs(mf);
- cp->retry = TRUE;
- }
-
- if (!this_error) {
- if (p->fs_flags & FS_MBACKGROUND) {
- mf->mf_flags |= MFF_MOUNTING; /* XXX */
-#ifdef DEBUG
- dlog("backgrounding mount of \"%s\"", mf->mf_mount);
-#endif /* DEBUG */
- if (cp->callout) {
- untimeout(cp->callout);
- cp->callout = 0;
- }
- run_task(try_mount, (voidp) mp, amfs_auto_cont, (voidp) cp);
- mf->mf_flags |= MFF_MKMNT; /* XXX */
- if (mf_retry)
- free_mntfs(mf_retry);
- return -1;
- } else {
-#ifdef DEBUG
- dlog("foreground mount of \"%s\" ...", mf->mf_info);
-#endif /* DEBUG */
- this_error = try_mount((voidp) mp);
- if (this_error < 0) {
- if (!mf_retry)
- mf_retry = dup_mntfs(mf);
- cp->retry = TRUE;
- }
- }
- }
-
- if (this_error >= 0) {
- if (this_error > 0) {
- amd_stats.d_merr++;
- if (mf != mf_retry) {
- mf->mf_error = this_error;
- mf->mf_flags |= MFF_ERROR;
- }
- }
-
- /*
- * Wakeup anything waiting for this mount
- */
- wakeup((voidp) mf);
- }
- }
-
- if (this_error && cp->retry) {
- free_mntfs(mf);
- mf = cp->mp->am_mnt = mf_retry;
- /*
- * Not retrying again (so far)
- */
- cp->retry = FALSE;
- cp->tried = FALSE;
- /*
- * Start at the beginning.
- * Rewind the location vector and
- * reset the default options.
- */
- cp->ivec = cp->xivec;
- cp->def_opts = strealloc(cp->def_opts, cp->auto_opts);
- /*
- * Arrange that autofs_bgmount is called
- * after anything else happens.
- */
-#ifdef DEBUG
- dlog("Arranging to retry mount of %s", cp->mp->am_path);
-#endif /* DEBUG */
- sched_task(amfs_auto_retry, (voidp) cp, (voidp) mf);
- if (cp->callout)
- untimeout(cp->callout);
- cp->callout = timeout(RETRY_INTERVAL, wakeup, (voidp) mf);
-
- cp->mp->am_ttl = clocktime() + RETRY_INTERVAL;
-
- /*
- * Not done yet - so don't return anything
- */
- return -1;
- }
-
- if (hard_error < 0 || this_error == 0)
- hard_error = this_error;
-
- /*
- * Discard handle on duff filesystem.
- * This should never happen since it
- * should be caught by the case above.
- */
- if (mf_retry) {
- if (hard_error)
- plog(XLOG_ERROR, "discarding a retry mntfs for %s", mf_retry->mf_mount);
- free_mntfs(mf_retry);
- }
-
- /*
- * If we get here, then either the mount succeeded or
- * there is no more mount information available.
- */
- if (hard_error < 0 && mp_error)
- hard_error = cp->mp->am_error = mp_error;
- if (hard_error > 0) {
- /*
- * Set a small(ish) timeout on an error node if
- * the error was not a time out.
- */
- switch (hard_error) {
- case ETIMEDOUT:
- case EWOULDBLOCK:
- cp->mp->am_timeo = 17;
- break;
- default:
- cp->mp->am_timeo = 5;
- break;
- }
- new_ttl(cp->mp);
- }
-
- /*
- * Make sure that the error value in the mntfs has a
- * reasonable value.
- */
- if (mf->mf_error < 0) {
- mf->mf_error = hard_error;
- if (hard_error)
- mf->mf_flags |= MFF_ERROR;
- }
-
- /*
- * In any case we don't need the continuation any more
- */
- free_continuation(cp);
-
- return hard_error;
-}
-
-
-/*
- * Automount interface to RPC lookup routine
- * Find the corresponding entry and return
- * the file handle for it.
- */
-am_node *
-autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
-{
- am_node *ap, *new_mp, *ap_hung;
- char *info; /* Mount info - where to get the file system */
- char **ivec, **xivec; /* Split version of info */
- char *auto_opts; /* Automount options */
- int error = 0; /* Error so far */
- char path_name[MAXPATHLEN]; /* General path name buffer */
- char apath[MAXPATHLEN]; /* autofs path (added space) */
- char *pfname; /* Path for database lookup */
- struct continuation *cp; /* Continuation structure if need to mount */
- int in_progress = 0; /* # of (un)mount in progress */
- char *dflts;
- mntfs *mf;
-
-#ifdef DEBUG
- dlog("in autofs_lookuppn");
-#endif /* DEBUG */
-
- /*
- * If the server is shutting down
- * then don't return information
- * about the mount point.
- */
- if (amd_state == Finishing) {
-#ifdef DEBUG
- if ((mf = mp->am_mnt) == 0 || mf->mf_ops == &amfs_direct_ops) {
- dlog("%s mount ignored - going down", fname);
- } else {
- dlog("%s/%s mount ignored - going down", mp->am_path, fname);
- }
-#endif /* DEBUG */
- ereturn(ENOENT);
- }
-
- /*
- * Handle special case of "." and ".."
- */
- if (fname[0] == '.') {
- if (fname[1] == '\0')
- return mp; /* "." is the current node */
- if (fname[1] == '.' && fname[2] == '\0') {
- if (mp->am_parent) {
-#ifdef DEBUG
- dlog(".. in %s gives %s", mp->am_path, mp->am_parent->am_path);
-#endif /* DEBUG */
- return mp->am_parent; /* ".." is the parent node */
- }
- ereturn(ESTALE);
- }
- }
-
- /*
- * Check for valid key name.
- * If it is invalid then pretend it doesn't exist.
- */
- if (!valid_key(fname)) {
- plog(XLOG_WARNING, "Key \"%s\" contains a disallowed character", fname);
- ereturn(ENOENT);
- }
-
- /*
- * Expand key name.
- * fname is now a private copy.
- */
- fname = expand_key(fname);
-
- for (ap_hung = 0, ap = mp->am_child; ap; ap = ap->am_osib) {
- /*
- * Otherwise search children of this node
- */
- if (FSTREQ(ap->am_name, fname)) {
- mf = ap->am_mnt;
- if (ap->am_error) {
- error = ap->am_error;
- continue;
- }
- /*
- * If the error code is undefined then it must be
- * in progress.
- */
- if (mf->mf_error < 0)
- goto in_progrss;
-
- /*
- * Check for a hung node
- */
- if (FSRV_ISDOWN(mf->mf_server)) {
-#ifdef DEBUG
- dlog("server hung");
-#endif /* DEBUG */
- error = ap->am_error;
- ap_hung = ap;
- continue;
- }
- /*
- * If there was a previous error with this node
- * then return that error code.
- */
- if (mf->mf_flags & MFF_ERROR) {
- error = mf->mf_error;
- continue;
- }
- if (!(mf->mf_flags & MFF_MOUNTED) || (mf->mf_flags & MFF_UNMOUNTING)) {
- in_progrss:
- /*
- * If the fs is not mounted or it is unmounting then there
- * is a background (un)mount in progress. In this case
- * we just drop the RPC request (return nil) and
- * wait for a retry, by which time the (un)mount may
- * have completed.
- */
-#ifdef DEBUG
- dlog("ignoring mount of %s in %s -- flags (%x) in progress",
- fname, mf->mf_mount, mf->mf_flags);
-#endif /* DEBUG */
- in_progress++;
- continue;
- }
-
- /*
- * Otherwise we have a hit: return the current mount point.
- */
-#ifdef DEBUG
- dlog("matched %s in %s", fname, ap->am_path);
-#endif /* DEBUG */
- XFREE(fname);
- return ap;
- }
- }
-
- if (in_progress) {
-#ifdef DEBUG
- dlog("Waiting while %d mount(s) in progress", in_progress);
-#endif /* DEBUG */
- XFREE(fname);
- ereturn(-1);
- }
-
- /*
- * If an error occurred then return it.
- */
- if (error) {
-#ifdef DEBUG
- errno = error; /* XXX */
- dlog("Returning error: %m");
-#endif /* DEBUG */
- XFREE(fname);
- ereturn(error);
- }
-
- /*
- * If doing a delete then don't create again!
- */
- switch (op) {
- case VLOOK_DELETE:
- ereturn(ENOENT);
-
- case VLOOK_CREATE:
- break;
-
- default:
- plog(XLOG_FATAL, "Unknown op to autofs_lookuppn: 0x%x", op);
- ereturn(EINVAL);
- }
-
- /*
- * If the server is going down then just return,
- * don't try to mount any more file systems
- */
- if ((int) amd_state >= (int) Finishing) {
-#ifdef DEBUG
- dlog("not found - server going down anyway");
-#endif /* DEBUG */
- XFREE(fname);
- ereturn(ENOENT);
- }
-
- /*
- * If we get there then this is a reference to an,
- * as yet, unknown name so we need to search the mount
- * map for it.
- */
- if (mp->am_pref) {
- sprintf(path_name, "%s%s", mp->am_pref, fname);
- pfname = path_name;
- } else {
- pfname = fname;
- }
-
- mf = mp->am_mnt;
-
-#ifdef DEBUG
- dlog("will search map info in %s to find %s", mf->mf_info, pfname);
-#endif /* DEBUG */
- /*
- * Consult the oracle for some mount information.
- * info is malloc'ed and belongs to this routine.
- * It ends up being free'd in free_continuation().
- *
- * Note that this may return -1 indicating that information
- * is not yet available.
- */
- error = mapc_search((mnt_map *) mf->mf_private, pfname, &info);
- if (error) {
- if (error > 0)
- plog(XLOG_MAP, "No map entry for %s", pfname);
- else
- plog(XLOG_MAP, "Waiting on map entry for %s", pfname);
- XFREE(fname);
- ereturn(error);
- }
-#ifdef DEBUG
- dlog("mount info is %s", info);
-#endif /* DEBUG */
-
- /*
- * Split info into an argument vector.
- * The vector is malloc'ed and belongs to
- * this routine. It is free'd in free_continuation()
- */
- xivec = ivec = strsplit(info, ' ', '\"');
-
- /*
- * Default error code...
- */
- if (ap_hung)
- error = EWOULDBLOCK;
- else
- error = ENOENT;
-
- /*
- * Allocate a new map
- */
- new_mp = exported_ap_alloc();
- if (new_mp == 0) {
- XFREE(xivec);
- XFREE(info);
- XFREE(fname);
- ereturn(ENOSPC);
- }
- if (mf->mf_auto)
- auto_opts = mf->mf_auto;
- else
- auto_opts = "";
-
- auto_opts = strdup(auto_opts);
-
-#ifdef DEBUG
- dlog("searching for /defaults entry");
-#endif /* DEBUG */
- if (mapc_search((mnt_map *) mf->mf_private, "/defaults", &dflts) == 0) {
- char *dfl;
- char **rvec;
-#ifdef DEBUG
- dlog("/defaults gave %s", dflts);
-#endif /* DEBUG */
- if (*dflts == '-')
- dfl = dflts + 1;
- else
- dfl = dflts;
-
- /*
- * Chop the defaults up
- */
- rvec = strsplit(dfl, ' ', '\"');
-
- 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
- * rest of the string.
- */
- if (rvec) {
- am_opts ap;
- am_ops *pt;
- char **sp = rvec;
- while (*sp) { /* loop until you find something, if any */
- memset((char *) &ap, 0, sizeof(am_opts));
- 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, "did not match defaults for \"%s\"", *sp);
- } else {
- dfl = strip_selectors(*sp, "/defaults");
- plog(XLOG_MAP, "matched default selectors \"%s\"", dfl);
- break;
- }
- ++sp;
- }
- }
- } else { /* not selectors_in_defaults */
- /*
- * Extract first value
- */
- dfl = rvec[0];
- }
-
- /*
- * If there were any values at all...
- */
- if (dfl) {
- /*
- * Log error if there were other values
- */
- if (!(gopt.flags & CFM_SELECTORS_IN_DEFAULTS) && rvec[1]) {
-# ifdef DEBUG
- dlog("/defaults chopped into %s", dfl);
-# endif /* DEBUG */
- plog(XLOG_USER, "More than a single value for /defaults in %s", mf->mf_info);
- }
-
- /*
- * Prepend to existing defaults if they exist,
- * otherwise just use these defaults.
- */
- if (*auto_opts && *dfl) {
- char *nopts = (char *) xmalloc(strlen(auto_opts) + strlen(dfl) + 2);
- sprintf(nopts, "%s;%s", dfl, auto_opts);
- XFREE(auto_opts);
- auto_opts = nopts;
- } else if (*dfl) {
- auto_opts = strealloc(auto_opts, dfl);
- }
- }
- XFREE(dflts);
- /*
- * Don't need info vector any more
- */
- XFREE(rvec);
- }
-
- /*
- * Fill it in
- */
- init_map(new_mp, fname);
-
- /*
- * Turn on autofs flag if needed.
- */
- if (mp->am_flags & AMF_AUTOFS) {
- new_mp->am_flags |= AMF_AUTOFS;
- }
-
- /*
- * Put it in the table
- */
- insert_am(new_mp, mp);
-
- /*
- * Fill in some other fields,
- * path and mount point.
- *
- * bugfix: do not prepend old am_path if direct map
- * <wls@astro.umd.edu> William Sebok
- */
-
- strcpy(apath, fname);
- strcat(apath, " ");
- new_mp->am_path = str3cat(new_mp->am_path,
- mf->mf_ops == &amfs_direct_ops ? "" : mp->am_path,
- *fname == '/' ? "" : "/",
- apath);
-
-#ifdef DEBUG
- dlog("setting path to \"%s\"", new_mp->am_path);
-#endif /* DEBUG */
-
- /*
- * Take private copy of pfname
- */
- pfname = strdup(pfname);
-
- /*
- * Construct a continuation
- */
- cp = ALLOC(struct continuation);
- cp->callout = 0;
- cp->mp = new_mp;
- cp->xivec = xivec;
- cp->ivec = ivec;
- cp->info = info;
- cp->key = pfname;
- cp->auto_opts = auto_opts;
- cp->retry = FALSE;
- cp->tried = FALSE;
- cp->start = clocktime();
- cp->def_opts = strdup(auto_opts);
- memset((voidp) &cp->fs_opts, 0, sizeof(cp->fs_opts));
-
- /*
- * Try and mount the file system. If this succeeds immediately (possible
- * for a ufs file system) then return the attributes, otherwise just
- * return an error.
- */
- error = autofs_bgmount(cp, error);
- reschedule_timeout_mp();
- if (!error) {
- XFREE(fname);
- return new_mp;
- }
-
- /*
- * Code for quick reply. If nfs_program_2_transp is set, then
- * its the transp that's been passed down from nfs_program_2().
- * If new_mp->am_transp is not already set, set it by copying in
- * nfs_program_2_transp. Once am_transp is set, quick_reply() can
- * use it to send a reply to the client that requested this mount.
- */
- if (nfs_program_2_transp && !new_mp->am_transp) {
- new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT));
- *(new_mp->am_transp) = *nfs_program_2_transp;
- }
- if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops))
- new_mp->am_error = error;
-
- assign_error_mntfs(new_mp);
-
- XFREE(fname);
-
- ereturn(error);
-}
-#endif /* HAVE_FS_AUTOFS */
diff --git a/contrib/amd/amd/srvr_nfs.c b/contrib/amd/amd/srvr_nfs.c
index 48e0789..d745519 100644
--- a/contrib/amd/amd/srvr_nfs.c
+++ b/contrib/amd/amd/srvr_nfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: srvr_nfs.c,v 1.7.2.11 2004/01/06 03:15:16 ezk Exp $
+ * $Id: srvr_nfs.c,v 1.7.2.10 2002/12/29 01:55:43 ib42 Exp $
+ * $FreeBSD$
*
*/
diff --git a/contrib/amd/amq/.cvsignore b/contrib/amd/amq/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/amq/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/amq/amq.8 b/contrib/amd/amq/amq.8
index 7ccfd7c..e1dc13e 100644
--- a/contrib/amd/amq/amq.8
+++ b/contrib/amd/amq/amq.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,181 +38,178 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amq.8,v 1.3.2.8 2004/01/06 03:15:16 ezk Exp $
+.\" $Id: amq.8,v 1.2 1999/01/10 21:53:58 ezk Exp $
+.\" $Id: amq.8,v 1.3.2.7 2002/12/27 22:44:45 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH AMQ 8 "25 April 1989"
-.SH NAME
-amq \- automounter query tool
-.SH SYNOPSIS
-.B amq
-[
-.BI \-fmpsvwHTU
-] [
-.BI \-h " hostname"
-] [
-.BI \-l " log_file"
-] [
-.BI \-x " log_options"
-] [
-.BI \-D " debug_options"
-] [
-.BI \-P " program_number"
-] [[
-.B \-u
-]
-.I directory .\|.\|.
-]
-.SH DESCRIPTION
-.B Amq
-provides a simple way of determining the current state of
-.B amd
+.Dd March 16, 1991
+.Dt AMQ 8
+.Os
+.Sh NAME
+.Nm amq
+.Nd automounter query tool
+.Sh SYNOPSIS
+.Nm amq
+.Op Fl fmpsuvTU
+.Op Fl h Ar hostname
+.Op Fl l Ar log_file
+.Op Fl x Ar log_options
+.Op Fl D Ar debug_options
+.Op Fl M Ar mountmap_entry
+.Op Fl P Ar program_number
+.Op Ar directory
+.Ar ...
+.Sh DESCRIPTION
+.Nm Amq
+provides a simple way of determining the current state of the
+.Xr amd 8
program.
Communication is by
-.SM RPC.
-Three modes of operation are supported by the current protocol. By default
-a list of mount points and auto-mounted filesystems is output. An
-alternative host can be specified using the
-.I \-h
+.Tn RPC .
+Three modes of operation are supported by the current protocol.
+By default a list of mount points and auto-mounted file systems
+is output.
+An alternative host can be specified using the
+.Fl h
option.
-.LP
-If
-.I directory
-names are given, as output by default, then per-filesystem
-information is displayed.
-.SH OPTIONS
-
-.TP
-.B \-f
-Ask the automounter to flush the internal caches and reload all the maps.
-
-.TP
-.BI \-h " hostname"
-Specify an alternate host to query. By default the local host is used. In
-an
-.SM HP-UX
-cluster, the root server is queried by default, since that is the system on
-which the automounter is normally run.
-
-.TP
-.BI \-l " log_file"
+.Pp
+If directory names are given, as output by default,
+then per file system information is displayed.
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl f
+Request automounter to flush the internal caches.
+.It Fl h Ar hostname
+Query alternate host
+.Ar hostname .
+By default the local host is used. In an
+.Tn HP-UX
+cluster, the root server is queried by default, since
+that is the system on which the automounter is normally run.
+.It Fl l Ar log_file
Tell amd to use
-.I log_file
-as the log file name. For security reasons, this must be the same log file
-which amd used when started. This option is therefore only useful to
-refresh amd's open file handle on the log file, so that it can be rotated
-and compressed via daily cron jobs.
-
-.TP
-.B \-m
-Ask the automounter to provide a list of mounted filesystems, including the
-number of references to each filesystem and any error which occurred while
-mounting.
-
-.TP
-.B \-p
-Return the process ID of the remote or locally running amd. Useful when you
-need to send a signal to the local amd process, and would rather not have to
-search through the process table. This option is used in the
-.I ctl-amd
+.Ar log_file
+as the log file name.
+For security reasons, this must be the same log file which
+.Nm amd
+used when started. This option is therefore only useful to
+refresh
+.Nm amd Ns \'s
+open file handle on the log file, so that it can be rotated and compressed via
+daily cron jobs.
+.It Fl m
+Request the automounter to provide a list of mounted file systems,
+including the number of references to each file system and any error
+which occurred while mounting.
+.It Fl p
+Return the process ID of the remote or locally running
+.Nm amd .
+Useful when you need to send a signal to the local
+.Nm amd
+process, and would rather not have to search through the process table. This
+option is used in the
+.Pa ctl-amd
script.
-
-.TP
-.B \-s
-Ask the automounter to provide system-wide mount statistics.
-
-.TP
-.B \-u
-Ask the automounter to unmount the filesystems named in
-.I directory
-instead of providing
-information about them. Unmounts are requested, not forced. They merely
-cause the mounted filesystem to timeout, which will be picked up by
-.BR amd 's
+.It Fl s
+Request the automounter to provide system-wide mount statistics.
+.It Fl u
+Request the automounter to unmount the named file systems
+instead of providing information about them. Unmounts are requested,
+not forced. They merely cause the mounted file system to timeout,
+which will be picked up by
+.Nm amd Ns \'s
main scheduler thus causing the normal timeout action to be taken.
-
-.TP
-.B \-v
-Ask the automounter for its version information. This is a subset of the
-information output by
-.BR amd 's
-.I -v
+.It Fl v
+Request the automounter to provide version information. This is a subset
+of the information provided by
+.Nm amd Ns \'s Fl v
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
+.It Fl x Ar log_options
+Ask the automounter to use the logging options specified in
+.Ar log_options
from now on.
-
-.TP
-.BI \-D " log_options"
-Ask the automounter to use the debugging options specified in
-.I debug_options
+.It Fl D Ar log_options
+Ask the automounter to use the debugging options specified in
+.Ar debug_options
from now on.
-
-.TP
-.B \-H
-Display short usage message.
-
-.TP
-.BI \-P " program_number"
-Contact an alternate running amd that had registered itself on a different
-RPC
-.I program_number
-and apply all other operations to that instance of the automounter. This is
-useful when you run multiple copies of amd, and need to manage each
-one separately. If not specified, amq will use the default program number
-for amd, 300019. For security reasons, the only alternate program numbers
-amd can use range from 300019 to 300029, inclusive.
-
-.TP
-.B \-T
+.It Fl M
+Pass a mount map entry to
+.Nm amd
+and wait for it to be evaluated, possibly causing a mount.
+This option is highly insecure.
+By default,
+.Nm amd
+and
+.Nm amq
+do not support it.
+It is necessary to configure
+.Nm am-utils
+with
+.Ar --enable-amq-mount
+to enable this option.
+.It Fl P Ar program_number
+Contact an alternate running
+.Nm amd
+that had registered itself on a different RPC
+.Ar program_number
+and apply all other operations to that instance of the automounter.
+This is useful when running multiple copies of
+.Nm amd ,
+and need to manage each one separately.
+If not specified,
+.Nm amq
+will use the default program number for
+.Nm amd ,
+300019.
+For security reasons, the only alternate program numbers
+.Nm amd
+can use range from 300019 to 300029, inclusive.
+.It Fl T
Contact
-.B amd
-using the TCP transport only. Normally
-.B amq
-will try TCP, and if that failed, will try UDP.
-
-.TP
-.B \-U
-Contact
-.B amd
-using UDP (connectionless) transport only. Normally
-.B amq
-will try TCP, and if that failed, will try UDP.
-
-.SH FILES
-.PD 0
-.TP 20
-.B amq.x
-.SM RPC
+.Nm amd
+using the TCP transport only.
+Normally
+.Nm amq
+will try TCP, and if that fails, will try UDP.
+.It Fl U
+Contact
+.Nm amd
+using UDP (connectionless) transport only.
+Normally
+.Nm amq
+will try TCP, and if that fails, will try UDP.
+.El
+.Sh FILES
+.Bl -tag -width amq.x -compact
+.It Pa amq.x
+.Tn RPC
protocol description.
-.SH CAVEATS
-.B Amq
+.El
+.Sh CAVEATS
+.Nm Amq
uses a Sun registered
-.SM RPC
+.Tn RPC
program number (300019 decimal) which may not
-be in the /etc/rpc database.
-.SH "SEE ALSO"
-.BR amd (8),
-.BR ctl-amd (8),
-.BR amd.conf (5).
-.SH AUTHORS
-Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK.
-.P
-Erez Zadok <ezk@cs.columbia.edu>, Department of Computer Science, Columbia
-University, New York, USA.
-.P
-Other authors and contributors to am-utils are listed in the
-.B AUTHORS
-file distributed with am-utils.
+be in the
+.Pa /etc/rpc
+database.
+.Sh SEE ALSO
+.Xr amd.conf 5 ,
+.Xr amd 8
+.Sh AUTHORS
+.An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
+Department of Computing, Imperial College, London, UK.
+.Pp
+.An Erez Zadok Aq ezk@cs.columbia.edu ,
+Department of Computer Science, Columbia University, New York, USA.
+.Pp
+.An Other authors and contributors to
+.Nm am-utils
+are listed in the
+.Nm AUTHORS
+file distributed with
+.Nm am-utils .
+.Sh HISTORY
+.Nm Amq
+first appeared in
+.Bx 4.4 .
diff --git a/contrib/amd/amq/amq.c b/contrib/amd/amq/amq.c
index 06574bf..56692b9 100644
--- a/contrib/amd/amq/amq.c
+++ b/contrib/amd/amq/amq.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,23 +38,26 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq.c,v 1.7.2.9 2004/01/06 03:15:16 ezk Exp $
+ * $Id: amq.c,v 1.7.2.8 2002/12/27 22:44:45 ezk Exp $
*
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* Automounter query tool
*/
#ifndef lint
char copyright[] = "\
-@(#)Copyright (c) 1997-2004 Erez Zadok\n\
+@(#)Copyright (c) 1997-2003 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.7.2.9 2004/01/06 03:15:16 ezk Exp $";
+static char rcsid[] = "$Id: amq.c,v 1.7.2.8 2002/12/27 22:44:45 ezk Exp $";
static char sccsid[] = "%W% (Berkeley) %G%";
#endif /* __GNUC__ < 2 */
#endif /* not lint */
@@ -251,7 +254,14 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twi
mi->mi_up > 0 ? "up" :
mi->mi_up < 0 ? "starting" : "down");
if (mi->mi_error > 0) {
- printf(" (%s)", strerror(mi->mi_error));
+ if (mi->mi_error < sys_nerr)
+#ifdef HAVE_STRERROR
+ printf(" (%s)", strerror(mi->mi_error));
+#else /* not HAVE_STRERROR */
+ printf(" (%s)", sys_errlist[mi->mi_error]);
+#endif /* not HAVE_STRERROR */
+ else
+ printf(" (Error %d)", mi->mi_error);
} else if (mi->mi_error < 0) {
fputs(" (in progress)", stdout);
}
diff --git a/contrib/amd/amq/pawd.1 b/contrib/amd/amq/pawd.1
index d7ddebd..e4471f3 100644
--- a/contrib/amd/amq/pawd.1
+++ b/contrib/amd/amq/pawd.1
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,35 +38,43 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: pawd.1,v 1.3.2.4 2004/01/06 03:15:16 ezk Exp $
+.\" $Id: pawd.1,v 1.3.2.3 2002/12/27 22:44:46 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH PAWD 1 "6 Jan 1998"
-.SH NAME
-pawd \- print automounter working directory
-.SH SYNOPSIS
-.B pawd
-[
-.I path ...
-]
-.SH DESCRIPTION
-.LP
-.B pawd
+.Dd January 6, 1998
+.Dt PAWD 1
+.Os
+.Sh NAME
+.Nm pawd
+.Nd print automounter working directory
+.Sh SYNOPSIS
+.Nm
+.Op Ar path ...
+.Sh DESCRIPTION
+.Nm
is used to print the current working directory, adjusted to reflect proper
paths that can be reused to go through the automounter for the shortest
possible path. In particular, the path printed back does not include any
of
-.BR Amd 's
+.Nm Amd Ns \'s
local mount points. Using them is unsafe, because
-.B Amd
+.Nm Amd
may unmount managed file systems from the mount points, and thus including
them in paths may not always find the files within.
-.P
+.Pp
Without any arguments,
-.B pawd
+.Nm
will print the automounter adjusted current working directory. With any
-number of arguments, it will print the adjusted path of each one of the
+number of arguments, it will print the adjusted
+.Ar path
+of each one of the
arguments.
-.SH "SEE ALSO"
-.BR amd (8),
-.BR amq (8),
-.BR pwd (1).
+.Sh SEE ALSO
+.Xr pwd 1 ,
+.Xr amd 8 ,
+.Xr amq 8
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Fx 3.0 .
diff --git a/contrib/amd/conf/mount/mount_freebsd3.c b/contrib/amd/conf/mount/mount_freebsd3.c
deleted file mode 100644
index 5888ed9..0000000
--- a/contrib/amd/conf/mount/mount_freebsd3.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997-1998 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 acknowledgement:
- * 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: mount_freebsd3.c,v 5.2.2.1 1992/02/09 15:10:08 jsp beta $
- *
- */
-
-/*
- * FreeBSD 3.x (as of snapshot 3.0-980311-SNAP) Mount helper
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* HAVE_CONFIG_H */
-#include <am_defs.h>
-#include <amu.h>
-
-/*
- * Map from conventional mount arguments
- * to FreeBSD 3.0 style arguments.
- */
-int
-mount_freebsd3(MTYPE_TYPE type, const char *dir, int flags, voidp data)
-{
- char const *namelist[] = INITMOUNTNAMES;
-
- return mount(namelist[type],
- dir,
- flags,
- data);
-}
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h b/contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h
deleted file mode 100644
index e7fb478..0000000
--- a/contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 1997-2003 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_aix5_1.h,v 1.1.2.3 2002/12/27 22:44:53 ezk Exp $
- *
- */
-
-#ifndef _AMU_NFS_PROT_H
-#define _AMU_NFS_PROT_H
-
-
-/*
- * AIX 5.1 has a different aix51_nfs_args structure, hence the separate header.
- */
-
-#ifdef HAVE_RPCSVC_NFS_PROT_H
-# include <rpcsvc/nfs_prot.h>
-#endif /* HAVE_RPCSVC_NFS_PROT_H */
-#ifdef HAVE_NFS_NFSV2_H
-# include <nfs/nfsv2.h>
-#endif /* HAVE_NFS_NFSV2_H */
-#ifdef HAVE_NFS_RPCV2_H
-# include <nfs/rpcv2.h>
-#endif /* HAVE_NFS_RPCV2_H */
-#ifdef HAVE_SYS_FS_NFS_H
-# include <sys/fs/nfs.h>
-#endif /* HAVE_SYS_FS_NFS_H */
-#ifdef HAVE_RPCSVC_MOUNT_H
-# include <rpcsvc/mount.h>
-#endif /* HAVE_RPCSVC_MOUNT_H */
-
-
-/*
- * MACROS
- */
-
-#ifndef MNTPATHLEN
-# define MNTPATHLEN 1024
-#endif /* not MNTPATHLEN */
-#ifndef MNTNAMLEN
-# define MNTNAMLEN 255
-#endif /* not MNTNAMLEN */
-
-/* map field names */
-#define ex_dir ex_name
-#define gr_name g_name
-#define gr_next g_next
-#define ml_directory ml_path
-#define ml_hostname ml_name
-#define ml_next ml_nxt
-
-#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_blocks blocks
-#define na_blocksize blocksize
-#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_rdev rdev
-#define na_size size
-#define na_type type
-#define na_uid uid
-#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 char *dirpath;
-typedef char *name;
-typedef struct exports *exports;
-typedef struct exports exportnode;
-typedef struct groups *groups;
-typedef struct groups groupnode;
-typedef struct mountlist *mountlist;
-
-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;
-
-
-/*
- * EXTERNALS:
- */
-
-
-/*
- * STRUCTURES:
- */
-
-/*
- * AIX 5.1 has NFS V3, but it is undefined in the header files.
- * so I define everything that's needed for NFS V3 here.
- */
-#ifdef MNT_NFS3
-
-#define FHSIZE3 64 /* size in bytes of a file handle (v3) */
-#define NFS3_FHSIZE 64
-#define MOUNTVERS3 ((unsigned long)(3))
-#define NFS_V3 ((unsigned long)(3))
-
-#if 0
-struct nfs_fh3 {
- u_int len;
- char val[64]; /* !!! */
-};
-#endif
-
-struct aix51_nfs_args {
- struct sockaddr_in addr; /* server address and port */
- caddr_t u0; /* ??? UNKNOWN ??? */
- unsigned long proto; /* IPPROTO_TCP/IPPROTO_UDP */
- char *hostname; /* pointer to hostname? */
- char *netname; /* pointer to netname? */
- caddr_t fh; /* pointer to NFS v3 fh? */
- unsigned long u5; /* IBM sux, IBM sux, IBM sux... */
- unsigned long flags; /* flags */
- unsigned long wsize; /* wsize */
- unsigned long rsize; /* rsize */
- unsigned long timeo; /* timeo */
- unsigned long retrans; /* retrans */
- unsigned long acregmin; /* acregmin */
- unsigned long acregmax; /* acregmax */
- unsigned long acdirmin; /* acdirmin */
- unsigned long acdirmax; /* acdirmax */
- unsigned long u15; /* ??? UNKNOWN ??? */
- struct pathcnf *pathconf; /* pathconf */
-};
-
-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;
-
-struct nfs_fh3 {
- 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 nfs_fh3;
-
-#endif /* MNT_NFS3 */
-
-/*
- * EXTERNALS:
- */
-extern bool_t xdr_groups(XDR *xdrs, groups *objp);
-extern char *yperr_string (int incode);
-
-#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h b/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
deleted file mode 100644
index 9ef1e72..0000000
--- a/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright (c) 1997-2003 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.4 2002/12/27 22:44:54 ezk 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 (m4/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 e59602b..b0a66c3 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-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_freebsd2.h,v 1.3.2.4 2004/01/06 03:15:19 ezk Exp $
+ * $Id: nfs_prot_freebsd2.h,v 1.3.2.3 2002/12/27 22:44:54 ezk Exp $
+ * $FreeBSD$
*
*/
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h
index 4260080..c392497 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-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,21 +38,34 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_freebsd3.h,v 1.5.2.7 2004/01/06 03:15:19 ezk Exp $
+ * $Id: nfs_prot_freebsd3.h,v 1.5.2.6 2003/08/27 19:35:16 ib42 Exp $
+ * $FreeBSD$
*
*/
#ifndef _AMU_NFS_PROT_H
#define _AMU_NFS_PROT_H
+/* nfs_prot.h defines struct `nfs_fh3', but it is a ``dmr "unwarranted
+ * chumminess with the C implementation". We need the more complete
+ * structure, which is defined below. So get the stock `nfs_fh3'
+ * out of the way.
+ */
+struct nfs_fh3;
+#define nfs_fh3 nfs_fh3_fbsd_
+
#ifdef HAVE_RPCSVC_NFS_PROT_H
# include <rpcsvc/nfs_prot.h>
#endif /* HAVE_RPCSVC_NFS_PROT_H */
+
+#undef nfs_fh3
+
#ifdef HAVE_NFS_RPCV2_H
# include <nfs/rpcv2.h>
#endif /* HAVE_NFS_RPCV2_H */
#ifdef HAVE_NFS_NFS_H
-# include <nfs/nfs.h>
+# include <nfsclient/nfs.h>
+# include <nfsserver/nfs.h>
#endif /* HAVE_NFS_NFS_H */
#ifdef HAVE_UFS_UFS_UFSMOUNT_H
# include <ufs/ufs/ufsmount.h>
@@ -183,6 +196,10 @@ struct nfs_fh3_freebsd3 {
};
typedef struct nfs_fh3_freebsd3 nfs_fh3_freebsd3;
+/* since we don't use Am-utils's aux/macros/struct_nfs_fh3.m4, we don't get
+ their special searching. So restore the standard name. */
+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_osf5.h b/contrib/amd/conf/nfs_prot/nfs_prot_osf5.h
deleted file mode 100644
index 655e98d..0000000
--- a/contrib/amd/conf/nfs_prot/nfs_prot_osf5.h
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * Copyright (c) 1997-2003 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_osf5.h,v 1.1.2.4 2002/12/27 22:44:57 ezk 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_NFS_H
-# include <nfs/nfs.h>
-#endif /* HAVE_NFS_NFS_H */
-#ifdef HAVE_RPCSVC_MOUNTV3_H
-# include <rpcsvc/mountv3.h>
-#endif /* HAVE_RPCSVC_MOUNTV3_H */
-#ifdef HAVE_RPC_RPC_H
-# include <rpc/rpc.h>
-#endif /* HAVE_RPC_RPC_H */
-
-/* avoid conflicts with Irix's EFS */
-#undef MOUNT_EFS /* DCE Episode FS */
-
-/*
- * The NFSMNT_AUTO flag in Tru64 UNIX V5 has two effects: it causes df and
- * mount not to display this mount point without the -e switch, as it did in
- * previous releases. Unfortunately it also ignores the timeo mount option,
- * disables the usual timeout backof and enforces a timeout of NFS_MAXTIMO
- * (20 seconds) instead. This breaks amd which can sometimes take longer to
- * respond to an NFS request, causing `nfs server not responding still trying'
- * messages.
- *
- * To avoid this, we need to completely disable this flag on automount points,
- * with the unfortunate side effect that they are no longer hidden in df and
- * mount output.
- */
-#undef MNT2_NFS_OPT_AUTO
-
-/*
- * MACROS
- */
-
-#define NFS_PORT 2049
-#define NFS_MAXDATA 8192
-#define NFS_MAXPATHLEN 1024
-#define NFS_MAXNAMLEN 255
-#define NFS_FHSIZE 32
-#define NFS_COOKIESIZE 4
-#define MNTPATHLEN 1024
-#define MNTNAMLEN 255
-
-#define NFSMODE_FMT 0170000
-#define NFSMODE_DIR 0040000
-#define NFSMODE_CHR 0020000
-#define NFSMODE_BLK 0060000
-#define NFSMODE_REG 0100000
-#define NFSMODE_LNK 0120000
-#define NFSMODE_SOCK 0140000
-#define NFSMODE_FIFO 0010000
-
-#ifndef NFS_PROGRAM
-# define NFS_PROGRAM ((u_long)100003)
-#endif /* not NFS_PROGRAM */
-#ifndef NFS_VERSION
-# define NFS_VERSION ((u_long)2)
-#endif /* not NFS_VERSION */
-
-#define NFSPROC_NULL ((u_long)0)
-#define NFSPROC_GETATTR ((u_long)1)
-#define NFSPROC_SETATTR ((u_long)2)
-#define NFSPROC_ROOT ((u_long)3)
-#define NFSPROC_LOOKUP ((u_long)4)
-#define NFSPROC_READLINK ((u_long)5)
-#define NFSPROC_READ ((u_long)6)
-#define NFSPROC_WRITECACHE ((u_long)7)
-#define NFSPROC_WRITE ((u_long)8)
-#define NFSPROC_CREATE ((u_long)9)
-#define NFSPROC_REMOVE ((u_long)10)
-#define NFSPROC_RENAME ((u_long)11)
-#define NFSPROC_LINK ((u_long)12)
-#define NFSPROC_SYMLINK ((u_long)13)
-#define NFSPROC_MKDIR ((u_long)14)
-#define NFSPROC_RMDIR ((u_long)15)
-#define NFSPROC_READDIR ((u_long)16)
-#define NFSPROC_STATFS ((u_long)17)
-
-/* map field names */
-#define ml_hostname ml_name
-#define ml_directory ml_path
-#define ml_next ml_nxt
-#define gr_next g_next
-#define gr_name g_name
-#define ex_dir ex_name
-
-#define drok_attributes drok_attr
-#define na_fileid na_nodeid
-#define la_fhandle la_from
-#define nt_seconds tv_sec
-#define nt_useconds tv_usec
-#define ra_totalcount ra_totcount
-#define sla_to sla_tnm
-#define sla_attributes sla_sa
-#define sag_fhandle saa_fh
-#define sag_attributes saa_sa
-#define sfrok_tsize fsok_tsize
-#define sfrok_bsize fsok_bsize
-#define sfrok_blocks fsok_blocks
-#define sfrok_bfree fsok_bfree
-#define sfrok_bavail fsok_bavail
-#define sfr_status fs_status
-#define sfr_u fs_u
-#define sfr_reply_u fs_fsok_u
-#define wra_fhandle wa_fhandle
-#define wra_beginoffset wa_begoff
-#define wra_offset wa_offset
-#define wra_totalcount wa_totcount
-#define wra_u wa_mbuf->m_hdr
-#define wra_val_u mh_data
-#define wra_len_u mh_len
-
-
-/*
- * TYPEDEFS:
- */
-typedef char *dirpath;
-typedef char *filename;
-typedef char *name;
-typedef char *nfspath;
-typedef char nfscookie[NFS_COOKIESIZE];
-typedef enum nfsftype nfsftype;
-typedef enum nfsstat nfsstat;
-typedef struct nfssvcfh fhandle;
-typedef struct nfsattrstat nfsattrstat;
-typedef struct nfscreateargs nfscreateargs;
-typedef struct nfsdirlist nfsdirlist;
-typedef struct nfsdiropargs nfsdiropargs;
-typedef struct nfsdrok nfsdiropokres;
-typedef struct nfsdiropres nfsdiropres;
-typedef struct nfsentry nfsentry;
-typedef struct exports *exports;
-typedef struct exports exportnode;
-typedef struct nfsfattr nfsfattr;
-typedef struct fhstatus fhstatus;
-typedef struct groups *groups;
-typedef struct groups groupnode;
-typedef struct nfslinkargs nfslinkargs;
-typedef struct mountlist *mountlist;
-typedef struct mountlist mountbody;
-typedef struct _nfs_fh _nfs_fh;
-typedef struct timeval nfstime;
-typedef struct nfsreadargs nfsreadargs;
-typedef struct nfsreaddirargs nfsreaddirargs;
-typedef struct nfsreaddirres nfsreaddirres;
-typedef struct nfsreadlinkres nfsreadlinkres;
-typedef struct nfsreadokres nfsreadokres;
-typedef struct nfsreadres nfsreadres;
-typedef struct nfsrenameargs nfsrenameargs;
-typedef struct nfssattr nfssattr;
-typedef struct nfssaargs nfssattrargs;
-typedef struct nfsstatfsok nfsstatfsokres;
-typedef struct nfsstatfs nfsstatfsres;
-typedef struct nfsslargs nfssymlinkargs;
-typedef struct nfswriteargs nfswriteargs;
-
-
-/*
- * EXTERNALS:
- */
-
-extern void *nfsproc_null_2_svc(void *, struct svc_req *);
-extern nfsattrstat *nfsproc_getattr_2_svc(struct nfssvcfh *, struct svc_req *);
-extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
-extern void *nfsproc_root_2_svc(void *, struct svc_req *);
-extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsreadlinkres *nfsproc_readlink_2_svc(struct nfssvcfh *, struct svc_req *);
-extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
-extern void *nfsproc_writecache_2_svc(void *, 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(struct nfssvcfh *, struct svc_req *);
-
-extern bool_t xdr_nfsstat(XDR *, nfsstat*);
-extern bool_t xdr_ftype(XDR *, nfsftype*);
-extern bool_t xdr_nfs_fh(XDR *, struct nfssvcfh*);
-extern bool_t xdr_nfstime(XDR *, nfstime*);
-extern bool_t xdr_fattr(XDR *, nfsfattr*);
-extern bool_t xdr_sattr(XDR *, nfssattr*);
-extern bool_t xdr_filename(XDR *, filename*);
-extern bool_t xdr_nfspath(XDR *, nfspath*);
-extern bool_t xdr_attrstat(XDR *, nfsattrstat*);
-extern bool_t xdr_sattrargs(XDR *, nfssattrargs*);
-extern bool_t xdr_diropargs(XDR *, nfsdiropargs*);
-extern bool_t xdr_diropokres(XDR *, nfsdiropokres*);
-extern bool_t xdr_diropres(XDR *, nfsdiropres*);
-extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*);
-extern bool_t xdr_readargs(XDR *, nfsreadargs*);
-extern bool_t xdr_readokres(XDR *, nfsreadokres*);
-extern bool_t xdr_readres(XDR *, nfsreadres*);
-extern bool_t xdr_writeargs(XDR *, nfswriteargs*);
-extern bool_t xdr_createargs(XDR *, nfscreateargs*);
-extern bool_t xdr_renameargs(XDR *, nfsrenameargs*);
-extern bool_t xdr_linkargs(XDR *, nfslinkargs*);
-extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*);
-extern bool_t xdr_nfscookie(XDR *, nfscookie);
-extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*);
-extern bool_t xdr_entry(XDR *, nfsentry*);
-extern bool_t xdr_dirlist(XDR *, nfsdirlist*);
-extern bool_t xdr_readdirres(XDR *, nfsreaddirres*);
-extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*);
-extern bool_t xdr_statfsres(XDR *, nfsstatfsres*);
-
-
-/*
- * STRUCTURES:
- */
-
-struct _nfs_fh {
- char data[NFS_FHSIZE];
-};
-
-struct nfstime {
- u_int nt_seconds;
- u_int nt_useconds;
-};
-
-struct _fattr {
- nfsftype na_type;
- u_int na_mode;
- u_int na_nlink;
- u_int na_uid;
- u_int na_gid;
- u_int na_size;
- u_int na_blocksize;
- u_int na_rdev;
- u_int na_blocks;
- u_int na_fsid;
- u_int na_fileid;
- nfstime na_atime;
- nfstime na_mtime;
- nfstime na_ctime;
-};
-
-struct _sattr {
- u_int sa_mode;
- u_int sa_uid;
- u_int sa_gid;
- u_int sa_size;
- nfstime sa_atime;
- nfstime sa_mtime;
-};
-
-struct _attrstat {
- nfsstat ns_status;
- union {
- nfsfattr ns_attr_u;
- } ns_u;
-};
-
-struct _sattrargs {
- struct nfssvcfh sag_fhandle;
- nfssattr sag_attributes;
-};
-
-struct _diropargs {
- struct nfssvcfh da_fhandle; /* was dir */
- filename da_name;
-};
-
-struct _diropokres {
- struct nfssvcfh drok_fhandle;
- nfsfattr drok_attributes;
-};
-
-struct _diropres {
- nfsstat dr_status; /* was status */
- union {
- nfsdiropokres dr_drok_u; /* was diropres */
- } dr_u; /* was diropres_u */
-};
-
-struct nfsreadlinkres {
- nfsstat rlr_status;
- union {
- nfspath rlr_data_u;
- } rlr_u;
-};
-
-struct _readargs {
- struct nfssvcfh ra_fhandle;
- u_int ra_offset;
- u_int ra_count;
- u_int ra_totalcount;
-};
-
-struct nfsreadokres {
- nfsfattr raok_attributes;
- struct {
- u_int raok_len_u;
- char *raok_val_u;
- } raok_u;
-};
-
-struct nfsreadres {
- nfsstat rr_status;
- union {
- nfsreadokres rr_reply_u;
- } rr_u;
-};
-
-#if 0
-struct _writeargs {
- struct nfssvcfh wra_fhandle;
- u_int wra_beginoffset;
- u_int wra_offset;
- u_int wra_totalcount;
- struct {
- u_int wra_len_u;
- char *wra_val_u;
- } wra_u;
-};
-#endif
-
-struct nfscreateargs {
- nfsdiropargs ca_where;
- nfssattr ca_attributes;
-};
-
-struct nfsrenameargs {
- nfsdiropargs rna_from;
- nfsdiropargs rna_to;
-};
-
-struct _linkargs {
- struct nfssvcfh la_fhandle;
- nfsdiropargs la_to;
-};
-
-struct _symlinkargs {
- nfsdiropargs sla_from;
- nfspath sla_to;
- nfssattr sla_attributes;
-};
-
-struct nfsreaddirargs {
- struct nfssvcfh rda_fhandle;
- nfscookie rda_cookie;
- u_int rda_count;
-};
-
-struct nfsentry {
- u_int ne_fileid;
- filename ne_name;
- nfscookie ne_cookie;
- nfsentry *ne_nextentry;
-};
-
-struct nfsdirlist {
- nfsentry *dl_entries;
- bool_t dl_eof;
-};
-
-struct nfsreaddirres {
- nfsstat rdr_status;
- union {
- nfsdirlist rdr_reply_u;
- } rdr_u;
-};
-
-struct _statfsokres {
- u_int sfrok_tsize;
- u_int sfrok_bsize;
- u_int sfrok_blocks;
- u_int sfrok_bfree;
- u_int sfrok_bavail;
-};
-
-struct _statfsres {
- nfsstat sfr_status;
- union {
- nfsstatfsokres sfr_reply_u;
- } sfr_u;
-};
-
-#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h b/contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h
deleted file mode 100644
index 6392622..0000000
--- a/contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (c) 1997-2003 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_sunos5_8.h,v 1.2.2.4 2002/12/27 22:44:59 ezk Exp $
- *
- */
-
-#ifndef _AMU_NFS_PROT_H
-#define _AMU_NFS_PROT_H
-
-/*
- * Do NOT include <rpcsvc/nfs_prot.h> to get NFS V2 specs, because
- * it will result in conflicts with <nfs/nfs.h>. The latter is a must
- * for NFS V3 specs.
- */
-
-#ifdef HAVE_NFS_NFS_H
-# include <nfs/nfs.h>
-#endif /* HAVE_NFS_NFS_H */
-
-#ifdef HAVE_RPCSVC_MOUNT_H
-# include <rpcsvc/mount.h>
-#endif /* HAVE_RPCSVC_MOUNT_H */
-
-#ifdef HAVE_RPC_RPC_H
-# include <rpc/rpc.h>
-#endif /* HAVE_RPC_RPC_H */
-
-
-/*
- * MACROS
- */
-
-#define NFS_PORT 2049
-#define NFS_MAXDATA 8192
-#define NFS_MAXPATHLEN 1024
-#define NFS_MAXNAMLEN 255
-#define NFS_FHSIZE 32
-#define NFS_COOKIESIZE 4
-
-#define NFSMODE_FMT 0170000
-#define NFSMODE_DIR 0040000
-#define NFSMODE_CHR 0020000
-#define NFSMODE_BLK 0060000
-#define NFSMODE_REG 0100000
-#define NFSMODE_LNK 0120000
-#define NFSMODE_SOCK 0140000
-#define NFSMODE_FIFO 0010000
-
-#define NFSPROC_NULL ((unsigned long)(0))
-#define NFSPROC_GETATTR ((unsigned long)(1))
-#define NFSPROC_SETATTR ((unsigned long)(2))
-#define NFSPROC_ROOT ((unsigned long)(3))
-#define NFSPROC_LOOKUP ((unsigned long)(4))
-#define NFSPROC_READLINK ((unsigned long)(5))
-#define NFSPROC_READ ((unsigned long)(6))
-#define NFSPROC_WRITECACHE ((unsigned long)(7))
-#define NFSPROC_WRITE ((unsigned long)(8))
-#define NFSPROC_CREATE ((unsigned long)(9))
-#define NFSPROC_REMOVE ((unsigned long)(10))
-#define NFSPROC_RENAME ((unsigned long)(11))
-#define NFSPROC_LINK ((unsigned long)(12))
-#define NFSPROC_SYMLINK ((unsigned long)(13))
-#define NFSPROC_MKDIR ((unsigned long)(14))
-#define NFSPROC_RMDIR ((unsigned long)(15))
-#define NFSPROC_READDIR ((unsigned long)(16))
-#define NFSPROC_STATFS ((unsigned long)(17))
-
-
-/*
- * TYPEDEFS:
- */
-
-typedef char *filename;
-typedef char *nfspath;
-typedef char nfscookie[NFS_COOKIESIZE];
-typedef enum nfsftype nfsftype;
-typedef struct attrstat nfsattrstat;
-typedef struct createargs nfscreateargs;
-typedef struct dirlist nfsdirlist;
-typedef struct diropargs nfsdiropargs;
-typedef struct diropokres nfsdiropokres;
-typedef struct diropres nfsdiropres;
-typedef struct entry nfsentry;
-typedef struct fattr nfsfattr;
-typedef struct linkargs nfslinkargs;
-typedef struct nfs_fh nfs_fh;
-typedef struct nfstime nfstime;
-typedef struct readargs nfsreadargs;
-typedef struct readdirargs nfsreaddirargs;
-typedef struct readdirres nfsreaddirres;
-typedef struct readlinkres nfsreadlinkres;
-typedef struct readokres nfsreadokres;
-typedef struct readres nfsreadres;
-typedef struct renameargs nfsrenameargs;
-typedef struct sattr nfssattr;
-typedef struct sattrargs nfssattrargs;
-typedef struct statfsokres nfsstatfsokres;
-typedef struct statfsres nfsstatfsres;
-typedef struct symlinkargs nfssymlinkargs;
-typedef struct writeargs nfswriteargs;
-
-
-/*
- * EXTERNALS:
- */
-
-extern bool_t xdr_nfsstat(XDR *, nfsstat *);
-extern bool_t xdr_ftype(XDR *, nfsftype *);
-extern bool_t xdr_nfs_fh(XDR *, nfs_fh *);
-extern bool_t xdr_nfstime(XDR *, nfstime *);
-extern bool_t xdr_fattr(XDR *, nfsfattr *);
-extern bool_t xdr_sattr(XDR *, nfssattr *);
-extern bool_t xdr_filename(XDR *, filename *);
-extern bool_t xdr_nfspath(XDR *, nfspath *);
-extern bool_t xdr_attrstat(XDR *, nfsattrstat *);
-extern bool_t xdr_sattrargs(XDR *, nfssattrargs *);
-extern bool_t xdr_diropargs(XDR *, nfsdiropargs *);
-extern bool_t xdr_diropokres(XDR *, nfsdiropokres *);
-extern bool_t xdr_diropres(XDR *, nfsdiropres *);
-extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *);
-extern bool_t xdr_readargs(XDR *, nfsreadargs *);
-extern bool_t xdr_readokres(XDR *, nfsreadokres *);
-extern bool_t xdr_readres(XDR *, nfsreadres *);
-extern bool_t xdr_writeargs(XDR *, nfswriteargs *);
-extern bool_t xdr_createargs(XDR *, nfscreateargs *);
-extern bool_t xdr_renameargs(XDR *, nfsrenameargs *);
-extern bool_t xdr_linkargs(XDR *, nfslinkargs *);
-extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *);
-extern bool_t xdr_nfscookie(XDR *, nfscookie);
-extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *);
-extern bool_t xdr_entry(XDR *, nfsentry *);
-extern bool_t xdr_dirlist(XDR *, nfsdirlist *);
-extern bool_t xdr_readdirres(XDR *, nfsreaddirres *);
-extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *);
-extern bool_t xdr_statfsres(XDR *, nfsstatfsres *);
-
-extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *);
-extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
-extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *);
-extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
-extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *);
-extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
-extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *);
-extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
-extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *);
-extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *);
-extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
-extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *);
-extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
-extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *);
-extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *);
-extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
-extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *);
-extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
-extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *);
-extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
-extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *);
-extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
-extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *);
-extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
-extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *);
-extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
-extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *);
-extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
-extern void *nfsproc_null_2(void *, CLIENT *);
-extern void *nfsproc_null_2_svc(void *, struct svc_req *);
-extern void *nfsproc_root_2(void *, CLIENT *);
-extern void *nfsproc_root_2_svc(void *, struct svc_req *);
-extern void *nfsproc_writecache_2(void *, CLIENT *);
-extern void *nfsproc_writecache_2_svc(void *, struct svc_req *);
-extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
-
-
-/*
- * ENUMS:
- */
-
-
-/*
- * STRUCTURES:
- */
-
-struct nfs_fh {
- char fh_data[NFS_FHSIZE];
-};
-
-struct nfstime {
- u_int nt_seconds;
- u_int nt_useconds;
-};
-
-struct fattr {
- nfsftype na_type;
- u_int na_mode;
- u_int na_nlink;
- u_int na_uid;
- u_int na_gid;
- u_int na_size;
- u_int na_blocksize;
- u_int na_rdev;
- u_int na_blocks;
- u_int na_fsid;
- u_int na_fileid;
- nfstime na_atime;
- nfstime na_mtime;
- nfstime na_ctime;
-};
-
-struct sattr {
- u_int sa_mode;
- u_int sa_uid;
- u_int sa_gid;
- u_int sa_size;
- nfstime sa_atime;
- nfstime sa_mtime;
-};
-
-struct attrstat {
- nfsstat ns_status;
- union {
- nfsfattr ns_attr_u;
- } ns_u;
-};
-
-struct sattrargs {
- nfs_fh sag_fhandle;
- nfssattr sag_attributes;
-};
-
-struct diropargs {
- nfs_fh da_fhandle; /* was dir */
- filename da_name;
-};
-
-struct diropokres {
- nfs_fh drok_fhandle;
- nfsfattr drok_attributes;
-};
-
-struct diropres {
- nfsstat dr_status; /* was status */
- union {
- nfsdiropokres dr_drok_u; /* was diropres */
- } dr_u; /* was diropres_u */
-};
-
-struct readlinkres {
- nfsstat rlr_status;
- union {
- nfspath rlr_data_u;
- } rlr_u;
-};
-
-struct readargs {
- nfs_fh ra_fhandle;
- u_int ra_offset;
- u_int ra_count;
- u_int ra_totalcount;
-};
-
-struct readokres {
- nfsfattr raok_attributes;
- struct {
- u_int raok_len_u;
- char *raok_val_u;
- } raok_u;
-};
-
-struct readres {
- nfsstat rr_status;
- union {
- nfsreadokres rr_reply_u;
- } rr_u;
-};
-
-struct writeargs {
- nfs_fh wra_fhandle;
- u_int wra_beginoffset;
- u_int wra_offset;
- u_int wra_totalcount;
- struct {
- u_int wra_len_u;
- char *wra_val_u;
- } wra_u;
-};
-
-struct createargs {
- nfsdiropargs ca_where;
- nfssattr ca_attributes;
-};
-
-struct renameargs {
- nfsdiropargs rna_from;
- nfsdiropargs rna_to;
-};
-
-struct linkargs {
- nfs_fh la_fhandle;
- nfsdiropargs la_to;
-};
-
-struct symlinkargs {
- nfsdiropargs sla_from;
- nfspath sla_to;
- nfssattr sla_attributes;
-};
-
-struct readdirargs {
- nfs_fh rda_fhandle;
- nfscookie rda_cookie;
- u_int rda_count;
-};
-
-struct entry {
- u_int ne_fileid;
- filename ne_name;
- nfscookie ne_cookie;
- nfsentry *ne_nextentry;
-};
-
-struct dirlist {
- nfsentry *dl_entries;
- bool_t dl_eof;
-};
-
-struct readdirres {
- nfsstat rdr_status;
- union {
- nfsdirlist rdr_reply_u;
- } rdr_u;
-};
-
-struct statfsokres {
- u_int sfrok_tsize;
- u_int sfrok_bsize;
- u_int sfrok_blocks;
- u_int sfrok_bfree;
- u_int sfrok_bavail;
-};
-
-struct statfsres {
- nfsstat sfr_status;
- union {
- nfsstatfsokres sfr_reply_u;
- } sfr_u;
-};
-
-#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/trap/trap_freebsd3.h b/contrib/amd/conf/trap/trap_freebsd3.h
deleted file mode 100644
index 95c6642..0000000
--- a/contrib/amd/conf/trap/trap_freebsd3.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $srcdir/conf/trap/trap_freebsd3.h */
-extern int mount_freebsd3(MTYPE_TYPE type, const char *dir, int flags, voidp data);
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_freebsd3(type, mnt->mnt_dir, flags, mnt_data)
diff --git a/contrib/amd/doc/.cvsignore b/contrib/amd/doc/.cvsignore
deleted file mode 100644
index c519f22..0000000
--- a/contrib/amd/doc/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile.in
-version.texi
-stamp-vti
-am-utils.info
-am-utils.info-1
-am-utils.info-2
-am-utils.info-3
-am-utils.info-4
-am-utils.info-5
-am-utils.info-6
-am-utils.info-7
diff --git a/contrib/amd/doc/stamp-vti b/contrib/amd/doc/stamp-vti
deleted file mode 100644
index 3705a9f..0000000
--- a/contrib/amd/doc/stamp-vti
+++ /dev/null
@@ -1,3 +0,0 @@
-@set UPDATED 3 July 2001
-@set EDITION 6.0.7
-@set VERSION 6.0.7
diff --git a/contrib/amd/fixmount/.cvsignore b/contrib/amd/fixmount/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/fixmount/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/fixmount/fixmount.8 b/contrib/amd/fixmount/fixmount.8
index 4fa41d5..7e9793a 100644
--- a/contrib/amd/fixmount/fixmount.8
+++ b/contrib/amd/fixmount/fixmount.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,122 +38,143 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: fixmount.8,v 1.3.2.6 2004/01/06 03:15:23 ezk Exp $
+.\" $Id: fixmount.8,v 1.3.2.5 2003/03/16 01:46:59 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH FIXMOUNT 8 "26 Feb 1993"
-.SH NAME
-fixmount \- fix remote mount entries
-.SH SYNOPSIS
-.B fixmount
-[
-.B \-adervq
-]
-[
-.B \-h
-.I name
-]
-.I host
+.Dd February 26, 1993
+.Dt FIXMOUNT 8
+.Os
+.Sh NAME
+.Nm fixmount
+.Nd fix remote mount entries
+.Sh SYNOPSIS
+.Nm
+.Op Fl adervq
+.Op Fl h Ar name
+.Ar host
\&...
-.SH DESCRIPTION
-.IX "fixmount command" "" "\fLfixmount\fP \(em fix remote mount entries"
-.LP
-.B fixmount
-is a variant of
-.BR showmount (8)
+.Sh DESCRIPTION
+.Nm
+is a variant of
+.Xr showmount 8
that can delete bogus mount entries in remote
-.BR mountd (8C)
-daemons.
-The actions specified by the options are performed for each
-.I host
+.Xr mountd 8
+daemons. The actions specified by the options are performed for each
+.Ar host
in turn.
-.SH OPTIONS
-.TP
-.B \-a \-d \-e
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl a Fl d Fl e
These options work as in
-.BR showmount (8)
+.Xr showmount 8
except that only entries pertaining to the local host are printed.
-.TP
-.B \-r
+.It Fl r
Removes those remote mount entries on
-.I host
+.Ar host
that do not correspond to current mounts, i.e., which are left-over
from a crash or are the result of improper mount protocol.
The actuality of mounts is verified using the entries in
-.BR /etc/mtab .
-.TP
-.B \-v
+.Pa /etc/mtab .
+.It Fl v
Verify remote mounts. Similar to
-.B \-r
+.Fl r
except that only a notification message is printed for each bogus entry
found. The remote mount table is not changed.
-.TP
-.B \-A
-Issues a command to the remote mountd declaring that ALL of its filesystems
-have been unmounted. This should be used with caution, as it removes all
-remote mount entries pertaining to the local system, whether or not any
-filesystems are still mounted locally.
-.TP
-.B \-q
-Be quiet.
-Suppresses error messages due to timeouts and "Program not registered",
-i.e., due to remote hosts not supporting RPC or not running mountd.
-.TP
-.BI \-h \ name
+.It Fl A
+Issues a command to the remote mountd declaring that
+.Em all
+of its file systems have been unmounted. This should be used with caution, as
+it removes all remote mount entries pertaining to the local system, whether or
+not any file systems are still mounted locally.
+.It Fl v
+Be quiet. Suppresses error messages due to timeouts and
+.Dq Program not Registered ,
+i.e., due to remote hosts not supporting RPC or not running
+.Nm mountd .
+.It Fl h Ar name
Pretend the local hostname is
-.IR name .
+.Ar name .
This is useful after the local hostname has been changed and rmtab entries
using the old name remain on a remote machine.
Unfortunately, most mountd's won't be able to successfully handle removal
of such entries, so this option is useful in combination with
-.B \-v
+.Fl v
only.
-.br
+.Pp
This option also saves time as comparisons of remotely recorded and local
hostnames by address are avoided.
-.SH FILES
-.PD 0
-.TP 20
-.B /etc/mtab
+.El
+.Sh FILES
+.Bl -tag -width /axx
+.It Pa /etc/mtab
List of current mounts.
-.TP
-.B /etc/rmtab
-Backup file for remote mount entries on NFS server.
-.PD
-.SH "SEE ALSO"
-.BR showmount (8),
-.BR mtab (5),
-.BR rmtab (5),
-.BR mountd (8C).
-.SH BUGS
+.It Pa /etc/rmtab
+Backup file for remote mount entries on
+.Tn NFS
+server.
+.El
+.Sh SEE ALSO
+.Xr mtab 5 ,
+.Xr rmtab 5 ,
+.Xr mountd 8 ,
+.Xr showmount 8
+.Sh BUGS
No attempt is made to verify the information in
-.B /etc/mtab
+.Pa /etc/mtab
itself.
-.PP
+.Pp
Since swap file mounts are not recorded in
-.BR /etc/mtab ,
+.Pa /etc/mtab ,
a heuristic specific to SunOS is used to determine whether such a mount
-is actual (replacing the string "swap" with "root" and verifying the resulting
-path).
-.PP
+is actual (replacing the string
+.Ql swap
+with
+.Ql root
+and verifying the resulting path).
+.Pp
Symbolic links on the server will cause the path in the remote entry to differ
-from the one in
-.BR /etc/mtab .
-To catch those cases, a filesystem is also deemed mounted if its
-.I local
+from the one in
+.Pa /etc/mtab .
+To catch those cases, a file system is also deemed mounted if its
+.Em local
mount point is identical to the remote entry.
I.e., on a SunOS diskless client,
-.B server:/export/share/sunos.4.1.1
+.Pa server:/export/share/sunos.4.1.1
is actually
-.BR /usr/share .
+.Pa /usr/share .
Since the local mount point is
-.B /usr/share
+.Pa /usr/share
as well this will be handled correctly.
-.PP
-There is no way to clear a stale entry in a remote mountd after the
-local hostname (or whatever reverse name resolution returns for it)
-has been changed. To take care of these cases,
-the remote /etc/rmtab file has to be edited and mountd restarted.
-.PP
-The RPC timeouts for mountd calls can only be changed by recompiling.
-The defaults are 2 seconds for client handle creation and 5 seconds for
-RPC calls.
+.Pp
+There is no way to clear a stale entry in a remote
+.Nm mountd
+after the local hostname (or whatever reverse name resolution
+returns for it) has been changed. To take care of these cases,
+the remote
+.Pa /etc/rmtab
+file has to be edited and
+.Nm mountd
+restarted.
+.Pp
+The RPC timeouts for
+.Nm mountd
+calls can only be changed by recompiling. The defaults are 2 seconds
+for client handle creation and 5 seconds for RPC calls.
+.Sh AUTHORS
+.An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
+Department of Computing, Imperial College, London, UK.
+.Pp
+.An Erez Zadok Aq ezk@cs.columbia.edu ,
+Department of Computer Science, Columbia University, New York, USA.
+.Pp
+.An Other authors and contributors to
+.Nm am-utils
+are listed in the
+.Nm AUTHORS
+file distributed with
+.Nm am-utils .
+.Sh HISTORY
+The
+.Nm
+utility appeared in
+.Fx 3.0 .
diff --git a/contrib/amd/fixmount/fixmount.c b/contrib/amd/fixmount/fixmount.c
index 058c30f..9cfd736 100644
--- a/contrib/amd/fixmount/fixmount.c
+++ b/contrib/amd/fixmount/fixmount.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fixmount.c,v 1.5.2.4 2004/01/06 03:15:23 ezk Exp $
+ * $Id: fixmount.c,v 1.5.2.3 2002/12/27 22:45:04 ezk Exp $
+ * $FreeBSD$
*
*/
diff --git a/contrib/amd/fsinfo/.cvsignore b/contrib/amd/fsinfo/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/fsinfo/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/fsinfo/fsinfo.8 b/contrib/amd/fsinfo/fsinfo.8
index c9755ab..7cfeb3a 100644
--- a/contrib/amd/fsinfo/fsinfo.8
+++ b/contrib/amd/fsinfo/fsinfo.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 Erez Zadok
.\" Copyright (c) 1993 Jan-Simon Pendry.
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,69 +33,157 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93
-.\" $Id: fsinfo.8,v 1.3.2.5 2004/01/06 03:15:23 ezk Exp $
+.\" $Id: fsinfo.8,v 1.3.2.4 2003/03/31 20:09:02 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH FSINFO 8 "June 28, 1993"
-.SH NAME
-fsinfo \- coordinate site-wide filesystem information
-.SH SYNOPSIS
-.B fsinfo
-[
-.B \-v
-] [
-.B \-a
-.I autodir
-] [
-.B \-b
-.I bootparams
-] [
-.B \-d
-.I dumpsets
-] [
-.B \-e
-.I exports
-] [
-.B \-f
-.I fstabs
-] [
-.B \-h
-.I hostname
-] [
-.B \-m
-.I automounts
-] [
-.B \-I
-.I dir
-] [
-.B \-D
-.I string[=string]]
-] [
-.B \-U
-.I string[=string]]
-]
-.I config
-.I ...
-.SH DESCRIPTION
+.Dd June 26, 1999
+.Dt FSINFO 8
+.Os
+.Sh NAME
+.Nm fsinfo
+.Nd co-ordinate site-wide file system information
+.Sh SYNOPSIS
+.Nm
+.Op Fl qv
+.Op Fl a Ar autodir
+.Op Fl b Ar bootparams_prefix
+.Op Fl d Ar dumpsets_prefix
+.Op Fl e Ar exports_prefix
+.Op Fl f Ar fstabs_prefix
+.Op Fl h Ar hostname
+.Op Fl m Ar automounts_prefix
+.Op Fl I Ar dir
+.Oo
+.Fl D
+.Ar name Ns Op = Ns Ar string
+.Oc
+.Op Fl U Ar name
+.Ar config ...
+.Sh DESCRIPTION
The
-.B fsinfo
+.Nm
utility takes a set of system configuration information, and generates
a coordinated set of
.I amd
,
.I mount
and
-.I mountd
+.Xr mountd 8
configuration files.
-.PP
+.Pp
+The following options are available:
+.Bl -tag -width Fl
+.It Fl a Ar autodir
+Specifies the directory name in which to place the automounter's
+mount points. This defaults to
+.Pa /a .
+.It Fl b Ar bootparams_prefix
+Specifies the prefix for the
+.Pa bootparams
+file. If it is not given, then the file will not be generated.
+The file will be constructed for the destination machine and will be
+placed into a file named
+.Pa bootparams
+and prefixed by the
+.Ar bootparams_prefix
+string.
+The file generated contains a list of entries describing each
+diskless client that can boot from the destination machine.
+.It Fl d Ar dumpsets_prefix
+Specifies the prefix for the
+.Pa dumpsets
+file. If it is not specified, then the file will not be generated.
+The file will be for the destination machine and will be placed into a file
+named
+.Pa dumpsets
+prefixed by the
+.Ar dumpsets_prefix
+string.
+This file is for use by
+.Tn Imperial College's
+local backup system.
+.It Fl e Ar exports_prefix
+Defines the prefix for the
+.Pa exports
+files. If it is not given, then the file will not be generated.
+For each machine defined in the configuration files as having disks,
+and
+.Pa exports
+file is constructed and given a file name determined by the name of the
+machine, prefixed with the
+.Ar exports_prefix
+string.
+If a machine is defined as diskless, then no
+file will be created for it. The files contain entries
+for directories on the machine that may be exported to clients.
+.It Fl f Ar fstabs_prefix
+This defines the prefix for the
+.Pa fstab
+files. The files will only be created if this prefix is defined.
+For each machine defined in the configuration files, a
+.Pa fstab
+file is created with the file name determined by prefixing this
+.Ar fstabs_prefix
+string with the name of the machine. These files contain entries
+for file systems and partitions to mount at boot time.
+.It Fl h Ar hostname
+Defines the hostname of the destination machine to process for.
+If this is not specified, it defaults to the local machine name,
+as returned by
+.Xr gethostname 3 .
+.It Fl m Ar automounts_prefix
+Defines the prefix for the automounter files. The maps will
+only be produced if this option is specified. The mount maps
+suitable for the network defined by the configuration files will
+be placed into files with names calculated by prefixing the
+.Ar automounts_prefix
+string to the name of each map.
+.It Fl q
+Selects quite mode. Only error messages that are generated will
+be displayed.
+.It Fl v
+Selects verbose mode. When this is activated, more messages
+will be displayed, and all information discovered when performing the semantic
+analysis phase will be displayed. Each verbose message
+is output to the standard output on a line starting with a `#'
+character.
+.It Fl D Xo
+.Ar name Ns Op = Ns Ar string
+.Xc
+Defines a symbol
+.Ar name
+for the preprocessor when reading the configuration files.
+Equivalent to the
+.Em #define
+directive.
+.It Fl I Ar dir
+This option is passed into the preprocessor for the configuration
+files. It specifies directories in which to find include files.
+.It Fl U Ar name
+Removes and initial definition of the symbol
+.Ar name .
+Inverse of the
+.Fl D
+option.
+.It Ar config
+One or more configuration files to be passed as input to
+.Nm fsinfo .
+.El
+.Pp
The
-.B fsinfo
+.Nm
command is fully described in the document
-.I "Amd - The 4.4BSD Automounter"
-.SH "SEE ALSO"
-.BR amd (8),
-.BR mount (8),
-.BR mountd (8).
-.SH HISTORY
+.%T "Amd - The 4.4BSD Automounter"
+and in the
+.Nm amd
+section in
+.Xr info 1 .
+.Sh "SEE ALSO"
+.Xr amd 8 ,
+.Xr mount 8 ,
+.Xr mountd 8
+.Sh HISTORY
The
-.B fsinfo
-command first appeared in 4.4BSD.
+.Nm
+command first appeared in
+.Bx 4.4 .
diff --git a/contrib/amd/fsinfo/fsinfo.c b/contrib/amd/fsinfo/fsinfo.c
index 0c870e1..9f271f5 100644
--- a/contrib/amd/fsinfo/fsinfo.c
+++ b/contrib/amd/fsinfo/fsinfo.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-1999 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 +37,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * %W% (Berkeley) %G%
*
- * $Id: fsinfo.c,v 1.5.2.7 2004/05/12 15:54:31 ezk Exp $
+ * $Id: fsinfo.c,v 1.5.2.5 2003/07/18 04:50:20 ezk Exp $
+ * $FreeBSD$
*
*/
@@ -167,9 +170,7 @@ fsi_get_args(int c, char *v[])
if (c != optind) {
g_argv = v + optind - 1;
-#ifdef yywrap
if (yywrap())
-#endif /* yywrap */
fatal("Cannot read any input files");
} else {
usage++;
@@ -197,7 +198,7 @@ Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\
static char *
find_username(void)
{
- const char *u = getlogin();
+ char *u = getlogin();
if (!u) {
struct passwd *pw = getpwuid(getuid());
@@ -234,7 +235,6 @@ main(int argc, char *argv[])
perror("gethostname");
exit(1);
}
- hostname[sizeof(hostname) - 1] = '\0';
/*
* Get the username
diff --git a/contrib/amd/hlfsd/.cvsignore b/contrib/amd/hlfsd/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/hlfsd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/hlfsd/hlfsd.8 b/contrib/amd/hlfsd/hlfsd.8
index bed4480..b7a0f0b 100644
--- a/contrib/amd/hlfsd/hlfsd.8
+++ b/contrib/amd/hlfsd/hlfsd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,275 +36,284 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: hlfsd.8,v 1.3.2.5 2004/01/06 03:15:23 ezk Exp $
+.\" $Id: hlfsd.8,v 1.3.2.4 2003/03/16 01:47:00 ezk Exp $
+.\" $FreeBSD$
.\"
.\" HLFSD was written at Columbia University Computer Science Department, by
.\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>
.\" It is distributed under the same terms and conditions as AMD.
.\"
-.TH HLFSD 8 "14 September 1993"
-.SH NAME
-hlfsd \- home-link file system daemon
-.SH SYNOPSIS
-.B hlfsd
-[
-.B \-fhnpvC
-] [
-.BI \-a " alt_dir"
-] [
-.BI \-c " cache-interval"
-] [
-.BI \-g " group"
-] [
-.BI \-i " reload-interval"
-] [
-.BI \-l " logfile"
-] [
-.BI \-o " mount-options"
-] [
-.BI \-x " log-options"
-] [
-.BI \-D " debug-options"
-] [
-.BI \-P " password-file"
-]
-[
-.I linkname
-.RI [ " subdir " ]
-]
-.SH DESCRIPTION
-.B Hlfsd
-is a daemon which implements a filesystem containing a symbolic link to
+.Dd September 14, 1993
+.Dt HLFSD 8
+.Os
+.Sh NAME
+.Nm hlfsd
+.Nd home-link file system daemon
+.Sh SYNOPSIS
+.Nm
+.Op Fl fhnpvC
+.Op Fl a Ar alt_dir
+.Bk -words
+.Op Fl c Ar cache-interval
+.Ek
+.Op Fl g Ar group
+.Bk -words
+.Op Fl i Ar reload-interval
+.Ek
+.Op Fl l Ar logfile
+.Bk -words
+.Op Fl o Ar mount-options
+.Op Fl x Ar log-options
+.Op Fl D Ar debug-options
+.Op Fl P Ar password-file
+.Ek
+.Op linkname Op subdir
+.Sh DESCRIPTION
+.Nm
+is a daemon which implements a file system containing a symbolic link to
subdirectory within a user's home directory, depending on the user
which accessed that link. It was primarily designed to redirect
incoming mail to users' home directories, so that it can read from
anywhere.
-.LP
-.B Hlfsd
+.Pp
+.Nm
operates by mounting itself as an
-.SM NFS
+.Tn NFS
server for the directory containing
-.IR linkname ,
+.Ar linkname ,
which defaults to
-.BR /hlfs/home .
+.Pa /hlfs/home .
Lookups within that directory are handled by
-.BR hlfsd ,
-which uses the password map to determine how to resolve the lookup.
-The directory will be created if it doesn't already exist. The symbolic link will be to the accessing user's home directory, with
-.I subdir
+.Nm hlfsd ,
+which uses the password map to determine how to resolve the lookup. The
+directory will be created if it doesn't already exist. The symbolic link will
+be to the accessing user's home directory, with
+.Ar subdir
appended to it. If not specified,
-.I subdir
-defaults to
-.BR .hlfsdir .
+.Ar subdir
+defaults to
+.Pa .hlfsdir .
This directory will also be created if it does not already exist.
-.LP
-A SIGTERM sent to
-.B hlfsd
-will cause it to shutdown. A SIGHUP will flush the internal
-caches, and reload the password map. It will also close and
-reopen the log file, to enable the original log file to be
-removed or rotated. A SIGUSR1 will cause it to dump its internal
-table of user IDs and home directories to the file
-.BR /usr/tmp/hlfsd.dump.XXXXXX .
-.SH OPTIONS
-.TP
-.BI \-a " alt_dir"
+.Pp
+A
+.Er SIGHUP
+will flush the internal caches, and reload the password map. It will also
+close and reopen the log file, to enable the original log file to be removed
+or rotated. A
+.Er SIGUSR1
+will cause it to dump its internal table of user IDs and home directories to
+the file
+.Pa /usr/tmp/hlfsd.dump.XXXXXX .
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl a Ar alt_dir
Alternate directory. The name of the directory to which
the symbolic link returned by
-.B hlfsd
+.Nm
will point, if it cannot access the home directory of the user. This
defaults to
-.BR /var/hlfs .
+.Pa /var/hlfs .
This directory will be created if it doesn't exist. It is expected
that either users will read these files, or the system administrators
-will run a script to resend this "lost mail" to its owner.
-.TP
-.BI \-c " cache-interval"
+will run a script to resend this
+.Dq lost mail
+to its owner.
+.It Fl c Ar cache-interval
Caching interval.
-.B Hlfsd
+.Nm
will cache the validity of home directories for this interval, in
seconds. Entries which have been verified within the last
-.I cache-interval
+.Ar cache-interval
seconds will not be verified again, since the operation could
be expensive, and the entries are most likely still valid.
After the interval has expired,
-.B hlfsd
+.Nm
will re-verify the validity of the user's home directory, and
reset the cache time-counter. The default value for
-.I cache-interval
-is 300 seconds (5 minutes).
-.TP
-.B \-f
+.Ar cache-interval
+is 300 seconds
+(5 minutes).
+.It Fl f
Force fast startup. This option tells
-.B hlfsd
+.Nm
to skip startup-time consistency checks such as existence of mount
directory, alternate spool directory, symlink to be hidden under the
mount directory, their permissions and validity.
-.TP
-.BI \-g " group"
-Set the special group HLFS_GID to
-.IR group .
+.It Fl g Ar group
+Set the special group
+.Va HLFS_GID
+to
+.Ar group .
Programs such as
-.B from
-or
-.BR comsat ,
-which access the mailboxes of other users) must be setgid HLFS_GID to
-work properly. The default group is "hlfs". If no group is provided,
-and there is no group "hlfs", this feature is disabled.
-.TP
-.B \-h
+.Ic comsat ,
+(which access the mailboxes of other users)
+must be setgid
+.Va HLFS_GID
+to work properly. The default group is
+.Dq hlfs .
+If no group is provided, and there is no group
+.Dq hlfs ,
+this feature is disabled.
+.It Fl h
Help. Print a brief help message, and exit.
-.TP
-.BI \-i " reload-interval"
+.It Fl i Ar reload-interval
Map-reloading interval. Each
-.I reload-interval
+.Ar reload-interval
seconds,
-.B hlfsd
+.Nm
will reload the password map.
-.B Hlfsd
+.Nm
needs the password map for the UIDs and home directory pathnames.
-.B Hlfsd
-schedules a SIGALRM to reload the password maps. A SIGHUP sent to
-.B hlfsd
-will force it to reload the maps immediately. The default
-value for
-.I reload-interval
-is 900 seconds (15 minutes.)
-.TP
-.BI \-l " logfile"
+.Nm
+schedules a
+.Va SIGALRM
+to reload the password maps. A
+.Va SIGHUP
+sent to
+.Nm
+will force it to reload the maps immediately. The default value for
+.Ar reload-interval
+is 900 seconds
+(15 minutes).
+.It Fl l Ar logfile
Specify a log file to which
-.B hlfsd
+.Nm
will record events. If
-.I logfile
+.Pa logfile
is the string
-.B syslog
+.Pa syslog
then the log messages will be sent to the system log daemon by
-.IR syslog (3),
-using the LOG_DAEMON facility.
-This is also the default.
-.TP
-.B \-n
+.Xr syslog 3 ,
+using the
+.Va LOG_DAEMON
+facility. This is also the default.
+.It Fl n
No verify.
-.B Hlfsd
+.Nm
will not verify the validity of the symbolic link it will be
returning, or that the user's home directory contains
sufficient disk-space for spooling. This can speed up
-.B hlfsd
+.Nm
at the cost of possibly returning symbolic links to home
directories which are not currently accessible or are full.
By default,
-.B hlfsd
+.Nm
validates the symbolic-link in the background.
-The
-.B \-n
+The
+.Fl n
option overrides the meaning of the
-.B \-c
+.Fl c
option, since no caching is necessary.
-.TP
-.BI \-o " mount-options"
+.It Fl o Ar mount-options
Mount options. Mount options which
-.B hlfsd
+.Nm
will use to mount itself on top of
-.I dirname.
+.Pa dirname .
By default,
-.IR mount-options
-is set to "ro". If the system supports symbolic-link caching, default
-options are set to "ro,nocache".
-.TP
-.B \-p
-Print PID.
+.Ar mount-options
+is set to
+.Qq ro .
+If the system supports symbolic-link caching, default
+options are set to
+.Qq ro,nocache .
+.It Fl p
+Prints
+.Va PID .
Outputs the process-id of
-.B hlfsd
+.Nm
to standard output where it can be saved into a file.
-.TP
-.B \-v
+.It Fl v
Version. Displays version information to standard error.
-.TP
-.BI \-x " log-options"
+.It Fl x Ar log-options
Specify run-time logging options. The options are a comma separated
list chosen from: fatal, error, user, warn, info, map, stats, all.
-.TP
-.BI \-C
+.It Fl C
Force
-.B hlfsd
+.Nm
to run on systems that cannot turn off the NFS attribute-cache. Use of
this option on those systems is discouraged, as it may result in loss
or mis-delivery of mail. The option is ignored on systems that can turn
off the attribute-cache.
-.TP
-.BI \-D " log-options"
+.It Fl D Ar log-options
Select from a variety of debugging options. Prefixing an
option with the string
-.B no
+.Qq no
reverses the effect of that option. Options are cumulative.
The most useful option is
-.BR all .
+.Em all .
Since this option is only used for debugging other options are not
documented here. A fuller description is available in the program
-source. A SIGUSR1 sent to
-.B hlfsd
+source. A
+.Va SIGUSR1
+sent to
+.Nm
will cause it to dump its internal password map to the file
-.BR /usr/tmp/hlfsd.dump.XXXXXX .
-.TP
-.BI \-P " password-file"
+.Pa /usr/tmp/hlfsd.dump.XXXXXX .
+.It Fl P Ar password-file
Read the user-name, user-id, and home directory information from the file
-.I password-file.
+.Ar password-file .
Normally,
-.B hlfsd
+.Nm
will use
-.IR getpwent (3)
+.Xr getpwent 3
to read the password database. This option allows you to override the
default database, and is useful if you want to map users' mail files to a
directory other than their home directory. Only the username, uid, and
home-directory fields of the file
-.I password-file
+.Ar password-file
are read and checked. All other fields are ignored. The file
-.I password-file
-must otherwise be compliant with Unix System 7 colon-delimited format
-.IR passwd (4).
-.SH FILES
-.PD 0
-.TP 5
-.B /hlfs
+.Ar password-file
+must be compliant with
+.Ux
+System 7 colon-delimited format
+.Xr passwd 5 .
+.El
+.Sh FILES
+.Bl -tag -width /axx
+.It Pa /hlfs
directory under which
-.B hlfsd
+.Nm
mounts itself and manages the symbolic link
-.BR home .
-.TP 5
-.B .hlfsdir
+.Pa home .
+.It Pa .hlfsdir
default sub-directory in the user's home directory, to which the
-.B home
+.Pa home
symbolic link returned by
-.B hlfsd
+.Nm
points.
-.TP 5
-.B /var/hlfs
+.It Pa /var/hlfs
directory to which
-.B home
+.Pa home
symbolic link returned by
-.B hlfsd
+.Nm
points if it is unable to verify the that
user's home directory is accessible.
-.SH "SEE ALSO"
-.BR amd (8),
-.BR automount (8),
-.BR cron(8),
-.BR getgrent (3),
-.BR getpwent (3),
-.BR mail(1),
-.BR mnttab (4),
-.BR mount (8),
-.BR mtab (5),
-.BR passwd (4),
-.BR sendmail (8),
-.BR umount (8).
-.LP
-.IR "HLFSD: Delivering Email to Your $HOME" ,
-in
-.IR "Proc. LISA-VII, The 7th Usenix System Administration Conference" ,
-November 1993.
-.SH AUTHORS
-Erez Zadok <ezk@cs.columbia.edu>, Computer Science Department,
-Columbia University, New York City, New York, USA, and
-Alexander Dupuy <dupuy@smarts.com>, System Management ARTS,
-White Plains, New York, USA.
+.El
+.Sh SEE ALSO
+.Xr mail 1 ,
+.Xr getgrent 3 ,
+.Xr getpwent 3 ,
+.Xr mtab 5 ,
+.Xr passwd 5 ,
+.Xr amd 8 ,
+.Xr cron 8 ,
+.Xr mount 8 ,
+.Xr sendmail 8 ,
+.Xr umount 8
+.Rs
+.%T HLFSD: Delivering Email to Your $HOME
+.%B Proc. LISA-VII, The 7th Usenix System Administration Conference
+.%D November 1993
+.Re
+.Sh AUTHORS
+.An Erez Zadok Aq ezk@cs.columbia.edu ,
+Department of Computer Science, Columbia University,
+New York, USA.
+.Pp
+.An Alexander Dupuy Aq dupuy@smarts.com ,
+System Management ARTS, White Plains, New York, USA.
+.Sh HISTORY
+The
+.Nm
+utility appeared in
+.Fx 3.0 .
diff --git a/contrib/amd/hlfsd/hlfsd.c b/contrib/amd/hlfsd/hlfsd.c
index 355509d..fdc3dae 100644
--- a/contrib/amd/hlfsd/hlfsd.c
+++ b/contrib/amd/hlfsd/hlfsd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.c,v 1.7.2.9 2004/01/19 00:25:55 ezk Exp $
+ * $Id: hlfsd.c,v 1.7.2.7 2002/12/27 22:45:08 ezk Exp $
+ * $FreeBSD$
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -746,7 +747,7 @@ hlfsd_init(void)
if (setitimer(ITIMER_REAL, &reloadinterval, (struct itimerval *) 0) < 0)
fatal("setitimer: %m");
- gettimeofday((struct timeval *) ((void *)&startup), (struct timezone *) 0);
+ gettimeofday((struct timeval *) &startup, (struct timezone *) 0);
#ifdef DEBUG
/*
diff --git a/contrib/amd/hlfsd/hlfsd.h b/contrib/amd/hlfsd/hlfsd.h
index 645c2f8..3daa8fc 100644
--- a/contrib/amd/hlfsd/hlfsd.h
+++ b/contrib/amd/hlfsd/hlfsd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.h,v 1.4.2.7 2004/01/06 03:15:23 ezk Exp $
+ * $Id: hlfsd.h,v 1.4.2.6 2002/12/27 22:45:08 ezk Exp $
+ * $FreeBSD$
*
* 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/homedir.c b/contrib/amd/hlfsd/homedir.c
index 533b7f4..24d5224 100644
--- a/contrib/amd/hlfsd/homedir.c
+++ b/contrib/amd/hlfsd/homedir.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: homedir.c,v 1.5.2.11 2004/01/06 03:15:23 ezk Exp $
+ * $Id: homedir.c,v 1.5.2.10 2002/12/27 22:45:08 ezk Exp $
+ * $FreeBSD$
*
* 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/include/am_defs.h b/contrib/amd/include/am_defs.h
index 35a9d03..5e0271d 100644
--- a/contrib/amd/include/am_defs.h
+++ b/contrib/amd/include/am_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_defs.h,v 1.15.2.16 2004/05/12 15:54:31 ezk Exp $
+ * $Id: am_defs.h,v 1.15.2.13 2002/12/27 22:45:09 ezk Exp $
+ * $FreeBSD$
*
*/
@@ -69,26 +70,6 @@
char *strchr(), *strrchr(), *strdup();
#endif /* not STDC_HEADERS */
-/* AIX requires this to be the first thing in the file. */
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else /* not HAVE_ALLOCA_H */
-# ifdef _AIX
-/*
- * This pragma directive is indented so that pre-ANSI C compilers will
- * ignore it, rather than choke on it.
- */
- #pragma alloca
-# else /* not _AIX */
-# ifndef alloca
-/* predefined by HP cc +Olibcalls */
-voidp alloca();
-# endif /* not alloca */
-# endif /* not _AIX */
-# endif /* not HAVE_ALLOCA_H */
-#endif /* not __GNUC__ */
-
/*
* Handle gcc __attribute__ if available.
*/
@@ -295,13 +276,10 @@ typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
/*
* Actions to take if <malloc.h> exists.
- * Don't include malloc.h if stdlib.h exists, because modern
- * systems complain if you use malloc.h instead of stdlib.h.
- * XXX: let's hope there are no systems out there that need both.
*/
-#if defined(HAVE_MALLOC_H) && !defined(HAVE_STDLIB_H)
+#ifdef HAVE_MALLOC_H
# include <malloc.h>
-#endif /* defined(HAVE_MALLOC_H) && !defined(HAVE_STDLIB_H) */
+#endif /* HAVE_MALLOC_H */
/*
* Actions to take if <mntent.h> exists.
@@ -348,13 +326,21 @@ extern int errno;
* Should be included before <rpcsvc/yp_prot.h> because on some systems
* like Linux, it also defines "struct datum".
*/
-#ifdef HAVE_MAP_NDBM
-# include NEW_DBM_H
+#ifdef HAVE_NDBM_H
+# include <ndbm.h>
# ifndef DATUM
/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
# define DATUM
# endif /* not DATUM */
-#endif /* HAVE_MAP_NDBM */
+#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 */
+#endif /* HAVE_NDBM_H */
/*
* Actions to take if <net/errno.h> exists.
@@ -766,6 +752,9 @@ struct sockaddr_dl;
#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
# include <msdosfs/msdosfsmount.h>
#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
+#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
+# include <fs/msdosfs/msdosfsmount.h>
+#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
/*
* Actions to take if <sys/fs/tmp.h> exists.
@@ -780,10 +769,12 @@ struct sockaddr_dl;
#ifdef HAVE_SYS_FS_UFS_MOUNT_H
# include <sys/fs/ufs_mount.h>
#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
-#ifdef HAVE_UFS_UFS_UFSMOUNT_H_off
-# error do not include this file here because on netbsd/openbsd it
-# error causes errors with other header files. Instead, add it to the
-# error specific conf/nfs_prot_*.h file.
+/*
+ * HAVE_UFS_UFS_UFSMOUNT_H should NOT be defined on netbsd/openbsd because it
+ * causes errors with other header files. Instead, add it to the specific
+ * conf/nfs_prot_*.h file.
+ */
+#ifdef HAVE_UFS_UFS_UFSMOUNT_H
# include <ufs/ufs/ufsmount.h>
#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
diff --git a/contrib/amd/libamu/.cvsignore b/contrib/amd/libamu/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/libamu/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/libamu/clnt_sperrno.c b/contrib/amd/libamu/clnt_sperrno.c
deleted file mode 100644
index d3b48d1..0000000
--- a/contrib/amd/libamu/clnt_sperrno.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1997-1998 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 acknowledgement:
- * 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: clnt_sperrno.c,v 5.2.2.1 1992/02/09 15:08:40 jsp beta $
- *
- */
-
-/*
- * Early RPC seems to be missing these..
- * Extracted from the RPC 3.9 sources as indicated
- */
-
-/* @(#)clnt_perror.c 1.1 87/11/04 3.9 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* HAVE_CONFIG_H */
-#include <am_defs.h>
-#include <amu.h>
-
-
-struct rpc_errtab {
- enum clnt_stat status;
- char *message;
-};
-
-static struct rpc_errtab rpc_errlist[] =
-{
- {RPC_SUCCESS,
- "RPC: Success"},
- {RPC_CANTENCODEARGS,
- "RPC: Can't encode arguments"},
- {RPC_CANTDECODERES,
- "RPC: Can't decode result"},
- {RPC_CANTSEND,
- "RPC: Unable to send"},
- {RPC_CANTRECV,
- "RPC: Unable to receive"},
- {RPC_TIMEDOUT,
- "RPC: Timed out"},
- {RPC_VERSMISMATCH,
- "RPC: Incompatible versions of RPC"},
- {RPC_AUTHERROR,
- "RPC: Authentication error"},
- {RPC_PROGUNAVAIL,
- "RPC: Program unavailable"},
- {RPC_PROGVERSMISMATCH,
- "RPC: Program/version mismatch"},
- {RPC_PROCUNAVAIL,
- "RPC: Procedure unavailable"},
- {RPC_CANTDECODEARGS,
- "RPC: Server can't decode arguments"},
- {RPC_SYSTEMERROR,
- "RPC: Remote system error"},
- {RPC_UNKNOWNHOST,
- "RPC: Unknown host"},
-/* { RPC_UNKNOWNPROTO,
- * "RPC: Unknown protocol" }, */
- {RPC_PMAPFAILURE,
- "RPC: Port mapper failure"},
- {RPC_PROGNOTREGISTERED,
- "RPC: Program not registered"},
- {RPC_FAILED,
- "RPC: Failed (unspecified error)"}
-};
-
-
-/*
- * This interface for use by clntrpc
- */
-char *
-clnt_sperrno(enum clnt_stat stat)
-{
- int i;
-
- for (i = 0; i < sizeof(rpc_errlist) / sizeof(struct rpc_errtab); i++) {
- if (rpc_errlist[i].status == stat) {
- return (rpc_errlist[i].message);
- }
- }
- return ("RPC: (unknown error code)");
-}
diff --git a/contrib/amd/libamu/mount_fs.c b/contrib/amd/libamu/mount_fs.c
index 3fecabe..53198f2 100644
--- a/contrib/amd/libamu/mount_fs.c
+++ b/contrib/amd/libamu/mount_fs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mount_fs.c,v 1.11.2.12 2004/01/06 03:15:24 ezk Exp $
+ * $Id: mount_fs.c,v 1.11.2.11 2003/05/08 17:57:53 ib42 Exp $
+ * $FreeBSD$
*
*/
diff --git a/contrib/amd/mk-amd-map/.cvsignore b/contrib/amd/mk-amd-map/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/mk-amd-map/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/mk-amd-map/mk-amd-map.8 b/contrib/amd/mk-amd-map/mk-amd-map.8
index 2e24366..9982e40 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-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 Erez Zadok
.\" Copyright (c) 1993 Jan-Simon Pendry
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,30 +33,32 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)mk-amd-map.8 8.1 (Berkeley) 6/28/93
-.\" $Id: mk-amd-map.8,v 1.3.2.4 2004/01/06 03:15:24 ezk Exp $
+.\" $Id: mk-amd-map.8,v 1.3.2.3 2002/12/27 22:45:15 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH MK-AMD-MAP 8 "June 28, 1993"
-.SH NAME
-.B mk-amd-map
-\- create database maps for Amd
-.SH SYNOPSIS
-.B mk-amd-map
-[
-.B \-p
-]
-.I mapname
-.SH DESCRIPTION
-.B mk-amd-map
+.Dd June 28, 1993
+.Dt MK-AMD-MAP 8
+.Os
+.Sh NAME
+.Nm mk-amd-map
+.Nd create database maps for Amd
+.Sh SYNOPSIS
+.Nm
+.Op Fl p
+.Ar mapname
+.Sh DESCRIPTION
+.Nm
creates the database maps used by the keyed map lookups in
-amd(8).
+.Xr amd 8 .
It reads input from the named file
and outputs them to a correspondingly named
hashed database.
-.TP
-.B \-p
-This
+.Pp
+The
+.Fl p
option prints the map on standard output instead of generating
a database. This is usually used to merge continuation lines
into one physical line.
-.SH SEE ALSO
-.BR amd (8).
+.Sh SEE ALSO
+.Xr amd.conf 5 ,
+.Xr amd 8
diff --git a/contrib/amd/mk-amd-map/mk-amd-map.c b/contrib/amd/mk-amd-map/mk-amd-map.c
index a9ae965..83c34b4 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-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mk-amd-map.c,v 1.5.2.6 2004/01/06 03:15:25 ezk Exp $
+ * $Id: mk-amd-map.c,v 1.5.2.5 2003/06/09 16:57:46 ezk Exp $
+ * $FreeBSD$
*/
/*
diff --git a/contrib/amd/scripts/.cvsignore b/contrib/amd/scripts/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/scripts/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/scripts/amd.conf.5 b/contrib/amd/scripts/amd.conf.5
index 6e6b4dd..d64a8bc 100644
--- a/contrib/amd/scripts/amd.conf.5
+++ b/contrib/amd/scripts/amd.conf.5
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,516 +38,700 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amd.conf.5,v 1.7.2.10 2004/01/21 04:04:58 ib42 Exp $
+.\" $Id: amd.conf.5,v 1.7.2.8 2003/03/16 01:47:00 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH AMD.CONF 5 "7 August 1997"
-.SH NAME
-amd.conf \- amd configuration file
-.SH SYNOPSIS
-.B amd.conf
-.SH DESCRIPTION
+.Dd April 7, 1997
+.Dt AMD.CONF 5
+.Os
+.Sh NAME
+.Nm amd.conf
+.Nd amd configuration file
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
The
-.B amd.conf
+.Nm
file is the configuration file for amd, as part of the am-utils suite.
-.P
-.B amd.conf
+.Pp
+.Nm
contains runtime configuration information for the
-.B amd
+.Xr amd 8
automounter program.
-.\" **************************************************************************
-.SH FILE FORMAT
-.P
+.Sh FILE FORMAT
The file consists of sections and parameters. A section begins with the
name of the section in square brackets and continues until the next section
-begins or the end the file is reached. Sections contain parameters of the
-form 'name = value'.
-.P
+begins or the end of the file is reached. Sections contain parameters of
+the form
+.Sq name = value .
+.Pp
The file is line-based - that is, each newline-terminated line represents
either a comment, a section name or a parameter. No line-continuation
syntax is available.
-.P
+.Pp
Section, parameter names and their values are case sensitive.
-.P
+.Pp
Only the first equals sign in a parameter is significant. Whitespace before
or after the first equals sign is discarded. Leading, trailing and
internal whitespace in section and parameter names is irrelevant. Leading
and trailing whitespace in a parameter value is discarded. Internal
whitespace within a parameter value is not allowed, unless the whole
-parameter value is quoted with double quotes as in 'name = "some value"'.
-.P
+parameter value is quoted with double quotes as in
+.Sq name = Qq some\ value .
+.Pp
Any line beginning with a pound sign (#) is ignored, as are lines containing
only whitespace.
-.P
+.Pp
The values following the equals sign in parameters are all either a string
(no quotes needed if string does not include spaces) or a boolean, which may
be given as yes/no. Case is significant in all values. Some items such as
cache timeouts are numeric.
-.\" **************************************************************************
-.SH SECTIONS
-.SS The [global] section
-Parameters in this section either apply to amd as a whole, or to all other
-regular map sections which follow. There should be only one global section
-defined in one configuration file.
-.P
+.Sh SECTIONS
+.Ss "The [global] section"
+Parameters in this section either apply to
+.Nm amd
+as a whole, or to all other regular map sections which follow. There
+should be only one global section defined in one configuration file.
+.Pp
It is highly recommended that this section be specified first in the
configuration file. If it is not, then regular map sections which precede
it will not use global values defined later.
-
-.SS Regular [/map] sections
+.Ss "Regular [/map] sections"
Parameters in regular (non-global) sections apply to a single map entry.
For example, if the map section
-.B [/homes]
+.Bq Pa /homes
is defined, then all parameters following it will be applied to the
-.I /homes
+.Pa /homes
amd-managed mount point.
-.\" **************************************************************************
-.SH PARAMETERS
-.SS Parameters common to all sections
+.Sh PARAMETERS
+.Ss "Parameters common to all sections"
These parameters can be specified either in the global or a map specific
section. Entries specified in a map-specific section override the default
value or one defined in the global section. If such a common parameter is
specified only in the global section, it is applicable to all regular map
sections that follow.
-.\" **************************************************************************
-.TP
-.BR browsable_dirs " (string, default=no)"
-If "yes", then amd's top-level mount points will be browsable to
-.BR readdir (3)
+.Bl -tag -width 4n
+.It Ic browsable_dirs Xo
+(string, default=no)
+.Xc
+If
+.Qq yes ,
+then amd's top-level mount points will be browsable to
+.Xr readdir 3
calls. This means you could run for example
-.BR ls (3)
+.Xr ls 1
and see what keys are available to mount in that directory. Not all entries
-are made visible to readdir(3): the "/default" entry, wildcard
-entries, and those with a "/" in them are not included. If you specify
-"full" to this option, all but "/default" will be visible.
-Note that if you run a command which will attempt to
-.BR stat (2)
-the entries, such as often done by "ls -l" or "ls -F", amd will attempt to
-mount
-.I every
-entry in that map. This is often called a ``mount storm''.
-
-.TP
-.BR map_options " (string, default no options)"
-This option is the same as specifying map options on the command line to
-amd, such as "cache:=all".
-
-.TP
-.BR map_type " (string, default search all map types)"
-If specified, amd will initialize the map only for the type given. This is
-useful to avoid the default map search type used by amd which takes longer
-and can have undesired side-effects such as initializing NIS even if not
-used. Possible values are
-
-.nf
-\fBfile\fR plain files
-\fBhesiod\fR Hesiod name service from MIT
-\fBldap\fR Lightweight Directory Access Protocol
-\fBndbm\fR (New) dbm style hash files
-\fBnis\fR Network Information Services (version 2)
-\fBnisplus\fR Network Information Services Plus (version 3)
-\fBpasswd\fR local password files
-\fBunion\fR union maps
-.fi
-
-.TP
-.BR mount_type " (string, default=nfs)"
-All amd mount types must be NFS. That is, amd is an NFS server on the
-map mount points, for the local host it is running on. If "autofs" is
-specified, amd will log an error and convert it to NFS.
-
-.TP
-.BR search_path " (string, default no search path)"
-This provides a (colon-delimited) search path for file maps. Using a search
-path, sites can allow for local map customizations and overrides, and can
-distributed maps in several locations as needed.
-
-.\" **************************************************************************
-.SS Parameters applicable to the global section only
-
-.TP
-.BR arch " (string, default to compiled in value)"
+are made visible to
+.Xr readdir 3 :
+the
+.Qq Pa /default
+entry, wildcard entries, and those with a
+.Qq Pa /
+in them are not included. If you specify
+.Qq full
+to this option, all but
+.Qq Pa /default
+will be visible. Note that if you run a command which will attempt to
+.Xr stat 2
+the entries, such as often done by
+.Qq ls -l
+or
+.Qq ls -F ,
+.Nm amd
+will attempt to mount
+.Em every
+entry in that map. This is often called a
+.Dq mount storm .
+.It Ic map_options Xo
+(string, default no options)
+.Xc
+This option is the same as specifying map options on the command line to
+.Nm amd ,
+such as
+.Ql cache\&:\&=all .
+.It Ic map_type Xo
+(string, default search all map types)
+.Xc
+If specified, amd will initialize the map only for the type given.
+This is useful to avoid the default map search type used by
+.Nm amd
+which takes longer and can have undesired side-effects such as initializing
+.Tn NIS
+even if not used. Possible values are:
+.Pp
+.Bl -tag -width "nisplus" -compact
+.It Ic file
+plain files
+.It Ic hesiod
+Hesiod name service from MIT
+.It Ic ldap
+Lightweight Directory Access Protocol
+.It Ic ndbm
+(New) dbm style hash files
+.It Ic nis
+Network Information Services (version 2)
+.It Ic nisplus
+Network Information Services Plus (version 3)
+.It Ic passwd
+local password files
+.It Ic union
+union maps
+.El
+.It Ic mount_type Xo
+(string, default=nfs)
+.Xc
+All amd mount types must be
+.Tn NFS .
+That is,
+.Nm amd
+is an
+.Tn NFS
+server on the map mount points, for the local host it is running on. If
+.Qq autofs
+is specified, amd will log an error and convert it to
+.Tn NFS .
+.It Ic search_path Xo
+(string, default no search path)
+.Xc
+This provides a
+(colon-delimited)
+search path for file maps. Using a search path, sites can allow for
+local map customizations and overrides, and can query distributed maps in
+several locations as needed.
+.El
+.Ss "Parameters applicable to the global section only"
+.Bl -tag -width 4n
+.It Ic arch Xo
+(string, default to compiled in value)
+.Xc
Allows you to override the value of the
-.I arch
-amd variable.
-
-.TP
-.BR auto_dir " (string, default=/a)"
-Same as the
-.B \-a
-option to amd. This sets the private directory where amd will create
-sub-directories for its real mount points.
-
-.TP
-.BR cache_duration " (numeric, default=300)"
+.Va arch
+.Nm amd
+variable.
+.It Ic auto_dir Xo (string, default= Ns Pa /a )
+.Xc
+Same as the
+.Fl a
+option to
+.Nm amd .
+This sets the private directory where amd will create sub-directories for its
+real mount points.
+.It Ic cache_duration Xo
+(numeric, default=300)
+.Xc
Same as the
-.B \-c
-option to amd. Sets the duration in seconds that looked up map entries
-remain in the cache.
-
-.TP
-.BR cluster " (string, default no cluster)"
+.Fl c
+option to
+.Nm amd .
+Sets the duration in seconds that looked up map entries remain in the cache.
+.It Ic cluster Xo
+(string, default no cluster)
+.Xc
Same as the
-.B \-C
-option to amd. Specifies the alternate HP-UX cluster to use.
-
-.TP
-.BR debug_options " (string, default no debug options)"
-Same as the
-.B \-D
-option to amd. Specify any debugging options for amd. Works only if
-am-utils was configured for debugging using the --enable-debug option. The
-"mem" option, as well as all other options, can be turned on via
---enable-debug=mem. Otherwise debugging options are ignored. Options are
-comma delimited, and can be preceded by the string "no" to negate their
-meaning. You can get the list of supported debugging options by running amd
-\-H. Possible values are:
-
-.nf
-\fBall\fR all options
-\fBamq\fR register for amq
-\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 protocol and NFS mount arguments
-\fBxdrtrace\fR trace XDR routines
-.fi
-
-.TP
-.BR dismount_interval " (numeric, default=120)"
+.Fl C
+option to
+.Nm amd .
+Specifies the alternate
+.Tn HP-UX
+cluster to use.
+.It Ic debug_options Xo
+(string, default no debug options)
+.Xc
+Same as the
+.Fl D
+option to
+.Nm amd .
+Specify any debugging options for
+.Nm amd .
+Works only if am-utils was configured for debugging using the
+.Fl -enable-debug
+option.
+The
+.Qq mem
+option alone can be turned on via
+.Fl -enable-debug Ns = Ns Ic mem .
+Otherwise debugging options are ignored. Options are comma delimited, and can
+be preceded by the string
+.Qq no
+to negate their meaning. You can get the list of supported debugging options
+by running
+.Nm amd Fl v .
+Possible values are:
+.Pp
+.Bl -tag -width "daemon" -compact
+.It Ic all
+all options
+.It Ic amq
+register for
+.Xr amq 8
+.It Ic daemon
+enter daemon mode
+.It Ic fork
+fork server
+.It Ic full
+program trace
+.It Ic info
+info service specific debugging
+(hesiod, nis, etc.)
+.It Ic mem
+trace memory allocations
+.It Ic mtab
+use local
+.Pa ./mtab
+file
+.It Ic str
+debug string munging
+.It Ic test
+full debug but no daemon
+.It Ic trace
+protocol trace
+.El
+.It Ic dismount_interval Xo
+(numeric, default=120)
+.Xc
Same as the
-.B \-w
-option to amd. Specify in seconds, the time between attempts to dismount
-file systems that have exceeded their cached times.
-
-.TP
-.BR full_os " (string, default to compiled in value)"
-The full name of the operating system, along with its version. Allows you
-to override the compiled-in full name and version of the operating system.
-Useful when the compiled-in name is not desired. For example, the full
-operating system name on linux comes up as ``linux'', but you can override
-it to ``linux-2.2.5.''
-
-.TP
-.BR fully_qualified_hosts " (string, default=no)"
-If "yes",
-.I Amd
+.Fl w
+option to
+.Nm amd .
+Specify, in seconds, the time between attempts to dismount file systems that
+have exceeded their cached times.
+.It Ic fully_qualified_hosts Xo
+(string, default=no)
+.Xc
+If
+.Qq yes ,
+.Nm amd
will perform RPC authentication using fully-qualified host names. This is
necessary for some systems, and especially when performing cross-domain
mounting. For this function to work, the
-.I Amd
-variable ${hostd} is used, requiring that ${domain} not be null.
-
-.TP
-.BR hesiod_base " (string, default=automount)"
+.Nm amd
+variable
+.Va ${hostd}
+is used, requiring that
+.Va ${domain}
+not be null.
+.It Ic hesiod_base Xo
+(string, default=automount)
+.Xc
Specify the base name for hesiod maps.
-
-.TP
-.BR karch " (string, default to karch of the system)"
+.It Ic karch Xo
+(string, default to karch of the system)
+.Xc
Same as the
-.B \-k
-option to amd. Allows you to override the kernel-architecture of your
-system. Useful for example on Sun (Sparc) machines, where you can build one
-amd binary, and run it on multiple machines, yet you want each one to get
-the correct
-.I karch
-variable set (for example, sun4c, sun4m, sun4u, etc.) Note that if not
-specified, amd will use uname(2) to figure out the kernel architecture of
-the machine.
-
-.TP
-.BR ldap_base " (string, default not set)"
-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)"
+.Fl k
+option to
+.Nm amd .
+Allows you to override the kernel-architecture of your system. Useful for
+example on Sun
+(Sparc)
+machines, where you can build one
+.Nm amd
+binary and run it on multiple machines, yet you want each one to get the
+correct
+.Va karch
+variable set
+(for example, sun4c, sun4m, sun4u, etc.)
+Note that if not
+specified,
+.Nm amd
+will use
+.Xr uname 3
+to figure out the kernel architecture of the machine.
+.It Ic ldap_base Xo
+(string, default not set)
+.Xc
+Specify the base name for LDAP.
+.It Ic ldap_cache_maxmem Xo
+(numeric, default=131072)
+.Xc
Specify the maximum memory amd should use to cache LDAP entries.
-
-.TP
-.BR ldap_cache_seconds " (numeric, default=0)"
+.It Ic ldap_cache_seconds Xo
+(numeric, default=0)
+.Xc
Specify the number of seconds to keep entries in the cache.
-
-.TP
-.BR ldap_hostports " (string, default not set)"
-Specify the LDAP host and port values.
-
-.TP
-.BR local_domain " (string, default no sub-domain)"
+.It Ic ldap_hostports Xo
+(string, default not set)
+.Xc
+Specify LDAP-specific values such as country and organization.
+.It Ic local_domain Xo
+(string, default no sub-domain)
+.Xc
Same as the
-.B \-d
-option to amd. Specify the local domain name. If this option is not given
-the domain name is determined from the hostname, by removing the first
-component of the fully-qualified host name.
-
-.TP
-.BR log_file " (string, default=/dev/stderr)"
+.Fl d
+option to
+.Nm amd .
+Specify the local domain name. If this option is not given the domain name is
+determined from the hostname by removing the first component of the
+fully-qualified host name.
+.It Ic log_file Xo (string, default= Ns Pa /dev/stderr )
+.Xc
Same as the
-.B \-l
-option to amd. Specify a file name to log amd events to.
-If the string
-.B /dev/stderr
-is specified, amd will send its events to the standard error file descriptor.
-If the string
-.B syslog
-is given, amd will record its events with the system logger
-.BR syslogd (8).
-The default syslog facility used is LOG_DAEMON. If you
-wish to change it, append its name to the log file name, delimited by a
+.Fl l
+option to
+.Nm amd .
+Specify a file name to log
+.Nm amd
+events to. If the string
+.Pa /dev/stderr
+is specified,
+.Nm amd
+will send its events to the standard error file descriptor. IF the string
+.Pa syslog
+is given,
+.Nm amd
+will record its events with the system logger
+.Xr syslogd 8 .
+The default syslog facility used is
+.Ev LOG_DAEMON .
+If you wish to change it, append its name to the log file name, delimited by a
single colon. For example, if
-.I logfile
+.Pa logfile
is the string
-.B syslog:local7
-then amd will log messages via
-.IR syslog (3)
-using the LOG_LOCAL7 facility (if it exists on the system).
-
-.TP
-.BR log_options " (string, default no logging options)"
+.Qq syslog:local7
+then
+.Nm amd
+will log messages via
+.Xr syslog 3
+using the
+.Ev LOG_LOCAL7
+facility
+(if it exists on the system).
+.It Ic log_options Xo
+(string, default no logging options)
+.Xc
Same as the
-.B \-x
-option to amd. Specify any logging options for amd. Options are comma
-delimited, and can be preceded by the string "no" to negate their meaning.
-The "debug" logging option is only available if am-utils was configured with
---enable-debug. You can get the list of supported debugging and logging
-options by running amd \-H. Possible values are:
-
-.nf
-\fBall\fR all messages
-\fBdebug\fR debug messages
-\fBerror\fR non-fatal system errors
-\fBfatal\fR fatal errors
-\fBinfo\fR information
-\fBmap\fR map errors
-\fBstats\fR additional statistical information
-\fBuser\fR non-fatal user errors
-\fBwarn\fR warnings
-\fBwarning\fR warnings
-.fi
-
-.TP
-.BR nfs_vers " (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)"
+.Fl x
+option to
+.Nm amd .
+Specify any logging options for
+.Nm amd .
+Options are comma delimited, and can be preceded by the string
+.Dq no
+to negate their meaning. The
+.Dq debug
+logging option is only available if am-utils was configured with
+.Fl -enable-debug .
+You can get the list of supported debugging and logging options by running
+.Nm amd Fl H .
+Possible values are:
+.Pp
+.Bl -tag -width "warning" -compact
+.It Ic all
+all messages
+.It Ic debug
+debug messages
+.It Ic error
+non-fatal system errors
+.It Ic fatal
+fatal errors
+.It Ic info
+information
+.It Ic map
+map errors
+.It Ic stats
+additional statistical information
+.It Ic user
+non-fatal user errors
+.It Ic warn
+warnings
+.It Ic warning
+warnings
+.El
+.It Ic nfs_proto Xo
+(string, default to trying version tcp then udp)
+.Xc
+By default, amd tries TCP and then UDP. This option forces the overall
+.Tn 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.
+.It Ic nfs_retransmit_counter Xo
+(numeric, default=110)
+.Xc
Same as the
-.I retransmit
+.Ic counter
part of the
-.BI \-t " timeout.retransmit"
-option to amd.
-Specifies the number of NFS retransmissions that the kernel will use to
-communicate with amd.
-
-.TP
-.BR nfs_retry_interval " (numeric, default=8)"
+.Fl t Ar interval.counter
+option to
+.Nm amd .
+Specifies the retransmit counter's value in tenths of seconds.
+.It Ic nfs_retry_interval Xo
+(numeric, default=8)
+.Xc
Same as the
-.I timeout
-part of the
-.BI \-t " timeout.retransmit"
-option to amd. Specifies the NFS timeout interval, in
-.I tenths
-of seconds, between NFS/RPC retries (for UDP only).
+.Ic interval
+part of the
+.Fl t Ar interval.counter
+option to
+.Nm amd .
+Specifies the
+.Tn NFS
+timeout interval, in tenths of seconds, between NFS/RPC retries (for UDP only).
This is the value that the kernel will use to
communicate with amd.
-
-Amd relies on the kernel RPC retransmit mechanism to trigger mount retries.
+.Pp
+.Nm Amd
+relies on the kernel RPC retransmit mechanism to trigger mount retries.
The values of the
-.B nfs_retransmit_counter
+.Ic nfs_retransmit_counter
and the
-.B nfs_retry_interval
+.Ic nfs_retry_interval
parameters change the overall retry interval. Too long an interval gives
poor interactive response; too short an interval causes excessive retries.
-
-.TP
-.BR nfs_allow_insecure_port " (string, default=no).
-Normally amd will refuse requests coming from unprivileged ports (i.e.
-ports >= 1024 on Unix systems), so that only privileged users and the kernel
-can send NFS requests to it. However, some kernels (certain versions of
-Darwin, MacOS X, and Linux) have bugs that cause them to use unprivileged
-ports in certain situations, which causes amd to stop dead in its
-tracks. This parameter allows amd to operate normally even on such systems,
-at the expense of a slight decrease in the security of its operations. If
-you see messages like "ignoring request from foo:1234, port not reserved"
-in your amd log, try enabling this parameter and give it another go.
-
-.TP
-.BR nfs_proto " (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)"
+.It Ic nfs_vers Xo
+(numeric, default to trying version 3 then 2)
+.Xc
+By default, amd tries version 3 and then version 2. This option forces the
+overall
+.Tn 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.
+.It Ic nis_domain Xo
+(string, default to local
+.Tn NIS
+domain name)
+.Xc
Same as the
-.B \-y
-option to amd. Specify an alternative NIS domain from which to fetch the
-NIS maps. The default is the system domain name. This option is ignored if
-NIS support is not available.
-
-.TP
-.BR normalize_hostnames " (boolean, default=no)"
+.Fl y
+option to
+.Nm amd .
+Specify an alternative
+.Tn NIS
+domain from which to fetch the
+.Tn NIS
+maps. The default is the system domain name. This option is ignored if
+.Tn NIS
+support is not available.
+.It Ic normalize_hostnames Xo
+(boolean, default=no)
+.Xc
Same as the
-.B \-n
-option to amd. If "yes", then the name refereed to by ${rhost} is
-normalized relative to the host database before being used. The effect is
-to translate aliases into ``official'' names.
-
-.TP
-.BR os " (string, default to compiled in value)"
+.Fl n
+option to
+.Nm amd .
+If
+.Dq yes ,
+then the name refered to by
+.Va ${rhost}
+is normalized relative to the host database before being used. The effect is
+to translate aliases into
+.Qq official
+names.
+.It Ic os Xo
+(string, default to compiled in value)
+.Xc
Same as the
-.B \-O
-option to amd. Allows you to override the compiled-in name of the operating
+.Fl O
+option to
+.Nm amd .
+Allows you to override the compiled-in name of the operating
system. Useful when the built-in name is not desired for backward
-compatibility reasons. For example, if the build in name is ``sunos5'', you
-can override it to ``sos5'', and use older maps which were written with the
-latter in mind.
-
-.TP
-.BR osver " (string, default to compiled in value)"
+compatibility reasons. For example, if the build in name is
+.Dq sunos5 ,
+you can override it to
+.Dq sos5 ,
+and use older maps which were written with the latter in mind.
+.It Ic osver Xo
+(string, default to compiled in value)
+.Xc
Same as the
-.B \-o
-option to amd. Overrides the compiled-in version number of the operating
+.Fl o
+option to
+.Nm amd .
+Override the compiled-in version number of the operating
system. Useful when the built in version is not desired for backward
-compatibility reasons. For example, if the build in version is ``2.5.1'',
-you can override it to ``5.5.1'', and use older maps that were written with
-the latter in mind.
-
-.TP
-.BR pid_file " (string, default=/dev/stdout)"
+compatibility reasons. For example, if the build in version is
+.Dq 2.5.1 ,
+you can override it to
+.Dq 5.5.1 ,
+and use older maps that were written with the latter in mind.
+.It Ic pid_file Xo (string, default= Ns Pa /dev/stdout )
+.Xc
Specify a file to store the process ID of the running daemon into. If not
-specified, amd will print its process id onto the standard output. Useful
-for killing amd after it had run. Note that the PID of a running amd can
-also be retrieved via
-.B amq
-.BR \-p .
-This file is used only if the print_pid option is on.
-
-.TP
-.BR plock " (boolean, default=yes)"
+specified,
+.Nm amd
+will print its process id only the standard output. Useful for killing
+.Nm amd
+after it had run. Note that the PID of a running
+.Nm amd
+can also be retrieved via
+.Nm amq Fl p .
+This file is used only if the
+.Ar print_pid
+option is on.
+.It Ic plock Xo
+(boolean, default=yes)
+.Xc
Same as the
-.B \-S
-option to amd.
-If "yes", lock the running executable pages of amd into memory. To improve
-amd's performance, systems that support the
-.BR plock (3)
-call can lock the amd process into memory. This way there is less chance it
-the operating system will schedule, page out, and swap the amd process as
-needed. This improves amd's performance, at the cost of reserving the
-memory used by the amd process (making it unavailable for other processes).
-
-.TP
-.BR portmap_program " (numeric, default=300019)"
+.Fl S
+option to
+.Nm amd .
+If
+.Dq yes ,
+lock the running executable pages of
+.Nm amd
+into memory. To improve
+.Nm amd Ns 's
+performance, systems that support the
+.Xr plock 3
+call can lock the
+.Nm amd
+process into memory. This way there is less chance it that the operating
+system will schedule, page out, and swap the
+.Nm amd
+process as needed. This improves
+.Nm amd Ns 's
+performance, at the cost of reserving the memory used by the
+.Nm amd
+process
+(making it unavailable for other processes).
+.It Ic portmap_program Xo
+(numeric, default=300019)
+.Xc
Specify an alternate Port-mapper RPC program number, other than the official
-number. This is useful when running multiple amd processes. For example,
-you can run another amd in "test" mode, without affecting the primary amd
+number. This is useful when running multiple
+.Nm amd
+processes. For example, you can run another
+.Nm amd
+in
+.Dq test
+mode, without affecting the primary
+.Nm amd
process in any way. For safety reasons, the alternate program numbers that
can be specified must be in the range 300019-300029, inclusive.
-.B amq
+.Nm amq
has an option
-.B -P
-which can be used to specify an alternate program number of an amd to
-contact. In this way, amq can fully control any number of amd processes
-running on the same host.
-
-.TP
-.BR print_pid " (boolean, default=no)"
+.Fl P
+which can be used to specify an alternate program number of an
+.Nm amd
+to contact. In this way,
+.Nm amq
+can fully control any number of
+.Nm amd
+processes running on the same host.
+.It Ic print_pid Xo
+(boolean, default=no)
+.Xc
Same as the
-.B \-p
-option to amd. If "yes", amd will print its process ID upon starting.
-
-.TP
-.BR print_version " (boolean, default=no)"
+.Fl p
+option to
+.Nm amd .
+If
+.Dq yes ,
+.Nm amd
+will print its process ID upon starting.
+.It Ic print_version Xo
+(boolean, default=no)
+.Xc
Same as the
-.B \-v
-option to amd, but the version prints and amd continues to run. If "yes",
-amd will print its version information string, which includes some
-configuration and compilation values.
-
-.TP
-.BR restart_mounts " (boolean, default=no)"
+.Fl v
+option to
+.Nm amd ,
+but the version prints and
+.Nm amd
+continues to run. If
+.Dq yes ,
+.Nm amd
+will print its version information string, which includes some configuration
+and compilation values.
+.It Ic restart_mounts Xo
+(boolean, default=no)
+.Xc
Same as the
-.B \-r
-option to amd. If "yes"
-.B amd
+.Fl r
+option to
+.Nm amd .
+If
+.Dq yes ,
+.Nm amd
will scan the mount table to determine which file systems are currently
mounted. Whenever one of these would have been auto-mounted,
-.B amd
+.Nm amd
inherits it.
-
-.TP
-.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
-slow slip-based networks as follows:
-
-.nf
+.It Ic selectors_on_default Xo
+(boolean, default=no)
+.Xc
+If
+.Dq yes ,
+then the
+.Pa /default
+entry of maps will be looked 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
+.Tn NFS
+performance over slow slip-based networks as
+follows:
+.Pp
+.Bd -literal
/defaults \\
wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \\
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
-entries (keys) they have when "df" runs. (This is accomplished by returning
-non-zero values to the statfs(2) system call).
-
-.TP
-.BR unmount_on_exit " (boolean), default=no)"
-If "yes", then amd will attempt to unmount all file systems which it knows
-about. Normally amd leaves all (esp. NFS) mounted file systems intact.
-Note that amd does not know about file systems mounted before it starts up,
-unless the restart_mounts option or
-.B \-r
+.Ed
+.It Ic show_statfs_entries Xo
+(boolean, default=no)
+.Xc
+If
+.Dq yes ,
+then all maps which are browsable will also show the number of entries
+(keys)
+they have when
+.Qq df
+runs.
+(This is accomplished by returning non-zero values to the
+.Xr statfs 2
+system call.)
+.It Ic unmount_on_exit Xo
+(boolean, default=no)
+.Xc
+If
+.Dq yes ,
+then
+.Nm amd
+will attempt to unmount all file systems which it knows about. Normally
+.Nm amd
+leaves all
+(esp.\&)
+.Tn NFS
+mounted file systems intact. Note that
+.Nm amd
+does not know about file systems mounted before it starts up, unless the
+.Ar restart_mounts
+option or
+.Fl r
flag are used.
-
-.TP
-.BR vendor " (string, default to compiled in value)"
-The name of the vendor of the operating system. Overrides the compiled-in
-vendor name. Useful when the compiled-in name is not desired. For example,
-most Intel based systems set the vendor name to ``unknown'', but you can set
-it to ``redhat.''
-
-.\" **************************************************************************
-.SS Parameters applicable to regular map sections
-
-.TP
-.BR map_name " (string, must be specified)"
+.El
+.Ss "Parameters applicable to regular map sections"
+.Bl -tag -width 4n
+.It Ic map_name Xo
+(string, must be specified)
+.Xc
Name of the map where the keys are located.
-
-.TP
-.BR tag " (string, default no tag)"
+.It Ic tag Xo
+(string, default no tag)
+.Xc
Each map entry in the configuration file can be tagged. If no tag is
-specified, that map section will always be processed by amd. If it is
-specified, then amd will process the map if the
-.B -T
-option was given to amd, and the value given to that command-line option
-matches that in the map section.
-
-.\" **************************************************************************
-.SH EXAMPLES
-Here is a real amd configuration file I use daily.
-.P
-.nf
+specified, that map section will always be processed by
+.Nm amd .
+If it is specified, then
+.Nm amd
+will process the map if the
+.Fl T
+option was given to
+.Nm amd ,
+and the value given to that command-line option matches that in the map
+section.
+.El
+.Sh EXAMPLES
+Here is a real
+.Nm amd
+configuration I use daily.
+.Bd -literal
# GLOBAL OPTIONS SECTION
[ global ]
normalize_hostnames = no
@@ -558,7 +742,7 @@ log_file = /var/log/amd
log_options = all
#debug_options = all
plock = no
-selectors_in_defaults = yes
+selectors_on_default = 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.
@@ -586,16 +770,22 @@ map_name = amd.import
[ /tftpboot/.amd ]
tag = tftpboot
map_name = amd.tftpboot
-.fi
-.\" **************************************************************************
-.SH "SEE ALSO"
-.BR amd (8),
-.BR amq (8),
-.BR ctl-amd (8).
-.SH AUTHORS
-Erez Zadok <ezk@cs.columbia.edu>, Department of Computer Science, Columbia
-University, New York, USA.
-.P
-Other authors and contributors to am-utils are listed in the
-.B AUTHORS
+.Ed
+.Sh SEE ALSO
+.Xr amd 8 ,
+.Xr amq 8
+.Sh AUTHORS
+.An Erez Zadok Aq ezk@cs.columbia.edu ,
+Department of Computer Science, Columbia University, New York, USA.
+.Pp
+.An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
+Department of Computing, Imperial College, London, UK.
+.Pp
+Other authors and contributers to am-utils are listed in the
+.Pa AUTHORS
file distributed with am-utils.
+.Sh HISTORY
+The
+.Nm amd
+utility first appeared in
+.Bx 4.4 .
diff --git a/contrib/amd/scripts/fixrmtab b/contrib/amd/scripts/fixrmtab
deleted file mode 100755
index 33b7bcf..0000000
--- a/contrib/amd/scripts/fixrmtab
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# Invalidate /etc/rmtab entries for hosts named.
-# Restart mountd for changes to take effect.
-#
-# usage: fixrmtab host1 host2 ...
-#
-# Package: am-utils-6.0
-# Author: Andreas Stolcke <stolcke@icsi.berkeley.edu>
-
-#set -x
-
-RMTAB=/etc/rmtab
-TMP=/tmp/rmtab.$$
-
-if [ ! -f /etc/rmtab ]; then
- exit 0
-fi
-
-for host in $*
-do
- sed -e '/^'$host':/s/^./#/' $RMTAB > $TMP && cp $TMP $RMTAB
-done
-rm -f $TMP
diff --git a/contrib/amd/wire-test/.cvsignore b/contrib/amd/wire-test/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/contrib/amd/wire-test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/contrib/amd/wire-test/wire-test.8 b/contrib/amd/wire-test/wire-test.8
index 0d2efe7..a849e7d 100644
--- a/contrib/amd/wire-test/wire-test.8
+++ b/contrib/amd/wire-test/wire-test.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2004 Erez Zadok
+.\" Copyright (c) 1997-2003 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,33 +38,45 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: wire-test.8,v 1.3.2.5 2004/01/06 03:15:25 ezk Exp $
+.\" $Id: wire-test.8,v 1.3.2.4 2002/12/27 22:45:16 ezk Exp $
+.\" $FreeBSD$
.\"
-.TH WIRE-TEST 8 "26 Feb 1993"
-.SH NAME
-wire-test \- test your network interfaces and local IP address
-.SH SYNOPSIS
-.B wire-test
-[
-.I host
-]
-.SH DESCRIPTION
-.LP
-.B wire-test
-is used to find out what amd thinks are the first two network
-interfaces and network names/numbers used, as well as the IP address
-used for amd to NFS-mount itself.
-
+.Dd February 26, 1993
+.Dt WIRE-TEST 8
+.Os
+.Sh NAME
+.Nm wire-test
+.Nd test your network interfaces and local IP address
+.Sh SYNOPSIS
+.Nm
+.Op Ar host
+.Sh DESCRIPTION
+.Nm
+is used to find out what
+.Nm Amd
+thinks are the first two network interfaces and network names/numbers
+used, as well as the IP address used for
+.Nm Amd
+to NFS-mount itself.
+.Pp
If
-.I host
+.Ar host
is specified, then
-.B wire-test
-will test for the working combinations of NFS protocol and version from
-the current client to the NFS server
-.I host.
+.Nm
+will test for the working combinations of
+.Tn NFS
+protocol and version from the current client to the
+.Tn NFS
+server
+.Ar host .
If not specified,
-.I host
-defaults to "localhost".
-
-.SH "SEE ALSO"
-.BR amd (8).
+.Ar host
+defaults to
+.Dq localhost .
+.Sh SEE ALSO
+.Xr amd 8
+.Sh HISTORY
+The
+.Nm
+utility appeared in
+.Fx 3.0 .
diff --git a/contrib/amd/wire-test/wire-test.c b/contrib/amd/wire-test/wire-test.c
index f0a2663..38b7e01 100644
--- a/contrib/amd/wire-test/wire-test.c
+++ b/contrib/amd/wire-test/wire-test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2003 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,8 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wire-test.c,v 1.5.2.4 2004/01/06 03:15:25 ezk Exp $
+ * $Id: wire-test.c,v 1.5.2.3 2002/12/27 22:45:16 ezk Exp $
+ * $FreeBSD$
*
*/
OpenPOWER on IntegriCloud