Virgin import of AMD (am-utils) v6.0.7
This commit is contained in:
parent
56b658f4c0
commit
d39ff6a040
@ -1,6 +1,5 @@
|
||||
# -*- text -*-
|
||||
PRIMARY AUTHORS AND MAJOR CONTRIBUTORS TO AM_UTILS:
|
||||
|
||||
Original authors of amd were the Berkeley team and especially Jan-Simon
|
||||
Pendry. Since then many people have contributed patches.
|
||||
|
||||
@ -85,6 +84,8 @@ syslog and/or syslog facilities.
|
||||
January 29, 1998: fix for 0.0.0.0 loopback on SunOS 3.X which defines
|
||||
IFF_ROUTE instead of IFF_LOOPBACK.
|
||||
|
||||
May 30, 2000: correct logging types for addopts/mergeopts messages.
|
||||
|
||||
* Daniel S. Riley <dsr@mail.lns.cornell.edu>
|
||||
|
||||
July 11, 1997: fixes to DU-4.0 to support string POSIX.1 signals, and struct
|
||||
@ -125,6 +126,12 @@ systems. More misc fixes.
|
||||
February 3, 1998: don't start autofs listener unless autofs maps were in
|
||||
use.
|
||||
|
||||
December 10, 1999: assorted fixed and lots of fixes to support in-kernel
|
||||
mount tables in Solaris 8.
|
||||
|
||||
February 9, 2000: new debug options hrtime (hi-res timer) and xdrtrace. bug
|
||||
fixes.
|
||||
|
||||
* Jason Thorpe <thorpej@nas.nasa.gov>
|
||||
|
||||
August 25, 1997: make amd work when talking to NIS+ servers in NIS
|
||||
@ -274,3 +281,33 @@ September 5, 1999: pawd works for type:=nfsl.
|
||||
* Nick Williams <njw@ms.com>
|
||||
September 1, 1999: bug fix for incorrect symlinks when two locations are
|
||||
requested simultaneously.
|
||||
|
||||
November 1, 1999: fixes to sync maps even if they are set to mapcache:=sync.
|
||||
|
||||
January 19, 2000: fix (and reduce the incidence of) stale file handles when
|
||||
doing rapid mounts and umounts in succession.
|
||||
|
||||
June 5, 2000: better handling of potential race-conditions during rapid
|
||||
u/mounts. Correctly update d_drops stats for amq -s.
|
||||
|
||||
* Johann Pfefferl <johann.pfefferl.jp@germany.agfa.com>
|
||||
November 16, 1999: fix to ldap code so repeated calls to string2he don't
|
||||
corrupt the string passed.
|
||||
|
||||
* Amitha Perera <perera@cs.rpi.edu>
|
||||
December 9, 1999: detect all wire() interfaces correctly.
|
||||
|
||||
* Steven Danz <sdanz@awc.kc.noaa.gov>
|
||||
January 25, 2000: allow browsable auto maps.
|
||||
|
||||
* Wolfram Klaus <klaus@physik.fu-berlin.de>.
|
||||
November 21, 2000: recognize proplist mnttab flag.
|
||||
|
||||
* Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
|
||||
November 21, 2000: lots of NetBSD fixes (many of which are generic).
|
||||
|
||||
* Olaf Kirch <okir@caldera.de>
|
||||
February 1, 2001: important Linux NFS error number mapping fixed
|
||||
|
||||
* Ahmon Dancy <dancy@franz.com>
|
||||
February 9, 2001: Apple Rhapsody/Darwin/OS X port
|
||||
|
@ -117,12 +117,46 @@ time. (Please let amd-dev know if you know of a fix.)
|
||||
|
||||
(7) *-aix4.3.2.0
|
||||
|
||||
The plock() function appears to fail with ENOMEM (Not Enough Space). When
|
||||
it fails, it consumes a lot of memory. This appears to be an AIX bug. I
|
||||
think plock returns an error code, but it partially succeeds to lock some
|
||||
pages, thus increasing memory consumption. When partial failures occur, it
|
||||
is possible that AIX fails to unlock those pages it did lock. Solution:
|
||||
turn off usage of plock on AIX. Put plock=no in your amd.conf file (which
|
||||
is the default if you do nothing).
|
||||
The plock() function will pre-reserve all of the memory up to the maximum
|
||||
listed in the ulimit. If the ulimit is infinite, plock() will try to take
|
||||
all of the system's memory, and fail with ENOMEM (Not Enough Space).
|
||||
Normally ulimit may be set to a few gigs of max memory usage, but even that
|
||||
is too much; Amd doesn't need more than a few megs of resident memory size
|
||||
(depending on the particular usage, number of maps, etc.) Solution: lower
|
||||
your ulimit before starting amd. This can be done inside the ctl-amd
|
||||
script, but be careful not to limit it too low. Alternatively, don't use
|
||||
plock on aix-4.3: set it to plock=no in amd.conf (which is the default if
|
||||
you do nothing).
|
||||
|
||||
|
||||
(8) *-linux-gnu (systems using glibc 2.1, such as RedHat-6.1)
|
||||
|
||||
There's a UDP file descriptor leak in the nis routines in glibc, especially
|
||||
those that do yp_bind. Until this is bug fixed, do not set nis_domain in
|
||||
amd.conf, but let the system pick up the default domain name as set by your
|
||||
system. That would avoid using the buggy yp_bind routines in libc.
|
||||
|
||||
|
||||
(9) *-linux-gnu (SuSE systems using unfsd)
|
||||
|
||||
The user-level nfsd (2.2beta44) on SuSE Linux systems (and possibly others)
|
||||
dies with a SEGV when amd tries to contact it for access to a volume that
|
||||
does not exist, or one for which there is no permission to mount.
|
||||
|
||||
|
||||
(10) *-*-hpux11
|
||||
|
||||
If you're using NFSv3, you must install HP patches PHNE_20344 and
|
||||
PHNE_20371. If you don't, and you try to use amd with NFSv3 over TCP, your
|
||||
kernel will panic.
|
||||
|
||||
(11) *-linux* (any system using a 2.2.18+ kernel)
|
||||
|
||||
The Linux kernels don't support Amd's direct mounts very well, leading to
|
||||
erratic behavior: shares that don't get remounted after the first timeout,
|
||||
inability to restart Amd because its mount points cannot be unmounted,
|
||||
etc. There are some kernel patches on the am-utils Web site, which solve
|
||||
these problems.
|
||||
|
||||
|
||||
Erez.
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 1997-1999 Erez Zadok
|
||||
Copyright (c) 1997-2001 Erez Zadok
|
||||
Copyright (c) 1989 Jan-Simon Pendry
|
||||
Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
Copyright (c) 1989 The Regents of the University of California.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,11 +9,15 @@ SYSTEM AUTOCONF COMPILE RUN SHLIB
|
||||
========================= ======== ========= ======= =====
|
||||
alpha-dec-osf2.1 ezk ezk ezk !ezk
|
||||
alpha-dec-osf4.0 ezk ezk dsr[3] ezk
|
||||
alpha-dec-osf4.0f ezk ezk dsr[3] ezk
|
||||
alpha-dec-osf5.1 ro ro ro ro
|
||||
alphaev5-unknown-linux-gnu ezk ezk finkel ezk
|
||||
alphaev5-unknown-linux-gnu-rh5.2 ezk ezk ezk ezk
|
||||
hppa1.0-hp-hpux11.00 ezk ezk ezk
|
||||
alphaev6-dec-osf5.0 ezk ezk dsr[3] ezk
|
||||
hppa1.0-hp-hpux11.00 ezk ezk ezk ezk
|
||||
hppa1.1-hp-hpux10.10 ezk ezk ezk ezk
|
||||
hppa1.1-hp-hpux10.20 ezk ezk ezk ezk
|
||||
hppa1.1-hp-hpux11.00 ezk ezk ezk ezk
|
||||
hppa1.1-hp-hpux9.01 ezk[4] ezk[4] nrh/ezk ezk
|
||||
hppa1.1-hp-hpux9.05 ezk[4] ezk[4] nrh/ezk ezk
|
||||
hppa1.1-hp-hpux9.07 ezk[4] ezk[4] nrh/ezk ezk
|
||||
@ -23,6 +27,7 @@ i386-pc-bsdi3.0 ezk ezk ezk !ezk
|
||||
i386-pc-bsdi3.1 ezk ezk ezk !ezk
|
||||
i386-pc-bsdi4.0 ezk ezk ezk ezk
|
||||
i386-pc-bsdi4.0.1 ezk ezk ezk ezk
|
||||
i386-pc-bsdi4.1 ezk ezk ezk ezk
|
||||
i386-pc-solaris2.5.1 ezk ezk ezk ezk
|
||||
i386-pc-solaris2.6 ezk ezk ezk ezk
|
||||
i386-pc-solaris2.7 ezk ezk ezk ezk
|
||||
@ -32,10 +37,13 @@ i386-unknown-freebsd2.2.6 ezk ezk ezk ezk
|
||||
i386-unknown-freebsd2.2.7 ezk ezk ezk ezk
|
||||
i386-unknown-freebsd2.2.8 ezk ezk ezk ezk
|
||||
i386-unknown-freebsd3.0 ezk ezk ezk ezk
|
||||
i386-unknown-freebsd4.2 ezk ezk ezk ezk
|
||||
i386-unknown-freebsd5.0 ezk ezk ezk ezk
|
||||
i386-unknown-freebsdelf3.0 ezk ezk ezk ezk
|
||||
i386-unknown-freebsdelf3.1 ezk ezk ezk ezk
|
||||
i386-unknown-freebsdelf3.2 ezk ezk ezk ezk
|
||||
i386-unknown-freebsdelf3.3 ezk ezk ezk ezk
|
||||
i386-unknown-freebsdelf3.4 ezk ezk ezk ezk
|
||||
i386-unknown-freebsdelf4.0 ezk ezk ezk ezk
|
||||
i386-unknown-netbsd1.2.1 ezk ezk ezk ezk
|
||||
i386-unknown-netbsd1.3 ezk ezk ezk ezk
|
||||
@ -43,6 +51,7 @@ i386-unknown-netbsd1.3.1 ezk ezk ezk ezk
|
||||
i386-unknown-netbsd1.3.2 ezk ezk ezk ezk
|
||||
i386-unknown-netbsd1.3.3 ezk ezk ezk ezk
|
||||
i386-unknown-netbsd1.4 ezk ezk ezk ezk
|
||||
i386-unknown-netbsd1.4.1 ezk ezk ezk ezk
|
||||
i386-unknown-openbsd2.1 ezk ezk ezk ezk
|
||||
i386-unknown-openbsd2.2 ezk ezk ezk ezk
|
||||
i386-unknown-openbsd2.3 ezk ezk ezk ezk
|
||||
@ -57,11 +66,13 @@ i586-pc-linux-gnu ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu-rh6.1 ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu-rh6.2 ezk ezk ezk ezk
|
||||
i586-pc-linux-gnulibc1 ezk ezk ezk ezk
|
||||
i586-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk
|
||||
i686-pc-linux-gnu ezk ezk ezk ezk
|
||||
i686-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
|
||||
i686-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
|
||||
i686-pc-linux-gnu-rh6.2 ezk ezk ezk ezk
|
||||
i686-pc-linux-gnulibc ezk ezk ezk ezk
|
||||
i686-pc-linux-gnulibc1 ezk ezk ezk ezk
|
||||
m68k-hp-hpux9.00 ezk[4] ezk[4] nrh/ezk
|
||||
@ -87,6 +98,7 @@ sparc-sun-solaris2.5 ezk ezk ezk ezk
|
||||
sparc-sun-solaris2.5.1 ezk ezk ezk ezk
|
||||
sparc-sun-solaris2.6 ezk ezk[2] ezk ezk
|
||||
sparc-sun-solaris2.7 ezk ezk[2] ezk ezk
|
||||
sparc-sun-solaris2.8 ro ro ro ro
|
||||
sparc-sun-sunos4.1.1 ezk ezk ezk ezk
|
||||
sparc-sun-sunos4.1.3 ezk ezk ezk ezk
|
||||
sparc-sun-sunos4.1.3C ezk ezk ezk ezk
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- text -*-
|
||||
|
||||
AM-UTILS-6.0 MIRRORS
|
||||
AM-UTILS-6.x MIRRORS
|
||||
|
||||
Note: in case of any problems accessing the individual FTP sites, please
|
||||
contact their respective maintainers. If you wish to be added to the
|
||||
@ -21,6 +21,9 @@ U.S.A:
|
||||
Ohio (Kent State University):
|
||||
ftp://info.mcs.kent.edu/pub/am-utils
|
||||
Maintainer: root@mcs.kent.edu
|
||||
Florida (University of Florida)
|
||||
ftp://ftp.cise.ufl.edu/pub/am-utils
|
||||
Maintainer: mirror@cise.ufl.edu
|
||||
|
||||
Europe:
|
||||
Germany:
|
||||
@ -43,6 +46,12 @@ Asia:
|
||||
Japan:
|
||||
ftp://ftp.u-aizu.ac.jp/pub/net/amd/am-utils
|
||||
Maintainer: ftp-admin@u-aizu.ac.jp
|
||||
Japan:
|
||||
ftp://core.ring.gr.jp/pub/net/am-utils/
|
||||
Maintainer: ftpadmin@ring.gr.jp
|
||||
Japan:
|
||||
ftp://ftp.ring.gr.jp/pub/net/am-utils/
|
||||
Maintainer: ftpadmin@ring.gr.jp
|
||||
|
||||
Australia:
|
||||
Melbourne:
|
||||
|
140
contrib/amd/NEWS
140
contrib/amd/NEWS
@ -1,5 +1,143 @@
|
||||
# -*- text -*-
|
||||
|
||||
*** Notes specific to am-utils version 6.0.7:
|
||||
|
||||
- minor new ports: i386-unknown-freebsd5.0
|
||||
|
||||
- bug fixes:
|
||||
type:=host, don't fail mount if one share is already mounted
|
||||
don't report NFS NE_IO error as success (Linux)
|
||||
|
||||
*** Notes specific to am-utils version 6.0.6:
|
||||
|
||||
- new ports:
|
||||
Apple OS X support (Darwin, Rhapsody)
|
||||
|
||||
- reworked autoconf scripts so that newer versions of known OSs will default
|
||||
their configuration to the last known version (better chance that it will
|
||||
pass autoconf and work).
|
||||
|
||||
- linux support for lofs and "bind" mounts, so type:=lofs can work (whether
|
||||
you're using autofs or not)
|
||||
|
||||
- renamed amd.conf option "selectors_on_default" to "selectors_in_defaults"
|
||||
(on -> in, and added "s"). Old name remains in place for compatibility.
|
||||
|
||||
- lots of cleanups of debugging and logging messages
|
||||
|
||||
- Bugs fixed:
|
||||
lots of Linux-related ones, so it compiles for recent kernels
|
||||
better checking on various mount options of the form foo=N or foo=STR
|
||||
fixed NFS errno mapping bug which mapped ENOENT to success on Linux
|
||||
|
||||
*** Notes specific to am-utils version 6.0.5:
|
||||
|
||||
- Minor ports:
|
||||
alphaev6-dec-osf5.1
|
||||
i386-unknown-freebsd4.2
|
||||
support for Linux 2.4 kernels and newer GLIBC versions
|
||||
cleanup of AIX and IRIX6 ports
|
||||
|
||||
- Support new mount options:
|
||||
proplist (ACLs over NFS, DU-4.0)
|
||||
kerb, rdirplus, readdirsize, and xlatecookie (NetBSD-1.5K+)
|
||||
nonlm, lock, nolock (Linux)
|
||||
|
||||
- Don't force rsize/wsize on Linux 2.2.18+ and 2.4.x. Improves performance
|
||||
a lot.
|
||||
|
||||
- Lots of documentation updates: texinfo, man pages, scripts, and more.
|
||||
|
||||
- LDAP: included proposed Schema and Internet Draft for LDAP Schema. See
|
||||
README.ldap for more information.
|
||||
|
||||
- Removed all remains of the dangerous amq -M code.
|
||||
|
||||
- Major bug fix: initialize NFS fileid field correctly, to avoid cache
|
||||
aliasing problems, esp. on Linux.
|
||||
|
||||
- Major Linux bug fix: map errnos to NFS errors (mistakenly turned off a
|
||||
while back). Also support unused errno 41.
|
||||
|
||||
- Other bugs fixes:
|
||||
default MAXHOSTNAMELEN (if undefined) is 256, not 64
|
||||
truncate hostnames to MAXHOSTNAMELEN (security fix)
|
||||
alignment problem in getwire() on ALPHA
|
||||
other buf overflow problems (security fixes)
|
||||
ctl-amd supports "condrestart" (Red Hat)
|
||||
bell char is \g not \a
|
||||
lostaltmail verify MAILDIR is defined
|
||||
am-eject accepts "floppy" and "cdrom" as args
|
||||
other assorted small bug fixes
|
||||
|
||||
*** Notes specific to am-utils version 6.0.4:
|
||||
|
||||
- NFSv3 support for Linux and HPUX-11
|
||||
|
||||
- new amd.conf [global] options:
|
||||
nfs_vers: force all NFS mounts to version 2 or 3
|
||||
nfs_proto: force all NFS mounts to udp or tcp
|
||||
|
||||
- new debug_options (amd -D):
|
||||
hrtime: turns on high-resolution timer if available
|
||||
readdir: traces browsable_dirs code
|
||||
xdrtrace: traces XDR routines
|
||||
(trace: only traces NFS and RPC)
|
||||
|
||||
- new amq options:
|
||||
-H: shows usage
|
||||
-w: translate getpwd() into an Amd path
|
||||
|
||||
- new map syntax:
|
||||
${dollar}: to include a literal '$' in assignments
|
||||
|
||||
- new "opts:=" options:
|
||||
ver3: turns on NFS version 3 on some systems (linux)
|
||||
|
||||
- updated or minor new ports:
|
||||
alpha-dec-osf4.0f
|
||||
alphaev6-dec-osf5.0
|
||||
i386-pc-linux-rh6.2
|
||||
i386-unknown-freebsd3.4
|
||||
|
||||
- bugs fixed:
|
||||
symlink mtime fixes to avoid u/mount race conditions
|
||||
update amq -s failed umounts count correctly
|
||||
linux compiles even if efs is available
|
||||
linux works with mount(2) option "intr"
|
||||
linux works with pcfs and cdfs
|
||||
handle std{in,out,err} correctly when releasing controlling tty
|
||||
browsable_readdir works on 64-bit kernel architectures
|
||||
irs/wire routines compile for bsdi{2,3,4}
|
||||
|
||||
*** Notes specific to am-utils version 6.0.3:
|
||||
|
||||
- updated or minor new ports:
|
||||
hppa1.0-hp-hpux11.00
|
||||
i386-pc-bsdi4.1
|
||||
i386-unknown-netbsd1.4.1
|
||||
sparc-sun-solaris2.8
|
||||
i*86-pc-linux-gnu-rh6.1
|
||||
(some preparations for Compaq Tru64)
|
||||
|
||||
- new variables ${uid} and ${gid}, return the numeric UID/GID of the user
|
||||
(not root) who invokes an amd pathname. Similar to what hlfsd does.
|
||||
|
||||
- automake now uses automatic dependency tracking
|
||||
|
||||
- new mount options: optionstr, noexec, nomnttab
|
||||
|
||||
- maps of type:=auto are now browsable (using map option "browsable")
|
||||
|
||||
- ctl-amd has "status" argument (same as RedHat)
|
||||
|
||||
- bugs fixed:
|
||||
document buggy AIX 4.3 plock() behavior
|
||||
fixes to stale file handle on symlinks
|
||||
reduce race conditions upon rapid umount/mount sequences
|
||||
use vsnprintf, more secure than vsprintf
|
||||
more assorted and smaller bugs
|
||||
|
||||
*** Notes specific to am-utils version 6.0.2:
|
||||
|
||||
- safe map reloads: when a map needs to be reloaded, it is reloaded into a
|
||||
@ -340,7 +478,7 @@ machine to NFS V.2 and retry again later.
|
||||
|
||||
- minor code cleanups for netbsd
|
||||
|
||||
- html docs now in http://www.cs.columbia.edu/~ezk/am-utils/
|
||||
- html docs now in http://www.am-utils.org
|
||||
|
||||
- added README file in binaries ftp directory
|
||||
|
||||
|
@ -74,18 +74,21 @@ for example to add hesiod support, do so as follows:
|
||||
hlfsd, lib, etc, all you need to do to get a new version of am-utils is run
|
||||
make.
|
||||
|
||||
If you modify any of the files in the aux/ or conf/ directories, then you
|
||||
must rebuild the configure script, Makefile.in files, aclocal.m4, etc. The
|
||||
best way to do so is to run
|
||||
If you modify any of the files in the aux/ or conf/ directories, or any *.in
|
||||
or *.am file, then you must rebuild the configure script, Makefile.in files,
|
||||
aclocal.m4, etc. The best way to do so is to run
|
||||
|
||||
./aux/mkconf
|
||||
./bootstrap
|
||||
or
|
||||
./buildall -K
|
||||
|
||||
To be a developer and be able to run mkconf, you must have autoconf-2.12,
|
||||
GNU make-3.75 or later, and automake-1.2 (plus my fixes to it) installed on
|
||||
your system. You may find my version of automake-1.2 where you ftp'ed this
|
||||
version of am-utils. You may also need GNU libtool 1.0.
|
||||
To be a developer and be able to run "bootstrap", you must have
|
||||
autoconf-2.13, automake-1.4, and libtool 1.3.5 installed on your system (or
|
||||
later versions thereof). You no longer need to get my special version of
|
||||
automake. Note also the the bootstrap script and several other tools are
|
||||
not available in the regular distribution of am-utils, only though the CVS
|
||||
server for am-utils. Contact me if you'd like to be a maintainer and get
|
||||
access to the CVS server.
|
||||
|
||||
After you've remade the basic configuration files you must rerun the
|
||||
buildall script to rerun configure and then remake the binaries.
|
||||
|
25
contrib/amd/README.ldap
Normal file
25
contrib/amd/README.ldap
Normal file
@ -0,0 +1,25 @@
|
||||
LDAP support for am-utils was originally done by Leif Johansson
|
||||
<leifj@it.su.se>. He no longer maintains it.
|
||||
|
||||
The current LDAP support for am-utils is for LDAPv2 only. Reportedly,
|
||||
small changes are needed to support LDAPv3. Volunteers and patches are
|
||||
welcome.
|
||||
|
||||
There are two files in this directory that relate to LDAP:
|
||||
|
||||
ldap-id.txt:
|
||||
|
||||
This is an experimental schema for amd mount maps in LDAP. Since
|
||||
LDAP isn't maintained now, this code may not match with either the
|
||||
current ldap_info.c code or with Amd mount maps in general.
|
||||
|
||||
The schema is written in the form of an internet-draft but it has
|
||||
not been published as such. We need volunteers who know and use
|
||||
LDAP to clean it up and further its process of submission.
|
||||
|
||||
ldap-id.ms:
|
||||
|
||||
This is the NROFF source of the draft. To generate the text from
|
||||
it, run "nroff -ms ldap-id.ms > ldap-id.txt"
|
||||
|
||||
Erez.
|
@ -26,4 +26,4 @@ CERTIFY AM-UTILS AS Y2K COMPLIANT. USE AT YOUR OWN RISK.
|
||||
Erez Zadok.
|
||||
Maintainer, am-utils package and AMD-DEV list.
|
||||
Email: amd-dev-owner@majordomo.cs.columbia.edu
|
||||
WWW: http://www.cs.columbia.edu/~ezk/am-utils/
|
||||
WWW: http://www.am-utils.org
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: am_ops.c,v 1.4 1999/03/13 17:03:26 ezk Exp $
|
||||
* $Id: am_ops.c,v 1.6.2.3 2001/02/23 01:03:39 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
* The order of these entries matters, since lookups in this table are done
|
||||
* on a first-match basis. The entries below are a mixture of native
|
||||
* filesystems supported by the OS (HAVE_FS_FOO), and some meta-filesystems
|
||||
* supported by amd (HAVE_AM_FS_FOO). The order is set here in expected
|
||||
* supported by amd (HAVE_AMU_FS_FOO). The order is set here in expected
|
||||
* match-hit such that more popular filesystems are listed first (nfs is the
|
||||
* most popular, followed by a symlink F/S)
|
||||
*/
|
||||
@ -62,34 +62,34 @@ static am_ops *vops[] =
|
||||
#ifdef HAVE_FS_NFS
|
||||
&nfs_ops, /* network F/S (version 2) */
|
||||
#endif /* HAVE_FS_NFS */
|
||||
#ifdef HAVE_AM_FS_LINK
|
||||
#ifdef HAVE_AMU_FS_LINK
|
||||
&amfs_link_ops, /* symlink F/S */
|
||||
#endif /* HAVE_AM_FS_LINK */
|
||||
#endif /* HAVE_AMU_FS_LINK */
|
||||
|
||||
/*
|
||||
* Other amd-supported meta-filesystems.
|
||||
*/
|
||||
#ifdef HAVE_AM_FS_NFSX
|
||||
#ifdef HAVE_AMU_FS_NFSX
|
||||
&amfs_nfsx_ops, /* multiple-nfs F/S */
|
||||
#endif /* HAVE_AM_FS_NFSX */
|
||||
#ifdef HAVE_AM_FS_NFSL
|
||||
#endif /* HAVE_AMU_FS_NFSX */
|
||||
#ifdef HAVE_AMU_FS_NFSL
|
||||
&amfs_nfsl_ops, /* NFS with local link existence check */
|
||||
#endif /* HAVE_AM_FS_NFSL */
|
||||
#ifdef HAVE_AM_FS_HOST
|
||||
#endif /* HAVE_AMU_FS_NFSL */
|
||||
#ifdef HAVE_AMU_FS_HOST
|
||||
&amfs_host_ops, /* multiple exported nfs F/S */
|
||||
#endif /* HAVE_AM_FS_HOST */
|
||||
#ifdef HAVE_AM_FS_LINKX
|
||||
#endif /* HAVE_AMU_FS_HOST */
|
||||
#ifdef HAVE_AMU_FS_LINKX
|
||||
&amfs_linkx_ops, /* symlink F/S with link target verify */
|
||||
#endif /* HAVE_AM_FS_LINKX */
|
||||
#ifdef HAVE_AM_FS_PROGRAM
|
||||
#endif /* HAVE_AMU_FS_LINKX */
|
||||
#ifdef HAVE_AMU_FS_PROGRAM
|
||||
&amfs_program_ops, /* program F/S */
|
||||
#endif /* HAVE_AM_FS_PROGRAM */
|
||||
#ifdef HAVE_AM_FS_UNION
|
||||
#endif /* HAVE_AMU_FS_PROGRAM */
|
||||
#ifdef HAVE_AMU_FS_UNION
|
||||
&amfs_union_ops, /* union F/S */
|
||||
#endif /* HAVE_AM_FS_UNION */
|
||||
#ifdef HAVE_AM_FS_INHERIT
|
||||
#endif /* HAVE_AMU_FS_UNION */
|
||||
#ifdef HAVE_AMU_FS_INHERIT
|
||||
&amfs_inherit_ops, /* inheritance F/S */
|
||||
#endif /* HAVE_AM_FS_INHERIT */
|
||||
#endif /* HAVE_AMU_FS_INHERIT */
|
||||
|
||||
/*
|
||||
* A few more native filesystems.
|
||||
@ -133,21 +133,21 @@ static am_ops *vops[] =
|
||||
* (4) autofs
|
||||
* (5) amfs_error
|
||||
*/
|
||||
#ifdef HAVE_AM_FS_AUTO
|
||||
#ifdef HAVE_AMU_FS_AUTO
|
||||
&amfs_auto_ops, /* Automounter F/S */
|
||||
#endif /* HAVE_AM_FS_AUTO */
|
||||
#ifdef HAVE_AM_FS_DIRECT
|
||||
#endif /* HAVE_AMU_FS_AUTO */
|
||||
#ifdef HAVE_AMU_FS_DIRECT
|
||||
&amfs_direct_ops, /* direct-mount F/S */
|
||||
#endif /* HAVE_AM_FS_DIRECT */
|
||||
#ifdef HAVE_AM_FS_TOPLVL
|
||||
#endif /* HAVE_AMU_FS_DIRECT */
|
||||
#ifdef HAVE_AMU_FS_TOPLVL
|
||||
&amfs_toplvl_ops, /* top-level mount F/S */
|
||||
#endif /* HAVE_AM_FS_TOPLVL */
|
||||
#endif /* HAVE_AMU_FS_TOPLVL */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
&autofs_ops, /* autofs mount F/S */
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
#ifdef HAVE_AM_FS_ERROR
|
||||
#ifdef HAVE_AMU_FS_ERROR
|
||||
&amfs_error_ops, /* error F/S */
|
||||
#endif /* HAVE_AM_FS_ERROR */
|
||||
#endif /* HAVE_AMU_FS_ERROR */
|
||||
0
|
||||
};
|
||||
|
||||
@ -320,7 +320,7 @@ merge_opts(const char *opts1, const char *opts2)
|
||||
mntent_t mnt2; /* place holder for opts2 */
|
||||
char *newstr; /* new string to return (malloc'ed) */
|
||||
char *tmpstr; /* temp */
|
||||
char *eq; /* pointer to '=' within temp */
|
||||
char *eq; /* pointer to whatever follows '=' within temp */
|
||||
char oneopt[80]; /* one option w/o value if any */
|
||||
char *revoneopt; /* reverse of oneopt */
|
||||
int len = strlen(opts1) + strlen(opts2) + 2; /* space for "," and NULL */
|
||||
@ -338,8 +338,8 @@ merge_opts(const char *opts1, const char *opts2)
|
||||
strncpy(oneopt, tmpstr, 80);
|
||||
oneopt[79] = '\0';
|
||||
/* if option has a value such as rsize=1024, chop the value part */
|
||||
if ((eq = strchr(oneopt, '=')))
|
||||
eq[1] = '\0';
|
||||
if ((eq = haseq(oneopt)))
|
||||
*eq = '\0';
|
||||
/* find reverse option of oneopt */
|
||||
revoneopt = reverse_option(oneopt);
|
||||
/* if option orits reverse exist in opts2, ignore it */
|
||||
@ -420,7 +420,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map
|
||||
/* optimize things for the common case where opts==remopts */
|
||||
char *mergedstr;
|
||||
mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts);
|
||||
plog(XLOG_USER, "merge rem/opts \"%s\" add \"%s\" => \"%s\"",
|
||||
plog(XLOG_INFO, "merge rem/opts \"%s\" add \"%s\" => \"%s\"",
|
||||
fo->opt_opts, fo->opt_addopts, mergedstr);
|
||||
XFREE(fo->opt_opts);
|
||||
XFREE(fo->opt_remopts);
|
||||
@ -429,12 +429,12 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map
|
||||
} else {
|
||||
char *mergedstr, *remmergedstr;
|
||||
mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts);
|
||||
plog(XLOG_USER, "merge opts \"%s\" add \"%s\" => \"%s\"",
|
||||
plog(XLOG_INFO, "merge opts \"%s\" add \"%s\" => \"%s\"",
|
||||
fo->opt_opts, fo->opt_addopts, mergedstr);
|
||||
XFREE(fo->opt_opts);
|
||||
fo->opt_opts = mergedstr;
|
||||
remmergedstr = merge_opts(fo->opt_remopts, fo->opt_addopts);
|
||||
plog(XLOG_USER, "merge remopts \"%s\" add \"%s\" => \"%s\"",
|
||||
plog(XLOG_INFO, "merge remopts \"%s\" add \"%s\" => \"%s\"",
|
||||
fo->opt_remopts, fo->opt_addopts, remmergedstr);
|
||||
XFREE(fo->opt_remopts);
|
||||
fo->opt_remopts = remmergedstr;
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" Copyright (c) 1997-1999 Erez Zadok
|
||||
.\" Copyright (c) 1997-2001 Erez Zadok
|
||||
.\" Copyright (c) 1989 Jan-Simon Pendry
|
||||
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
.\" Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
.\"
|
||||
.\" %W% (Berkeley) %G%
|
||||
.\"
|
||||
.\" $Id: amd.8,v 1.3 1999/09/30 21:01:29 ezk Exp $
|
||||
.\" $Id: amd.8,v 1.4.2.1 2001/01/10 03:22:59 ezk Exp $
|
||||
.\"
|
||||
.TH AMD 8 "3 November 1989"
|
||||
.SH NAME
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amd.c,v 1.6 1999/09/30 21:01:29 ezk Exp $
|
||||
* $Id: amd.c,v 1.8.2.3 2001/01/10 03:22:59 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -177,8 +177,8 @@ daemon_mode(void)
|
||||
if (gopt.flags & CFM_PRINT_PID) {
|
||||
if (STREQ(gopt.pid_file, "/dev/stdout")) {
|
||||
printf("%ld\n", (long) am_mypid);
|
||||
/* flush stdout, just in case */
|
||||
fflush(stdout);
|
||||
/* do not fclose stdout */
|
||||
} else {
|
||||
FILE *f;
|
||||
mode_t prev_umask = umask(0022); /* set secure temporary umask */
|
||||
@ -476,7 +476,7 @@ main(int argc, char *argv[])
|
||||
verstr = strtok(get_version_string(), "\n");
|
||||
plog(XLOG_INFO, "AM-UTILS VERSION INFORMATION:");
|
||||
while (verstr) {
|
||||
plog(XLOG_INFO, verstr);
|
||||
plog(XLOG_INFO, "%s", verstr);
|
||||
verstr = strtok(NULL, "\n");
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amd.h,v 1.4 1999/09/30 21:01:29 ezk Exp $
|
||||
* $Id: amd.h,v 1.8.2.3 2001/04/07 00:47:41 ib42 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
/* options for amd.conf */
|
||||
#define CFM_BROWSABLE_DIRS 0x0001
|
||||
#define CFM_MOUNT_TYPE_AUTOFS 0x0002
|
||||
#define CFM_ENABLE_DEFAULT_SELECTORS 0x0004
|
||||
#define CFM_SELECTORS_IN_DEFAULTS 0x0004
|
||||
#define CFM_NORMALIZE_HOSTNAMES 0x0008
|
||||
#define CFM_PROCESS_LOCK 0x0010
|
||||
#define CFM_PRINT_PID 0x0020
|
||||
@ -134,6 +134,8 @@ struct amu_global_options {
|
||||
#ifdef HAVE_MAP_NIS
|
||||
char *nis_domain; /* YP domain name */
|
||||
#endif /* HAVE_MAP_NIS */
|
||||
char *nfs_proto; /* NFS protocol (NULL, udp, tcp) */
|
||||
int nfs_vers; /* NFS version (0, 2, 3, 4) */
|
||||
};
|
||||
|
||||
/* if you add anything here, update conf.c:reset_cf_map() */
|
||||
@ -227,7 +229,7 @@ extern voidp amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp);
|
||||
|
||||
/* other external definitions */
|
||||
extern am_nfs_fh *root_fh(char *dir);
|
||||
extern am_node * autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
|
||||
extern am_node *autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
|
||||
extern am_node *find_ap(char *);
|
||||
extern am_node *find_ap2(char *, am_node *);
|
||||
extern bool_t xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead);
|
||||
@ -252,8 +254,10 @@ extern void root_newmap(const char *, const char *, const char *, const cf_map_t
|
||||
|
||||
/* amd global variables */
|
||||
extern FILE *yyin;
|
||||
extern SVCXPRT *nfs_program_2_transp; /* For quick_reply() */
|
||||
extern SVCXPRT *nfs_program_2_transp; /* For quick_reply() */
|
||||
extern char *conf_tag;
|
||||
extern char *opt_gid;
|
||||
extern char *opt_uid;
|
||||
extern int NumChild;
|
||||
extern int fwd_sock;
|
||||
extern int select_intr_valid;
|
||||
@ -261,20 +265,21 @@ extern int usage;
|
||||
extern int use_conf_file; /* use amd configuration file */
|
||||
extern jmp_buf select_intr;
|
||||
extern qelem mfhead;
|
||||
extern struct amu_global_options gopt; /* where global options are stored */
|
||||
extern struct am_opts fs_static; /* copy of the options to play with */
|
||||
extern struct amu_global_options gopt; /* where global options are stored */
|
||||
|
||||
#ifdef HAVE_SIGACTION
|
||||
extern sigset_t masked_sigs;
|
||||
#endif /* HAVE_SIGACTION */
|
||||
|
||||
#if defined(HAVE_AM_FS_LINK) || defined(HAVE_AM_FS_LINKX)
|
||||
#if defined(HAVE_AMU_FS_LINK) || defined(HAVE_AMU_FS_LINKX)
|
||||
extern char *amfs_link_match(am_opts *fo);
|
||||
extern int amfs_link_fumount(mntfs *mf);
|
||||
#endif /* defined(HAVE_AM_FS_LINK) || defined(HAVE_AM_FS_LINKX) */
|
||||
#endif /* defined(HAVE_AMU_FS_LINK) || defined(HAVE_AMU_FS_LINKX) */
|
||||
|
||||
#ifdef HAVE_AM_FS_NFSL
|
||||
#ifdef HAVE_AMU_FS_NFSL
|
||||
extern char *nfs_match(am_opts *fo);
|
||||
#endif /* HAVE_AM_FS_NFSL */
|
||||
#endif /* HAVE_AMU_FS_NFSL */
|
||||
|
||||
#if defined(HAVE_FS_NFS3) && !defined(HAVE_XDR_MOUNTRES3)
|
||||
extern bool_t xdr_mountres3(XDR *xdrs, mountres3 *objp);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_auto.c,v 1.5 1999/09/30 21:01:29 ezk Exp $
|
||||
* $Id: amfs_auto.c,v 1.9.2.7 2001/04/14 21:08:19 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -57,10 +57,7 @@
|
||||
****************************************************************************/
|
||||
#define IN_PROGRESS(cp) ((cp)->mp->am_mnt->mf_flags & MFF_MOUNTING)
|
||||
|
||||
/* DEVELOPERS: turn this on for special debugging of readdir code */
|
||||
#undef DEBUG_READDIR
|
||||
|
||||
#define DOT_DOT_COOKIE (u_int) 1
|
||||
#define DOT_DOT_COOKIE (u_int) 1
|
||||
|
||||
/****************************************************************************
|
||||
*** STRUCTURES ***
|
||||
@ -70,7 +67,7 @@
|
||||
/****************************************************************************
|
||||
*** FORWARD DEFINITIONS ***
|
||||
****************************************************************************/
|
||||
static int amfs_auto_bgmount(struct continuation * cp, int mpe);
|
||||
static int amfs_auto_bgmount(struct continuation *cp, int mpe);
|
||||
static int amfs_auto_mount(am_node *mp);
|
||||
static int amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count, int fully_browsable);
|
||||
static void amfs_auto_umounted(am_node *mp);
|
||||
@ -504,7 +501,7 @@ For each location:
|
||||
endfor
|
||||
*/
|
||||
static int
|
||||
amfs_auto_bgmount(struct continuation * cp, int mpe)
|
||||
amfs_auto_bgmount(struct continuation *cp, int mpe)
|
||||
{
|
||||
mntfs *mf = cp->mp->am_mnt; /* Current mntfs */
|
||||
mntfs *mf_retry = 0; /* First mntfs which needed retrying */
|
||||
@ -580,7 +577,7 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
|
||||
* Note whether this is a real mount attempt
|
||||
*/
|
||||
if (p == &amfs_error_ops) {
|
||||
plog(XLOG_MAP, "Map entry %s for %s failed to match", *cp->ivec, mp->am_path);
|
||||
plog(XLOG_MAP, "Map entry %s for %s did not match", *cp->ivec, mp->am_path);
|
||||
if (this_error <= 0)
|
||||
this_error = ENOENT;
|
||||
continue;
|
||||
@ -606,7 +603,7 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
|
||||
mp->am_link = strdup(link_dir);
|
||||
} else {
|
||||
/*
|
||||
* try getting fs option from continuation, not mountpoint!
|
||||
* Try getting fs option from continuation, not mountpoint!
|
||||
* Don't try logging the string from mf, since it may be bad!
|
||||
*/
|
||||
if (cp->fs_opts.opt_fs != mf->mf_fo->opt_fs)
|
||||
@ -671,8 +668,6 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
|
||||
else
|
||||
mk_fattr(mp, NFLNK);
|
||||
|
||||
mp->am_fattr.na_fileid = mp->am_gen;
|
||||
|
||||
if (p->fs_init)
|
||||
this_error = (*p->fs_init) (mf);
|
||||
}
|
||||
@ -722,7 +717,10 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
|
||||
untimeout(cp->callout);
|
||||
cp->callout = 0;
|
||||
}
|
||||
|
||||
/* actually run the task, backgrounding as necessary */
|
||||
run_task(try_mount, (voidp) mp, amfs_auto_cont, (voidp) cp);
|
||||
|
||||
mf->mf_flags |= MFF_MKMNT; /* XXX */
|
||||
if (mf_retry)
|
||||
free_mntfs(mf_retry);
|
||||
@ -1120,7 +1118,7 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
*/
|
||||
rvec = strsplit(dfl, ' ', '\"');
|
||||
|
||||
if (gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) {
|
||||
if (gopt.flags & CFM_SELECTORS_IN_DEFAULTS) {
|
||||
/*
|
||||
* Pick whichever first entry matched the list of selectors.
|
||||
* Strip the selectors from the string, and assign to dfl the
|
||||
@ -1132,11 +1130,18 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
char **sp = rvec;
|
||||
while (*sp) { /* loop until you find something, if any */
|
||||
memset((char *) &ap, 0, sizeof(am_opts));
|
||||
/*
|
||||
* This next routine cause many spurious "expansion of ... is"
|
||||
* messages, which are ignored, b/c all we need out of this
|
||||
* routine is to match selectors. These spurious messages may
|
||||
* be wrong, esp. if they try to expand ${key} b/c it will
|
||||
* get expanded to "/defaults"
|
||||
*/
|
||||
pt = ops_match(&ap, *sp, "", mp->am_path, "/defaults",
|
||||
mp->am_parent->am_mnt->mf_info);
|
||||
free_opts(&ap); /* don't leak */
|
||||
if (pt == &amfs_error_ops) {
|
||||
plog(XLOG_MAP, "failed to match defaults for \"%s\"", *sp);
|
||||
plog(XLOG_MAP, "did not match defaults for \"%s\"", *sp);
|
||||
} else {
|
||||
dfl = strip_selectors(*sp, "/defaults");
|
||||
plog(XLOG_MAP, "matched default selectors \"%s\"", dfl);
|
||||
@ -1159,7 +1164,7 @@ amfs_auto_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
/*
|
||||
* Log error if there were other values
|
||||
*/
|
||||
if (!(gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) && rvec[1]) {
|
||||
if (!(gopt.flags & CFM_SELECTORS_IN_DEFAULTS) && rvec[1]) {
|
||||
# ifdef DEBUG
|
||||
dlog("/defaults chopped into %s", dfl);
|
||||
# endif /* DEBUG */
|
||||
@ -1305,6 +1310,10 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
|
||||
u_int gen = *(u_int *) cookie;
|
||||
am_node *xp;
|
||||
mntent_t mnt;
|
||||
#ifdef DEBUG
|
||||
nfsentry *ne;
|
||||
static int j;
|
||||
#endif /* DEBUG */
|
||||
|
||||
dp->dl_eof = FALSE; /* assume readdir not done */
|
||||
|
||||
@ -1317,6 +1326,7 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
|
||||
return amfs_auto_readdir_browsable(mp, cookie, dp, ep, count, FALSE);
|
||||
}
|
||||
|
||||
/* when gen is 0, we start reading from the beginning of the directory */
|
||||
if (gen == 0) {
|
||||
/*
|
||||
* In the default instance (which is used to start a search) we return
|
||||
@ -1361,6 +1371,12 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
|
||||
if (!xp)
|
||||
dp->dl_eof = TRUE; /* by default assume readdir done */
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR)
|
||||
for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%d ck=%d",
|
||||
j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
|
||||
#endif /* DEBUG */
|
||||
return 0;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
@ -1373,6 +1389,10 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
|
||||
#endif /* DEBUG */
|
||||
dp->dl_eof = TRUE;
|
||||
dp->dl_entries = 0;
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR)
|
||||
plog(XLOG_DEBUG, "end of readdir eof=TRUE, dl_entries=0\n");
|
||||
#endif /* DEBUG */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1415,6 +1435,12 @@ amfs_auto_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, i
|
||||
|
||||
ep->ne_nextentry = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR)
|
||||
for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%d ck=%d",
|
||||
j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
|
||||
#endif /* DEBUG */
|
||||
return 0;
|
||||
}
|
||||
return ESTALE;
|
||||
@ -1428,17 +1454,18 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
|
||||
u_int gen = *(u_int *) cookie;
|
||||
int chain_length, i;
|
||||
static nfsentry *te, *te_next;
|
||||
#ifdef DEBUG_READDIR
|
||||
#ifdef DEBUG
|
||||
nfsentry *ne;
|
||||
static int j;
|
||||
#endif /* DEBUG_READDIR */
|
||||
#endif /* DEBUG */
|
||||
|
||||
dp->dl_eof = FALSE; /* assume readdir not done */
|
||||
|
||||
#ifdef DEBUG_READDIR
|
||||
plog(XLOG_INFO, "amfs_auto_readdir_browsable gen=%u, count=%d",
|
||||
gen, count);
|
||||
#endif /* DEBUG_READDIR */
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR)
|
||||
plog(XLOG_DEBUG, "amfs_auto_readdir_browsable gen=%u, count=%d",
|
||||
gen, count);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (gen == 0) {
|
||||
/*
|
||||
@ -1488,6 +1515,7 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
|
||||
ep[1].ne_fileid = mp->am_parent->am_gen;
|
||||
else
|
||||
ep[1].ne_fileid = mp->am_gen;
|
||||
|
||||
ep[1].ne_name = "..";
|
||||
ep[1].ne_nextentry = 0;
|
||||
*(u_int *) ep[1].ne_cookie = DOT_DOT_COOKIE;
|
||||
@ -1501,10 +1529,11 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
|
||||
te = make_entry_chain(mp, dp->dl_entries, fully_browsable);
|
||||
if (!te)
|
||||
return 0;
|
||||
#ifdef DEBUG_READDIR
|
||||
for (j=0,ne=te; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_INFO, "gen1 key %4d \"%s\"", j++, ne->ne_name);
|
||||
#endif /* DEBUG_READDIR */
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR)
|
||||
for (j=0,ne=te; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_DEBUG, "gen1 key %4d \"%s\"", j++, ne->ne_name);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* return only "chain_length" entries */
|
||||
te_next = te;
|
||||
@ -1522,13 +1551,15 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
|
||||
dp->dl_eof = TRUE; /* tell readdir that's it */
|
||||
}
|
||||
ep[1].ne_nextentry = te; /* append this chunk of "te" chain */
|
||||
#ifdef DEBUG_READDIR
|
||||
for (j=0,ne=te; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_INFO, "gen2 key %4d \"%s\"", j++, ne->ne_name);
|
||||
for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_INFO, "gen2+ key %4d \"%s\" fi=%d ck=%d",
|
||||
j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
|
||||
plog(XLOG_INFO, "EOF is %d", dp->dl_eof);
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR) {
|
||||
for (j=0,ne=te; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->ne_name);
|
||||
for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%d ck=%d",
|
||||
j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
|
||||
plog(XLOG_DEBUG, "EOF is %d", dp->dl_eof);
|
||||
}
|
||||
#endif /* DEBUG_READDIR */
|
||||
return 0;
|
||||
} /* end of "if (gen == 0)" statement */
|
||||
@ -1579,12 +1610,14 @@ amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsen
|
||||
}
|
||||
ep = te; /* send next chunk of "te" chain */
|
||||
dp->dl_entries = ep;
|
||||
#ifdef DEBUG_READDIR
|
||||
plog(XLOG_INFO, "dl_entries=0x%x, te_next=0x%x, dl_eof=%d",
|
||||
(int) dp->dl_entries, (int) te_next, dp->dl_eof);
|
||||
for (ne=te; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_INFO, "gen3 key %4d \"%s\"", j++, ne->ne_name);
|
||||
#endif /* DEBUG_READDIR */
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_READDIR) {
|
||||
plog(XLOG_DEBUG, "dl_entries=0x%lx, te_next=0x%lx, dl_eof=%d",
|
||||
(long) dp->dl_entries, (long) te_next, dp->dl_eof);
|
||||
for (ne=te; ne; ne=ne->ne_nextentry)
|
||||
plog(XLOG_DEBUG, "gen3 key %4d \"%s\"", j++, ne->ne_name);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_direct.c,v 1.2 1999/01/10 21:53:41 ezk Exp $
|
||||
* $Id: amfs_direct.c,v 1.3.2.1 2001/01/10 03:23:00 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_error.c,v 1.2 1999/01/10 21:53:41 ezk Exp $
|
||||
* $Id: amfs_error.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
#include <am_defs.h>
|
||||
#include <amd.h>
|
||||
|
||||
static char * amfs_error_match(am_opts *fo);
|
||||
static char *amfs_error_match(am_opts *fo);
|
||||
static int amfs_error_fmount(mntfs *mf);
|
||||
static int amfs_error_fumount(mntfs *mf);
|
||||
static void amfs_error_umounted(am_node *mp);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_host.c,v 1.3 1999/01/13 23:30:57 ezk Exp $
|
||||
* $Id: amfs_host.c,v 1.4.2.4 2001/05/19 02:00:58 ib42 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -204,7 +204,7 @@ sortfun(const voidp x, const voidp y)
|
||||
* Get filehandle
|
||||
*/
|
||||
static int
|
||||
fetch_fhandle(CLIENT * client, char *dir, am_nfs_handle_t *fhp, u_long nfs_version)
|
||||
fetch_fhandle(CLIENT *client, char *dir, am_nfs_handle_t *fhp, u_long nfs_version)
|
||||
{
|
||||
struct timeval tv;
|
||||
enum clnt_stat clnt_stat;
|
||||
@ -256,8 +256,7 @@ fetch_fhandle(CLIENT * client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versi
|
||||
(SVC_IN_ARG_TYPE) &fhp->v2,
|
||||
tv);
|
||||
if (clnt_stat != RPC_SUCCESS) {
|
||||
const char *msg = clnt_sperrno(clnt_stat);
|
||||
plog(XLOG_ERROR, "mountd rpc failed: %s", msg);
|
||||
plog(XLOG_ERROR, "mountd rpc failed: %s", clnt_sperrno(clnt_stat));
|
||||
return EIO;
|
||||
}
|
||||
/* Check status of filehandle */
|
||||
@ -403,7 +402,6 @@ amfs_host_fmount(mntfs *mf)
|
||||
* Figure out how many exports were returned
|
||||
*/
|
||||
for (n_export = 0, ex = exlist; ex; ex = ex->ex_next) {
|
||||
/* printf("export %s\n", ex->ex_dir); */
|
||||
n_export++;
|
||||
}
|
||||
|
||||
@ -415,7 +413,10 @@ amfs_host_fmount(mntfs *mf)
|
||||
ep = (exports *) xmalloc(n_export * sizeof(exports));
|
||||
for (j = 0, ex = exlist; ex; ex = ex->ex_next) {
|
||||
make_mntpt(mntpt, ex, mf);
|
||||
if (!already_mounted(mlist, mntpt))
|
||||
if (already_mounted(mlist, mntpt))
|
||||
/* we have at least one mounted f/s, so don't fail the mount */
|
||||
ok = TRUE;
|
||||
else
|
||||
ep[j++] = ex;
|
||||
}
|
||||
n_export = j;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_inherit.c,v 1.2 1999/01/10 21:53:41 ezk Exp $
|
||||
* $Id: amfs_inherit.c,v 1.3.2.1 2001/01/10 03:23:01 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_link.c,v 1.2 1999/01/10 21:53:42 ezk Exp $
|
||||
* $Id: amfs_link.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_linkx.c,v 1.2 1999/01/10 21:53:42 ezk Exp $
|
||||
* $Id: amfs_linkx.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_nfsl.c,v 1.3 1999/01/10 21:53:42 ezk Exp $
|
||||
* $Id: amfs_nfsl.c,v 1.4.2.1 2001/01/10 03:23:02 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_nfsx.c,v 1.2 1999/01/10 21:53:42 ezk Exp $
|
||||
* $Id: amfs_nfsx.c,v 1.3.2.2 2001/04/14 21:08:20 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -149,7 +149,7 @@ amfs_nfsx_match(am_opts *fo)
|
||||
*/
|
||||
xmtab = str3cat((char *) 0, fo->opt_rhost, ":", fo->opt_rfs);
|
||||
#ifdef DEBUG
|
||||
dlog("NFS: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"",
|
||||
dlog("NFSX: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"",
|
||||
fo->opt_rhost, fo->opt_rfs, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_program.c,v 1.5 1999/09/30 21:01:30 ezk Exp $
|
||||
* $Id: amfs_program.c,v 1.6.2.1 2001/01/10 03:23:03 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_root.c,v 1.2 1999/01/10 21:53:43 ezk Exp $
|
||||
* $Id: amfs_root.c,v 1.3.2.1 2001/01/10 03:23:03 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_toplvl.c,v 1.5 1999/02/04 07:24:14 ezk Exp $
|
||||
* $Id: amfs_toplvl.c,v 1.7.2.2 2001/04/14 21:08:20 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -275,10 +275,10 @@ amfs_toplvl_mount(am_node *mp)
|
||||
mnttype = "indirect";
|
||||
else if (mf->mf_ops == &amfs_direct_ops)
|
||||
mnttype = "direct";
|
||||
#ifdef HAVE_AM_FS_UNION
|
||||
#ifdef HAVE_AMU_FS_UNION
|
||||
else if (mf->mf_ops == &amfs_union_ops)
|
||||
mnttype = "union";
|
||||
#endif /* HAVE_AM_FS_UNION */
|
||||
#endif /* HAVE_AMU_FS_UNION */
|
||||
else
|
||||
mnttype = "auto";
|
||||
|
||||
@ -309,7 +309,7 @@ amfs_toplvl_mount(am_node *mp)
|
||||
error = mount_amfs_toplvl(mf->mf_mount, opts);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_FATAL, "mount_amfs_toplvl: %m");
|
||||
plog(XLOG_FATAL, "amfs_toplvl_mount: mount_amfs_toplvl failed: %m");
|
||||
return error;
|
||||
}
|
||||
return 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amfs_union.c,v 1.2 1999/01/10 21:53:43 ezk Exp $
|
||||
* $Id: amfs_union.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -92,7 +92,7 @@ create_amfs_union_node(char *dir, voidp arg)
|
||||
(void) amfs_toplvl_ops.lookuppn(arg, dir, &error, VLOOK_CREATE);
|
||||
if (error > 0) {
|
||||
errno = error; /* XXX */
|
||||
plog(XLOG_ERROR, "Could not mount %s: %m", dir);
|
||||
plog(XLOG_ERROR, "unionfs: could not mount %s: %m", dir);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amq_subr.c,v 1.5 1999/08/24 21:31:06 ezk Exp $
|
||||
* $Id: amq_subr.c,v 1.6.2.2 2001/01/12 22:43:42 ro Exp $
|
||||
*
|
||||
*/
|
||||
/*
|
||||
@ -171,90 +171,6 @@ amqproc_getmntfs_1_svc(voidp argp, struct svc_req *rqstp)
|
||||
return (amq_mount_info_list *) &mfhead; /* XXX */
|
||||
}
|
||||
|
||||
#ifdef ENABLE_AMQ_MOUNT
|
||||
/*
|
||||
* This is code that is vulnerable to IP spoofing attacks. Unless you
|
||||
* absolutely need it, I suggest you do not enable it
|
||||
* (using configure --enable-amq-mount)
|
||||
*/
|
||||
static int
|
||||
ok_security(struct svc_req *rqstp)
|
||||
{
|
||||
struct sockaddr_in *sin = (struct sockaddr_in *) NULL;
|
||||
|
||||
if ((sin = amu_svc_getcaller(rqstp->rq_xprt)) == NULL) {
|
||||
plog(XLOG_ERROR, "amu_svc_getcaller returned NULL");
|
||||
return(0); /* assume security is therefore not OK */
|
||||
}
|
||||
|
||||
if (ntohs(sin->sin_port) >= IPPORT_RESERVED ||
|
||||
!(sin->sin_addr.s_addr == htonl(0x7f000001) ||
|
||||
sin->sin_addr.s_addr == myipaddr.s_addr)) {
|
||||
char dq[20];
|
||||
plog(XLOG_INFO, "AMQ request from %s.%d DENIED",
|
||||
inet_dquad(dq, sin->sin_addr.s_addr),
|
||||
ntohs(sin->sin_port));
|
||||
return (0);
|
||||
}
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
int *
|
||||
amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp)
|
||||
{
|
||||
static int rc = EINVAL;
|
||||
char s[AMQ_STRLEN];
|
||||
char *cp;
|
||||
char dq[20];
|
||||
struct sockaddr_in *sin;
|
||||
|
||||
if ((sin = amu_svc_getcaller(rqstp->rq_xprt)) == NULL) {
|
||||
plog(XLOG_ERROR, "amu_svc_getcaller returned NULL");
|
||||
return &rc;
|
||||
}
|
||||
|
||||
strncpy(s, *(amq_string *) argp, AMQ_STRLEN-1);
|
||||
s[AMQ_STRLEN-1] = '\0'; /* null terminate, to be sure */
|
||||
plog(XLOG_ERROR,
|
||||
"amq requested mount of %s from %s.%d",
|
||||
s, inet_dquad(dq, sin->sin_addr.s_addr),
|
||||
ntohs(sin->sin_port));
|
||||
|
||||
/*
|
||||
* Minimalist security check.
|
||||
*/
|
||||
if (!ok_security(rqstp)) {
|
||||
rc = EACCES;
|
||||
return &rc;
|
||||
}
|
||||
/*
|
||||
* Find end of key
|
||||
*/
|
||||
for (cp = (char *) s; *cp && (!isascii(*cp) || !isspace(*cp)); cp++) ;
|
||||
|
||||
if (!*cp) {
|
||||
plog(XLOG_INFO, "amqproc_mount: Invalid arguments");
|
||||
rc = EINVAL;
|
||||
return &rc;
|
||||
}
|
||||
*cp++ = '\0';
|
||||
|
||||
/*
|
||||
* Find start of value
|
||||
*/
|
||||
while (*cp && isascii(*cp) && isspace(*cp))
|
||||
cp++;
|
||||
|
||||
root_newmap(s, cp, (char *) 0, NULL);
|
||||
rc = mount_auto_node(s, (voidp) root_node);
|
||||
if (rc < 0)
|
||||
return 0;
|
||||
return &rc;
|
||||
}
|
||||
#endif /* ENABLE_AMQ_MOUNT */
|
||||
|
||||
|
||||
amq_string *
|
||||
amqproc_getvers_1_svc(voidp argp, struct svc_req *rqstp)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amq_svc.c,v 1.3 1999/08/24 21:31:06 ezk Exp $
|
||||
* $Id: amq_svc.c,v 1.4.2.2 2001/01/12 22:43:42 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -59,9 +59,6 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp)
|
||||
amq_string amqproc_mnttree_1_arg;
|
||||
amq_string amqproc_umnt_1_arg;
|
||||
amq_setopt amqproc_setopt_1_arg;
|
||||
#ifdef ENABLE_AMQ_MOUNT
|
||||
amq_string amqproc_mount_1_arg;
|
||||
#endif /* ENABLE_AMQ_MOUNT */
|
||||
} argument;
|
||||
char *result;
|
||||
xdrproc_t xdr_argument, xdr_result;
|
||||
@ -111,14 +108,6 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp)
|
||||
local = (amqsvcproc_t) amqproc_getmntfs_1_svc;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_AMQ_MOUNT
|
||||
case AMQPROC_MOUNT:
|
||||
xdr_argument = (xdrproc_t) xdr_amq_string;
|
||||
xdr_result = (xdrproc_t) xdr_int;
|
||||
local = (amqsvcproc_t) amqproc_mount_1_svc;
|
||||
break;
|
||||
#endif /* ENABLE_AMQ_MOUNT */
|
||||
|
||||
case AMQPROC_GETVERS:
|
||||
xdr_argument = (xdrproc_t) xdr_void;
|
||||
xdr_result = (xdrproc_t) xdr_amq_string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: autil.c,v 1.3 1999/01/10 21:53:44 ezk Exp $
|
||||
* $Id: autil.c,v 1.4.2.2 2001/04/29 05:08:35 ib42 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -219,7 +219,9 @@ forcibly_timeout_mp(am_node *mp)
|
||||
*/
|
||||
if (mf && ((mp->am_flags & AMF_ROOT) ||
|
||||
(mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)))) {
|
||||
if (!(mf->mf_flags & MFF_UNMOUNTING))
|
||||
if (mf->mf_flags & MFF_UNMOUNTING)
|
||||
plog(XLOG_WARNING, "node %s is currently being unmounted, ignoring timeout request", mp->am_path);
|
||||
else
|
||||
plog(XLOG_WARNING, "ignoring timeout request for active node %s", mp->am_path);
|
||||
} else {
|
||||
plog(XLOG_INFO, "\"%s\" forcibly timed out", mp->am_path);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: clock.c,v 1.3 1999/01/13 23:30:58 ezk Exp $
|
||||
* $Id: clock.c,v 1.4.2.1 2001/01/10 03:23:04 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: conf.c,v 1.5 1999/09/30 21:01:30 ezk Exp $
|
||||
* $Id: conf.c,v 1.7.2.3 2001/04/14 21:08:21 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -98,8 +98,10 @@ static int gopt_map_type(const char *val);
|
||||
static int gopt_mount_type(const char *val);
|
||||
static int gopt_pid_file(const char *val);
|
||||
static int gopt_portmap_program(const char *val);
|
||||
static int gopt_nfs_proto(const char *val);
|
||||
static int gopt_nfs_retransmit_counter(const char *val);
|
||||
static int gopt_nfs_retry_interval(const char *val);
|
||||
static int gopt_nfs_vers(const char *val);
|
||||
static int gopt_nis_domain(const char *val);
|
||||
static int gopt_normalize_hostnames(const char *val);
|
||||
static int gopt_os(const char *val);
|
||||
@ -109,7 +111,7 @@ static int gopt_print_pid(const char *val);
|
||||
static int gopt_print_version(const char *val);
|
||||
static int gopt_restart_mounts(const char *val);
|
||||
static int gopt_search_path(const char *val);
|
||||
static int gopt_selectors_on_default(const char *val);
|
||||
static int gopt_selectors_in_defaults(const char *val);
|
||||
static int gopt_show_statfs_entries(const char *val);
|
||||
static int gopt_unmount_on_exit(const char *val);
|
||||
static int gopt_vendor(const char *val);
|
||||
@ -154,8 +156,10 @@ static struct _func_map glob_functable[] = {
|
||||
{"mount_type", gopt_mount_type},
|
||||
{"pid_file", gopt_pid_file},
|
||||
{"portmap_program", gopt_portmap_program},
|
||||
{"nfs_proto", gopt_nfs_proto},
|
||||
{"nfs_retransmit_counter", gopt_nfs_retransmit_counter},
|
||||
{"nfs_retry_interval", gopt_nfs_retry_interval},
|
||||
{"nfs_vers", gopt_nfs_vers},
|
||||
{"nis_domain", gopt_nis_domain},
|
||||
{"normalize_hostnames", gopt_normalize_hostnames},
|
||||
{"os", gopt_os},
|
||||
@ -165,7 +169,8 @@ static struct _func_map glob_functable[] = {
|
||||
{"print_version", gopt_print_version},
|
||||
{"restart_mounts", gopt_restart_mounts},
|
||||
{"search_path", gopt_search_path},
|
||||
{"selectors_on_default", gopt_selectors_on_default},
|
||||
{"selectors_on_default", gopt_selectors_in_defaults},
|
||||
{"selectors_in_defaults", gopt_selectors_in_defaults},
|
||||
{"show_statfs_entries", gopt_show_statfs_entries},
|
||||
{"unmount_on_exit", gopt_unmount_on_exit},
|
||||
{"vendor", gopt_vendor},
|
||||
@ -230,7 +235,7 @@ reset_cf_map(cf_map_t *cfm)
|
||||
cfm->cfm_flags = gopt.flags & (CFM_BROWSABLE_DIRS |
|
||||
CFM_BROWSABLE_DIRS_FULL |
|
||||
CFM_MOUNT_TYPE_AUTOFS |
|
||||
CFM_ENABLE_DEFAULT_SELECTORS);
|
||||
CFM_SELECTORS_IN_DEFAULTS);
|
||||
}
|
||||
|
||||
|
||||
@ -480,7 +485,7 @@ gopt_ldap_cache_seconds(const char *val)
|
||||
}
|
||||
return 0;
|
||||
#else /* not HAVE_MAP_LDAP */
|
||||
fprintf(stderr, "conf: ldap_cache option ignored. No LDAP support available.\n");
|
||||
fprintf(stderr, "conf: ldap_cache_seconds option ignored. No LDAP support available.\n");
|
||||
return 1;
|
||||
#endif /* not HAVE_MAP_LDAP */
|
||||
}
|
||||
@ -499,7 +504,7 @@ gopt_ldap_cache_maxmem(const char *val)
|
||||
}
|
||||
return 0;
|
||||
#else /* not HAVE_MAP_LDAP */
|
||||
fprintf(stderr, "conf: ldap_cache option ignored. No LDAP support available.\n");
|
||||
fprintf(stderr, "conf: ldap_cache_maxmem option ignored. No LDAP support available.\n");
|
||||
return 1;
|
||||
#endif /* not HAVE_MAP_LDAP */
|
||||
}
|
||||
@ -590,7 +595,7 @@ gopt_portmap_program(const char *val)
|
||||
gopt.portmap_program > AMQ_PROGRAM + 10) {
|
||||
gopt.portmap_program = AMQ_PROGRAM;
|
||||
set_amd_program_number(gopt.portmap_program);
|
||||
fprintf(stderr, "conf: illegal amd program numver \"%s\"\n", val);
|
||||
fprintf(stderr, "conf: illegal amd program number \"%s\"\n", val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -599,6 +604,18 @@ gopt_portmap_program(const char *val)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
gopt_nfs_proto(const char *val)
|
||||
{
|
||||
if (STREQ(val, "udp") || STREQ(val, "tcp")) {
|
||||
gopt.nfs_proto = strdup((char *)val);
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, "conf: illegal nfs_proto \"%s\"\n", val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
gopt_nfs_retransmit_counter(const char *val)
|
||||
{
|
||||
@ -615,6 +632,20 @@ gopt_nfs_retry_interval(const char *val)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
gopt_nfs_vers(const char *val)
|
||||
{
|
||||
int i = atoi(val);
|
||||
|
||||
if (i == 2 || i == 3) {
|
||||
gopt.nfs_vers = i;
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, "conf: illegal nfs_vers \"%s\"\n", val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
gopt_nis_domain(const char *val)
|
||||
{
|
||||
@ -732,13 +763,13 @@ gopt_search_path(const char *val)
|
||||
|
||||
|
||||
static int
|
||||
gopt_selectors_on_default(const char *val)
|
||||
gopt_selectors_in_defaults(const char *val)
|
||||
{
|
||||
if (STREQ(val, "yes")) {
|
||||
gopt.flags |= CFM_ENABLE_DEFAULT_SELECTORS;
|
||||
gopt.flags |= CFM_SELECTORS_IN_DEFAULTS;
|
||||
return 0;
|
||||
} else if (STREQ(val, "no")) {
|
||||
gopt.flags &= ~CFM_ENABLE_DEFAULT_SELECTORS;
|
||||
gopt.flags &= ~CFM_SELECTORS_IN_DEFAULTS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: conf_parse.y,v 1.3 1999/04/16 14:20:59 ezk Exp $
|
||||
* $Id: conf_parse.y,v 1.4.2.1 2001/01/10 03:23:05 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
%{
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -39,7 +39,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: conf_tok.l,v 1.2 1999/01/10 21:53:45 ezk Exp $
|
||||
* $Id: conf_tok.l,v 1.3.2.1 2001/01/10 03:23:05 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: get_args.c,v 1.4 1999/09/30 21:01:31 ezk Exp $
|
||||
* $Id: get_args.c,v 1.7.2.1 2001/01/10 03:23:05 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -85,7 +85,7 @@ get_version_string(void)
|
||||
|
||||
vers = xmalloc(2048 + wire_buf_len);
|
||||
sprintf(vers, "%s\n%s\n%s\n%s\n",
|
||||
"Copyright (c) 1997-1999 Erez Zadok",
|
||||
"Copyright (c) 1997-2001 Erez Zadok",
|
||||
"Copyright (c) 1990 Jan-Simon Pendry",
|
||||
"Copyright (c) 1990 Imperial College of Science, Technology & Medicine",
|
||||
"Copyright (c) 1990 The Regents of the University of California.");
|
||||
@ -334,6 +334,9 @@ get_args(int argc, char *argv[])
|
||||
if (debug_flags & D_MTAB)
|
||||
dlog("-D mtab option ignored");
|
||||
# endif /* DEBUG */
|
||||
# ifdef MNTTAB_FILE_NAME
|
||||
mnttab_file_name = MNTTAB_FILE_NAME;
|
||||
# endif /* MNTTAB_FILE_NAME */
|
||||
#endif /* not MOUNT_TABLE_ON_FILE */
|
||||
|
||||
if (switch_to_logfile(gopt.logfile, orig_umask) != 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_file.c,v 1.2 1999/01/10 21:53:45 ezk Exp $
|
||||
* $Id: info_file.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -62,7 +62,7 @@ int file_mtime(mnt_map *m, char *map, time_t *tp);
|
||||
|
||||
|
||||
static int
|
||||
read_line(char *buf, int size, FILE * fp)
|
||||
read_line(char *buf, int size, FILE *fp)
|
||||
{
|
||||
int done = 0;
|
||||
|
||||
@ -97,7 +97,7 @@ read_line(char *buf, int size, FILE * fp)
|
||||
* Try to locate a key in a file
|
||||
*/
|
||||
static int
|
||||
search_or_reload_file(FILE * fp, char *map, char *key, char **val, mnt_map *m, void (*fn) (mnt_map *m, char *, char *))
|
||||
search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m, void (*fn) (mnt_map *m, char *, char *))
|
||||
{
|
||||
char key_val[MAX_LINE_LEN];
|
||||
int chuck = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_hesiod.c,v 1.5 1999/02/04 07:24:15 ezk Exp $
|
||||
* $Id: info_hesiod.c,v 1.6.2.1 2001/01/10 03:23:05 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_ldap.c,v 1.6 1999/09/30 21:01:31 ezk Exp $
|
||||
* $Id: info_ldap.c,v 1.9.2.2 2001/01/12 23:28:56 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -127,24 +127,25 @@ he_free(HE *h)
|
||||
|
||||
|
||||
static HE *
|
||||
string2he(char *s)
|
||||
string2he(char *s_orig)
|
||||
{
|
||||
char *c, *p;
|
||||
char *s;
|
||||
HE *new, *old = NULL;
|
||||
|
||||
if (s == NULL)
|
||||
return (NULL);
|
||||
if (NULL == s_orig || NULL == (s = strdup(s_orig)))
|
||||
return NULL;
|
||||
for (p = s; p; p = strchr(p, ',')) {
|
||||
if (old != NULL) {
|
||||
new = (HE *) xmalloc(sizeof(HE));
|
||||
new = ALLOC(HE);
|
||||
old->next = new;
|
||||
old = new;
|
||||
} else {
|
||||
old = (HE *) xmalloc(sizeof(HE));
|
||||
old = ALLOC(HE);
|
||||
old->next = NULL;
|
||||
}
|
||||
c = strchr(p, ':');
|
||||
if (c) { /* Host and port */
|
||||
if (c) { /* Host and port */
|
||||
*c++ = '\0';
|
||||
old->host = strdup(p);
|
||||
old->port = atoi(c);
|
||||
@ -152,6 +153,7 @@ string2he(char *s)
|
||||
old->host = strdup(p);
|
||||
|
||||
}
|
||||
XFREE(s);
|
||||
return (old);
|
||||
}
|
||||
|
||||
@ -196,8 +198,8 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts)
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
aldh = (ALD *) xmalloc(sizeof(ALD));
|
||||
creds = (CR *) xmalloc(sizeof(CR));
|
||||
aldh = ALLOC(ALD);
|
||||
creds = ALLOC(CR);
|
||||
|
||||
aldh->hostent = string2he(gopt.ldap_hostports);
|
||||
if (aldh->hostent == NULL) {
|
||||
@ -278,7 +280,7 @@ amu_ldap_rebind(ALD *a)
|
||||
|
||||
|
||||
static int
|
||||
get_ldap_timestamp(LDAP * ld, char *map, time_t *ts)
|
||||
get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
|
||||
{
|
||||
struct timeval tv;
|
||||
char **vals, *end;
|
||||
@ -313,7 +315,7 @@ get_ldap_timestamp(LDAP * ld, char *map, time_t *ts)
|
||||
if (err != LDAP_SUCCESS) {
|
||||
*ts = 0;
|
||||
plog(XLOG_USER, "LDAP timestamp search failed: %s\n",
|
||||
ldap_err2string(ld->ld_errno));
|
||||
ldap_err2string(err));
|
||||
return (ENOENT);
|
||||
}
|
||||
|
||||
@ -413,7 +415,7 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
|
||||
return (ENOENT);
|
||||
default:
|
||||
plog(XLOG_USER, "LDAP search failed: %s\n",
|
||||
ldap_err2string(a->ldap->ld_errno));
|
||||
ldap_err2string(err));
|
||||
ldap_msgfree(res);
|
||||
return (EIO);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_ndbm.c,v 1.2 1999/01/10 21:53:46 ezk Exp $
|
||||
* $Id: info_ndbm.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_nis.c,v 1.5 1999/08/22 05:12:51 ezk Exp $
|
||||
* $Id: info_nis.c,v 1.6.2.2 2001/04/14 21:08:21 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -321,7 +321,7 @@ nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
|
||||
return ENOENT;
|
||||
|
||||
default:
|
||||
plog(XLOG_ERROR, "%s: %s", map, yperr_string(res));
|
||||
plog(XLOG_ERROR, "nis_search: %s: %s", map, yperr_string(res));
|
||||
return EIO;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_nisplus.c,v 1.2 1999/01/10 21:53:46 ezk Exp $
|
||||
* $Id: info_nisplus.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -207,7 +207,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
|
||||
XFREE(index);
|
||||
|
||||
if (result == NULL) {
|
||||
plog(XLOG_ERROR, "%s: %s", map, strerror(ENOMEM));
|
||||
plog(XLOG_ERROR, "nisplus_search: %s: %s", map, strerror(ENOMEM));
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
|
||||
break;
|
||||
|
||||
default:
|
||||
plog(XLOG_ERROR, "%s: %s", map, nis_sperrno(result->status));
|
||||
plog(XLOG_ERROR, "nisplus_search: %s: %s", map, nis_sperrno(result->status));
|
||||
error = EIO;
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_passwd.c,v 1.2 1999/01/10 21:53:46 ezk Exp $
|
||||
* $Id: info_passwd.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: info_union.c,v 1.2 1999/01/10 21:53:47 ezk Exp $
|
||||
* $Id: info_union.c,v 1.3.2.1 2001/01/10 03:23:07 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: map.c,v 1.5 1999/08/22 05:12:51 ezk Exp $
|
||||
* $Id: map.c,v 1.6.2.3 2001/01/10 03:23:07 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -65,6 +65,7 @@
|
||||
* there is no way that 2^32 generation numbers could ever
|
||||
* be allocated by a single run of amd - there is simply
|
||||
* not enough cpu time available.
|
||||
* Famous last words... -Ion
|
||||
*/
|
||||
static u_int am_gen = 2; /* Initial generation number */
|
||||
static int timeout_mp_id; /* Id from last call to timeout */
|
||||
@ -307,7 +308,7 @@ init_map(am_node *mp, char *dir)
|
||||
{
|
||||
/*
|
||||
* mp->am_mapno is initialized by exported_ap_alloc
|
||||
* other fields don't need to be set to zero.
|
||||
* other fields don't need to be initialized.
|
||||
*/
|
||||
mp->am_mnt = new_mntfs();
|
||||
mp->am_name = strdup(dir);
|
||||
@ -318,7 +319,7 @@ init_map(am_node *mp, char *dir)
|
||||
mp->am_attr.ns_status = NFS_OK;
|
||||
mp->am_fattr = gen_fattr;
|
||||
mp->am_fattr.na_fsid = 42;
|
||||
mp->am_fattr.na_fileid = 0;
|
||||
mp->am_fattr.na_fileid = mp->am_gen;
|
||||
mp->am_fattr.na_atime.nt_seconds = clocktime();
|
||||
mp->am_fattr.na_atime.nt_useconds = 0;
|
||||
mp->am_fattr.na_mtime = mp->am_fattr.na_ctime = mp->am_fattr.na_atime;
|
||||
@ -937,6 +938,21 @@ unmount_mp(am_node *mp)
|
||||
int was_backgrounded = 0;
|
||||
mntfs *mf = mp->am_mnt;
|
||||
|
||||
#ifndef MNT2_NFS_OPT_SYMTTL
|
||||
/*
|
||||
* This code is needed to defeat Solaris 2.4's (and newer) symlink
|
||||
* values cache. It forces the last-modified time of the symlink to be
|
||||
* current. It is not needed if the O/S has an nfs flag to turn off the
|
||||
* symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
|
||||
*/
|
||||
if (mp->am_parent) {
|
||||
/* defensive programming... can't we assert the above condition? */
|
||||
nfsattrstat *attrp = &mp->am_parent->am_attr;
|
||||
if (++attrp->ns_u.ns_attr_u.na_mtime.nt_useconds == 0)
|
||||
++attrp->ns_u.ns_attr_u.na_mtime.nt_seconds;
|
||||
}
|
||||
#endif /* not MNT2_NFS_OPT_SYMTTL */
|
||||
|
||||
#ifdef notdef
|
||||
plog(XLOG_INFO, "\"%s\" on %s timed out", mp->am_path, mp->am_mnt->mf_mount);
|
||||
#endif /* notdef */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: mapc.c,v 1.5 1999/09/30 21:01:31 ezk Exp $
|
||||
* $Id: mapc.c,v 1.7.2.3 2001/04/14 21:08:22 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -230,7 +230,7 @@ static map_type maptypes[] =
|
||||
NULL, /* isup function */
|
||||
passwd_search,
|
||||
error_mtime,
|
||||
MAPC_ALL
|
||||
MAPC_INC
|
||||
},
|
||||
#endif /* HAVE_MAP_PASSWD */
|
||||
#ifdef HAVE_MAP_HESIOD
|
||||
@ -241,7 +241,7 @@ static map_type maptypes[] =
|
||||
hesiod_isup, /* is Hesiod up or not? */
|
||||
hesiod_search,
|
||||
error_mtime,
|
||||
MAPC_ALL
|
||||
MAPC_INC
|
||||
},
|
||||
#endif /* HAVE_MAP_HESIOD */
|
||||
#ifdef HAVE_MAP_LDAP
|
||||
@ -252,7 +252,7 @@ static map_type maptypes[] =
|
||||
NULL, /* isup function */
|
||||
amu_ldap_search,
|
||||
amu_ldap_mtime,
|
||||
MAPC_ALL
|
||||
MAPC_INC
|
||||
},
|
||||
#endif /* HAVE_MAP_LDAP */
|
||||
#ifdef HAVE_MAP_UNION
|
||||
@ -296,7 +296,7 @@ static map_type maptypes[] =
|
||||
NULL, /* isup function */
|
||||
ndbm_search,
|
||||
ndbm_mtime,
|
||||
MAPC_ALL
|
||||
MAPC_INC
|
||||
},
|
||||
#endif /* HAVE_MAP_NDBM */
|
||||
#ifdef HAVE_MAP_FILE
|
||||
@ -498,26 +498,25 @@ mapc_reload_map(mnt_map *m)
|
||||
{
|
||||
int error;
|
||||
kv *maphash[NKVHASH], *tmphash[NKVHASH];
|
||||
time_t t;
|
||||
|
||||
error = (*m->mtime) (m, m->map_name, &t);
|
||||
if (error) {
|
||||
t = m->modify;
|
||||
}
|
||||
|
||||
/*
|
||||
* skip reloading maps that have not been modified, unless
|
||||
* amq -f was used (do_mapc_reload is 0)
|
||||
*/
|
||||
if (m->reloads != 0 && do_mapc_reload != 0) {
|
||||
time_t t;
|
||||
error = (*m->mtime) (m, m->map_name, &t);
|
||||
if (!error) {
|
||||
if (t <= m->modify) {
|
||||
if (t <= m->modify) {
|
||||
plog(XLOG_INFO, "reload of map %s is not needed (in sync)", m->map_name);
|
||||
#ifdef DEBUG
|
||||
dlog("map %s last load time is %d, last modify time is %d",
|
||||
m->map_name, (int) m->modify, (int) t);
|
||||
#endif /* DEBUG */
|
||||
return;
|
||||
} else {
|
||||
/* reload of the map is needed, update map reload time */
|
||||
m->modify = t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -547,6 +546,7 @@ mapc_reload_map(mnt_map *m)
|
||||
memcpy((voidp) m->kvhash, (voidp) maphash, sizeof(m->kvhash));
|
||||
mapc_clear(m);
|
||||
memcpy((voidp) m->kvhash, (voidp) tmphash, sizeof(m->kvhash));
|
||||
m->modify = t;
|
||||
}
|
||||
m->wildcard = 0;
|
||||
|
||||
@ -584,7 +584,7 @@ mapc_create(char *map, char *opt, const char *type)
|
||||
mt < maptypes + sizeof(maptypes) / sizeof(maptypes[0]);
|
||||
mt++) {
|
||||
if (STREQ(type, mt->name)) {
|
||||
plog(XLOG_INFO, "initializing amd conf map %s of type %s", map, type);
|
||||
plog(XLOG_INFO, "initializing amd.conf map %s of type %s", map, type);
|
||||
if ((*mt->init) (m, map, &modify) == 0) {
|
||||
break;
|
||||
} else {
|
||||
@ -780,6 +780,7 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse)
|
||||
plog(XLOG_ERROR, "Null map request for %s", key);
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
if (m->flags & MAPC_SYNC) {
|
||||
/*
|
||||
* Get modify time...
|
||||
@ -787,7 +788,6 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse)
|
||||
time_t t;
|
||||
error = (*m->mtime) (m, m->map_name, &t);
|
||||
if (error || t > m->modify) {
|
||||
m->modify = t;
|
||||
plog(XLOG_INFO, "Map %s is out of date", m->map_name);
|
||||
mapc_sync(m);
|
||||
}
|
||||
@ -1122,6 +1122,9 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (mp->am_pref)
|
||||
preflen = strlen(mp->am_pref);
|
||||
|
||||
/* iterate over keys */
|
||||
for (i = 0; i < NKVHASH; i++) {
|
||||
kv *k;
|
||||
@ -1142,12 +1145,15 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable
|
||||
|
||||
/*
|
||||
* If the map has a prefix-string then check if the key starts with
|
||||
* this * string, and if it does, skip over this prefix.
|
||||
* this string, and if it does, skip over this prefix. If it has a
|
||||
* prefix and it doesn't match the start of the key, skip it.
|
||||
*/
|
||||
if (preflen) {
|
||||
if (preflen && (preflen <= (strlen(key)))) {
|
||||
if (!NSTREQ(key, mp->am_pref, preflen))
|
||||
continue;
|
||||
key += preflen;
|
||||
} else if (preflen) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* no more '/' are allowed, unless browsable_dirs=full was used */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: mntfs.c,v 1.2 1999/01/10 21:53:47 ezk Exp $
|
||||
* $Id: mntfs.c,v 1.5.2.1 2001/01/10 03:23:07 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -174,8 +174,8 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char
|
||||
mf->mf_server = fs;
|
||||
}
|
||||
return dup_mntfs(mf);
|
||||
}
|
||||
}
|
||||
} /* end of "if (STREQ(mf-> ..." */
|
||||
} /* end of ITER */
|
||||
|
||||
return alloc_mntfs(ops, mo, mp, info, auto_opts, mopts, remopts);
|
||||
}
|
||||
@ -310,7 +310,9 @@ realloc_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *a
|
||||
{
|
||||
mntfs *mf2;
|
||||
|
||||
if (mf->mf_refc == 1 && mf->mf_ops == &amfs_inherit_ops && STREQ(mf->mf_mount, mp)) {
|
||||
if (mf->mf_refc == 1 &&
|
||||
mf->mf_ops == &amfs_inherit_ops &&
|
||||
STREQ(mf->mf_mount, mp)) {
|
||||
/*
|
||||
* If we are inheriting then just return
|
||||
* the same node...
|
||||
@ -331,5 +333,23 @@ realloc_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *a
|
||||
|
||||
mf2 = find_mntfs(ops, mo, mp, info, auto_opts, mopts, remopts);
|
||||
free_mntfs(mf);
|
||||
#if 0
|
||||
/*
|
||||
* XXX: EZK IS THIS RIGHT???
|
||||
* The next "if" statement is what supposedly fixes bgmount() in
|
||||
* that it will actually use the ops structure of the next mount
|
||||
* entry, if the previous one failed.
|
||||
*/
|
||||
if (mf2 &&
|
||||
ops &&
|
||||
mf2->mf_ops != ops &&
|
||||
mf2->mf_ops != &amfs_inherit_ops &&
|
||||
mf2->mf_ops != &amfs_toplvl_ops &&
|
||||
mf2->mf_ops != &amfs_error_ops) {
|
||||
plog(XLOG_WARNING, "realloc_mntfs: copy fallback ops \"%s\" over \"%s\"",
|
||||
ops->fs_type, mf2->mf_ops->fs_type);
|
||||
mf2->mf_ops = ops;
|
||||
}
|
||||
#endif
|
||||
return mf2;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: nfs_prot_svc.c,v 1.4 1999/08/22 21:12:30 ezk Exp $
|
||||
* $Id: nfs_prot_svc.c,v 1.5.2.2 2001/01/12 23:28:56 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -50,23 +50,23 @@
|
||||
|
||||
/* external definitions */
|
||||
extern voidp nfsproc_null_2_svc(voidp, struct svc_req *);
|
||||
extern nfsattrstat * nfsproc_getattr_2_svc(am_nfs_fh *, struct svc_req *);
|
||||
extern nfsattrstat * nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
|
||||
extern nfsattrstat *nfsproc_getattr_2_svc(am_nfs_fh *, struct svc_req *);
|
||||
extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
|
||||
extern voidp nfsproc_root_2_svc(voidp, struct svc_req *);
|
||||
extern nfsdiropres * nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
|
||||
extern nfsreadlinkres * nfsproc_readlink_2_svc(am_nfs_fh *, struct svc_req *);
|
||||
extern nfsreadres * nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
|
||||
extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
|
||||
extern nfsreadlinkres *nfsproc_readlink_2_svc(am_nfs_fh *, struct svc_req *);
|
||||
extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
|
||||
extern voidp nfsproc_writecache_2_svc(voidp, struct svc_req *);
|
||||
extern nfsattrstat * nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
|
||||
extern nfsdiropres * nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
|
||||
extern nfsstat * nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
|
||||
extern nfsstat * nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
|
||||
extern nfsstat * nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
|
||||
extern nfsstat * nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
|
||||
extern nfsdiropres * nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
|
||||
extern nfsstat * nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
|
||||
extern nfsreaddirres * nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
|
||||
extern nfsstatfsres * nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *);
|
||||
extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
|
||||
extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
|
||||
extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
|
||||
extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
|
||||
extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
|
||||
extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
|
||||
extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
|
||||
extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
|
||||
extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
|
||||
extern nfsstatfsres *nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *);
|
||||
|
||||
/* global variables */
|
||||
SVCXPRT *nfs_program_2_transp;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: nfs_start.c,v 1.4 1999/02/04 07:24:16 ezk Exp $
|
||||
* $Id: nfs_start.c,v 1.5.2.1 2001/01/10 03:23:08 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: nfs_subr.c,v 1.3 1999/01/13 23:31:00 ezk Exp $
|
||||
* $Id: nfs_subr.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -108,6 +108,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
||||
static nfsattrstat res;
|
||||
am_node *mp;
|
||||
int retry;
|
||||
time_t now = clocktime();
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
@ -122,33 +123,31 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
||||
plog(XLOG_DEBUG, "\tretry=%d", retry);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (retry < 0)
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
res.ns_status = nfs_error(retry);
|
||||
} else {
|
||||
nfsattrstat *attrp = &mp->am_attr;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tstat(%s), size = %d", mp->am_path,
|
||||
(int) attrp->ns_u.ns_attr_u.na_size);
|
||||
plog(XLOG_DEBUG, "\tstat(%s), size = %d, mtime=%ld",
|
||||
mp->am_path,
|
||||
(int) attrp->ns_u.ns_attr_u.na_size,
|
||||
(long) attrp->ns_u.ns_attr_u.na_mtime.nt_seconds);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Delay unmount of what was looked up */
|
||||
if (mp->am_timeo_w < 4 * gopt.am_timeo_w)
|
||||
mp->am_timeo_w += gopt.am_timeo_w;
|
||||
mp->am_ttl = now + mp->am_timeo_w;
|
||||
|
||||
mp->am_stats.s_getattr++;
|
||||
return attrp;
|
||||
}
|
||||
|
||||
#ifndef MNT2_NFS_OPT_SYMTTL
|
||||
/*
|
||||
* This code is needed to defeat Solaris 2.4's (and newer) symlink values
|
||||
* cache. It forces the last-modified time of the symlink to be current.
|
||||
* It is not needed if the O/S has an nfs flag to turn off the
|
||||
* symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
|
||||
*/
|
||||
if (++res.ns_u.ns_attr_u.na_mtime.nt_useconds == 0)
|
||||
++res.ns_u.ns_attr_u.na_mtime.nt_seconds;
|
||||
#endif /* not MNT2_NFS_OPT_SYMTTL */
|
||||
|
||||
return &res;
|
||||
}
|
||||
|
||||
@ -182,16 +181,26 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
|
||||
static nfsdiropres res;
|
||||
am_node *mp;
|
||||
int retry;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "lookup:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* finally, find the effective uid/gid from RPC request */
|
||||
if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0)
|
||||
plog(XLOG_ERROR, "cannot get uid/gid from RPC credentials");
|
||||
sprintf(opt_uid, "%d", (int) uid);
|
||||
sprintf(opt_gid, "%d", (int) gid);
|
||||
|
||||
mp = fh_to_mp2(&argp->da_fhandle, &retry);
|
||||
if (mp == 0) {
|
||||
if (retry < 0)
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
res.dr_status = nfs_error(retry);
|
||||
} else {
|
||||
int error;
|
||||
@ -203,9 +212,6 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
|
||||
ap = (*mp->am_mnt->mf_ops->lookuppn) (mp, argp->da_name, &error, VLOOK_CREATE);
|
||||
if (ap == 0) {
|
||||
if (error < 0) {
|
||||
#ifdef DEBUG
|
||||
dlog("Not sending RPC reply");
|
||||
#endif /* DEBUG */
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
@ -289,8 +295,10 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
||||
mp = fh_to_mp2(argp, &retry);
|
||||
if (mp == 0) {
|
||||
readlink_retry:
|
||||
if (retry < 0)
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
res.rlr_status = nfs_error(retry);
|
||||
} else {
|
||||
char *ln = do_readlink(mp, &retry, (nfsattrstat **) 0);
|
||||
@ -367,8 +375,10 @@ unlink_or_rmdir(nfsdiropargs *argp, struct svc_req *rqstp, int unlinkp)
|
||||
|
||||
am_node *mp = fh_to_mp3(&argp->da_fhandle, &retry, VLOOK_DELETE);
|
||||
if (mp == 0) {
|
||||
if (retry < 0)
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
res = nfs_error(retry);
|
||||
goto out;
|
||||
}
|
||||
@ -500,8 +510,10 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp)
|
||||
|
||||
mp = fh_to_mp2(&argp->rda_fhandle, &retry);
|
||||
if (mp == 0) {
|
||||
if (retry < 0)
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
res.rdr_status = nfs_error(retry);
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
@ -533,8 +545,10 @@ nfsproc_statfs_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
||||
|
||||
mp = fh_to_mp2(argp, &retry);
|
||||
if (mp == 0) {
|
||||
if (retry < 0)
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
return 0;
|
||||
}
|
||||
res.sfr_status = nfs_error(retry);
|
||||
} else {
|
||||
nfsstatfsokres *fp;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_TEMPLATE.c,v 1.2 1999/01/10 21:53:48 ezk Exp $
|
||||
* $Id: ops_TEMPLATE.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -60,18 +60,18 @@
|
||||
#include <amd.h>
|
||||
|
||||
/* forward declarations */
|
||||
static char * foofs_match(am_opts *fo);
|
||||
static char *foofs_match(am_opts *fo);
|
||||
static int foofs_init(mntfs *mf);
|
||||
static int foofs_mount(am_node *mp);
|
||||
static int foofs_fmount(mntfs *mf);
|
||||
static int foofs_umount(am_node *mp);
|
||||
static int foofs_fumount(mntfs *mf);
|
||||
static am_node * foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
|
||||
static am_node *foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
|
||||
static int foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count);
|
||||
static am_node * foofs_readlink(am_node *mp, int *error_return);
|
||||
static am_node *foofs_readlink(am_node *mp, int *error_return);
|
||||
static void foofs_mounted(mntfs *mf);
|
||||
static void foofs_umounted(am_node *mp);
|
||||
fserver * foofs_ffserver(mntfs *mf);
|
||||
fserver *foofs_ffserver(mntfs *mf);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_autofs.c,v 1.4 1999/01/13 23:31:00 ezk Exp $
|
||||
* $Id: ops_autofs.c,v 1.7.2.4 2001/04/24 06:17:40 ib42 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -138,10 +138,10 @@ autofs_mount(am_node *mp)
|
||||
mnttype = "indirect";
|
||||
else if (mf->mf_ops == &amfs_direct_ops)
|
||||
mnttype = "direct";
|
||||
#ifdef HAVE_AM_FS_UNION
|
||||
#ifdef HAVE_AMU_FS_UNION
|
||||
else if (mf->mf_ops == &amfs_union_ops)
|
||||
mnttype = "union";
|
||||
#endif /* HAVE_AM_FS_UNION */
|
||||
#endif /* HAVE_AMU_FS_UNION */
|
||||
else
|
||||
mnttype = "auto";
|
||||
|
||||
@ -510,7 +510,7 @@ out:
|
||||
endfor
|
||||
*/
|
||||
static int
|
||||
autofs_bgmount(struct continuation * cp, int mpe)
|
||||
autofs_bgmount(struct continuation *cp, int mpe)
|
||||
{
|
||||
mntfs *mf = cp->mp->am_mnt; /* Current mntfs */
|
||||
mntfs *mf_retry = 0; /* First mntfs which needed retrying */
|
||||
@ -586,7 +586,7 @@ autofs_bgmount(struct continuation * cp, int mpe)
|
||||
* Note whether this is a real mount attempt
|
||||
*/
|
||||
if (p == &amfs_error_ops) {
|
||||
plog(XLOG_MAP, "Map entry %s for %s failed to match", *cp->ivec, mp->am_path);
|
||||
plog(XLOG_MAP, "Map entry %s for %s did not match", *cp->ivec, mp->am_path);
|
||||
if (this_error <= 0)
|
||||
this_error = ENOENT;
|
||||
continue;
|
||||
@ -677,8 +677,6 @@ autofs_bgmount(struct continuation * cp, int mpe)
|
||||
else
|
||||
mk_fattr(mp, NFLNK);
|
||||
|
||||
mp->am_fattr.na_fileid = mp->am_gen;
|
||||
|
||||
if (p->fs_init)
|
||||
this_error = (*p->fs_init) (mf);
|
||||
}
|
||||
@ -1122,7 +1120,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
*/
|
||||
rvec = strsplit(dfl, ' ', '\"');
|
||||
|
||||
if (gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) {
|
||||
if (gopt.flags & CFM_SELECTORS_IN_DEFAULTS) {
|
||||
/*
|
||||
* Pick whichever first entry matched the list of selectors.
|
||||
* Strip the selectors from the string, and assign to dfl the
|
||||
@ -1138,7 +1136,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
mp->am_parent->am_mnt->mf_info);
|
||||
free_opts(&ap); /* don't leak */
|
||||
if (pt == &amfs_error_ops) {
|
||||
plog(XLOG_MAP, "failed to match defaults for \"%s\"", *sp);
|
||||
plog(XLOG_MAP, "did not match defaults for \"%s\"", *sp);
|
||||
} else {
|
||||
dfl = strip_selectors(*sp, "/defaults");
|
||||
plog(XLOG_MAP, "matched default selectors \"%s\"", dfl);
|
||||
@ -1147,7 +1145,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
++sp;
|
||||
}
|
||||
}
|
||||
} else { /* not enable_default_selectors */
|
||||
} else { /* not selectors_in_defaults */
|
||||
/*
|
||||
* Extract first value
|
||||
*/
|
||||
@ -1161,7 +1159,7 @@ autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
/*
|
||||
* Log error if there were other values
|
||||
*/
|
||||
if (!(gopt.flags & CFM_ENABLE_DEFAULT_SELECTORS) && rvec[1]) {
|
||||
if (!(gopt.flags & CFM_SELECTORS_IN_DEFAULTS) && rvec[1]) {
|
||||
# ifdef DEBUG
|
||||
dlog("/defaults chopped into %s", dfl);
|
||||
# endif /* DEBUG */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_cdfs.c,v 1.3 1999/03/30 17:22:46 ezk Exp $
|
||||
* $Id: ops_cdfs.c,v 1.4.2.1 2001/01/10 03:23:09 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_efs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $
|
||||
* $Id: ops_efs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_lofs.c,v 1.2 1999/01/10 21:53:49 ezk Exp $
|
||||
* $Id: ops_lofs.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
#include <amd.h>
|
||||
|
||||
/* forward definitions */
|
||||
static char * lofs_match(am_opts *fo);
|
||||
static char *lofs_match(am_opts *fo);
|
||||
static int lofs_fmount(mntfs *mf);
|
||||
static int lofs_fumount(mntfs *mf);
|
||||
static int mount_lofs(char *dir, char *fs_name, char *opts);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_mfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
|
||||
* $Id: ops_mfs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_nfs.c,v 1.5 1999/03/13 17:03:28 ezk Exp $
|
||||
* $Id: ops_nfs.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -167,7 +167,7 @@ find_nfs_fhandle_cache(voidp idv, int done)
|
||||
* Called when a filehandle appears
|
||||
*/
|
||||
static void
|
||||
got_nfs_fh(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia, voidp idv, int done)
|
||||
got_nfs_fh(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, voidp idv, int done)
|
||||
{
|
||||
fh_cache *fp;
|
||||
|
||||
@ -397,14 +397,14 @@ make_nfs_auth(void)
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
if (gopt.flags & CFM_FULLY_QUALIFIED_HOSTS) {
|
||||
plog(XLOG_INFO, "Using NFS auth for fqhn \"%s\"", hostd);
|
||||
plog(XLOG_INFO, "Using NFS auth for FQHN \"%s\"", hostd);
|
||||
nfs_auth = authsys_create(hostd, 0, 0, 1, &group_wheel);
|
||||
} else {
|
||||
nfs_auth = authsys_create_default();
|
||||
}
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
if (gopt.flags & CFM_FULLY_QUALIFIED_HOSTS) {
|
||||
plog(XLOG_INFO, "Using NFS auth for fqhn \"%s\"", hostd);
|
||||
plog(XLOG_INFO, "Using NFS auth for FQHN \"%s\"", hostd);
|
||||
nfs_auth = authunix_create(hostd, 0, 0, 1, &group_wheel);
|
||||
} else {
|
||||
nfs_auth = authunix_create_default();
|
||||
@ -664,7 +664,7 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE) {
|
||||
print_nfs_args(&nfs_args, nfs_version);
|
||||
plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags);
|
||||
plog(XLOG_DEBUG, "Generic mount flags 0x%x used for NFS mount", genflags);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_nfs3.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
|
||||
* $Id: ops_nfs3.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_nullfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
|
||||
* $Id: ops_nullfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_pcfs.c,v 1.2 1999/01/10 21:53:50 ezk Exp $
|
||||
* $Id: ops_pcfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_tfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
|
||||
* $Id: ops_tfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_tmpfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
|
||||
* $Id: ops_tmpfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_ufs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
|
||||
* $Id: ops_ufs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_umapfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
|
||||
* $Id: ops_umapfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_unionfs.c,v 1.2 1999/01/10 21:53:51 ezk Exp $
|
||||
* $Id: ops_unionfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: ops_xfs.c,v 1.2 1999/01/10 21:53:52 ezk Exp $
|
||||
* $Id: ops_xfs.c,v 1.3.2.2 2001/01/12 23:28:58 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
#include <amd.h>
|
||||
|
||||
/* forward declarations */
|
||||
static char * xfs_match(am_opts *fo);
|
||||
static char *xfs_match(am_opts *fo);
|
||||
static int xfs_fmount(mntfs *mf);
|
||||
static int xfs_fumount(mntfs *mf);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: opts.c,v 1.6 1999/09/30 21:01:32 ezk Exp $
|
||||
* $Id: opts.c,v 1.8.2.4 2001/01/10 03:23:11 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -103,7 +103,6 @@ static int f_true(char *);
|
||||
/*
|
||||
* STATICS:
|
||||
*/
|
||||
static struct am_opts fs_static; /* copy of the options to play with */
|
||||
static char NullStr[] = "<NULL>";
|
||||
static char nullstr[] = "";
|
||||
static char *opt_dkey = NullStr;
|
||||
@ -113,7 +112,16 @@ static char *opt_key = nullstr;
|
||||
static char *opt_keyd = nullstr;
|
||||
static char *opt_map = nullstr;
|
||||
static char *opt_path = nullstr;
|
||||
static char uid_str[12], gid_str[12];
|
||||
char *opt_uid = uid_str;
|
||||
char *opt_gid = gid_str;
|
||||
static char *vars[8];
|
||||
static char *literal_dollar = "$"; /* ${dollar}: a literal '$' in maps */
|
||||
|
||||
/*
|
||||
* GLOBALS
|
||||
*/
|
||||
struct am_opts fs_static; /* copy of the options to play with */
|
||||
|
||||
|
||||
/*
|
||||
@ -122,7 +130,7 @@ static char *vars[8];
|
||||
*/
|
||||
static struct opt opt_fields[] = {
|
||||
/* Name and length.
|
||||
Option str. Selector str. boolean fxn. flags */
|
||||
Option str. Selector str. boolean fxn. case sensitive */
|
||||
{ S("opts"),
|
||||
&fs_static.opt_opts, 0, 0, FALSE },
|
||||
{ S("host"),
|
||||
@ -149,8 +157,6 @@ static struct opt opt_fields[] = {
|
||||
&fs_static.opt_dev, 0, 0, FALSE },
|
||||
{ S("pref"),
|
||||
&fs_static.opt_pref, 0, 0, FALSE },
|
||||
{ S("autopref"),
|
||||
&fs_static.opt_autopref,0, 0, FALSE },
|
||||
{ S("path"),
|
||||
0, &opt_path, 0, FALSE },
|
||||
{ S("autodir"),
|
||||
@ -195,12 +201,19 @@ static struct opt opt_fields[] = {
|
||||
0, &opt_dkey, 0, FALSE },
|
||||
{ S("key."),
|
||||
0, &opt_keyd, 0, FALSE },
|
||||
/* XXX: should maptype really be a variable? I think selector. -Erez */
|
||||
{ S("maptype"),
|
||||
&fs_static.opt_maptype, 0, 0, FALSE },
|
||||
{ S("cachedir"),
|
||||
&fs_static.opt_cachedir, 0, 0, FALSE },
|
||||
{ S("addopts"),
|
||||
&fs_static.opt_addopts, 0, 0, FALSE },
|
||||
&fs_static.opt_addopts, 0, 0, FALSE },
|
||||
{ S("uid"),
|
||||
0, &opt_uid, 0, FALSE },
|
||||
{ S("gid"),
|
||||
0, &opt_gid, 0, FALSE },
|
||||
{ S("dollar"),
|
||||
&literal_dollar, 0, 0, FALSE },
|
||||
{ S("var0"),
|
||||
&vars[0], 0, 0, FALSE },
|
||||
{ S("var1"),
|
||||
@ -303,7 +316,7 @@ backslash(char **p)
|
||||
if (**p == '\\') {
|
||||
(*p)++;
|
||||
switch (**p) {
|
||||
case 'a':
|
||||
case 'g':
|
||||
c = '\007'; /* Bell */
|
||||
break;
|
||||
case 'b':
|
||||
@ -856,7 +869,7 @@ normalize_slash(char *p)
|
||||
static void
|
||||
expand_op(opt_apply *p, int sel_p)
|
||||
{
|
||||
static char expand_error[] = "No space to expand \"%s\"";
|
||||
static const char expand_error[] = "No space to expand \"%s\"";
|
||||
char expbuf[MAXPATHLEN + 1];
|
||||
char nbuf[NLEN + 1];
|
||||
char *ep = expbuf;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: restart.c,v 1.2 1999/01/10 21:53:52 ezk Exp $
|
||||
* $Id: restart.c,v 1.3.2.1 2001/01/10 03:23:12 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: rpc_fwd.c,v 1.2 1999/01/10 21:53:52 ezk Exp $
|
||||
* $Id: rpc_fwd.c,v 1.3.2.2 2001/04/14 21:08:23 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -187,7 +187,7 @@ fwd_init(void)
|
||||
* Some things we talk to require a priv port - so make one here
|
||||
*/
|
||||
if (bind_resv_port(fwd_sock, (u_short *) 0) < 0)
|
||||
plog(XLOG_ERROR, "can't bind privileged port");
|
||||
plog(XLOG_ERROR, "can't bind privileged port (rpc_fwd)");
|
||||
|
||||
if (fcntl(fwd_sock, F_SETFL, FNDELAY) < 0
|
||||
#ifdef FIONBIO
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: sched.c,v 1.3 1999/01/13 23:31:01 ezk Exp $
|
||||
* $Id: sched.c,v 1.4.2.2 2001/01/10 03:23:12 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -219,7 +219,7 @@ do_task_notify(void)
|
||||
/*
|
||||
* Keep taking the first item off the list and processing it.
|
||||
*
|
||||
* Done this way because the the callback can, quite reasonably,
|
||||
* Done this way because the callback can, quite reasonably,
|
||||
* queue a new task, so no local reference into the list can be
|
||||
* held here.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: srvr_amfs_auto.c,v 1.2 1999/01/10 21:53:53 ezk Exp $
|
||||
* $Id: srvr_amfs_auto.c,v 1.3.2.3 2001/04/14 21:08:23 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -208,7 +208,8 @@ dup_srvr(fserver *fs)
|
||||
/*
|
||||
* Log state change
|
||||
*/
|
||||
void srvrlog(fserver *fs, char *state)
|
||||
void
|
||||
srvrlog(fserver *fs, char *state)
|
||||
{
|
||||
plog(XLOG_INFO, "file server %s type %s %s", fs->fs_host, fs->fs_type, state);
|
||||
plog(XLOG_INFO, "file server %s, type %s, state %s", fs->fs_host, fs->fs_type, state);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: srvr_nfs.c,v 1.5 1999/09/08 23:36:39 ezk Exp $
|
||||
* $Id: srvr_nfs.c,v 1.7.2.5 2001/04/14 21:08:23 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -93,7 +93,13 @@ static int ping_len;
|
||||
static char ping_buf[sizeof(struct rpc_msg) + 32];
|
||||
|
||||
#if defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3)
|
||||
/* protocols we know about, in order of preference */
|
||||
/*
|
||||
* Protocols we know about, in order of preference.
|
||||
*
|
||||
* Note that Solaris 8 and newer NetBSD systems are switching to UDP first,
|
||||
* so this order may have to be adjusted for Amd in the future once more
|
||||
* vendors make that change. -Erez 11/24/2000
|
||||
*/
|
||||
static char *protocols[] = { "tcp", "udp", NULL };
|
||||
#endif /* defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) */
|
||||
|
||||
@ -168,7 +174,7 @@ start_ping(u_long nfs_version)
|
||||
* Called when a portmap reply arrives
|
||||
*/
|
||||
static void
|
||||
got_portmap(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia, voidp idv, int done)
|
||||
got_portmap(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, voidp idv, int done)
|
||||
{
|
||||
fserver *fs2 = (fserver *) idv;
|
||||
fserver *fs = 0;
|
||||
@ -227,7 +233,7 @@ got_portmap(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia
|
||||
* Obtain portmap information
|
||||
*/
|
||||
static int
|
||||
call_portmap(fserver *fs, AUTH * auth, u_long prog, u_long vers, u_long prot)
|
||||
call_portmap(fserver *fs, AUTH *auth, u_long prog, u_long vers, u_long prot)
|
||||
{
|
||||
struct rpc_msg pmap_msg;
|
||||
int len;
|
||||
@ -301,7 +307,7 @@ recompute_portmap(fserver *fs)
|
||||
* structure when the ping was transmitted.
|
||||
*/
|
||||
static void
|
||||
nfs_pinged(voidp pkt, int len, struct sockaddr_in * sp, struct sockaddr_in * tsp, voidp idv, int done)
|
||||
nfs_pinged(voidp pkt, int len, struct sockaddr_in *sp, struct sockaddr_in *tsp, voidp idv, int done)
|
||||
{
|
||||
int xid = (long) idv; /* for 64-bit archs */
|
||||
fserver *fs;
|
||||
@ -541,7 +547,7 @@ nfs_keepalive(voidp v)
|
||||
|
||||
|
||||
int
|
||||
nfs_srvr_port(fserver *fs, u_short * port, voidp wchan)
|
||||
nfs_srvr_port(fserver *fs, u_short *port, voidp wchan)
|
||||
{
|
||||
int error = -1;
|
||||
if ((fs->fs_flags & FSF_VALID) == FSF_VALID) {
|
||||
@ -644,15 +650,11 @@ find_nfs_srvr(mntfs *mf)
|
||||
|
||||
#ifdef MNTTAB_OPT_PROTO
|
||||
{
|
||||
char *proto_opt = hasmntopt(&mnt, MNTTAB_OPT_PROTO);
|
||||
char *proto_opt = hasmnteq(&mnt, MNTTAB_OPT_PROTO);
|
||||
if (proto_opt) {
|
||||
char **p;
|
||||
|
||||
proto_opt += sizeof(MNTTAB_OPT_PROTO) - 1; /* skip the "proto" */
|
||||
|
||||
for (p = protocols; *p; p ++)
|
||||
if (proto_opt[0] == '=' &&
|
||||
NSTREQ(&proto_opt[1], *p, strlen(*p))) {
|
||||
if (NSTREQ(proto_opt, *p, strlen(*p))) {
|
||||
nfs_proto = *p;
|
||||
break;
|
||||
}
|
||||
@ -668,10 +670,21 @@ find_nfs_srvr(mntfs *mf)
|
||||
if (hasmntopt(&mnt, "nfsv2")) {
|
||||
nfs_version = (u_long) 2; /* nullify any ``vers=X'' statements */
|
||||
nfs_proto = "udp"; /* nullify any ``proto=tcp'' statements */
|
||||
plog(XLOG_WARNING, "found compatiblity option \"nfsv2\": set options vers=2, proto=udp for host %s", host);
|
||||
plog(XLOG_WARNING, "found compatiblity option \"nfsv2\": set options vers=2,proto=udp for host %s", host);
|
||||
}
|
||||
#endif /* HAVE_NFS_NFSV2_H */
|
||||
|
||||
/* check if we globally overridden the NFS version/protocol */
|
||||
if (gopt.nfs_vers) {
|
||||
nfs_version = gopt.nfs_vers;
|
||||
plog(XLOG_INFO, "find_nfs_srvr: force NFS version to %d",
|
||||
(int) nfs_version);
|
||||
}
|
||||
if (gopt.nfs_proto) {
|
||||
nfs_proto = gopt.nfs_proto;
|
||||
plog(XLOG_INFO, "find_nfs_srvr: force NFS protocol transport to %s", nfs_proto);
|
||||
}
|
||||
|
||||
/*
|
||||
* lookup host address and canonical name
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" Copyright (c) 1997-1999 Erez Zadok
|
||||
.\" Copyright (c) 1997-2001 Erez Zadok
|
||||
.\" Copyright (c) 1990 Jan-Simon Pendry
|
||||
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
.\" Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
.\"
|
||||
.\" %W% (Berkeley) %G%
|
||||
.\"
|
||||
.\" $Id: amq.8,v 1.2 1999/01/10 21:53:58 ezk Exp $
|
||||
.\" $Id: amq.8,v 1.3.2.4 2001/01/12 22:43:43 ro Exp $
|
||||
.\"
|
||||
.TH AMQ 8 "25 April 1989"
|
||||
.SH NAME
|
||||
@ -46,7 +46,7 @@ amq \- automounter query tool
|
||||
.SH SYNOPSIS
|
||||
.B amq
|
||||
[
|
||||
.BI \-fmpsuvTU
|
||||
.BI \-fmpsvwHTU
|
||||
] [
|
||||
.BI \-h " hostname"
|
||||
] [
|
||||
@ -56,12 +56,12 @@ amq \- automounter query tool
|
||||
] [
|
||||
.BI \-D " debug_options"
|
||||
] [
|
||||
.BI \-M " mountmap entry"
|
||||
] [
|
||||
.BI \-P " program_number"
|
||||
] [
|
||||
.I directory
|
||||
] .\|.\|.
|
||||
] [[
|
||||
.B \-u
|
||||
]
|
||||
.I directory .\|.\|.
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.B Amq
|
||||
provides a simple way of determining the current state of
|
||||
@ -138,6 +138,16 @@ information output by
|
||||
.I -v
|
||||
option.
|
||||
|
||||
.TP
|
||||
.B \-w
|
||||
Translate a full pathname as returned by
|
||||
.IR getpwd (3)
|
||||
into a short
|
||||
.B Amd
|
||||
pathname that goes through its mount points. This option requires that
|
||||
.B Amd
|
||||
is running.
|
||||
|
||||
.TP
|
||||
.BI \-x " log_options"
|
||||
Ask the automounter to use the logging options specified in
|
||||
@ -151,14 +161,8 @@ Ask the automounter to use the debugging options specified in
|
||||
from now on.
|
||||
|
||||
.TP
|
||||
.BI \-M " map_ent"
|
||||
Pass a mount map entry to
|
||||
.B amd
|
||||
and wait for it to be evaluated, possible causing a mount. This option is
|
||||
highly insecure. By default, amd and amq do not support it. You have to
|
||||
configure am-utils with
|
||||
.I \-\-enable\-amq\-mount
|
||||
to enable this option.
|
||||
.B \-H
|
||||
Display short usage message.
|
||||
|
||||
.TP
|
||||
.BI \-P " program_number"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $
|
||||
* $Id: amq.c,v 1.7.2.5 2001/01/12 22:43:43 ro Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -48,13 +48,13 @@
|
||||
|
||||
#ifndef lint
|
||||
char copyright[] = "\
|
||||
@(#)Copyright (c) 1997-1999 Erez Zadok\n\
|
||||
@(#)Copyright (c) 1997-2001 Erez Zadok\n\
|
||||
@(#)Copyright (c) 1990 Jan-Simon Pendry\n\
|
||||
@(#)Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n\
|
||||
@(#)Copyright (c) 1990 The Regents of the University of California.\n\
|
||||
@(#)All rights reserved.\n";
|
||||
#if __GNUC__ < 2
|
||||
static char rcsid[] = "$Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $";
|
||||
static char rcsid[] = "$Id: amq.c,v 1.7.2.5 2001/01/12 22:43:43 ro Exp $";
|
||||
static char sccsid[] = "%W% (Berkeley) %G%";
|
||||
#endif /* __GNUC__ < 2 */
|
||||
#endif /* not lint */
|
||||
@ -74,9 +74,9 @@ static int stats_flag;
|
||||
static int getvers_flag;
|
||||
static int amd_program_number = AMQ_PROGRAM;
|
||||
static int use_tcp_flag, use_udp_flag;
|
||||
static int getpwd_flag;
|
||||
static char *debug_opts;
|
||||
static char *amq_logfile;
|
||||
static char *mount_map;
|
||||
static char *xlog_optstr;
|
||||
static char localhost[] = "localhost";
|
||||
static char *def_server = localhost;
|
||||
@ -85,14 +85,6 @@ static char *def_server = localhost;
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
/* forward declarations */
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
static CLIENT *get_secure_amd_client(char *host, struct timeval *tv, int *sock);
|
||||
static int amq_bind_resv_port(int td, u_short *pp);
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
static int privsock(int ty);
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/* structures */
|
||||
enum show_opt {
|
||||
Full, Stats, Calc, Short, ShowDone
|
||||
@ -184,6 +176,31 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Display a pwd data
|
||||
*/
|
||||
static void
|
||||
show_pwd(amq_mount_tree *mt, char *path, int *flag)
|
||||
{
|
||||
int len;
|
||||
|
||||
while (mt) {
|
||||
len = strlen(mt->mt_mountpoint);
|
||||
if (NSTREQ(path, mt->mt_mountpoint, len) &&
|
||||
!STREQ(mt->mt_directory, mt->mt_mountpoint)) {
|
||||
char buf[MAXPATHLEN+1];
|
||||
strcpy(buf, mt->mt_directory);
|
||||
strcat(buf, &path[len]);
|
||||
strcpy(path, buf);
|
||||
*flag = 1;
|
||||
}
|
||||
show_pwd(mt->mt_next, path, flag);
|
||||
mt = mt->mt_child;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Display a mount tree.
|
||||
*/
|
||||
@ -197,6 +214,7 @@ show_mt(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *pwid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twid)
|
||||
{
|
||||
@ -301,16 +319,11 @@ main(int argc, char *argv[])
|
||||
int errs = 0;
|
||||
char *server;
|
||||
struct sockaddr_in server_addr;
|
||||
int s; /* to pass the Amd security check, we must use a priv port */
|
||||
CLIENT *clnt = NULL;
|
||||
struct hostent *hp;
|
||||
int nodefault = 0;
|
||||
struct timeval tv;
|
||||
char *progname = NULL;
|
||||
#ifndef HAVE_TRANSPORT_TYPE_TLI
|
||||
enum clnt_stat cs;
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
|
||||
/*
|
||||
* Compute program name
|
||||
@ -329,12 +342,12 @@ main(int argc, char *argv[])
|
||||
/*
|
||||
* Parse arguments
|
||||
*/
|
||||
#ifdef ENABLE_AMQ_MOUNT
|
||||
while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != -1)
|
||||
#else /* not ENABLE_AMQ_MOUNT */
|
||||
while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:pP:TU")) != -1)
|
||||
#endif /* not ENABLE_AMQ_MOUNT */
|
||||
while ((opt_ch = getopt(argc, argv, "Hfh:l:msuvx:D:pP:TUw")) != -1)
|
||||
switch (opt_ch) {
|
||||
case 'H':
|
||||
goto show_usage;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
flush_flag = 1;
|
||||
nodefault = 1;
|
||||
@ -384,13 +397,6 @@ main(int argc, char *argv[])
|
||||
nodefault = 1;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_AMQ_MOUNT
|
||||
case 'M':
|
||||
mount_map = optarg;
|
||||
nodefault = 1;
|
||||
break;
|
||||
#endif /* ENABLE_AMQ_MOUNT */
|
||||
|
||||
case 'P':
|
||||
amd_program_number = atoi(optarg);
|
||||
break;
|
||||
@ -403,6 +409,10 @@ main(int argc, char *argv[])
|
||||
use_udp_flag = 1;
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
getpwd_flag = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
errs = 1;
|
||||
break;
|
||||
@ -415,21 +425,15 @@ main(int argc, char *argv[])
|
||||
if (errs) {
|
||||
show_usage:
|
||||
fprintf(stderr, "\
|
||||
Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
|
||||
\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts]%s\n\
|
||||
\t[-P prognum] [-T] [-U]\n",
|
||||
am_get_progname(),
|
||||
#ifdef ENABLE_AMQ_MOUNT
|
||||
" [-M mapent]"
|
||||
#else /* not ENABLE_AMQ_MOUNT */
|
||||
""
|
||||
#endif /* not ENABLE_AMQ_MOUNT */
|
||||
Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\
|
||||
\t[-x log_options] [-D debug_options]\n\
|
||||
\t[-P program_number] [[-u] directory ...]\n",
|
||||
am_get_progname()
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* set use_udp and use_tcp flags both to on if none are defined */
|
||||
if (!use_tcp_flag && !use_udp_flag)
|
||||
use_tcp_flag = use_udp_flag = 1;
|
||||
@ -468,9 +472,7 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
|
||||
tv.tv_sec = 5; /* 5 seconds for timeout or per retry */
|
||||
tv.tv_usec = 0;
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
clnt = get_secure_amd_client(server, &tv, &s);
|
||||
if (!clnt && use_tcp_flag) /* try tcp first */
|
||||
if (use_tcp_flag) /* try tcp first */
|
||||
clnt = clnt_create(server, amd_program_number, AMQ_VERSION, "tcp");
|
||||
if (!clnt && use_udp_flag) { /* try udp next */
|
||||
clnt = clnt_create(server, amd_program_number, AMQ_VERSION, "udp");
|
||||
@ -478,29 +480,6 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
|
||||
if (clnt)
|
||||
clnt_control(clnt, CLSET_RETRY_TIMEOUT, (char *) &tv);
|
||||
}
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/* first check if remote portmapper is up */
|
||||
cs = pmap_ping(&server_addr);
|
||||
if (cs == RPC_TIMEDOUT) {
|
||||
fprintf(stderr, "%s: failed to contact portmapper on host \"%s\". %s\n",
|
||||
am_get_progname(), server, clnt_sperrno(cs));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* portmapper exists: get remote amd info from it */
|
||||
if (!clnt && use_tcp_flag) { /* try tcp first */
|
||||
s = RPC_ANYSOCK;
|
||||
clnt = clnttcp_create(&server_addr, amd_program_number,
|
||||
AMQ_VERSION, &s, 0, 0);
|
||||
}
|
||||
if (!clnt && use_udp_flag) { /* try udp next */
|
||||
/* XXX: do we need to close(s) ? */
|
||||
s = privsock(SOCK_DGRAM);
|
||||
clnt = clntudp_create(&server_addr, amd_program_number,
|
||||
AMQ_VERSION, tv, &s);
|
||||
}
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
if (!clnt) {
|
||||
fprintf(stderr, "%s: ", am_get_progname());
|
||||
clnt_pcreateerror(server);
|
||||
@ -575,6 +554,34 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* getpwd info
|
||||
*/
|
||||
if (getpwd_flag) {
|
||||
char path[MAXPATHLEN+1];
|
||||
char *wd = getcwd(path, MAXPATHLEN+1);
|
||||
amq_mount_tree_list *mlp = amqproc_export_1((voidp) 0, clnt);
|
||||
amq_mount_tree_p mt;
|
||||
int i, flag;
|
||||
|
||||
if (!wd) {
|
||||
perror("getcwd");
|
||||
exit(1);
|
||||
}
|
||||
for (i = 0; mlp && i < mlp->amq_mount_tree_list_len; i++) {
|
||||
mt = mlp->amq_mount_tree_list_val[i];
|
||||
while (1) {
|
||||
flag = 0;
|
||||
show_pwd(mt, path, &flag);
|
||||
if (!flag) {
|
||||
printf("%s\n", path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mount info
|
||||
*/
|
||||
@ -595,24 +602,6 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Mount map
|
||||
*/
|
||||
if (mount_map) {
|
||||
int *rc;
|
||||
do {
|
||||
rc = amqproc_mount_1(&mount_map, clnt);
|
||||
} while (rc && *rc < 0);
|
||||
if (!rc || *rc > 0) {
|
||||
if (rc)
|
||||
errno = *rc;
|
||||
else
|
||||
errno = ETIMEDOUT;
|
||||
fprintf(stderr, "%s: could not start new ", am_get_progname());
|
||||
perror("automount point");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get Version
|
||||
*/
|
||||
@ -720,241 +709,3 @@ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
|
||||
exit(errs);
|
||||
return errs; /* should never reach here */
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
|
||||
/*
|
||||
* How to bind to reserved ports.
|
||||
* TLI handle (socket) and port version.
|
||||
*/
|
||||
/* defined here so that it does not have to resolve it with libamu.a */
|
||||
static int
|
||||
amq_bind_resv_port(int td, u_short *pp)
|
||||
{
|
||||
int rc = -1, port;
|
||||
struct t_bind *treq, *tret;
|
||||
struct sockaddr_in *sin;
|
||||
|
||||
treq = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR);
|
||||
if (!treq) {
|
||||
plog(XLOG_ERROR, "t_alloc 1");
|
||||
return -1;
|
||||
}
|
||||
tret = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR);
|
||||
if (!tret) {
|
||||
t_free((char *) treq, T_BIND);
|
||||
plog(XLOG_ERROR, "t_alloc 2");
|
||||
return -1;
|
||||
}
|
||||
memset((char *) treq->addr.buf, 0, treq->addr.len);
|
||||
sin = (struct sockaddr_in *) treq->addr.buf;
|
||||
sin->sin_family = AF_INET;
|
||||
treq->qlen = 0;
|
||||
treq->addr.len = treq->addr.maxlen;
|
||||
errno = EADDRINUSE;
|
||||
port = IPPORT_RESERVED;
|
||||
|
||||
do {
|
||||
--port;
|
||||
sin->sin_port = htons(port);
|
||||
rc = t_bind(td, treq, tret);
|
||||
if (rc < 0) {
|
||||
} else {
|
||||
if (memcmp(treq->addr.buf, tret->addr.buf, tret->addr.len) == 0)
|
||||
break;
|
||||
else
|
||||
t_unbind(td);
|
||||
}
|
||||
} while ((rc < 0 || errno == EADDRINUSE) && (int) port > IPPORT_RESERVED / 2);
|
||||
|
||||
if (pp) {
|
||||
if (rc == 0)
|
||||
*pp = port;
|
||||
else
|
||||
plog(XLOG_ERROR, "could not t_bind to any reserved port");
|
||||
}
|
||||
t_free((char *) tret, T_BIND);
|
||||
t_free((char *) treq, T_BIND);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Create a secure rpc client attached to the amd daemon.
|
||||
*/
|
||||
static CLIENT *
|
||||
get_secure_amd_client(char *host, struct timeval *tv, int *sock)
|
||||
{
|
||||
CLIENT *client;
|
||||
struct netbuf nb;
|
||||
struct netconfig *nc, *pm_nc;
|
||||
struct sockaddr_in sin;
|
||||
|
||||
|
||||
nb.maxlen = sizeof(sin);
|
||||
nb.buf = (char *) &sin;
|
||||
|
||||
/*
|
||||
* Ensure that remote portmapper is alive
|
||||
* (must use connectionless netconfig).
|
||||
*/
|
||||
if ((pm_nc = getnetconfigent(NC_UDP)) != NULL) {
|
||||
enum clnt_stat cs;
|
||||
|
||||
cs = rpcb_rmtcall(pm_nc,
|
||||
host,
|
||||
amd_program_number,
|
||||
AMQ_VERSION,
|
||||
AMQPROC_NULL,
|
||||
(XDRPROC_T_TYPE) xdr_void,
|
||||
NULL,
|
||||
(XDRPROC_T_TYPE) xdr_void,
|
||||
NULL,
|
||||
*tv,
|
||||
NULL);
|
||||
if (cs == RPC_TIMEDOUT) {
|
||||
fprintf(stderr, "%s: failed to contact portmapper on host \"%s\". %s\n",
|
||||
am_get_progname(), host, clnt_sperrno(cs));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* First transport type to try: TCP
|
||||
*/
|
||||
if (use_tcp_flag) {
|
||||
/* Find amd address on TCP */
|
||||
nc = getnetconfigent(NC_TCP);
|
||||
if (!nc) {
|
||||
fprintf(stderr, "getnetconfig for tcp failed: %s\n", nc_sperror());
|
||||
goto tryudp;
|
||||
}
|
||||
|
||||
if (!rpcb_getaddr(amd_program_number, AMQ_VERSION, nc, &nb, host)) {
|
||||
/*
|
||||
* don't print error messages here, since amd might legitimately
|
||||
* serve udp only
|
||||
*/
|
||||
goto tryudp;
|
||||
}
|
||||
/* Create privileged TCP socket */
|
||||
*sock = t_open(nc->nc_device, O_RDWR, 0);
|
||||
|
||||
if (*sock < 0) {
|
||||
fprintf(stderr, "t_open %s: %m\n", nc->nc_device);
|
||||
goto tryudp;
|
||||
}
|
||||
if (amq_bind_resv_port(*sock, (u_short *) 0) < 0)
|
||||
goto tryudp;
|
||||
|
||||
client = clnt_vc_create(*sock, &nb, amd_program_number, AMQ_VERSION, 0, 0);
|
||||
if (!client) {
|
||||
fprintf(stderr, "clnt_vc_create failed");
|
||||
t_close(*sock);
|
||||
goto tryudp;
|
||||
}
|
||||
/* tcp succeeded */
|
||||
return client;
|
||||
}
|
||||
|
||||
tryudp:
|
||||
/*
|
||||
* TCP failed so try UDP
|
||||
*/
|
||||
if (use_udp_flag) {
|
||||
/* find amd address on UDP */
|
||||
nc = getnetconfigent(NC_UDP);
|
||||
if (!nc) {
|
||||
fprintf(stderr, "getnetconfig for udp failed: %s\n", nc_sperror());
|
||||
return NULL;
|
||||
}
|
||||
if (!rpcb_getaddr(amd_program_number, AMQ_VERSION, nc, &nb, host)) {
|
||||
fprintf(stderr, "%s\n",
|
||||
clnt_spcreateerror("couldn't get amd address on udp"));
|
||||
return NULL;
|
||||
}
|
||||
/* create privileged UDP socket */
|
||||
*sock = t_open(nc->nc_device, O_RDWR, 0);
|
||||
|
||||
if (*sock < 0) {
|
||||
fprintf(stderr, "t_open %s: %m\n", nc->nc_device);
|
||||
return NULL; /* neither tcp not udp succeeded */
|
||||
}
|
||||
if (amq_bind_resv_port(*sock, (u_short *) 0) < 0)
|
||||
return NULL;
|
||||
|
||||
client = clnt_dg_create(*sock, &nb, amd_program_number, AMQ_VERSION, 0, 0);
|
||||
if (!client) {
|
||||
fprintf(stderr, "clnt_dg_create failed\n");
|
||||
t_close(*sock);
|
||||
return NULL; /* neither tcp not udp succeeded */
|
||||
}
|
||||
if (clnt_control(client, CLSET_RETRY_TIMEOUT, (char *) tv) == FALSE) {
|
||||
fprintf(stderr, "clnt_control CLSET_RETRY_TIMEOUT for udp failed\n");
|
||||
clnt_destroy(client);
|
||||
return NULL; /* neither tcp not udp succeeded */
|
||||
}
|
||||
/* udp succeeded */
|
||||
return client;
|
||||
}
|
||||
|
||||
/* should never get here */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/*
|
||||
* inetresport creates a datagram socket and attempts to bind it to a
|
||||
* secure port.
|
||||
* returns: The bound socket, or -1 to indicate an error.
|
||||
*/
|
||||
static int
|
||||
inetresport(int ty)
|
||||
{
|
||||
int alport;
|
||||
struct sockaddr_in addr;
|
||||
int fd;
|
||||
|
||||
/* Use internet address family */
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = INADDR_ANY;
|
||||
if ((fd = socket(AF_INET, ty, 0)) < 0)
|
||||
return -1;
|
||||
|
||||
for (alport = IPPORT_RESERVED - 1; alport > IPPORT_RESERVED / 2 + 1; alport--) {
|
||||
addr.sin_port = htons((u_short) alport);
|
||||
if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) >= 0)
|
||||
return fd;
|
||||
if (errno != EADDRINUSE) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
close(fd);
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Privsock() calls inetresport() to attempt to bind a socket to a secure
|
||||
* port. If inetresport() fails, privsock returns a magic socket number which
|
||||
* indicates to RPC that it should make its own socket.
|
||||
* returns: A privileged socket # or RPC_ANYSOCK.
|
||||
*/
|
||||
static int
|
||||
privsock(int ty)
|
||||
{
|
||||
int sock = inetresport(ty);
|
||||
|
||||
if (sock < 0) {
|
||||
errno = 0;
|
||||
/* Couldn't get a secure port, let RPC make an insecure one */
|
||||
sock = RPC_ANYSOCK;
|
||||
}
|
||||
return sock;
|
||||
}
|
||||
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amq.h,v 1.2 1999/01/10 21:53:59 ezk Exp $
|
||||
* $Id: amq.h,v 1.14.2.1 2001/01/10 03:23:14 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amq_clnt.c,v 1.2 1999/01/10 21:53:59 ezk Exp $
|
||||
* $Id: amq_clnt.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: amq_xdr.c,v 1.2 1999/01/10 21:53:59 ezk Exp $
|
||||
* $Id: amq_xdr.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" Copyright (c) 1997-1999 Erez Zadok
|
||||
.\" Copyright (c) 1997-2001 Erez Zadok
|
||||
.\" Copyright (c) 1990 Jan-Simon Pendry
|
||||
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
.\" Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
.\"
|
||||
.\" %W% (Berkeley) %G%
|
||||
.\"
|
||||
.\" $Id: pawd.1,v 1.2 1999/01/10 21:53:59 ezk Exp $
|
||||
.\" $Id: pawd.1,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
|
||||
.\"
|
||||
.TH PAWD 1 "6 Jan 1998"
|
||||
.SH NAME
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: pawd.c,v 1.5 1999/09/08 23:36:40 ezk Exp $
|
||||
* $Id: pawd.c,v 1.6.2.1 2001/01/10 03:23:14 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
56
contrib/amd/aux_conf.h.in
Normal file
56
contrib/amd/aux_conf.h.in
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* aux_conf.h:
|
||||
* This file gets "filled in" for each architecture.
|
||||
* @configure_input@
|
||||
*/
|
||||
|
||||
#ifndef _AUX_CONF_H
|
||||
#define _AUX_CONF_H
|
||||
|
||||
/*
|
||||
* The next line is a literal inclusion of a file which includes a
|
||||
* definition for the MOUNT_TRAP macro for a particular architecture.
|
||||
* If it defines the wrong entry, check the AC_CHECK_MOUNT_TRAP m4 macro
|
||||
* in $srcdir/aux/macros.
|
||||
*/
|
||||
@am_utils_mount_trap@
|
||||
/* End of included MOUNT_TRAP macro definition file */
|
||||
|
||||
/*
|
||||
* The next line is a literal replacement of a variable which defines the
|
||||
* the UNMOUNT_TRAP macro for a particular architecture.
|
||||
* If it defines the wrong entry, check the AC_CHECK_UNMOUNT_CALL m4 macro
|
||||
* in $srcdir/aclocal.m4. If the arguments are being defined wrong, check
|
||||
* the macro AC_CHECK_UNMOUNT_ARGS in $srcdir/aux/macros.
|
||||
*/
|
||||
#define UNMOUNT_TRAP(mnt) @am_utils_unmount_call@(@am_utils_unmount_args@)
|
||||
/* End of replaced UNMOUNT_TRAP macro definition */
|
||||
|
||||
/*
|
||||
* The next line is a literal inclusion of a file which includes a
|
||||
* definition for the NFS_FH_DREF macro for a particular architecture.
|
||||
* If it defines the wrong entry, check the AC_CHECK_NFS_FH_DREF m4 macro
|
||||
* in $srcdir/aux/macros.
|
||||
*/
|
||||
@am_utils_nfs_fh_dref@
|
||||
/* End of included NFS_FH_DREF macro definition file */
|
||||
|
||||
/*
|
||||
* The next line is a literal inclusion of a file which includes a
|
||||
* definition for the NFS_SA_DREF macro for a particular architecture.
|
||||
* If it defines the wrong entry, check the AC_CHECK_NFS_SA_DREF m4 macro
|
||||
* in $srcdir/aux/macros.
|
||||
*/
|
||||
@am_utils_nfs_sa_dref@
|
||||
/* End of included NFS_SA_DREF macro definition file */
|
||||
|
||||
/*
|
||||
* The next line is a literal inclusion of a file which includes a
|
||||
* definition for the NFS_HN_DREF macro for a particular architecture.
|
||||
* If it defines the wrong entry, check the AC_CHECK_NFS_HN_DREF m4 macro
|
||||
* in $srcdir/aux/macros.
|
||||
*/
|
||||
@am_utils_nfs_hn_dref@
|
||||
/* End of included NFS_HN_DREF macro definition file */
|
||||
|
||||
#endif /* not _AUX_CONF_H */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: checkmount_bsd44.c,v 1.2 1999/01/10 21:54:06 ezk Exp $
|
||||
* $Id: checkmount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: mtab_bsd.c,v 1.2 1999/01/10 21:54:11 ezk Exp $
|
||||
* $Id: mtab_bsd.c,v 1.3.2.1 2001/01/10 03:23:18 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
259
contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
Normal file
259
contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
Normal file
@ -0,0 +1,259 @@
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Jan-Simon Pendry at Imperial College, London.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgment:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: nfs_prot_darwin.h,v 1.1.2.1 2001/02/10 03:52:57 ib42 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AMU_NFS_PROT_H
|
||||
#define _AMU_NFS_PROT_H
|
||||
|
||||
#ifdef HAVE_RPCSVC_NFS_PROT_H
|
||||
# include <rpcsvc/nfs_prot.h>
|
||||
#endif /* HAVE_RPCSVC_NFS_PROT_H */
|
||||
#ifdef HAVE_NFS_RPCV2_H
|
||||
# include <nfs/rpcv2.h>
|
||||
#endif /* HAVE_NFS_RPCV2_H */
|
||||
#ifdef HAVE_NFS_NFS_H
|
||||
# include <nfs/nfs.h>
|
||||
#endif /* HAVE_NFS_NFS_H */
|
||||
#ifdef HAVE_UFS_UFS_UFSMOUNT_H
|
||||
# include <ufs/ufs/ufsmount.h>
|
||||
#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
|
||||
|
||||
#define MOUNTVERS3 ((unsigned long)(3))
|
||||
|
||||
typedef struct {
|
||||
u_int fhandle3_len;
|
||||
char *fhandle3_val;
|
||||
} fhandle3;
|
||||
|
||||
|
||||
enum mountstat3 {
|
||||
MNT3_OK = 0,
|
||||
MNT3ERR_PERM = 1,
|
||||
MNT3ERR_NOENT = 2,
|
||||
MNT3ERR_IO = 5,
|
||||
MNT3ERR_ACCES = 13,
|
||||
MNT3ERR_NOTDIR = 20,
|
||||
MNT3ERR_INVAL = 22,
|
||||
MNT3ERR_NAMETOOLONG = 63,
|
||||
MNT3ERR_NOTSUPP = 10004,
|
||||
MNT3ERR_SERVERFAULT = 10006
|
||||
};
|
||||
typedef enum mountstat3 mountstat3;
|
||||
|
||||
struct mountres3_ok {
|
||||
fhandle3 fhandle;
|
||||
struct {
|
||||
u_int auth_flavors_len;
|
||||
int *auth_flavors_val;
|
||||
} auth_flavors;
|
||||
};
|
||||
typedef struct mountres3_ok mountres3_ok;
|
||||
|
||||
struct mountres3 {
|
||||
mountstat3 fhs_status;
|
||||
union {
|
||||
mountres3_ok mountinfo;
|
||||
} mountres3_u;
|
||||
};
|
||||
typedef struct mountres3 mountres3;
|
||||
|
||||
|
||||
/*
|
||||
* MACROS:
|
||||
*/
|
||||
#define dr_drok_u diropres
|
||||
#define ca_attributes attributes
|
||||
#define ca_where where
|
||||
#define da_fhandle dir
|
||||
#define da_name name
|
||||
#define dl_entries entries
|
||||
#define dl_eof eof
|
||||
#define dr_status status
|
||||
#define dr_u diropres_u
|
||||
#define drok_attributes attributes
|
||||
#define drok_fhandle file
|
||||
#define fh_data data
|
||||
#define la_fhandle from
|
||||
#define la_to to
|
||||
#define na_atime atime
|
||||
#define na_ctime ctime
|
||||
#define na_fileid fileid
|
||||
#define na_fsid fsid
|
||||
#define na_gid gid
|
||||
#define na_mode mode
|
||||
#define na_mtime mtime
|
||||
#define na_nlink nlink
|
||||
#define na_size size
|
||||
#define na_type type
|
||||
#define na_uid uid
|
||||
#define na_blocks blocks
|
||||
#define na_blocksize blocksize
|
||||
#define na_rdev rdev
|
||||
#define ne_cookie cookie
|
||||
#define ne_fileid fileid
|
||||
#define ne_name name
|
||||
#define ne_nextentry nextentry
|
||||
#define ns_attr_u attributes
|
||||
#define ns_status status
|
||||
#define ns_u attrstat_u
|
||||
#define nt_seconds seconds
|
||||
#define nt_useconds useconds
|
||||
#define ra_count count
|
||||
#define ra_fhandle file
|
||||
#define ra_offset offset
|
||||
#define ra_totalcount totalcount
|
||||
#define raok_attributes attributes
|
||||
#define raok_len_u data_len
|
||||
#define raok_u data
|
||||
#define raok_val_u data_val
|
||||
#define rda_cookie cookie
|
||||
#define rda_count count
|
||||
#define rda_fhandle dir
|
||||
#define rdr_reply_u reply
|
||||
#define rdr_status status
|
||||
#define rdr_u readdirres_u
|
||||
#define rlr_data_u data
|
||||
#define rlr_status status
|
||||
#define rlr_u readlinkres_u
|
||||
#define rna_from from
|
||||
#define rna_to to
|
||||
#define rr_reply_u reply
|
||||
#define rr_status status
|
||||
#define rr_u readres_u
|
||||
#define sa_atime atime
|
||||
#define sa_gid gid
|
||||
#define sa_mode mode
|
||||
#define sa_mtime mtime
|
||||
#define sa_size size
|
||||
#define sa_uid uid
|
||||
#define sag_attributes attributes
|
||||
#define sag_fhandle file
|
||||
#define sfr_reply_u reply
|
||||
#define sfr_status status
|
||||
#define sfr_u statfsres_u
|
||||
#define sfrok_bavail bavail
|
||||
#define sfrok_bfree bfree
|
||||
#define sfrok_blocks blocks
|
||||
#define sfrok_bsize bsize
|
||||
#define sfrok_tsize tsize
|
||||
#define sla_attributes attributes
|
||||
#define sla_from from
|
||||
#define sla_to to
|
||||
#define wra_beginoffset beginoffset
|
||||
#define wra_fhandle file
|
||||
#define wra_len_u data_len
|
||||
#define wra_offset offset
|
||||
#define wra_totalcount totalcount
|
||||
#define wra_u data
|
||||
#define wra_val_u data_val
|
||||
|
||||
/*
|
||||
* TYPEDEFS:
|
||||
*/
|
||||
typedef attrstat nfsattrstat;
|
||||
typedef createargs nfscreateargs;
|
||||
typedef dirlist nfsdirlist;
|
||||
typedef diropargs nfsdiropargs;
|
||||
typedef diropokres nfsdiropokres;
|
||||
typedef diropres nfsdiropres;
|
||||
typedef entry nfsentry;
|
||||
typedef fattr nfsfattr;
|
||||
typedef ftype nfsftype;
|
||||
typedef linkargs nfslinkargs;
|
||||
typedef readargs nfsreadargs;
|
||||
typedef readdirargs nfsreaddirargs;
|
||||
typedef readdirres nfsreaddirres;
|
||||
typedef readlinkres nfsreadlinkres;
|
||||
typedef readokres nfsreadokres;
|
||||
typedef readres nfsreadres;
|
||||
typedef renameargs nfsrenameargs;
|
||||
typedef sattr nfssattr;
|
||||
typedef sattrargs nfssattrargs;
|
||||
typedef statfsokres nfsstatfsokres;
|
||||
typedef statfsres nfsstatfsres;
|
||||
typedef symlinkargs nfssymlinkargs;
|
||||
typedef writeargs nfswriteargs;
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* FreeBSD-3.0-RELEASE has NFS V3. Older versions had it only defined
|
||||
* in the rpcgen source file. If you are on an older system, and you
|
||||
* want NFSv3 support, you need to regenerate the rpcsvc header files as
|
||||
* follows:
|
||||
* cd /usr/include/rpcsvc
|
||||
* rpcgen -h -C -DWANT_NFS3 mount.x
|
||||
* rpcgen -h -C -DWANT_NFS3 nfs_prot.x
|
||||
* If you don't want NFSv3, then you will have to turn off the NFSMNT_NFSV3
|
||||
* macro below. If the code doesn't compile, upgrade to the latest 3.0
|
||||
* version...
|
||||
*/
|
||||
#ifdef NFSMNT_NFSV3
|
||||
|
||||
# define MOUNT_NFS3 "nfs" /* is this right? */
|
||||
# define MNTOPT_NFS3 "nfs"
|
||||
|
||||
/*
|
||||
* as of 3.0-RELEASE the nfs_fh3 that is defined in the system headers
|
||||
* (or the one generated by rpcgen) lacks the proper full definition,
|
||||
* listed below. A special macro (aux/macros/struct_nfs_fh3.m4) searches
|
||||
* for this special name before other names.
|
||||
*/
|
||||
|
||||
#define NFS3_FHSIZE 64
|
||||
#define FHSIZE3 64
|
||||
|
||||
struct nfs_fh3_freebsd3 {
|
||||
u_int fh3_length;
|
||||
union nfs_fh3_u {
|
||||
struct nfs_fh3_i {
|
||||
fhandle_t fh3_i;
|
||||
} nfs_fh3_i;
|
||||
char data[NFS3_FHSIZE];
|
||||
} fh3_u;
|
||||
};
|
||||
typedef struct nfs_fh3_freebsd3 nfs_fh3;
|
||||
|
||||
#endif /* NFSMNT_NFSV3 */
|
||||
|
||||
#endif /* not _AMU_NFS_PROT_H */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: nfs_prot_freebsd2.h,v 1.2 1999/01/10 21:54:14 ezk Exp $
|
||||
* $Id: nfs_prot_freebsd2.h,v 1.3.2.1 2001/01/10 03:23:21 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: nfs_prot_freebsd3.h,v 1.4 1999/03/30 17:22:54 ezk Exp $
|
||||
* $Id: nfs_prot_freebsd3.h,v 1.5.2.1 2001/01/10 03:23:22 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: transp_sockets.c,v 1.5 1999/08/22 21:12:31 ezk Exp $
|
||||
* $Id: transp_sockets.c,v 1.6.2.5 2001/06/08 18:50:40 ezk Exp $
|
||||
*
|
||||
* Socket specific utilities.
|
||||
* -Erez Zadok <ezk@cs.columbia.edu>
|
||||
@ -119,7 +119,7 @@ get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv,
|
||||
* Bind to a privileged port
|
||||
*/
|
||||
if (bind_resv_port(*sock, (u_short *) 0) < 0)
|
||||
plog(XLOG_ERROR, "can't bind privileged port");
|
||||
plog(XLOG_ERROR, "can't bind privileged port (socket)");
|
||||
|
||||
/*
|
||||
* Find mountd port to connect to.
|
||||
@ -174,7 +174,8 @@ get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv,
|
||||
struct sockaddr_in *
|
||||
amu_svc_getcaller(SVCXPRT *xprt)
|
||||
{
|
||||
return svc_getcaller(xprt);
|
||||
/* glibc 2.2 returns a sockaddr_storage ??? */
|
||||
return (struct sockaddr_in *)svc_getcaller(xprt);
|
||||
}
|
||||
|
||||
|
||||
@ -188,7 +189,7 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
|
||||
*soNFSp = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
if (*soNFSp < 0 || bind_resv_port(*soNFSp, NULL) < 0) {
|
||||
plog(XLOG_FATAL, "Can't create privileged nfs port");
|
||||
plog(XLOG_FATAL, "Can't create privileged nfs port (socket)");
|
||||
return 1;
|
||||
}
|
||||
if ((*nfs_xprtp = svcudp_create(*soNFSp)) == NULL) {
|
||||
@ -200,7 +201,8 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
|
||||
return 1;
|
||||
}
|
||||
if (!svc_register(*nfs_xprtp, NFS_PROGRAM, NFS_VERSION, dispatch_fxn, 0)) {
|
||||
plog(XLOG_FATAL, "unable to register (NFS_PROGRAM, NFS_VERSION, 0)");
|
||||
plog(XLOG_FATAL, "unable to register (%ld, %ld, 0)",
|
||||
(u_long) NFS_PROGRAM, (u_long) NFS_VERSION);
|
||||
return 3;
|
||||
}
|
||||
|
||||
@ -328,7 +330,7 @@ try_again:
|
||||
|
||||
if (clnt == NULL) {
|
||||
#ifdef HAVE_CLNT_SPCREATEERROR
|
||||
plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s :%s",
|
||||
plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s: %s",
|
||||
(int) nfs_version, proto, host, clnt_spcreateerror(""));
|
||||
#else /* not HAVE_CLNT_SPCREATEERROR */
|
||||
plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: umount_bsd44.c,v 1.2 1999/01/10 21:54:22 ezk Exp $
|
||||
* $Id: umount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:28 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c
|
||||
@c Copyright (c) 1997-1999 Erez Zadok
|
||||
@c Copyright (c) 1997-2001 Erez Zadok
|
||||
@c Copyright (c) 1989 Jan-Simon Pendry
|
||||
@c Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
@c Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
@c
|
||||
@c %W% (Berkeley) %G%
|
||||
@c
|
||||
@c $Id: am-utils.texi,v 1.12 1999/09/30 21:01:39 ezk Exp $
|
||||
@c $Id: am-utils.texi,v 1.21.2.17 2001/07/03 23:50:31 ezk Exp $
|
||||
@c
|
||||
@setfilename am-utils.info
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
(Originally by Jan-Simon Pendry and Nick Williams)
|
||||
|
||||
@page
|
||||
Copyright @copyright{} 1997-1999 Erez Zadok
|
||||
Copyright @copyright{} 1997-2001 Erez Zadok
|
||||
@*
|
||||
Copyright @copyright{} 1989 Jan-Simon Pendry
|
||||
@*
|
||||
@ -194,17 +194,17 @@ THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The @i{Am-utils} home page is located in
|
||||
@example
|
||||
@url{http://www.cs.columbia.edu/~ezk/am-utils/}
|
||||
@url{http://www.am-utils.org/}
|
||||
@end example
|
||||
|
||||
You can get the latest distribution version of @i{Am-utils} from
|
||||
@example
|
||||
@url{ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/am-utils.tar.gz}
|
||||
@url{ftp://ftp.am-utils.org/pub/am-utils/am-utils.tar.gz}
|
||||
@end example
|
||||
|
||||
Alpha and beta distributions are available in
|
||||
Additional alpha, beta, and release distributions are available in
|
||||
@example
|
||||
@url{ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/}.
|
||||
@url{ftp://ftp.am-utils.org/pub/am-utils/}.
|
||||
@end example
|
||||
|
||||
Revision 5.2 was part of the 4.3BSD Reno distribution.
|
||||
@ -221,7 +221,7 @@ part of his @uref{http://www.cs.columbia.edu/~ezk/research/tp/thesis_proposal.ht
|
||||
@cindex Bug reports
|
||||
|
||||
Before reporting a bug, see if it is a known one in the
|
||||
@uref{http://www.cs.columbia.edu/~ezk/am-utils/BUGS.txt,bugs} file.
|
||||
@uref{http://www.am-utils.org/BUGS.txt,bugs} file.
|
||||
Send all bug reports to @email{amd-dev@@majordomo.cs.columbia.edu}
|
||||
quoting the details of the release and your configuration. These can be
|
||||
obtained by running the command @samp{amd -v}. It would greatly help if
|
||||
@ -230,7 +230,7 @@ reporting.
|
||||
|
||||
Providing working patches is highly encouraged. Every patch
|
||||
incorporated, however small, will get its author an honorable mention in
|
||||
the @uref{http://www.cs.columbia.edu/~ezk/am-utils/AUTHORS.txt,authors
|
||||
the @uref{http://www.am-utils.org/AUTHORS.txt,authors
|
||||
file}.
|
||||
|
||||
@unnumberedsec Mailing List
|
||||
@ -701,6 +701,14 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{alpha-dec-osf4.0f}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{alpha-dec-osf5.1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{alphaev5-unknown-linux-gnu}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
@ -709,9 +717,13 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
|
||||
@item @b{alphaev6-dec-osf5.0}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{hppa1.0-hp-hpux11.00}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab no @tab yes @tab ?
|
||||
@tab yes @tab yes @tab yes @tab no @tab yes @tab yes
|
||||
|
||||
@item @b{hppa1.1-hp-hpux10.10}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@ -721,6 +733,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab no @tab no @tab ?
|
||||
|
||||
@item @b{hppa1.1-hp-hpux11.00}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab UDP @tab yes @tab yes
|
||||
|
||||
@item @b{hppa1.1-hp-hpux9.01}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
@ -757,6 +773,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-pc-bsdi4.1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-pc-solaris2.5.1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
|
||||
@ -793,6 +813,14 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-freebsd4.2}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-freebsd5.0}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-freebsdelf3.0}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
@ -809,6 +837,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-freebsdelf3.4}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-freebsdelf4.0}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
@ -837,6 +869,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-netbsd1.4.1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{i386-unknown-openbsd2.1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
@ -893,6 +929,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
|
||||
@item @b{i586-pc-linux-gnu-rh6.2}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
|
||||
@item @b{i586-pc-linux-gnulibc1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
@ -901,7 +941,6 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
|
||||
|
||||
@item @b{i686-pc-linux-gnu}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
@ -914,6 +953,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
|
||||
@item @b{i686-pc-linux-gnu-rh6.2}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab yes
|
||||
|
||||
@item @b{i686-pc-linux-gnulibc}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
@ -956,7 +999,7 @@ features.
|
||||
|
||||
@item @b{mips-sgi-irix6.5}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab ? @tab yes @tab yes @tab ?
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
|
||||
|
||||
@item @b{powerpc-ibm-aix4.1.5.0}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@ -1014,6 +1057,10 @@ features.
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
|
||||
|
||||
@item @b{sparc-sun-solaris2.8}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
|
||||
|
||||
@item @b{sparc-sun-sunos4.1.1}
|
||||
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
|
||||
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
|
||||
@ -1262,7 +1309,7 @@ using the @dfn{Hesiod} name server. The string following the dot is
|
||||
used as a name qualifier and is prepended with the key being located.
|
||||
The entire string is then resolved in the @code{automount} context, or
|
||||
the @i{amd.conf} parameter @samp{hesiod_base} (@pxref{hesiod_base
|
||||
Parameter}). For example, if the the key is @samp{jsp} and map name is
|
||||
Parameter}). For example, if the key is @samp{jsp} and map name is
|
||||
@samp{hesiod.homes} then @dfn{Hesiod} is asked to resolve
|
||||
@samp{jsp.homes.automount}.
|
||||
|
||||
@ -1629,7 +1676,7 @@ The default value of many of the selectors listed here can be overridden
|
||||
by an @i{Amd} command line switch or in an @i{Amd} configuration file.
|
||||
@xref{Amd Configuration File}.
|
||||
|
||||
These are the selectors currently implemented.
|
||||
The following selectors are currently implemented.
|
||||
|
||||
@menu
|
||||
* arch Selector Variable::
|
||||
@ -1637,6 +1684,7 @@ These are the selectors currently implemented.
|
||||
* byte Selector Variable::
|
||||
* cluster Selector Variable::
|
||||
* domain Selector Variable::
|
||||
* dollar Selector Variable::
|
||||
* host Selector Variable::
|
||||
* hostd Selector Variable::
|
||||
* karch Selector Variable::
|
||||
@ -1651,6 +1699,8 @@ These are the selectors currently implemented.
|
||||
* network Selector Variable::
|
||||
* path Selector Variable::
|
||||
* wire Selector Variable::
|
||||
* uid Selector Variable::
|
||||
* gid Selector Variable::
|
||||
|
||||
* exists Selector Function::
|
||||
* false Selector Function::
|
||||
@ -1716,7 +1766,7 @@ filesystems. @code{$@{cluster@}} defaults to the value of
|
||||
command line option.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node domain Selector Variable, host Selector Variable, cluster Selector Variable, Selectors
|
||||
@node domain Selector Variable, dollar Selector Variable, cluster Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection domain Selector Variable
|
||||
@cindex domain Selector Variable
|
||||
@ -1728,7 +1778,22 @@ The local domain name as specified by the @code{-d} command line option.
|
||||
@xref{host Selector Variable}.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node host Selector Variable, hostd Selector Variable, domain Selector Variable, Selectors
|
||||
@node dollar Selector Variable, host Selector Variable, domain Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection dollar Selector Variable
|
||||
@cindex dollar Selector Variable
|
||||
|
||||
This is a special variable, whose sole purpose is to produce a literal
|
||||
dollar sign in the value of another variable. For example, if you have
|
||||
a remote file system whose name is @samp{/disk$s}, you can mount it by
|
||||
setting the remote file system variable as follows:
|
||||
|
||||
@example
|
||||
rfs:=/disk$@{dollar@}s
|
||||
@end example
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node host Selector Variable, hostd Selector Variable, dollar Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection host Selector Variable
|
||||
@cindex host Selector Variable
|
||||
@ -1832,6 +1897,7 @@ automatically determined at compile time. The name of the vendor can be
|
||||
displayed by running the command @samp{amd -v}. @xref{Supported
|
||||
Platforms}.@refill
|
||||
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@ifhtml
|
||||
<HR>
|
||||
@ -1912,7 +1978,7 @@ The full pathname of the name being resolved. For example
|
||||
@file{/home/foo} in the example above.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node wire Selector Variable, exists Selector Function, path Selector Variable, Selectors
|
||||
@node wire Selector Variable, uid Selector Variable, path Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection wire Selector Variable
|
||||
@cindex wire Selector Variable
|
||||
@ -1926,6 +1992,43 @@ or number of @i{any} network interface on which this host is connected
|
||||
to. The names and numbers of all attached interfaces are available from
|
||||
the output of @samp{amd -v}.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node uid Selector Variable, gid Selector Variable, wire Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection uid Selector Variable
|
||||
@cindex uid Selector Variable
|
||||
@cindex uid, mount selector
|
||||
@cindex Mount selector; uid
|
||||
@cindex Selector; uid
|
||||
|
||||
This selector provides the numeric effective user ID (UID) of the user
|
||||
which last accessed an automounted path name. This simple example shows
|
||||
how floppy mounting can be assigned only to machine owners:
|
||||
|
||||
@example
|
||||
floppy -type:=pcfs \
|
||||
uid==2301;host==shekel;dev:=/dev/floppy \
|
||||
uid==6712;host==titan;dev=/dev/fd0 \
|
||||
uid==0;dev:=/dev/fd0c \
|
||||
type:=error
|
||||
@end example
|
||||
|
||||
The example allows two machine owners to mount floppies on their
|
||||
designated workstations, allows the root user to mount on any host, and
|
||||
otherwise forces an error.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node gid Selector Variable, exists Selector Function, uid Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection gid Selector Variable
|
||||
@cindex gid Selector Variable
|
||||
@cindex gid, mount selector
|
||||
@cindex Mount selector; gid
|
||||
@cindex Selector; gid
|
||||
|
||||
This selector provides the numeric effective group ID (GID) of the user
|
||||
which last accessed an automounted path name.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@ifhtml
|
||||
<HR>
|
||||
@ -1937,7 +2040,7 @@ be compared with a value. Each of these may be negated by prepending
|
||||
@samp{!} to their name.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node exists Selector Function, false Selector Function, wire Selector Variable, Selectors
|
||||
@node exists Selector Function, false Selector Function, gid Selector Variable, Selectors
|
||||
@comment node-name, next, previous, up
|
||||
@subsubsection exists Selector Function
|
||||
@cindex exists Selector Function
|
||||
@ -2270,6 +2373,10 @@ Use BSD directory group-id semantics.
|
||||
@cindex Mount flags; intr
|
||||
Allow keyboard interrupts on hard mounts.
|
||||
|
||||
@item lock
|
||||
@cindex Mount flags; lock
|
||||
Use the NFS locking protocol (default)
|
||||
|
||||
@item multi
|
||||
@cindex Mount flags; multi
|
||||
Perform multi-component lookup on files.
|
||||
@ -2316,10 +2423,23 @@ ISO-9660.
|
||||
@cindex Mount flags; nodevs
|
||||
Don't allow local special devices on this filesystem.
|
||||
|
||||
@item noexec
|
||||
@cindex Mount flags; noexec
|
||||
Don't allow program execution.
|
||||
|
||||
@item noint
|
||||
@cindex Mount flags; noint
|
||||
Do not allow keyboard interrupts for this mount
|
||||
|
||||
@item nolock
|
||||
@cindex Mount flags; nolock
|
||||
Do not use the NFS locking protocol
|
||||
|
||||
@item nomnttab
|
||||
@cindex Mount flags; nomnttab
|
||||
This option is used internally to tell Amd that a Solaris 8 system using
|
||||
mntfs is in use.
|
||||
|
||||
@item norrip
|
||||
@cindex Mount flags; norrip
|
||||
Turn off using of the Rock Ridge Interchange Protocol (RRIP) extensions
|
||||
@ -2338,6 +2458,11 @@ Don't allow set-uid or set-gid executables on this filesystem.
|
||||
Strip the extension @samp{;#} from the version string of files recorded
|
||||
on an ISO-9660 CD-ROM.
|
||||
|
||||
@item optionstr
|
||||
@cindex Mount flags; optionstr
|
||||
Under Solaris 8, provide the kernel a string of options to parse and
|
||||
show as part of the special in-kernel mount file system.
|
||||
|
||||
@item overlay
|
||||
@cindex Mount flags; overlay
|
||||
Overlay this mount on top of an existing mount, if any.
|
||||
@ -2354,6 +2479,10 @@ Set the NFS port to @var{n}.
|
||||
@cindex Mount flags; posix
|
||||
Turn on POSIX static pathconf for mounts.
|
||||
|
||||
@item proplist
|
||||
@cindex Mount flags; proplist
|
||||
Support property lists (ACLs) for this mount, useful primarily for DU-4.0.
|
||||
|
||||
@item proto=@var{s}
|
||||
@cindex Mount flags; proto
|
||||
Use transport protocol @var{s} for NFS (can be @code{"tcp"} or @code{"udp"}).
|
||||
@ -2414,7 +2543,7 @@ Allow set-uid programs on this mount.
|
||||
|
||||
@item symttl
|
||||
@cindex Mount flags; symttl
|
||||
Turn of the symbolic link cache time-to-live.
|
||||
Turn off the symbolic link cache time-to-live.
|
||||
|
||||
@item sync
|
||||
@cindex Mount flags; sync
|
||||
@ -3005,6 +3134,8 @@ enter daemon mode
|
||||
fork server
|
||||
@item full
|
||||
program trace
|
||||
@item hrtime
|
||||
print high resolution time stamps (only if @b{syslog}(3) is not used)
|
||||
@item info
|
||||
@cindex debugging hesiod resolver service
|
||||
@cindex Hesiod: turning on RES_DEBUG
|
||||
@ -3014,12 +3145,16 @@ hesiod maps, turns on the hesiod RES_DEBUG internal debugging option.
|
||||
trace memory allocations
|
||||
@item mtab
|
||||
use local @file{./mtab} file
|
||||
@item readdir
|
||||
show readdir progress
|
||||
@item str
|
||||
debug string munging
|
||||
@item test
|
||||
full debug but no daemon
|
||||
@item trace
|
||||
trace RPC protocol and NFS mount arguments
|
||||
@item xdrtrace
|
||||
trace XDR routines
|
||||
@end table
|
||||
|
||||
You may also refer to the program source for a more detailed explanation
|
||||
@ -3295,17 +3430,16 @@ The options are the same as for the @samp{nfs} filesystem with one
|
||||
difference.
|
||||
|
||||
@noindent
|
||||
The following options must be specified:
|
||||
The following options should be specified:
|
||||
|
||||
@table @code
|
||||
@item rhost
|
||||
the remote fileserver. This must be an entry in the hosts database. IP
|
||||
addresses are not accepted. The default value is taken from the local
|
||||
the remote fileserver. The default value is taken from the local
|
||||
host name (@code{$@{host@}}) if no other value is specified.
|
||||
|
||||
@item rfs
|
||||
as a list of filesystems to mount. The list is in the form of a comma
|
||||
separated strings.
|
||||
is a list of filesystems to mount, and must be specified.
|
||||
The list is in the form of a comma separated strings.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
@ -3861,6 +3995,13 @@ we are now stuck with it due to historical accident.
|
||||
alters the name that is looked up in the mount map. If
|
||||
@code{$@{pref@}}, the @dfn{prefix}, is non-null then it is prepended to
|
||||
the name requested by the kernel @dfn{before} the map is searched.
|
||||
|
||||
@item opts
|
||||
Normally, @samp{auto} style maps are not browsable even if you turn on
|
||||
directory browsability (@pxref{browsable_dirs Parameter}). To enable
|
||||
browsing entries in @samp{auto} maps, specify @samp{opts:=browsable} in
|
||||
the description of this map.
|
||||
|
||||
@end table
|
||||
|
||||
The server @samp{dylan.doc.ic.ac.uk} has two user disks:
|
||||
@ -3972,10 +4113,7 @@ The error filesystem is not directly accessible.
|
||||
|
||||
The @dfn{toplvl} (@samp{type:=toplvl}) filesystems is derived from the @samp{auto} filesystem
|
||||
and is used to mount the top-level automount nodes. Requests of this
|
||||
type are automatically generated from the command line arguments and can
|
||||
also be passed in by using the @code{-M} option of the @dfn{Amq} command.
|
||||
That option is insecure, and is unavailable unless am-utils was
|
||||
configured with @samp{--with-amq-mount}.
|
||||
type are automatically generated from the command line arguments.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Root Filesystem, Inheritance Filesystem, Autofs Filesystem, Filesystem Types
|
||||
@ -4241,8 +4379,10 @@ The following parameters are applicable to the @samp{[global]} section only.
|
||||
* local_domain Parameter::
|
||||
* log_file Parameter::
|
||||
* log_options Parameter::
|
||||
* nfs_proto Parameter::
|
||||
* nfs_retransmit_counter Parameter::
|
||||
* nfs_retry_interval Parameter::
|
||||
* nfs_vers Parameter::
|
||||
* nis_domain Parameter::
|
||||
* normalize_hostnames Parameter::
|
||||
* os Parameter::
|
||||
@ -4253,7 +4393,7 @@ The following parameters are applicable to the @samp{[global]} section only.
|
||||
* print_pid Parameter::
|
||||
* print_version Parameter::
|
||||
* restart_mounts Parameter::
|
||||
* selectors_on_default Parameter::
|
||||
* selectors_in_defaults Parameter::
|
||||
* show_statfs_entries Parameter::
|
||||
* unmount_on_exit Parameter::
|
||||
* vendor Parameter::
|
||||
@ -4400,8 +4540,9 @@ sun4m, sun4u, etc.) Note that if not specified, @i{Amd} will use
|
||||
@subsection @t{ldap_base} Parameter
|
||||
@cindex ldap_base Parameter
|
||||
|
||||
(type=string, default not set). Specify the base name for
|
||||
LDAP.
|
||||
(type=string, default not set).
|
||||
Specify the base name for LDAP. This often includes LDAP-specific
|
||||
values such as country and organization.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node ldap_cache_maxmem Parameter, ldap_cache_seconds Parameter, ldap_base Parameter, Global Parameters
|
||||
@ -4427,8 +4568,8 @@ entries in the cache.
|
||||
@subsection @t{ldap_hostports} Parameter
|
||||
@cindex ldap_hostports Parameter
|
||||
|
||||
(type=string, default not set). Specify
|
||||
LDAP-specific values such as country and organization.
|
||||
(type=string, default not set).
|
||||
Specify the LDAP host and port values.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node local_domain Parameter, log_file Parameter, ldap_hostports Parameter, Global Parameters
|
||||
@ -4466,7 +4607,7 @@ is generally a bad idea to use those reserved for other services such as
|
||||
@samp{kern}, @samp{lpr}, @samp{cron}, etc.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node log_options Parameter, nfs_retransmit_counter Parameter, log_file Parameter, Global Parameters
|
||||
@node log_options Parameter, nfs_proto Parameter, log_file Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{log_options} Parameter
|
||||
@cindex log_options Parameter
|
||||
@ -4503,7 +4644,21 @@ warnings
|
||||
@end table
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node nfs_retransmit_counter Parameter, nfs_retry_interval Parameter, log_options Parameter, Global Parameters
|
||||
@node nfs_proto Parameter, nfs_retransmit_counter Parameter, log_options Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{nfs_proto} Parameter
|
||||
@cindex nfs_proto Parameter
|
||||
|
||||
(type=string, default to trying version tcp then udp). By default,
|
||||
@i{Amd} tries @code{tcp} and then @code{udp}. This option forces the
|
||||
overall NFS protocol used to TCP or UDP. It overrides what is in the
|
||||
@i{Amd} maps, and is useful when @i{Amd} is compiled with NFSv3 support
|
||||
that may not be stable. With this option you can turn off the complete
|
||||
usage of NFSv3 dynamically (without having to recompile @i{Amd}) until
|
||||
such time as NFSv3 support is desired again.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node nfs_retransmit_counter Parameter, nfs_retry_interval Parameter, nfs_proto Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{nfs_retransmit_counter} Parameter
|
||||
@cindex nfs_retransmit_counter Parameter
|
||||
@ -4514,7 +4669,7 @@ number of NFS retransmissions that the kernel will use to communicate
|
||||
with @i{Amd}. @xref{-t Option}.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node nfs_retry_interval Parameter, nis_domain Parameter, nfs_retransmit_counter Parameter, Global Parameters
|
||||
@node nfs_retry_interval Parameter, nfs_vers Parameter, nfs_retransmit_counter Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{nfs_retry_interval} Parameter
|
||||
@cindex nfs_retry_interval Parameter
|
||||
@ -4525,14 +4680,28 @@ timeout interval, in @emph{tenths} of seconds, between NFS/RPC retries
|
||||
(for UDP only). This is the value that the kernel will use to
|
||||
communicate with @i{Amd}. @xref{-t Option}.
|
||||
|
||||
Amd relies on the kernel RPC retransmit mechanism to trigger mount
|
||||
@i{Amd} relies on the kernel RPC retransmit mechanism to trigger mount
|
||||
retries. The values of the @i{nfs_retransmit_counter} and the
|
||||
@i{nfs_retry_interval} parameters change the overall retry interval.
|
||||
Too long an interval gives poor interactive response; too short an
|
||||
interval causes excessive retries.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node nis_domain Parameter, normalize_hostnames Parameter, nfs_retry_interval Parameter, Global Parameters
|
||||
@node nfs_vers Parameter, nis_domain Parameter, nfs_retry_interval Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{nfs_vers} Parameter
|
||||
@cindex nfs_vers Parameter
|
||||
|
||||
(type=numeric, default to trying version 3 then 2). By default, @i{Amd}
|
||||
tries version 3 and then version 2. This option forces the overall NFS
|
||||
protocol used to version 3 or 2. It overrides what is in the @i{Amd}
|
||||
maps, and is useful when @i{Amd} is compiled with NFSv3 support that may not
|
||||
be stable. With this option you can turn off the complete usage of
|
||||
NFSv3 dynamically (without having to recompile @i{Amd}) until such time as
|
||||
NFSv3 support is desired again.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node nis_domain Parameter, normalize_hostnames Parameter, nfs_vers Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{nis_domain} Parameter
|
||||
@cindex nis_domain Parameter
|
||||
@ -4647,7 +4816,7 @@ will print its version information string, which includes some
|
||||
configuration and compilation values.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node restart_mounts Parameter, selectors_on_default Parameter, print_version Parameter, Global Parameters
|
||||
@node restart_mounts Parameter, selectors_in_defaults Parameter, print_version Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{restart_mounts} Parameter
|
||||
@cindex restart_mounts Parameter
|
||||
@ -4658,13 +4827,13 @@ systems are currently mounted. Whenever one of these would have been
|
||||
auto-mounted, @i{Amd} inherits it.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node selectors_on_default Parameter, show_statfs_entries Parameter, restart_mounts Parameter, Global Parameters
|
||||
@node selectors_in_defaults Parameter, show_statfs_entries Parameter, restart_mounts Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{selectors_on_default} Parameter
|
||||
@cindex selectors_on_default Parameter
|
||||
@subsection @t{selectors_in_defaults} Parameter
|
||||
@cindex selectors_in_defaults Parameter
|
||||
|
||||
(type=boolean, default=@samp{no}). If @samp{yes}, then the @samp{/defaults} entry of
|
||||
maps will be looked for and any selectors processed before setting defaults
|
||||
maps will search for and process any selectors before setting defaults
|
||||
for all other keys in that map. Useful when you want to set different
|
||||
options for a complete map based on some parameters. For example, you
|
||||
may want to better the NFS performance over slow slip-based networks as
|
||||
@ -4676,8 +4845,10 @@ follows:
|
||||
wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
|
||||
@end example
|
||||
|
||||
Deprecated form: selectors_on_default.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node show_statfs_entries Parameter, unmount_on_exit Parameter, selectors_on_default Parameter, Global Parameters
|
||||
@node show_statfs_entries Parameter, unmount_on_exit Parameter, selectors_in_defaults Parameter, Global Parameters
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @t{show_statfs_entries} Parameter
|
||||
@cindex show_statfs_entries Parameter
|
||||
@ -4767,7 +4938,7 @@ log_file = /var/log/amd
|
||||
log_options = all
|
||||
#debug_options = all
|
||||
plock = no
|
||||
selectors_on_default = yes
|
||||
selectors_in_defaults = yes
|
||||
# config.guess picks up "sunos5" and I don't want to edit my maps yet
|
||||
os = sos5
|
||||
# if you print_version after setting up "os", it will show it.
|
||||
@ -4925,9 +5096,9 @@ mount point.
|
||||
* Amq default:: Default command behavior.
|
||||
* Amq -f option:: Flushing the map cache.
|
||||
* Amq -h option:: Controlling a non-local host.
|
||||
* Amq -H-option:: Print help message.
|
||||
* Amq -l option:: Controlling the log file.
|
||||
* Amq -m option:: Obtaining mount statistics.
|
||||
* Amq -M-option:: Mounting a volume.
|
||||
* Amq -p option:: Getting Amd's process ID.
|
||||
* Amq -P-option:: Contacting alternate Amd processes.
|
||||
* Amq -s option:: Obtaining global statistics.
|
||||
@ -4935,6 +5106,7 @@ mount point.
|
||||
* Amq -U-option:: Use UDP transport.
|
||||
* Amq -u option:: Forcing volumes to time out.
|
||||
* Amq -v option:: Version information.
|
||||
* Amq -w option:: Print Amd current working directory.
|
||||
* Other Amq options:: Three other special options.
|
||||
@end menu
|
||||
|
||||
@ -5027,7 +5199,27 @@ also be synchronized with the map source by using the @samp{sync} option
|
||||
(@pxref{Automount Filesystem}).@refill
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -l option, Amq -m option, Amq -h option, Controlling Amd
|
||||
@node Amq -h option, Amq -H-option, Amq -f option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-h} option
|
||||
@cindex Querying an alternate host
|
||||
|
||||
By default the local host is used. In an HP-UX cluster the root server
|
||||
is used since that is the only place in the cluster where @i{Amd} will
|
||||
be running. To query @i{Amd} on another host the @code{-h} option should
|
||||
be used.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -H-option, Amq -l option, Amq -h option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-H} option
|
||||
@cindex Displaying brief help
|
||||
@cindex Help; showing from Amq
|
||||
|
||||
Print a brief help and usage string.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -l option, Amq -m option, Amq -H-option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-l} option
|
||||
@cindex Resetting the Amd log file
|
||||
@ -5041,18 +5233,7 @@ file handle on the log file, so that it can be rotated and compressed
|
||||
via daily cron jobs.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -h option, Amq -l option, Amq -f option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-h} option
|
||||
@cindex Querying an alternate host
|
||||
|
||||
By default the local host is used. In an HP-UX cluster the root server
|
||||
is used since that is the only place in the cluster where @i{Amd} will
|
||||
be running. To query @i{Amd} on another host the @code{-h} option should
|
||||
be used.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -m option, Amq -M-option, Amq -l option, Controlling Amd
|
||||
@node Amq -m option, Amq -p option, Amq -l option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-m} option
|
||||
|
||||
@ -5094,32 +5275,9 @@ the mount point and server information is still being maintained
|
||||
by @i{Amd}.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -M-option, Amq -p option, Amq -m option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-M} option
|
||||
|
||||
The @code{-M} option passes a new map entry to @i{Amd} and waits for it to
|
||||
be evaluated, possibly causing a mount. For example, the following
|
||||
command would cause @samp{/home/toytown} on host @samp{toytown} to be
|
||||
mounted locally on @samp{/mnt/toytown}.
|
||||
|
||||
@example
|
||||
amq -M '/mnt/toytown type:=nfs;rfs:=/home/toytown;rhost:=toytown;fs:=$@{key@}'
|
||||
@end example
|
||||
|
||||
@i{Amd} applies some simple security checks before allowing this
|
||||
operation. The check tests whether the incoming request is from a
|
||||
privileged UDP port on the local machine. ``Permission denied'' is
|
||||
returned if the check fails.
|
||||
|
||||
This option is very insecure as it is vulnerable to attacks such as IP
|
||||
Spoofing. In other words, it is relatively easy for an attacker who
|
||||
really wants to, to make your @i{Amd} process mount any filesystem from
|
||||
the Internet! Therefore, the @emph{complete} code which supports the
|
||||
@code{-M} option in @i{Amd} and @i{Amq} is turned off by default. To turn
|
||||
it on, you have to reconfigure am-utils with @code{configure
|
||||
--enable-amq-mount}. Think twice before doing so, and use this option
|
||||
only if you absolutely need to.
|
||||
@ignore
|
||||
@comment Retained for future consideration: from the description of the
|
||||
@comment amq -M option removed in amd 6.0.5.
|
||||
|
||||
A future release of @i{Amd} will include code to allow the @b{mount}(8)
|
||||
command to mount automount points:
|
||||
@ -5131,8 +5289,10 @@ mount -t amd /vol hesiod.vol
|
||||
This will then allow @i{Amd} to be controlled from the standard system
|
||||
filesystem mount list.
|
||||
|
||||
@end ignore
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -p option, Amq -P-option, Amq -M-option, Controlling Amd
|
||||
@node Amq -p option, Amq -P-option, Amq -m option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-p} option
|
||||
@cindex Process ID; Amd
|
||||
@ -5240,11 +5400,11 @@ safe way to unmount an automounted filesystem. It is not possible to
|
||||
unmount a filesystem which has been mounted with the @samp{nounmount}
|
||||
flag.
|
||||
|
||||
@c The @code{-H} option informs @i{Amd} that the specified mount point has hung -
|
||||
@c as if its keepalive timer had expired.
|
||||
@c The @code{-H} option informs @i{Amd} that the specified mount point
|
||||
@c has hung - as if its keepalive timer had expired.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Amq -v option, Other Amq options, Amq -u option, Controlling Amd
|
||||
@node Amq -v option, Amq -w option, Amq -u option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-v} option
|
||||
@cindex Version information at run-time
|
||||
@ -5253,7 +5413,17 @@ The @code{-v} option displays the version of @i{Amd} in a similar way to
|
||||
@i{Amd}'s @code{-v} option.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Other Amq options, , Amq -v option, Controlling Amd
|
||||
@node Amq -w option, Other Amq options, Amq -v option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @i{Amq} @code{-w} option
|
||||
@cindex Getting real working directory
|
||||
|
||||
The @code{-w} option translates a full pathname as returned by
|
||||
@b{getpwd}(3) into a short @i{Amd} pathname that goes through its mount
|
||||
points. This option requires that @i{Amd} is running.
|
||||
|
||||
@c ----------------------------------------------------------------
|
||||
@node Other Amq options, , Amq -w option, Controlling Amd
|
||||
@comment node-name, next, previous, up
|
||||
@subsection Other @i{Amq} options
|
||||
@cindex Logging options via Amq
|
||||
@ -6197,7 +6367,7 @@ to @file{stdout} on a line starting with a @samp{#} character.
|
||||
|
||||
@node -D-FSinfo Option, -I FSinfo Option, -v FSinfo Option, FSinfo Command Line Options
|
||||
@comment node-name, next, previous, up
|
||||
@subsection @code{-D} @var{name[=defn]}
|
||||
@subsection @code{-D} @var{name}@i{[=defn]}
|
||||
|
||||
Defines a symbol @dfn{name} for the preprocessor when reading the
|
||||
configuration files. Equivalent to @code{#define} directive.
|
||||
@ -7720,8 +7890,8 @@ bsd -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \
|
||||
It is sometimes useful to have different defaults for a given map. To
|
||||
achieve this, the @samp{/defaults} entry must be able to process normal
|
||||
selectors. This feature is turned on by setting
|
||||
@samp{selectors_on_default = yes} in the @file{amd.conf} file.
|
||||
@xref{selectors_on_default Parameter}.
|
||||
@samp{selectors_in_defaults = yes} in the @file{amd.conf} file.
|
||||
@xref{selectors_in_defaults Parameter}.
|
||||
|
||||
In this example, I set different default NFS mount options for hosts
|
||||
which are running over a slower network link. By setting a smaller size
|
||||
@ -8055,7 +8225,7 @@ Developers} mailing list through the months developing am-utils. These
|
||||
members have contributed to the discussions, ideas, code and
|
||||
documentation, and subjected their systems to alpha quality code.
|
||||
Special thanks go to those
|
||||
@uref{http://www.cs.columbia.edu/~ezk/am-utils/AUTHORS.txt,authors} who
|
||||
@uref{http://www.am-utils.org/AUTHORS.txt,authors} who
|
||||
have submitted patches.
|
||||
|
||||
Thanks to the Formal Methods Group at Imperial College for suffering
|
||||
@ -8140,4 +8310,5 @@ All other registered trademarks are owned by their respective owners.
|
||||
@c LocalWords: serv maxgroups nfsl cachedir copt cfsadmin efs addopts fg ROMs
|
||||
@c LocalWords: nointr extatt setchapternewpage columnfractions alphaev gnulibc
|
||||
@c LocalWords: freebsdelf gnuoldld ifhtml defperm nodefperm norrip RRIP rrip
|
||||
@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp
|
||||
@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp uid gid noexec mntfs
|
||||
@c LocalWords: nomnttab optionstr hrtime xdrtrace getpwd proplist
|
||||
|
@ -1,3 +1,3 @@
|
||||
@set UPDATED 7 October 1999
|
||||
@set EDITION 6.0.3s1
|
||||
@set VERSION 6.0.3s1
|
||||
@set UPDATED 3 July 2001
|
||||
@set EDITION 6.0.7
|
||||
@set VERSION 6.0.7
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
@set UPDATED 7 October 1999
|
||||
@set EDITION 6.0.3s1
|
||||
@set VERSION 6.0.3s1
|
||||
@set UPDATED 3 July 2001
|
||||
@set EDITION 6.0.7
|
||||
@set VERSION 6.0.7
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" Copyright (c) 1997-1999 Erez Zadok
|
||||
.\" Copyright (c) 1997-2001 Erez Zadok
|
||||
.\" Copyright (c) 1990 Jan-Simon Pendry
|
||||
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
.\" Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,9 +38,9 @@
|
||||
.\"
|
||||
.\" %W% (Berkeley) %G%
|
||||
.\"
|
||||
.\" $Id: fixmount.8,v 1.2 1999/01/10 21:54:26 ezk Exp $
|
||||
.\" $Id: fixmount.8,v 1.3.2.2 2001/01/10 03:23:32 ezk Exp $
|
||||
.\"
|
||||
.TH FIXMOUNT 8L "26 Feb 1993"
|
||||
.TH FIXMOUNT 8 "26 Feb 1993"
|
||||
.SH NAME
|
||||
fixmount \- fix remote mount entries
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1990 Jan-Simon Pendry
|
||||
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fixmount.c,v 1.4 1999/02/04 07:24:42 ezk Exp $
|
||||
* $Id: fixmount.c,v 1.5.2.1 2001/01/10 03:23:32 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsi_analyze.c,v 1.2 1999/01/10 21:54:27 ezk Exp $
|
||||
* $Id: fsi_analyze.c,v 1.3.2.1 2001/01/10 03:23:32 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsi_data.h,v 1.2 1999/01/10 21:54:27 ezk Exp $
|
||||
* $Id: fsi_data.h,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsi_dict.c,v 1.2 1999/01/10 21:54:28 ezk Exp $
|
||||
* $Id: fsi_dict.c,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsi_gram.y,v 1.3 1999/04/16 14:21:14 ezk Exp $
|
||||
* $Id: fsi_gram.y,v 1.4.2.1 2001/01/10 03:23:33 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
%{
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -39,7 +39,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsi_lex.l,v 1.3 1999/09/30 21:01:41 ezk Exp $
|
||||
* $Id: fsi_lex.l,v 1.4.2.2 2001/01/10 03:23:33 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -236,7 +236,7 @@ yyerror(char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
col_cleanup(0);
|
||||
fprintf(stderr, "%s:%d: ", fsi_filename ? fsi_filename : "/dev/stdin", yylineno);
|
||||
fprintf(stderr, fmt, ap);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fputc('\n', stderr);
|
||||
parse_errors++;
|
||||
va_end(ap);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -35,7 +35,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsi_util.c,v 1.2 1999/01/10 21:54:28 ezk Exp $
|
||||
* $Id: fsi_util.c,v 1.3.2.2 2001/01/10 03:23:33 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -115,7 +115,7 @@ error(char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
col_cleanup(0);
|
||||
fprintf(stderr, "%s: Error, ", progname);
|
||||
fprintf(stderr, fmt, ap);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fputc('\n', stderr);
|
||||
errors++;
|
||||
va_end(ap);
|
||||
@ -130,7 +130,7 @@ lerror(ioloc *l, char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
col_cleanup(0);
|
||||
fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
|
||||
fprintf(stderr, fmt, ap);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fputc('\n', stderr);
|
||||
errors++;
|
||||
va_end(ap);
|
||||
@ -145,7 +145,7 @@ lwarning(ioloc *l, char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
col_cleanup(0);
|
||||
fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
|
||||
fprintf(stderr, fmt, ap);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fputc('\n', stderr);
|
||||
va_end(ap);
|
||||
}
|
||||
@ -159,7 +159,7 @@ fatal(char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
col_cleanup(1);
|
||||
fprintf(stderr, "%s: Fatal, ", progname);
|
||||
fprintf(stderr, fmt, ap);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fputc('\n', stderr);
|
||||
va_end(ap);
|
||||
exit(1);
|
||||
@ -178,7 +178,7 @@ log(char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
fputc('#', stdout);
|
||||
fprintf(stdout, "%s: ", progname);
|
||||
fprintf(stdout, fmt, ap);
|
||||
vfprintf(stdout, fmt, ap);
|
||||
putc('\n', stdout);
|
||||
va_end(ap);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" Copyright (c) 1997-1999 Erez Zadok
|
||||
.\" Copyright (c) 1997-2001 Erez Zadok
|
||||
.\" Copyright (c) 1993 Jan-Simon Pendry.
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93
|
||||
.\" $Id: fsinfo.8,v 1.2 1999/01/10 21:54:28 ezk Exp $
|
||||
.\" $Id: fsinfo.8,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
|
||||
.\"
|
||||
.TH FSINFO 8 "June 28, 1993"
|
||||
.SH NAME
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997-1999 Erez Zadok
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1989 Jan-Simon Pendry
|
||||
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@ -38,7 +38,7 @@
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* $Id: fsinfo.c,v 1.4 1999/02/04 07:24:44 ezk Exp $
|
||||
* $Id: fsinfo.c,v 1.5.2.2 2001/01/10 03:23:34 ezk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -196,7 +196,7 @@ Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\
|
||||
static char *
|
||||
find_username(void)
|
||||
{
|
||||
char *u = getlogin();
|
||||
const char *u = getlogin();
|
||||
|
||||
if (!u) {
|
||||
struct passwd *pw = getpwuid(getuid());
|
||||
@ -233,6 +233,7 @@ main(int argc, char *argv[])
|
||||
perror("gethostname");
|
||||
exit(1);
|
||||
}
|
||||
hostname[sizeof(hostname) - 1] = '\0';
|
||||
|
||||
/*
|
||||
* Get the username
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user