diff options
author | obrien <obrien@FreeBSD.org> | 1999-09-15 02:50:52 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-09-15 02:50:52 +0000 |
commit | e0215a27a74ac4806bc4d13ea6da0e9f444dbf18 (patch) | |
tree | 6449eb4f97cd02d168d1b036b9a7151c52272f4f /contrib/amd | |
parent | 452637dcc0d7040351cf90be4968d48917b45f8e (diff) | |
parent | 422815db966fe7dc38dfc5df2be5e83d5ea9f48c (diff) | |
download | FreeBSD-src-e0215a27a74ac4806bc4d13ea6da0e9f444dbf18.zip FreeBSD-src-e0215a27a74ac4806bc4d13ea6da0e9f444dbf18.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r51292,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/amd')
112 files changed, 4561 insertions, 580 deletions
diff --git a/contrib/amd/AUTHORS b/contrib/amd/AUTHORS index 2aba7cd..ee692d8 100644 --- a/contrib/amd/AUTHORS +++ b/contrib/amd/AUTHORS @@ -32,6 +32,10 @@ for hesiod zone files. Always use /etc/amd.conf if exists. August 8, 1998: add detection support for NFS V.3 for NetBSD 1.3F. +February 1, 1998: fixes for NetBSD to better detect its features. + +September 4, 1999: assorted fixes for NetBSD 1.4+. + * Hannes Reinecke <hare@MathI.UNI-Heidelberg.DE> Back in 1995, contributed code for linux. A new parser for file system @@ -112,6 +116,15 @@ February 24, 1998: lots of patches for ultrix 4.3 port. February 28, 1998: lots of documentation fixes! +January 8, 1999: texi fixes, and more Ultrix 4.3 fixes, among others. + +January 11, 1999: hesiod_isup function. Fix format errors in dlog/plog. +Remove obsolete or unnecessary files/macros. Don't report disabled file +systems. More misc fixes. + +February 3, 1998: don't start autofs listener unless autofs maps were in +use. + * Jason Thorpe <thorpej@nas.nasa.gov> August 25, 1997: make amd work when talking to NIS+ servers in NIS @@ -154,6 +167,8 @@ November 5, 1997: NFS v.3 support for AIX 4.2.1, which does *not* include headers for this. Bill had to guess at the right structures, field names, sizes, alignment, etc. +January 15, 1999: small ldap bug fixes. + * Stefan Vogel <vogel@physik-rzu.unizh.ch> November 14, 1997: typo in the subscription instructions to amd-dev. @@ -215,3 +230,36 @@ of a looked up entry before unmounting it. * Douglas K. Rand" <rand@aero.und.edu> December 3, 1998: case insensitive host name match for nfsl. + +* David Wolfskill <dhw@whistle.com> +January 28, 1999: don't turn on/off noconn option if it was already in that +state. + +* Jeffrey C Honig <jch@BSDI.COM> +March 14, 1999: clean up more autogenerated files upon "make distclean". + +March 15, 1999: avoid overly verbose NIS warning even on systems that don't +run NIS. On BSD systems, wire.c uses getifaddrs(), sysctl(), IRS routines, +and more fixes. Numerous IP packet security fixes. + +March 16, 1999: documentation typos. new cdfs options. ufs structure +detection for bsdi4. + +* Paul Balyoz <pbalyoz@sedona.ch.intel.com> +March 26, 1999: ensure lostaltmail displays Y2K compliant dates. + +* Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk> +March 30, 1999: turn off incomplete NFS V.3 support in HPUX 10.20. + +* Peter Breitenlohner <peb@mppmu.mpg.de> +July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and +nis_isup mis-logic fixes. + +* Dale Talcott <aeh@quest.cc.purdue.edu> +July 26, 1999: added NFS3 support for AIX mounting. + +* Christophe Kalt <Christophe-Kalt@deshaw.com> +July 14, 1999: add netgrpd() syntax function which uses FQHN. + +* Andrew J. Korty <ajk@purdue.edu> +September 5, 1999: pawd works for type:=nfsl. diff --git a/contrib/amd/BUGS b/contrib/amd/BUGS index 88027b2b..bdf6cde 100644 --- a/contrib/amd/BUGS +++ b/contrib/amd/BUGS @@ -36,12 +36,35 @@ main() exit(0); } +It is possible that sufficiently newer version of libc for RH4.2 fix this +problem. + (3) mips-dec-ultrix4.3 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> reports -[3A] At least the gcc 2.7.0 fixincludes-mangled <sys/utsname.h> needs a +[3A] One needs the Kernel Config Files (UDTBIN430) subset installed to +compile am-utils, otherwise essential header files (net/if.h, net/route.h, +rpcsvc/mount.h, rpcsvc/yp_prot.h, rpcsvc/ypclnt.h, sys/proc.h) are +missing. + +[3B] It's probably impossible to build am-utils with DEC C on Ultrix V4.3. +This compiler is pseudo-ANSI only. Maybe the new ANSI C compiler in V4.3A +and beyond will do. I successfully used gcc 2.8.1. + +[3C] You need to build against a recent libhesiod (I used 3.0.2) and +libresolv/lib44bsd (I used BIND 4.9.5-P1). The resolver routines in +libc seem to cause random memory corruption. It is necessary to specify +LIBS=-l44bsd. lib44bsd is a helper library of libresolv used to supply +functions like strdup which are missing on the host system. This isn't +currently autoconfiscated. + +[3D] You need to configure with CONFIG_SHELL=/bin/sh5 /bin/sh5 buildall; +/bin/sh cannot handle the shell functions used in buildall and is both +buggy and slow. + +[3E] At least the gcc 2.7.0 fixincludes-mangled <sys/utsname.h> needs a forward declaration of struct utsname to avoid lots of gcc warnings: RCS file: RCS/utsname.h,v @@ -58,9 +81,6 @@ diff -u -r1.1 utsname.h #endif #define __SYS_NMLN 32 -[3B] It autoconfigures and compiles cleanly, but currently hangs after a -couple of hours without leaving any traces in the syslog output. - (4) powerpc-ibm-aix4.2.1.0 diff --git a/contrib/amd/COPYING b/contrib/amd/COPYING index 49783ec..040bc51 100644 --- a/contrib/amd/COPYING +++ b/contrib/amd/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 1997-1998 Erez Zadok +Copyright (c) 1997-1999 Erez Zadok Copyright (c) 1989 Jan-Simon Pendry Copyright (c) 1989 Imperial College of Science, Technology & Medicine Copyright (c) 1989 The Regents of the University of California. diff --git a/contrib/amd/ChangeLog b/contrib/amd/ChangeLog index 784693a..f40e52e 100644 --- a/contrib/amd/ChangeLog +++ b/contrib/amd/ChangeLog @@ -1,3 +1,775 @@ +1999-09-08 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0.1 *** + ******************************************************************* + +1999-09-08 Erez Zadok <ezk@cs.columbia.edu> + + * aux/macros/mount_headers.m4: bsdi-2.1 needs MAXQUOTAS and struct + netexport defined. + + * aux/macros/try_compile_anyfs.m4: bsdi-2.1 needs MAXQUOTAS and + struct netexport defined. + +1999-09-07 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_field.m4 (ac_upcase_var_name): include + <ifaddrs.h> so we can detect fields within struct ifaddrs. + + * libamu/wire.c (getwire): bsdi-2.1 uses a second arg to + getifaddrs() and struct ifaddrs has no ifa_next field. + + * aux/configure.in: check if 'struct ifaddrs' has a field + ifa_next. + + * include/amq_defs.h (AMQ_STRLEN): double size of amq string + length to 2048 bytes. + + * conf/nfs_prot/nfs_prot_netbsd1_4.h: include several more nfs + header files and ufs/ufs/ufsmount.h. Bug reported by <Christos + Zoulas> christos@zoulas.com. + + * aux/macros/try_compile_anyfs.m4: include <ufs/ufs/ufsmount.h>. + Bug reported by <Christos Zoulas> christos@zoulas.com. + + * aux/macros/mount_headers.m4: include <ufs/ufs/ufsmount.h> + +1999-09-06 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * libamu/xutil.c (expand_error): use strerror if available instead + of sys_errlist. Bug reported by <Christos Zoulas> + christos@zoulas.com. + + * hlfsd/hlfsd.c (fatal): use strerror if available instead of + sys_errlist. + + * amq/amq.c (show_mi): use strerror if available instead of + sys_errlist. + + * aux/macros/check_nfs_prot_headers.m4: make sure netbsd1.4 + nfs_prot header is used for any future (1.5 etc.) netbsd systems. + + * amq/pawd.c (find_mt): check for type nfsl as well. Fix from + "Andrew J. Korty" <ajk@purdue.edu> + +1999-08-29 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * doc/am-utils.texi (Supported Platforms): updates for redhat + systems. + + * INSTALL: updates for redhat systems. + + * libamu/wire.c (getwire_lookup): spell "succeeded" correctly + +1999-08-28 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/ctl-amd.in: sleep 1 second between killing amd and + restarting it, because amq may respond that amd is down, where in + fact it is still trying to unmount itself after unmapping itself + from the portmapper. + + * aux/config.guess.long: new script to print long version of + config.guess output. + + * buildall (host_alias): use long version of config.guess. + +1999-08-27 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/ctl-{amd,hlfsd}.in: update RH tags for start/stop + scripts. + +1999-08-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s11 + + * libamu/xutil.c (expand_error): make sure expanding the string + with textual version of errno doesn't overrun the 1024 bytes + buffer. + (real_plog): null terminate msg, just in case. + + * amq/amq.c (main): don't getopt -M option and don't process it + unless ENABLE_AMQ_MOUNT is on. + + * amd/amq_svc.c (amq_program_1): all code that relates to amq -M + is conditional on #ifdef ENABLE_AMQ_MOUNT. + + * amd/amq_subr.c: remove amqproc_mount_1_svc() function invoked + when amq -M code is disabled. Not taking any chances. + +1999-08-23 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s10 + +Sun Aug 22 16:18:59 1999 Erez Zadok <ezk@subzero.cs.columbia.edu> + + * libamu/wire.c (getwire_lookup): if getnetbyaddr failed (e.g., on + 128.59.16.0), try to shift the network out of zeros (e.g., + 128.59.16) and try again. Irix 6.4 requires short network + numbers. + +1999-08-22 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * libamu/wire.c (getwire_lookup): correctly compute subnet using + netmask. + + * libamu/mount_fs.c (compute_automounter_nfs_args): require that + Amd's own NFS mounts use reserved ports (if possible). IP packet + security fix from Jeffrey C Honig <jch@BSDI.COM>. + + * conf/transp/transp_tli.c (create_autofs_service): use correct + autofs_port. IP packet security fix from Jeffrey C Honig + <jch@BSDI.COM>. + + * conf/transp/transp_sockets.c (bindnfs_port): remove unnecessary + function. IP packet security fix from Jeffrey C Honig + <jch@BSDI.COM>. + (create_nfs_service): use bind_resv_port() directly. ensure that + privileged ports are used. IP packet security fix from Jeffrey C + Honig <jch@BSDI.COM>. + + * amd/nfs_prot_svc.c (nfs_program_2): verify that requests come + from reserved ports and from a local IP address. IP packet + security fix from Jeffrey C Honig <jch@BSDI.COM>. + + * amd/amq_subr.c (ok_security): use IPPORT_RESERVED, instead of + hard-coded 1024. IP packet security fix from Jeffrey C Honig + <jch@BSDI.COM>. + (amqproc_mount_1_svc): provide information on the caller making an + amq -M request. IP packet security fix from Jeffrey C Honig + <jch@BSDI.COM>. + + * amd/map.c (free_map_if_success): If the program doing an unmount + of a program filesystem fails, amd tries to interpret the return + code as an errno. Fix from Jeffrey C Honig <jch@BSDI.COM>. + + * amd/info_nis.c (determine_nis_domain): don't always print + warning about NIS domain name not being set, even if NIS is not in + use. + +1999-08-21 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/info_ldap.c (get_ldap_timestamp): initialize variable err. + (amu_ldap_search): initialize variable err. + +1999-08-16 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * libamu/wire.c: written using getifaddrs() for BSD systems, + contributed by BSDI, Jeffrey C Honig <jch@BSDI.COM>). + +1999-08-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * include/am_utils.h (SALLOC): a simple macro to allocate N bytes. + + * aux/configure.in: check for irs.h and ifaddrs.h. + Increase libamu.so --version-info to 3:1:1 since we've changed the + source code for the library. + Check for getifaddrs() function. + +1999-08-14 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * libamu/mount_fs.c (print_nfs_args): print fields namlen and + bsize if they exist. + + * conf/mount/mount_linux.c (mount_linux): set nfs_args_t->namlen + and ->bsize fields correctly, if those fields exist. This is a + bug in that amd neglected to set these fields, but told the + kernel it is mounting the nfs_args_t structure using mount version + 3 (which requires both bsize and namlen fields). + + * aux/configure.in: test for two new nfs_args_t fields (used on + newer linux with mount versions 2 and 3): bsize and namlen. + + * doc/am-utils.texi (netgrpd Selector Function): document new + selector function. + + * amd/opts.c (f_netgrpd): new amd map function netgrpd(ARG) to + test if the current host (fully-qualified name) is in the ARG host + netgroup. The netgrp() function uses the short form of a host + name. Patch from Christophe Kalt <Christophe-Kalt@deshaw.com>. + + * doc/am-utils.texi (automount2amd): document new script. + + * scripts/Makefile.am: create, install, and distribute + automount2amd perl script and its man page. + + * scripts/automount2amd.8: new man page for automount2amd. + + * scripts/automount2amd.in: new file, contributed a in 1993 by + Mike Walker <mike@tab00.larc.nasa.gov>. Fixed to use addopts for + any automount map options specified. + +1999-08-09 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s9 + +1999-08-09 Erez Zadok <ezk@beetle.mcl.cs.columbia.edu> + + * amd/amfs_auto.c (DOT_DOT_COOKIE): set the NFS cookie of '..' to + 1. + (amfs_auto_readdir): use DOT_DOT_COOKIE instead of (u_int)~0. + (amfs_auto_readdir_browsable): use DOT_DOT_COOKIE instead of + (u_int)~0. + + * amd/mapc.c (make_entry_chain): NFS cookies should be + monotonically increasing, because Linux 2.3 expects that, even + though it is not in the spec (RFC-1094) for NFS V2. + +1999-08-06 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_lib_funcs.m4: removed unused macro. + + * aux/macros/linux_headers.m4: new macro to ensure that linux + kernel headers match running kernel version. + + * aux/acconfig.h: define HOST_HEADER_VERSION so we can check if + amd is configured on linux hosts that run one kernel but have + headers for a different version. + + * amd/info_nis.c (nis_isup, nis_search, nis_init): fixes for the + logic which uses nis_isup and has_yp_order. Make sure it is used + correctly , esp. for NIS+ in NIS-compatibility mode. Bug fix from + Peter Breitenlohner <peb@mppmu.mpg.de>. + + * include/am_defs.h: fix conflicts on linux 2.2 systems with older + libc5. Bug fix from Peter Breitenlohner <peb@mppmu.mpg.de>. + + * scripts/lostaltmail.in: use sockaddr_in(), not pack() to + correctly fill in a struct sockaddr_in. On Solaris x86 hosts, + using pack() results in byte-misaligned values. + +1999-08-02 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/mtab/mtab_aix.c (mnt_dup): add support for nfs3 + mounting, as per Dale Talcott <aeh@quest.cc.purdue.edu>. Also use + better macros for case statement. + + * conf/nfs_prot/nfs_prot_sunos5_7.h: don't include ldap structures + unless ldap is actually available. + + * use updated config.guess and config.sub. Use newer automake + that fixes problems with distributing optional libamu files + (clnt_sperrno.c, hasmntopt.c, strcasecmp.c, strdup.c, strstr.c, + and ualarm.c) + +1999-07-19 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * minor port i386-unknown-openbsd2.5 + +1999-07-17 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * minor ports to freebsdelf 3.[0-2] and 4.0 completed + + * aux/macros/check_nfs_prot_headers.m4: support freebsdelf + + * aux/macros/check_nfs_socket_connection.m4: support freebsdelf + +1999-06-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s8 + +1999-06-23 Erez Zadok <ezk@beetle.mcl.cs.columbia.edu> + + * include/am_defs.h: avoid various header conflicts on + RedHat/Linux 6.0 and kernels 2.2.10 or newer. + + * aux/configure.in: look for <db1/ndbm.h> (RedHat/Linux 6.0 and + kernel 2.2.10) + + * amd/amfs_program.c (amfs_program_exec): make sure logfp is + initialized dynamically to stderr if needed. + + * libamu/xutil.c (dplog): make sure logfp is initialized + dynamically to stderr if needed. + (plog): ditto. + + * amd/amfs_program.c (amfs_program_exec): set logfp to stderr if + not initialized. + + * libamu/xutil.c: don't initialize logfp statically to stderr, + because on RedHat/Linux 6.0 (kernel 2.2.10) stderr can no longer + be manipulated like a variable. + + * include/am_defs.h: avoid more conflicts between <linux/fs.h> and + <sys/mount.h> on 2.2 linux kernels. + include <db1/ndbm.h> as needed (RedHat/Linux 6.0) + +1999-04-20 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * all Makefile.am: use AMU_NFS_PROT_HEADER (not *_HEADERS) + + * aux/macros/check_nfs_prot_headers.m4 (AMU_NFS_PROT_HEADER): + renamed AC_SUBST name from *_HEADERS to *_HEADER so that automake + won't attempt to add it to the header files to distribute. + +1999-04-19 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/GNUmakefile: invoke aclocal with new --altdir flag. + +1999-04-16 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * minor new port: i386-unknown-netbsd1.4 (ALPHA) + + * aux/macros/check_field.m4: no need to include <cdfs/cdfsmount.h> + and <isofs/cd9660/cd9660_mount.h> because they are also included + from MOUNT_HEADERS. Causes multiple inclusion of unprotected + headers on netbsd-1.4_ALPHA. + +1999-04-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/extern_sys_errlist.m4 (pattern): netbsd-1.4_ALPHA's + sys_errlist extern doesn't end with []. + + * aux/macros/check_nfs_prot_headers.m4: netbsd 1.4 support. + +1999-04-11 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * newer automake wants texinfo.tex to be in aux/ not doc/ + +1999-03-30 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/conf_parse.y: alloca support. + + * fsinfo/fsi_gram.y: alloca support. + + * libamu/Makefile.am (libamu_la_LIBADD): compile alloca.o if + needed. + + * aux/configure.in: test for alloca support. Needed because bison + generates parsers that use alloca, and hpux9 does have alloca and + its /bin/cc doesn't support it builtin (the way gcc does). + + * libamu/alloca.c: new file, needed on hpux9 with /bin/cc. Taken + verbatim from bison-1.25. + + * include/am_defs.h: fixed typo #errir -> #error + + * released snapshot am-utils-6.0.1s7 + + * README.y2k: more information about am-utils' compatibility, from + Paul Balyoz <pbalyoz@sedona.ch.intel.com>. + + * scripts/lostaltmail.in (Splice_in_resent_headers): ensure Y2K + compliant format. Patch from Paul Balyoz + <pbalyoz@sedona.ch.intel.com> + + * doc/am-utils.texi (Supported Platforms): hpux10.20 could have + nfs v.3 support (with some vendor patches), but it is turned off. + + * aux/macros/os_cflags.m4: use ansi compiler options on hpux. + + * conf/nfs_prot/nfs_prot_hpux.h: Turn off NFS V.3 support to avoid + confusing am-utils. 10.20 with some patches has incomplete + support. Patch from Jon Peatfield + <J.S.Peatfield@damtp.cam.ac.uk>. + +1999-03-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * minor port i386-pc-bsdi4.0.1 + +1999-03-20 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * doc/am-utils.texi (Supported Platforms): add forgotten listing + for powerpc-linux. + +1999-03-18 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/amd.conf.5: fix typo. From Jeffrey C Honig + <jch@BSDI.COM>. + + * doc/am-utils.texi: document iso9660 options norrip, gens, and + extatt. + (opts Option): documented dumbtimr and noauto options. From + Jeffrey C Honig <jch@BSDI.COM>. + + * include/am_compat.h: define default strings for options norrip, + gens, and extatt. + + * amd/ops_cdfs.c (mount_cdfs): support options norrip, gens, and + extatt. + + * aux/macros/mount_headers.m4: also include + <isofs/cd9660/cd9660_mount.h> as needed. + + * aux/configure.in: check for isofs mount options for bsdi4: + norrip, gens, and extatt. Reported by Jeffrey C Honig + <jch@BSDI.COM>. + + * aux/macros/check_mnt2_cdfs_opt.m4: check for ISOFSMNT_* flags + (bsdi4). + +1999-03-17 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_freebsd3.h: ditto. + + * conf/nfs_prot/nfs_prot_bsdi3.h: include <ufs/ufs/ufsmount.h>, + for bsdi4, as per Jeffrey C Honig <jch@BSDI.COM>. + +1999-03-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * get latest copies of config.guess, config.sub, ltconfig, and + ltmain.sh from libtool-1.2f. + + * all Makefile.am: don't use continuation lines (using \) for + short lists of files. + + * libamu/Makefile.am (DISTCLEANFILES): make distclean should + remove mountutil.c, mtabutil.c, transputil.c, and umount_fs.c. + Reported by Jeffrey C Honig <jch@BSDI.COM>. + + * fixmount/Makefile.am (DISTCLEANFILES): make distclean should + remove checkmount.c. Reported by Jeffrey C Honig <jch@BSDI.COM>. + + * Makefile.am (DISTCLEANFILES): make distclean should remove + amu_nfs_prot.h, config.cache.old, and dbgcf.h. Reported by + Jeffrey C Honig <jch@BSDI.COM>. + +1999-03-13 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s6 + +1999-03-12 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * INSTALL: document freebsdelf. + + * doc/am-utils.texi (Supported Platforms): document freebsdelf. + +1999-03-08 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * minor new ports: i386-unknown-freebsdelf3.1 and + i386-unknown-freebsdelf4.0 + + * aux/macros/check_nfs_prot_headers.m4: freebsd4 support. + + * aux/macros/check_nfs_socket_connection.m4: freebsd4 support. + + * aux/macros/check_nfs_fh_dref.m4: freebsd4 support. + + * amd/opts.c (eval_opts): changed log level of "executing + negated..." message from USER to INFO, as per Guntram Wolski + <gwolsk@sei.com>. + +1999-02-17 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * */Makefile.am (LDADD): force linking against an installed + libamu.{a,so}. + + * doc/am-utils.texi (addopts Option): document remopts interaction + with addopts. + + * amd/am_ops.c (ops_match): if addopts are specified, apply them + to the value of remopts as well as opts. + + * amd/ops_nfs.c (mount_nfs_fh): tell users when remopts are used. + +1999-02-05 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s5 + + * conf/mount/mount_linux.c (mount_linux): set default nfs_args + options for ac{reg,dir}{min,man} as per the mount-2.8a package, + but only if noac option was not used. + +1999-02-05 Erez Zadok <ezk@retro.cs.columbia.edu> + + * conf/mount/mount_linux.c (mount_linux): print nfs_args again + since it was updated. + (mount_linux): use 4KB for NFS rsize/wsize on 2.1.0 linux kernels + and newer. Bug was found by Neil Conway + <nconway.list@ukaea.org.uk> + +1999-02-04 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s4 + +1999-02-03 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amq/amq.c (main): don't list -M as a valid amq option unless + configure'd with --enable-amq-mount. + +Wed Feb 3 18:11:18 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * amd/nfs_start.c (amd_use_autofs): Define. + (mount_automounter): Create autofs service listener only if + necessary to avoid unnecessary clashes with e.g. automountd. + + * amd/amd.h (amd_use_autofs): Declare. + + * amd/conf.c (gopt_mount_type): Set amd_use_autofs. + (ropt_mount_type): Likewise. + +1999-02-02 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_mnt2_nfs_opt.m4:: ditto + + * aux/macros/check_mnt2_cdfs_opt.m4: ditto + + * aux/macros/check_mnt2_gen_opt.m4: ditto + + * aux/macros/check_mnttab_opt.m4: new macro in this file to loop + over AC_CHECK_MNTTAB_OPT. Reduces size of configure script a lot. + + * conf/nfs_prot/nfs_prot_netbsd1_3.h: include nfs/rpcv2.h, + nfs/nfs.h and nfs/nfsmount.h if they exist. Patch from + christos@zoulas.com (Christos Zoulas). + + * amd/info_hesiod.c: some forward declarations. Patch from + christos@zoulas.com (Christos Zoulas). + +1999-01-28 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * libamu/mount_fs.c (compute_nfs_args): don't turn on/off noconn + option if it was already in that state. Patch from David + Wolfskill <dhw@whistle.com>. + +1999-01-20 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/configure.in: automake nowadays supports LTLIBOBJS (but not + LTALLOCA yet). Substitute value of LIBTOOL_DEPS for libtool + rebuild make rules. + + * Makefile.am: new rules to remake libtool (maintainers only) + + * amd/amfs_toplvl.c (mount_amfs_toplvl): print generic mount flags + if -D trace was used. + +1999-01-18 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * buildall: all if statements should have an else clause because + of Ultrix's /bin/sh. + +1999-01-15 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amq/amq.c: removed dummy variables. + + * amq/pawd.c: removed dummy variable.s + + * fixmount/fixmount.c (usage): removed dummy variables. + + * fsinfo/fsinfo.c: removed dummy variables. + + * hlfsd/hlfsd.c: removed dummy variables. + + * wire-test/wire-test.c: removed dummy variables. + + * mk-amd-map/mk-amd-map.c: removed dummy variables. + + * doc/texinfo.tex: updates from GNU mirror. + + * aux/GNUmakefile (../doc/texinfo.tex): new rule to update + doc/texinfo.tex from GNU mirror. + + * released snapshot am-utils-6.0.1s3 + + * Makefile.am (install-snapshot): better snapshot and new + install-snapshot and test-snapshot rules (maintainer). + + * amd/info_ldap.c (amu_ldap_init): don't run STREQ if one of the + args may be NULL. + Some dlog() entries were not enclosed in #ifdef DEBUG. Fix from + Bill Paul <wpaul@ctr.columbia.edu> + +1999-01-13 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * check for experimental generic 'ignore' mount flag on freebsd3. + + * Update library -version-info to 3:0:1 (will result in 2.1.0 .so + version, which is backwards compatible with older versions.) Only + one new interface was added to libamu. + + * amd/amfs_toplvl.c (mount_amfs_toplvl): add generic mount flags + that are specific to automounter mounts. + + * aux/configure.in: update libamu.so age and revision since a new + interface was added to libamu/mount_fs.c + (compute_automounter_mount_flags). + + * libamu/mount_fs.c (compute_automounter_mount_flags): new + function to compute generic mount flags that are specific to mount + points only. + + * aux/{configure.in,acconfig.h}: add support for generic mount + entry ignore option. + + * released snapshot am-utils-6.0.1s2 + + * amd/info_ldap.c (get_ldap_timestamp): dlog format fixes. + + * libamu/mount_fs.c (print_nfs_args): solaris 2.7 changed format + of knc_semantics from u_long to u_int. + + * aux/macros/check_mount_style.m4: freebsd3 no longer needs a + special mount helper. + +1999-01-12 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_nfs_prot_headers.m4 (AMU_NFS_PROT_HEADERS): + amu_nfs_conf.h should always be found in $top_builddir. + +Tue Jan 12 00:05:42 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * conf/nfs_prot/nfs_prot_sunos5_7.h (MNTTAB_TYPE_AUTOFS): Undefine + to avoid wrong reports from show_fstypes. + + * conf/nfs_prot/nfs_prot_irix5.h (MNTTAB_TYPE_XFS): Likewise. + + * conf/nfs_prot/nfs_prot_hpux11.h (MNTTAB_TYPE_NFS3): Likewise. + +Tue Jan 12 00:05:42 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * BUGS (mips-dec-ultrix4.3): Update Ultrix caveats. + +Tue Jan 12 00:05:42 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * hlfsd/homedir.c (delay): Cast child to long, adapt format. + (hlfsd_getpwent): Likewise for pw_uid. + + * amd/info_nis.c (nis_init): Cast order to unsigned long, adapt + format. + + * conf/transp/transp_tli.c (amu_clnt_create_best_vers): Cast + tv_sec to int to match format. + (get_nfs_version): Cast nfs_version, NFS_VERSION to int to match + formats. + + * amd/amfs_program.c (amfs_program_exec): Cast ptr difference to + long, adapt format. + + * include/am_defs.h: Handle __attribute__ if available. From + GNU fileutils 4.0 lib/errors.h. + +Mon Jan 11 13:46:44 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * libamu/mount_fs.c (print_nfs_args): Cast sizeof() to int to + match format. + + * hlfsd/stubs.c (nfsproc_getattr_2_svc): Cast uid, gid to long, + adapt format. + (nfsproc_lookup_2_svc): Likewise. + (nfsproc_readlink_2_svc): Likewise for userid, groupid. + + * hlfsd/nfs_prot_svc.c (nfs_program_2): Cast args to int to match + format. + + * hlfsd/homedir.c (homedir): Cast uid, child to long, adapt + format. + + * amd/info_hesiod.c (hesiod_search): Cast m, pval, tp to unsigned + long, adapt format. + + * amd/ops_nfs.c (find_nfs_fhandle_cache): Cast fh_wchan to + unsigned long, adapt format. + (got_nfs_fh): Likewise. + (prime_nfs_fhandle_cache): Cast fh_nfs_version to int to match + format. + (call_mountd): Likewise, mnt_version also. + (mount_nfs_fh): Likewise. + + * amd/ops_autofs.c (autofs_program_1): Cast args to int to match + format. + (autofs_unmount_1_svc): Cast ur->devid, ur_rdevid, ur->next to + unsigned long, adapt formats. + (autofs_bgmount): Cast opt_fs to unsigned to, adapt format. + (autofs_bgmount): Use long format to match arg. + (autofs_lookuppn): Removed superfluous arg. + + * amd/srvr_nfs.c (start_ping): Cast nfs_version to int to match + format. + (got_portmap): Likewise for port. + (recompute_portmap): Likewise for fs->fs_version, mnt_version. + (find_nfs_srvr): Likewise for nfs_version. + + * amd/sched.c (sched_task): Cast wchan to unsigned long, adapt + format. + + * amd/nfs_start.c (checkup): Cast ptr difference to long, next_mem + to unsigned long, adapt format. + Cast tvv.tv_sec to int to match format. + + * amd/nfs_prot_svc.c (nfs_program_2): Cast args to int to match + format. + + * amd/map.c (root_fh): Cast pid to long, adapt format. + (timeout_mp): Cast time_t to long, adapt format. + + * amd/clock.c (reschedule_timeouts): Use long format, cast time_t + arg. + + * amd/amfs_host.c (fetch_fhandle): Cast nfs_version to int to + match format. + (amfs_host_fmount): Likewise. + (amfs_host_umounted): Likewise. Removed superfluous arg. + + * amd/amfs_auto.c (amfs_auto_bgmount): Cast pointer to unsigned + long, adapt format. + (amfs_auto_bgmount): Use long format, cast time_t arg. + (amfs_auto_lookuppn): Removed superfluous arg. + + * amd/amd.c (main): Cast geteuid() result to long, adapt format. + + * conf/transp/transp_sockets.c (get_nfs_version): Cast nfs_version + to int to match format. + + * include/am_utils.h: Declare plog, dplog as printf-like. + + * conf/mount/mount_irix6.c (mount_irix): Print type as char *. + +Mon Jan 11 13:46:44 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * amd/info_hesiod.c (hesiod_isup): New function. + * amd/mapc.c (maptypes): Add it. + +1999-01-10 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * released snapshot am-utils-6.0.1s1 + +1999-01-09 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * ALL: bump copyright year to 1999. + +Fri Jan 8 15:24:15 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * aux/macros/check_mtype_type.m4: Ultrix uses an int mount type, + too. + + * aux/macros/check_mtype_printf_type.m4: Adapt corresponding + printf type. + +Fri Jan 8 15:24:15 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * aux/acconfig.h: Removed HAVE_AM_FS_AUTOFS, unused. + + * conf/nfs_prot/nfs_prot_irix6.h: Likewise. + + * conf/nfs_prot/nfs_prot_sunos5_6.h: Likewise. + + * conf/nfs_prot/nfs_prot_sunos5_7.h: Likewise. + + * Makefile.am (EXTRA_DIST_DIRS): Removed, not needed by current + automake. + +Thu Jan 7 02:55:18 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * aux/configure.in (AM_PROG_YACC): Replaced by AC_PROG_YACC, not + in current automake. + +Thu Jan 7 02:55:18 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * doc/am-utils.texi: Added some missing inter-punctation after + @xref, or use @pxref/@ref as appropriate. Spotted by makeinfo + from texinfo 3.12b. + +1999-01-07 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * doc/texinfo.tex: updated off of latest GNU mirror. + +1999-01-04 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * doc/am-utils.texi (Supported Platforms): update platforms that + support NFS v.3. Nicer postscript printing on double-sided pages. + + * amd/info_hesiod.c: add extern definition for hesiod_init() + 1999-01-01 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> ******************************************************************* @@ -310,6 +1082,35 @@ Wed May 13 16:33:57 1998 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> * amd/ops_autofs.c (mount_autofs): cast pid to long. +Tue Apr 28 15:12:36 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * conf/nfs_prot/nfs_prot/nfs_prot_irix6.h, + conf/nfs_prot/nfs_prot_sunos5_6.h: Undef MNTTAB_TYPE_AUTOFS too to + avoid amd/am_ops.c (show_fstypes) from erroneously claiming + support. + +Fri Apr 24 23:02:11 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * libamu/xutil.c (get_syslog_facility): Don't use LOG_DAEMON + unconditionally, may be missing on Ultrix V4.3. + +Thu Apr 23 20:24:33 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * conf/nfs_prot/nfs_prot_sunos5_4.h (MNTTYPE_CACHEFS): Define, + missing from <sys/mntent.h>. + + * conf/mtab/mtab_ultrix.c: Need separate inclusion of <sys/fs_types.h> + without KERNEL defined here. + + * aux/macros/mount_headers.m4: Need to include <ufs/ufs_mount.h>, + <cdfs/cdfs_mount.h>, <cdfs/cdfsmount.h> so autoconfiguration of + ufs_args_t, cdfs_args_t fields and cdfs mount options can succeed. + + * amd/ops_ufs.c (mount_ufs): Removed obsolete comment. + + * ChangeLog: Fixed confusing linebreaks from ChangeLog imports. + Removed purely local (and obsolete) entry. + Thu Apr 23 00:22:17 1998 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> ******************************************************************* @@ -505,8 +1306,8 @@ Wed Feb 7 15:35:51 1998 Rainer Orth <ro@xayide.TechFak.Uni-Bielefeld.DE> * merged Ultrix port with am-utils 6.0 a16s5: amd/ops_afs.c (mount_toplvl) -> amd/amfs_toplvl.c (mount_amfs_toplvl) - * include/am_defs.h: include cdfs specific mount headers avoid - duplication definition of gt_names[] in <sys/fs_types.h> (Ultrix) + * include/am_defs.h: include cdfs specific mount headers + avoid duplication definition of gt_names[] in <sys/fs_types.h> (Ultrix) * include/am_compat.h: define several mount options corresponding to mount flags: pgthresh, hard (nfs), defperm, nodefperm, @@ -552,12 +1353,13 @@ Wed Feb 7 15:35:51 1998 Rainer Orth <ro@xayide.TechFak.Uni-Bielefeld.DE> comment in <rpc/auth.h> * include/am_defs.h: #define KERNEL to avoid definition of - gt_names[] conf/mtab/mtab_ultrix.c: #include <sys/fs_types> before - <config.h> to force single definition here + gt_names[] + conf/mtab/mtab_ultrix.c: #include <sys/fs_types> before <config.h> + to force single definition here * libamu/mount_fs.c (compute_nfs_args): Ultrix support for - nfs_args.gfs_flags moved to callers store mount options in - nap->optstr + nfs_args.gfs_flags moved to callers + store mount options in nap->optstr * include/am_defs.h: fix _am_mntent mnt_{type, opts} field descriptions @@ -570,11 +1372,9 @@ Wed Feb 7 15:35:51 1998 Rainer Orth <ro@xayide.TechFak.Uni-Bielefeld.DE> AMU_NFS_PROTOCOL_HEADER: <nfs/nfs.h> needs it for NFSERR_* definitions - * aux/aclocal: adapt for local perl path and $prefix - * conf/nfs_prot/nfs_prot_ultrix.h: new file - * aux/macros/check_nfs_prot_headers.m4: use nfs_prot_ultrix.h + * aux/macros/check_nfs_prot_headers.m4: use nfs_prot_ultrix.h * aux/macros/mount_headers.m4, aux/macros/try_compile_nfs.m4, aux/macros/try_compile_rpc.m4, include/am_defs.h: avoid multiple @@ -2520,6 +3320,1810 @@ Mon Jun 30 20:49:13 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> Sun Jun 29 16:22:11 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> * rudimentary amd.conf file support included. You may even + override things like os=sos5, to get "backwards" compatibility with + upl102. + +Sat Jun 28 13:35:02 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/conf.c: new file to process amd.conf file. + + * amd/get_args.c (get_args): new options -H to print help. + + * moved enable_default_selectors to be amd.conf controlled, and + not compiler controlled. + + * amd/get_args.c (get_args): new options -F <conf-file> to parse an + amd configuration file. + +Wed Jun 25 23:15:42 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * converted all files that used strcmp() == 0 or != 0 to using + the STREQ() macro. + +Mon Jun 23 22:31:14 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * aux/macros/check_lib_funcs.m4: new M4 macro that can be used to + search for any number of functions in any given library. + +Mon Jun 23 01:04:23 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/mapc.c: Included patch from Leif Johansson + <leifj@matematik.su.se> to ensure that systems without an RE + library can compile. + + * libamu/mount_fs.c (mount_fs): Included patch from Andreas + Stolcke <stolcke@speech.sri.com>, to ensure that mount options on + table are properly delimited by a comma. + + * amd/ops_nfs.c (mount_nfs_fh): Included patch from Andreas + Stolcke <stolcke@speech.sri.com>, to allow users to override the + proto= and vers= mount options. + +Sun Jun 22 01:00:11 1997 Eric Dana (edana@ncr2.bgs.com) + + * conf/nfs_prot/nfs_prot_svr4.h: port completed to + i486-ncr-sysv4.3.03. Assorted source cleanups done. + + * include/am_defs.h, aux/macros/mount_headers.m4: don't include + mnttab.h if sys/mnttab.h was already included, because on ncr2, + they contain conflicting entries for struct mnttab. + +Sat Jun 21 23:52:15 1997 Eric Dana (edana@ncr2.bgs.com) + + * aux/macros/check_nfs_prot_headers.m4: added support for ncr2. + +Fri Jun 20 06:14:17 1997 Erez Zadok <ezk> + + * amd/*.c: lots of 64-bit "ugly" ports like casts to long ints. + + * aux/macros/struct_nfs_fh.m4: check for "struct nfssvcfh" because + on DU-4.0 it is better than the next one to be picked (nfsv2fh_t). + +Wed Jun 18 18:59:49 1997 Erez Zadok <ezk@defiant.soscorp.com> + + * aux/macros/struct_nfs_fh.m4 (AC_TRY_COMPILE_NFS): check for + nfsv2fh_t before fhandle_t becasue on bsdi2.1 the former is + better. + +Tue Jun 10 17:06:58 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/rpc_fwd.c (fwd_packet): TLI bug fix. if fwdto socket is + NULL, set the maxlen and len fields in netbuf to zero. + +Wed May 28 22:52:28 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/fix-amd-map.in (name): replace all matching patterns on + line. + +Sun May 25 19:33:41 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a5 *** + ******************************************************************* + +Sun May 25 13:37:24 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/amq_subr.c (amqproc_getvers_1_svc): amq's RPC service + procedure now returns the full string that amd -v returns. + + * amd/get_args.c (get_version_string): new function to return + complete version/info string so it could be used more flexibly. + + * amd/am_ops.c (ops_showamfstypes, ops_showfstypes): put the list + of Fs types into a string buffer, rather than a FILE*. + + * amd/mapc.c (mapc_showtypes): put the list of map types into a + string buffer, rather than a FILE*. + +Sun May 25 01:25:36 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/get_args.c (get_args): amd -v also prints user who built + amd, hostname built on, and date of configuration. + +Sat May 24 13:40:50 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/lostaltmail.conf-sample: sample lostaltmail + configuration file. + + * scripts/lostaltmail.in: new script lostaltmail used to redeliver + "lost" mail that hlfsd redirected to a temp location because the + primary home file system of the user was full. + + * scripts/amd2sun.in: new script amd2sun. Used to convert Sub + automount maps to amd maps. + + * scripts/ctl-hlfsd.in: new script ctl-hlfsd. Used to start, + stop, or restart hlfsd. + + * scripts/expn.1: man page for expn command. + + * scripts/ctl-amd.in: new script ctl-amd. Used to start, stop, or + restart amd. + + * scripts/expn.in: new script expn. Actually taken from David + Muir Sharnoff <muir@idiom.com>. Used by hlfsd's mail re-delivery + script. + + * scripts/wait4amd.in: new script wait4amd added. Waits for amd + to come up on a host, and then runs a command (rsh $hostname by + default). + + * scripts/Makefile.am: new directory now holds all shell/perl + scripts that belong to am-utils. + + * conf/mount/mount_linux.c (parse_opts): new parser for + linux-specific mounts. Handles fs-type specific mount-options + correctly. Currently implemented: msdos, iso9660. + + * amd/ops_pcfs.c (pcfs_ops): don't timeout cdfs mounts by default + (fix for linux). + + * amd/ops_cdfs.c (cdfs_ops): don't timeout cdfs mounts by default + (fix for linux). + + * amd/mapc.c (make_entry_chain): fixed bug that resulted in amd + core dumps upon "ls" of a mount point; an invalid pointer was + being returned and dereferenced. + + * port to Linux sparc working! + + * hlfsd/homedir.c (hlfsd_diskspace): close file descriptor if + failed to write test file, or else the fd will leak. + +Sun May 18 00:42:41 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/info_hesiod.c (hs_strip_our_domain): use strcasecmp() + instead of strcmp(). + + * Port to Digital Unix 4.0 (OSF) done. + + * hlfsd/hlfsd.c: renamed dirname to dir_name to avoid conflicts + with dirname() function in <string.h> on OSF systems. + + * fsinfo/fsi_util.c (set_ether_if): take out extern definition of + inet_addr(). It should come from <arpa/inet.h> instead. + + * conf/mtab/mtab_osf.c: fixed macros and added NFS V3 specs. + + * include/am_utils.h: renamed FIRST/LAST to AM_FIRST/AM_LAST to + avoid conflicts with DU 4.0 system header. + +Thu May 15 22:49:12 1997 Erez Zadok <ezk@subzero.cs.columbia.edu> + + * libamu/mount_fs.c (mount_fs): pass along NFS version so I can + determine if to include additional options in the mount table file + entry (such as proto=tcp, and vers=3). + +Thu May 15 00:42:12 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * libamu/mount_fs.c (mount_fs): include NFS version number in the + mount table options, as well as proto={tcp,udp}. + +Wed May 14 14:30:19 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * NFS V3 code ported to most other systems, so it compiles for V2 + and V3 NFS systems. + + * NFS VERSION 3 support, first pass. Working for Solaris and + using TCP. + +Sun May 11 01:14:29 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amq/amq.c: many newline characters were missing from various + stderr printfs. + +Sat May 10 13:09:06 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_sunos5.h: protocol defintions for + Solaris, which include NFS V3 support. + + * conf/nfs_prot/nfs_prot_default.h: default NFS protocol headers. + *** Released am-utils-6.0a15 *** + * conf/transp/transp_{tli,sockets}.c (get_mount_client): use NFS + protocol version while getting a mount client. + + * amd/ops_nfs.c (mount_nfs_fh): set the mount types, mnttab types, + file handle size, and proper file handle based on the correct NFS + version number. + browsable_dirs=full, which will print *all* entries (other than + * conf/mount/mount_svr4.c (mount_svr4): support NFS3 mounts under + Solaris and other SVR4 systems. + + * amd/ops_nfs.c: store NFS file handle version and version + specific handle in struct fh_cache. + (got_nfs_fh): pick the correct RPC reply based on the NFS version + of the server. + (prime_nfs_fhandle_cache): figure out the right NFS file handle + for a node, but now include NFS protocol version information. + (call_mountd): set the correct version for the mount protocol, + based on the NFS protocol version. + (nfs_init): use the NFS protocol generic structure + am_nfs_handle_t. + to 1500. + * include/am_utils.h: new structure am_nfs_handle_t to contain all + possible versions of NFS file handles. + * doc/am-utils.texi: fixed reversed documentation for NFS mount + * amd/srvr_nfs.c (start_ping): ping program performs NFS version + specific pings. + (recompute_portmap): figure out the correct portmap version mount. + (nfs_keepalive): call start_ping() with the correct NFS version. + (find_nfs_srvr): if mount option "vers=" is given, use it. Get + the NFS server version and verify that it is up. + + * conf/transp/transp_{tli,sockets}.c (get_nfs_version): a new + function to find the best NFS version for a particular host. + installing html files. Another new target "alldocs" is just for + * libamu/amu.h: determine what is the highest version of NFS we + should try. + + * include/am_utils.h (NFS_VERSION3): added definition for NFS V3 + protocol number. + Added field fs_version to struct fserver, so we can now store the + server protocol version. + facility in the log_file option. +Fri May 9 01:09:45 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + * libamu/xutil.c (get_syslog_facility): allow users to specify the + * aux/macros/check_field.m4 (AC_MOUNT_HEADERS): map '.' (dot) into + underscores too, so I can test for sub-fields. + will use the default LOG_DAEMON facility. + * libamu/wire.c: use test that checks for sub-fields of struct + ifreq. +Thu Jan 8 04:05:10 1998 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> +Sat May 6 10:20:17 2000 Erez Zadok <ezk@glory.soscorp.com> + (intel). + * port to BSD/OS 3.0 completed! Many xdr_ functions were broken + into smaller files. M4 macros fixed to test for existence of + file systems using getvfsbyname(). + before appending to it, on systems with two or more network + * amd/sched.c (sigchld): signal handler must waitpid() for all + possible children. + the mntent for cachefs. + * hlfsd/homedir.c: signal handler must waitpid() for all possible + children. + const for both arguments. + * aux/macros/check_restartable_signals.m4: new macro to determine + if need to reinstall signal handlers per OS is better than trying + to figure these out based on system macros. + +Fri May 5 19:23:28 2000 Erez Zadok <ezk@glory.soscorp.com> + * amq/pawd.c (cluster_server): don't use getccent() if the extern + * amd/ops_nfs.c (mount_nfs_fh): set nfs_args_t version number. + <cluster.h> and struct cct_entry do not exist. + * amd/ops_afs.c (mount_toplvl): set nfs_args_t version number. + hpux systems don't have it (hpux 10.20). + * amd/ops_nfs.c (mount_nfs_fh): process nfs mount option resvport + (must be supplied for bsdi 3.0) + + * libamu/wire.c: use HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR (and + associated new macro) for determining the right way to compute the + size of the interface structure. + for new amq options -T/-U. +Fri Apr 11 15:56:13 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/configure.in: need to include libc before libnsl if + get_myaddress() is available because on irix libnsl has a buggy + get_myaddress(). + + * include/am_defs.h: make sure REINSTATE_SIGNAL_HANDLER is defined + on Irix 6 (an SVR4 variant) + * amq/pawd.c: a new program, Print Automounter Working Directory, +Thu Mar 27 02:28:40 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * aux/macros/localconfig.m4: trivial support for am-utils + ******************************************************************* + *** Released am-utils-6.0a4 *** + ******************************************************************* + wish in a file called localconfig.h, located in the top build +Wed Mar 26 21:15:36 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + * doc/am-utils.texi (Caching Filesystem): updated documents for + * amd/amq_subr.c (ok_security): turned off insecure code unless + user explicitly runs configure --enable-amq-mount. + * amd/ops_cachefs.c: initial cachefs support, for solaris. + * hlfsd/hlfsd.c (main): use new protoypes dor create_nfs_service(). + + * amd/nfs_start.c (mount_automounter): use code that separately + creates the NFS and the amq service. Register tcp and udp + services for amd. + cachefs file systems. + * conf/transp/transp_*.c (create_amq_service): new function to + separately create the amq service for amd. Simplified prototypes + for create_nfs_service(). + mnttab type is. +Wed Mar 19 20:40:56 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> +Mon Jan 5 23:22:49 1998 Erez Zadok <ezk@lorien.cs.columbia.edu> + ******************************************************************* + *** Released am-utils-6.0a3 *** + ******************************************************************* + +Wed Mar 19 17:49:18 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * amd/ops_nfsl.c (nfsl_ffserver, nfsl_match): also check if the + * new port: rs6000-ibm-aix3.2.5 and rs6000-ibm-aix4.1.5.0. Lots + of small changes to support these two. + type:=nfs. +Wed Mar 19 14:33:30 1997 Erez Zadok <ezk@grande.cs.columbia.edu> + * updated all source files to add 1998 as a copyright year. + * conf/umount/umount_default.c (umount_fs): bug: unlock_mntlist() + should run if MOUNT_TABLE_ON_FILE, not otherwise. + like type:=linkx if the pathname denoted by $fs exists, and like +Mon Mar 17 22:02:43 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * hlfsd/hlfsd.c (main): fill in fhsize field if exists + (freebsd-2.2). + + * amd/ops_{nfs,afs}.c (mount_toplvl): fill in fhsize field if + exists (freebsd-2.2). + +Sat Mar 15 19:37:48 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + * hlfsd/homedir.c (plt_init): make function exported, to save on + * new port: i386-unknown-freebsd2.2. FreeBSD 2.2 and higher + changed the filehandle type in struct nfs_args from nfsv2fh_t to + u_char. + instead. +Sat Mar 14 10:11:03 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> +Thu Jan 1 00:15:58 1998 Erez Zadok <ezk@chestnut.mcl.cs.columbia.edu> + * SHARED LIBRARIES: too many change to list individually. Now, + libamu can be built as a shared library, and other programs link + with it. + +Tue Mar 11 22:24:09 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * aux/macros/opt_shared.m4: new macro for setting options for + building shared am-utils libraries. + * amd/ops_afs.c (mount_toplvl): Bug fix. Don't try to free() an +Sun Mar 9 19:17:46 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * ALL SOURCES: change every direct call to free() to xfree(), so + * fixmount/fixrmtab: cleaned up the script. + call dxfree(), which will print the file name and line number + * fixmount/Makefile.am (EXTRA_DIST): adde $(sbin_SCRIPTS) so that + fixrmtab gets distributed too. + + * conf/nfs_prot/nfs_prot_bsdi2.h: added support for MOUNTPROC_DUMP. + Added extern for xdr_mountlist(). +Tue Dec 23 04:24:28 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * aux/configure.in: trimmed down many tests for MNT2_GEN_OPT, + MNT2_NFS_OPT, and MNTTAB_OPT that were not referenced anywhere in + the sources. + +Sat Mar 8 00:23:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + calloc(). + * fixmount/hlfsd ported to bsd44, hpux, and linux systems. + + * aux/macros/check_fixmount_style.m4: add check for bsd44 systems. + malloc(). + * conf/fixmount/fixmount_default.c: use lockf() if flock() is + unavailable. + zero its bytes. + * include/am_defs.h: include <string.h> even if don't have + STDC_HEADERS defined (sunos4). + (seteuid): define seteuid() to be setresuid() for systems that + have but not the other (hpux). + * amq/amq.c: amq does not need its own definition of xfree(). + * aux/macros/check_extern.m4: test should include <strings.h>. + look for function malloc_verify() in libmapmalloc.a, and function +Tue Mar 4 17:16:52 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * lib/xutil.c (debug_option): moved from amd/getargs.c to this + more proper file. + uordbytes, because it does not always exist. Rather, compute it + * include/am_utils.h: put in structure for debug options, for all + progams to use. + used when debugging memory references. + * amd/get_args.c: moved structure for debug options out. +Mon Dec 22 03:01:30 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> +Sun Mar 2 00:13:07 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + Otherwise browsable_dirs fails on OpenBSD 2.2. + * ported fixmount. + * amd/mntfs.c (uninit_mntfs): bug fix. Moved freeing of + * lib/ualarm.c: replacement function for systems that don't have a + ualarm(). +Sat Dec 20 00:51:21 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * ported fsinfo. + * amd/ops_host.c (host_umounted): don't use clnt_spcreateerror() +Sun Mar 1 10:23:34 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + * include/am_defs.h: add missing extern definition for free(). + * ported mk-amd-map. + + * buildall: added -K option to buildall, to run mkconf. + optional function. +Fri Feb 28 01:10:25 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + if they exist. + ******************************************************************* + *** Released am-utils-6.0a2 *** + ******************************************************************* + * aux/configure.in: check for missing functions clnt_create and +Thu Feb 27 13:58:59 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * all *.[hcyl] files: add copyright line. + * Makefile.am: updates for new sunos3 files distributed. + * aux/macros/check_mount_type.m4: test for mount type for + linux-like systems, by checking for loadable or statically linked + kernel filesystem modules. + * conf/fh_dref/fh_dref_sunos3.h: new file. + * aux/macros/check_mnttab_type.m4: test for mount table entry + for linux-like systems, by checking for loadable or statically + linked kernel filesystem modules. + * aux/macros/check_nfs_fh_dref.m4: added sunos3 case. + * aux/configure.in: pcfs filesystems can use vfat type (linux) + * doc/am-utils.texi (wire Selector Variable): updated manual for + * aux/macros/check_fs_mntent.m4: test for filesystem existence for + linux-like systems, by checking for loadable or statically linked + kernel filesystem modules. + in_network() function. + * conf/trap/trap_hpux.h: ugly hack added because of stupide HPUX + 9.0 header files. This should be removed when HPUX 9.0 is deemed + defunct. + functions. Converted wire, network, and netnumber all to use the + * aux/acconfig.h: set an undefined variable for having an extern + to clnt_sperrno(). + against all networks, not just primary. + * include/am_defs.h: define extern for clnt_sperrno() if needed. + * conf/nfs_prot/nfs_prot_linux.h: add special definitions for + * aux/configure.in: test for extern clnt_sperrno(). + <rpc/des_auth.h> because it is incomplete on the same systems. + * aux/macros/check_nfs_fh_dref.m4: HPUX's NFS fhandle dref is + similar to irix. + * hlfsd/homedir.c (table_add): cast uid field to int, for + * aux/macros/check_mount_style.m4: use mount helper on HPUX. + * include/am_defs.h: more coflicts with redhat alpha linux + * aux/macros/check_mtype_type.m4: hpux's mount type is a char*, + not integer (but may be mapped to one later). + * aux/macros/{mount_headers,try_compile_anyfs,try_compile_nfs}.m4: + * conf/mount/mount_hpux.c (mount_hpux): HPUX has confusing header + files. They have mount(2) and vfsmount(2) which don't take same + arguments, and they have string mount types MNTTYPE_* as well as + integer types MOUNT_*. So I need this new mount function to map + from string types to integer types for the vfsmount() function. + redhat alpha linux. + * conf/trap/trap_hpux.h (MOUNT_TRAP): instead of calling + vfsmount(), call mount_hpux(). + the new "!" (negated) nomadic functions. +Thu Feb 27 03:34:14 1997 Erez "HWank1" Zadok <ezk@okeeffe.cs.columbia.edu> + rather than saying that any ARG is on a local network. + * lib/mount_fs.c (mnt_flags): make sure SYNC option is on only if + both MNTTAB_OPT_SYNC and MNT2_GEN_OPT_SYNC are defined. + +Thu Feb 27 00:26:00 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> +Thu Dec 18 20:57:19 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * conf/nfs_prot/nfs_prot_hpux.h: NFS protocol definitions for + hpux. + + * include/am_defs.h: no need to include rpc/auth.h or rpc/clnt.h. + Finally, it looks as if OpenBSD 2.2's NFS 3 implementation may be + * aux/configure.in: no need to test for rpc/auth.h and rpc/clnt.h. + wait until they get it working in their version of the automounter + * buildall: added ability to configure using other shells than + /bin/sh, on those systems where /bin/sh is buggy or limited + (HPUX). + maxgrp. + * aux/macros/struct_nfs_fh.m4: reinstated the macro but have it + defined am_nfs_fh, and also test for plain typedef "nfs_fh". + "maxgrps". Added test for mount table entry "maxgroups". + * aux/acconfig.h: #undef am_nfs_fh, which is being defined by a + reinstated macro. + * libamu/mount_fs.c (compute_nfs_args): perform more careful tests + * aux/configure.in: check for <nfs/export.h> + + * include/am_defs.h: include <nfs/export.h> (HPUX) if exists. + including 9.x, should use "ignore" as the mount type to hide from + * aux/macros/try_compile_nfs.m4: include <nfs/export.h> (HPUX) if + exists. + + * aux/macros/mount_headers.m4 (define): removed some non-working + (on HPUX) code that attempts to recreate the fhandle_t rather than + load it up from system headers. Also added some NFS protocol + header inclusion. include <nfs/export.h> (HPUX) if exists. + every where in the sources. +Wed Feb 26 00:32:35 1997 Erez "HWank1" Zadok <ezk@okeeffe.cs.columbia.edu> + + * aux/macros/mount_headers.m4 (define): Use M4 changequote to + ensure [] brackets are correctly used. + useful for detecting internal flags and options, as well as the + * aux/macros/expand_cpp_{string,hex,int}.m4: encapsulate + multi-line M4 inclusions in []. + after /etc and before /etc/local. +Tue Feb 25 22:19:44 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + * aux/configure.in, libamu/Makefile.am: added support for linking + * conf/mtab/mtab_bsd.c (mnt_dup): use statfs field f_fstypename if + it exists. + + * aux/acconfig.h: HAVE_FIELD_STRUCT_STATFS_F_FSTYPENAME, new + config.h macro for field f_fstypename of struct statfs. + needed. + * aux/configure.in: testing for field f_fstypename field of struct + statfs (NetBSD). + netbsd). + * aux/acconfig.h: moved all of the "static" definitions out to a + fixed file called include/am_defs.h. Added to all */Makefile.am + files a dependency on am_defs.h. Created am_defs.h of course, and + then added #include <amd_defs.h> to all of the source and header + files that required it. + for NetBSD-1.3_BETA and similarly for OpenBSD. +Mon Feb 24 01:27:02 1997 Erez Zadok <ezk@defiant.soscorp.com> + * conf/nfs_prot/nfs_prot_netbsd1_3.h: new header for the slight + * aux/acconfig.h: two more externals for xdr functions that may be + implemented by libamu. + mktemp(). + * conf/nfs_prot/nfs_prot_bsdi2.h: added missing RPC and XDR + definitions. + * amd/ops_nfs.c (mount_nfs_fh): Systems that include the mount +Sun Feb 23 15:25:26 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + "nfs3", but to "nfs" and then they set "vers=3". Setting it to + * buildall (default): added -D option for turning on even stricker + developer options. + systems, set it to "nfs". + * */Makefile.am: make sure @AMU_NFS_PROT_HEADERS@ is used to + determine dependencies on optional NFS protocol headers. + + * aux/acconfig.h: define and use HAVE_NFS_PROT_HEADERS as needed. + + * aux/macros/check_nfs_prot_header.m4: new test to determine what + NFS protocol headers to use. + system mount types under nextstep for mount(2). + * conf/nfs_prot/nfs_prot_{irix6,sunos4,bsdi2}.h: new headers to + complete missing system headers for NFS protocol definitions. + integer and string types for file system mount types in mount(2), +Sun Feb 16 15:58:42 1997 Erez "HWank1" Zadok <ezk@vir.cs.columbia.edu> + (EPERM) instead of 0 (OK). Fixes m68k-next-nextstep3 which now + * amd/ops_nfs.c (mount_nfs_fh): encapsulated some more code in + #ifdef's as needed. + + * amd/ops_afs.c (mount_toplvl): make sure TIMEO/RETRANS code is + suitable #ifdef'ed. + + * include/am_compat.h: a couple more mnttab options + (timeo/retrans) setting just in case. + + * amd/autil.c (host_normalize): make sure hostent->h_name is + passed a non-const char *. + + * conf/mount/mount_linux.c (mount_linux): cleaned up a block of code. + inclusion of <nfs/nfs_mount.h> which only affects nextstep3, on + * {lib,amq,amd}/*.c (many functions): cast xdr_entry to + XDRPROC_T_TYPE. + * libamu/mount_fs.c (mnt_flags): support either nfs or generic + * lib/nfs_prot_svc.c (nfs_program_2): cast xdr_entry to + XDRPROC_T_TYPE. + + * lib/nfs_prot_xdr.c (xdr_entry): cast xdr_entry to + XDRPROC_T_TYPE. + + * lib/wire.c (getwire): Make sure safe assignment from const to + none is done. + file in the am-utils' home page, as well as a few other useful +Sat Feb 15 19:38:51 1997 Erez "HWank1" Zadok <ezk@vir.cs.columbia.edu> +Mon Nov 17 05:22:56 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * aux/macros/expand_cpp_int.m4: new macro for expanding integers. + ******************************************************************* + * aux/configure.in: added linux/fs.h support in configure and + several M4 macros. + + * conf/mount/mount_linux.c (mount_linux): use macro instead of + "ugly" fixed hex number for mount() arguments. + ports. +Sat Feb 15 02:09:47 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * amd/info_hesiod.c: removed macro HAVE_HS_ZONE_TRANSFER and + turned all of its code always on. That code always seems to + compile, as long as you have hesiod and libresolv. + * scripts/amd.conf.5: corrected info for -o/-O options. + * amd/mapc.c: removed macro HAVE_HS_ZONE_TRANSFER and turned all + of its code always on. + OS name. + * aux/configure.in: removed superfluous test for hs_zone_transfer + function (will never find it because it is an amd-internal + function). + -o and -O options. + * amd/mapc.c (maptypes): must used correct new name for am-utils' + hesiod initialization function: hesiod_am_init. + + * amd/info_hesiod.c (hesiod_am_init): renamed hesiod_init to + hesiod_am_init so as not to conflict with libhesiod's + hesiod_init() function. + variable. + * aux/configure.in: added test and explicit inclusion of + libresolv.a for later resolution of library references with + libhesiod. + <metcalf@cag.lcs.mit.edu> to correctly set the nfs_prot headers + * aux/macros/opt_cppflags.m4: new file. configure/compile C + preprocessor flags. + * doc/am-utils.texi (Distrib): typo in the subscription + * aux/macros/opt_libs.m4: new file. configure/compile library + flags. + <vogel@physik-rzu.unizh.ch>. + * Makefile.am (EXTRA_DIST_AUX): include two new macros + opt_cppflags.m4 and opt_libs.m4. +1997-11-15 Erez Zadok <ezk@amtrak.cs.columbia.edu> + * aux/configure.in: test for libhesiod needs to additional + libresolv to link completely. Additional configuration time + options added for setting initial CPPFLAGS and LIBS. + +Tue Feb 10 02:15:40 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + * NFS3 works on powerpc-ibm-aix4.2.1.0. + + *** Released am-utils-6.0a1 *** + static. Some compilers (gcc from egcs on aix 4.2.1) corrupt the + stack of an automatic variable when pointer to it is passed around +Thu Feb 6 02:55:19 1997 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/info_ndbm.c (ndbm_search,ndbm_init): fixed the code so that + it works on freebsd, where they map dbm_pagfno a non-existing + macro on purpose, to force you to port the code to Berkeley DB. + * libamu/xutil.c (real_plog): syslog like behavior for normal +Fri Jan 31 01:35:09 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * amd/ops_afs.c (mount_toplvl): added a sleep(1) right before the + actual mount_toplvl, to avoid some possible race conditions. + +Thu Jan 30 02:31:49 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * amd/rpc_fwd.c: removed all TLI (HAVE_T_OPEN) code. + +Wed Jan 29 18:25:07 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * lib/wire.c (getwire): removed HAVE_T_OPEN (TLI code) + passed to it before. So now I have to dereference the pointer + * amd/amd.c (main): fix local address using htonl(). Free up + buffers allocated by netdir_*() functions. + +Wed Jan 22 23:53:24 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * amd/fix-amd-map.in: new script that will convert old-style amd + maps to new one. + compute_nfs_args() and compute_automounter_nfs_args() functions. +Tue Jan 21 01:18:16 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + and cleaner compute_nfs_args() and compute_automounter_nfs_args() + * FIRST AMD IN AM-UTILS FINALLY WORKS (mounts itself as toplvl, + and replies back to simple nfs/link type mount queries). + relates for struct nfs_args. A new function sets the numerous + * conf/mtab/mtab_svr4.c: reorganized the code in this file to be + easier to read, and fixed a few bugs with un/setting the lock file + descriptor. + libamu. This saves on overall size of code. +Wed Jan 8 15:27:49 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + mounting an automounter's mount point. Used by hlfsd and amd. + * amd/sched.c: removed HAS_SVR3_SIGNALS code to handle older + signals in Svr3 systems. Only stellix ever used this. + * amq/amq.c (get_secure_amd_client): don't print any more + * amd/rpc_fwd.c (fwd_reply): removed all code that was triggered + by DYNAMIC_BUFFERS, since it was not in use. + under DEBUG only. +Tue Jan 7 00:45:59 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * amd/opts.c (eval_opts): removed AMD_COMPAT code. Amd no longer + takes '=' sign as old selector. Fix your maps. + (deslashify): removed APOLLO code that treated two '//' as one. + for file systems based on physical media (disk, cdrom, floppy) to +Sun Jan 5 01:25:09 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + autoconf searches for all these types of mount table entries for a + * amd/ops_nfsx.c (nfsx_init): removed HARD_NFSX_ERRORS, code which + was not used. It made any submount error fail the whole group. + the actual name found! Same for ufs, cdfs, pcfs, tmpfs, lofs, + * amd/ops_nfs.c (make_nfs_auth): removed code dependent on + HAS_NFS_QUALIFIED_NAMES. + (mount_nfs_fh): removed macro for NFS_ARGS_NEEDS_PATH, assuming it + is never on. So code that was triggered by #ifndef + NFS_ARGS_NEEDS_PATH (osf1, aix3, and bsd44 variants) may have to + be fixed later. + Removed all ULTRIX_HACK code. Ultrix is DEAD! + removed all PRESET_AC code, which was only on for Linux to preset + the attribute cache values (otherwise they default to zero). + (nfs_umounted): revobed KICK_KERNEL code (IRIX systems). Will + have to fixed up later. + (mount_nfs_fh): removed code that was never included, which + attempted to set the port on which amd's nfs mounts on. This + isn't supported by the ping algorithm yet. In any case, it is all + done in nfs_init(). + + * amd/srvr_nfs.c (find_nfs_srvr), amd/ops_nfs.c (mount_nfs_fh): + removed HAS_TCP_NFS code. The whole use of NFS V.3 with TCP or + specially hacked NFS V.2 that uses TCP (BSD 4.4 variants) will + have to be addressed later. +Sun Oct 26 19:32:57 1997 Erez Zadok <ezk@defiant.soscorp.com> + * amd/nfs_subr.c (nfsproc_getattr_2): removed all code dependent + on PRECISE_SYMLINKS. + This works better on bsdi2 and bsdi3, because their portmapper + * amd/mapc.c (mapc_meta_search): removed code that depended on + HAS_DEPOT. It is known buggy code. The whole DEPOT support needs + to be rethought. + (mapc_add_kv): ported code to use standard regular expression + (regexp) library. + insecure). + * amd/{map.c,ops_sfs.c,ops_ufs.c}: removed all code dependent on + FLUSH_KERNEL_NAME_CACHE and the macro itself. + *** Released am-utils-6.0a13 *** +Sat Jan 4 15:46:58 1997 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> +Fri Oct 24 05:04:37 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * amd/map.c (exported_ap_alloc): removed all code triggered by + SHRINK_EXPORTED_AP and the macro itself. + struct datum typedef. + * amd/info_nis.c: removed HAS_NIS_RELOAD macro, and left the code + in all the time. Assuming that there is always NIS realod + available. + (yp_all_fixed): removed code for BROKEN_YP_ALL. If your yp_all() + function is broken such that it does not release filedescriptors + it created, then you are hosed. Get a fix for yp_all from your + vendor or switch operating systems. + +Tue Dec 31 15:34:36 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + gid_t. + * amd/info_hesiod.c: renamed macro HAS_HESIOD_RELOAD to + HAVE_HS_ZONE_TRANSFER. + * conf/transp/transp_tli.c (amu_clnt_create_best_vers): don't use +Mon Dec 30 17:33:23 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + + * amd/{nfs,host}_ops.cremoved INFORM_MOUNTD macro, so its code is + always included. We should always try to inform the remove mount + daemon of mounts we performed. If we want an option for this, it + should be a run-time option. + + * amd/host_ops.c: removed all that optionally did not make the + directory mount points for amd. + + * HOST_EXEC code removed from everywhere. There is no indication + that it was used anywhere. If it needs to be used, then a + run-time switch should control it. + +Thu Dec 26 00:06:52 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + passwdfile option. If hlfsd is started with -P passwdfile, then + * amd/*_ops.c: removed all references to mntent_t's fields + mnt_freq and mnt_passno, since they are no longe rused (and never + have been). + read and checked. All the rest are ignored. No NIS/netgroup + * amd/am_ops.c: removed function sunos4_match, which was off + anyway. This was one of the places where an '=' sign was allowed + as an assignment operator (which is now ':='). + + * amd/afs_ops.c (afs_bgmount): removed SUNOS4_COMPAT code which + was off anyway. This was one of the places where an '=' sign was + allowed as an assignment operator (which is now ':='). + -h is invoked. +Tue Dec 24 01:53:52 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> +Wed Oct 22 00:16:39 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + * amq/amq.c: ported to am-utils. Working. + + * conf/mount/mount_svr4.c (mount_svr4): changed mount type on svr4 + to be string, as it should be (rather than a string mapped to int + and back mapped to string). + which returns TRUE if 'arg' is any one of this host's networks. +Sun Dec 22 13:26:05 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + all networks names and numbers in the order of the interface (not + * lib/mount_fs.c (mount_fs): removed MNTINFO_PREF code. +Mon Oct 20 01:59:25 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + * lib/umount_fs.c: split this into three files: default, osf, and + bsd44, that are in conf/umount/umount_*.c. + * aux/configure.in: don't add ops_ufs.o on AIX twice. My code +Thu Dec 19 17:33:46 1996 Erez "HWank1" Zadok <ezk@lorien.cs.columbia.edu> + * doc/Makefile.am (EXTRA_DIST): include am-utils.dvi and + * aux/configure.in, aux/aclocal.m4, aux/acconfig.h: added new + macro to automatically figure out if an external definition for + sys_errlist[] exists. + (html): generate html documentation for + * lib/xutil.c (xfree): removed "#undef free" because it's not + needed there. Any system that redefines free() needs help. + + * conf/mtab/mtab_file.c (REWRITE_MTAB_IN_PLACE): removed code that + was dependent on REWRITE_MTAB_IN_PLACE. It does not appear to be + in active use anywhere. If added later, it should be a run-time + configuration option. + ypall_callback_fxn_t. The NetBSD team compiles all sources with + * conf/mtab/mtab_mach3.c: removed code that was #ifdef'ed not to + be MOUNT_TABLE_ON_FILE, since mach2 always stores its mount tables + in a file in /etc. + function typedef. + * lib/util.c (str3cat): removed _AIX code. AIX should have a + working realloc, or else find a cleaner solution to this. + (mkdirs): removed SUNOS4_WORKAROUND code. This was to do a sync() + after immediately making directories so that fsck will be able to + fix the filesystem in the event of an immediate crash. This was + because a bug in UFS which is fixed by now. + * libamu/xutil.c (amu_release_controlling_tty): new function to + * lib/hutil.c (domain_strip): removed PARTIAL_DOMAINS triggered + code. Does not appear to be on and used anywhere. + (dofork): removed MACH3 code, b/c mach3 NFS bugs are fixed by now. + and hlfsd/hlfsd.c. Also avoid setpgrp(), because it works on some + * lib/resvport.c: split the binding of reserved ports code to a + separate file. A #define (HAVE_T_OPEN) separates the TLI (SVR4) + from the BSD code. + +Thu Dec 19 02:08:35 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * lib/Makefile.am (amu_LIBADD): includs @LIBOBJS@ now, auto-filled + in by automake and configure, for optional sources that need to be + built as part of libamu.a. + + * aux/aclocal.m4: Make sure AC_CHECK_MOUNT_STYLE adds mountutil.o + to LIBOBJS. + + * lib/memcmp.c (memcmp): new file added to replace a possible bad + implementation of memcmp. + +Wed Dec 18 22:20:23 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * converted the sources to use memset/memmove/memcmp instead of + bzero/bcopy/bcmp. + + * ran all sources through gnu Indent w/ options specified in + aux/amindent. + +Wed Dec 11 22:19:29 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * At this point the initial genration of config.h via autoconf and + some preliminary makefiles via automake is done. I will not begin + modifying sources, so it's a good time to document from here. + +Wed Dec 10 22:19:29 1996 Erez "HWank1" Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Initial ChangeLog Entry *** + ******************************************************************* + + * amd/ops_afs.c (mount_toplvl): turn on 'ignore' option in nfs + mount flags of toplvl mounts. Important esp. for HPUX 10. Now + hpux-10 will mount amd's mounts points as 'ignore' (by df). + + * aux/configure.in: check for NFS mount option 'ignore', useful in + HPUX 10. + +Thu Oct 16 03:28:33 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_hide_mount_type.m4: hpux 10 should use "ignore" + mount type and not NFS, for the amd mount points. + + * conf/transp/transp_tli.c (amu_clnt_create_best_vers): don't log + an RPC timeout as an error, but just an info message. From + Andreas Stolcke <stolcke@speech.sri.com> + + * If the NFS server is down or does not support the portmapper + call (such as certain Novell NFS servers) we mark it as version 2 + and we let the nfs code deal with the case that is down. If when + the server comes back up, it can support NFS V.3 and/or TCP, it + will use those. From christos@deshaw.com (Christos Zoulas). + + * hlfsd/homedir.c (plt_print): various compile time cleanups to + printfs that take a long, but pass an int to print. From + christos@deshaw.com (Christos Zoulas). + + * aux/macros/func_bad_yp_all.m4 (ac_cv_func_yp_all_clean,): new + macro to determine if the OS has a bad yp_all(), based on the host + OS name. So far only irix (all versions) have a bad yp_all, so + they will use am_yp_all() instead (which is slower as it + enumerates manually all of the map's entries). + +Thu Oct 16 03:14:37 1997 Erez Zadok <ezk@subzero.cs.columbia.edu> + + * amd/info_nis.c (am_yp_all): code for a replacement yp_all that + avoids using a file-descriptor leaking yp_all() on some systems + like irix. + +Wed Oct 15 21:52:35 1997 Erez Zadok <ezk> + + * fsinfo/fsinfo.h: avoid redefining yywrap incorrectly on DU-4.x + systems using /usr/bin/flex. + + * amd/conf_tok.l (yywrap): avoid redefining yywrap for systems + that have a modified GNU flex which does define yywrap (DU-4.x). + +Fri Sep 26 14:25:29 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/checkmount/checkmount_bsd44.c: include prototype. + +Fri Sep 26 01:26:24 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a12 *** + ******************************************************************* + +Fri Sep 26 00:13:48 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_irix6.h: completely turn off all autofs + code in irix6 until it can be tested correctly + + * conf/transp/transp_tli.c (amu_clnt_create_best_vers): time out + on clnt_create for 3 seconds, rather than wait for the much longer + default. + + * conf/nfs_prot/nfs_prot_aix4_2.h: port to powerpc-ibm-aix4.2.1.0. + Includes NFS3, untested. + +Thu Sep 25 11:03:11 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/ops_pcfs.c (mount_pcfs): fill in uid/gid fields of + pcfs_args_t if they exist. + + * amd/ops_cdfs.c (mount_cdfs): fill in ssector field of + cdfs_args_t if it exists. + + * new minor ports hppa1.1-hp-hpux10.10, hppa1.1-hp-hpux9.05, + hppa1.1-hp-hpux9.07, m68k-hp-hpux9.00, and sparc-sun-sunos4.1.4. + +Wed Sep 24 00:48:05 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * doc/am-utils.texi (wire-test): updated documentation for the new + option. + + * wire-test/wire-test.8: updated man page for new option. + + * wire-test/wire-test.c (main): added a test for various + combinations of NFS proto/vers to a remote/local host. + + * aux/macros/try_compile_anyfs.m4 (AC_TRY_COMPILE): include + <isofs/cd9660/cd9660_mount.h> and <msdosfs/msdosfsmount.h> so that + freebsd will correctly set mount options for pcfs and cdfs. + + * amd/ops_pcfs.c (mount_pcfs): set mask field of pcfs_args to + 0777 (if field exists). + + * aux/macros/try_compile_anyfs.m4 (AC_TRY_COMPILE): include + <msdosfs/msdosfsmount.h> if available. + + * minor new port: rs6000-ibm-aix4.1.4.0. + + * libamu/mount_fs.c (mount_fs): fixed bug that caused HPUX not to + write the "time" field in /etc/mnttab. + + * conf/mtab/mtab_file.c (mnt_dup): fixed typo in macro names for + detecting mnt_time field of mntent_t. + + * libamu/mtab.c (mnt_free): fixed typo in macro names for + detecting mnt_time field of mntent_t. + +Tue Sep 23 15:30:03 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/mtab/mtab_file.c (lock): Use flock() in preference over + fcntl() to lock the mtab file. + +Mon Sep 22 23:04:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/transp/transp_sockets.c (get_nfs_version): define + the try_again goto label only for NFS3. + (pmap_ping): assume timeout failure of clnt_stat. + + * libamu/xdr_func.c (xdr_groupnode, xdr_exportnode): cast to + "groups *". + +Mon Sep 22 20:34:33 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * conf/transp/transp_sockets.c (pmap_ping): patch from Dan Riley + <dsr@mail.lns.cornell.edu> to make sure that amd works with more + secure portmappers that do not allow forwarding of RPC messages to + other services. + + * */Makefile.am: all source files should also depend on the new + include/am_xdr_func.h header. + + * include/am_xdr_func.h: new file as part of the code cleanup from + Christos Zoulas <christos@deshaw.com>. + + * Lots of fixes from Christos Zoulas <christos@deshaw.com> that + involved missing prototypes, cleaned up ones, and removal of + unused variables. + + * libamu/xdr_func.c (xdr_mountres3): some code cleanup. A switch + statement with only one case is unclean. + +Mon Sep 22 17:26:38 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/ops_<FOO>fs.c (mount_<FOO>fs): initialize mntent_t fields to + 0 so that all fields are initialized to zero at first. This way + SunOS 4.x and other systems don't get /etc/mtab entries with + random integers for the fsck/freq fields. Patch from Andreas + Stolcke <stolcke@speech.sri.com>. + +Mon Sep 22 00:34:19 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_sunos4.h: include <nfs/nfs_clnt.h> so + that the important definition for HOSTNAMESZ will be found. + + * amd/ops_afs.c (mount_toplvl): limit hostname size to HOSTNAMESZ + (inside the nfs_args structure) if the system uses that macro. + Otherwise systems like SunOS refuse to NFS mount long pathnames + and result in ENAMETOOLONG errno's. + +Wed Sep 17 04:56:11 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * doc/am-utils.texi (Supported Platforms): specify new support for + solaris 2.6, and hlfsd running on 2.5.1 too. + +Wed Sep 17 03:55:02 1997 Erez Zadok <ezk@amsterdam.psl.cs.columbia.edu> + + * conf/mount/mount_svr4.c (mount_svr4): don't attemt an autofs + mount if it is not supported or was turned off. + +Wed Sep 17 03:19:36 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_sunos4.h: fixed so that it will nfs mount + again. Apparently at some previous release SunOS 4 supported was + broken and all nfs mounts resulted in ESTALE. + +Wed Sep 17 00:26:25 1997 Erez Zadok <ezk@amsterdam.psl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_sunos5_6.h: nfs protocol headers for + solaris 2.6. + + * aux/macros/check_nfs_prot_headers.m4: added solaris 2.6 nfs + protocol header selection. + +Sat Sep 13 14:31:51 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/transp/transp_tli.c (amu_clnt_create_best_vers): avoid + infinite loop. + +Sun Sep 7 18:23:23 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a11 *** + ******************************************************************* + +Fri Sep 5 11:55:10 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/amd.c (main): if plock() succeeded, don't try to display + errno message. Patch from Chris Metcalf + <metcalf@catfish.lcs.mit.edu. + +Thu Sep 4 19:17:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * hlfsd/homedir.c (table_add): make sure duplicate passwd entries + are ignored. Only the first entry should ever be used, because + that's how lookup in passwd database works. + + * conf/transp/transp_sockets.c (get_nfs_version): when determining + if a remote host is up or down, use NFS v.2. Fix suggested by + Enami Tsugutomo <enami@cv.sony.co.jp>. + + * conf/transp/transp_tli.c (amu_clnt_create_best_vers): new + function to get the best possible NFS version, but also timeout + faster than normal defaults, so remote hosts which are down can be + detected in a reasonable time. + (get_nfs_version): use the new "best" function. + +Tue Sep 2 00:41:00 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a10 *** + ******************************************************************* + +Mon Sep 1 15:39:51 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/transp/transp_tli.c (get_nfs_version): don't use + clnt_tp_create_timed() on systems that don'e have it (Solaris 2.4 + and earlier). + + * aux/configure.in: test for existence of clnt_tp_create_timed(), + since Solaris 2.4 (and possibly earlier) do not have it. + +Mon Sep 1 15:23:18 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu> + + * amd/ops_autofs.c (autofs_unmount_1_svc): only display rdevid + field if it exists (solaris 2.4's autofs does not have it). + +Mon Sep 1 14:45:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/type_auth_create_gidlist.m4: a new test to determine + the correct type to the 5th argument of authunix_create(). + +Mon Sep 1 03:44:32 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu> + + * libamu/xdr_func.c (xdr_umntrequest): add test for autofs + structure umntrequest, if it has the field rdevid. Seems Solaris + 2.4 and earlier didn't have it. + +Mon Sep 1 01:10:53 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * hlfsd/hlfsd.c (hlfsd_init): moved initialization upwards, so it + can be done before primary process forks. + (main): bug fix: wait a bit to give child a chance to initialize. + Without this, hlfsd got into a busy infinite loop while, never + completing the mount. + + * amd/info_nis.c: patch from Jason Thorpe <thorpej@nas.nasa.gov> + to make amd works when talking to NIS+ servers in NIS + compatibility mode. + +Mon Sep 1 00:46:56 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/mapc.c (MAX_CHAIN): increased maximum chain size to 1024. + +Sun Aug 31 20:20:40 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/conf.c (gopt_fully_qualified_hosts): a new function to + process another new global variable. + + * amd/ops_nfs.c (make_nfs_auth): if a new global variable + fully_qualified_hosts is on, use FQHN in RPC/NFS authentications. + Patch from Chris Metcalf <metcalf@catfish.lcs.mit.edu>. + + * amd/conf.c (process_last_regular_map): If the amd.conf file only + has a [global] section (pretty useless IMHO), do not try to + process a map that does not exist. + + * scripts/amd.conf.5: fixed typos (repeated 'as' word). + + * doc/am-utils.texi: MAJOR DOCUMENTATION REVISION COMPLETED!!! + + * amd/conf.c (reset_cf_map): Bug fix. Reset 'tag' field of cfm + structure, so it does not carry over from map entry to another. + +Sat Aug 30 18:39:21 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/amd.c (main): fixed the meaning of the plock option. A bug + caused it to be reversed. + +Sat Aug 30 15:13:18 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * hlfsd/stubs.c: don't initialize some statics here. They are + better initialized in hlfsd_init_filehandles(). + +Fri Aug 22 14:47:16 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/conf.c (gopt_show_statfs_entries): new function and a global + amd.conf key show_statfs_entries. Defaults to 'no'. If 'yes', + then all maps flagged as browsable will also show a count of the + number of entries (keys) in that map. + + * amd/nfs_subr.c (count_map_entries): new function to count number + of entries in a map. Now used if browsable is turned on in a map, + to return a count of available keys in a given map. + + * hlfsd/stubs.c (eq_fh): use correct memcmp(). BUG fixed! hlfsd + confused the file handles for ".", "..", and the symlink, causing + mess. + + * aux/macros/func_bad_memcmp.m4: new test, based on autoconf 2.12, + but also defines HAVE_BAD_MEMCMP, so I avoid linkage conflicts + with bad memcmp() in libc's (nextstep3). + +Thu Aug 21 17:38:41 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/configure.in: check if autofs_args_t has a field named + addr. Solaris has it for specifying the address of the daemon, + but Irix does not. So how does irix tell the kernel the daemon's + address? I suspect that it is hardcoded to "localhost" using a + "private well-known port" (#define AUTOFS_PORT 2048). + + * conf/nfs_prot/nfs_prot_linux.h: added missing autofs + definitions. + + * README.autofs: new file listing autofs support notes + + * very preliminary autofs code working. Call it pre-alpha + quality. + +Sun Aug 17 02:25:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/conf.c (ropt_mount_type, gopt_mount_type): don't accept + "autofs" if system does not support it. + + * amd/amd.c (main): log am-utils version string (same as amd -v) + at start of run. + + * conf/transp/transp_sockets.c (get_nfs_version): in order to tell + if a remote host is available, try to contact its portmapper and + timeout if no answer is received in 3 seconds. + +Thu Aug 14 16:12:04 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_extern.m4 (pattern): use a simpler pattern for + match for external function definitions. The function could span + multiple lines, so only match the opening parenthesis, not the + closing one too. + + * aux/macros/os_cpp-flags.m4 (ac_cv_os_cppflags,): do NOT turn on + posix mode for nextstep3. It is broken. + + * amd/amd.c (init_global_options): run uname() only if + <sys/utsname.h> and uname(2) exist. + + * amd/rpc_fwd.c (fwd_packet): if remote host is down, the + forwarding socket is null, so declare this an error. + + * include/am_utils.h (AM_ERRNO_HOST_DOWN): find best errno to set + for when a remote host is down. Try, in order, "host down", "host + unreachable", "invalid argument". + + * amd/ops_nfs.c (discard_fh): don't dereference a null pointer + (happens when remote host is down, and fp->fh_fs is NULL). + (prime_nfs_fhandle_cache): ditto, and set fs flags to !FSF_VALID + and FSF_DOWN. + + * amd/sched.c: nobody uses "union wait" any more, or so it + appears, so clean up that code. + + * conf/transp/transp_tli.c (get_nfs_version): if remote host is + down, time it out faster than default (3 seconds). + (get_mount_client): free netconfig entry when done with it. + + * conf/nfs_prot/nfs_prot_nextstep.h: initial (and somewhat ugly) + port to nextstep3 (m68k-next-nextstep3). + + * fsinfo/Makefile.am (LDADD): needs to link with libamu in case + system does not have strdup(). + + * include/am_defs.h: complete external definition for getlogin() + if needed. + + * conf/transp/transp_tli.c (get_nfs_version): no need to keep + static versout variable. + + * amd/rpc_fwd.c (fwd_packet): if fwdto packet is null, remote + server is probably down. Don't use sendto() in that case. + + * buildall (default): run gmake if found, before trying plain + make. GNU make is always preferable. + +Tue Aug 12 21:23:58 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/host_macros.m4: cleanup of os_version and os + overrides. Solaris 2.5.1 for example will come up as solaris2 and + 2.5.1, rather than sunos5 and 5.5.1. Both can be overridden in + the amd.conf file. + +Fri Aug 8 14:37:30 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a9 *** + ******************************************************************* + +Thu Aug 7 00:52:14 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_ncr2.h: new file, for NCR2 + (i486-ncr-sysv4.3.03) headers. Needed to complete missing stuff + from <ndbm.h> and <sys/resource.h>. + + * scripts/amd.conf.5: new map page. + + * amd/info_hesiod.c: define extern for hesiod_resolve, since bsdi3 + does not. + + * amd/amd.8: updated man page. + + * amd/get_args.c (get_args): removed defunct -h option to amd. + + * amq/amq.8: updated man page. + + * amd/info_nisplus.c (nisplus_search): prototype fixes so Sun + SparcCompiler CC won't complain. + + * amd/info_hesiod.c (hesiod_search): small fixes to compile with + hesiod-1.3, as per Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>. + + * aux/macros/opt_ldflags.m4: new option added to configure + --enable-ldflags, to specify -L option for configuring/compiling. + The older one --enable-libs is now to be used only for -l options. + + * amd/ops_nfs.c (mount_nfs_fh): bug fixed. Should initialize + nc_protoname from nfs_proto if available for all TLI systems, not + just those that have NFS V3. + + * amd/info_ldap.c: ldap patches from Leif Johansson + <leifj@matematik.su.se>, adding two new amd.conf ldap variables: + ldap_cache_seconds and ldap_cache_maxmem. + + * hlfsd/hlfsd.c (main): bug fixed. port number must be wrapped in + htons(). + +Sun Aug 3 17:20:05 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/nfs_start.c (mount_automounter): register amd with the rpc + program number that may have been overridden by amd.conf. + + * libamu/xutil.c (set_amd_program_number, get_amd_program_number): + allow storing and retrieving alternate amd program numbers. + + * amd/conf.c (gopt_portmap_program): new function to parse + amd.conf entry portmap_program=1234. + + * amq/amq.c (main): allow specifying an alternate rpc program + number for amd via -P prognum. + + * new amq RPC to get the process id of the running amd. This is + used in ctl-amd to quickly find the pid of the amd that is to be + killed. + + * expanded shared libraries support. Using GNU libtool-1.0, + am-utils now builds shared libraries on many platforms that have + support for it and proper compilers/linkers. See "INSTALL" file + for compatibility chart. + +Thu Jul 31 13:07:23 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * fsinfo/fsi_lex.l: removed code that was in support of very old + versions of flex. No longer needed. + +Tue Jul 29 12:00:13 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/amd.c (init_global_options): find the kernel architecture + from uname() if possible. + +Mon Jul 28 03:53:59 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * new working port: i386-unknown-openbsd2.1 + +Fri Jul 25 03:16:31 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu> + + * working port: sparc-sun-solaris2.4. Had to fix fhandle_t from + structure to actual char[], because the structure was passed to + xdr_fhandle as data and not a pointer. Surprisingly, gcc + -fpcc-struct-return did not help. + + * conf/nfs_prot/nfs_prot_sunos5_4.h: special nfs protocol + definitions for solaris 2.4 have to be different from 2.3, and + different from 2.5. + + * libamu/xdr_fhstatus.c (xdr_fhstatus): minor code cleanup. + +Thu Jul 24 16:22:39 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/mount/mount_svr4.c (mount_svr4): use STREQ to compare mount + types, not ==. Fix from Christos Zoulas <christos@deshaw.com>. + + * mk-amd-map/mk-amd-map.8: man page taken from bsd44. + +Thu Jul 24 00:01:55 1997 Erez Zadok <ezk@moisil.cs.columbia.edu> + + * conf/mount/mount_linux.c: made the nfs error mapping code into a + small function. + +Wed Jul 23 16:11:49 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_linux.h (NFS_ERROR_MAPPING): special + error mappings from errno numbers to NFS errors. From Debian + Linux. + + * scripts/am-eject.in (fs): new script (taken from Debian Linux + folks) to auto-unmount floppy/cd devices before ejecting them. + + * fsinfo/wr_exportfs.c (write_exportfs): from Debian folks, pass + '5' as second arg to show_area_being_processed. I'm not sure why. + + * fsinfo/wr_atab.c (write_atab): from Debian folks, pass '5' as + second arg to show_area_being_processed. I'm not sure why. + + * conf/mount/mount_linux.c (parse_opts): as per Debian Linux, + ensure that you have a buffer in *xopts to strcat onto. + (mount_linux): fixed from Debian folks to ensure that NFS mount + sockets are connected only for kernels prior to 1.3.10 (avoids + hangs for multi-homed hosts). + + * amd/mapc.c (make_entry_chain): from Debian folks: don't skip + over amd map keys that have a prefix, and include the prefix in + the returned readdir(). + + * amd/info_passwd.c (passwd_init, passwd_search): format + enhancements from the Debian Linux folks. They added + - var0:=pw-prefix:=anydir + - var1:=pw-rhost:=dom3.dom2.dom1 + - var2:=pw-user:=user + - var3:=pw-home:=/anydir/dom1/dom2/dom3/user + + * new ports: sparc-sun-solaris2.4 and sparc-sun-sunos4.1.1. + + * amd/ops_afs.c (afs_retry): patches from Debian Linux. If + afs_mount timed out, then explicitly forbid further retries after + the timeout. (afs_bgmount): buf fix from Debian Linux. Timeout + values (17 and 5) were mistakenly swapped. + +Wed Jul 23 15:53:25 1997 Erez Zadok <ezk@felix.psl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_sunos5_3.h: turn off non-existent NFS V.3 + support for Solaris 2.4 (the header files incorrectly define parts + of the NFS V.3 protocol, but the kernel does not support it). + +Wed Jul 23 00:07:12 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/info_hesiod.c: minor cleanup to use hes_init and hesiod_init + for determining if using old or new hesiod libraries, + respectively. + + * amd/ops_nfs.c (mount_nfs_fh): If "noconn" option exists in NFS + V.3 then use non-connected sockets (both TCP and UDP). Otherwise + they cause hangs of mounts from multi-homed hosts when the return + route is not the same as the outgoing route (esp. on NetBSD + 1.2.1). If "conn" option was supplied, then don't turn on the + "noconn" mount option. Otherwise default to "noconn" mount + option. + + * aux/configure.in: better check for systems that need libgdbm and + <ndbm.h> + +Tue Jul 22 04:02:05 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * hlfsd/hlfsd.c (main), amd/ops_afs.c (mount_toplvl): ensure that + mounts are hidden from df(1) on systems that keep mount tables in + kernel, such as osf1. + +Tue Jul 22 02:26:55 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a8 *** + ******************************************************************* + +Mon Jul 21 21:33:19 1997 Erez Zadok <ezk@stone.mcl.cs.columbia.edu> + + * hlfsd/hlfsd.c (main): bug fixed: forgot to set sin_family to + AF_INET when hlfsd mounts itself, thus getting an errno "protocol + family not supported". + +Mon Jul 21 20:46:59 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * verified that amd on NetBSD 1.2.1 (i386) works, but the OS + itself is flaky. + + * verified that amd AIX 3 works w/ the new readdir() code. + +Mon Jul 21 18:59:30 1997 Erez Zadok <ezk@chestnut.mcl.cs.columbia.edu> + + * amd/mapc.c (maptypes): changed the default map caching type for + nis and ndbm maps to "MAPC_ALL", so that all possible entries will + be available to amd for browsable_dirs=yes. + +Mon Jul 21 18:04:16 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/ops_afs.c (afs_readdir, afs_readdir_browsable): split + afs_readdir into a browsable version and a non-browsable one. + Fixed bugs that resulted in an infinite nfs_readdir loop on the + localhost for some operating systems. + +Sat Jul 19 19:38:38 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/ops_afs.c (afs_readdir): fixed up the browsable code to + comply with nfs_readdir specs. It was returning all entries at + once, even if there was not enough space in the RPC packet. Now, + it sends a reasonably sized chunk, and sets static state to resume + it for the next continuation RPC of readdir. + + * amd/conf.c (set_conf_kv): fixed bug that resulted in the first + regular map not getting all of the [global] options defaulted from. + +Fri Jul 18 00:45:12 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amq/amq.c (main): fixed so that portmapper "ping" will only fail + upon an RPC timeout + + * scripts/ctl-{amd,hlfsd}.in (killproc): better method to find the + amd/hlfsd process to kill. + + * amd/ops_afs.c (mount_toplvl), hlfsd/hlfsd.c (main): code to + determine how to avoid df from seeing amd's toplvl mounts. Moved + from libamu/mount_fs.c and include/am_utils.h. Ensure that hlfsd + is hidden from df. + (mount_toplvl): fixed df types for irix. + +Thu Jul 17 21:59:45 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu> + + * amq/amq.c (main): fixed bug that caused the 5 second timeout for + TLI amq using udp to be ignored. + (main): if amq cannot contact remote host's portmapper within 5 + seconds, timeout and fail faster than the default longer timeout + (this is for non-TLI systems). + +Thu Jul 17 17:08:13 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amq/amq.c (get_secure_amd_client): if amq cannot contact + remote host's portmapper within 5 seconds, timeout and fail faster + than the default TLI timeout of over 4 minutes. + + * amd/am_ops.c (ops_showfstypes): added styles for new bsd44 + file systems nullfs, unionfs, and umapfs. + (ops_show1): cleanup code and and reuse this function. + (vops): empty placeholders for nullfs, unionfs, and umapfs. + + * amd/ops_{nullfs, unionfs, umapfs}.c: 3 new empty templates for + bsd44 style file systems. + + * fsinfo/fsinfo.8: man page for fsinfo rewritten from bsd44 + sources. + + * amd/conf_tok.l, fsinof/fsi_lex.c: undefine ECHO to avoid + conflict with systems that define it in <sys/ioctl.h> and also + define a conflicting one via lex. Newer versions of f/lex are ok. + +Wed Jul 16 00:17:45 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/ops_nfs.c (mount_nfs_fh): fill in nfs_args' fields + acdirmin/max and acregmin/max only if they exist. + + * aux/configure.in: test for nfs_args fields acdirmin and + acregmin. + +Tue Jul 15 17:24:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/configure.in: commented out checking for MNT2_GEN_OPT_* for + "nondev" and commented back in checking for "nodev". This was a + typo. + + * include/am_compat.h: more compatibility options: define "ro" + mnttab option all the time. Define "overlay" as needed. Added + more fillers of mnttab options (as per Daniel S. Riley + <dsr@mail.lns.cornell.edu>), for acdirmax, acdirmin, acregmax, + acregmin, noac, grpid, nosuid, and actimo. + + * libamu/mount_fs.c (mnt_flags): fixed a typo in "ro" option as + per dsr@mail.lns.cornell.edu (Daniel S. Riley). Then cleaned up + the same code for other options in struct opt_tab. + +Mon Jul 14 22:36:37 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/get_args.c (get_args): moved amd.conf file parsing to before + the switching the default log/debug options. Suggested by + dsr@mail.lns.cornell.edu (Daniel S. Riley). + + * aux/update_build_version: new script to record the build version + of amd, along with the rest of the info thet comes up with amd -v. + +Sun Jul 13 00:30:24 1997 Erez Zadok <ezk@decca.damtp.cam.ac.uk> + + * aux/macros/os_cflags.m4: new macro, to add additional + compilation options (also used during configuration), based on the + OS and the compiler. Used for solaris-2.6, osf, and irix6. + +Fri Jul 11 10:15:11 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * amd/conf_tok.l, conf_parse.y: allow values of keys to include + white spaces, if they are double-quoted (key="some value") + + * amd/info_hesiod.c (hesiod_search): cleanup and minor bug fixes + of hesiod from Danny Braniss <danny@cs.huji.ac.il>. + +Fri Jul 11 02:16:06 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a7 *** + ******************************************************************* + +Thu Jul 10 12:19:25 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * include/am_defs.h: fill in extern definition of innetgr() in + case system headers don't. + + * aux/macros/path_prog_lex.m4 aux/configure.in: using macros that + will show the full pathname to yacc/bison and f/lex. Some systems + have older or bad versions of those and this way the user will + know for sure what is being invoked. + + * tasks: file populated with todo items. + + * scripts/amd2ldif.in: Script to convert amd maps to plain text + LDAP object files. Contributed by Leif Johansson + <leifj@matematik.su.se>. + + * aux/config.guess: added recognition for sun3's running 4.2bsd, + from Tom Schmidt <tschmidt@micron.com>. Fixed one small typo. + + * amd/conf.c: several variables that were local to a map, were + also added to [global], where they apply to all maps. Each map + can then individually override those defaults. Flags + affected: browsable_dirs and mount_type. Options affected: + map_type, map_options, and search_path. + + * amd/amd.h: eliminated several global flags each of which took an + int, in favor of one global flags variable used as a bit field. + + * amd/amd.c (init_global_options): moved all global variables into + a single struct amu_global_options, so it is easier to add new + ones and/or identify existing ones. + + * amd/get_args.c (get_args): removed unused amd -m option. + + * amd/conf.c (gopt_cluster): added new amd.conf option for cluster + name, same as amd -C. + + * amd/info_ldap.c: LDAP info map functions from Leif Johansson + <leifj@matematik.su.se>. + + * amd/conf.c (gopt_ldap_base, gopt_ldap_hostports): put in global + amd.conf options for ldap_base and ldap_hostports. + + * amd/opts.c (f_netgrp): new amd map function netgrp(ARG) to test + if the current host is in the ARG host netgroup. + + * aux/configure.in: some systems replaced dbm in libc with GNU's + libgdbm, so check for libgdbm, but only if dbm_open is not in + libc already. This was a recommendation from Tom Schmidt + <tschmidt@micron.com>. + + * conf/nfs_prot/nfs_prot_sunos5_3.h: port to sparc-sun-solaris2.3 + completed. + +Wed Jul 9 18:14:59 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * port to sparc-unknown-netbsd1.2E done, not tested. Includes NFS + V.3. + +Tue Jul 8 17:35:07 1997 Erez Zadok <ezk@elk.mcl.cs.columbia.edu> + + * port to i386-unknown-freebsd3.0 done and working. Includes NFS + V.3. + + * aux/macros/check_nfs_fh_dref.m4: freebsd3 should use + file handle dereferencing style similar to freebsd22. + + * include/am_defs.h: need to include <net/if_var.h> before + <netinet/if_ether.h> on freebsd3. + + * conf/nfs_prot/nfs_prot_freebsd3.h: new protocol header additions + for freeBSD 3.0. + +Tue Jul 8 16:53:41 1997 Erez Zadok <ezk@moisil.cs.columbia.edu> + + * amd/info_nis.c (nis_reload): cast nis' callback function so + picky compilers won't complain. + + * libamu/xdr_mountres3.c (xdr_mountres3): make sure this function + gets compiled only if the system has NFS V3 and does not have + xdr_mountres3. + +Tue Jul 8 12:42:03 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * COPYING: put in some legal stuff in this file. + +Mon Jul 7 19:10:44 1997 Erez Zadok <ezk@prometheus.soscorp.com> + + * NFS V3 now works under Irix5, thanks to patches from + Andreas Stolcke <stolcke@speech.sri.com>. + + * conf/mount/mount_irix5.c: sparate mount_irix.c into an irix5 + version and an irix6 version, since irix5's NFS V3 code is broken + and hacky. + + * amd/info_hesiod.c (hs_zone_transfer): minor fixes to buffer + sizes for some hesiod queries. Patch from Danny Braniss + <danny@cs.huji.ac.il>. + +Mon Jul 7 19:04:14 1997 Erez Zadok <ezk@glory.soscorp.com> + + * amd/ops_nfs.c (mount_nfs_fh): fixed NFS V.3 support for bsdi3. + +Sun Jul 6 14:22:24 1997 Erez Zadok <ezk@glory.soscorp.com> + + * aux/{configure.in,acconfig.h}: added checks for struct + nfs_args's fields proto and sotype (bsdi3). + + * amd/ops_nfs.c (mount_nfs_fh): added nfsv3 option to + nfs_args.flags for bsdi3. Set field proto to 0. Set sotype field + to SOCK_STREAM or SOCK_DGRAM. + + * aux/macros/check_mount_style.m4: add case for bsdi3. + + * amd/info_hesiod.c: got hesiod support for bsdi3. + +Sun Jul 6 11:14:47 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/configure.in: look for hesiod on libc (bsdi3) + + * amd/get_args.c (get_args): reformat usage so it fits in 80 + columns. + + * scripts/ctl-amd.in: changed directory name for optional tftpboot + map to /tftpboot/.amd. + +Sat Jul 5 17:46:45 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + ******************************************************************* + *** Released am-utils-6.0a6 *** + ******************************************************************* + +Sat Jul 5 03:17:09 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/ctl-amd.in: include -T tag for tftpboot. + + * new port: mips-sgi-irix5.3. Compiled with gcc, but NFS V3 code + is broken and needs work on the specific nfs_args that irix5 uses + for V3 mounts. + +Sat Jul 5 01:44:25 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/get_args.c (get_args): new options amd -T tag. A map with + tag=foo matching the -T tag will be processed. All untagged maps + get processed all the time. + +Fri Jul 4 16:19:26 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/configure.in: need to check for strcasecmp in libucb (ncr2) + + * aux/macros/check_os_libs.m4: a new macro to set the usage of + libnsl and libsocket based on the OS. + + * libamu/mount_fs.c (mnt_flags): used MNTTAB_OPT_GRPID if it is + defined (problem on osf4). + + * conf/nfs_prot/nfs_prot_irix5.h: new file for irix5 headers. + + * include/am_defs.h, aux/macros/try_compile_nfs.m4, + aux/macros/mount_headers.m4: do include <sys/proc.h> because it + failes on irix5. Rather, put in the individual + conf/nfs_prot/nfs_prot_*.h headers. + + * amd/conf.c: AIX3 doesn't like strdup() being passed a constant + char*, so cast all strdup()'s args to a non-const char*. + + * amd/mapc.c (root_newmap): don't try to strdup only a "const + char *". + +Fri Jul 4 15:47:10 1997 Erez Zadok <ezk@americas.psl.cs.columbia.edu> + + * conf/nfs_prot/nfs_prot_sunos4.h: added rpc/rpc.h and + sys/errno.h. + +Thu Jul 3 17:49:00 1997 Erez Zadok <ezk@prometheus.soscorp.com> + + * made sure am-utils compiles, links, and runs properly on Irix + 6.2 using "cc -32 -Wl,-woff," + + * aux/macros/check_lib2.m4: a bug fix version to autoconf 2.12 + AC_CHECK_LIB. If OTHER-LIBRARIES are defined and used, then add + them to $LIBS. + + * aux/configure.in: some cleanup of which libraries are needed. + Espectially ensure that libnsl is included only on Solaris, where + so far it is the only system on which it is absolutely necessary. + Also no longer need to include libc explicitly. + + * amd/amd.c,wire-test/wire-test.c (main): convert IP address to + network-long order before printing it. + + * wire-test/wire-test.c (main): also check and report on the IP + address of the local host, since some systems have bad versions of + get_myaddress, or ones that conflict with other versions in + multiple libraries (SunOS 4 and Irix especially). + +Wed Jul 2 18:19:02 1997 Erez Zadok <ezk@starblazers.soscorp.com> + + * scripts/ctl-amd.in: don't use full pathname so killproc() works + better. Also run bsd44 and irix style ps programs. + + * aux/macros/check_lib_funcs.m4: bug fixed: used to define usage + of library no matter if it was found or not. + +Wed Jul 2 02:11:48 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * aux/macros/check_mnt2_gen_opt.m4: turned back on the checking + for M_* macros, but ensure that <sys/stream.h> is not included at + all so it won't conflict with other M_* macros. + +Tue Jul 1 21:16:51 1997 Erez Zadok <ezk@mako.cs.columbia.edu> + + * conf/mount/mount_irix.c (mount_irix): first arg to mount(2) on + irix should be "spec" (host:/path), not the dir of the mnt point. + + * amd/ops_afs.c (afs_lookuppn): bug in enable_default_selectors + fixed. If on, it essentially ignored the setting in a + selector-controlled /defaults if there were 2 or more entries in it. + +Tue Jul 1 12:23:38 1997 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu> + + * scripts/ctl-{amd,hlfsd}.in (killproc): if failed to find process + using BSD style ps, then try SVR4 style ps. + + * include/am_utils.h (amuDebug): renamed Debug macro to amuDebug + etc., to avoid conflicts with similar named macros in <ldap.h>. + + * aux/configure.in, amd/info_ldap.c, etc.: put in all the autoconf + support needed for LDAP. Now the code has to be written mostly in + amd/info_ldap.c. + + * Included additional patches from Andreas Stolcke + <stolcke@speech.sri.com> to support using the best possible + combination of NFS version (2,3) and protocol (udp,tcp) for any + given host, since it appears that some Irix versions have NFS V3, + but do not support TCP. + + * scripts/ctl-amd.in: updated amd control script to look for and + use amd.conf file. + +Tue Jul 1 00:28:23 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/mapc.c (mapc_create): now, each map in the amd.conf can be + initialized off of a different type, or default to cycling through + all maps until one of them matches. + +Mon Jun 30 20:49:13 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * amd/ops_afs.c (afs_readdir): per-map browsing (readdir) done. + if browsable_dirs=yes is set in the map section in amd.conf, that + map will return all entries back to a readdir(2). + +Sun Jun 29 16:22:11 1997 Erez Zadok <ezk@lorien.cs.columbia.edu> + + * rudimentary amd.conf file support included. You may even override things like os=sos5, to get "backwards" compatibilty with upl102. diff --git a/contrib/amd/INSTALL b/contrib/amd/INSTALL index f471305..9a94afa 100644 --- a/contrib/amd/INSTALL +++ b/contrib/amd/INSTALL @@ -10,6 +10,7 @@ SYSTEM AUTOCONF COMPILE RUN SHLIB alpha-dec-osf2.1 ezk ezk ezk !ezk alpha-dec-osf4.0 ezk ezk dsr[3] ezk alphaev5-unknown-linux-gnu ezk ezk finkel ezk +alphaev5-unknown-linux-gnu-rh5.2 ezk ezk ezk ezk hppa1.0-hp-hpux11.00 ezk ezk ezk hppa1.1-hp-hpux10.10 ezk ezk ezk ezk hppa1.1-hp-hpux10.20 ezk ezk ezk ezk @@ -21,6 +22,7 @@ i386-pc-bsdi2.1 ezk ezk ezk !ezk i386-pc-bsdi3.0 ezk ezk ezk !ezk i386-pc-bsdi3.1 ezk ezk ezk !ezk i386-pc-bsdi4.0 ezk ezk ezk ezk +i386-pc-bsdi4.0.1 ezk ezk ezk ezk i386-pc-solaris2.5.1 ezk ezk ezk ezk i386-pc-solaris2.6 ezk ezk ezk ezk i386-pc-solaris2.7 ezk ezk ezk ezk @@ -30,21 +32,34 @@ i386-unknown-freebsd2.2.6 ezk ezk ezk ezk i386-unknown-freebsd2.2.7 ezk ezk ezk ezk i386-unknown-freebsd2.2.8 ezk ezk ezk ezk i386-unknown-freebsd3.0 ezk ezk ezk ezk +i386-unknown-freebsdelf3.0 ezk ezk ezk ezk +i386-unknown-freebsdelf3.1 ezk ezk ezk ezk +i386-unknown-freebsdelf3.2 ezk ezk ezk ezk +i386-unknown-freebsdelf4.0 ezk ezk ezk ezk i386-unknown-netbsd1.2.1 ezk ezk ezk ezk i386-unknown-netbsd1.3 ezk ezk ezk ezk i386-unknown-netbsd1.3.1 ezk ezk ezk ezk i386-unknown-netbsd1.3.2 ezk ezk ezk ezk i386-unknown-netbsd1.3.3 ezk ezk ezk ezk +i386-unknown-netbsd1.4 ezk ezk ezk ezk i386-unknown-openbsd2.1 ezk ezk ezk ezk i386-unknown-openbsd2.2 ezk ezk ezk ezk i386-unknown-openbsd2.3 ezk ezk ezk ezk i386-unknown-openbsd2.4 ezk ezk ezk ezk +i386-unknown-openbsd2.5 ezk ezk ezk ezk i486-ncr-sysv4.3.03 ezk ezk ezk +i486-pc-linux-gnu-rh6.0 ezk ezk ezk ezk i486-pc-linux-gnulibc1 ezk ezk ezk ezk +i486-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk i486-pc-linux-gnuoldld ezk ezk ezk ezk i586-pc-linux-gnu ezk ezk ezk ezk +i586-pc-linux-gnu-rh5.2 ezk ezk ezk ezk +i586-pc-linux-gnu-rh6.0 ezk ezk ezk ezk i586-pc-linux-gnulibc1 ezk ezk ezk ezk +i586-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk i686-pc-linux-gnu ezk ezk ezk ezk +i686-pc-linux-gnu-rh5.2 ezk ezk ezk ezk +i686-pc-linux-gnu-rh6.0 ezk ezk ezk ezk i686-pc-linux-gnulibc ezk ezk ezk ezk i686-pc-linux-gnulibc1 ezk ezk ezk ezk m68k-hp-hpux9.00 ezk[4] ezk[4] nrh/ezk diff --git a/contrib/amd/LSM.am-utils b/contrib/amd/LSM.am-utils index 76e6271..f8b045b 100644 --- a/contrib/amd/LSM.am-utils +++ b/contrib/amd/LSM.am-utils @@ -1,7 +1,7 @@ Begin3 Title: am-utils -Version: 6.0 -Entered-date: 01JAN99 +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 @@ -10,9 +10,9 @@ 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.6MB am-utils-6.0.tar.gz - 1.6MB am-utils.tar.gz - 1.6MB am-utils-snapshot.tar.gz + 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.cs.columbia.edu/~ezk/am-utils/mirrors.html Original-site: ftp.cs.columbia.edu /pub/amd Platforms: all modern Unix systems diff --git a/contrib/amd/MIRRORS b/contrib/amd/MIRRORS index dba537f..07e33c4 100644 --- a/contrib/amd/MIRRORS +++ b/contrib/amd/MIRRORS @@ -28,8 +28,8 @@ Europe: Sweden: ftp://ftp.sunet.se/pub/unix/admin/am-utils Maintainer: archive@ftp.sunet.se - Sweden: - ftp://ftp.matematik.su.se/pub/mirrors/shekel.mcl.cs.columbia.edu/pub/am-utils + Sweden (Stockholm University, Math Depat): + ftp://mirror.matematik.su.se/pub/am-utils Maintainer: leifj@matematik.su.se UK: ftp://sunsite.org.uk/packages/am-utils diff --git a/contrib/amd/NEWS b/contrib/amd/NEWS index 57fa0c6..9e7a87e 100644 --- a/contrib/amd/NEWS +++ b/contrib/amd/NEWS @@ -1,3 +1,63 @@ +# -*- text -*- + +*** Notes specific to am-utils version 6.0.1: + +- updated or minor new ports: + i386-pc-bsdi4.0.1 + i386-unknown-freebsdelf3.0 + i386-unknown-freebsdelf3.1 + i386-unknown-freebsdelf3.2 + i386-unknown-freebsdelf4.0 + i386-unknown-netbsd1.4 + i386-unknown-openbsd2.5 + powerpc-unknown-linux-gnu + +- automount2amd added, a new script to convert Sun automount maps to Amd maps + +- new map function netgrpd(ARG), same as netgrp() but matches FQHN + +- 'ignore' is a generic mount option + +- hesiod info service isup() function to check if service is up + +- more Y2K fixes (see README.y2k for the full story) + +- using alloca.c on systems that don't have it (hpux9 with /bin/cc) + +- configure script reduced in size by using M4/sh loops instead of repeated + entries + +- documentation updates + +- too many bugs fixed to list here: + 'addopts' option works with 'remopts' as well as 'opts' + AIX can perform NFS V.3 mounts explicitly + NIS is_up fixed, especially for NIS+ running in compatibility mode + amd -v incorrectly listing file systems that don't really work + amd's own mounts use reserved ports if possible + browsable directories works for Linux 2.3 (NFS cookies) + bsd44 systems check for isofs flags + bsd44 systems check for new options: norrio, gens, and extatt + buildall works better on Ultrix's /bin/sh + compile and build on Linux kernels 2.2 and newer + compile and build on RedHat Linux 6.0 (glibc 2.1) + compile and build on Solaris 7 (with or without vendor LDAP) + completely eliminate all of amd's amq -M code, when not enabled + correctly interpret failure code of unmount of type:=program + don't create autofs listener service unless used + don't list or process amq's -M option unless feature was turned on + don't turn on/off noconn option if it was already in that state + ldap info service: don't strcmp null strings + lostaltmail correctly sets struct sockaddr_in + make sure Linux systems have configured kernel headers + test for bsize/namlen fields in nfs_args (linux mount versions 2/3) + turn off broken NFS V.3 support for HPUX + use getifaddrs() on bsd44 systems makes wire.c more reliable + use matching NFS rsize/wsize on Linux 2.0 and 2.[123] kernels. + verify that RPC requests come from reserved, privileged local ports + warn when Linux kernel headers mismatch with running kernel + pawd works for type:=nfsl too + *** Notes specific to am-utils version 6.0: - updated or minor new ports: diff --git a/contrib/amd/README.y2k b/contrib/amd/README.y2k index 27ed553..300cf38 100644 --- a/contrib/amd/README.y2k +++ b/contrib/amd/README.y2k @@ -12,6 +12,17 @@ the ctime(3) call. However, on Friday, September 18th 1998, Matthew Crosby <mcrosby@ms.com> reported that they evaluated 6.0a16 and found it to be compliant. +On March 26, 1999, Paul Balyoz <pbalyoz@sedona.ch.intel.com> submitted a +patch to lostaltmail which makes it print Y2K compliant dates. He used a +code scanner and manually "eyeballed" the code and could not find any more +problems. Paul's patch is included in am-utils-6.0.1s7 and newer versions. +Paul also said that other 2-digit years used in am-utils are "harmless." + + +NOTE: NONE OF THE PERSONS MENTIONED HERE, AUTHOR INCLUDED, ARE WILLING TO +CERTIFY AM-UTILS AS Y2K COMPLIANT. USE AT YOUR OWN RISK. + +--- Erez Zadok. Maintainer, am-utils package and AMD-DEV list. Email: amd-dev-owner@majordomo.cs.columbia.edu diff --git a/contrib/amd/amd/am_ops.c b/contrib/amd/amd/am_ops.c index 2a042df..49db91e 100644 --- a/contrib/amd/amd/am_ops.c +++ b/contrib/amd/amd/am_ops.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: am_ops.c,v 1.2 1998/12/27 06:24:45 ezk Exp $ + * $Id: am_ops.c,v 1.4 1999/03/13 17:03:26 ezk Exp $ * */ @@ -164,7 +164,7 @@ ops_showamfstypes(char *buf) if (ap[1]) strcat(buf, ", "); l += strlen((*ap)->fs_type) + 2; - if (l > 60) { + if (l > 62) { l = 0; strcat(buf, "\n "); } @@ -413,15 +413,32 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map /* * If addopts option was used, then append it to the - * current options. + * current options and remote mount options. */ if (fo->opt_addopts) { - char *mergedstr; - mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts); - plog(XLOG_USER, "merge opts \"%s\" add \"%s\" => \"%s\"", - fo->opt_opts, fo->opt_addopts, mergedstr); - XFREE(fo->opt_opts); - fo->opt_opts = mergedstr; + if (STREQ(fo->opt_opts, fo->opt_remopts)) { + /* optimize things for the common case where opts==remopts */ + char *mergedstr; + mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts); + plog(XLOG_USER, "merge rem/opts \"%s\" add \"%s\" => \"%s\"", + fo->opt_opts, fo->opt_addopts, mergedstr); + XFREE(fo->opt_opts); + XFREE(fo->opt_remopts); + fo->opt_opts = mergedstr; + fo->opt_remopts = strdup(mergedstr); + } else { + char *mergedstr, *remmergedstr; + mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts); + plog(XLOG_USER, "merge opts \"%s\" add \"%s\" => \"%s\"", + fo->opt_opts, fo->opt_addopts, mergedstr); + XFREE(fo->opt_opts); + fo->opt_opts = mergedstr; + remmergedstr = merge_opts(fo->opt_remopts, fo->opt_addopts); + plog(XLOG_USER, "merge remopts \"%s\" add \"%s\" => \"%s\"", + fo->opt_remopts, fo->opt_addopts, remmergedstr); + XFREE(fo->opt_remopts); + fo->opt_remopts = remmergedstr; + } } /* diff --git a/contrib/amd/amd/amd.h b/contrib/amd/amd/amd.h index eb21c7e..0264d70 100644 --- a/contrib/amd/amd/amd.h +++ b/contrib/amd/amd/amd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amd.h,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: amd.h,v 1.3 1999/02/04 07:24:14 ezk Exp $ * */ @@ -280,6 +280,7 @@ extern bool_t xdr_mountres3(XDR *xdrs, mountres3 *objp); #ifdef HAVE_FS_AUTOFS extern SVCXPRT *autofsxprt; extern u_short autofs_port; +extern int amd_use_autofs; extern int autofs_mount(am_node *mp); extern int autofs_umount(am_node *mp); diff --git a/contrib/amd/amd/amfs_auto.c b/contrib/amd/amd/amfs_auto.c index c6421bf..36f7b09 100644 --- a/contrib/amd/amd/amfs_auto.c +++ b/contrib/amd/amd/amfs_auto.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_auto.c,v 1.1.1.1 1998/11/05 02:04:46 ezk Exp $ + * $Id: amfs_auto.c,v 1.4 1999/08/09 06:09:43 ezk Exp $ * */ @@ -60,12 +60,13 @@ /* DEVELOPERS: turn this on for special debugging of readdir code */ #undef DEBUG_READDIR +#define DOT_DOT_COOKIE (u_int) 1 + /**************************************************************************** *** STRUCTURES *** ****************************************************************************/ - /**************************************************************************** *** FORWARD DEFINITIONS *** ****************************************************************************/ @@ -609,8 +610,8 @@ amfs_auto_bgmount(struct continuation * cp, int mpe) * 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%x", - 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); @@ -695,7 +696,7 @@ amfs_auto_bgmount(struct continuation * cp, int mpe) int i = atoi(mf->mf_fo->opt_delay); if (i > 0 && clocktime() < (cp->start + i)) { #ifdef DEBUG - dlog("Mount of %s delayed by %ds", mf->mf_mount, i - clocktime() + cp->start); + dlog("Mount of %s delayed by %lds", mf->mf_mount, (long) (i - clocktime() + cp->start)); #endif /* DEBUG */ this_error = -1; } @@ -992,7 +993,7 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op) if (error) { #ifdef DEBUG errno = error; /* XXX */ - dlog("Returning error: %m", error); + dlog("Returning error: %m"); #endif /* DEBUG */ XFREE(fname); ereturn(error); @@ -1321,7 +1322,7 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i * fairly unbelievable) then tough. */ #ifdef DEBUG - dlog("default search"); + dlog("amfs_auto_readdir: default search"); #endif /* DEBUG */ /* * Check for enough room. This is extremely approximate but is more @@ -1350,8 +1351,7 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i ep[1].ne_fileid = mp->am_gen; ep[1].ne_name = ".."; ep[1].ne_nextentry = 0; - *(u_int *) ep[1].ne_cookie = - xp ? xp->am_gen : ~(u_int) 0; + *(u_int *) ep[1].ne_cookie = (xp ? xp->am_gen : DOT_DOT_COOKIE); if (!xp) dp->dl_eof = TRUE; /* by default assume readdir done */ @@ -1359,12 +1359,12 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i return 0; } #ifdef DEBUG - dlog("real child"); + dlog("amfs_auto_readdir: real child"); #endif /* DEBUG */ - if (gen == ~(u_int) 0) { + if (gen == DOT_DOT_COOKIE) { #ifdef DEBUG - dlog("End of readdir in %s", mp->am_path); + dlog("amfs_auto_readdir: End of readdir in %s", mp->am_path); #endif /* DEBUG */ dp->dl_eof = TRUE; dp->dl_entries = 0; @@ -1379,6 +1379,7 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i if (xp) { int nbytes = count / 2; /* conservative */ int todo = MAX_READDIR_ENTRIES; + dp->dl_entries = ep; do { am_node *xp_next = next_nonerror_node(xp->am_osib); @@ -1386,7 +1387,7 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i if (xp_next) { *(u_int *) ep->ne_cookie = xp_next->am_gen; } else { - *(u_int *) ep->ne_cookie = ~(u_int) 0; + *(u_int *) ep->ne_cookie = DOT_DOT_COOKIE; dp->dl_eof = TRUE; } @@ -1444,7 +1445,7 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen * fairly unbelievable) then tough. */ #ifdef DEBUG - dlog("default search"); + dlog("amfs_auto_readdir_browsable: default search"); #endif /* DEBUG */ /* * Check for enough room. This is extremely approximate but is more @@ -1484,7 +1485,7 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen ep[1].ne_fileid = mp->am_gen; ep[1].ne_name = ".."; ep[1].ne_nextentry = 0; - *(u_int *) ep[1].ne_cookie = ~(u_int) 0; + *(u_int *) ep[1].ne_cookie = DOT_DOT_COOKIE; /* * If map is browsable, call a function make_entry_chain() to construct @@ -1496,8 +1497,7 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen if (!te) return 0; #ifdef DEBUG_READDIR - j = 0; - for (ne=te; ne; ne=ne->ne_nextentry) + for (j=0,ne=te; ne; ne=ne->ne_nextentry) plog(XLOG_INFO, "gen1 key %4d \"%s\"", j++, ne->ne_name); #endif /* DEBUG_READDIR */ @@ -1518,19 +1518,23 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen } ep[1].ne_nextentry = te; /* append this chunk of "te" chain */ #ifdef DEBUG_READDIR - for (ne=te; ne; ne=ne->ne_nextentry) + for (j=0,ne=te; ne; ne=ne->ne_nextentry) plog(XLOG_INFO, "gen2 key %4d \"%s\"", j++, ne->ne_name); + for (j=0,ne=ep; ne; ne=ne->ne_nextentry) + plog(XLOG_INFO, "gen2+ key %4d \"%s\" fi=%d ck=%d", + j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + plog(XLOG_INFO, "EOF is %d", dp->dl_eof); #endif /* DEBUG_READDIR */ return 0; } /* end of "if (gen == 0)" statement */ #ifdef DEBUG - dlog("real child"); + dlog("amfs_auto_readdir_browsable: real child"); #endif /* DEBUG */ - if (gen == ~(u_int) 0) { + if (gen == DOT_DOT_COOKIE) { #ifdef DEBUG - dlog("End of readdir in %s", mp->am_path); + dlog("amfs_auto_readdir_browsable: End of readdir in %s", mp->am_path); #endif /* DEBUG */ dp->dl_eof = TRUE; dp->dl_entries = 0; @@ -1572,7 +1576,7 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen dp->dl_entries = ep; #ifdef DEBUG_READDIR plog(XLOG_INFO, "dl_entries=0x%x, te_next=0x%x, dl_eof=%d", - dp->dl_entries, te_next, dp->dl_eof); + (int) dp->dl_entries, (int) te_next, dp->dl_eof); for (ne=te; ne; ne=ne->ne_nextentry) plog(XLOG_INFO, "gen3 key %4d \"%s\"", j++, ne->ne_name); #endif /* DEBUG_READDIR */ diff --git a/contrib/amd/amd/amfs_direct.c b/contrib/amd/amd/amfs_direct.c index 8df22b1..475f388 100644 --- a/contrib/amd/amd/amfs_direct.c +++ b/contrib/amd/amd/amfs_direct.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_direct.c,v 1.1.1.1 1998/11/05 02:04:46 ezk Exp $ + * $Id: amfs_direct.c,v 1.2 1999/01/10 21:53:41 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_error.c b/contrib/amd/amd/amfs_error.c index e8fb3c1..4d4d865 100644 --- a/contrib/amd/amd/amfs_error.c +++ b/contrib/amd/amd/amfs_error.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_error.c,v 1.1.1.1 1998/11/05 02:04:46 ezk Exp $ + * $Id: amfs_error.c,v 1.2 1999/01/10 21:53:41 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_host.c b/contrib/amd/amd/amfs_host.c index e1ec4e9..71b08df 100644 --- a/contrib/amd/amd/amfs_host.c +++ b/contrib/amd/amd/amfs_host.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_host.c,v 1.1.1.1 1998/11/05 02:04:46 ezk Exp $ + * $Id: amfs_host.c,v 1.3 1999/01/13 23:30:57 ezk Exp $ * */ @@ -224,7 +224,7 @@ fetch_fhandle(CLIENT * client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versi * get the filehandle. Use NFS version specific call. */ - plog(XLOG_INFO, "fetch_fhandle: NFS version %d", nfs_version); + plog(XLOG_INFO, "fetch_fhandle: NFS version %d", (int) nfs_version); #ifdef HAVE_FS_NFS3 if (nfs_version == NFS_VERSION3) { memset((char *) &fhp->v3, 0, sizeof(fhp->v3)); @@ -335,7 +335,7 @@ amfs_host_fmount(mntfs *mf) */ host = mf->mf_server->fs_host; sin = *mf->mf_server->fs_ip; - plog(XLOG_INFO, "amfs_host_fmount: NFS version %d", mf->mf_server->fs_version); + plog(XLOG_INFO, "amfs_host_fmount: NFS version %d", (int) mf->mf_server->fs_version); #ifdef HAVE_FS_NFS3 if (mf->mf_server->fs_version == NFS_VERSION3) mnt_version = MOUNTVERS3; @@ -630,7 +630,7 @@ amfs_host_umounted(am_node *mp) */ host = mf->mf_server->fs_host; sin = *mf->mf_server->fs_ip; - plog(XLOG_INFO, "amfs_host_umounted: NFS version %d", mf->mf_server->fs_version); + plog(XLOG_INFO, "amfs_host_umounted: NFS version %d", (int) mf->mf_server->fs_version); #ifdef HAVE_FS_NFS3 if (mf->mf_server->fs_version == NFS_VERSION3) mnt_version = MOUNTVERS3; @@ -674,7 +674,7 @@ amfs_host_umounted(am_node *mp) if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_SYSTEMERROR) { /* RPC_SYSTEMERROR seems to be returned for no good reason ... */ const char *msg = clnt_sperrno(clnt_stat); - plog(XLOG_ERROR, "unmount all from %s rpc failed: %s", host, msg, clnt_stat); + plog(XLOG_ERROR, "unmount all from %s rpc failed: %s", host, msg); goto out; } diff --git a/contrib/amd/amd/amfs_inherit.c b/contrib/amd/amd/amfs_inherit.c index 442115d..891afea 100644 --- a/contrib/amd/amd/amfs_inherit.c +++ b/contrib/amd/amd/amfs_inherit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_inherit.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_inherit.c,v 1.2 1999/01/10 21:53:41 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_link.c b/contrib/amd/amd/amfs_link.c index 0daa334..fcb142d 100644 --- a/contrib/amd/amd/amfs_link.c +++ b/contrib/amd/amd/amfs_link.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_link.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_link.c,v 1.2 1999/01/10 21:53:42 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_linkx.c b/contrib/amd/amd/amfs_linkx.c index 045f797..728597f 100644 --- a/contrib/amd/amd/amfs_linkx.c +++ b/contrib/amd/amd/amfs_linkx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_linkx.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_linkx.c,v 1.2 1999/01/10 21:53:42 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_nfsl.c b/contrib/amd/amd/amfs_nfsl.c index 55e5c75..42e0102 100644 --- a/contrib/amd/amd/amfs_nfsl.c +++ b/contrib/amd/amd/amfs_nfsl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_nfsl.c,v 1.2 1998/12/27 06:24:45 ezk Exp $ + * $Id: amfs_nfsl.c,v 1.3 1999/01/10 21:53:42 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_nfsx.c b/contrib/amd/amd/amfs_nfsx.c index e67e8f5..a253e50 100644 --- a/contrib/amd/amd/amfs_nfsx.c +++ b/contrib/amd/amd/amfs_nfsx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_nfsx.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_nfsx.c,v 1.2 1999/01/10 21:53:42 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_program.c b/contrib/amd/amd/amfs_program.c index 04d7c54..5020190 100644 --- a/contrib/amd/amd/amfs_program.c +++ b/contrib/amd/amd/amfs_program.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_program.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_program.c,v 1.4 1999/06/24 06:15:55 ezk Exp $ * */ @@ -131,6 +131,8 @@ amfs_program_exec(char *info) * Put stdout to stderr */ (void) fclose(stdout); + if (!logfp) + logfp = stderr; /* initialize before possible first use */ (void) dup(fileno(logfp)); if (fileno(logfp) != fileno(stderr)) { (void) fclose(stderr); @@ -145,7 +147,7 @@ amfs_program_exec(char *info) char **cp = xivec; plog(XLOG_DEBUG, "executing (un)mount command..."); while (*cp) { - plog(XLOG_DEBUG, "arg[%d] = '%s'", cp - xivec, *cp); + plog(XLOG_DEBUG, "arg[%ld] = '%s'", (long) (cp - xivec), *cp); cp++; } } diff --git a/contrib/amd/amd/amfs_root.c b/contrib/amd/amd/amfs_root.c index e2bd371..91f770d 100644 --- a/contrib/amd/amd/amfs_root.c +++ b/contrib/amd/amd/amfs_root.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_root.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_root.c,v 1.2 1999/01/10 21:53:43 ezk Exp $ * */ diff --git a/contrib/amd/amd/amfs_toplvl.c b/contrib/amd/amd/amfs_toplvl.c index e10c6a1..5d07f62 100644 --- a/contrib/amd/amd/amfs_toplvl.c +++ b/contrib/amd/amd/amfs_toplvl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_toplvl.c,v 1.2 1998/12/27 06:24:45 ezk Exp $ + * $Id: amfs_toplvl.c,v 1.5 1999/02/04 07:24:14 ezk Exp $ * */ @@ -177,9 +177,11 @@ mount_amfs_toplvl(char *dir, char *opts) #endif /* HOSTNAMESZ */ /* - * Finally we can compute the mount genflags set above. + * Finally we can compute the mount genflags set above, + * and add any automounter specific flags. */ genflags = compute_mount_flags(&mnt); + genflags |= compute_automounter_mount_flags(&mnt); /* setup the many fields and flags within nfs_args */ memmove(&anh.v2.fhs_fh, fhp, sizeof(*fhp)); @@ -225,8 +227,10 @@ mount_amfs_toplvl(char *dir, char *opts) /* This is it! Here we try to mount amd on its mount points */ #ifdef DEBUG - amuDebug(D_TRACE) + amuDebug(D_TRACE) { print_nfs_args(&nfs_args, 0); + plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags); + } #endif /* DEBUG */ error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type, 0, NULL, mnttab_file_name); diff --git a/contrib/amd/amd/amfs_union.c b/contrib/amd/amd/amfs_union.c index df494ac..6e079a4 100644 --- a/contrib/amd/amd/amfs_union.c +++ b/contrib/amd/amd/amfs_union.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amfs_union.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amfs_union.c,v 1.2 1999/01/10 21:53:43 ezk Exp $ * */ diff --git a/contrib/amd/amd/amq_svc.c b/contrib/amd/amd/amq_svc.c index bdb1c16..c22f219 100644 --- a/contrib/amd/amd/amq_svc.c +++ b/contrib/amd/amd/amq_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq_svc.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: amq_svc.c,v 1.3 1999/08/24 21:31:06 ezk Exp $ * */ @@ -59,7 +59,9 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) amq_string amqproc_mnttree_1_arg; amq_string amqproc_umnt_1_arg; amq_setopt amqproc_setopt_1_arg; +#ifdef ENABLE_AMQ_MOUNT amq_string amqproc_mount_1_arg; +#endif /* ENABLE_AMQ_MOUNT */ } argument; char *result; xdrproc_t xdr_argument, xdr_result; @@ -109,11 +111,13 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) local = (amqsvcproc_t) amqproc_getmntfs_1_svc; break; +#ifdef ENABLE_AMQ_MOUNT case AMQPROC_MOUNT: xdr_argument = (xdrproc_t) xdr_amq_string; xdr_result = (xdrproc_t) xdr_int; local = (amqsvcproc_t) amqproc_mount_1_svc; break; +#endif /* ENABLE_AMQ_MOUNT */ case AMQPROC_GETVERS: xdr_argument = (xdrproc_t) xdr_void; diff --git a/contrib/amd/amd/autil.c b/contrib/amd/amd/autil.c index 00ca8ea..006c755 100644 --- a/contrib/amd/amd/autil.c +++ b/contrib/amd/amd/autil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: autil.c,v 1.2 1998/12/27 06:24:46 ezk Exp $ + * $Id: autil.c,v 1.3 1999/01/10 21:53:44 ezk Exp $ * */ diff --git a/contrib/amd/amd/clock.c b/contrib/amd/amd/clock.c index 270401a..72d4719 100644 --- a/contrib/amd/amd/clock.c +++ b/contrib/amd/amd/clock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: clock.c,v 1.1.1.1 1998/11/05 02:04:47 ezk Exp $ + * $Id: clock.c,v 1.3 1999/01/13 23:30:58 ezk Exp $ * */ @@ -190,7 +190,8 @@ reschedule_timeouts(time_t now, time_t then) if (cp->c_time >= now && cp->c_time <= then) { plog(XLOG_WARNING, "job %d rescheduled to run immediately", cp->c_id); #ifdef DEBUG - dlog("rescheduling job %d back %d seconds", cp->c_id, cp->c_time - now); + dlog("rescheduling job %d back %ld seconds", + cp->c_id, (long) (cp->c_time - now)); #endif /* DEBUG */ next_softclock = cp->c_time = now; } diff --git a/contrib/amd/amd/conf.c b/contrib/amd/amd/conf.c index 109d005..99a9475 100644 --- a/contrib/amd/amd/conf.c +++ b/contrib/amd/amd/conf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: conf.c,v 1.2 1998/12/27 06:24:46 ezk Exp $ + * $Id: conf.c,v 1.4 1999/02/04 07:24:15 ezk Exp $ * */ @@ -550,6 +550,7 @@ gopt_mount_type(const char *val) if (STREQ(val, "autofs")) { #ifdef HAVE_FS_AUTOFS gopt.flags |= CFM_MOUNT_TYPE_AUTOFS; + amd_use_autofs++; return 0; #else /* not HAVE_FS_AUTOFS */ fprintf(stderr, "conf: no autofs support available\n"); @@ -867,6 +868,7 @@ ropt_mount_type(const char *val, cf_map_t *cfm) if (STREQ(val, "autofs")) { #ifdef HAVE_FS_AUTOFS cfm->cfm_flags |= CFM_MOUNT_TYPE_AUTOFS; + amd_use_autofs++; return 0; #else /* not HAVE_FS_AUTOFS */ fprintf(stderr, "conf: no autofs support available\n"); diff --git a/contrib/amd/amd/conf_parse.y b/contrib/amd/amd/conf_parse.y index c34062b..fb426ec 100644 --- a/contrib/amd/amd/conf_parse.y +++ b/contrib/amd/amd/conf_parse.y @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: conf_parse.y,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: conf_parse.y,v 1.3 1999/04/16 14:20:59 ezk Exp $ * */ @@ -49,6 +49,22 @@ #include <am_defs.h> #include <amd.h> +/* 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 +#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__ */ + extern char *yytext; extern int yylineno; extern int yylex(void); diff --git a/contrib/amd/amd/conf_tok.l b/contrib/amd/amd/conf_tok.l index 7128a2a..0756711 100644 --- a/contrib/amd/amd/conf_tok.l +++ b/contrib/amd/amd/conf_tok.l @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ * * %W% (Berkeley) %G% * - * $Id: conf_tok.l,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: conf_tok.l,v 1.2 1999/01/10 21:53:45 ezk Exp $ * */ diff --git a/contrib/amd/amd/info_file.c b/contrib/amd/amd/info_file.c index 1bd9c62..e235752 100644 --- a/contrib/amd/amd/info_file.c +++ b/contrib/amd/amd/info_file.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_file.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_file.c,v 1.2 1999/01/10 21:53:45 ezk Exp $ * */ diff --git a/contrib/amd/amd/info_hesiod.c b/contrib/amd/amd/info_hesiod.c index 88de89b..62007d6 100644 --- a/contrib/amd/amd/info_hesiod.c +++ b/contrib/amd/amd/info_hesiod.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_hesiod.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_hesiod.c,v 1.5 1999/02/04 07:24:15 ezk Exp $ * */ @@ -58,10 +58,15 @@ #ifdef HAVE_HESIOD_INIT /* bsdi3 does not define this extern in any header file */ extern char **hesiod_resolve(void *context, const char *name, const char *type); - +extern int hesiod_init(void **context); static voidp hesiod_context; #endif /* HAVE_HESIOD_INIT */ +/* forward declarations */ +int amu_hesiod_init(mnt_map *m, char *map, time_t *tp); +int hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp); +int hesiod_isup(mnt_map *m, char *map); + /* * No easy way to probe the server - check the map name begins with "hesiod." * Note: this name includes 'amu_' so as to not conflict with libhesiod's @@ -98,7 +103,8 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) #endif /* not HAVE_HESIOD_INIT */ #ifdef DEBUG - dlog("hesiod_search(m=%x, map=%s, key=%s, pval=%x tp=%x)", m, map, key, pval, tp); + dlog("hesiod_search(m=%lx, map=%s, key=%s, pval=%lx tp=%lx)", + (unsigned long) m, map, key, (unsigned long) pval, (unsigned long) tp); #endif /* DEBUG */ sprintf(hes_key, "%s.%s", key, map + HES_PREFLEN); @@ -161,3 +167,34 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) return error; #endif /* not HAVE_HESIOD_INIT */ } + + +/* + * Check if Hesiod is up, so we can determine if to clear the map or not. + * Test it by querying for /defaults. + * Returns: 0 if Hesiod is down, 1 if it is up. + */ +int +hesiod_isup(mnt_map *m, char *map) +{ + int error; + char *val; + time_t mtime; + static int last_status = 1; /* assume up by default */ + + error = hesiod_search(m, map, "/defaults", &val, &mtime); +#ifdef DEBUG + dlog("hesiod_isup(%s): %s", map, strerror(error)); +#endif /* DEBUG */ + if (error != 0 && error != ENOENT) { + plog(XLOG_ERROR, + "hesiod_isup: error getting `/defaults' entry in map %s: %m", map); + last_status = 0; + return 0; /* Hesiod is down */ + } + if (last_status == 0) { /* if was down before */ + plog(XLOG_INFO, "hesiod_isup: Hesiod came back up for map %s", map); + last_status = 1; + } + return 1; /* Hesiod is up */ +} diff --git a/contrib/amd/amd/info_ldap.c b/contrib/amd/amd/info_ldap.c index a5f1d75..9fc0212 100644 --- a/contrib/amd/amd/info_ldap.c +++ b/contrib/amd/amd/info_ldap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_ldap.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_ldap.c,v 1.5 1999/08/22 05:12:50 ezk Exp $ * */ @@ -182,7 +182,12 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts) ALD *aldh; CR *creds; - if (!STREQ(gopt.map_type, AMD_LDAP_TYPE)) { + /* + * XXX: by checking that map_type must be defined, aren't we + * excluding the possibility of automatic searches through all + * map types? + */ + if (!gopt.map_type || !STREQ(gopt.map_type, AMD_LDAP_TYPE)) { return (ENOENT); } #ifdef DEBUG @@ -219,7 +224,7 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts) if (get_ldap_timestamp(aldh->ldap, map, ts)) return (ENOENT); #ifdef DEBUG - dlog("Got timestamp for map %s: %d\n", map, *ts); + dlog("Got timestamp for map %s: %ld\n", map, *ts); #endif /* DEBUG */ return (0); @@ -277,7 +282,7 @@ get_ldap_timestamp(LDAP * ld, char *map, time_t *ts) struct timeval tv; char **vals, *end; char filter[MAXPATHLEN]; - int i, err, nentries = 0; + int i, err = 0, nentries = 0; LDAPMessage *res, *entry; tv.tv_sec = 3; @@ -299,7 +304,9 @@ get_ldap_timestamp(LDAP * ld, char *map, time_t *ts) &res); if (err == LDAP_SUCCESS) break; +#ifdef DEBUG dlog("Timestamp search timed out, trying again...\n"); +#endif /* DEBUG */ } if (err != LDAP_SUCCESS) { @@ -339,7 +346,7 @@ get_ldap_timestamp(LDAP * ld, char *map, time_t *ts) err = ENOENT; } if (!*ts > 0) { - plog(XLOG_USER, "Nonpositive timestamp %d for map %s\n", + plog(XLOG_USER, "Nonpositive timestamp %ld for map %s\n", *ts, map); err = ENOENT; } @@ -353,7 +360,7 @@ get_ldap_timestamp(LDAP * ld, char *map, time_t *ts) ldap_msgfree(res); ldap_msgfree(entry); #ifdef DEBUG - dlog("The timestamp for %s is %d (err=%d)\n", map, *ts, err); + dlog("The timestamp for %s is %ld (err=%d)\n", map, *ts, err); #endif /* DEBUG */ return (err); } @@ -364,7 +371,7 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts) { char **vals, filter[MAXPATHLEN]; struct timeval tv; - int i, err, nvals = 0, nentries = 0; + int i, err = 0, nvals = 0, nentries = 0; LDAPMessage *entry, *res; ALD *a = (ALD *) (m->map_data); @@ -452,7 +459,9 @@ amu_ldap_mtime(mnt_map *m, char *map, time_t *ts) ALD *aldh = (ALD *) (m->map_data); if (aldh == NULL) { +#ifdef DEBUG dlog("LDAP panic: unable to find map data\n"); +#endif /* DEBUG */ return (ENOENT); } if (amu_ldap_rebind(aldh)) { diff --git a/contrib/amd/amd/info_ndbm.c b/contrib/amd/amd/info_ndbm.c index d8fd39c..91cb8e0 100644 --- a/contrib/amd/amd/info_ndbm.c +++ b/contrib/amd/amd/info_ndbm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_ndbm.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_ndbm.c,v 1.2 1999/01/10 21:53:46 ezk Exp $ * */ diff --git a/contrib/amd/amd/info_nis.c b/contrib/amd/amd/info_nis.c index 2e9a0b7..17699d4 100644 --- a/contrib/amd/amd/info_nis.c +++ b/contrib/amd/amd/info_nis.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_nis.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_nis.c,v 1.5 1999/08/22 05:12:51 ezk Exp $ * */ @@ -55,8 +55,12 @@ /* * NIS+ servers in NIS compat mode don't have yp_order() + * + * has_yp_order = 1 NIS server + * = 0 NIS+ server + * = -1 server is down */ -static int has_yp_order = FALSE; +static int has_yp_order = -1; /* forward declarations */ int nis_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)); @@ -103,7 +107,9 @@ determine_nis_domain(void) } if (!*default_domain) { nis_not_running = 1; +#ifdef DEBUG plog(XLOG_WARNING, "NIS domain name is not set. NIS ignored."); +#endif /* DEBUG */ return ENOENT; } gopt.nis_domain = strdup(default_domain); @@ -193,25 +199,52 @@ nis_isup(mnt_map *m, char *map) { YP_ORDER_OUTORDER_TYPE order; int error; + char *master; static int last_status = 1; /* assume up by default */ - if (has_yp_order) { + switch (has_yp_order) { + case 1: + /* + * NIS server with yp_order + */ error = yp_order(gopt.nis_domain, map, &order); if (error != 0) { plog(XLOG_ERROR, - "nis_isup: error getting the order of map of %s: %s", + "nis_isup: error getting the order of map %s: %s", map, yperr_string(ypprot_err(error))); last_status = 0; return 0; /* NIS is down */ } + break; + + case 0: + /* + * NIS+ server without yp_order + */ + error = yp_master(gopt.nis_domain, map, &master); + if (error != 0) { + plog(XLOG_ERROR, + "nis_isup: error getting the master of map %s: %s", + map, yperr_string(ypprot_err(error))); + last_status = 0; + return 0; /* NIS+ is down */ + } + break; + + default: + /* + * server was down + */ + last_status = 0; } - if (last_status == 0) { /* if was down before */ + + if (last_status == 0) { /* reinitialize if was down before */ time_t dummy; - plog(XLOG_INFO, "nis_isup: NIS came back up for map %s", map); - /* XXX: do we really need to reinitialize nis? */ error = nis_init(m, map, &dummy); - if (!error) - last_status = 1; + if (error) + return 0; /* still down */ + plog(XLOG_INFO, "nis_isup: NIS came back up for map %s", map); + last_status = 1; } return 1; /* NIS is up */ } @@ -237,8 +270,10 @@ nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) } - if (has_yp_order) { + switch (has_yp_order) { + case 1: /* + * NIS server with yp_order * Check if map has changed */ if (yp_order(gopt.nis_domain, map, &order)) @@ -247,7 +282,9 @@ nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) *tp = (time_t) order; return -1; } - } else { + break; + + case 0: /* * NIS+ server without yp_order * Check if timeout has expired to invalidate the cache @@ -257,6 +294,15 @@ nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) *tp = (time_t)order; return(-1); } + break; + + default: + /* + * server was down + */ + if (nis_isup(m, map)) + return -1; + return EIO; } /* @@ -301,15 +347,16 @@ nis_init(mnt_map *m, char *map, time_t *tp) yp_order_result = yp_order(gopt.nis_domain, map, &order); switch (yp_order_result) { case 0: - has_yp_order = TRUE; + /* NIS server found */ + has_yp_order = 1; *tp = (time_t) order; #ifdef DEBUG - dlog("NIS master for %s@%s has order %d", map, gopt.nis_domain, order); + dlog("NIS master for %s@%s has order %lu", map, gopt.nis_domain, (unsigned long) order); #endif /* DEBUG */ break; case YPERR_YPERR: /* NIS+ server found ! */ - has_yp_order = FALSE; + has_yp_order = 0; /* try yp_master() instead */ if (yp_master(gopt.nis_domain, map, &master)) { return ENOENT; @@ -322,6 +369,8 @@ nis_init(mnt_map *m, char *map, time_t *tp) } break; default: + /* server is down */ + has_yp_order = -1; return ENOENT; } return 0; diff --git a/contrib/amd/amd/info_nisplus.c b/contrib/amd/amd/info_nisplus.c index bf681ac..ea7a3d7 100644 --- a/contrib/amd/amd/info_nisplus.c +++ b/contrib/amd/amd/info_nisplus.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_nisplus.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_nisplus.c,v 1.2 1999/01/10 21:53:46 ezk Exp $ * */ diff --git a/contrib/amd/amd/info_passwd.c b/contrib/amd/amd/info_passwd.c index d27c9b3..d367f38 100644 --- a/contrib/amd/amd/info_passwd.c +++ b/contrib/amd/amd/info_passwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_passwd.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: info_passwd.c,v 1.2 1999/01/10 21:53:46 ezk Exp $ * */ diff --git a/contrib/amd/amd/info_union.c b/contrib/amd/amd/info_union.c index 00c254d..d81602b 100644 --- a/contrib/amd/amd/info_union.c +++ b/contrib/amd/amd/info_union.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: info_union.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: info_union.c,v 1.2 1999/01/10 21:53:47 ezk Exp $ * */ diff --git a/contrib/amd/amd/map.c b/contrib/amd/amd/map.c index 20e23c0..4bfb058 100644 --- a/contrib/amd/amd/map.c +++ b/contrib/amd/amd/map.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: map.c,v 1.2 1998/12/27 06:24:47 ezk Exp $ + * $Id: map.c,v 1.5 1999/08/22 05:12:51 ezk Exp $ * */ @@ -615,7 +615,7 @@ root_fh(char *dir) long pid = getppid(); ((struct am_fh *) &nfh)->fhh_pid = pid; #ifdef DEBUG - dlog("root_fh substitutes pid %d", pid); + dlog("root_fh substitutes pid %ld", (long) pid); #endif /* DEBUG */ } return &nfh; @@ -913,7 +913,7 @@ free_map_if_success(int rc, int term, voidp closure) #endif /* DEBUG */ amd_stats.d_uerr++; } else if (rc) { - if (rc == EBUSY) { + if (mf->mf_ops == &amfs_program_ops || rc == EBUSY) { plog(XLOG_STATS, "\"%s\" on %s still active", mp->am_path, mf->mf_mount); } else { errno = rc; /* XXX */ @@ -1093,7 +1093,7 @@ timeout_mp(voidp v) if ((int) amd_state >= (int) Finishing) t = now + 1; #ifdef DEBUG - dlog("Next mount timeout in %ds", t - now); + dlog("Next mount timeout in %lds", (long) (t - now)); #endif /* DEBUG */ timeout_mp_id = timeout(t - now, timeout_mp, 0); diff --git a/contrib/amd/amd/mapc.c b/contrib/amd/amd/mapc.c index 70ebf3a..a78e81b 100644 --- a/contrib/amd/amd/mapc.c +++ b/contrib/amd/amd/mapc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: mapc.c,v 1.1.1.1 1998/11/05 02:04:48 ezk Exp $ + * $Id: mapc.c,v 1.4 1999/08/09 06:09:44 ezk Exp $ * */ @@ -158,6 +158,7 @@ extern int passwd_search(mnt_map *, char *, char *, char **, time_t *); /* HESIOD MAPS */ #ifdef HAVE_MAP_HESIOD extern int amu_hesiod_init(mnt_map *, char *map, time_t *tp); +extern int hesiod_isup(mnt_map *, char *); extern int hesiod_search(mnt_map *, char *, char *, char **, time_t *); #endif /* HAVE_MAP_HESIOD */ @@ -236,7 +237,7 @@ static map_type maptypes[] = "hesiod", amu_hesiod_init, error_reload, - NULL, /* isup function */ + hesiod_isup, /* is Hesiod up or not? */ hesiod_search, error_mtime, MAPC_ALL @@ -1051,7 +1052,7 @@ key_already_in_chain(char *keyname, const nfsentry *chain) nfsentry * make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable) { - static u_int last_cookie = ~(u_int) 0 - 1; + static u_int last_cookie = (u_int) 2; /* monotonically increasing */ static nfsentry chain[MAX_CHAIN]; static int max_entries = MAX_CHAIN; char *key; @@ -1123,10 +1124,9 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable } /* we have space. put entry in next cell */ - --last_cookie; + ++last_cookie; chain[num_entries].ne_fileid = (u_int) last_cookie; - *(u_int *) chain[num_entries].ne_cookie = - (u_int) last_cookie; + *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie; chain[num_entries].ne_name = key; if (num_entries < max_entries - 1) { /* link to next one */ chain[num_entries].ne_nextentry = &chain[num_entries + 1]; diff --git a/contrib/amd/amd/mntfs.c b/contrib/amd/amd/mntfs.c index 4168974..7e67959 100644 --- a/contrib/amd/amd/mntfs.c +++ b/contrib/amd/amd/mntfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: mntfs.c,v 1.1.1.1 1998/11/05 02:04:48 ezk Exp $ + * $Id: mntfs.c,v 1.2 1999/01/10 21:53:47 ezk Exp $ * */ diff --git a/contrib/amd/amd/nfs_prot_svc.c b/contrib/amd/amd/nfs_prot_svc.c index 42b24f5..7c0048b 100644 --- a/contrib/amd/amd/nfs_prot_svc.c +++ b/contrib/amd/amd/nfs_prot_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: nfs_prot_svc.c,v 1.1.1.1 1998/11/05 02:04:48 ezk Exp $ + * $Id: nfs_prot_svc.c,v 1.4 1999/08/22 21:12:30 ezk Exp $ * */ @@ -98,6 +98,27 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) char *result; xdrproc_t xdr_argument, xdr_result; nfssvcproc_t local; + struct sockaddr_in *sinp; + char dq[20], dq2[28]; + + sinp = amu_svc_getcaller(rqstp->rq_xprt); +#ifdef MNT2_NFS_OPT_RESVPORT + /* Verify that the request comes from a reserved port */ + if (ntohs(sinp->sin_port) >= IPPORT_RESERVED) { + plog(XLOG_WARNING, "ignoring request from %s:%u, port not reserved", + inet_dquad(dq, sinp->sin_addr.s_addr), + ntohs(sinp->sin_port)); + return; + } +#endif /* MNT2_NFS_OPT_RESVPORT */ + /* if the address does not match, ignore the request */ + if (sinp->sin_addr.s_addr && sinp->sin_addr.s_addr != myipaddr.s_addr) { + plog(XLOG_WARNING, "ignoring request from %s:%u, expected %s", + inet_dquad(dq, sinp->sin_addr.s_addr), + ntohs(sinp->sin_port), + inet_dquad(dq2, myipaddr.s_addr)); + return; + } nfs_program_2_transp = NULL; @@ -228,7 +249,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) (SVC_IN_ARG_TYPE) &argument)) { plog(XLOG_ERROR, "NFS xdr decode failed for %d %d %d", - rqstp->rq_prog, rqstp->rq_vers, rqstp->rq_proc); + (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); svcerr_decode(transp); return; } diff --git a/contrib/amd/amd/nfs_start.c b/contrib/amd/amd/nfs_start.c index d32e8d7..48d6f06 100644 --- a/contrib/amd/amd/nfs_start.c +++ b/contrib/amd/amd/nfs_start.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: nfs_start.c,v 1.1.1.1 1998/11/05 02:04:48 ezk Exp $ + * $Id: nfs_start.c,v 1.4 1999/02/04 07:24:16 ezk Exp $ * */ @@ -58,6 +58,7 @@ u_short nfs_port; #ifdef HAVE_FS_AUTOFS SVCXPRT *autofsxprt = NULL; u_short autofs_port = 0; +int amd_use_autofs = 0; #endif /* HAVE_FS_AUTOFS */ #ifndef HAVE_SIGACTION @@ -86,12 +87,12 @@ checkup(void) } if (max_mem < next_mem) { #ifdef HAVE_GETPAGESIZE - dlog("%#x bytes of memory allocated; total is %#x (%ld pages)", - next_mem - max_mem, next_mem, + dlog("%#lx bytes of memory allocated; total is %#lx (%ld pages)", + (long) (next_mem - max_mem), (unsigned long) next_mem, ((long) next_mem + getpagesize() - 1) / getpagesize()); #else /* not HAVE_GETPAGESIZE */ - dlog("%#x bytes of memory allocated; total is %#x", - next_mem - max_mem, next_mem); + dlog("%#lx bytes of memory allocated; total is %#lx", + (long) (next_mem - max_mem), (unsigned long) next_mem); #endif /* not HAVE_GETPAGESIZE */ max_mem = next_mem; @@ -265,7 +266,7 @@ run_rpc(void) tvv.tv_sec = SELECT_MAXWAIT; #ifdef DEBUG if (tvv.tv_sec) { - dlog("Select waits for %ds", tvv.tv_sec); + dlog("Select waits for %ds", (int) tvv.tv_sec); } else { dlog("Select waits for Godot"); } @@ -374,14 +375,17 @@ mount_automounter(int ppid) return ret; #ifdef HAVE_FS_AUTOFS - /* - * Create the autofs service for amd. - */ - plog(XLOG_INFO, "creating autofs service listener"); - ret = create_autofs_service(&soAUTOFS, &autofs_port, &autofsxprt, autofs_program_1); - /* if autofs service fails it is OK if using a test amd */ - if (ret != 0 && gopt.portmap_program == AMQ_PROGRAM) - return ret; + if (amd_use_autofs) { + /* + * Create the autofs service for amd, but only if autofs maps + * were defined (so amd doesn't clash with automountd.) + */ + plog(XLOG_INFO, "creating autofs service listener"); + ret = create_autofs_service(&soAUTOFS, &autofs_port, &autofsxprt, autofs_program_1); + /* if autofs service fails it is OK if using a test amd */ + if (ret != 0 && gopt.portmap_program == AMQ_PROGRAM) + return ret; + } #endif /* HAVE_FS_AUTOFS */ /* diff --git a/contrib/amd/amd/nfs_subr.c b/contrib/amd/amd/nfs_subr.c index 65bcc0d..d06d008 100644 --- a/contrib/amd/amd/nfs_subr.c +++ b/contrib/amd/amd/nfs_subr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: nfs_subr.c,v 1.1.1.1 1998/11/05 02:04:48 ezk Exp $ + * $Id: nfs_subr.c,v 1.3 1999/01/13 23:31:00 ezk Exp $ * */ @@ -131,7 +131,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) #ifdef DEBUG amuDebug(D_TRACE) plog(XLOG_DEBUG, "\tstat(%s), size = %d", mp->am_path, - attrp->ns_u.ns_attr_u.na_size); + (int) attrp->ns_u.ns_attr_u.na_size); #endif /* DEBUG */ mp->am_stats.s_getattr++; diff --git a/contrib/amd/amd/ops_TEMPLATE.c b/contrib/amd/amd/ops_TEMPLATE.c index e8e889b..34fd308 100644 --- a/contrib/amd/amd/ops_TEMPLATE.c +++ b/contrib/amd/amd/ops_TEMPLATE.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_TEMPLATE.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_TEMPLATE.c,v 1.2 1999/01/10 21:53:48 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_autofs.c b/contrib/amd/amd/ops_autofs.c index 91015b0..da77af1 100644 --- a/contrib/amd/amd/ops_autofs.c +++ b/contrib/amd/amd/ops_autofs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_autofs.c,v 1.2 1998/12/27 06:24:47 ezk Exp $ + * $Id: ops_autofs.c,v 1.4 1999/01/13 23:31:00 ezk Exp $ * */ @@ -356,7 +356,7 @@ autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp) (SVC_IN_ARG_TYPE) &argument)) { plog(XLOG_ERROR, "AUTOFS xdr decode failed for %d %d %d", - rqstp->rq_prog, rqstp->rq_vers, rqstp->rq_proc); + (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); svcerr_decode(transp); return; } @@ -433,11 +433,13 @@ autofs_unmount_1_svc(struct umntrequest *ur, struct umntres *result, struct auth int err = 0; #ifdef HAVE_FIELD_UMNTREQUEST_RDEVID - plog(XLOG_INFO, "XXX: autofs_unmount_1_svc: %d:%u:%lu:0x%x", - ur->isdirect, ur->devid, ur->rdevid, ur->next); + 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:%u:0x%x", - ur->isdirect, ur->devid, ur->next); + 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 */ @@ -614,8 +616,8 @@ autofs_bgmount(struct continuation * cp, int mpe) * 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%x", - 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); @@ -700,7 +702,7 @@ autofs_bgmount(struct continuation * cp, int mpe) int i = atoi(mf->mf_fo->opt_delay); if (i > 0 && clocktime() < (cp->start + i)) { #ifdef DEBUG - dlog("Mount of %s delayed by %ds", mf->mf_mount, i - clocktime() + cp->start); + dlog("Mount of %s delayed by %lds", mf->mf_mount, i - clocktime() + cp->start); #endif /* DEBUG */ this_error = -1; } @@ -998,7 +1000,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op) if (error) { #ifdef DEBUG errno = error; /* XXX */ - dlog("Returning error: %m", error); + dlog("Returning error: %m"); #endif /* DEBUG */ XFREE(fname); ereturn(error); diff --git a/contrib/amd/amd/ops_cachefs.c b/contrib/amd/amd/ops_cachefs.c index 40ca356..adb7583 100644 --- a/contrib/amd/amd/ops_cachefs.c +++ b/contrib/amd/amd/ops_cachefs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_cachefs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_cachefs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_cdfs.c b/contrib/amd/amd/ops_cdfs.c index 05de461..0f104d6 100644 --- a/contrib/amd/amd/ops_cdfs.c +++ b/contrib/amd/amd/ops_cdfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_cdfs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_cdfs.c,v 1.3 1999/03/30 17:22:46 ezk Exp $ * */ @@ -148,6 +148,19 @@ mount_cdfs(char *dir, char *fs_name, char *opts) if (hasmntopt(&mnt, MNTTAB_OPT_RRIP)) cdfs_flags |= MNT2_CDFS_OPT_RRIP; #endif /* defined(MNT2_CDFS_OPT_RRIP) && defined(MNTTAB_OPT_RRIP) */ +#if defined(MNT2_CDFS_OPT_NORRIP) && defined(MNTTAB_OPT_NORRIP) + if (hasmntopt(&mnt, MNTTAB_OPT_NORRIP)) + cdfs_flags |= MNT2_CDFS_OPT_NORRIP; +#endif /* defined(MNT2_CDFS_OPT_NORRIP) && defined(MNTTAB_OPT_NORRIP) */ + +#if defined(MNT2_CDFS_OPT_GENS) && defined(MNTTAB_OPT_GENS) + if (hasmntopt(&mnt, MNTTAB_OPT_GENS)) + cdfs_flags |= MNT2_CDFS_OPT_GENS; +#endif /* defined(MNT2_CDFS_OPT_GENS) && defined(MNTTAB_OPT_GENS) */ +#if defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) + if (hasmntopt(&mnt, MNTTAB_OPT_EXTATT)) + cdfs_flags |= MNT2_CDFS_OPT_EXTATT; +#endif /* defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) */ genflags = compute_mount_flags(&mnt); diff --git a/contrib/amd/amd/ops_efs.c b/contrib/amd/amd/ops_efs.c index 095c2d4..5c8b27e 100644 --- a/contrib/amd/amd/ops_efs.c +++ b/contrib/amd/amd/ops_efs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_efs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_efs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_lofs.c b/contrib/amd/amd/ops_lofs.c index 9331bf6..a7cccba 100644 --- a/contrib/amd/amd/ops_lofs.c +++ b/contrib/amd/amd/ops_lofs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_lofs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_lofs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_mfs.c b/contrib/amd/amd/ops_mfs.c index b6a32ba..87178b0 100644 --- a/contrib/amd/amd/ops_mfs.c +++ b/contrib/amd/amd/ops_mfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_mfs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_mfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_nfs.c b/contrib/amd/amd/ops_nfs.c index bad0bd9..01cdcee 100644 --- a/contrib/amd/amd/ops_nfs.c +++ b/contrib/amd/amd/ops_nfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_nfs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_nfs.c,v 1.5 1999/03/13 17:03:28 ezk Exp $ * */ @@ -148,7 +148,7 @@ find_nfs_fhandle_cache(voidp idv, int done) #ifdef DEBUG if (fp2) { - dlog("fh cache gives fp %#x, fs %s", fp2, fp2->fh_path); + dlog("fh cache gives fp %#lx, fs %s", (unsigned long) fp2, fp2->fh_path); } else { dlog("fh cache search failed"); } @@ -198,7 +198,7 @@ got_nfs_fh(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia, */ if (fp->fh_wchan) { #ifdef DEBUG - dlog("Calling wakeup on %#x", fp->fh_wchan); + dlog("Calling wakeup on %#lx", (unsigned long) fp->fh_wchan); #endif /* DEBUG */ wakeup(fp->fh_wchan); } @@ -259,7 +259,7 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, voidp w if (fs == fp->fh_fs && STREQ(path, fp->fh_path)) { switch (fp->fh_error) { case 0: - plog(XLOG_INFO, "prime_nfs_fhandle_cache: NFS version %d", fp->fh_nfs_version); + plog(XLOG_INFO, "prime_nfs_fhandle_cache: NFS version %d", (int) fp->fh_nfs_version); #ifdef HAVE_FS_NFS3 if (fp->fh_nfs_version == NFS_VERSION3) error = fp->fh_error = unx_error(fp->fh_nfs_handle.v3.fhs_status); @@ -449,7 +449,7 @@ call_mountd(fh_cache *fp, u_long proc, fwd_fun f, voidp wchan) #endif /* HAVE_FS_NFS3 */ mnt_version = MOUNTVERS; plog(XLOG_INFO, "call_mountd: NFS version %d, mount version %d", - fp->fh_nfs_version, mnt_version); + (int) fp->fh_nfs_version, (int) mnt_version); rpc_msg_init(&mnt_msg, MOUNTPROG, mnt_version, MOUNTPROC_NULL); len = make_rpc_packet(iobuf, @@ -585,10 +585,13 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs * strcpy(host + MAXHOSTNAMELEN - 3, ".."); #endif /* MAXHOSTNAMELEN */ - if (mf->mf_remopts && *mf->mf_remopts && !islocalnet(fs->fs_ip->sin_addr.s_addr)) + if (mf->mf_remopts && *mf->mf_remopts && + !islocalnet(fs->fs_ip->sin_addr.s_addr)) { + plog(XLOG_INFO, "Using remopts=\"%s\"", mf->mf_remopts); xopts = strdup(mf->mf_remopts); - else + } else { xopts = strdup(opts); + } memset((voidp) &mnt, 0, sizeof(mnt)); mnt.mnt_dir = dir; @@ -622,7 +625,7 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs * mnt.mnt_type = MNTTAB_TYPE_NFS; } #endif /* HAVE_FS_NFS3 */ - plog(XLOG_INFO, "mount_nfs_fh: NFS version %d", nfs_version); + plog(XLOG_INFO, "mount_nfs_fh: NFS version %d", (int) nfs_version); #if defined(HAVE_FS_NFS3) || defined(HAVE_TRANSPORT_TYPE_TLI) plog(XLOG_INFO, "mount_nfs_fh: using NFS transport %s", nfs_proto); #endif /* defined(HAVE_FS_NFS3) || defined(HAVE_TRANSPORT_TYPE_TLI) */ @@ -659,8 +662,10 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs * /* finally call the mounting function */ #ifdef DEBUG - amuDebug(D_TRACE) + amuDebug(D_TRACE) { print_nfs_args(&nfs_args, nfs_version); + plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags); + } #endif /* DEBUG */ error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type, nfs_version, nfs_proto, mnttab_file_name); diff --git a/contrib/amd/amd/ops_nfs3.c b/contrib/amd/amd/ops_nfs3.c index 19d6533..0a9a198 100644 --- a/contrib/amd/amd/ops_nfs3.c +++ b/contrib/amd/amd/ops_nfs3.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_nfs3.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_nfs3.c,v 1.2 1999/01/10 21:53:50 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_nullfs.c b/contrib/amd/amd/ops_nullfs.c index 6f560a8..bd2e5ba 100644 --- a/contrib/amd/amd/ops_nullfs.c +++ b/contrib/amd/amd/ops_nullfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_nullfs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_nullfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_pcfs.c b/contrib/amd/amd/ops_pcfs.c index 3ff67b1..bca33ae 100644 --- a/contrib/amd/amd/ops_pcfs.c +++ b/contrib/amd/amd/ops_pcfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_pcfs.c,v 1.1.1.1 1998/11/05 02:04:50 ezk Exp $ + * $Id: ops_pcfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_tfs.c b/contrib/amd/amd/ops_tfs.c index 44a0d11..f370eb9 100644 --- a/contrib/amd/amd/ops_tfs.c +++ b/contrib/amd/amd/ops_tfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_tfs.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_tfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_tmpfs.c b/contrib/amd/amd/ops_tmpfs.c index 1fed46a..99f47dc 100644 --- a/contrib/amd/amd/ops_tmpfs.c +++ b/contrib/amd/amd/ops_tmpfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_tmpfs.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_tmpfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_ufs.c b/contrib/amd/amd/ops_ufs.c index bf18f6f..0b2ff2d 100644 --- a/contrib/amd/amd/ops_ufs.c +++ b/contrib/amd/amd/ops_ufs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_ufs.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_ufs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $ * */ @@ -132,7 +132,7 @@ mount_ufs(char *dir, char *fs_name, char *opts) #endif /* HAVE_FIELD_UFS_ARGS_T_FLAGS */ #ifdef HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS - ufs_args.ufs_flags = genflags; /* XXX: is this correct? */ + ufs_args.ufs_flags = genflags; #endif /* HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS */ #ifdef HAVE_FIELD_UFS_ARGS_T_FSPEC diff --git a/contrib/amd/amd/ops_umapfs.c b/contrib/amd/amd/ops_umapfs.c index af139a7..9862933 100644 --- a/contrib/amd/amd/ops_umapfs.c +++ b/contrib/amd/amd/ops_umapfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_umapfs.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_umapfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_unionfs.c b/contrib/amd/amd/ops_unionfs.c index 07f9eef..2e914a9 100644 --- a/contrib/amd/amd/ops_unionfs.c +++ b/contrib/amd/amd/ops_unionfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_unionfs.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_unionfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $ * */ diff --git a/contrib/amd/amd/ops_xfs.c b/contrib/amd/amd/ops_xfs.c index acc555ba..86ebfa0 100644 --- a/contrib/amd/amd/ops_xfs.c +++ b/contrib/amd/amd/ops_xfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: ops_xfs.c,v 1.1.1.1 1998/11/05 02:04:51 ezk Exp $ + * $Id: ops_xfs.c,v 1.2 1999/01/10 21:53:52 ezk Exp $ * */ diff --git a/contrib/amd/amd/opts.c b/contrib/amd/amd/opts.c index 907e55c..b2d7ff9 100644 --- a/contrib/amd/amd/opts.c +++ b/contrib/amd/amd/opts.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: opts.c,v 1.2 1998/12/27 06:24:48 ezk Exp $ + * $Id: opts.c,v 1.5 1999/08/16 01:16:23 ezk Exp $ * */ @@ -95,6 +95,7 @@ struct functable { */ static int f_in_network(char *); static int f_netgrp(char *); +static int f_netgrpd(char *); static int f_exists(char *); static int f_false(char *); static int f_true(char *); @@ -218,6 +219,7 @@ static struct opt opt_fields[] = { static struct functable functable[] = { { "in_network", f_in_network }, { "netgrp", f_netgrp }, + { "netgrpd", f_netgrpd }, { "exists", f_exists }, { "false", f_false }, { "true", f_true }, @@ -494,7 +496,7 @@ eval_opts(char *opts, char *mapkey) continue; } else if (NSTREQ(f, "!", 1) && (func = functable_lookup(&f[1]))) { /* then this is a negated prefixed function such as "!exists" */ - plog(XLOG_USER, "executing negated function %s", &f[1]); + plog(XLOG_INFO, "executing negated function %s", &f[1]); if ((*func) (arg)) { return (0); } @@ -730,7 +732,7 @@ f_in_network(char *arg) } -/* test if this host is in netgroup (arg) */ +/* test if this host (short hostname form) is in netgroup (arg) */ static int f_netgrp(char *arg) { @@ -744,6 +746,20 @@ f_netgrp(char *arg) } +/* test if this host (fully-qualified name) is in netgroup (arg) */ +static int +f_netgrpd(char *arg) +{ + int status; + + status = innetgr(arg, opt_hostd, NULL, NULL); +#ifdef DEBUG + plog(XLOG_USER, "netgrp = %s status = %d hostd = %s", arg, status, opt_hostd); +#endif /* DEBUG */ + return status; +} + + /* test if file (arg) exists via lstat */ static int f_exists(char *arg) diff --git a/contrib/amd/amd/restart.c b/contrib/amd/amd/restart.c index cd7d842..bd8e4aa 100644 --- a/contrib/amd/amd/restart.c +++ b/contrib/amd/amd/restart.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: restart.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: restart.c,v 1.2 1999/01/10 21:53:52 ezk Exp $ * */ diff --git a/contrib/amd/amd/rpc_fwd.c b/contrib/amd/amd/rpc_fwd.c index 8f308b8..5a74f3b 100644 --- a/contrib/amd/amd/rpc_fwd.c +++ b/contrib/amd/amd/rpc_fwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: rpc_fwd.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: rpc_fwd.c,v 1.2 1999/01/10 21:53:52 ezk Exp $ * */ diff --git a/contrib/amd/amd/sched.c b/contrib/amd/amd/sched.c index a917c3c..e5cf679 100644 --- a/contrib/amd/amd/sched.c +++ b/contrib/amd/amd/sched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: sched.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: sched.c,v 1.3 1999/01/13 23:31:01 ezk Exp $ * */ @@ -163,7 +163,7 @@ sched_task(cb_fun cf, voidp ca, voidp wchan) pjob *p = sched_job(cf, ca); #ifdef DEBUG - dlog("SLEEP on %#x", wchan); + dlog("SLEEP on %#lx", (unsigned long) wchan); #endif /* DEBUG */ p->wchan = wchan; p->pid = 0; diff --git a/contrib/amd/amd/srvr_amfs_auto.c b/contrib/amd/amd/srvr_amfs_auto.c index df2ffdf..a8ddd17 100644 --- a/contrib/amd/amd/srvr_amfs_auto.c +++ b/contrib/amd/amd/srvr_amfs_auto.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: srvr_amfs_auto.c,v 1.1.1.1 1998/11/05 02:04:49 ezk Exp $ + * $Id: srvr_amfs_auto.c,v 1.2 1999/01/10 21:53:53 ezk Exp $ * */ diff --git a/contrib/amd/amq/amq.h b/contrib/amd/amq/amq.h index 15ee2aa..cebe624 100644 --- a/contrib/amd/amq/amq.h +++ b/contrib/amd/amq/amq.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq.h,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ + * $Id: amq.h,v 1.2 1999/01/10 21:53:59 ezk Exp $ * */ diff --git a/contrib/amd/amq/amq_clnt.c b/contrib/amd/amq/amq_clnt.c index 606377b..1251c87 100644 --- a/contrib/amd/amq/amq_clnt.c +++ b/contrib/amd/amq/amq_clnt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq_clnt.c,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ + * $Id: amq_clnt.c,v 1.2 1999/01/10 21:53:59 ezk Exp $ * */ diff --git a/contrib/amd/amq/amq_xdr.c b/contrib/amd/amq/amq_xdr.c index 33093b5..26b93b3 100644 --- a/contrib/amd/amq/amq_xdr.c +++ b/contrib/amd/amq/amq_xdr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq_xdr.c,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ + * $Id: amq_xdr.c,v 1.2 1999/01/10 21:53:59 ezk Exp $ * */ diff --git a/contrib/amd/amq/pawd.c b/contrib/amd/amq/pawd.c index 3479929..cf9dce6 100644 --- a/contrib/amd/amq/pawd.c +++ b/contrib/amd/amq/pawd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: pawd.c,v 1.2 1998/12/27 06:24:50 ezk Exp $ + * $Id: pawd.c,v 1.5 1999/09/08 23:36:40 ezk Exp $ * */ @@ -58,16 +58,6 @@ #include <am_defs.h> #include <amq.h> -/* dummy variables */ -#if 0 -char *progname; -char hostname[MAXHOSTNAMELEN]; -pid_t mypid; -serv_state amd_state; -int foreground, orig_umask; -int debug_flags; -#endif - /* statics */ static char *localhost="localhost"; static char newdir[MAXPATHLEN]; @@ -77,7 +67,9 @@ static int find_mt(amq_mount_tree *mt, char *dir) { while (mt) { - if (STREQ(mt->mt_type, "link") || STREQ(mt->mt_type, "nfs")) { + if (STREQ(mt->mt_type, "link") || + STREQ(mt->mt_type, "nfs") || + STREQ(mt->mt_type, "nfsl")) { int len = strlen(mt->mt_mountpoint); if (NSTREQ(mt->mt_mountpoint, dir, len) && ((dir[len] == '\0') || (dir[len] == '/'))) { diff --git a/contrib/amd/conf/checkmount/checkmount_bsd44.c b/contrib/amd/conf/checkmount/checkmount_bsd44.c index b3bd572..4aa61dd 100644 --- a/contrib/amd/conf/checkmount/checkmount_bsd44.c +++ b/contrib/amd/conf/checkmount/checkmount_bsd44.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: checkmount_bsd44.c,v 1.1.1.1 1998/11/05 02:04:33 ezk Exp $ + * $Id: checkmount_bsd44.c,v 1.2 1999/01/10 21:54:06 ezk Exp $ * */ diff --git a/contrib/amd/conf/mtab/mtab_bsd.c b/contrib/amd/conf/mtab/mtab_bsd.c index 0476df5..5849c6a 100644 --- a/contrib/amd/conf/mtab/mtab_bsd.c +++ b/contrib/amd/conf/mtab/mtab_bsd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: mtab_bsd.c,v 1.1.1.1 1998/11/05 02:04:37 ezk Exp $ + * $Id: mtab_bsd.c,v 1.2 1999/01/10 21:54:11 ezk Exp $ * */ diff --git a/contrib/amd/conf/transp/transp_sockets.c b/contrib/amd/conf/transp/transp_sockets.c index e30612f..3dbd9dc 100644 --- a/contrib/amd/conf/transp/transp_sockets.c +++ b/contrib/amd/conf/transp/transp_sockets.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: transp_sockets.c,v 1.2 1998/11/10 16:23:41 ezk Exp $ + * $Id: transp_sockets.c,v 1.5 1999/08/22 21:12:31 ezk Exp $ * * Socket specific utilities. * -Erez Zadok <ezk@cs.columbia.edu> @@ -179,21 +179,6 @@ amu_svc_getcaller(SVCXPRT *xprt) /* - * Bind NFS to a reserved port. - */ -static int -bindnfs_port(int so, u_short *nfs_portp) -{ - u_short port; - int error = bind_resv_port(so, &port); - - if (error == 0) - *nfs_portp = port; - return error; -} - - -/* * Create the nfs service for amd */ int @@ -202,7 +187,7 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (* *soNFSp = socket(AF_INET, SOCK_DGRAM, 0); - if (*soNFSp < 0 || bindnfs_port(*soNFSp, nfs_portp) < 0) { + if (*soNFSp < 0 || bind_resv_port(*soNFSp, NULL) < 0) { plog(XLOG_FATAL, "Can't create privileged nfs port"); return 1; } @@ -210,6 +195,10 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (* plog(XLOG_FATAL, "cannot create rpc/udp service"); return 2; } + if ((*nfs_portp = (*nfs_xprtp)->xp_port) >= IPPORT_RESERVED) { + plog(XLOG_FATAL, "Can't create privileged nfs port"); + return 1; + } if (!svc_register(*nfs_xprtp, NFS_PROGRAM, NFS_VERSION, dispatch_fxn, 0)) { plog(XLOG_FATAL, "unable to register (NFS_PROGRAM, NFS_VERSION, 0)"); return 3; @@ -340,10 +329,10 @@ try_again: if (clnt == NULL) { #ifdef HAVE_CLNT_SPCREATEERROR plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s :%s", - nfs_version, proto, host, clnt_spcreateerror("")); + (int) nfs_version, proto, host, clnt_spcreateerror("")); #else /* not HAVE_CLNT_SPCREATEERROR */ plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s", - nfs_version, proto, host); + (int) nfs_version, proto, host); #endif /* not HAVE_CLNT_SPCREATEERROR */ return 0; } @@ -371,12 +360,12 @@ try_again: #endif /* HAVE_FS_NFS3 */ } plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s", - nfs_version, proto, host); + (int) nfs_version, proto, host); return 0; } plog(XLOG_INFO, "get_nfs_version: returning (%d,%s) on host %s", - nfs_version, proto, host); + (int) nfs_version, proto, host); return nfs_version; } diff --git a/contrib/amd/conf/umount/umount_bsd44.c b/contrib/amd/conf/umount/umount_bsd44.c index c58657b..1c4380e 100644 --- a/contrib/amd/conf/umount/umount_bsd44.c +++ b/contrib/amd/conf/umount/umount_bsd44.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: umount_bsd44.c,v 1.1.1.1 1998/11/05 02:04:43 ezk Exp $ + * $Id: umount_bsd44.c,v 1.2 1999/01/10 21:54:22 ezk Exp $ * */ diff --git a/contrib/amd/doc/am-utils.texi b/contrib/amd/doc/am-utils.texi index b1e12af..f1d6f26 100644 --- a/contrib/amd/doc/am-utils.texi +++ b/contrib/amd/doc/am-utils.texi @@ -1,6 +1,6 @@ \input texinfo @c -*-texinfo-*- @c -@c Copyright (c) 1997-1998 Erez Zadok +@c Copyright (c) 1997-1999 Erez Zadok @c Copyright (c) 1989 Jan-Simon Pendry @c Copyright (c) 1989 Imperial College of Science, Technology & Medicine @c Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ @c @c %W% (Berkeley) %G% @c -@c $Id: am-utils.texi,v 1.2 1998/12/27 06:25:16 ezk Exp $ +@c $Id: am-utils.texi,v 1.10 1999/09/08 23:36:49 ezk Exp $ @c @setfilename am-utils.info @@ -49,6 +49,9 @@ * Am-utils: (am-utils). The Amd automounter suite of utilities @end direntry +@settitle +@setchapternewpage odd + @titlepage @title Am-utils (4.4BSD Automounter Utilities) @subtitle For version @value{VERSION}, @value{UPDATED} @@ -57,7 +60,7 @@ (Originally by Jan-Simon Pendry and Nick Williams) @page -Copyright @copyright{} 1997-1998 Erez Zadok +Copyright @copyright{} 1997-1999 Erez Zadok @* Copyright @copyright{} 1989 Jan-Simon Pendry @* @@ -212,7 +215,7 @@ of the BSD network version 2 distribution Revision 6.0 was made independently by @email{ezk@@cs.columbia.edu,Erez Zadok} at the @uref{http://www.cs.columbia.edu/,Computer Science Department} of @uref{http://www.columbia.edu/,Columbia University}, as -part of his @uref{http://www.cs.columbia.edu/~ezk/research/tp/thesis_proposal.html,PhD thesis work}. @xref{History} for more details. +part of his @uref{http://www.cs.columbia.edu/~ezk/research/tp/thesis_proposal.html,PhD thesis work}. @xref{History}, for more details. @unnumberedsec Bug Reports @cindex Bug reports @@ -702,6 +705,10 @@ features. @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? +@item @b{alphaev5-unknown-linux-gnu-rh5.2} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + @item @b{hppa1.0-hp-hpux11.00} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab no @tab yes @tab ? @@ -712,7 +719,7 @@ features. @item @b{hppa1.1-hp-hpux10.20} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} -@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? +@tab yes @tab yes @tab yes @tab no @tab no @tab ? @item @b{hppa1.1-hp-hpux9.01} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @@ -736,15 +743,19 @@ features. @item @b{i386-pc-bsdi3.0} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} -@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? +@tab yes @tab yes @tab yes @tab yes @tab no @tab ? @item @b{i386-pc-bsdi3.1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} -@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? +@tab yes @tab yes @tab yes @tab yes @tab no @tab ? @item @b{i386-pc-bsdi4.0} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} -@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + +@item @b{i386-pc-bsdi4.0.1} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? @item @b{i386-pc-solaris2.5.1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @@ -782,6 +793,22 @@ features. @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab yes @tab yes @tab ? +@item @b{i386-unknown-freebsdelf3.0} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + +@item @b{i386-unknown-freebsdelf3.1} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + +@item @b{i386-unknown-freebsdelf3.2} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + +@item @b{i386-unknown-freebsdelf4.0} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + @item @b{i386-unknown-netbsd1.2.1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab yes @tab yes @tab ? @@ -802,6 +829,10 @@ features. @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab yes @tab yes @tab ? +@item @b{i386-unknown-netbsd1.4} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + @item @b{i386-unknown-openbsd2.1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab yes @tab yes @tab ? @@ -818,14 +849,26 @@ features. @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab yes @tab yes @tab ? +@item @b{i386-unknown-openbsd2.5} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? + @item @b{i486-ncr-sysv4.3.03} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab ? @tab yes @tab yes @tab ? +@item @b{i486-pc-linux-gnu-rh6.0} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + @item @b{i486-pc-linux-gnulibc1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? +@item @b{i486-pc-linux-gnulibc1-rh4.2} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + @item @b{i486-pc-linux-gnuoldld} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? @@ -834,14 +877,39 @@ features. @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? +@item @b{i586-pc-linux-gnu-rh5.2} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + +@item @b{i586-pc-linux-gnu-rh6.0} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + @item @b{i586-pc-linux-gnulibc1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? +@item @b{i586-pc-linux-gnulibc1-rh4.2} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + + @item @b{i686-pc-linux-gnu} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? +@item @b{i686-pc-linux-gnu-rh5.2} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + +@item @b{i686-pc-linux-gnu-rh6.0} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + +@item @b{i686-pc-linux-gnulibc} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + @item @b{i686-pc-linux-gnulibc1} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? @@ -894,6 +962,10 @@ features. @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab ? @tab yes @tab ? @tab ? +@item @b{powerpc-unknown-linux-gnu} +@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} +@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? + @item @b{rs6000-ibm-aix3.2} @c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} @tab yes @tab yes @tab yes @tab n/a @tab ? @tab ? @@ -1573,6 +1645,7 @@ These are the selectors currently implemented. * exists Selector Function:: * false Selector Function:: * netgrp Selector Function:: +* netgrpd Selector Function:: * in_network Selector Function:: * true Selector Function:: @end menu @@ -1851,7 +1924,7 @@ evaluates to true. Otherwise it evaluates to false. Always evaluates to false. @i{ARG} is ignored. @c ---------------------------------------------------------------- -@node netgrp Selector Function, in_network Selector Function, false Selector Function, Selectors +@node netgrp Selector Function, netgrpd Selector Function, false Selector Function, Selectors @comment node-name, next, previous, up @subsubsection netgrp Selector Function @cindex netgrp Selector Function @@ -1860,9 +1933,9 @@ Always evaluates to false. @i{ARG} is ignored. @cindex Mount selector; netgrp @cindex Selector; netgrp -If the current host as determined by the value of @code{$@{host@}} is a -member of the netgroup @i{ARG}, this selector evaluates to true. -Otherwise it evaluates to false. +If the current host as determined by the value of @code{$@{host@}} +(e.g., short host name) is a member of the netgroup @i{ARG}, this +selector evaluates to true. Otherwise it evaluates to false. For example, suppose you have a netgroup @samp{ppp-hosts}, and for reasons of performance, these have a local @file{/home} partition, while @@ -1875,7 +1948,26 @@ home/* netgrp(ppp-hosts);type:=link;fs:=/local/$@{key@} \ @end example @c ---------------------------------------------------------------- -@node in_network Selector Function, true Selector Function, netgrp Selector Function, Selectors +@node netgrpd Selector Function, in_network Selector Function, netgrp Selector Function, Selectors +@comment node-name, next, previous, up +@subsubsection netgrpd Selector Function +@cindex netgrpd Selector Function +@cindex netgrpd, boolean mount selector +@cindex !netgrpd, boolean mount selector +@cindex Mount selector; netgrpd +@cindex Selector; netgrpd + +If the current host as determined by the value of @code{$@{hostd@}} is a +member of the netgroup @i{ARG}, this selector evaluates to true. +Otherwise it evaluates to false. + +The @samp{netgrpd} function uses fully-qualified host names +(@code{$@{hostd@}}) to match netgroup names, while the @samp{netgrp} +function (@pxref{netgrp Selector Function}) uses short host names +(@code{$@{host@}}). + +@c ---------------------------------------------------------------- +@node in_network Selector Function, true Selector Function, netgrpd Selector Function, Selectors @comment node-name, next, previous, up @subsubsection in_network Selector Function @cindex in_network Selector Function @@ -1951,10 +2043,14 @@ The following options apply to more than one filesystem type. This option adds additional options to default options normally specified in the @samp{/defaults} entry or the defaults of the key entry -being processed (@xref{opts Option}). Normally when you specify +being processed (@pxref{opts Option}). Normally when you specify @samp{opts} in both the @samp{/defaults} and the map entry, the latter -overrides the former completely. But with @samp{addopts} it will -append the options and override any conflicting ones. +overrides the former completely. But with @samp{addopts} it will append +the options and override any conflicting ones. + +@samp{addopts} also overrides the value of the @samp{remopts} option +(@pxref{remopts Option}), which unless specified defaults to the value +of @samp{opts}. Options which start with @samp{no} will override those with the same name that do not start with @samp{no} and vice verse. Special handling @@ -2109,12 +2205,23 @@ Allow local special devices on this filesystem. @item dumbtimr @cindex Mount flags; dumbtimr -(XXX: a dumb timer?) +Turn off the dynamic retransmit timeout estimator. This may be useful +for UDP mounts that exhibit high retry rates, since it is possible that +the dynamically estimated timeout interval is too short. + +@item extatt +@cindex Mount flags; extatt +Enable extended attributes in ISO-9660 file systems. @item fsid @cindex Mount flags; fsid Set ID of filesystem. +@item gens +@cindex Mount flags; gens +Enable generations in ISO-9660 file systems. Generations allow you to +see all versions of a given file. + @item grpid @cindex Mount flags; grpid Use BSD directory group-id semantics. @@ -2143,7 +2250,9 @@ Turn off the attribute cache. @item noauto @cindex Mount flags; noauto -(XXX: No automatic what?) +This option is used by the mount command in @samp{/etc/fstab} or +@samp{/etc/vfstab} and means not to mount this file system when mount -a +is used. @item nocache @cindex Mount flags; nocache @@ -2173,6 +2282,11 @@ Don't allow local special devices on this filesystem. @cindex Mount flags; noint Do not allow keyboard interrupts for this mount +@item norrip +@cindex Mount flags; norrip +Turn off using of the Rock Ridge Interchange Protocol (RRIP) extensions +to ISO-9660. + @item nosub @cindex Mount flags; nosub Disallow mounts beneath this mount. @@ -2665,7 +2779,7 @@ Print version information on standard error and then exit. The output is of the form: @example -Copyright (c) 1997-1998 Erez Zadok +Copyright (c) 1997-1999 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. @@ -3297,11 +3411,12 @@ The following option must be specified: the block special device to be mounted. @end table -A cdfs entry might be: +Some operating systems will fail to mount read-only CDs unless the +@samp{ro} option is specified. A cdfs entry might be: @example cdfs os==sunos4;type:=cdfs;dev:=/dev/sr0 \ - os==sunos5;type:=cdfs;dev:=/dev/dsk/c0t6d0s2 + os==sunos5;addopts:=ro;type:=cdfs;dev:=/dev/dsk/c0t6d0s2 @end example @c ---------------------------------------------------------------- @@ -3730,7 +3845,7 @@ dylan/dk5 type:=ufs;dev:=/dev/dsk/5s0 The @dfn{direct} (@samp{type:=direct}) filesystem is almost identical to the automount filesystem. Instead of appearing to be a directory of mount points, it appears as a symbolic link to a mounted filesystem. The mount is done -at the time the link is accessed. @xref{Automount Filesystem} for a +at the time the link is accessed. @xref{Automount Filesystem}, for a list of required options. Direct automount points are created by specifying the @samp{direct} @@ -6789,7 +6904,7 @@ accessible. @end table -For discussion on other files used by @i{Hlfsd}, see @ref{lostaltmail} and +For discussion on other files used by @i{Hlfsd}, see @xref{lostaltmail}, and @ref{lostaltmail.conf-sample}. @c ################################################################ @@ -6806,6 +6921,7 @@ am-utils, and get installed. * amd.conf-sample:: * amd2ldif:: * amd2sun:: +* automount2amd:: * ctl-amd:: * ctl-hlfsd:: * expn:: @@ -6851,7 +6967,7 @@ amd2ldif @i{mapname} @i{base} < @i{amd.mapfile} > @i{mapfile.ldif} @end example @c ---------------------------------------------------------------- -@node amd2sun, ctl-amd, amd2ldif, Assorted Tools +@node amd2sun, automount2amd, amd2ldif, Assorted Tools @comment node-name, next, previous, up @section amd2sun @pindex amd2sun @@ -6864,7 +6980,57 @@ amd2sun < @i{amd.mapfile} > @i{auto_mapfile} @end example @c ---------------------------------------------------------------- -@node ctl-amd, ctl-hlfsd, amd2sun, Assorted Tools +@node automount2amd, ctl-amd, amd2sun, Assorted Tools +@comment node-name, next, previous, up +@section automount2amd +@pindex automount2amd + +A script to convert old Sun Automounter maps to @i{Amd} maps. + +Say you have the Sun automount file @i{auto.foo}, with these two lines: +@example +home earth:/home +moon -ro,intr server:/proj/images +@end example +Running +@example +automount2amd auto.foo > amd.foo +@end example + +will produce the @i{Amd} map @i{amd.foo} with this content: + +@example +# generated by automount2amd on Sat Aug 14 17:59:32 US/Eastern 1999 + +/defaults \\ + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 + +home \ + host==earth;type:=link;fs:=/home \\ + rhost:=earth;rfs:=/home + +moon \ + -addopts:=ro,intr \\ + host==server;type:=link;fs:=/proj/images \\ + rhost:=server;rfs:=/proj/images +@end example + +This perl script will use the following @i{/default} entry +@example +type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 +@end example +If you wish to override that, define the @b{$DEFAULTS} environment +variable, or modify the script. + +If you wish to generate Amd maps using the @i{hostd} (@pxref{hostd +Selector Variable}) @i{Amd} map syntax, then define the environment +variable @b{$DOMAIN} or modify the script. + +Note that automount2amd does not understand newer Sun Automount map +syntax, those used by autofs. + +@c ---------------------------------------------------------------- +@node ctl-amd, ctl-hlfsd, automount2amd, Assorted Tools @comment node-name, next, previous, up @section ctl-amd @pindex ctl-amd @@ -6881,7 +7047,7 @@ Stop the running @i{Amd} (if any), safely wait for it to terminate, and then start a new process --- only if the previous one died cleanly. @end table -@xref{Run-time Administration} for more details. +@xref{Run-time Administration}, for more details. @c ---------------------------------------------------------------- @node ctl-hlfsd, expn, ctl-amd, Assorted Tools @@ -6903,7 +7069,7 @@ terminate, and then start a new process --- only if the previous one died cleanly. @end table -@xref{Hlfsd} for more details. +@xref{Hlfsd}, for more details. @c ---------------------------------------------------------------- @node expn, fix-amd-map, ctl-hlfsd, Assorted Tools @@ -6994,7 +7160,7 @@ lostaltmail @end example This script needs a configuration file @samp{lostaltmail.conf} set up -with the right parameters to properly work. @xref{Hlfsd} for more +with the right parameters to properly work. @xref{Hlfsd}, for more details. @c ---------------------------------------------------------------- @@ -7621,7 +7787,7 @@ in @dfn{italic} are replaced by an appropriate string. Variables, output. Log messages are either sent directly to a file, -or logged via the @b{syslog}(3) mechanism. @xref{log_file Parameter} +or logged via the @b{syslog}(3) mechanism. @xref{log_file Parameter}. In either case, entries in the file are of the form: @example @i{date-string} @i{hostname} @t{amd[}@i{pid}@t{]} @i{message} @@ -7890,5 +8056,7 @@ All other registered trademarks are owned by their respective owners. @c LocalWords: moisil FSinfo Libtool Unmounting sublink fileservers NullProc @c LocalWords: gethostname mount's unmounts linkx remounts unmounting UAs SA's @c LocalWords: mountpoint mountpoints unescaped UIDs util's overlayed uref EFS -@c LocalWords: serv maxgroups nfsl cachedir copt cfsadmin efs addopts fg -@c LocalWords: nointr +@c LocalWords: serv maxgroups nfsl cachedir copt cfsadmin efs addopts fg ROMs +@c LocalWords: nointr extatt setchapternewpage columnfractions alphaev gnulibc +@c LocalWords: freebsdelf gnuoldld ifhtml defperm nodefperm norrip RRIP rrip +@c LocalWords: noversion attr XXXXXX netgrpd diff --git a/contrib/amd/doc/stamp-vti b/contrib/amd/doc/stamp-vti index 05e718a..718ae23 100644 --- a/contrib/amd/doc/stamp-vti +++ b/contrib/amd/doc/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 27 December 1998 -@set EDITION 6.0 -@set VERSION 6.0 +@set UPDATED 8 September 1999 +@set EDITION 6.0.1 +@set VERSION 6.0.1 diff --git a/contrib/amd/doc/version.texi b/contrib/amd/doc/version.texi index 05e718a..718ae23 100644 --- a/contrib/amd/doc/version.texi +++ b/contrib/amd/doc/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 27 December 1998 -@set EDITION 6.0 -@set VERSION 6.0 +@set UPDATED 8 September 1999 +@set EDITION 6.0.1 +@set VERSION 6.0.1 diff --git a/contrib/amd/fsinfo/fsi_analyze.c b/contrib/amd/fsinfo/fsi_analyze.c index 7d897b80..7ba7a95 100644 --- a/contrib/amd/fsinfo/fsi_analyze.c +++ b/contrib/amd/fsinfo/fsi_analyze.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_analyze.c,v 1.1.1.1 1998/11/05 02:04:53 ezk Exp $ + * $Id: fsi_analyze.c,v 1.2 1999/01/10 21:54:27 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_data.h b/contrib/amd/fsinfo/fsi_data.h index 68d12ac..96472bb 100644 --- a/contrib/amd/fsinfo/fsi_data.h +++ b/contrib/amd/fsinfo/fsi_data.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_data.h,v 1.1.1.1 1998/11/05 02:04:54 ezk Exp $ + * $Id: fsi_data.h,v 1.2 1999/01/10 21:54:27 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_dict.c b/contrib/amd/fsinfo/fsi_dict.c index 7c4c482..395317d 100644 --- a/contrib/amd/fsinfo/fsi_dict.c +++ b/contrib/amd/fsinfo/fsi_dict.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_dict.c,v 1.1.1.1 1998/11/05 02:04:53 ezk Exp $ + * $Id: fsi_dict.c,v 1.2 1999/01/10 21:54:28 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_gram.y b/contrib/amd/fsinfo/fsi_gram.y index 50ca4d6..97a76bf 100644 --- a/contrib/amd/fsinfo/fsi_gram.y +++ b/contrib/amd/fsinfo/fsi_gram.y @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_gram.y,v 1.1.1.1 1998/11/05 02:04:54 ezk Exp $ + * $Id: fsi_gram.y,v 1.3 1999/04/16 14:21:14 ezk Exp $ * */ @@ -50,6 +50,22 @@ #include <fsi_data.h> #include <fsinfo.h> +/* 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 +#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__ */ + extern qelem *list_of_hosts, *list_of_automounts; %} diff --git a/contrib/amd/fsinfo/fsi_lex.l b/contrib/amd/fsinfo/fsi_lex.l index bd81817..ee223c2 100644 --- a/contrib/amd/fsinfo/fsi_lex.l +++ b/contrib/amd/fsinfo/fsi_lex.l @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_lex.l,v 1.1.1.1 1998/11/05 02:04:54 ezk Exp $ + * $Id: fsi_lex.l,v 1.2 1999/01/10 21:54:28 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_util.c b/contrib/amd/fsinfo/fsi_util.c index 2c3cbcc..f3fe793 100644 --- a/contrib/amd/fsinfo/fsi_util.c +++ b/contrib/amd/fsinfo/fsi_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -35,7 +35,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_util.c,v 1.1.1.1 1998/11/05 02:04:53 ezk Exp $ + * $Id: fsi_util.c,v 1.2 1999/01/10 21:54:28 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsinfo.h b/contrib/amd/fsinfo/fsinfo.h index 50224bb..a828d7b 100644 --- a/contrib/amd/fsinfo/fsinfo.h +++ b/contrib/amd/fsinfo/fsinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsinfo.h,v 1.2 1998/12/27 06:25:21 ezk Exp $ + * $Id: fsinfo.h,v 1.3 1999/01/10 21:54:29 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_atab.c b/contrib/amd/fsinfo/wr_atab.c index 474ba44..bf6bb40 100644 --- a/contrib/amd/fsinfo/wr_atab.c +++ b/contrib/amd/fsinfo/wr_atab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_atab.c,v 1.1.1.1 1998/11/05 02:04:53 ezk Exp $ + * $Id: wr_atab.c,v 1.2 1999/01/10 21:54:29 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_bparam.c b/contrib/amd/fsinfo/wr_bparam.c index de2f55e..61956c6 100644 --- a/contrib/amd/fsinfo/wr_bparam.c +++ b/contrib/amd/fsinfo/wr_bparam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_bparam.c,v 1.1.1.1 1998/11/05 02:04:53 ezk Exp $ + * $Id: wr_bparam.c,v 1.2 1999/01/10 21:54:29 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_dumpset.c b/contrib/amd/fsinfo/wr_dumpset.c index f1e027a..0428c09 100644 --- a/contrib/amd/fsinfo/wr_dumpset.c +++ b/contrib/amd/fsinfo/wr_dumpset.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_dumpset.c,v 1.1.1.1 1998/11/05 02:04:54 ezk Exp $ + * $Id: wr_dumpset.c,v 1.2 1999/01/10 21:54:30 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_exportfs.c b/contrib/amd/fsinfo/wr_exportfs.c index eb46be5..16e18c8 100644 --- a/contrib/amd/fsinfo/wr_exportfs.c +++ b/contrib/amd/fsinfo/wr_exportfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_exportfs.c,v 1.1.1.1 1998/11/05 02:04:54 ezk Exp $ + * $Id: wr_exportfs.c,v 1.2 1999/01/10 21:54:30 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_fstab.c b/contrib/amd/fsinfo/wr_fstab.c index f03e1e3..a63d47d 100644 --- a/contrib/amd/fsinfo/wr_fstab.c +++ b/contrib/amd/fsinfo/wr_fstab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_fstab.c,v 1.1.1.1 1998/11/05 02:04:54 ezk Exp $ + * $Id: wr_fstab.c,v 1.2 1999/01/10 21:54:30 ezk Exp $ * */ diff --git a/contrib/amd/hlfsd/hlfsd.h b/contrib/amd/hlfsd/hlfsd.h index 2c17792..e306ea3 100644 --- a/contrib/amd/hlfsd/hlfsd.h +++ b/contrib/amd/hlfsd/hlfsd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: hlfsd.h,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $ + * $Id: hlfsd.h,v 1.2 1999/01/10 21:54:32 ezk Exp $ * * HLFSD was written at Columbia University Computer Science Department, by * Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu> @@ -52,7 +52,7 @@ * MACROS AND CONSTANTS: */ -#define HLFSD_VERSION "hlfsd 1.1 (March 4, 1997-1998)" +#define HLFSD_VERSION "hlfsd 1.1 (March 4, 1997-1999)" #define PERS_SPOOLMODE 0755 #define OPEN_SPOOLMODE 01777 #define DOTSTRING "." diff --git a/contrib/amd/hlfsd/nfs_prot_svc.c b/contrib/amd/hlfsd/nfs_prot_svc.c index 8efe211..3fdd196 100644 --- a/contrib/amd/hlfsd/nfs_prot_svc.c +++ b/contrib/amd/hlfsd/nfs_prot_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: nfs_prot_svc.c,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $ + * $Id: nfs_prot_svc.c,v 1.3 1999/01/13 23:31:19 ezk Exp $ * */ @@ -228,7 +228,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) (SVC_IN_ARG_TYPE) &argument)) { plog(XLOG_ERROR, "NFS xdr decode failed for %d %d %d", - rqstp->rq_prog, rqstp->rq_vers, rqstp->rq_proc); + (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); svcerr_decode(transp); return; } diff --git a/contrib/amd/hlfsd/stubs.c b/contrib/amd/hlfsd/stubs.c index 637bf09..490166a 100644 --- a/contrib/amd/hlfsd/stubs.c +++ b/contrib/amd/hlfsd/stubs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: stubs.c,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $ + * $Id: stubs.c,v 1.3 1999/01/13 23:31:19 ezk Exp $ * * HLFSD was written at Columbia University Computer Science Department, by * Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu> @@ -158,7 +158,8 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) un_fattr.na_fileid = uid; res.ns_u.ns_attr_u = un_fattr; #ifdef DEBUG - dlog("nfs_getattr: successful search for uid=%d, gid=%d", uid, gid); + dlog("nfs_getattr: successful search for uid=%ld, gid=%ld", + (long) uid, (long) gid); #endif /* DEBUG */ } else { /* not found */ res.ns_status = NFSERR_STALE; @@ -248,8 +249,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) res.dr_u.dr_drok_u.drok_fhandle = un_fhandle; res.dr_status = NFS_OK; #ifdef DEBUG - dlog("nfs_lookup: successful lookup for uid=%d, gid=%d: username=%s", - uid, gid, untab[idx].username); + dlog("nfs_lookup: successful lookup for uid=%ld, gid=%ld: username=%s", + (long) uid, (long) gid, untab[idx].username); #endif /* DEBUG */ return &res; } @@ -344,8 +345,8 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) /* print info, but try to avoid repetitions */ if (userid != last_uid) { - plog(XLOG_USER, "mailbox for uid=%d, gid=%d is %s", - userid, groupid, (char *) res.rlr_u.rlr_data_u); + plog(XLOG_USER, "mailbox for uid=%ld, gid=%ld is %s", + (long) userid, (long) groupid, (char *) res.rlr_u.rlr_data_u); last_uid = userid; } diff --git a/contrib/amd/include/am_compat.h b/contrib/amd/include/am_compat.h index ccb3528..876f2ea 100644 --- a/contrib/amd/include/am_compat.h +++ b/contrib/amd/include/am_compat.h @@ -111,6 +111,16 @@ #if defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP) # define MNTTAB_OPT_RRIP "rrip" #endif /* defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP) */ +#if defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP) +# define MNTTAB_OPT_NORRIP "norrip" +#endif /* defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP) */ + +#if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) +# define MNTTAB_OPT_GENS "gens" +#endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */ +#if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) +# define MNTTAB_OPT_EXTATT "extatt" +#endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */ /* * Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options. diff --git a/contrib/amd/include/am_utils.h b/contrib/amd/include/am_utils.h index 24741b8..4098cd4 100644 --- a/contrib/amd/include/am_utils.h +++ b/contrib/amd/include/am_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: am_utils.h,v 1.2 1998/12/27 06:25:23 ezk Exp $ + * $Id: am_utils.h,v 1.6 1999/08/22 05:12:55 ezk Exp $ * */ @@ -127,6 +127,8 @@ /* allocate anything of type ty */ #define ALLOC(ty) ((ty *) xmalloc(sizeof(ty))) #define CALLOC(ty) ((ty *) xcalloc(1, sizeof(ty))) +/* simply allocate b bytes */ +#define SALLOC(b) xmalloc((b)) /* converting am-filehandles to mount-points */ #define fh_to_mp2(fhp, rp) fh_to_mp3(fhp, rp, VLOOK_CREATE) @@ -565,6 +567,7 @@ extern int amu_close(int fd); extern int background(void); extern int bind_resv_port(int, u_short *); extern int cmdoption(char *, struct opt_tab *, int *); +extern int compute_automounter_mount_flags(mntent_t *); extern int compute_mount_flags(mntent_t *); extern int efs_readdir(am_node *, nfscookie, nfsdirlist *, nfsentry *, int); extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *); @@ -640,7 +643,8 @@ extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp); extern void normalize_slash(char *); extern void ops_showamfstypes(char *buf); extern void ops_showfstypes(char *outbuf); -extern void plog(int, char *,...); +extern void plog(int, char *,...) + __attribute__ ((__format__ (__printf__, 2, 3))); extern void rem_que(qelem *); extern void reschedule_timeout_mp(void); extern void restart(void); @@ -961,7 +965,8 @@ extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version); extern int debug_flags; /* Debug options */ extern int debug_option (char *opt); extern struct opt_tab dbg_opt[]; -extern void dplog(char *fmt, ...); +extern void dplog(char *fmt, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); /**************************************************************************/ /*** MISC (stuff left to autoconfiscate) ***/ diff --git a/contrib/amd/include/am_xdr_func.h b/contrib/amd/include/am_xdr_func.h index 206217c..b50e008 100644 --- a/contrib/amd/include/am_xdr_func.h +++ b/contrib/amd/include/am_xdr_func.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: am_xdr_func.h,v 1.1.1.1 1998/11/05 02:04:43 ezk Exp $ + * $Id: am_xdr_func.h,v 1.2 1999/01/10 21:54:35 ezk Exp $ * */ diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h index f3caf8a..6564e24 100644 --- a/contrib/amd/include/amq_defs.h +++ b/contrib/amd/include/amq_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq_defs.h,v 1.1.1.1 1998/11/05 02:04:44 ezk Exp $ + * $Id: amq_defs.h,v 1.3 1999/09/08 23:36:52 ezk Exp $ * */ @@ -51,7 +51,7 @@ #ifndef AMQ_SIZE # define AMQ_SIZE 16384 #endif /* not AMQ_SIZE */ -#define AMQ_STRLEN 1024 +#define AMQ_STRLEN 2048 #define AMQ_PROGRAM ((u_long)300019) #define AMQ_VERSION ((u_long)1) #define AMQPROC_NULL ((u_long)0) diff --git a/contrib/amd/libamu/alloca.c b/contrib/amd/libamu/alloca.c new file mode 100644 index 0000000..31fb4e0 --- /dev/null +++ b/contrib/amd/libamu/alloca.c @@ -0,0 +1,504 @@ +/* alloca.c -- allocate automatically reclaimed memory + (Mostly) portable public-domain implementation -- D A Gwyn + + This implementation of the PWB library alloca function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + J.Otto Tennant <jot@cray.com> contributed the Cray support. + + There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + +#ifdef emacs +#include "blockinput.h" +#endif + +/* If compiling with GCC 2, this file's not needed. */ +#if !defined (__GNUC__) || __GNUC__ < 2 + +/* If someone has defined alloca as a macro, + there must be some other way alloca is supposed to work. */ +#ifndef alloca + +#ifdef emacs +#ifdef static +/* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ +#ifndef STACK_DIRECTION +you +lose +-- must know STACK_DIRECTION at compile-time +#endif /* STACK_DIRECTION undefined */ +#endif /* static */ +#endif /* emacs */ + +/* If your stack is a linked list of frames, you have to + provide an "address metric" ADDRESS_FUNCTION macro. */ + +#if defined (CRAY) && defined (CRAY_STACKSEG_END) +long i00afunc (); +#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) +#else +#define ADDRESS_FUNCTION(arg) &(arg) +#endif + +#if __STDC__ +typedef void *pointer; +#else +typedef char *pointer; +#endif + +#ifndef NULL +#define NULL 0 +#endif + +/* Different portions of Emacs need to call different versions of + malloc. The Emacs executable needs alloca to call xmalloc, because + ordinary malloc isn't protected from input signals. On the other + hand, the utilities in lib-src need alloca to call malloc; some of + them are very simple, and don't have an xmalloc routine. + + Non-Emacs programs expect this to call use xmalloc. + + Callers below should use malloc. */ + +#ifndef emacs +#define malloc xmalloc +#endif +extern pointer malloc (); + +/* Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ + +#ifndef STACK_DIRECTION +#define STACK_DIRECTION 0 /* Direction unknown. */ +#endif + +#if STACK_DIRECTION != 0 + +#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ + +#else /* STACK_DIRECTION == 0; need run-time code. */ + +static int stack_dir; /* 1 or -1 once known. */ +#define STACK_DIR stack_dir + +static void +find_stack_direction () +{ + static char *addr = NULL; /* Address of first `dummy', once known. */ + auto char dummy; /* To get stack address. */ + + if (addr == NULL) + { /* Initial entry. */ + addr = ADDRESS_FUNCTION (dummy); + + find_stack_direction (); /* Recurse once. */ + } + else + { + /* Second entry. */ + if (ADDRESS_FUNCTION (dummy) > addr) + stack_dir = 1; /* Stack grew upward. */ + else + stack_dir = -1; /* Stack grew downward. */ + } +} + +#endif /* STACK_DIRECTION == 0 */ + +/* An "alloca header" is used to: + (a) chain together all alloca'ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc + alignment chunk size. The following default should work okay. */ + +#ifndef ALIGN_SIZE +#define ALIGN_SIZE sizeof(double) +#endif + +typedef union hdr +{ + char align[ALIGN_SIZE]; /* To force sizeof(header). */ + struct + { + union hdr *next; /* For chaining headers. */ + char *deep; /* For stack depth measure. */ + } h; +} header; + +static header *last_alloca_header = NULL; /* -> last alloca header. */ + +/* Return a pointer to at least SIZE bytes of storage, + which will be automatically reclaimed upon exit from + the procedure that called alloca. Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. */ + +pointer +alloca (size) + unsigned size; +{ + auto char probe; /* Probes stack depth: */ + register char *depth = ADDRESS_FUNCTION (probe); + +#if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* Unknown growth direction. */ + find_stack_direction (); +#endif + + /* Reclaim garbage, defined as all alloca'd storage that + was allocated from deeper in the stack than currently. */ + + { + register header *hp; /* Traverses linked list. */ + +#ifdef emacs + BLOCK_INPUT; +#endif + + for (hp = last_alloca_header; hp != NULL;) + if ((STACK_DIR > 0 && hp->h.deep > depth) + || (STACK_DIR < 0 && hp->h.deep < depth)) + { + register header *np = hp->h.next; + + free ((pointer) hp); /* Collect garbage. */ + + hp = np; /* -> next header. */ + } + else + break; /* Rest are not deeper. */ + + last_alloca_header = hp; /* -> last valid storage. */ + +#ifdef emacs + UNBLOCK_INPUT; +#endif + } + + if (size == 0) + return NULL; /* No allocation required. */ + + /* Allocate combined header + user data storage. */ + + { + register pointer new = malloc (sizeof (header) + size); + /* Address of header. */ + + if (new == 0) + abort(); + + ((header *) new)->h.next = last_alloca_header; + ((header *) new)->h.deep = depth; + + last_alloca_header = (header *) new; + + /* User storage begins just after header. */ + + return (pointer) ((char *) new + sizeof (header)); + } +} + +#if defined (CRAY) && defined (CRAY_STACKSEG_END) + +#ifdef DEBUG_I00AFUNC +#include <stdio.h> +#endif + +#ifndef CRAY_STACK +#define CRAY_STACK +#ifndef CRAY2 +/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ +struct stack_control_header + { + long shgrow:32; /* Number of times stack has grown. */ + long shaseg:32; /* Size of increments to stack. */ + long shhwm:32; /* High water mark of stack. */ + long shsize:32; /* Current size of stack (all segments). */ + }; + +/* The stack segment linkage control information occurs at + the high-address end of a stack segment. (The stack + grows from low addresses to high addresses.) The initial + part of the stack segment linkage control information is + 0200 (octal) words. This provides for register storage + for the routine which overflows the stack. */ + +struct stack_segment_linkage + { + long ss[0200]; /* 0200 overflow words. */ + long sssize:32; /* Number of words in this segment. */ + long ssbase:32; /* Offset to stack base. */ + long:32; + long sspseg:32; /* Offset to linkage control of previous + segment of stack. */ + long:32; + long sstcpt:32; /* Pointer to task common address block. */ + long sscsnm; /* Private control structure number for + microtasking. */ + long ssusr1; /* Reserved for user. */ + long ssusr2; /* Reserved for user. */ + long sstpid; /* Process ID for pid based multi-tasking. */ + long ssgvup; /* Pointer to multitasking thread giveup. */ + long sscray[7]; /* Reserved for Cray Research. */ + long ssa0; + long ssa1; + long ssa2; + long ssa3; + long ssa4; + long ssa5; + long ssa6; + long ssa7; + long sss0; + long sss1; + long sss2; + long sss3; + long sss4; + long sss5; + long sss6; + long sss7; + }; + +#else /* CRAY2 */ +/* The following structure defines the vector of words + returned by the STKSTAT library routine. */ +struct stk_stat + { + long now; /* Current total stack size. */ + long maxc; /* Amount of contiguous space which would + be required to satisfy the maximum + stack demand to date. */ + long high_water; /* Stack high-water mark. */ + long overflows; /* Number of stack overflow ($STKOFEN) calls. */ + long hits; /* Number of internal buffer hits. */ + long extends; /* Number of block extensions. */ + long stko_mallocs; /* Block allocations by $STKOFEN. */ + long underflows; /* Number of stack underflow calls ($STKRETN). */ + long stko_free; /* Number of deallocations by $STKRETN. */ + long stkm_free; /* Number of deallocations by $STKMRET. */ + long segments; /* Current number of stack segments. */ + long maxs; /* Maximum number of stack segments so far. */ + long pad_size; /* Stack pad size. */ + long current_address; /* Current stack segment address. */ + long current_size; /* Current stack segment size. This + number is actually corrupted by STKSTAT to + include the fifteen word trailer area. */ + long initial_address; /* Address of initial segment. */ + long initial_size; /* Size of initial segment. */ + }; + +/* The following structure describes the data structure which trails + any stack segment. I think that the description in 'asdef' is + out of date. I only describe the parts that I am sure about. */ + +struct stk_trailer + { + long this_address; /* Address of this block. */ + long this_size; /* Size of this block (does not include + this trailer). */ + long unknown2; + long unknown3; + long link; /* Address of trailer block of previous + segment. */ + long unknown5; + long unknown6; + long unknown7; + long unknown8; + long unknown9; + long unknown10; + long unknown11; + long unknown12; + long unknown13; + long unknown14; + }; + +#endif /* CRAY2 */ +#endif /* not CRAY_STACK */ + +#ifdef CRAY2 +/* Determine a "stack measure" for an arbitrary ADDRESS. + I doubt that "lint" will like this much. */ + +static long +i00afunc (long *address) +{ + struct stk_stat status; + struct stk_trailer *trailer; + long *block, size; + long result = 0; + + /* We want to iterate through all of the segments. The first + step is to get the stack status structure. We could do this + more quickly and more directly, perhaps, by referencing the + $LM00 common block, but I know that this works. */ + + STKSTAT (&status); + + /* Set up the iteration. */ + + trailer = (struct stk_trailer *) (status.current_address + + status.current_size + - 15); + + /* There must be at least one stack segment. Therefore it is + a fatal error if "trailer" is null. */ + + if (trailer == 0) + abort (); + + /* Discard segments that do not contain our argument address. */ + + while (trailer != 0) + { + block = (long *) trailer->this_address; + size = trailer->this_size; + if (block == 0 || size == 0) + abort (); + trailer = (struct stk_trailer *) trailer->link; + if ((block <= address) && (address < (block + size))) + break; + } + + /* Set the result to the offset in this segment and add the sizes + of all predecessor segments. */ + + result = address - block; + + if (trailer == 0) + { + return result; + } + + do + { + if (trailer->this_size <= 0) + abort (); + result += trailer->this_size; + trailer = (struct stk_trailer *) trailer->link; + } + while (trailer != 0); + + /* We are done. Note that if you present a bogus address (one + not in any segment), you will get a different number back, formed + from subtracting the address of the first block. This is probably + not what you want. */ + + return (result); +} + +#else /* not CRAY2 */ +/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. + Determine the number of the cell within the stack, + given the address of the cell. The purpose of this + routine is to linearize, in some sense, stack addresses + for alloca. */ + +static long +i00afunc (long address) +{ + long stkl = 0; + + long size, pseg, this_segment, stack; + long result = 0; + + struct stack_segment_linkage *ssptr; + + /* Register B67 contains the address of the end of the + current stack segment. If you (as a subprogram) store + your registers on the stack and find that you are past + the contents of B67, you have overflowed the segment. + + B67 also points to the stack segment linkage control + area, which is what we are really interested in. */ + + stkl = CRAY_STACKSEG_END (); + ssptr = (struct stack_segment_linkage *) stkl; + + /* If one subtracts 'size' from the end of the segment, + one has the address of the first word of the segment. + + If this is not the first segment, 'pseg' will be + nonzero. */ + + pseg = ssptr->sspseg; + size = ssptr->sssize; + + this_segment = stkl - size; + + /* It is possible that calling this routine itself caused + a stack overflow. Discard stack segments which do not + contain the target address. */ + + while (!(this_segment <= address && address <= stkl)) + { +#ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); +#endif + if (pseg == 0) + break; + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + this_segment = stkl - size; + } + + result = address - this_segment; + + /* If you subtract pseg from the current end of the stack, + you get the address of the previous stack segment's end. + This seems a little convoluted to me, but I'll bet you save + a cycle somewhere. */ + + while (pseg != 0) + { +#ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o\n", pseg, size); +#endif + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + result += size; + } + return (result); +} + +#endif /* not CRAY2 */ +#endif /* CRAY */ + +#endif /* no alloca */ +#endif /* not GCC version 2 */ diff --git a/contrib/amd/libamu/amu.h b/contrib/amd/libamu/amu.h index 38532d0..a22371e 100644 --- a/contrib/amd/libamu/amu.h +++ b/contrib/amd/libamu/amu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amu.h,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: amu.h,v 1.2 1999/01/10 21:54:36 ezk Exp $ * */ diff --git a/contrib/amd/libamu/hasmntopt.c b/contrib/amd/libamu/hasmntopt.c index 2ed75f5..5f19e71 100644 --- a/contrib/amd/libamu/hasmntopt.c +++ b/contrib/amd/libamu/hasmntopt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ n * modification, are permitted provided that the following conditions * * %W% (Berkeley) %G% * - * $Id: hasmntopt.c,v 1.1.1.1 1998/11/05 02:04:44 ezk Exp $ + * $Id: hasmntopt.c,v 1.2 1999/01/10 21:54:37 ezk Exp $ * */ diff --git a/contrib/amd/libamu/misc_rpc.c b/contrib/amd/libamu/misc_rpc.c index ec34e35..fa402c3 100644 --- a/contrib/amd/libamu/misc_rpc.c +++ b/contrib/amd/libamu/misc_rpc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: misc_rpc.c,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: misc_rpc.c,v 1.2 1999/01/10 21:54:37 ezk Exp $ * */ diff --git a/contrib/amd/libamu/mtab.c b/contrib/amd/libamu/mtab.c index 7fe95de..3bcc38d 100644 --- a/contrib/amd/libamu/mtab.c +++ b/contrib/amd/libamu/mtab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: mtab.c,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: mtab.c,v 1.2 1999/01/10 21:54:37 ezk Exp $ * */ diff --git a/contrib/amd/libamu/nfs_prot_xdr.c b/contrib/amd/libamu/nfs_prot_xdr.c index cbe6793..874f57a 100644 --- a/contrib/amd/libamu/nfs_prot_xdr.c +++ b/contrib/amd/libamu/nfs_prot_xdr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: nfs_prot_xdr.c,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: nfs_prot_xdr.c,v 1.2 1999/01/10 21:54:38 ezk Exp $ * */ diff --git a/contrib/amd/libamu/util.c b/contrib/amd/libamu/util.c index 0650de2..72fcdad 100644 --- a/contrib/amd/libamu/util.c +++ b/contrib/amd/libamu/util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: util.c,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: util.c,v 1.2 1999/01/10 21:54:39 ezk Exp $ * */ diff --git a/contrib/amd/libamu/wire.c b/contrib/amd/libamu/wire.c index bd7b5ad..c8ed892 100644 --- a/contrib/amd/libamu/wire.c +++ b/contrib/amd/libamu/wire.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wire.c,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: wire.c,v 1.5 1999/09/08 23:36:52 ezk Exp $ * */ @@ -61,6 +61,14 @@ #include <amu.h> +#ifdef HAVE_IFADDRS_H +#include <ifaddrs.h> +#endif /* HAVE_IFADDRS_H */ + +#ifdef HAVE_IRS_H +# include <irs.h> +#endif /* HAVE_IRS_H */ + /* * List of locally connected networks */ @@ -78,16 +86,9 @@ static addrlist *localnets = NULL; # define IFF_LOOPBACK IFF_LOCAL_LOOPBACK #endif /* defined(IFF_LOCAL_LOOPBACK) && !defined(IFF_LOOPBACK) */ -#if defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) -# define SIZE(ifr) (MAX((ifr)->ifr_addr.sa_len, sizeof((ifr)->ifr_addr)) + sizeof(ifr->ifr_name)) -#else /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) */ -# define SIZE(ifr) sizeof(struct ifreq) -#endif /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) */ - #define C(x) ((x) & 0xff) #define GFBUFLEN 1024 -#define clist (ifc.ifc_ifcu.ifcu_req) -#define count (ifc.ifc_len/sizeof(struct ifreq)) +#define S2IN(s) (((struct sockaddr_in *)(s))->sin_addr.s_addr) /* return malloc'ed buffer. caller must free it */ @@ -101,7 +102,7 @@ print_wires(void) int bufcount = 0; int buf_size = 1024; - buf = malloc(1024); + buf = SALLOC(1024); if (!buf) return NULL; @@ -131,22 +132,262 @@ print_wires(void) } +static struct addrlist * +getwire_lookup(u_long address, u_long netmask, int ishost) +{ + struct addrlist *al; + u_long subnet; + char netNumberBuf[64]; + char buf[GFBUFLEN], *s; +#ifdef HAVE_IRS_H + struct nwent *np; +#else /* not HAVE_IRS_H */ + struct netent *np; +#endif /* not HAVE_IRS_H */ + + /* + * Add interface to local network singly linked list + */ + al = ALLOC(struct addrlist); + al->ip_addr = address; + al->ip_mask = netmask; + al->ip_net_name = NO_SUBNET; /* fill in a bit later */ + al->ip_net_num = "0.0.0.0"; /* fill in a bit later */ + al->ip_next = NULL; + + subnet = ntohl(address) & ntohl(netmask); + + if (ishost) + np = NULL; + else { +#ifdef HAVE_IRS_H + u_long mask = ntohl(netmask); + static struct irs_acc *irs_gen; + static struct irs_nw *irs_nw; + u_long net; + int maskbits; + u_char addr[4]; + + if (irs_gen == NULL) + irs_gen = irs_gen_acc(""); + if (irs_gen && irs_nw == NULL) + irs_nw = (*irs_gen->nw_map)(irs_gen); + net = ntohl(address) & (mask = ntohl(netmask)); + addr[0] = (0xFF000000 & net) >> 24; + addr[1] = (0x00FF0000 & net) >> 16; + addr[2] = (0x0000FF00 & net) >> 8; + addr[3] = (0x000000FF & net); + for (maskbits = 32; !(mask & 1); mask >>= 1) + maskbits--; + np = (*irs_nw->byaddr)(irs_nw, addr, maskbits, AF_INET); +#else /* not HAVE_IRS_H */ + np = getnetbyaddr(subnet, AF_INET); + /* + * Some systems (IRIX 6.4) cannot getnetbyaddr on networks such as + * "128.59.16.0". Instead, they need to look for the short form of + * the network, "128.59.16". So if the first getnetbyaddr failed, we + * shift the subnet way from zeros and try again. + */ + if (!np) { + u_long short_subnet = subnet; + while(short_subnet && (short_subnet & 0x000000ff) == 0) + short_subnet >>= 8; + np = getnetbyaddr(short_subnet, AF_INET); + if (np) + plog(XLOG_WARNING, "getnetbyaddr failed on 0x%x, succeeded on 0x%x", + (u_int) subnet, (u_int) short_subnet); + } +#endif /* not HAVE_IRS_H */ + } + + if ((subnet & 0xffffff) == 0) { + sprintf(netNumberBuf, "%lu", C(subnet >> 24)); + } else if ((subnet & 0xffff) == 0) { + sprintf(netNumberBuf, "%lu.%lu", + C(subnet >> 24), C(subnet >> 16)); + } else if ((subnet & 0xff) == 0) { + sprintf(netNumberBuf, "%lu.%lu.%lu", + C(subnet >> 24), C(subnet >> 16), + C(subnet >> 8)); + } else { + sprintf(netNumberBuf, "%lu.%lu.%lu.%lu", + C(subnet >> 24), C(subnet >> 16), + C(subnet >> 8), C(subnet)); + } + + /* fill in network number (string) */ + al->ip_net_num = strdup(netNumberBuf); + + if (np != NULL) + s = np->n_name; + else { + struct hostent *hp; + + subnet = address & netmask; + hp = gethostbyaddr((char *) &subnet, 4, AF_INET); + if (hp != NULL) + s = (char *) hp->h_name; + else + s = inet_dquad(buf, subnet); + } + + /* fill in network name (string) */ + al->ip_net_name = strdup(s); + + return (al); +} + + +/* + * Make a dotted quad from a 32bit IP address + * addr is in network byte order. + * sizeof(buf) needs to be at least 16. + */ +char * +inet_dquad(char *buf, u_long addr) +{ + addr = ntohl(addr); + sprintf(buf, "%ld.%ld.%ld.%ld", + ((addr >> 24) & 0xff), + ((addr >> 16) & 0xff), + ((addr >> 8) & 0xff), + ((addr >> 0) & 0xff)); + return buf; +} + + +/* + * Determine whether a network is on a local network + * (addr) is in network byte order. + */ +int +islocalnet(u_long addr) +{ + addrlist *al; +#ifdef DEBUG + char buf[16]; +#endif /* DEBUG */ + + for (al = localnets; al; al = al->ip_next) + if (((addr ^ al->ip_addr) & al->ip_mask) == 0) + return TRUE; + +#ifdef DEBUG + plog(XLOG_INFO, "%s is on a remote network", inet_dquad(buf, addr)); +#endif /* DEBUG */ + + return FALSE; +} + + +/* + * Determine whether a network name is one of the local networks + * of a host. + */ +int +is_network_member(const char *net) +{ + addrlist *al; + + for (al = localnets; al; al = al->ip_next) + if (STREQ(net, al->ip_net_name) || STREQ(net, al->ip_net_num)) + return TRUE; + + return FALSE; +} + + +#ifdef HAVE_GETIFADDRS +void +getwire(char **name1, char **number1) +{ + addrlist *al = NULL, *tail = NULL; + struct ifaddrs *ifaddrs, *ifap; +#ifndef HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT + int count = 0, i; +#endif /* not HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT */ + + ifaddrs = NULL; +#ifdef HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT + if (getifaddrs(&ifaddrs) < 0) + goto out; + + for (ifap = ifaddrs; ifap != NULL; ifap = ifap->ifa_next) { +#else /* not HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT */ + if (getifaddrs(&ifaddrs, &count) < 0) + goto out; + + for (i = 0,ifap = ifaddrs; i < count; ifap++, i++) { +#endif /* HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT */ + + if (!ifap || !ifap->ifa_addr || ifap->ifa_addr->sa_family != AF_INET) + continue; + + /* + * If the interface is a loopback, or its not running + * then ignore it. + */ + if ((ifap->ifa_flags & IFF_LOOPBACK) != 0) + continue; + if ((ifap->ifa_flags & IFF_RUNNING) == 0) + continue; + + if ((ifap->ifa_flags & IFF_POINTOPOINT) == 0) + al = getwire_lookup(S2IN(ifap->ifa_addr), S2IN(ifap->ifa_netmask), 0); + else + al = getwire_lookup(S2IN(ifap->ifa_dstaddr), 0xffffffff, 1); + + /* append to the end of the list */ + if (!localnets) { + localnets = tail = al; + tail->ip_next = NULL; + } else { + tail->ip_next = al; + tail = al; + } + } + +out: + if (ifaddrs) + XFREE(ifaddrs); + + if (localnets) { + *name1 = localnets->ip_net_name; + *number1 = localnets->ip_net_num; + } else { + *name1 = NO_SUBNET; + *number1 = "0.0.0.0"; + } +} + +#else /* not HAVE_GETIFADDRS */ + +#if defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) +# define SIZE(ifr) (MAX((ifr)->ifr_addr.sa_len, sizeof((ifr)->ifr_addr)) + sizeof(ifr->ifr_name)) +#else /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) */ +# define SIZE(ifr) sizeof(struct ifreq) +#endif /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) */ + +#define clist (ifc.ifc_ifcu.ifcu_req) +#define count (ifc.ifc_len/sizeof(struct ifreq)) + + void getwire(char **name1, char **number1) { - struct hostent *hp; - struct netent *np; struct ifconf ifc; struct ifreq *ifr; caddr_t cp, cplim; - u_long address, netmask, subnet; - char buf[GFBUFLEN], *s; int fd = -1; + u_long address; + addrlist *al = NULL, *tail = NULL; + char buf[GFBUFLEN]; +#if 0 u_long net; u_long mask; u_long subnetshift; - char netNumberBuf[64]; - addrlist *al = NULL, *tail = NULL; + char buf[GFBUFLEN], *s; +#endif #ifndef SIOCGIFFLAGS /* if cannot get interface flags, return nothing */ @@ -194,8 +435,8 @@ getwire(char **name1, char **number1) if (ifr->ifr_addr.sa_family != AF_INET) continue; - else - address = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr; + + address = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr; /* * Get interface flags @@ -225,23 +466,17 @@ getwire(char **name1, char **number1) (ifr->ifr_flags & IFF_UP) == 0) continue; - /* - * Get the netmask of this interface - */ - if (ioctl(fd, SIOCGIFNETMASK, (caddr_t) ifr) < 0) - continue; + if ((ifr->ifr_flags & IFF_POINTOPOINT) == 0) { + /* + * Get the netmask of this interface + */ + if (ioctl(fd, SIOCGIFNETMASK, (caddr_t) ifr) < 0) + continue; - netmask = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr; + al = getwire_lookup(address, S2IN(&ifr->ifr_addr), 0); + } else + al = getwire_lookup(address, 0xffffffff, 1); - /* - * Add interface to local network singly linked list - */ - al = ALLOC(struct addrlist); - al->ip_addr = address; - al->ip_mask = netmask; - al->ip_net_name = NO_SUBNET; /* fill in a bit later */ - al->ip_net_num = "0.0.0.0"; /* fill in a bit later */ - al->ip_next = NULL; /* append to the end of the list */ if (!localnets) { localnets = tail = al; @@ -250,86 +485,6 @@ getwire(char **name1, char **number1) tail->ip_next = al; tail = al; } - - /* - * Figure out the subnet's network address - */ - subnet = address & netmask; - -#ifdef IN_CLASSA - subnet = htonl(subnet); - - if (IN_CLASSA(subnet)) { - mask = IN_CLASSA_NET; - subnetshift = 8; - } else if (IN_CLASSB(subnet)) { - mask = IN_CLASSB_NET; - subnetshift = 8; - } else { - mask = IN_CLASSC_NET; - subnetshift = 4; - } - - /* - * If there are more bits than the standard mask - * would suggest, subnets must be in use. - * Guess at the subnet mask, assuming reasonable - * width subnet fields. - * XXX: Or-in at least 1 byte's worth of 1s to make - * sure the top bits remain set. - */ - while (subnet & ~mask) - mask = (mask >> subnetshift) | 0xff000000; - - net = subnet & mask; - while ((mask & 1) == 0) - mask >>= 1, net >>= 1; - - /* - * Now get a usable name. - * First use the network database, - * then the host database, - * and finally just make a dotted quad. - */ - np = getnetbyaddr(net, AF_INET); - - /* the network address has been masked off */ - if ((subnet & 0xffffff) == 0) { - sprintf(netNumberBuf, "%lu", C(subnet >> 24)); - } else if ((subnet & 0xffff) == 0) { - sprintf(netNumberBuf, "%lu.%lu", - C(subnet >> 24), C(subnet >> 16)); - } else if ((subnet & 0xff) == 0) { - sprintf(netNumberBuf, "%lu.%lu.%lu", - C(subnet >> 24), C(subnet >> 16), - C(subnet >> 8)); - } else { - sprintf(netNumberBuf, "%lu.%lu.%lu.%lu", - C(subnet >> 24), C(subnet >> 16), - C(subnet >> 8), C(subnet)); - } - - /* fill in network number (string) */ - al->ip_net_num = strdup(netNumberBuf); - -#else /* not IN_CLASSA */ - /* This is probably very wrong. */ - np = getnetbyaddr(subnet, AF_INET); -#endif /* not IN_CLASSA */ - - if (np) - s = np->n_name; - else { - subnet = address & netmask; - hp = gethostbyaddr((char *) &subnet, 4, AF_INET); - if (hp) - s = (char *) hp->h_name; - else - s = inet_dquad(buf, subnet); - } - - /* fill in network name (string) */ - al->ip_net_name = strdup(s); } out: @@ -343,62 +498,4 @@ out: *number1 = "0.0.0.0"; } } - - -/* - * Make a dotted quad from a 32bit IP address - * addr is in network byte order. - * sizeof(buf) needs to be at least 16. - */ -char * -inet_dquad(char *buf, u_long addr) -{ - addr = ntohl(addr); - sprintf(buf, "%ld.%ld.%ld.%ld", - ((addr >> 24) & 0xff), - ((addr >> 16) & 0xff), - ((addr >> 8) & 0xff), - ((addr >> 0) & 0xff)); - return buf; -} - - -/* - * Determine whether a network is on a local network - * (addr) is in network byte order. - */ -int -islocalnet(u_long addr) -{ - addrlist *al; -#ifdef DEBUG - char buf[16]; -#endif /* DEBUG */ - - for (al = localnets; al; al = al->ip_next) - if (((addr ^ al->ip_addr) & al->ip_mask) == 0) - return TRUE; - -#ifdef DEBUG - plog(XLOG_INFO, "%s is on a remote network", inet_dquad(buf, addr)); -#endif /* DEBUG */ - - return FALSE; -} - - -/* - * Determine whether a network name is one of the local networks - * of a host. - */ -int -is_network_member(const char *net) -{ - addrlist *al; - - for (al = localnets; al; al = al->ip_next) - if (STREQ(net, al->ip_net_name) || STREQ(net, al->ip_net_num)) - return TRUE; - - return FALSE; -} +#endif /* not HAVE_GETIFADDRS */ diff --git a/contrib/amd/libamu/xdr_func.c b/contrib/amd/libamu/xdr_func.c index 365d390..deeb205 100644 --- a/contrib/amd/libamu/xdr_func.c +++ b/contrib/amd/libamu/xdr_func.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: xdr_func.c,v 1.1.1.1 1998/11/05 02:04:45 ezk Exp $ + * $Id: xdr_func.c,v 1.2 1999/01/10 21:54:39 ezk Exp $ * */ diff --git a/contrib/amd/libamu/xutil.c b/contrib/amd/libamu/xutil.c index d069f7a..5ba4938 100644 --- a/contrib/amd/libamu/xutil.c +++ b/contrib/amd/libamu/xutil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: xutil.c,v 1.2 1998/12/27 06:25:24 ezk Exp $ + * $Id: xutil.c,v 1.6 1999/09/08 23:36:53 ezk Exp $ * */ @@ -48,7 +48,12 @@ #include <am_defs.h> #include <amu.h> -FILE *logfp = stderr; /* Log errors to stderr initially */ +/* + * Logfp is the default logging device, and is initialized to stderr by + * default in dplog/plog below, and in + * amd/amfs_program.c:amfs_program_exec(). + */ +FILE *logfp = NULL; static char *am_progname = "unknown"; /* "amd" */ static char am_hostname[MAXHOSTNAMELEN + 1] = "unknown"; /* Hostname */ @@ -272,30 +277,38 @@ checkup_mem(void) /* * Take a log format string and expand occurrences of %m - * with the current error code taken from errno. + * with the current error code taken from errno. Make sure + * 'e' never gets longer than maxlen characters. */ static void -expand_error(char *f, char *e) +expand_error(char *f, char *e, int maxlen) { extern int sys_nerr; - char *p; + char *p, *q; int error = errno; + int len = 0; - for (p = f; (*e = *p); e++, p++) { + for (p = f, q = e; (*q = *p) && len < maxlen; len++, q++, p++) { if (p[0] == '%' && p[1] == 'm') { const char *errstr; if (error < 0 || error >= sys_nerr) errstr = NULL; else - errstr = sys_errlist[error]; +#ifdef HAVE_STRERROR + errstr = strerror(error); +#else /* not HAVE_STRERROR */ + errstr = sys_errlist[error]; +#endif /* not HAVE_STRERROR */ if (errstr) - strcpy(e, errstr); + strcpy(q, errstr); else - sprintf(e, "Error %d", error); - e += strlen(e) - 1; + sprintf(q, "Error %d", error); + len += strlen(q) - 1; + q += strlen(q) - 1; p++; } } + e[maxlen-1] = '\0'; /* null terminate, to be sure */ } @@ -367,6 +380,9 @@ dplog(char *fmt, ...) { va_list ap; + if (!logfp) + logfp = stderr; /* initialize before possible first use */ + va_start(ap, fmt); real_plog(XLOG_DEBUG, fmt, ap); va_end(ap); @@ -379,6 +395,9 @@ plog(int lvl, char *fmt, ...) { va_list ap; + if (!logfp) + logfp = stderr; /* initialize before possible first use */ + va_start(ap, fmt); real_plog(lvl, fmt, ap); va_end(ap); @@ -401,9 +420,15 @@ real_plog(int lvl, char *fmt, va_list vargs) checkup_mem(); #endif /* DEBUG_MEM */ - expand_error(fmt, efmt); + expand_error(fmt, efmt, 1024); + /* + * XXX: ptr is 1024 bytes long. It is possible to write into it + * more than 1024 bytes, if efmt is already large, and vargs expand + * as well. + */ vsprintf(ptr, efmt, vargs); + msg[1023] = '\0'; /* null terminate, to be sure */ ptr += strlen(ptr); if (ptr[-1] == '\n') @@ -616,6 +641,7 @@ switch_option(char *opt) return rc; } +#ifdef LOG_DAEMON /* * get syslog facility to use. * logfile can be "syslog", "syslog:daemon", "syslog:local7", etc. @@ -647,10 +673,10 @@ get_syslog_facility(const char *logfile) if (STREQ(facstr, "mail")) return LOG_MAIL; #endif /* not LOG_MAIL */ -#ifdef LOG_DAEMON + if (STREQ(facstr, "daemon")) return LOG_DAEMON; -#endif /* not LOG_DAEMON */ + #ifdef LOG_AUTH if (STREQ(facstr, "auth")) return LOG_AUTH; @@ -712,6 +738,7 @@ get_syslog_facility(const char *logfile) plog(XLOG_WARNING, "unknown syslog facility \"%s\", using LOG_DAEMON", facstr); return LOG_DAEMON; } +#endif /* not LOG_DAEMON */ /* diff --git a/contrib/amd/scripts/automount2amd.8 b/contrib/amd/scripts/automount2amd.8 new file mode 100644 index 0000000..c1c1d8b --- /dev/null +++ b/contrib/amd/scripts/automount2amd.8 @@ -0,0 +1,106 @@ +.\" +.\" Copyright (c) 1997-1999 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: automount2amd.8,v 1.1 1999/08/16 01:16:36 ezk Exp $ +.\" +.TH AUTOMOUNT2AMD 8L "24 May 1993" +.SH NAME +automount2amd \- converts old Sun automount maps to Amd maps +.SH SYNOPSIS +.B automount2amd +.I auto.map +.SH DESCRIPTION +.LP +.B automount2amd +is used to convert an old Sun automount maps named +.I auto.map +to an Amd map. + +This perl script will use the following /default entry +.nf + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 +.fi +If you wish to override that, define the +.B $DEFAULTS +environment variable, or modify the script. + +If you wish to generate Amd maps using the +.I hostd +(host domain) Amd map syntax, then define the environment variable +.B $DOMAIN +or modify the script. + +.SH EXAMPLE +Say you have the Sun automount file auto.foo, with these two lines: +.nf + home earth:/home + moon -ro,intr server:/proj/images +.fi +Running +.nf + automount2amd auto.foo > amd.foo +.fi +will produce the Amd map +.I amd.foo +with this content: +.nf +# generated by automount2amd on Sat Aug 14 17:59:32 US/Eastern 1999 + +/defaults \\ + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 + +home \ + host==earth;type:=link;fs:=/home \\ + rhost:=earth;rfs:=/home + +moon \ + -addopts:=ro,intr \\ + host==server;type:=link;fs:=/proj/images \\ + rhost:=server;rfs:=/proj/images +.fi +.SH BUGS +.I automount2amd +does not understand newer Sun Automount map syntax, those used by autofs. +.SH "SEE ALSO" +.BR conv2amd (8), amd (8). +.SH AUTHORS +Original author Mike Walker <mike@tab00.larc.nasa.gov>. Script modified by +Erez Zadok <ezk@cs.columbia.edu>, Department of Computer Science, Columbia +University, New York, USA. diff --git a/contrib/amd/scripts/automount2amd.in b/contrib/amd/scripts/automount2amd.in new file mode 100755 index 0000000..e99c74b --- /dev/null +++ b/contrib/amd/scripts/automount2amd.in @@ -0,0 +1,72 @@ +#!@PERL@ -w +# +# Convert Sun automount map format to amd format +# +# Package: am-utils-6.0 +# Author: Mike Walker <mike@tab00.larc.nasa.gov> +# Erez Zadok <ezk@cs.columbia.edu> +# +# This program expects maps with the format +# +# dir [ -options ] machine:/path [ # optional comment ] +# ... +# +# and generates an equivalent amd map as follows: +# +# # generated by automountamd on Fri May 21 9:16:56 1993 +# +# /defaults \ +# type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 +# +# dir \ +# hostd==machine.larc.nasa.gov;type:=link;fs:=/path || \ +# domain==larc.nasa.gov;rhost:=machine;rfs:=/path || \ +# rhost:=machine.larc.nasa.gov;rfs:=/path +# ... +# +# You should set the DOMAIN and DEFAULT variables to your preferences. +# +# $Id: automount2amd.in,v 1.1 1999/08/16 01:16:36 ezk Exp $ +# + +require "ctime.pl"; + +# amd domain name (doesn't have to be the DNS domain; isn't overloading great!) +# Should be what you will pass to amd via the -d command-line switch, if any. +$DOMAIN=''; + +# amd default settings; consult the docs for what you can/should do here. +# Note, in particular, that if your disk mount points follow a common scheme +# you can specify ``rfs:=/common/path/${key}'' and not have to insert that +# line (twice) in every entry below! +$DEFAULTS='type:=nfs;opts:=rw,grpid,nosuid,utimeout=600'; + + +# print comment header and default string +printf "# generated by automount2amd on %s\n", &ctime(time); +printf "/defaults \\\n %s\n\n", $DEFAULTS; + +# loop through map +while (<>) { + if (m,^(\w\S*)(\s+\-\w\S*\s+|\s+)(\w[^:]*):(\/\S*)\s*(.*),) { + ($dir, $options, $machine, $path, $rest) = ($1, $2, $3, $4, $5); + print "#$rest\n" if ($rest =~ m/\w/); + print "$dir \\\n"; + if ($options =~ m/-/) { + $options =~ s/\s//g; + $options =~ s/^-//g; + printf( " -addopts:=$options \\\n"); + } + if (defined($DOMAIN) && $DOMAIN ne "") { + printf(" hostd==%s.%s;type:=link;fs:=%s || \\\n", + $machine, $DOMAIN, $path); + printf(" domain==%s;rhost:=%s;rfs:=%s || \\\n", + $DOMAIN, $machine, $path); + printf " rhost:=%s.%s;rfs:=%s\n\n", $machine, $DOMAIN, $path; + } else { + printf(" host==%s;type:=link;fs:=%s \\\n", + $machine, $path); + printf " rhost:=%s;rfs:=%s\n\n", $machine, $path; + } + } +} diff --git a/contrib/amd/scripts/ctl-amd.in b/contrib/amd/scripts/ctl-amd.in index 8eefde2..22c3677 100755 --- a/contrib/amd/scripts/ctl-amd.in +++ b/contrib/amd/scripts/ctl-amd.in @@ -5,9 +5,12 @@ # Package: am-utils-6.0 # Author: Erez Zadok <ezk@cs.columbia.edu> # -# chkconfig: 345 72 8 -# description: amd is the Berkeley AutoMount Daemon, used for \ -# automatic filesystem mounting +# chkconfig: - 72 28 +# description: Runs the automount daemon that mounts devices and NFS hosts \ +# on demand. +# processname: amd +# config: /etc/amd.conf +# # set path prefix=@prefix@ @@ -107,6 +110,7 @@ case "$1" in echo "NOT restarting amd!" else echo "Restarting amd..." + sleep 1 ctl-amd start fi ;; diff --git a/contrib/amd/scripts/ctl-hlfsd.in b/contrib/amd/scripts/ctl-hlfsd.in index e574d0d..ebb12b8 100755 --- a/contrib/amd/scripts/ctl-hlfsd.in +++ b/contrib/amd/scripts/ctl-hlfsd.in @@ -5,9 +5,11 @@ # Package: am-utils-6.0 # Author: Erez Zadok <ezk@cs.columbia.edu> # -# chkconfig: 345 73 7 +# chkconfig: - 72 28 # description: hlfsd is a daemon similar to amd, used to redirect user # mail to home directory of the user +# processname: hlfsd +# # set path prefix=@prefix@ diff --git a/contrib/amd/scripts/lostaltmail.in b/contrib/amd/scripts/lostaltmail.in index 5ba454c..8d1e6ec 100755 --- a/contrib/amd/scripts/lostaltmail.in +++ b/contrib/amd/scripts/lostaltmail.in @@ -331,7 +331,8 @@ sub Splice_in_resent_headers { $month=(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$utctime[4]]; - $date=sprintf("%s, %d %s %d %s UTC", $weekday, $utctime[3], $month, (($utctime[5] < 93 ? 20 : 19).$utctime[5]), $time); + # Ensure Y2K format + $date=sprintf("%s, %d %s %d %s UTC", $weekday, $utctime[3], $month, $utctime[5]+1900, $time); $current_msg .= "$RESENT_DATE" . $date . "\n"; @@ -602,7 +603,7 @@ if ( ! $noverify ) { printf("SMTP: address: %s port: $port\n", join ('.',unpack('C4',$addr))) if ($debug); - $sockaddr = pack('n2C4x8',2, $port ,unpack('C4',$addr)); + $sockaddr = sockaddr_in($port, $addr); printf("Sockaddr: %s\n", join (' ',unpack('C14',$sockaddr))) if ($debug); diff --git a/contrib/amd/tasks b/contrib/amd/tasks index 260095e..942223f 100644 --- a/contrib/amd/tasks +++ b/contrib/amd/tasks @@ -15,14 +15,14 @@ Please volunteer to do any of the following: - documentation update ("XXX: FILL IN" sections). - hlfsd should be able to not use /var/alt_mail, but send code 75 back to -sendmail (telling it to re-queue the mail and retry later). + sendmail (telling it to re-queue the mail and retry later). - compatibility with Sun's automount maps? should be easier via the amd.conf file to specify type of map perhaps done at the same time autofs support is done. - a selector ala if_exists() for networkmask(1.2.3.4/5.6.7.8), will match -against all known IP addresses of this host. + against all known IP addresses of this host. - convert to using my own rpcgen .x files for amq/amq/nfs (v2 and v3) @@ -33,7 +33,7 @@ against all known IP addresses of this host. - $mindelay and $maxdelay in milliseconds - multiple nfsl should be matched if one matched and nfs mount failed. fall -through. + through. - fall through syntax? opts:=nofail,fallthrough? - random nfs rhost:={srv1, srv2, srv3} @@ -62,8 +62,30 @@ amd.conf file (right now amd.conf overrides cmd-line options). - an un/install script for binaries - update README -add am-utils URL and COPYRIGHT to all distributed scripts and -sources and programs etc. + +- add am-utils URL and COPYRIGHT to all distributed scripts and sources and + programs etc. also to amq -v output. - ion: browsable_dirs only works for nis if in [global] broken if it is file - maps. + maps. + +- all if statements should have an else clause because of Ultrix's /bin/sh. + +- look for obsolete AM_* macros and use newer AC_* ones +- use 3rd arg to AC_CHECK_TYPE (headers) + +- FreeBSD 3.1 doesn't have SYMTTL flag, so the mtime of the hlfsd symlink is + always new. This breaks hlfsd on FreeBSD 3.1, b/c the acregmin/max code + depends on the time that the symlink was created. Solution: best is to + support NOAC in the FreeBSD kernel, otherwise hlfsd will have to know not + to turn on this code in hlfsd/stubs.c: + + if (++slinkfattr.na_mtime.nt_useconds == 0) + ++slinkfattr.na_mtime.nt_seconds; + +- support nqnfs as per Jeffrey C Honig <jch@BSDI.COM>: "Besides having + NFSMNT_NQNFS set when you try to do the mount, NQNFS requires that you do + the nfssvc() call to create an nqnfs client daemon. I can't see any + obvious way to check if the server supports NQNFS." + +- browsable 'auto' style maps. |