import latest am-utils.
This commit is contained in:
parent
96d6d8d8ac
commit
866a560342
|
@ -17,6 +17,11 @@ There is a mailing list dedicated to developers of am-utils. To subscribe
|
|||
to it, send mail to majordomo@majordomo.cs.columbia.edu, with the body of
|
||||
the message having the single line "subscribe amd-dev".
|
||||
|
||||
* Ion Badulescu <ion@cs.columbia.edu>
|
||||
|
||||
Co-maintainer of am-utils since late 1999: Linux and Solaris autofs support,
|
||||
Linux NFSv3 support, major code reorganization, etc...
|
||||
|
||||
* Randall S. Winchester <rsw@glue.umd.edu>
|
||||
|
||||
May 7, 1997: contributed a special version of upl102 that included NFS V.3
|
||||
|
@ -268,6 +273,7 @@ copies, and using cached copies if map failed to reload.
|
|||
* Peter Breitenlohner <peb@mppmu.mpg.de>
|
||||
July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and
|
||||
nis_isup mis-logic fixes.
|
||||
December 13, 2001: report typos in scripts/amd.conf.5.
|
||||
|
||||
* Dale Talcott <aeh@quest.cc.purdue.edu>
|
||||
July 26, 1999: added NFS3 support for AIX mounting.
|
||||
|
@ -311,3 +317,30 @@ February 1, 2001: important Linux NFS error number mapping fixed
|
|||
|
||||
* Ahmon Dancy <dancy@franz.com>
|
||||
February 9, 2001: Apple Rhapsody/Darwin/OS X port
|
||||
|
||||
* Sebastien Bahloul <sebastien.bahloul@mangoosta.fr>
|
||||
July 3, 2001: LDAP fixes and updates to support new APIs
|
||||
|
||||
March 27, 2002: LDAP bug and port to HPUX-11.
|
||||
|
||||
* Philippe Troin <phil@fifi.org>
|
||||
July 12, 2001: Proper handling of GNU getopt, support for optionally
|
||||
disabling LDAP/Hesiod, fixes for the dev/nodev option on Linux. Texi
|
||||
documentation fix.
|
||||
|
||||
November 28, 2001: Bug fix. Support "nolock" as an NFS option, not a
|
||||
generic mount option.
|
||||
|
||||
* Trond Myklebust <trond.myklebust@fys.uio.no>
|
||||
January 10, 2002: Proper initialization of the timeo parameter on Linux, TCP
|
||||
_must_ have a timeout 2 orders of magnitude larger than UDP
|
||||
|
||||
* George Ross <gdmr@dcs.ed.ac.uk>
|
||||
April 29, 2002: Rework of old code, support for wildcards in LDAP queries,
|
||||
and an FD leak fix. Amd -A support.
|
||||
|
||||
* Matthias Scheler <tron@zhadum.de>
|
||||
June 14, 2002: patch to use "xlatecookie" NFS mount option.
|
||||
|
||||
* Jun-ichiro itojun Hagino <itojun@iijlab.net>.
|
||||
June 11, 2002: minor fixes to support NetBSD 1.6A.
|
||||
|
|
|
@ -20,10 +20,20 @@ reliable as yp_all() which uses TCP, but it is better than hanging.
|
|||
(I have some reports that older version of hpux-9, with older libc, also
|
||||
leak file descriptors.)
|
||||
|
||||
[1C] SGI's MIPSpro C compiler on IRIX 6 has the unfortunate habit of
|
||||
creating code specificially for the machine it runs on. The ABI and ISA
|
||||
used depend very much on the OS version and compiler release used. This
|
||||
means that the resulting amd binary won't run on machines different from
|
||||
the build host, particularly older ones. Older versions of am-utils
|
||||
enforced the O32 ABI when compiling with cc to work around this, but this
|
||||
ABI is deprecated in favor of the N32 ABI now, so we use -n32 -mips3 to
|
||||
ensure that the binaries run on every host capable of running IRIX 6 at
|
||||
all. If this is not appropriate for you, configure with something like
|
||||
CC='cc -64' instead to get the desired ABI and ISA.
|
||||
|
||||
(2) alpha-unknown-linux-gnu (RedHat Linux 4.2)
|
||||
|
||||
hasmntopt(mnt, opt) can goes into an infinite loop if opt is any substring
|
||||
hasmntopt(mnt, opt) can go into an infinite loop if opt is any substring
|
||||
of mnt->mnt_opts. Redhat 5.0 does not have this libc bug. Here is an
|
||||
example program:
|
||||
|
||||
|
@ -139,9 +149,9 @@ 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.
|
||||
The user-level nfsd (2.2beta44) on older 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
|
||||
|
@ -150,13 +160,24 @@ 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.
|
||||
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. See http://www.am-utils.org/patches/.
|
||||
|
||||
Later 2.4.x kernels completely disallow the hack amd was using for direct
|
||||
mounts, so another solution will have to be found.
|
||||
|
||||
(12) *-aix5.1.0.0 and *-hpux9*
|
||||
|
||||
/bin/sh is broken and fails to run the configure script properly. You need
|
||||
to use /bin/ksh instead. The buildall script will do it for you; if for some
|
||||
reason you need to run configure directly, run it using 'ksh configure'
|
||||
instead of just 'configure'.
|
||||
|
||||
|
||||
Erez.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1997-2001 Erez Zadok
|
||||
Copyright (c) 1997-2002 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
|
@ -1,112 +1,24 @@
|
|||
# -*- text -*-
|
||||
am-utils 6.0 compatibility list
|
||||
am-utils 6.1 compatibility list
|
||||
|
||||
For each system, list if it autoconfigures, compiles, or runs. Fill in
|
||||
email id of person who confirms the fact. A missing entry means unverified.
|
||||
A 'no' or '!' means verified broken or nonexistent (static library).
|
||||
A 'no' or 'X' means verified broken or nonexistent (static library).
|
||||
|
||||
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
|
||||
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
|
||||
hppa2.0w-hp-hpux11.00 ezk ezk ezk ezk
|
||||
i386-pc-bsdi2.1 ezk ezk ezk !ezk
|
||||
i386-pc-bsdi3.0 ezk ezk ezk !ezk
|
||||
i386-pc-bsdi3.1 ezk ezk ezk !ezk
|
||||
i386-pc-bsdi4.0 ezk ezk ezk ezk
|
||||
i386-pc-bsdi4.0.1 ezk ezk ezk ezk
|
||||
i386-pc-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
|
||||
i386-unknown-freebsd2.1.0 ezk ezk ezk
|
||||
i386-unknown-freebsd2.2.1 ezk ezk ezk ezk
|
||||
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-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
|
||||
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
|
||||
i386-unknown-openbsd2.4 ezk ezk ezk ezk
|
||||
i386-unknown-openbsd2.5 ezk ezk ezk ezk
|
||||
i486-ncr-sysv4.3.03 ezk ezk ezk
|
||||
i486-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
|
||||
i486-pc-linux-gnulibc1 ezk ezk ezk ezk
|
||||
i486-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk
|
||||
i486-pc-linux-gnuoldld ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
|
||||
i586-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
|
||||
i586-pc-linux-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
|
||||
m68k-next-nextstep3 ezk ezk ezk !ezk
|
||||
m68k-sun-sunos4.1.1 ezk ezk !ezk
|
||||
mips-dec-ultrix4.3 ro ro ro
|
||||
mips-sgi-irix5.2
|
||||
mips-sgi-irix5.3 ezk ezk ezk ezk
|
||||
mips-sgi-irix6.2 ezk[1] ezk[1] ezk[1] ezk
|
||||
mips-sgi-irix6.4 ezk ezk ezk ezk
|
||||
mips-sgi-irix6.5 ezk ezk ezk
|
||||
powerpc-ibm-aix4.1.5.0 ezk ezk wpaul !ezk
|
||||
powerpc-ibm-aix4.2.1.0 ezk ezk ezk !ezk
|
||||
powerpc-ibm-aix4.3.1.0 ezk ezk !ezk
|
||||
powerpc-unknown-linux-gnu jose jose jose
|
||||
rs6000-ibm-aix3.2 ezk ezk ezk
|
||||
rs6000-ibm-aix3.2.5 ezk ezk ezk
|
||||
rs6000-ibm-aix4.1.4.0 ezk ezk !ezk
|
||||
rs6000-ibm-aix4.1.5.0 ezk ezk !ezk
|
||||
sparc-sun-solaris2.3 ezk ezk ezk ezk
|
||||
sparc-sun-solaris2.4 ezk ezk ezk ezk
|
||||
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
|
||||
sparc-sun-sunos4.1.3_U1 ezk ezk ezk ezk
|
||||
sparc-sun-sunos4.1.4 ezk ezk ezk ezk
|
||||
sparc-unknown-linux-gnulibc1 ezk ezk ezk ezk
|
||||
sparc-unknown-netbsd1.2E ezk ezk ezk
|
||||
sparc-unknown-netbsd1.2G ezk ezk ezk
|
||||
sparc64-unknown-linux-gnu ezk ezk ezk ezk
|
||||
SYSTEM CONFIG COMPILE RUN SHLIB AUTOFS
|
||||
========================= ======= ======= ======= ======= ======
|
||||
i386-pc-bsdi2.1 ion ion ion ion[X] ion[X]
|
||||
i386-pc-linux-rh6.2 ion ion ion ion ion
|
||||
i386-pc-linux-rh7.1 ion ion ion ion ion
|
||||
i386-pc-linux-rh7.2 ion ion ion ion ion
|
||||
i386-pc-linux-rh7.3 ion ion ion ion ion
|
||||
powerpc-ibm-aix5.1.0.0 ion ion ion ion[X] ion[1,2]
|
||||
sparc-sun-solaris2.5.1 ion ion ion ion ion[1]
|
||||
sparc-sun-solaris2.6 ion ion ion ion ion
|
||||
sparc-sun-solaris2.7 ion ion ion ion ion
|
||||
sparc-sun-solaris2.8 ion ion ion ion ion
|
||||
sparc-unknown-linux-rh62 ion ion ion ion ion
|
||||
sparc64-unknown-linux-rh62 ion ion ion ion ion
|
||||
|
||||
EMAIL ID LEGEND:
|
||||
|
||||
|
@ -114,6 +26,7 @@ bking: Bevis R W King <B.King@ee.surrey.ac.uk>
|
|||
dsr: Dan Riley <dsr@mail.lns.cornell.edu>
|
||||
ezk: Erez Zadok <ezk@cs.columbia.edu>
|
||||
finkel: Raphael Finkel <raphael@cs.uky.edu>
|
||||
ion: Ion Badulescu <ion@cs.columbia.edu>
|
||||
jose: Jose Nazario <jose@biocserver.BIOC.CWRU.Edu>
|
||||
nrh: Nick Hall <nrh@dcs.ed.ac.uk>
|
||||
ro: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
@ -123,42 +36,15 @@ wpaul: Bill Paul <wpaul@ctr.columbia.edu>
|
|||
|
||||
FOOTNOTES:
|
||||
|
||||
[1] If compiling with cc on Irix 6, then use
|
||||
[1] Due to limitations in the Sun autofs v1 protocol, some amd features
|
||||
cannot be properly supported. More precisely, trying to access a link mount
|
||||
pointing to another amd entry will result in failure and/or
|
||||
deadlock. Ordinary nfs and link mounts work well, however.
|
||||
|
||||
CC="cc -32 -Wl,-woff,84" ./buildall
|
||||
[2] AIX autofs appears to be a variant of the Sun autofs v1 protocol, but
|
||||
IBM don't provide any sort of documentation or even header files from it.
|
||||
It is currently unsupported; we may add some experimental support for it at
|
||||
some point, though it won't be pretty. Assistance from IBM-ers would be
|
||||
highly appreciated, hint hint.
|
||||
|
||||
to build (good) "old style" 32 bit code and suppress stupid linker warnings
|
||||
about unused libraries.
|
||||
|
||||
Also, to get NFS V3 working, you need these two patches from SGI:
|
||||
|
||||
patch 1615: NFS over TCP
|
||||
patch 2041: NFS roll-up patch
|
||||
|
||||
and then add "-p tcp" to /etc/config/nfsd.options.
|
||||
|
||||
[2] If compiling on Solaris 2.6, you need to add -D_LARGEFILE64_SOURCE to
|
||||
CFLAGS to enable the 64bit file offset interface:
|
||||
|
||||
make CFLAGS="-O2 -g -D_LARGEFILE64_SOURCE"
|
||||
|
||||
If you're using the standard configure script, it will add this flag for you
|
||||
automatically.
|
||||
|
||||
[3] DU-4.0 may not use NFS (server-side) V3 by default. You may need to
|
||||
adjust /etc/init.d/nfs, and change the nfsd startup line from to
|
||||
|
||||
if /usr/sbin/nfsd $NUM_NFSD; then
|
||||
to
|
||||
if /usr/sbin/nfsd -t 8 -u 8 ; then
|
||||
|
||||
[4] HPUX 9.X has a bad /bin/sh that runs out of fixed memory allocations.
|
||||
If you use the configure script, you must run it as
|
||||
|
||||
/bin/ksh ./configure
|
||||
|
||||
Also, this system has a bad /bin/make that cannot handle VPATH well. You
|
||||
cannot use --srcdir or the buildall script with it. I suggest you install
|
||||
GNU make or configure locally with "/bin/ksh ./configure".
|
||||
|
||||
Erez.
|
||||
Erez & Ion
|
||||
|
|
|
@ -5,7 +5,7 @@ Entered-date: 08SEP99
|
|||
Description: BSD Automounter Utilities
|
||||
Replaces the old amd-upl102. Offers NFS V3 support, many
|
||||
new features, and numerous ports. The home page for
|
||||
am-utils is in http://www.cs.columbia.edu/~ezk/am-utils/
|
||||
am-utils is in http://www.am-utils.org
|
||||
Keywords: amd amq hlfsd fsinfo wire-test fixmount mk-amd-map automount
|
||||
Author: ezk@cs.columbia.edu (Erez Zadok)
|
||||
Maintained-by: ezk@cs.columbia.edu (Erez Zadok)
|
||||
|
@ -13,7 +13,7 @@ Primary-site: shekel.mcl.cs.columbia.edu /pub/am-utils
|
|||
1.3MB am-utils-6.0.1.tar.gz
|
||||
1.3MB am-utils.tar.gz
|
||||
1.3MB am-utils-snapshot.tar.gz
|
||||
Alternate-site: http://www.cs.columbia.edu/~ezk/am-utils/mirrors.html
|
||||
Alternate-site: http://www.am-utils.org/mirrors.html
|
||||
Original-site: ftp.cs.columbia.edu /pub/amd
|
||||
Platforms: all modern Unix systems
|
||||
Copying-policy: BSD
|
||||
|
|
|
@ -22,7 +22,7 @@ U.S.A:
|
|||
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
|
||||
ftp://ftp.cise.ufl.edu/pub/mirrors/am-utils
|
||||
Maintainer: mirror@cise.ufl.edu
|
||||
|
||||
Europe:
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
# Level: Top level Makefile
|
||||
# Author: Erez Zadok
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SUBDIRS = \
|
||||
libamu \
|
||||
amd \
|
||||
|
@ -25,6 +27,7 @@ SUBDIRS = \
|
|||
# aux/aclocal
|
||||
EXTRA_DIST_AUX = \
|
||||
aux/GNUmakefile \
|
||||
aux/amdgrep \
|
||||
aux/amindent \
|
||||
aux/autopat \
|
||||
aux/chop-aclocal.pl \
|
||||
|
@ -39,12 +42,14 @@ EXTRA_DIST_AUX = \
|
|||
aux/macros/c_void_p.m4 \
|
||||
aux/macros/cache_check_dynamic.m4 \
|
||||
aux/macros/check_amu_fs.m4 \
|
||||
aux/macros/check_autofs_style.m4 \
|
||||
aux/macros/check_checkmount_style.m4 \
|
||||
aux/macros/check_extern.m4 \
|
||||
aux/macros/check_fhandle.m4 \
|
||||
aux/macros/check_field.m4 \
|
||||
aux/macros/check_fs_headers.m4 \
|
||||
aux/macros/check_fs_mntent.m4 \
|
||||
aux/macros/check_gnu_getopt.m4 \
|
||||
aux/macros/check_hide_mount_type.m4 \
|
||||
aux/macros/check_lib2.m4 \
|
||||
aux/macros/check_map_funcs.m4 \
|
||||
|
@ -81,13 +86,11 @@ EXTRA_DIST_AUX = \
|
|||
aux/macros/field_mntent_t_mnt_time_string.m4 \
|
||||
aux/macros/func_bad_memcmp.m4 \
|
||||
aux/macros/func_bad_yp_all.m4 \
|
||||
aux/macros/header_templates.m4 \
|
||||
aux/macros/host_macros.m4 \
|
||||
aux/macros/linux_headers.m4 \
|
||||
aux/macros/localconfig.m4 \
|
||||
aux/macros/mount_headers.m4 \
|
||||
aux/macros/msg.m4 \
|
||||
aux/macros/name_package.m4 \
|
||||
aux/macros/name_version.m4 \
|
||||
aux/macros/opt_amu_cflags.m4 \
|
||||
aux/macros/opt_cppflags.m4 \
|
||||
aux/macros/opt_debug.m4 \
|
||||
|
@ -96,6 +99,9 @@ EXTRA_DIST_AUX = \
|
|||
aux/macros/os_cflags.m4 \
|
||||
aux/macros/os_cppflags.m4 \
|
||||
aux/macros/os_ldflags.m4 \
|
||||
aux/macros/package_bugreport.m4 \
|
||||
aux/macros/package_name.m4 \
|
||||
aux/macros/package_version.m4 \
|
||||
aux/macros/save_state.m4 \
|
||||
aux/macros/struct_field_nfs_fh.m4 \
|
||||
aux/macros/struct_mntent.m4 \
|
||||
|
@ -123,9 +129,19 @@ EXTRA_DIST_AUX = \
|
|||
aux/macros/type_ufs_args.m4 \
|
||||
aux/macros/type_xdrproc_t.m4 \
|
||||
aux/macros/type_xfs_args.m4 \
|
||||
aux/macros/type_yp_order_outorder.m4
|
||||
aux/macros/type_yp_order_outorder.m4 \
|
||||
aux/macros/with_addon.m4
|
||||
|
||||
EXTRA_DIST_CONF = \
|
||||
conf/autofs/autofs_default.h \
|
||||
conf/autofs/autofs_default.c \
|
||||
conf/autofs/autofs_linux.h \
|
||||
conf/autofs/autofs_linux.c \
|
||||
conf/autofs/autofs_solaris_v1.h \
|
||||
conf/autofs/autofs_solaris_v1.c \
|
||||
conf/autofs/autofs_solaris_v2_v3.h \
|
||||
conf/autofs/autofs_solaris_v2_v3.c \
|
||||
\
|
||||
conf/checkmount/checkmount_aix.c \
|
||||
conf/checkmount/checkmount_bsd44.c \
|
||||
conf/checkmount/checkmount_default.c \
|
||||
|
@ -178,6 +194,7 @@ EXTRA_DIST_CONF = \
|
|||
conf/nfs_prot/nfs_prot_aix4.h \
|
||||
conf/nfs_prot/nfs_prot_aix4_2.h \
|
||||
conf/nfs_prot/nfs_prot_aix4_3.h \
|
||||
conf/nfs_prot/nfs_prot_aix5_1.h \
|
||||
conf/nfs_prot/nfs_prot_bsdi2.h \
|
||||
conf/nfs_prot/nfs_prot_bsdi3.h \
|
||||
conf/nfs_prot/nfs_prot_darwin.h \
|
||||
|
@ -197,7 +214,7 @@ EXTRA_DIST_CONF = \
|
|||
conf/nfs_prot/nfs_prot_openbsd.h \
|
||||
conf/nfs_prot/nfs_prot_osf2.h \
|
||||
conf/nfs_prot/nfs_prot_osf4.h \
|
||||
conf/nfs_prot/nfs_prot_osf5_1.h \
|
||||
conf/nfs_prot/nfs_prot_osf5.h \
|
||||
conf/nfs_prot/nfs_prot_sunos3.h \
|
||||
conf/nfs_prot/nfs_prot_sunos4.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_3.h \
|
||||
|
@ -261,11 +278,13 @@ EXTRA_DIST = \
|
|||
README.autofs \
|
||||
README.ldap \
|
||||
README.y2k \
|
||||
bootstrap \
|
||||
buildall \
|
||||
config.guess.long \
|
||||
depcomp \
|
||||
ldap-id.ms \
|
||||
ldap-id.txt \
|
||||
stamp-h.in \
|
||||
tasks
|
||||
|
||||
DISTCLEANFILES = amu_nfs_prot.h config.cache.old dbgcf.h
|
||||
|
@ -277,6 +296,7 @@ DISTCLEANFILES = amu_nfs_prot.h config.cache.old dbgcf.h
|
|||
update:
|
||||
(cd $(top_srcdir) && ${MAKE} ${MFLAGS} -f ./aux/GNUmakefile update)
|
||||
${MAKE} ${MFLAGS} libtool
|
||||
|
||||
# remake libtool
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
@ -288,10 +308,10 @@ install-snapshot:
|
|||
snap=`/bin/ls -1 am-utils*.tar.gz` && \
|
||||
echo COPYING SNAPSHOTS: $$snap && \
|
||||
cp -pu $$snap $(FTPTOP)/snapshots && \
|
||||
rm -f $(FTPTOP)/am-utils-snapshot.tar.gz && \
|
||||
ln -s snapshots/$$snap $(FTPTOP)/am-utils-snapshot.tar.gz && \
|
||||
(cd $(FTPTOP) && make) && \
|
||||
(cd $(FTPTOP)/snapshots && make)
|
||||
rm -f $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \
|
||||
ln -s snapshots/$$snap $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \
|
||||
(cd $(FTPTOP) && ${MAKE} ${MFLAGS}) && \
|
||||
(cd $(FTPTOP)/snapshots && ${MAKE} ${MFLAGS})
|
||||
test-snapshot: dist
|
||||
mv -f am-utils*.tar.gz /proj/bank/ftp/private/ezk
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,11 +11,12 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Package: am-utils
|
||||
# Level: Top level Makefile
|
||||
# Author: Erez Zadok
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
@ -35,13 +37,9 @@ infodir = @infodir@
|
|||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -50,11 +48,11 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
|
@ -65,32 +63,53 @@ host_alias = @host_alias@
|
|||
host_triplet = @host@
|
||||
AMD_FS_OBJS = @AMD_FS_OBJS@
|
||||
AMD_INFO_OBJS = @AMD_INFO_OBJS@
|
||||
AMTAR = @AMTAR@
|
||||
AMU_CFLAGS = @AMU_CFLAGS@
|
||||
AMU_LIB_OBJS = @AMU_LIB_OBJS@
|
||||
AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LEX = @LEX@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@
|
||||
LN_S = @LN_S@
|
||||
LTALLOCA = @LTALLOCA@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
am_utils_unmount_args = @am_utils_unmount_args@
|
||||
am_utils_unmount_call = @am_utils_unmount_call@
|
||||
install_sh = @install_sh@
|
||||
|
||||
SUBDIRS = libamu amd amq fixmount fsinfo hlfsd mk-amd-map wire-test scripts doc
|
||||
SUBDIRS = \
|
||||
libamu \
|
||||
amd \
|
||||
amq \
|
||||
\
|
||||
fixmount \
|
||||
fsinfo \
|
||||
hlfsd \
|
||||
mk-amd-map \
|
||||
wire-test \
|
||||
\
|
||||
scripts \
|
||||
doc
|
||||
|
||||
|
||||
# temporary tests override SUBDIRS
|
||||
|
@ -98,82 +117,349 @@ SUBDIRS = libamu amd amq fixmount fsinfo hlfsd mk-amd-map wire-te
|
|||
|
||||
# additional files to add to the distribution tar file
|
||||
# aux/aclocal
|
||||
EXTRA_DIST_AUX = aux/GNUmakefile aux/amindent aux/autopat aux/chop-aclocal.pl aux/copy-if-newbig aux/mk-aclocal aux/mkconf aux/rmtspc aux/update_build_version aux/macros/HEADER aux/macros/TRAILER aux/macros/c_void_p.m4 aux/macros/cache_check_dynamic.m4 aux/macros/check_amu_fs.m4 aux/macros/check_checkmount_style.m4 aux/macros/check_extern.m4 aux/macros/check_fhandle.m4 aux/macros/check_field.m4 aux/macros/check_fs_headers.m4 aux/macros/check_fs_mntent.m4 aux/macros/check_hide_mount_type.m4 aux/macros/check_lib2.m4 aux/macros/check_map_funcs.m4 aux/macros/check_mnt2_cdfs_opt.m4 aux/macros/check_mnt2_gen_opt.m4 aux/macros/check_mnt2_nfs_opt.m4 aux/macros/check_mnttab_file_name.m4 aux/macros/check_mnttab_location.m4 aux/macros/check_mnttab_opt.m4 aux/macros/check_mnttab_style.m4 aux/macros/check_mnttab_type.m4 aux/macros/check_mount_style.m4 aux/macros/check_mount_trap.m4 aux/macros/check_mount_type.m4 aux/macros/check_mtype_printf_type.m4 aux/macros/check_mtype_type.m4 aux/macros/check_network_transport_type.m4 aux/macros/check_nfs_fh_dref.m4 aux/macros/check_nfs_hn_dref.m4 aux/macros/check_nfs_prot_headers.m4 aux/macros/check_nfs_sa_dref.m4 aux/macros/check_nfs_socket_connection.m4 aux/macros/check_os_libs.m4 aux/macros/check_restartable_signal_handler.m4 aux/macros/check_umount_style.m4 aux/macros/check_unmount_args.m4 aux/macros/check_unmount_call.m4 aux/macros/expand_cpp_hex.m4 aux/macros/expand_cpp_int.m4 aux/macros/expand_cpp_string.m4 aux/macros/expand_run_string.m4 aux/macros/extern_optarg.m4 aux/macros/extern_sys_errlist.m4 aux/macros/field_mntent_t_mnt_time_string.m4 aux/macros/func_bad_memcmp.m4 aux/macros/func_bad_yp_all.m4 aux/macros/host_macros.m4 aux/macros/linux_headers.m4 aux/macros/localconfig.m4 aux/macros/mount_headers.m4 aux/macros/msg.m4 aux/macros/name_package.m4 aux/macros/name_version.m4 aux/macros/opt_amu_cflags.m4 aux/macros/opt_cppflags.m4 aux/macros/opt_debug.m4 aux/macros/opt_ldflags.m4 aux/macros/opt_libs.m4 aux/macros/os_cflags.m4 aux/macros/os_cppflags.m4 aux/macros/os_ldflags.m4 aux/macros/save_state.m4 aux/macros/struct_field_nfs_fh.m4 aux/macros/struct_mntent.m4 aux/macros/struct_mnttab.m4 aux/macros/struct_nfs_args.m4 aux/macros/struct_nfs_fh.m4 aux/macros/struct_nfs_fh3.m4 aux/macros/struct_nfs_gfs_mount.m4 aux/macros/try_compile_anyfs.m4 aux/macros/try_compile_nfs.m4 aux/macros/try_compile_rpc.m4 aux/macros/type_auth_create_gidlist.m4 aux/macros/type_autofs_args.m4 aux/macros/type_cachefs_args.m4 aux/macros/type_cdfs_args.m4 aux/macros/type_efs_args.m4 aux/macros/type_lofs_args.m4 aux/macros/type_mfs_args.m4 aux/macros/type_pcfs_args.m4 aux/macros/type_recvfrom_fromlen.m4 aux/macros/type_rfs_args.m4 aux/macros/type_svc_in_arg.m4 aux/macros/type_time_t.m4 aux/macros/type_tmpfs_args.m4 aux/macros/type_ufs_args.m4 aux/macros/type_xdrproc_t.m4 aux/macros/type_xfs_args.m4 aux/macros/type_yp_order_outorder.m4
|
||||
EXTRA_DIST_AUX = \
|
||||
aux/GNUmakefile \
|
||||
aux/amdgrep \
|
||||
aux/amindent \
|
||||
aux/autopat \
|
||||
aux/chop-aclocal.pl \
|
||||
aux/copy-if-newbig \
|
||||
aux/mk-aclocal \
|
||||
aux/mkconf \
|
||||
aux/rmtspc \
|
||||
aux/update_build_version \
|
||||
\
|
||||
aux/macros/HEADER \
|
||||
aux/macros/TRAILER \
|
||||
aux/macros/c_void_p.m4 \
|
||||
aux/macros/cache_check_dynamic.m4 \
|
||||
aux/macros/check_amu_fs.m4 \
|
||||
aux/macros/check_autofs_style.m4 \
|
||||
aux/macros/check_checkmount_style.m4 \
|
||||
aux/macros/check_extern.m4 \
|
||||
aux/macros/check_fhandle.m4 \
|
||||
aux/macros/check_field.m4 \
|
||||
aux/macros/check_fs_headers.m4 \
|
||||
aux/macros/check_fs_mntent.m4 \
|
||||
aux/macros/check_gnu_getopt.m4 \
|
||||
aux/macros/check_hide_mount_type.m4 \
|
||||
aux/macros/check_lib2.m4 \
|
||||
aux/macros/check_map_funcs.m4 \
|
||||
aux/macros/check_mnt2_cdfs_opt.m4 \
|
||||
aux/macros/check_mnt2_gen_opt.m4 \
|
||||
aux/macros/check_mnt2_nfs_opt.m4 \
|
||||
aux/macros/check_mnttab_file_name.m4 \
|
||||
aux/macros/check_mnttab_location.m4 \
|
||||
aux/macros/check_mnttab_opt.m4 \
|
||||
aux/macros/check_mnttab_style.m4 \
|
||||
aux/macros/check_mnttab_type.m4 \
|
||||
aux/macros/check_mount_style.m4 \
|
||||
aux/macros/check_mount_trap.m4 \
|
||||
aux/macros/check_mount_type.m4 \
|
||||
aux/macros/check_mtype_printf_type.m4 \
|
||||
aux/macros/check_mtype_type.m4 \
|
||||
aux/macros/check_network_transport_type.m4 \
|
||||
aux/macros/check_nfs_fh_dref.m4 \
|
||||
aux/macros/check_nfs_hn_dref.m4 \
|
||||
aux/macros/check_nfs_prot_headers.m4 \
|
||||
aux/macros/check_nfs_sa_dref.m4 \
|
||||
aux/macros/check_nfs_socket_connection.m4 \
|
||||
aux/macros/check_os_libs.m4 \
|
||||
aux/macros/check_restartable_signal_handler.m4 \
|
||||
aux/macros/check_umount_style.m4 \
|
||||
aux/macros/check_unmount_args.m4 \
|
||||
aux/macros/check_unmount_call.m4 \
|
||||
aux/macros/expand_cpp_hex.m4 \
|
||||
aux/macros/expand_cpp_int.m4 \
|
||||
aux/macros/expand_cpp_string.m4 \
|
||||
aux/macros/expand_run_string.m4 \
|
||||
aux/macros/extern_optarg.m4 \
|
||||
aux/macros/extern_sys_errlist.m4 \
|
||||
aux/macros/field_mntent_t_mnt_time_string.m4 \
|
||||
aux/macros/func_bad_memcmp.m4 \
|
||||
aux/macros/func_bad_yp_all.m4 \
|
||||
aux/macros/header_templates.m4 \
|
||||
aux/macros/host_macros.m4 \
|
||||
aux/macros/linux_headers.m4 \
|
||||
aux/macros/localconfig.m4 \
|
||||
aux/macros/mount_headers.m4 \
|
||||
aux/macros/opt_amu_cflags.m4 \
|
||||
aux/macros/opt_cppflags.m4 \
|
||||
aux/macros/opt_debug.m4 \
|
||||
aux/macros/opt_ldflags.m4 \
|
||||
aux/macros/opt_libs.m4 \
|
||||
aux/macros/os_cflags.m4 \
|
||||
aux/macros/os_cppflags.m4 \
|
||||
aux/macros/os_ldflags.m4 \
|
||||
aux/macros/package_bugreport.m4 \
|
||||
aux/macros/package_name.m4 \
|
||||
aux/macros/package_version.m4 \
|
||||
aux/macros/save_state.m4 \
|
||||
aux/macros/struct_field_nfs_fh.m4 \
|
||||
aux/macros/struct_mntent.m4 \
|
||||
aux/macros/struct_mnttab.m4 \
|
||||
aux/macros/struct_nfs_args.m4 \
|
||||
aux/macros/struct_nfs_fh.m4 \
|
||||
aux/macros/struct_nfs_fh3.m4 \
|
||||
aux/macros/struct_nfs_gfs_mount.m4 \
|
||||
aux/macros/try_compile_anyfs.m4 \
|
||||
aux/macros/try_compile_nfs.m4 \
|
||||
aux/macros/try_compile_rpc.m4 \
|
||||
aux/macros/type_auth_create_gidlist.m4 \
|
||||
aux/macros/type_autofs_args.m4 \
|
||||
aux/macros/type_cachefs_args.m4 \
|
||||
aux/macros/type_cdfs_args.m4 \
|
||||
aux/macros/type_efs_args.m4 \
|
||||
aux/macros/type_lofs_args.m4 \
|
||||
aux/macros/type_mfs_args.m4 \
|
||||
aux/macros/type_pcfs_args.m4 \
|
||||
aux/macros/type_recvfrom_fromlen.m4 \
|
||||
aux/macros/type_rfs_args.m4 \
|
||||
aux/macros/type_svc_in_arg.m4 \
|
||||
aux/macros/type_time_t.m4 \
|
||||
aux/macros/type_tmpfs_args.m4 \
|
||||
aux/macros/type_ufs_args.m4 \
|
||||
aux/macros/type_xdrproc_t.m4 \
|
||||
aux/macros/type_xfs_args.m4 \
|
||||
aux/macros/type_yp_order_outorder.m4 \
|
||||
aux/macros/with_addon.m4
|
||||
|
||||
|
||||
EXTRA_DIST_CONF = conf/checkmount/checkmount_aix.c conf/checkmount/checkmount_bsd44.c conf/checkmount/checkmount_default.c conf/checkmount/checkmount_osf.c conf/checkmount/checkmount_svr4.c conf/checkmount/checkmount_ultrix.c conf/fh_dref/fh_dref_aix3.h conf/fh_dref/fh_dref_aix42.h conf/fh_dref/fh_dref_bsd44.h conf/fh_dref/fh_dref_default.h conf/fh_dref/fh_dref_freebsd22.h conf/fh_dref/fh_dref_hpux.h conf/fh_dref/fh_dref_irix.h conf/fh_dref/fh_dref_isc3.h conf/fh_dref/fh_dref_linux.h conf/fh_dref/fh_dref_nextstep.h conf/fh_dref/fh_dref_osf2.h conf/fh_dref/fh_dref_osf4.h conf/fh_dref/fh_dref_sunos3.h conf/fh_dref/fh_dref_sunos4.h conf/fh_dref/fh_dref_svr4.h conf/hn_dref/hn_dref_default.h conf/hn_dref/hn_dref_isc3.h conf/hn_dref/hn_dref_linux.h conf/mount/mount_aix.c conf/mount/mount_bsdi3.c conf/mount/mount_default.c conf/mount/mount_hpux.c conf/mount/mount_irix5.c conf/mount/mount_irix6.c conf/mount/mount_isc3.c conf/mount/mount_linux.c conf/mount/mount_mach3.c conf/mount/mount_stellix.c conf/mount/mount_svr4.c conf/mtab/mtab_aix.c conf/mtab/mtab_bsd.c conf/mtab/mtab_file.c conf/mtab/mtab_isc3.c conf/mtab/mtab_mach3.c conf/mtab/mtab_osf.c conf/mtab/mtab_svr4.c conf/mtab/mtab_ultrix.c conf/nfs_prot/nfs_prot_aix3.h conf/nfs_prot/nfs_prot_aix4.h conf/nfs_prot/nfs_prot_aix4_2.h conf/nfs_prot/nfs_prot_aix4_3.h conf/nfs_prot/nfs_prot_bsdi2.h conf/nfs_prot/nfs_prot_bsdi3.h conf/nfs_prot/nfs_prot_darwin.h conf/nfs_prot/nfs_prot_default.h conf/nfs_prot/nfs_prot_freebsd2.h conf/nfs_prot/nfs_prot_freebsd3.h conf/nfs_prot/nfs_prot_hpux.h conf/nfs_prot/nfs_prot_hpux11.h conf/nfs_prot/nfs_prot_irix5.h conf/nfs_prot/nfs_prot_irix6.h conf/nfs_prot/nfs_prot_linux.h conf/nfs_prot/nfs_prot_ncr2.h conf/nfs_prot/nfs_prot_nextstep.h conf/nfs_prot/nfs_prot_netbsd.h conf/nfs_prot/nfs_prot_netbsd1_3.h conf/nfs_prot/nfs_prot_netbsd1_4.h conf/nfs_prot/nfs_prot_openbsd.h conf/nfs_prot/nfs_prot_osf2.h conf/nfs_prot/nfs_prot_osf4.h conf/nfs_prot/nfs_prot_osf5_1.h conf/nfs_prot/nfs_prot_sunos3.h conf/nfs_prot/nfs_prot_sunos4.h conf/nfs_prot/nfs_prot_sunos5_3.h conf/nfs_prot/nfs_prot_sunos5_4.h conf/nfs_prot/nfs_prot_sunos5_5.h conf/nfs_prot/nfs_prot_sunos5_6.h conf/nfs_prot/nfs_prot_sunos5_7.h conf/nfs_prot/nfs_prot_sunos5_8.h conf/nfs_prot/nfs_prot_svr4.h conf/nfs_prot/nfs_prot_ultrix.h conf/sa_dref/sa_dref_386bsd.h conf/sa_dref/sa_dref_aix3.h conf/sa_dref/sa_dref_aoi.h conf/sa_dref/sa_dref_bsd44.h conf/sa_dref/sa_dref_default.h conf/sa_dref/sa_dref_isc3.h conf/sa_dref/sa_dref_linux.h conf/sa_dref/sa_dref_svr4.h conf/transp/transp_sockets.c conf/transp/transp_tli.c conf/trap/trap_aix3.h conf/trap/trap_aux.h conf/trap/trap_default.h conf/trap/trap_dgux.h conf/trap/trap_hcx.h conf/trap/trap_hpux.h conf/trap/trap_irix.h conf/trap/trap_isc3.h conf/trap/trap_linux.h conf/trap/trap_mach3.h conf/trap/trap_news4.h conf/trap/trap_rtu6.h conf/trap/trap_stellix.h conf/trap/trap_svr4.h conf/trap/trap_ultrix.h conf/umount/umount_bsd44.c conf/umount/umount_default.c conf/umount/umount_osf.c
|
||||
EXTRA_DIST_CONF = \
|
||||
conf/autofs/autofs_default.h \
|
||||
conf/autofs/autofs_default.c \
|
||||
conf/autofs/autofs_linux.h \
|
||||
conf/autofs/autofs_linux.c \
|
||||
conf/autofs/autofs_solaris_v1.h \
|
||||
conf/autofs/autofs_solaris_v1.c \
|
||||
conf/autofs/autofs_solaris_v2_v3.h \
|
||||
conf/autofs/autofs_solaris_v2_v3.c \
|
||||
\
|
||||
conf/checkmount/checkmount_aix.c \
|
||||
conf/checkmount/checkmount_bsd44.c \
|
||||
conf/checkmount/checkmount_default.c \
|
||||
conf/checkmount/checkmount_osf.c \
|
||||
conf/checkmount/checkmount_svr4.c \
|
||||
conf/checkmount/checkmount_ultrix.c \
|
||||
\
|
||||
conf/fh_dref/fh_dref_aix3.h \
|
||||
conf/fh_dref/fh_dref_aix42.h \
|
||||
conf/fh_dref/fh_dref_bsd44.h \
|
||||
conf/fh_dref/fh_dref_default.h \
|
||||
conf/fh_dref/fh_dref_freebsd22.h \
|
||||
conf/fh_dref/fh_dref_hpux.h \
|
||||
conf/fh_dref/fh_dref_irix.h \
|
||||
conf/fh_dref/fh_dref_isc3.h \
|
||||
conf/fh_dref/fh_dref_linux.h \
|
||||
conf/fh_dref/fh_dref_nextstep.h \
|
||||
conf/fh_dref/fh_dref_osf2.h \
|
||||
conf/fh_dref/fh_dref_osf4.h \
|
||||
conf/fh_dref/fh_dref_sunos3.h \
|
||||
conf/fh_dref/fh_dref_sunos4.h \
|
||||
conf/fh_dref/fh_dref_svr4.h \
|
||||
\
|
||||
conf/hn_dref/hn_dref_default.h \
|
||||
conf/hn_dref/hn_dref_isc3.h \
|
||||
conf/hn_dref/hn_dref_linux.h \
|
||||
\
|
||||
conf/mount/mount_aix.c \
|
||||
conf/mount/mount_bsdi3.c \
|
||||
conf/mount/mount_default.c \
|
||||
conf/mount/mount_hpux.c \
|
||||
conf/mount/mount_irix5.c \
|
||||
conf/mount/mount_irix6.c \
|
||||
conf/mount/mount_isc3.c \
|
||||
conf/mount/mount_linux.c \
|
||||
conf/mount/mount_mach3.c \
|
||||
conf/mount/mount_stellix.c \
|
||||
conf/mount/mount_svr4.c \
|
||||
\
|
||||
conf/mtab/mtab_aix.c \
|
||||
conf/mtab/mtab_bsd.c \
|
||||
conf/mtab/mtab_file.c \
|
||||
conf/mtab/mtab_isc3.c \
|
||||
conf/mtab/mtab_mach3.c \
|
||||
conf/mtab/mtab_osf.c \
|
||||
conf/mtab/mtab_svr4.c \
|
||||
conf/mtab/mtab_ultrix.c \
|
||||
\
|
||||
conf/nfs_prot/nfs_prot_aix3.h \
|
||||
conf/nfs_prot/nfs_prot_aix4.h \
|
||||
conf/nfs_prot/nfs_prot_aix4_2.h \
|
||||
conf/nfs_prot/nfs_prot_aix4_3.h \
|
||||
conf/nfs_prot/nfs_prot_aix5_1.h \
|
||||
conf/nfs_prot/nfs_prot_bsdi2.h \
|
||||
conf/nfs_prot/nfs_prot_bsdi3.h \
|
||||
conf/nfs_prot/nfs_prot_darwin.h \
|
||||
conf/nfs_prot/nfs_prot_default.h \
|
||||
conf/nfs_prot/nfs_prot_freebsd2.h \
|
||||
conf/nfs_prot/nfs_prot_freebsd3.h \
|
||||
conf/nfs_prot/nfs_prot_hpux.h \
|
||||
conf/nfs_prot/nfs_prot_hpux11.h \
|
||||
conf/nfs_prot/nfs_prot_irix5.h \
|
||||
conf/nfs_prot/nfs_prot_irix6.h \
|
||||
conf/nfs_prot/nfs_prot_linux.h \
|
||||
conf/nfs_prot/nfs_prot_ncr2.h \
|
||||
conf/nfs_prot/nfs_prot_nextstep.h \
|
||||
conf/nfs_prot/nfs_prot_netbsd.h \
|
||||
conf/nfs_prot/nfs_prot_netbsd1_3.h \
|
||||
conf/nfs_prot/nfs_prot_netbsd1_4.h \
|
||||
conf/nfs_prot/nfs_prot_openbsd.h \
|
||||
conf/nfs_prot/nfs_prot_osf2.h \
|
||||
conf/nfs_prot/nfs_prot_osf4.h \
|
||||
conf/nfs_prot/nfs_prot_osf5.h \
|
||||
conf/nfs_prot/nfs_prot_sunos3.h \
|
||||
conf/nfs_prot/nfs_prot_sunos4.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_3.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_4.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_5.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_6.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_7.h \
|
||||
conf/nfs_prot/nfs_prot_sunos5_8.h \
|
||||
conf/nfs_prot/nfs_prot_svr4.h \
|
||||
conf/nfs_prot/nfs_prot_ultrix.h \
|
||||
\
|
||||
conf/sa_dref/sa_dref_386bsd.h \
|
||||
conf/sa_dref/sa_dref_aix3.h \
|
||||
conf/sa_dref/sa_dref_aoi.h \
|
||||
conf/sa_dref/sa_dref_bsd44.h \
|
||||
conf/sa_dref/sa_dref_default.h \
|
||||
conf/sa_dref/sa_dref_isc3.h \
|
||||
conf/sa_dref/sa_dref_linux.h \
|
||||
conf/sa_dref/sa_dref_svr4.h \
|
||||
\
|
||||
conf/transp/transp_sockets.c \
|
||||
conf/transp/transp_tli.c \
|
||||
\
|
||||
conf/trap/trap_aix3.h \
|
||||
conf/trap/trap_aux.h \
|
||||
conf/trap/trap_default.h \
|
||||
conf/trap/trap_dgux.h \
|
||||
conf/trap/trap_hcx.h \
|
||||
conf/trap/trap_hpux.h \
|
||||
conf/trap/trap_irix.h \
|
||||
conf/trap/trap_isc3.h \
|
||||
conf/trap/trap_linux.h \
|
||||
conf/trap/trap_mach3.h \
|
||||
conf/trap/trap_news4.h \
|
||||
conf/trap/trap_rtu6.h \
|
||||
conf/trap/trap_stellix.h \
|
||||
conf/trap/trap_svr4.h \
|
||||
conf/trap/trap_ultrix.h \
|
||||
\
|
||||
conf/umount/umount_bsd44.c \
|
||||
conf/umount/umount_default.c \
|
||||
conf/umount/umount_osf.c
|
||||
|
||||
|
||||
EXTRA_DIST_INCLUDE = include/am_compat.h include/am_utils.h include/am_xdr_func.h include/am_defs.h include/amq_defs.h include/mount_headers1.h include/mount_headers2.h
|
||||
EXTRA_DIST_INCLUDE = \
|
||||
include/am_compat.h \
|
||||
include/am_utils.h \
|
||||
include/am_xdr_func.h \
|
||||
include/am_defs.h \
|
||||
include/amq_defs.h \
|
||||
include/mount_headers1.h \
|
||||
include/mount_headers2.h
|
||||
|
||||
|
||||
EXTRA_DIST = $(EXTRA_DIST_AUX) $(EXTRA_DIST_CONF) $(EXTRA_DIST_INCLUDE) BUGS LSM.am-utils MIRRORS README.autofs README.ldap README.y2k buildall config.guess.long depcomp ldap-id.ms ldap-id.txt tasks
|
||||
EXTRA_DIST = \
|
||||
$(EXTRA_DIST_AUX) \
|
||||
$(EXTRA_DIST_CONF) \
|
||||
$(EXTRA_DIST_INCLUDE) \
|
||||
\
|
||||
BUGS \
|
||||
LSM.am-utils \
|
||||
MIRRORS \
|
||||
README.autofs \
|
||||
README.ldap \
|
||||
README.y2k \
|
||||
bootstrap \
|
||||
buildall \
|
||||
config.guess.long \
|
||||
depcomp \
|
||||
ldap-id.ms \
|
||||
ldap-id.txt \
|
||||
stamp-h.in \
|
||||
tasks
|
||||
|
||||
|
||||
DISTCLEANFILES = amu_nfs_prot.h config.cache.old dbgcf.h
|
||||
|
||||
# make a snapshots and put them in the ftp snapshots directory
|
||||
FTPTOP = /proj/bank/ftp/pub/am-utils
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = aux_conf.h
|
||||
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
|
||||
Makefile.am Makefile.in NEWS acconfig.h acinclude.m4 aclocal.m4 \
|
||||
aux_conf.h.in config.guess config.h.in config.sub configure \
|
||||
configure.in install-sh ltconfig ltmain.sh missing mkinstalldirs
|
||||
CONFIG_CLEAN_FILES = aux_conf.h
|
||||
depcomp =
|
||||
DIST_SOURCES =
|
||||
|
||||
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
||||
uninstall-info-recursive all-recursive install-data-recursive \
|
||||
install-exec-recursive installdirs-recursive install-recursive \
|
||||
uninstall-recursive check-recursive installcheck-recursive
|
||||
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
|
||||
Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 \
|
||||
aux_conf.h.in config.guess config.h.in config.sub configure \
|
||||
configure.in depcomp install-sh ltmain.sh missing mkinstalldirs
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
$(ACLOCAL_M4): configure.in acinclude.m4
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$@ $(SHELL) ./config.status
|
||||
|
||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): configure.in acinclude.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
config.h: stamp-h
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h stamp-hT
|
||||
@echo timestamp > stamp-hT 2> /dev/null
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h 2> /dev/null
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
|
||||
@mv stamp-hT stamp-h
|
||||
$(srcdir)/config.h.in: $(srcdir)/./stamp-h.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h.in; \
|
||||
rm -f $(srcdir)/./stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/./stamp-h.in; \
|
||||
else :; fi
|
||||
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
|
||||
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
|
||||
maintainer-clean-hdr:
|
||||
aux_conf.h: $(top_builddir)/config.status aux_conf.h.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
|
@ -181,12 +467,7 @@ aux_conf.h: $(top_builddir)/config.status aux_conf.h.in
|
|||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
|
@ -209,11 +490,16 @@ mostlyclean-recursive clean-recursive distclean-recursive \
|
|||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" = "." && dot_seen=yes; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
|
@ -232,91 +518,66 @@ tags-recursive:
|
|||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -fID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
|
||||
|| etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
maintainer-clean-tags:
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
# Avoid unsightly `./'.
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
GZIP_ENV = --best
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
$(mkinstalldirs) $(distdir)/aux $(distdir)/aux/macros \
|
||||
$(distdir)/conf/checkmount $(distdir)/conf/fh_dref \
|
||||
$(distdir)/conf/hn_dref $(distdir)/conf/mount \
|
||||
$(distdir)/conf/mtab $(distdir)/conf/nfs_prot \
|
||||
$(distdir)/conf/sa_dref $(distdir)/conf/transp \
|
||||
$(distdir)/conf/trap $(distdir)/conf/umount \
|
||||
$(distdir)/include
|
||||
$(mkinstalldirs) $(distdir)/. $(distdir)/aux $(distdir)/aux/macros $(distdir)/conf/autofs $(distdir)/conf/checkmount $(distdir)/conf/fh_dref $(distdir)/conf/hn_dref $(distdir)/conf/mount $(distdir)/conf/mtab $(distdir)/conf/nfs_prot $(distdir)/conf/sa_dref $(distdir)/conf/transp $(distdir)/conf/trap $(distdir)/conf/umount $(distdir)/include $(distdir)/scripts
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
|
@ -324,87 +585,147 @@ distdir: $(DISTFILES)
|
|||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" \
|
||||
distdir=../$(distdir)/$$subdir \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
|
||||
&& cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
||||
|| (echo "Error: files left after uninstall" 1>&2; \
|
||||
exit 1) ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
|
||||
&& rm -f $(distdir).tar.gz \
|
||||
&& (test `find . -type f -print | wc -l` -eq 0 \
|
||||
|| (echo "Error: files left after distclean" 1>&2; \
|
||||
exit 1) )
|
||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
install-exec-am:
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile config.h
|
||||
all-redirect: all-recursive-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status config.cache config.log
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
clean: clean-recursive
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status
|
||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-libtool clean-recursive dist dist-all \
|
||||
distcheck distclean distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-recursive distclean-tags distdir \
|
||||
dvi dvi-am dvi-recursive info info-am info-recursive install \
|
||||
install-am install-data install-data-am install-data-recursive \
|
||||
install-exec install-exec-am install-exec-recursive \
|
||||
install-info install-info-am install-info-recursive install-man \
|
||||
install-recursive install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am installdirs-recursive \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-info-recursive uninstall-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
install-data-recursive uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
##############################################################################
|
||||
# Personal maintainer rules by Erez Zadok
|
||||
|
@ -413,6 +734,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
|||
update:
|
||||
(cd $(top_srcdir) && ${MAKE} ${MFLAGS} -f ./aux/GNUmakefile update)
|
||||
${MAKE} ${MFLAGS} libtool
|
||||
|
||||
# remake libtool
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
@ -421,10 +743,10 @@ install-snapshot:
|
|||
snap=`/bin/ls -1 am-utils*.tar.gz` && \
|
||||
echo COPYING SNAPSHOTS: $$snap && \
|
||||
cp -pu $$snap $(FTPTOP)/snapshots && \
|
||||
rm -f $(FTPTOP)/am-utils-snapshot.tar.gz && \
|
||||
ln -s snapshots/$$snap $(FTPTOP)/am-utils-snapshot.tar.gz && \
|
||||
(cd $(FTPTOP) && make) && \
|
||||
(cd $(FTPTOP)/snapshots && make)
|
||||
rm -f $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \
|
||||
ln -s snapshots/$$snap $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \
|
||||
(cd $(FTPTOP) && ${MAKE} ${MFLAGS}) && \
|
||||
(cd $(FTPTOP)/snapshots && ${MAKE} ${MFLAGS})
|
||||
test-snapshot: dist
|
||||
mv -f am-utils*.tar.gz /proj/bank/ftp/private/ezk
|
||||
|
||||
|
@ -432,7 +754,6 @@ test-snapshot: dist
|
|||
dist-hook:
|
||||
@echo "Protecting distribution directories..."
|
||||
chmod -R go-w $(distdir)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -1,66 +1,120 @@
|
|||
# -*- text -*-
|
||||
|
||||
*** Notes specific to am-utils version 6.0.6:
|
||||
*** Notes specific to am-utils version 6.1b1
|
||||
|
||||
- new ports:
|
||||
Apple OS X support (Darwin, Rhapsody)
|
||||
- Major Autofs work
|
||||
Partial support for Sun Autofs v1
|
||||
Documented known problems with Sun Autofs v1 (possible deadlocks)
|
||||
Fixes for Sun Autofs v2/v3
|
||||
Preliminary support for Sun Autofs v4 (Solaris 9)
|
||||
Kernel-based expirations for Linux Autofs
|
||||
|
||||
- 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).
|
||||
- Minor new ports:
|
||||
powerpc-ibm-aix5.1.0.0
|
||||
i386-unknown-netbsd1.6A
|
||||
|
||||
- linux support for lofs and "bind" mounts, so type:=lofs can work (whether
|
||||
you're using autofs or not)
|
||||
- Work around IBM's NFSv3 ABI change in aix4.3
|
||||
|
||||
- renamed amd.conf option "selectors_on_default" to "selectors_in_defaults"
|
||||
(on -> in, and added "s"). Old name remains in place for compatibility.
|
||||
- trivial regression test suite started: run "make check" on a built
|
||||
am-utils to execute tests. Currently only one test which checks to see if
|
||||
"amd -v" executes correctly.
|
||||
|
||||
- lots of cleanups of debugging and logging messages
|
||||
- new command line option "amd -A arch" to overwrite the value of $arch.
|
||||
|
||||
- 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
|
||||
- bugs fixed:
|
||||
|
||||
*** Notes specific to am-utils version 6.0.5:
|
||||
* Linux loop mounts of ISO images
|
||||
* assorted LDAP fixes
|
||||
* strerror not found on some systems
|
||||
* small fixes for hpux9 and aix43
|
||||
* exclude ldap/hesiod support unless both libraries+headers exist
|
||||
* fully support "xlatecookie" mount option
|
||||
* security: if -D noamq option, don't listen on socket.
|
||||
|
||||
- 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
|
||||
*** Notes specific to am-utils version 6.1a5:
|
||||
|
||||
- Support new mount options:
|
||||
proplist (ACLs over NFS, DU-4.0)
|
||||
kerb, rdirplus, readdirsize, and xlatecookie (NetBSD-1.5K+)
|
||||
nonlm, lock, nolock (Linux)
|
||||
- browsable_dirs support for Solaris autofs, *without* mount storms!
|
||||
|
||||
- Don't force rsize/wsize on Linux 2.2.18+ and 2.4.x. Improves performance
|
||||
a lot.
|
||||
- new amd.conf global parameter: map_reload_interval (default 1 hour).
|
||||
Determines how often Amd checks to see if maps have changed at the source
|
||||
(and then reloading only those that have changed).
|
||||
|
||||
- Lots of documentation updates: texinfo, man pages, scripts, and more.
|
||||
- "amd -v" now lists bug-reporting address.
|
||||
|
||||
- LDAP: included proposed Schema and Internet Draft for LDAP Schema. See
|
||||
README.ldap for more information.
|
||||
- assorted code cleanups and porting to use latest versions of GNU
|
||||
Autotools.
|
||||
|
||||
- Removed all remains of the dangerous amq -M code.
|
||||
- opts:=loop works for type:=cdfs, for mounting ISO-9660 files on Linux.
|
||||
|
||||
- Major bug fix: initialize NFS fileid field correctly, to avoid cache
|
||||
aliasing problems, esp. on Linux.
|
||||
- bugs fixed:
|
||||
|
||||
- Major Linux bug fix: map errnos to NFS errors (mistakenly turned off a
|
||||
while back). Also support unused errno 41.
|
||||
* fixed sublink support in Linux autofs (broken in a4)
|
||||
* hlfsd takes uid 0's home from root's passwd entry instead of
|
||||
defaulting to '/'
|
||||
* (not really our bug) Linux ignores the microseconds field in
|
||||
mtime, so hlfsd and amd need to increment the seconds field all
|
||||
the time to prevent symlink caching
|
||||
* generic map parsing bug which was rejecting a numerical mount
|
||||
option if it was the last option in the string.
|
||||
* file descriptor leak in Linux autofs.
|
||||
* "nolock" is an NFS mount option, not a generic one.
|
||||
* use mlockall(2) on systems that have it, for plock=yes. Now
|
||||
pinning Amd's pages in memory works on Linux.
|
||||
* ctl-amd/ctl-hlfsd correctly refer to @sysconfdir@ for alternate
|
||||
location of configuration files.
|
||||
|
||||
- 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.1a4:
|
||||
|
||||
- full autofs support for Solaris 2.[67], including symlinks, sublinks and
|
||||
direct mounts
|
||||
|
||||
- fixed mount/umount deadlock in Linux autofs
|
||||
|
||||
- fixed sublinks in Linux autofs
|
||||
|
||||
- support for network/netmask pairs in the in_network() selector
|
||||
|
||||
- support disabling LDAP and Hesiod support using configure
|
||||
|
||||
- forward-ported all the fixes from the stable branch (MacOS X support,
|
||||
minor Linux fixes)
|
||||
|
||||
- bind-mount support for type==link and type==lofs with Linux 2.4+
|
||||
|
||||
- FiST lofs support under Linux (also in 6.0.6s2)
|
||||
|
||||
*** Notes specific to am-utils version 6.1a3:
|
||||
|
||||
- various things from the 6.0 branch:
|
||||
compile fixes for Linux 2.4-ac and 2.2.19pre+
|
||||
Darwin/Rhapsody/OS X support
|
||||
much reduced configure script (works around a bug in Darwin's cpp)
|
||||
|
||||
*** Notes specific to am-utils version 6.1a2:
|
||||
|
||||
- working autofs support for Solaris 2.[67], but incomplete
|
||||
|
||||
- forward-ported all the changes up to 6.0.5s2
|
||||
|
||||
- removed support for amq -M
|
||||
|
||||
- known bugs
|
||||
nfsx support is broken
|
||||
linux NFS codes fixes
|
||||
NFS cache aliasing fixes
|
||||
lots of stuff ported from 6.0 branch
|
||||
|
||||
*** Notes specific to am-utils version 6.1a1:
|
||||
|
||||
- working autofs (v3 and v4) support for Linux!
|
||||
|
||||
- forward-ported all the changes in 6.0.4s4
|
||||
|
||||
- bugs fixed
|
||||
client-side fail-over to NFSv2/UDP
|
||||
|
||||
- known bugs
|
||||
autofs v3 will probably break with host maps
|
||||
|
||||
*** Notes specific to am-utils version 6.0.4:
|
||||
|
||||
|
@ -470,7 +524,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
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ This is a manual method that will let you build in any directory outside the
|
|||
am-utils source tree. It requires that your "make" program understand
|
||||
VPATH. This can be used multiple times to build am-utils concurrently in
|
||||
multiple (but different) directories. In fact, the buildall script
|
||||
described above.
|
||||
described above does precisely that, using the A.* subdirectories.
|
||||
|
||||
(4) If you need to configure am-utils with extra libraries and/or headers,
|
||||
for example to add hesiod support, do so as follows:
|
||||
|
@ -83,12 +83,10 @@ or
|
|||
./buildall -K
|
||||
|
||||
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
|
||||
autoconf-2.50, automake-1.5, and libtool 1.4 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.
|
||||
automake. 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.
|
||||
|
@ -98,9 +96,9 @@ before. Let me know if you are having any problems with them. I fully
|
|||
expect, at least initially, to have to be the sole developers of the M4
|
||||
macros and let others concentrate on C sources.
|
||||
|
||||
[E] Report all bugs to amd-dev@majordomo.cs.columbia.edu. Avoid reporting
|
||||
to my personal email address. It is important to involve the whole list in
|
||||
bug fixes etc.
|
||||
[E] Report all bugs to amd-dev@cs.columbia.edu. Avoid reporting to my
|
||||
personal email address. It is important to involve the whole list in bug
|
||||
fixes etc.
|
||||
|
||||
Good luck.
|
||||
|
||||
|
|
|
@ -1,113 +1,160 @@
|
|||
# -*- text -*-
|
||||
# This file is README.autofs
|
||||
# am-utils-6.0
|
||||
# Erez Zadok <ezk@cs.columbia.edu>
|
||||
# am-utils-6.1
|
||||
# Erez Zadok <ezk@cs.columbia.edu> a.k.a. "The Lord of Darkness"
|
||||
#
|
||||
# modified by
|
||||
# Ion Badulescu <ib42@cs.columbia.edu> a.k.a. "The Autofs Master"
|
||||
|
||||
** General notes about the autofs support in am-utils
|
||||
|
||||
The autofs code in am-utils is VERY much pre-alpha quality!
|
||||
- The autofs code in am-utils is late-beta quality for Linux, beta quality for
|
||||
Solaris 2.5+ and non-working for all the other systems.
|
||||
|
||||
- Link, lofs, and nfs mount types work; the others should work, but are not
|
||||
tested.
|
||||
|
||||
* Caveats:
|
||||
|
||||
- amd acts as *both* /usr/lib/autofs/automountd and /usr/sbin/automount.
|
||||
There's no way to distinguish the two. When amd starts, it first registers
|
||||
itself as an autofs server (automountd), then parses its maps, and decides
|
||||
on which autofs type mounts to make (automount does that). After the autofs
|
||||
mounts are made, amd listens for RPCs from the kernel-based autofs, and acts
|
||||
upon them.
|
||||
- [this applies mostly to Solaris/Irix] Amd acts as *both* automountd and
|
||||
automount. There's no way to distinguish between the two. When amd starts,
|
||||
it first registers itself as an autofs server (automountd's job), then
|
||||
parses its own maps, and decides which autofs-type mounts to make
|
||||
(automount's job). After the autofs mounts are made, amd listens for
|
||||
requests from the kernel-based autofs, and acts upon them. Since there can
|
||||
be only one autofs listener on a system, this means that automountd and amd
|
||||
cannot run at the same time; nor can two amd's run at the same time if they
|
||||
are both using autofs mounts.
|
||||
|
||||
- I only tested it under Solaris 2.5.1 (sparc). Don't expect irix/linux
|
||||
autofs support any time soon. Also, the autofs API in Solaris 2.6 is very
|
||||
different from 2.5.1; for now, am-utils does not even compile in the autofs
|
||||
code in Solaris 2.6.
|
||||
- Linux support is available and fairly stable. Solaris 2.5+ support is
|
||||
newer and less tested, but seems pretty stable as well. Irix and HP-UX
|
||||
autofs support will probably be very easy once we get Solaris 2.5 to work,
|
||||
as they use the same protocol and almost identical data structures. AIX
|
||||
seems to be using the Solaris 2.5 protocol as well, but they don't provide
|
||||
any headers or documentation so getting autofs to work will be tricky at best.
|
||||
|
||||
- I did not test mixed autofs and normal amd mount points in the same
|
||||
amd.conf file, but it should work.
|
||||
- Killing amd can become a problem if there are active mounts. Since mounts
|
||||
are done "in place", we can't just unmount our mount points and go away. For
|
||||
now, amd simply tells the kernel that it is dying; we need to think this
|
||||
further. It would be nice to "take over" the old mountpoints, there is
|
||||
support for this in Solaris (due to is RPC nature) and is easy to add to
|
||||
the Linux kernel (an ioctl on the mountpoint).
|
||||
|
||||
- I tested it as a separate amd process, which registered under an alternate
|
||||
RPC number (300020). (The multiple amd-support available in a9 really saved
|
||||
the day.)
|
||||
- The Solaris 2.5 autofs protocol is NON-REENTRANT by design, and ignoring
|
||||
this limitation results in a DEADLOCK between the kernel and the
|
||||
daemon. This is a serious problem, although only for the lofs and link mount
|
||||
types. In other words, if the daemon is trying a lofs/link mount whose
|
||||
destination crosses an autofs mountpoint, it will trigger another autofs
|
||||
lookup which will deadlock inside the kernel -- because the kernel is
|
||||
waiting for the previous request to return. This is not even something
|
||||
specific to amd, Sun's own automountd has the exact same problem. Ctrl-C
|
||||
breaks the deadlock, so it's not fatal, but the lofs/link entry is in effect
|
||||
unusable.
|
||||
|
||||
- I did not test amd running autofs mounts while Sun's automounter is
|
||||
running. I don't expect the interaction between the two to be good for your
|
||||
health.
|
||||
* Solaris:
|
||||
|
||||
- Amd w/ autofs mounts will fight over the listener port with Sun's
|
||||
automounterd, so running both simultaneously is a really bad idea.
|
||||
|
||||
- Browsable_dirs is possible and implemented for Solaris 2.6+.
|
||||
|
||||
- Direct mounts are implemented and work correctly.
|
||||
|
||||
- Link mounts are implemented as symlinks on Solaris 2.6+, but are
|
||||
inefficient. The kernel seems to time them out immediately after receiving
|
||||
them, so each access to a symlink causes a call to userspace. Needless to
|
||||
say, this negates the whole point of using autofs. Automountd seems to
|
||||
always use lofs mounts instead of symlinks, we should probably do the same.
|
||||
|
||||
- Link mounts are implemented as lofs mounts on Solaris 2.5/2.5.1, subject to
|
||||
the limitation described in the caveats section above.
|
||||
|
||||
- Restarting autofs mounts is possible, but not yet implemented.
|
||||
|
||||
* Linux:
|
||||
|
||||
- Amd should work fine even when the Linux automounter is running, the
|
||||
mechanism being used prevents any kind of (evil) interaction between them.
|
||||
|
||||
- Browsing is not available if autofs support is used, due to limitations in
|
||||
the kernel-daemon protocol used by Linux 2.2 and 2.4. Only already-mounted
|
||||
nodes will appear in the autofs directory, and this is implemented entirely
|
||||
in the kernel.
|
||||
|
||||
- Host maps are supported with autofs4 (in Linux 2.3+). You need to add
|
||||
something like "alias autofs=autofs4" in /etc/modules.conf.
|
||||
|
||||
- Direct maps cannot be supported since there is no kernel support for them;
|
||||
we might be able to get something eventually, but don't hold your breath.
|
||||
If anything, we may do it using a regular NFS mountpoint and bind-mount on
|
||||
top of it.
|
||||
|
||||
- Inherit doesn't make much sense because we can't restart a hung autofs
|
||||
mount point, due to kernel limitations. This needs to be fixed in the
|
||||
Linux kernel; it's not particularly difficult, and we might provide a
|
||||
patch at some point.
|
||||
|
||||
- Link (and lofs) mounts will use the new bind-mount support in Linux
|
||||
2.4+. No more symlinks! And /bin/pwd works great too.
|
||||
|
||||
* amd.conf requirements:
|
||||
|
||||
To tell amd to use an autofs-style mount point and mounts for a map, turn on
|
||||
To tell amd to use an autofs-style mount point and mounts for a map, add
|
||||
|
||||
mount_type = autofs
|
||||
|
||||
in the map sections you wish.
|
||||
either to the global section, or to the sections of the individual maps you
|
||||
selected. Mixing autofs and normal amd mount points in the same amd.conf
|
||||
file *does* work.
|
||||
|
||||
* Map changes:
|
||||
|
||||
I used this sample map for testing autofs:
|
||||
|
||||
# /home map
|
||||
ezk -rhost:=shekel;opts:=rw,intr,bg,overlay;fs:=${path} \
|
||||
host!=shekel;type:=nfs;rfs:=/n/shekel/u/zing/${key} \
|
||||
host==shekel;type:=lofs;rfs:=/n/shekel/u/zing/${key}
|
||||
|
||||
Note that this implementation of autofs is still infant. Several important
|
||||
changes must be made to your maps to support autofs:
|
||||
|
||||
(1) you must supply the 'overlay' option to opts. Read the autofs paper to
|
||||
see why that is crucial, else you will hang amd!
|
||||
|
||||
(2) the 'fs' variable in the maps must point to the actual mount point
|
||||
inside the autofs/amd mount point, not to where the autodir was. That is
|
||||
because in-place mounts are done.
|
||||
|
||||
For example, in the past, /home/ezk would be a symlink to /n/shekel/u/zing,
|
||||
which is where shekel:/n/shekel/u/zing was mounted on. But now /home/ezk is
|
||||
a directory on which shekel:/n/shekel/u/zing is directly mounted upon.
|
||||
(Yes, this means that finally $PWD is the same as `/bin/pwd`.)
|
||||
No changes are necessary. If a map is marked as autofs in amd.conf, mounts
|
||||
are done "in place" and the "fs" parameter is ignored most of the time.
|
||||
|
||||
* Todo:
|
||||
|
||||
I'm looking for volunteers to improve the autofs code!
|
||||
We are looking for volunteers to improve the autofs code!
|
||||
|
||||
(1) These fixes are needed to avoid having to change amd maps:
|
||||
|
||||
- the overlay option should be turned on for autofs mounts automatically,
|
||||
without having to require it in the maps.
|
||||
|
||||
- the 'fs' variable should be ignored in the maps of type autofs. Rather,
|
||||
it should always be set to "/${path}".
|
||||
(1) These fixes are needed:
|
||||
|
||||
- when the mount type is 'link', transparently translate it into a loopback
|
||||
file system mount (lofs), that would mount in place, rather than supply a
|
||||
symlink instead.
|
||||
symlink, at least on systems whose autofs doesn't support symlinks. Linux
|
||||
does support symlinks, Solaris 2.6+ does too, but Solaris 2.5/2.5.1 doesn't
|
||||
and neither does Irix. Moreover, Sun's automountd always uses lofs for
|
||||
link mounts, even on 2.6+, because symlinks are not cached in the kernel and
|
||||
thus are not particularly efficient. [already done for Linux 2.4+ using bind
|
||||
mounts and for Solaris 2.5 using lofs mounts]
|
||||
|
||||
- complain if certain incompatible options (autofs and ...) are used. Direct
|
||||
maps on Linux is one such case of incompatible options. browsable_dirs on
|
||||
Linux is another such case.
|
||||
|
||||
- if amd is killed or dies, the autofs mounts will remain intact as required
|
||||
(your system is _not_ hung, yay!) However, if you restart amd, it will not
|
||||
(your system is _not_ hung, yay!). However, if you restart amd, it will not
|
||||
correctly 'restart' the autofs mounts as the Sun automounter does. Rather,
|
||||
it will cause another mount to happen, which leaves your /etc/mnttab
|
||||
cluttered with older mounts entries which cannot be unmounted.
|
||||
it might cause another mount to happen, which leaves your /etc/mnttab
|
||||
cluttered with older mounts entries which cannot be unmounted. It might also
|
||||
just pretend everything is ok, when in fact it isn't.
|
||||
|
||||
(2) Code expansion:
|
||||
|
||||
- (amd/ops_autofs.c) autofs_unmount_1_svc() is not implemented at all.
|
||||
- [Solaris only] implement the sockets version of amu_get_autofs_address()
|
||||
and create_autofs_service(), in conf/transp/transp_sockets.c. Not sure if
|
||||
it's necessary, Solaris it still biased towards TLI/STREAMS in userspace.
|
||||
|
||||
- autofs has many types of mount types which are not supported. Right now
|
||||
amd will assume a 'direct' mount. Types which are not supported are
|
||||
'indirect', 'offset', and 'multiple' or 'hierarchical'.
|
||||
|
||||
- implement the sockets version of amu_get_autofs_address() and
|
||||
create_autofs_service(), in conf/transp/transp_sockets.c.
|
||||
- [Linux only] support kernel-based expirations. Somewhat tricky, because
|
||||
the ioctl() needs to be called from a child process, otherwise we deadlock.
|
||||
|
||||
(3) Testing and porting to other systems:
|
||||
|
||||
- nothing has been tested on irix, which reportedly has a similar
|
||||
functioning autofs to Solaris'.
|
||||
- nothing has been tested on Irix, which reportedly has a similar
|
||||
functioning autofs to Solaris 2.5.1.
|
||||
|
||||
- no testing or even preliminary research was done to find out how to
|
||||
support linux autofs.
|
||||
- support for Linux autofs is fairly stable, we need testers!
|
||||
|
||||
- did not test the new and improved autofs in Solaris 2.6 either.
|
||||
|
||||
- did not test Solaris 2.5.1 on x86, or earlier versions of Solaris on
|
||||
either Sparc or x86.
|
||||
- support for Solaris 2.6+ is pretty stable, so we need testers for it, too!
|
||||
|
||||
- did not test any version of Solaris on x86. It will probably work, but you
|
||||
have been warned. Testers are welcome.
|
||||
|
|
|
@ -5,6 +5,10 @@ The current LDAP support for am-utils is for LDAPv2 only. Reportedly,
|
|||
small changes are needed to support LDAPv3. Volunteers and patches are
|
||||
welcome.
|
||||
|
||||
The IANA has assigned the following Private Enterprise Number to:
|
||||
|
||||
10180 Am-utils Organization Erez Zadok ezk@am-utils.org
|
||||
|
||||
There are two files in this directory that relate to LDAP:
|
||||
|
||||
ldap-id.txt:
|
||||
|
@ -23,3 +27,28 @@ ldap-id.ms:
|
|||
it, run "nroff -ms ldap-id.ms > ldap-id.txt"
|
||||
|
||||
Erez.
|
||||
|
||||
------- Forwarded Message
|
||||
|
||||
From: "IANA Private Enterprise Number" <iana-pen@icann.org>
|
||||
To: "Erez Zadok" <ezk@cs.columbia.edu>
|
||||
Subject: RE: Application for Enterprise-number (10180)
|
||||
Date: Sun, 15 Jul 2001 14:43:45 -0700
|
||||
|
||||
Dear Erez,
|
||||
|
||||
The IANA has assigned the following Private Enterprise
|
||||
Number to:
|
||||
|
||||
10180 Am-utils Organization Erez Zadok ezk@am-utils.org
|
||||
|
||||
Please notify the IANA if there is a change in your contact
|
||||
or company information.
|
||||
|
||||
Thank you,
|
||||
|
||||
Bill Huang
|
||||
IANA - Private Enterprise Numbers
|
||||
|
||||
------- End of Forwarded Message
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -9,6 +9,9 @@ sbin_PROGRAMS = amd
|
|||
# man pages
|
||||
man_MANS = amd.8
|
||||
|
||||
# test scripts
|
||||
TESTS = test1.sh
|
||||
|
||||
# headers this depends on, not to be installed
|
||||
noinst_HEADERS = amd.h
|
||||
|
||||
|
@ -16,6 +19,7 @@ noinst_HEADERS = amd.h
|
|||
# which will not generate the .h needs for the lex file from the yacc file.
|
||||
# I took out the conf .y/.l files b/c of bad interaction between bsd44 make
|
||||
# and automake-1.2 rules.
|
||||
# get_args.c is handled separately
|
||||
amd_SOURCES = \
|
||||
am_ops.c \
|
||||
amd.c \
|
||||
|
@ -37,7 +41,6 @@ amd_SOURCES = \
|
|||
autil.c \
|
||||
clock.c \
|
||||
conf.c \
|
||||
get_args.c \
|
||||
map.c \
|
||||
mapc.c \
|
||||
mntfs.c \
|
||||
|
@ -62,7 +65,6 @@ EXTRA_amd_SOURCES = \
|
|||
info_passwd.c \
|
||||
info_union.c \
|
||||
\
|
||||
ops_autofs.c \
|
||||
ops_cachefs.c \
|
||||
ops_cdfs.c \
|
||||
ops_efs.c \
|
||||
|
@ -77,19 +79,21 @@ EXTRA_amd_SOURCES = \
|
|||
ops_ufs.c \
|
||||
ops_umapfs.c \
|
||||
ops_unionfs.c \
|
||||
ops_xfs.c
|
||||
ops_xfs.c \
|
||||
\
|
||||
get_args.c
|
||||
|
||||
# AMD_FS_OBJS: a list of ops_*.o objects added, depending on which
|
||||
# filesystem types this system supports.
|
||||
# AMD_INFO_OBJS: a list of info_*.o objects added, depending on which map
|
||||
# types this system supports.
|
||||
EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ @AMD_INFO_OBJS@ conf_tok.o conf_parse.o
|
||||
LDADD = $(EXTRA_amd_OBJECTS) ../libamu/libamu.la
|
||||
LDADD = $(EXTRA_amd_OBJECTS) get_args.o ../libamu/libamu.la
|
||||
# must manually add f/lex library to LIBS, and not to LDADD.
|
||||
LIBS = @LIBS@ @LEXLIB@
|
||||
|
||||
# additional files to distribute and clean
|
||||
EXTRA_DIST = conf_tok.l conf_parse.y ops_TEMPLATE.c $(man_MANS)
|
||||
EXTRA_DIST = conf_tok.l conf_parse.y ops_TEMPLATE.c $(man_MANS) $(TESTS)
|
||||
CLEANFILES = conf_tok.c conf_parse.c conf_parse.h
|
||||
DISTCLEANFILES = build_version.h
|
||||
|
||||
|
@ -105,7 +109,7 @@ YFLAGS = -d
|
|||
$(PROGRAMS): $(LDADD)
|
||||
conf_tok.o: conf_parse.h
|
||||
get_args.o: build_version.h
|
||||
$(OBJECTS) $(EXTRA_amd_OBJECTS): \
|
||||
$(amd_OBJECTS) $(EXTRA_amd_OBJECTS): \
|
||||
../config.h \
|
||||
../aux_conf.h \
|
||||
$(top_srcdir)/include/am_compat.h \
|
||||
|
@ -129,13 +133,5 @@ conf_parse.c conf_parse.h: $(srcdir)/conf_parse.y
|
|||
mv y.tab.h conf_parse.h
|
||||
|
||||
# auto-generate build number
|
||||
build_version.h: $(amd_SOURCES) $(EXTRA_amd_SOURCES) \
|
||||
../config.h \
|
||||
../aux_conf.h \
|
||||
$(top_srcdir)/include/am_compat.h \
|
||||
$(top_srcdir)/include/am_defs.h \
|
||||
$(top_srcdir)/include/am_utils.h \
|
||||
$(top_srcdir)/include/amq_defs.h \
|
||||
@AMU_NFS_PROT_HEADER@ \
|
||||
$(noinst_HEADERS)
|
||||
build_version.h: $(OBJECTS) $(EXTRA_amd_OBJECTS) get_args.c
|
||||
$(top_srcdir)/aux/update_build_version
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,11 +11,12 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Package: am-utils
|
||||
# Level: Makefile for amd/ directory
|
||||
# Author: Erez Zadok
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
@ -35,13 +37,9 @@ infodir = @infodir@
|
|||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -50,11 +48,11 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
|
@ -65,34 +63,50 @@ host_alias = @host_alias@
|
|||
host_triplet = @host@
|
||||
AMD_FS_OBJS = @AMD_FS_OBJS@
|
||||
AMD_INFO_OBJS = @AMD_INFO_OBJS@
|
||||
AMTAR = @AMTAR@
|
||||
AMU_LIB_OBJS = @AMU_LIB_OBJS@
|
||||
AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LEX = @LEX@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@
|
||||
LN_S = @LN_S@
|
||||
LTALLOCA = @LTALLOCA@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
am_utils_unmount_args = @am_utils_unmount_args@
|
||||
am_utils_unmount_call = @am_utils_unmount_call@
|
||||
install_sh = @install_sh@
|
||||
|
||||
# allow users to add their own flags via "configure --enable-am-flags=ARG"
|
||||
AMU_CFLAGS = @AMU_CFLAGS@
|
||||
YACC = @YACC@
|
||||
|
||||
sbin_PROGRAMS = amd
|
||||
|
||||
# man pages
|
||||
man_MANS = amd.8
|
||||
|
||||
# test scripts
|
||||
TESTS = test1.sh
|
||||
|
||||
# headers this depends on, not to be installed
|
||||
noinst_HEADERS = amd.h
|
||||
|
||||
|
@ -100,11 +114,70 @@ noinst_HEADERS = amd.h
|
|||
# which will not generate the .h needs for the lex file from the yacc file.
|
||||
# I took out the conf .y/.l files b/c of bad interaction between bsd44 make
|
||||
# and automake-1.2 rules.
|
||||
amd_SOURCES = am_ops.c amd.c amfs_auto.c amfs_direct.c amfs_error.c amfs_host.c amfs_inherit.c amfs_link.c amfs_linkx.c amfs_nfsl.c amfs_nfsx.c amfs_program.c amfs_root.c amfs_toplvl.c amfs_union.c amq_subr.c amq_svc.c autil.c clock.c conf.c get_args.c map.c mapc.c mntfs.c nfs_prot_svc.c nfs_start.c nfs_subr.c opts.c restart.c rpc_fwd.c sched.c srvr_amfs_auto.c srvr_nfs.c
|
||||
# get_args.c is handled separately
|
||||
amd_SOURCES = \
|
||||
am_ops.c \
|
||||
amd.c \
|
||||
amfs_auto.c \
|
||||
amfs_direct.c \
|
||||
amfs_error.c \
|
||||
amfs_host.c \
|
||||
amfs_inherit.c \
|
||||
amfs_link.c \
|
||||
amfs_linkx.c \
|
||||
amfs_nfsl.c \
|
||||
amfs_nfsx.c \
|
||||
amfs_program.c \
|
||||
amfs_root.c \
|
||||
amfs_toplvl.c \
|
||||
amfs_union.c \
|
||||
amq_subr.c \
|
||||
amq_svc.c \
|
||||
autil.c \
|
||||
clock.c \
|
||||
conf.c \
|
||||
map.c \
|
||||
mapc.c \
|
||||
mntfs.c \
|
||||
nfs_prot_svc.c \
|
||||
nfs_start.c \
|
||||
nfs_subr.c \
|
||||
opts.c \
|
||||
restart.c \
|
||||
rpc_fwd.c \
|
||||
sched.c \
|
||||
srvr_amfs_auto.c \
|
||||
srvr_nfs.c
|
||||
|
||||
|
||||
# the complete list of all optional sources
|
||||
EXTRA_amd_SOURCES = info_file.c info_hesiod.c info_ldap.c info_ndbm.c info_nis.c info_nisplus.c info_passwd.c info_union.c ops_autofs.c ops_cachefs.c ops_cdfs.c ops_efs.c ops_lofs.c ops_mfs.c ops_nfs.c ops_nfs3.c ops_nullfs.c ops_pcfs.c ops_tfs.c ops_tmpfs.c ops_ufs.c ops_umapfs.c ops_unionfs.c ops_xfs.c
|
||||
EXTRA_amd_SOURCES = \
|
||||
info_file.c \
|
||||
info_hesiod.c \
|
||||
info_ldap.c \
|
||||
info_ndbm.c \
|
||||
info_nis.c \
|
||||
info_nisplus.c \
|
||||
info_passwd.c \
|
||||
info_union.c \
|
||||
\
|
||||
ops_cachefs.c \
|
||||
ops_cdfs.c \
|
||||
ops_efs.c \
|
||||
ops_lofs.c \
|
||||
ops_mfs.c \
|
||||
ops_nfs.c \
|
||||
ops_nfs3.c \
|
||||
ops_nullfs.c \
|
||||
ops_pcfs.c \
|
||||
ops_tfs.c \
|
||||
ops_tmpfs.c \
|
||||
ops_ufs.c \
|
||||
ops_umapfs.c \
|
||||
ops_unionfs.c \
|
||||
ops_xfs.c \
|
||||
\
|
||||
get_args.c
|
||||
|
||||
|
||||
# AMD_FS_OBJS: a list of ops_*.o objects added, depending on which
|
||||
|
@ -112,123 +185,67 @@ EXTRA_amd_SOURCES = info_file.c info_hesiod.c info_ldap.c info_ndbm.c info
|
|||
# AMD_INFO_OBJS: a list of info_*.o objects added, depending on which map
|
||||
# types this system supports.
|
||||
EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ @AMD_INFO_OBJS@ conf_tok.o conf_parse.o
|
||||
LDADD = $(EXTRA_amd_OBJECTS) ../libamu/libamu.la
|
||||
LDADD = $(EXTRA_amd_OBJECTS) get_args.o ../libamu/libamu.la
|
||||
# must manually add f/lex library to LIBS, and not to LDADD.
|
||||
LIBS = @LIBS@ @LEXLIB@
|
||||
|
||||
# additional files to distribute and clean
|
||||
EXTRA_DIST = conf_tok.l conf_parse.y ops_TEMPLATE.c $(man_MANS)
|
||||
EXTRA_DIST = conf_tok.l conf_parse.y ops_TEMPLATE.c $(man_MANS) $(TESTS)
|
||||
CLEANFILES = conf_tok.c conf_parse.c conf_parse.h
|
||||
DISTCLEANFILES = build_version.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
|
||||
# allow users to add their own flags via "configure --enable-am-flags=ARG"
|
||||
AMU_CFLAGS = @AMU_CFLAGS@
|
||||
CFLAGS = @CFLAGS@ $(AMU_CFLAGS)
|
||||
YACC = @YACC@
|
||||
YFLAGS = -d
|
||||
subdir = amd
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
sbin_PROGRAMS = amd$(EXEEXT)
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
|
||||
am_amd_OBJECTS = am_ops.$(OBJEXT) amd.$(OBJEXT) amfs_auto.$(OBJEXT) \
|
||||
amfs_direct.$(OBJEXT) amfs_error.$(OBJEXT) amfs_host.$(OBJEXT) \
|
||||
amfs_inherit.$(OBJEXT) amfs_link.$(OBJEXT) amfs_linkx.$(OBJEXT) \
|
||||
amfs_nfsl.$(OBJEXT) amfs_nfsx.$(OBJEXT) amfs_program.$(OBJEXT) \
|
||||
amfs_root.$(OBJEXT) amfs_toplvl.$(OBJEXT) amfs_union.$(OBJEXT) \
|
||||
amq_subr.$(OBJEXT) amq_svc.$(OBJEXT) autil.$(OBJEXT) \
|
||||
clock.$(OBJEXT) conf.$(OBJEXT) map.$(OBJEXT) mapc.$(OBJEXT) \
|
||||
mntfs.$(OBJEXT) nfs_prot_svc.$(OBJEXT) nfs_start.$(OBJEXT) \
|
||||
nfs_subr.$(OBJEXT) opts.$(OBJEXT) restart.$(OBJEXT) \
|
||||
rpc_fwd.$(OBJEXT) sched.$(OBJEXT) srvr_amfs_auto.$(OBJEXT) \
|
||||
srvr_nfs.$(OBJEXT)
|
||||
amd_OBJECTS = $(am_amd_OBJECTS)
|
||||
amd_LDADD = $(LDADD)
|
||||
amd_DEPENDENCIES = conf_tok.o conf_parse.o get_args.o \
|
||||
../libamu/libamu.la
|
||||
amd_LDFLAGS =
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
DEFS = @DEFS@
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
amd_OBJECTS = am_ops.o amd.o amfs_auto.o amfs_direct.o amfs_error.o \
|
||||
amfs_host.o amfs_inherit.o amfs_link.o amfs_linkx.o amfs_nfsl.o \
|
||||
amfs_nfsx.o amfs_program.o amfs_root.o amfs_toplvl.o amfs_union.o \
|
||||
amq_subr.o amq_svc.o autil.o clock.o conf.o get_args.o map.o mapc.o \
|
||||
mntfs.o nfs_prot_svc.o nfs_start.o nfs_subr.o opts.o restart.o \
|
||||
rpc_fwd.o sched.o srvr_amfs_auto.o srvr_nfs.o
|
||||
amd_LDADD = $(LDADD)
|
||||
amd_DEPENDENCIES = conf_tok.o conf_parse.o ../libamu/libamu.la
|
||||
amd_LDFLAGS =
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
depcomp =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
|
||||
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
man8dir = $(mandir)/man8
|
||||
MANS = $(man_MANS)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(amd_SOURCES) $(EXTRA_amd_SOURCES)
|
||||
|
||||
NROFF = nroff
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
MANS = $(man_MANS)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
|
||||
SOURCES = $(amd_SOURCES) $(EXTRA_amd_SOURCES)
|
||||
OBJECTS = $(amd_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps amd/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-sbinPROGRAMS:
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
|
||||
distclean-sbinPROGRAMS:
|
||||
|
||||
maintainer-clean-sbinPROGRAMS:
|
||||
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
@ -237,17 +254,65 @@ clean-libtool:
|
|||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps amd/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
maintainer-clean-libtool:
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(sbindir)/$$f; \
|
||||
done
|
||||
|
||||
amd: $(amd_OBJECTS) $(amd_DEPENDENCIES)
|
||||
@rm -f amd
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
amd$(EXEEXT): $(amd_OBJECTS) $(amd_DEPENDENCIES)
|
||||
@rm -f amd$(EXEEXT)
|
||||
$(LINK) $(amd_LDFLAGS) $(amd_OBJECTS) $(amd_LDADD) $(LIBS)
|
||||
|
||||
install-man8:
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.c.lo:
|
||||
$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
|
||||
uninstall-info-am:
|
||||
|
||||
man8dir = $(mandir)/man8
|
||||
install-man8: $(man8_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(man8dir)
|
||||
@list='$(man8_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
|
@ -257,14 +322,16 @@ install-man8:
|
|||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man8:
|
||||
@list='$(man8_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
|
@ -272,326 +339,211 @@ uninstall-man8:
|
|||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man8dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man8
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man8
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -fID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
maintainer-clean-tags:
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list='$(TESTS)'; \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*" $$tst "*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "XPASS: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
echo "PASS: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*" $$tst "*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
echo "XFAIL: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "FAIL: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="All $$all tests passed"; \
|
||||
else \
|
||||
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all tests failed"; \
|
||||
else \
|
||||
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0; \
|
||||
fi
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
subdir = amd
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
amd.o: amd.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
amfs_auto.o: amfs_auto.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_direct.o: amfs_direct.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_error.o: amfs_error.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_host.o: amfs_host.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_inherit.o: amfs_inherit.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_link.o: amfs_link.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_linkx.o: amfs_linkx.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_nfsl.o: amfs_nfsl.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_nfsx.o: amfs_nfsx.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_program.o: amfs_program.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_root.o: amfs_root.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_toplvl.o: amfs_toplvl.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amfs_union.o: amfs_union.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
am_ops.o: am_ops.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
amq_subr.o: amq_subr.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
amq_svc.o: amq_svc.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
autil.o: autil.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
clock.o: clock.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
conf.o: conf.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
conf_parse.o: conf_parse.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
conf_tok.o: conf_tok.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h conf_parse.h
|
||||
get_args.o: get_args.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h build_version.h
|
||||
info_file.o: info_file.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
info_ldap.o: info_ldap.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
info_ndbm.o: info_ndbm.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
info_nis.o: info_nis.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
info_nisplus.o: info_nisplus.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
info_passwd.o: info_passwd.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
info_union.o: info_union.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
mapc.o: mapc.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
map.o: map.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
mntfs.o: mntfs.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
nfs_prot_svc.o: nfs_prot_svc.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
nfs_start.o: nfs_start.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
nfs_subr.o: nfs_subr.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
ops_autofs.o: ops_autofs.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
ops_cdfs.o: ops_cdfs.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
ops_efs.o: ops_efs.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
ops_nfs3.o: ops_nfs3.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
ops_nfs.o: ops_nfs.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
ops_pcfs.o: ops_pcfs.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
ops_ufs.o: ops_ufs.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
opts.o: opts.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
restart.o: restart.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
rpc_fwd.o: rpc_fwd.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
sched.o: sched.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amd.h
|
||||
srvr_amfs_auto.o: srvr_amfs_auto.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
srvr_nfs.o: srvr_nfs.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amd.h
|
||||
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS)
|
||||
|
||||
install-data-am: install-man
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-sbinPROGRAMS uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-sbinPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-sbinPROGRAMS clean-compile clean-libtool clean-tags \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-sbinPROGRAMS distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-generic \
|
||||
clean-am
|
||||
-rm -f libtool
|
||||
clean-am: clean-generic clean-libtool clean-sbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-sbinPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man8
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS \
|
||||
clean-sbinPROGRAMS maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
|
||||
install-sbinPROGRAMS mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile mostlyclean-libtool \
|
||||
distclean-libtool clean-libtool maintainer-clean-libtool install-man8 \
|
||||
uninstall-man8 install-man uninstall-man tags mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man uninstall-sbinPROGRAMS
|
||||
|
||||
uninstall-man: uninstall-man8
|
||||
|
||||
.PHONY: GTAGS all all-am check check-TESTS check-am clean clean-generic \
|
||||
clean-libtool clean-sbinPROGRAMS distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-man8 install-sbinPROGRAMS \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
tags uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||
uninstall-man8 uninstall-sbinPROGRAMS
|
||||
|
||||
|
||||
# dependencies
|
||||
$(PROGRAMS): $(LDADD)
|
||||
conf_tok.o: conf_parse.h
|
||||
get_args.o: build_version.h
|
||||
$(OBJECTS) $(EXTRA_amd_OBJECTS): \
|
||||
$(amd_OBJECTS) $(EXTRA_amd_OBJECTS): \
|
||||
../config.h \
|
||||
../aux_conf.h \
|
||||
$(top_srcdir)/include/am_compat.h \
|
||||
|
@ -615,17 +567,8 @@ conf_parse.c conf_parse.h: $(srcdir)/conf_parse.y
|
|||
mv y.tab.h conf_parse.h
|
||||
|
||||
# auto-generate build number
|
||||
build_version.h: $(amd_SOURCES) $(EXTRA_amd_SOURCES) \
|
||||
../config.h \
|
||||
../aux_conf.h \
|
||||
$(top_srcdir)/include/am_compat.h \
|
||||
$(top_srcdir)/include/am_defs.h \
|
||||
$(top_srcdir)/include/am_utils.h \
|
||||
$(top_srcdir)/include/amq_defs.h \
|
||||
@AMU_NFS_PROT_HEADER@ \
|
||||
$(noinst_HEADERS)
|
||||
build_version.h: $(OBJECTS) $(EXTRA_amd_OBJECTS) get_args.c
|
||||
$(top_srcdir)/aux/update_build_version
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: am_ops.c,v 1.1.1.4 2001/05/13 17:50:11 veego Exp $ */
|
||||
/* $NetBSD: am_ops.c,v 1.1.1.5 2002/11/29 22:58:08 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: am_ops.c,v 1.6.2.3 2001/02/23 01:03:39 ezk Exp
|
||||
* Id: am_ops.c,v 1.14 2002/02/02 20:58:52 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -128,12 +127,11 @@ static am_ops *vops[] =
|
|||
#endif /* HAVE_FS_UMAPFS */
|
||||
|
||||
/*
|
||||
* These 5 should be last, in the order:
|
||||
* These 4 should be last, in the order:
|
||||
* (1) amfs_auto
|
||||
* (2) amfs_direct
|
||||
* (3) amfs_toplvl
|
||||
* (4) autofs
|
||||
* (5) amfs_error
|
||||
* (4) amfs_error
|
||||
*/
|
||||
#ifdef HAVE_AMU_FS_AUTO
|
||||
&amfs_auto_ops, /* Automounter F/S */
|
||||
|
@ -144,9 +142,6 @@ static am_ops *vops[] =
|
|||
#ifdef HAVE_AMU_FS_TOPLVL
|
||||
&amfs_toplvl_ops, /* top-level mount F/S */
|
||||
#endif /* HAVE_AMU_FS_TOPLVL */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
&autofs_ops, /* autofs mount F/S */
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
#ifdef HAVE_AMU_FS_ERROR
|
||||
&amfs_error_ops, /* error F/S */
|
||||
#endif /* HAVE_AMU_FS_ERROR */
|
||||
|
@ -443,6 +438,12 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize opt_mount_type to "nfs", if it's not initialized already
|
||||
*/
|
||||
if (!fo->opt_mount_type)
|
||||
fo->opt_mount_type = "nfs";
|
||||
|
||||
/*
|
||||
* Check the filesystem is happy
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amd.h,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: amd.h,v 1.1.1.5 2002/11/29 22:58:08 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amd.h,v 1.8.2.3 2001/04/07 00:47:41 ib42 Exp
|
||||
* Id: amd.h,v 1.26 2002/06/24 03:05:14 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -54,7 +53,7 @@
|
|||
|
||||
/* options for amd.conf */
|
||||
#define CFM_BROWSABLE_DIRS 0x0001
|
||||
#define CFM_MOUNT_TYPE_AUTOFS 0x0002
|
||||
#define CFM_MOUNT_TYPE_AUTOFS 0x0002 /* use kernel autofs support */
|
||||
#define CFM_SELECTORS_IN_DEFAULTS 0x0004
|
||||
#define CFM_NORMALIZE_HOSTNAMES 0x0008
|
||||
#define CFM_PROCESS_LOCK 0x0010
|
||||
|
@ -78,6 +77,7 @@
|
|||
|
||||
#define ereturn(x) { *error_return = x; return 0; }
|
||||
|
||||
#define NEVER (time_t) 0
|
||||
|
||||
/*
|
||||
* TYPEDEFS:
|
||||
|
@ -115,6 +115,7 @@ struct amu_global_options {
|
|||
char *pid_file; /* PID file */
|
||||
char *sub_domain; /* local domain */
|
||||
char *map_options; /* global map options */
|
||||
int map_reload_interval; /* map reload interval */
|
||||
char *map_type; /* global map type */
|
||||
char *search_path; /* search path for maps */
|
||||
char *mount_type; /* mount type for map */
|
||||
|
@ -198,18 +199,11 @@ struct mnt_map {
|
|||
* retry mechanism to resend the lookup request which can then be handled.
|
||||
*/
|
||||
struct continuation {
|
||||
char **ivec; /* Current mount info */
|
||||
am_node *mp; /* Node we are trying to mount */
|
||||
char *key; /* Map key */
|
||||
char *info; /* Info string */
|
||||
char **xivec; /* Saved strsplit vector */
|
||||
char *auto_opts; /* Automount options */
|
||||
am_opts fs_opts; /* Filesystem options */
|
||||
char *def_opts; /* Default automount options */
|
||||
int retry; /* Try again? */
|
||||
int tried; /* Have we tried any yet? */
|
||||
time_t start; /* Time we started this mount */
|
||||
int callout; /* Callout identifier */
|
||||
mntfs **mf; /* Current mntfs */
|
||||
};
|
||||
|
||||
|
||||
|
@ -230,33 +224,36 @@ extern voidp amqproc_null_1_svc(voidp argp, struct svc_req *rqstp);
|
|||
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_nfs_fh *get_root_nfs_fh(char *dir);
|
||||
extern am_node *find_ap(char *);
|
||||
extern am_node *find_ap2(char *, am_node *);
|
||||
extern am_node *get_ap_child(am_node *, char *);
|
||||
extern bool_t xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead);
|
||||
extern fserver *find_nfs_srvr(mntfs *mf);
|
||||
extern int auto_fmount(am_node *mp);
|
||||
extern int auto_fumount(am_node *mp);
|
||||
extern int mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *mf);
|
||||
extern int mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs, mntfs *mf);
|
||||
extern int process_last_regular_map(void);
|
||||
extern int set_conf_kv(const char *section, const char *k, const char *v);
|
||||
extern int try_mount(voidp mvp);
|
||||
extern int unmount_mp(am_node *mp);
|
||||
extern int yyparse (void);
|
||||
extern nfsentry *make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable);
|
||||
|
||||
extern void amfs_auto_cont(int rc, int term, voidp closure);
|
||||
extern void amfs_auto_mkcacheref(mntfs *mf);
|
||||
extern void amfs_auto_retry(int rc, int term, voidp closure);
|
||||
extern void amfs_auto_mounted(mntfs *mf);
|
||||
extern int mount_amfs_toplvl(mntfs *mf, char *opts);
|
||||
extern void assign_error_mntfs(am_node *mp);
|
||||
extern void flush_srvr_nfs_cache(void);
|
||||
extern void free_continuation(struct continuation *cp);
|
||||
extern void mf_mounted(mntfs *mf);
|
||||
extern void quick_reply(am_node *mp, int error);
|
||||
extern void nfs_quick_reply(am_node *mp, int error);
|
||||
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 *current_transp; /* For nfs_quick_reply() */
|
||||
extern char *conf_tag;
|
||||
extern char *opt_gid;
|
||||
extern char *opt_uid;
|
||||
|
@ -276,7 +273,8 @@ extern sigset_t masked_sigs;
|
|||
|
||||
#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);
|
||||
extern int amfs_link_mount(am_node *mp, mntfs *mf);
|
||||
extern int amfs_link_umount(am_node *mp, mntfs *mf);
|
||||
#endif /* defined(HAVE_AMU_FS_LINK) || defined(HAVE_AMU_FS_LINKX) */
|
||||
|
||||
#ifdef HAVE_AMU_FS_NFSL
|
||||
|
@ -288,16 +286,24 @@ extern bool_t xdr_mountres3(XDR *xdrs, mountres3 *objp);
|
|||
#endif /* defined(HAVE_FS_NFS3) && !defined(HAVE_XDR_MOUNTRES3) */
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
extern SVCXPRT *autofsxprt;
|
||||
extern u_short autofs_port;
|
||||
extern int amd_use_autofs;
|
||||
|
||||
extern int autofs_mount(am_node *mp);
|
||||
extern int autofs_umount(am_node *mp);
|
||||
extern int create_autofs_service(int *soAUTOFSp, u_short *autofs_portp, SVCXPRT **autofs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp));
|
||||
extern int svc_create_local_service(void (*dispatch) (), u_long prognum, u_long versnum, char *nettype, char *servname);
|
||||
extern void autofs_mounted(mntfs *mf);
|
||||
extern void autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp);
|
||||
extern autofs_fh_t *autofs_get_fh(am_node *mp);
|
||||
extern void autofs_release_fh(autofs_fh_t *fh);
|
||||
extern void autofs_add_fdset(fd_set *readfds);
|
||||
extern int autofs_handle_fdset(fd_set *readfds, int nsel);
|
||||
extern void autofs_mounted(am_node *mp);
|
||||
extern void autofs_mount_succeeded(am_node *mp);
|
||||
extern void autofs_mount_failed(am_node *mp);
|
||||
extern int autofs_umount_succeeded(am_node *mp);
|
||||
extern int autofs_umount_failed(am_node *mp);
|
||||
extern void autofs_get_opts(char *opts, autofs_fh_t *fh);
|
||||
extern int autofs_link_mount(am_node *mp);
|
||||
extern int autofs_link_umount(am_node *mp);
|
||||
extern int autofs_compute_mount_flags(mntent_t *);
|
||||
extern void autofs_timeout_mp(am_node *);
|
||||
extern int create_autofs_service(void);
|
||||
extern int destroy_autofs_service(void);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/* Unix file system (irix) */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_direct.c,v 1.1.1.4 2001/05/13 17:50:11 veego Exp $ */
|
||||
/* $NetBSD: amfs_direct.c,v 1.1.1.5 2002/11/29 22:58:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_direct.c,v 1.3.2.1 2001/01/10 03:23:00 ezk Exp
|
||||
* Id: amfs_direct.c,v 1.14 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -68,16 +67,18 @@ am_ops amfs_direct_ops =
|
|||
amfs_auto_match,
|
||||
0, /* amfs_direct_init */
|
||||
amfs_toplvl_mount,
|
||||
0,
|
||||
amfs_toplvl_umount,
|
||||
0,
|
||||
amfs_error_lookuppn,
|
||||
amfs_auto_lookup_child,
|
||||
amfs_auto_mount_child,
|
||||
amfs_error_readdir,
|
||||
amfs_direct_readlink,
|
||||
amfs_toplvl_mounted,
|
||||
amfs_auto_mounted,
|
||||
0, /* amfs_auto_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO
|
||||
FS_DIRECT | FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS,
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_DIRECT_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -95,7 +96,9 @@ amfs_direct_readlink(am_node *mp, int *error_return)
|
|||
if (!xp) {
|
||||
if (!mp->am_mnt->mf_private)
|
||||
amfs_auto_mkcacheref(mp->am_mnt); /* XXX */
|
||||
xp = amfs_auto_lookuppn(mp, mp->am_path + 1, &rc, VLOOK_CREATE);
|
||||
xp = amfs_auto_lookup_child(mp, mp->am_path + 1, &rc, VLOOK_CREATE);
|
||||
if (xp && rc < 0)
|
||||
xp = amfs_auto_mount_child(xp, &rc);
|
||||
}
|
||||
if (xp) {
|
||||
new_ttl(xp); /* (7/12/89) from Rein Tollevik */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_error.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_error.c,v 1.1.1.5 2002/11/29 22:58:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_error.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp
|
||||
* Id: amfs_error.c,v 1.12 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -59,9 +58,8 @@
|
|||
#include <amd.h>
|
||||
|
||||
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);
|
||||
static int amfs_error_mount(am_node *am, mntfs *mf);
|
||||
static int amfs_error_umount(am_node *am, mntfs *mf);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -72,17 +70,19 @@ am_ops amfs_error_ops =
|
|||
"error",
|
||||
amfs_error_match,
|
||||
0, /* amfs_error_init */
|
||||
amfs_auto_fmount,
|
||||
amfs_error_fmount,
|
||||
amfs_auto_fumount,
|
||||
amfs_error_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_error_mount,
|
||||
amfs_error_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_error_readlink */
|
||||
0, /* amfs_error_mounted */
|
||||
amfs_error_umounted,
|
||||
0, /* amfs_error_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_DISCARD
|
||||
FS_DISCARD, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_ERROR_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -98,14 +98,14 @@ amfs_error_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
amfs_error_fmount(mntfs *mf)
|
||||
amfs_error_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
amfs_error_fumount(mntfs *mf)
|
||||
amfs_error_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* Always succeed
|
||||
|
@ -120,7 +120,20 @@ amfs_error_fumount(mntfs *mf)
|
|||
* If we do then just give an error.
|
||||
*/
|
||||
am_node *
|
||||
amfs_error_lookuppn(am_node *mp, char *fname, int *error_return, int op)
|
||||
amfs_error_lookup_child(am_node *mp, char *fname, int *error_return, int op)
|
||||
{
|
||||
*error_return = ESTALE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* EFS interface to RPC lookup() routine.
|
||||
* Should never get here in the automounter.
|
||||
* If we do then just give an error.
|
||||
*/
|
||||
am_node *
|
||||
amfs_error_mount_child(am_node *ap, int *error_return)
|
||||
{
|
||||
*error_return = ESTALE;
|
||||
return 0;
|
||||
|
@ -137,16 +150,3 @@ amfs_error_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep,
|
|||
{
|
||||
return ESTALE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* umounted() callback for EFS.
|
||||
*
|
||||
* This prevents core-dumps on callbacks to error file-systems from
|
||||
* nfsx_fumount.
|
||||
*/
|
||||
static void
|
||||
amfs_error_umounted(am_node *mp)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_host.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_host.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_host.c,v 1.4.2.3 2001/04/14 21:08:20 ezk Exp
|
||||
* Id: amfs_host.c,v 1.17 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -59,10 +58,10 @@
|
|||
#include <amd.h>
|
||||
|
||||
static char *amfs_host_match(am_opts *fo);
|
||||
static int amfs_host_fmount(mntfs *mf);
|
||||
static int amfs_host_fumount(mntfs *mf);
|
||||
static int amfs_host_mount(am_node *am, mntfs *mf);
|
||||
static int amfs_host_umount(am_node *am, mntfs *mf);
|
||||
static int amfs_host_init(mntfs *mf);
|
||||
static void amfs_host_umounted(am_node *mp);
|
||||
static void amfs_host_umounted(mntfs *mf);
|
||||
|
||||
/*
|
||||
* Ops structure
|
||||
|
@ -72,17 +71,19 @@ am_ops amfs_host_ops =
|
|||
"host",
|
||||
amfs_host_match,
|
||||
amfs_host_init,
|
||||
amfs_auto_fmount,
|
||||
amfs_host_fmount,
|
||||
amfs_auto_fumount,
|
||||
amfs_host_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_host_mount,
|
||||
amfs_host_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_host_readlink */
|
||||
0, /* amfs_host_mounted */
|
||||
amfs_host_umounted,
|
||||
find_nfs_srvr,
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS,
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_HOST_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -97,21 +98,21 @@ am_ops amfs_host_ops =
|
|||
* allows the entire PC disk to be mounted.
|
||||
*/
|
||||
static void
|
||||
make_mntpt(char *mntpt, const exports ex, const mntfs *mf)
|
||||
make_mntpt(char *mntpt, const exports ex, const char *mf_mount)
|
||||
{
|
||||
if (ex->ex_dir[0] == '/') {
|
||||
if (ex->ex_dir[1] == 0)
|
||||
strcpy(mntpt, (mf)->mf_mount);
|
||||
strcpy(mntpt, mf_mount);
|
||||
else
|
||||
sprintf(mntpt, "%s%s", mf->mf_mount, ex->ex_dir);
|
||||
sprintf(mntpt, "%s%s", mf_mount, ex->ex_dir);
|
||||
} else if (ex->ex_dir[0] >= 'a' &&
|
||||
ex->ex_dir[0] <= 'z' &&
|
||||
ex->ex_dir[1] == ':' &&
|
||||
ex->ex_dir[2] == '/' &&
|
||||
ex->ex_dir[3] == 0)
|
||||
sprintf(mntpt, "%s/%c%%", mf->mf_mount, ex->ex_dir[0]);
|
||||
sprintf(mntpt, "%s/%c%%", mf_mount, ex->ex_dir[0]);
|
||||
else
|
||||
sprintf(mntpt, "%s/%s", mf->mf_mount, ex->ex_dir);
|
||||
sprintf(mntpt, "%s/%s", mf_mount, ex->ex_dir);
|
||||
}
|
||||
|
||||
|
||||
|
@ -174,21 +175,19 @@ amfs_host_init(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
do_mount(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *mf)
|
||||
do_mount(am_nfs_handle_t *fhp, char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs, mntfs *mf)
|
||||
{
|
||||
struct stat stb;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("amfs_host: mounting fs %s on %s\n", fs_name, dir);
|
||||
#endif /* DEBUG */
|
||||
dlog("amfs_host: mounting fs %s on %s\n", fs_name, mntdir);
|
||||
|
||||
(void) mkdirs(dir, 0555);
|
||||
if (stat(dir, &stb) < 0 || (stb.st_mode & S_IFMT) != S_IFDIR) {
|
||||
plog(XLOG_ERROR, "No mount point for %s - skipping", dir);
|
||||
(void) mkdirs(real_mntdir, 0555);
|
||||
if (stat(real_mntdir, &stb) < 0 || (stb.st_mode & S_IFMT) != S_IFDIR) {
|
||||
plog(XLOG_ERROR, "No mount point for %s - skipping", mntdir);
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
return mount_nfs_fh(fhp, dir, fs_name, opts, mf);
|
||||
return mount_nfs_fh(fhp, mntdir, real_mntdir, fs_name, opts, on_autofs, mf);
|
||||
}
|
||||
|
||||
|
||||
|
@ -217,9 +216,7 @@ fetch_fhandle(CLIENT *client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versio
|
|||
tv.tv_sec = 20;
|
||||
tv.tv_usec = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Fetching fhandle for %s", dir);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Call the mount daemon on the remote host to
|
||||
|
@ -243,9 +240,7 @@ fetch_fhandle(CLIENT *client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versio
|
|||
}
|
||||
/* Check the status of the filehandle */
|
||||
if ((errno = fhp->v3.fhs_status)) {
|
||||
#ifdef DEBUG
|
||||
dlog("fhandle fetch for mount version 3 failed: %m");
|
||||
#endif /* DEBUG */
|
||||
return errno;
|
||||
}
|
||||
} else { /* not NFS_VERSION3 mount */
|
||||
|
@ -264,9 +259,7 @@ fetch_fhandle(CLIENT *client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versio
|
|||
/* Check status of filehandle */
|
||||
if (fhp->v2.fhs_status) {
|
||||
errno = fhp->v2.fhs_status;
|
||||
#ifdef DEBUG
|
||||
dlog("fhandle fetch for mount version 1 failed: %m");
|
||||
#endif /* DEBUG */
|
||||
return errno;
|
||||
}
|
||||
#ifdef HAVE_FS_NFS3
|
||||
|
@ -293,11 +286,8 @@ already_mounted(mntlist *mlist, char *dir)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Mount the export tree from a host
|
||||
*/
|
||||
static int
|
||||
amfs_host_fmount(mntfs *mf)
|
||||
amfs_host_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
struct timeval tv2;
|
||||
CLIENT *client;
|
||||
|
@ -314,7 +304,7 @@ amfs_host_fmount(mntfs *mf)
|
|||
int ok = FALSE;
|
||||
mntlist *mlist;
|
||||
char fs_name[MAXPATHLEN], *rfs_dir;
|
||||
char mntpt[MAXPATHLEN];
|
||||
char mntpt[MAXPATHLEN], real_mntpt[MAXPATHLEN];
|
||||
struct timeval tv;
|
||||
u_long mnt_version;
|
||||
|
||||
|
@ -336,7 +326,7 @@ amfs_host_fmount(mntfs *mf)
|
|||
*/
|
||||
host = mf->mf_server->fs_host;
|
||||
sin = *mf->mf_server->fs_ip;
|
||||
plog(XLOG_INFO, "amfs_host_fmount: NFS version %d", (int) mf->mf_server->fs_version);
|
||||
plog(XLOG_INFO, "amfs_host_mount: NFS version %d", (int) mf->mf_server->fs_version);
|
||||
#ifdef HAVE_FS_NFS3
|
||||
if (mf->mf_server->fs_version == NFS_VERSION3)
|
||||
mnt_version = MOUNTVERS3;
|
||||
|
@ -376,9 +366,7 @@ amfs_host_fmount(mntfs *mf)
|
|||
}
|
||||
client->cl_auth = nfs_auth;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Fetching export list from %s", host);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Fetch the export list
|
||||
|
@ -394,7 +382,7 @@ amfs_host_fmount(mntfs *mf)
|
|||
tv2);
|
||||
if (clnt_stat != RPC_SUCCESS) {
|
||||
const char *msg = clnt_sperrno(clnt_stat);
|
||||
plog(XLOG_ERROR, "host_fmount rpc failed: %s", msg);
|
||||
plog(XLOG_ERROR, "host_mount rpc failed: %s", msg);
|
||||
/* clnt_perror(client, "rpc"); */
|
||||
error = EIO;
|
||||
goto out;
|
||||
|
@ -414,8 +402,11 @@ 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))
|
||||
make_mntpt(mntpt, ex, mf->mf_mount);
|
||||
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;
|
||||
|
@ -441,9 +432,7 @@ amfs_host_fmount(mntfs *mf)
|
|||
for (j = k = 0; j < n_export; j++) {
|
||||
/* Check and avoid a duplicated export entry */
|
||||
if (j > k && ep[k] && STREQ(ep[j]->ex_dir, ep[k]->ex_dir)) {
|
||||
#ifdef DEBUG
|
||||
dlog("avoiding dup fhandle requested for %s", ep[j]->ex_dir);
|
||||
#endif /* DEBUG */
|
||||
ep[j] = 0;
|
||||
} else {
|
||||
k = j;
|
||||
|
@ -462,7 +451,7 @@ amfs_host_fmount(mntfs *mf)
|
|||
*/
|
||||
strncpy(fs_name, mf->mf_info, sizeof(fs_name));
|
||||
if ((rfs_dir = strchr(fs_name, ':')) == (char *) 0) {
|
||||
plog(XLOG_FATAL, "amfs_host_fmount: mf_info has no colon");
|
||||
plog(XLOG_FATAL, "amfs_host_mount: mf_info has no colon");
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
@ -471,8 +460,10 @@ amfs_host_fmount(mntfs *mf)
|
|||
ex = ep[j];
|
||||
if (ex) {
|
||||
strcpy(rfs_dir, ex->ex_dir);
|
||||
make_mntpt(mntpt, ex, mf);
|
||||
if (do_mount(&fp[j], mntpt, fs_name, mf->mf_mopts, mf) == 0)
|
||||
make_mntpt(mntpt, ex, mf->mf_mount);
|
||||
make_mntpt(real_mntpt, ex, mf->mf_real_mount);
|
||||
if (do_mount(&fp[j], mntpt, real_mntpt, fs_name, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS, mf) == 0)
|
||||
ok = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -521,7 +512,7 @@ directory_prefix(char *pref, char *dir)
|
|||
* Unmount a mount tree
|
||||
*/
|
||||
static int
|
||||
amfs_host_fumount(mntfs *mf)
|
||||
amfs_host_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
mntlist *ml, *mprev;
|
||||
int xerror = 0;
|
||||
|
@ -558,13 +549,11 @@ amfs_host_fumount(mntfs *mf)
|
|||
char *dir = ml->mnt->mnt_dir;
|
||||
if (directory_prefix(mf->mf_mount, dir)) {
|
||||
int error;
|
||||
#ifdef DEBUG
|
||||
dlog("amfs_host: unmounts %s", dir);
|
||||
#endif /* DEBUG */
|
||||
/*
|
||||
* Unmount "dir"
|
||||
*/
|
||||
error = UMOUNT_FS(dir, mnttab_file_name);
|
||||
error = UMOUNT_FS(dir, dir, mnttab_file_name);
|
||||
/*
|
||||
* Keep track of errors
|
||||
*/
|
||||
|
@ -590,7 +579,7 @@ amfs_host_fumount(mntfs *mf)
|
|||
* Try to remount, except when we are shutting down.
|
||||
*/
|
||||
if (xerror && amd_state != Finishing) {
|
||||
xerror = amfs_host_fmount(mf);
|
||||
xerror = amfs_host_mount(am, mf);
|
||||
if (!xerror) {
|
||||
/*
|
||||
* Don't log this - it's usually too verbose
|
||||
|
@ -610,9 +599,8 @@ amfs_host_fumount(mntfs *mf)
|
|||
* mountd protocol is badly broken anyway.
|
||||
*/
|
||||
static void
|
||||
amfs_host_umounted(am_node *mp)
|
||||
amfs_host_umounted(mntfs *mf)
|
||||
{
|
||||
mntfs *mf = mp->am_mnt;
|
||||
char *host;
|
||||
CLIENT *client;
|
||||
enum clnt_stat clnt_stat;
|
||||
|
@ -660,9 +648,7 @@ amfs_host_umounted(am_node *mp)
|
|||
}
|
||||
client->cl_auth = nfs_auth;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Unmounting all from %s", host);
|
||||
#endif /* DEBUG */
|
||||
|
||||
clnt_stat = clnt_call(client,
|
||||
MOUNTPROC_UMNTALL,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_inherit.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_inherit.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_inherit.c,v 1.3.2.1 2001/01/10 03:23:01 ezk Exp
|
||||
* Id: amfs_inherit.c,v 1.11 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -63,10 +62,9 @@
|
|||
*/
|
||||
|
||||
static char *amfs_inherit_match(am_opts *fo);
|
||||
static int amfs_inherit_fmount(mntfs *mf);
|
||||
static int amfs_inherit_fumount(mntfs *mf);
|
||||
static int amfs_inherit_mount(am_node *mp, mntfs *mf);
|
||||
static int amfs_inherit_umount(am_node *mp, mntfs *mf);
|
||||
static int amfs_inherit_init(mntfs *mf);
|
||||
static int amfs_inherit_mount(am_node *mp);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -78,16 +76,18 @@ am_ops amfs_inherit_ops =
|
|||
amfs_inherit_match,
|
||||
amfs_inherit_init,
|
||||
amfs_inherit_mount,
|
||||
amfs_inherit_fmount,
|
||||
amfs_auto_fumount,
|
||||
amfs_inherit_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_inherit_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_inherit_readlink */
|
||||
0, /* amfs_inherit_mounted */
|
||||
0, /* amfs_inherit_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_DISCARD
|
||||
FS_DISCARD,
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_INHERIT_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -162,7 +162,7 @@ amfs_inherit_inherit(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
amfs_inherit_mount(am_node *mp)
|
||||
amfs_inherit_mount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
mntfs *newmf = amfs_inherit_inherit(mp->am_mnt);
|
||||
|
||||
|
@ -171,7 +171,7 @@ amfs_inherit_mount(am_node *mp)
|
|||
/*
|
||||
* XXX - must do the am_mounted call here
|
||||
*/
|
||||
if (newmf->mf_ops->fs_flags & FS_MBACKGROUND)
|
||||
if (newmf->mf_fsflags & FS_MBACKGROUND)
|
||||
am_mounted(mp);
|
||||
|
||||
new_ttl(mp);
|
||||
|
@ -181,6 +181,7 @@ amfs_inherit_mount(am_node *mp)
|
|||
}
|
||||
|
||||
|
||||
#if 0 /* huh? */
|
||||
static int
|
||||
amfs_inherit_fmount(mntfs *mf)
|
||||
{
|
||||
|
@ -190,10 +191,11 @@ amfs_inherit_fmount(mntfs *mf)
|
|||
return amfs_inherit_mount(mp);
|
||||
return amfs_inherit_inherit(mf) ? 0 : EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int
|
||||
amfs_inherit_fumount(mntfs *mf)
|
||||
amfs_inherit_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* Always succeed
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_link.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_link.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_link.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp
|
||||
* Id: amfs_link.c,v 1.14 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -63,17 +62,19 @@ am_ops amfs_link_ops =
|
|||
"link",
|
||||
amfs_link_match,
|
||||
0, /* amfs_link_init */
|
||||
amfs_auto_fmount,
|
||||
amfs_link_fmount,
|
||||
amfs_auto_fumount,
|
||||
amfs_link_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_link_mount,
|
||||
amfs_link_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_link_readlink */
|
||||
0, /* amfs_link_mounted */
|
||||
0, /* amfs_link_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
0
|
||||
0, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_LINK_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -127,17 +128,26 @@ amfs_link_match(am_opts *fo)
|
|||
|
||||
|
||||
int
|
||||
amfs_link_fmount(mntfs *mf)
|
||||
amfs_link_mount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* Wow - this is hard to implement! :-)
|
||||
*/
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_flags & AMF_AUTOFS) {
|
||||
return autofs_link_mount(mp);
|
||||
}
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
amfs_link_fumount(mntfs *mf)
|
||||
amfs_link_umount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_flags & AMF_AUTOFS) {
|
||||
return autofs_link_umount(mp);
|
||||
}
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_linkx.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_linkx.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_linkx.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp
|
||||
* Id: amfs_linkx.c,v 1.11 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -55,7 +54,7 @@
|
|||
#include <amd.h>
|
||||
|
||||
/* forward declarations */
|
||||
static int amfs_linkx_mount(am_node *mp);
|
||||
static int amfs_linkx_mount(am_node *mp, mntfs *mf);
|
||||
|
||||
/*
|
||||
* linkx operations
|
||||
|
@ -66,21 +65,23 @@ struct am_ops amfs_linkx_ops =
|
|||
amfs_link_match,
|
||||
0, /* amfs_linkx_init */
|
||||
amfs_linkx_mount,
|
||||
0,
|
||||
amfs_auto_fumount,
|
||||
amfs_link_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_link_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_linkx_readlink */
|
||||
0, /* amfs_linkx_mounted */
|
||||
0, /* amfs_linkx_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MBACKGROUND
|
||||
FS_MBACKGROUND,
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_LINKX_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
amfs_linkx_mount(am_node *mp)
|
||||
amfs_linkx_mount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* Check for existence of target.
|
||||
|
@ -91,7 +92,7 @@ amfs_linkx_mount(am_node *mp)
|
|||
if (mp->am_link)
|
||||
ln = mp->am_link;
|
||||
else /* should never occur */
|
||||
ln = mp->am_mnt->mf_mount;
|
||||
ln = mf->mf_mount;
|
||||
|
||||
/*
|
||||
* Use lstat, not stat, since we don't
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_nfsl.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_nfsl.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_nfsl.c,v 1.4.2.1 2001/01/10 03:23:02 ezk Exp
|
||||
* Id: amfs_nfsl.c,v 1.13 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -62,9 +61,9 @@
|
|||
/* forward declarations */
|
||||
static char *amfs_nfsl_match(am_opts *fo);
|
||||
static int amfs_nfsl_init(mntfs *mf);
|
||||
static int amfs_nfsl_fmount(mntfs *mf);
|
||||
static int amfs_nfsl_fumount(mntfs *mf);
|
||||
static void amfs_nfsl_umounted(am_node *mp);
|
||||
static int amfs_nfsl_mount(am_node *mp, mntfs *mf);
|
||||
static int amfs_nfsl_umount(am_node *mp, mntfs *mf);
|
||||
static void amfs_nfsl_umounted(mntfs *mf);
|
||||
static fserver *amfs_nfsl_ffserver(mntfs *mf);
|
||||
|
||||
/*
|
||||
|
@ -75,17 +74,19 @@ am_ops amfs_nfsl_ops =
|
|||
"nfsl", /* name of file system */
|
||||
amfs_nfsl_match, /* match */
|
||||
amfs_nfsl_init, /* initialize */
|
||||
amfs_auto_fmount, /* mount vnode */
|
||||
amfs_nfsl_fmount, /* mount vfs */
|
||||
amfs_auto_fumount, /* unmount vnode */
|
||||
amfs_nfsl_fumount, /* unmount VFS */
|
||||
amfs_error_lookuppn, /* lookup path-name */
|
||||
amfs_nfsl_mount, /* mount vnode */
|
||||
amfs_nfsl_umount, /* unmount vnode */
|
||||
amfs_error_lookup_child, /* lookup path-name */
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir, /* read directory */
|
||||
0, /* read link */
|
||||
0, /* after-mount extra actions */
|
||||
amfs_nfsl_umounted, /* after-umount extra actions */
|
||||
amfs_nfsl_ffserver, /* find a file server */
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO /* flags */
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_NFSL_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -148,16 +149,16 @@ amfs_nfsl_init(mntfs *mf)
|
|||
* Returns: 0 if OK, non-zero (errno) if failed.
|
||||
*/
|
||||
static int
|
||||
amfs_nfsl_fmount(mntfs *mf)
|
||||
amfs_nfsl_mount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* If a link, do run amfs_link_fmount() (same as type:=link)
|
||||
* If non-link, do nfs_fmount (same as type:=nfs).
|
||||
*/
|
||||
if (mf->mf_flags & MFF_NFSLINK) {
|
||||
return amfs_link_fmount(mf);
|
||||
return amfs_link_mount(mp, mf);
|
||||
} else {
|
||||
return nfs_fmount(mf);
|
||||
return nfs_mount(mp, mf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,16 +168,16 @@ amfs_nfsl_fmount(mntfs *mf)
|
|||
* Returns: 0 if OK, non-zero (errno) if failed.
|
||||
*/
|
||||
static int
|
||||
amfs_nfsl_fumount(mntfs *mf)
|
||||
amfs_nfsl_umount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* If a link, do run amfs_link_fumount() (same as type:=link)
|
||||
* If non-link, do nfs_fumount (same as type:=nfs).
|
||||
* If a link, do run amfs_link_umount() (same as type:=link)
|
||||
* If non-link, do nfs_umount (same as type:=nfs).
|
||||
*/
|
||||
if (mf->mf_flags & MFF_NFSLINK) {
|
||||
return amfs_link_fumount(mf);
|
||||
return amfs_link_umount(mp, mf);
|
||||
} else {
|
||||
return nfs_fumount(mf);
|
||||
return nfs_umount(mp, mf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,18 +189,16 @@ amfs_nfsl_fumount(mntfs *mf)
|
|||
* See amfs_auto_umounted(), host_umounted(), nfs_umounted().
|
||||
*/
|
||||
static void
|
||||
amfs_nfsl_umounted(am_node *mp)
|
||||
amfs_nfsl_umounted(mntfs *mf)
|
||||
{
|
||||
mntfs *mf = mp->am_mnt;
|
||||
|
||||
/*
|
||||
* If a link, do nothing (same as type:=link)
|
||||
* If non-link, do nfs_fumount (same as type:=nfs).
|
||||
* If non-link, do nfs_umount (same as type:=nfs).
|
||||
*/
|
||||
if (mf->mf_flags & MFF_NFSLINK) {
|
||||
return;
|
||||
} else {
|
||||
nfs_umounted(mp);
|
||||
nfs_umounted(mf);
|
||||
/*
|
||||
* MUST remove mount point directories, because if they remain
|
||||
* behind, the next nfsl access will think they are a link
|
||||
|
@ -207,7 +206,7 @@ amfs_nfsl_umounted(am_node *mp)
|
|||
* existence test)
|
||||
*/
|
||||
if (mf->mf_flags & MFF_MKMNT)
|
||||
rmdirs(mf->mf_mount);
|
||||
rmdirs(mf->mf_real_mount);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_nfsx.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_nfsx.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_nfsx.c,v 1.3.2.2 2001/04/14 21:08:20 ezk Exp
|
||||
* Id: amfs_nfsx.c,v 1.13 2002/03/29 20:01:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -69,13 +68,13 @@ struct amfs_nfsx {
|
|||
int nx_c; /* Number of elements in nx_v */
|
||||
amfs_nfsx_mnt *nx_v; /* Underlying mounts */
|
||||
amfs_nfsx_mnt *nx_try;
|
||||
am_node *nx_mp;
|
||||
};
|
||||
|
||||
/* forward definitions */
|
||||
static char *amfs_nfsx_match(am_opts *fo);
|
||||
static int amfs_nfsx_fmount (mntfs *);
|
||||
static int amfs_nfsx_fmount(mntfs *mf);
|
||||
static int amfs_nfsx_fumount(mntfs *mf);
|
||||
static int amfs_nfsx_mount(am_node *am, mntfs *mf);
|
||||
static int amfs_nfsx_umount(am_node *am, mntfs *mf);
|
||||
static int amfs_nfsx_init(mntfs *mf);
|
||||
|
||||
/*
|
||||
|
@ -86,17 +85,19 @@ am_ops amfs_nfsx_ops =
|
|||
"nfsx",
|
||||
amfs_nfsx_match,
|
||||
amfs_nfsx_init,
|
||||
amfs_auto_fmount,
|
||||
amfs_nfsx_fmount,
|
||||
amfs_auto_fumount,
|
||||
amfs_nfsx_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_nfsx_mount,
|
||||
amfs_nfsx_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_nfsx_readlink */
|
||||
0, /* amfs_nfsx_mounted */
|
||||
0, /* amfs_nfsx_umounted */
|
||||
find_nfs_srvr, /* XXX */
|
||||
/* FS_UBACKGROUND| */ FS_AMQINFO
|
||||
/* FS_UBACKGROUND| */ FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_NFSX_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -150,10 +151,8 @@ amfs_nfsx_match(am_opts *fo)
|
|||
* Determine magic cookie to put in mtab
|
||||
*/
|
||||
xmtab = str3cat((char *) 0, fo->opt_rhost, ":", fo->opt_rfs);
|
||||
#ifdef DEBUG
|
||||
dlog("NFSX: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"",
|
||||
fo->opt_rhost, fo->opt_rfs, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
return xmtab;
|
||||
}
|
||||
|
@ -222,6 +221,7 @@ amfs_nfsx_init(mntfs *mf)
|
|||
|
||||
nx->nx_c = i - 1; /* i-1 because we don't want the prefix */
|
||||
nx->nx_v = (amfs_nfsx_mnt *) xmalloc(nx->nx_c * sizeof(amfs_nfsx_mnt));
|
||||
nx->nx_mp = 0;
|
||||
{
|
||||
char *mp = 0;
|
||||
char *xinfo = 0;
|
||||
|
@ -245,9 +245,7 @@ amfs_nfsx_init(mntfs *mf)
|
|||
normalize_slash(xinfo);
|
||||
if (pref[1] != '\0')
|
||||
deslashify(xinfo);
|
||||
#ifdef DEBUG
|
||||
dlog("amfs_nfsx: init mount for %s on %s", xinfo, mp);
|
||||
#endif /* DEBUG */
|
||||
nx->nx_v[i].n_error = -1;
|
||||
nx->nx_v[i].n_mnt = find_mntfs(&nfs_ops, mf->mf_fo, mp, xinfo, "", mf->mf_mopts, mf->mf_remopts);
|
||||
}
|
||||
|
@ -276,7 +274,9 @@ amfs_nfsx_init(mntfs *mf)
|
|||
for (i = 0; i < nx->nx_c; i++) {
|
||||
amfs_nfsx_mnt *n = &nx->nx_v[i];
|
||||
mntfs *m = n->n_mnt;
|
||||
int error = (*m->mf_ops->fs_init) (m);
|
||||
int error = 0;
|
||||
if (m->mf_ops->fs_init)
|
||||
error = m->mf_ops->fs_init(m);
|
||||
/*
|
||||
* if you just "return error" here, you will have made a failure
|
||||
* in any submounts to fail the whole group. There was old unused code
|
||||
|
@ -303,6 +303,7 @@ amfs_nfsx_cont(int rc, int term, voidp closure)
|
|||
{
|
||||
mntfs *mf = (mntfs *) closure;
|
||||
struct amfs_nfsx *nx = (struct amfs_nfsx *) mf->mf_private;
|
||||
am_node *mp = nx->nx_mp;
|
||||
amfs_nfsx_mnt *n = nx->nx_try;
|
||||
|
||||
n->n_mnt->mf_flags &= ~(MFF_ERROR | MFF_MOUNTING);
|
||||
|
@ -343,7 +344,7 @@ amfs_nfsx_cont(int rc, int term, voidp closure)
|
|||
/*
|
||||
* Do the remaining bits
|
||||
*/
|
||||
if (amfs_nfsx_fmount(mf) >= 0) {
|
||||
if (amfs_nfsx_mount(mp, mf) >= 0) {
|
||||
wakeup((voidp) mf);
|
||||
mf->mf_flags &= ~MFF_MOUNTING;
|
||||
mf_mounted(mf);
|
||||
|
@ -355,10 +356,12 @@ static int
|
|||
try_amfs_nfsx_mount(voidp mv)
|
||||
{
|
||||
mntfs *mf = (mntfs *) mv;
|
||||
struct amfs_nfsx *nx = (struct amfs_nfsx *) mf->mf_private;
|
||||
am_node *mp = nx->nx_mp;
|
||||
int error;
|
||||
|
||||
mf->mf_flags |= MFF_MOUNTING;
|
||||
error = (*mf->mf_ops->fmount_fs) (mf);
|
||||
error = mf->mf_ops->mount_fs(mp, mf);
|
||||
mf->mf_flags &= ~MFF_MOUNTING;
|
||||
|
||||
return error;
|
||||
|
@ -366,7 +369,7 @@ try_amfs_nfsx_mount(voidp mv)
|
|||
|
||||
|
||||
static int
|
||||
amfs_nfsx_remount(mntfs *mf, int fg)
|
||||
amfs_nfsx_remount(am_node *am, mntfs *mf, int fg)
|
||||
{
|
||||
struct amfs_nfsx *nx = (struct amfs_nfsx *) mf->mf_private;
|
||||
amfs_nfsx_mnt *n;
|
||||
|
@ -375,8 +378,8 @@ amfs_nfsx_remount(mntfs *mf, int fg)
|
|||
for (n = nx->nx_v; n < nx->nx_v + nx->nx_c; n++) {
|
||||
mntfs *m = n->n_mnt;
|
||||
if (n->n_error < 0) {
|
||||
if (!(m->mf_flags & MFF_MKMNT) && m->mf_ops->fs_flags & FS_MKMNT) {
|
||||
int error = mkdirs(m->mf_mount, 0555);
|
||||
if (!(m->mf_flags & MFF_MKMNT) && m->mf_fsflags & FS_MKMNT) {
|
||||
int error = mkdirs(m->mf_real_mount, 0555);
|
||||
if (!error)
|
||||
m->mf_flags |= MFF_MKMNT;
|
||||
}
|
||||
|
@ -390,39 +393,21 @@ amfs_nfsx_remount(mntfs *mf, int fg)
|
|||
for (n = nx->nx_v; n < nx->nx_v + nx->nx_c; n++) {
|
||||
mntfs *m = n->n_mnt;
|
||||
if (n->n_error < 0) {
|
||||
/*
|
||||
* Check fmount entry pt. exists
|
||||
* and then mount...
|
||||
*/
|
||||
if (!m->mf_ops->fmount_fs) {
|
||||
n->n_error = EINVAL;
|
||||
dlog("calling underlying mount on %s", m->mf_mount);
|
||||
if (!fg && foreground && (m->mf_fsflags & FS_MBACKGROUND)) {
|
||||
m->mf_flags |= MFF_MOUNTING; /* XXX */
|
||||
dlog("backgrounding mount of \"%s\"", m->mf_info);
|
||||
nx->nx_try = n;
|
||||
run_task(try_amfs_nfsx_mount, (voidp) m, amfs_nfsx_cont, (voidp) m);
|
||||
n->n_error = -1;
|
||||
return -1;
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
dlog("calling underlying fmount on %s", m->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
if (!fg && foreground && (m->mf_ops->fs_flags & FS_MBACKGROUND)) {
|
||||
m->mf_flags |= MFF_MOUNTING; /* XXX */
|
||||
#ifdef DEBUG
|
||||
dlog("backgrounding mount of \"%s\"", m->mf_info);
|
||||
#endif /* DEBUG */
|
||||
nx->nx_try = n;
|
||||
run_task(try_amfs_nfsx_mount, (voidp) m, amfs_nfsx_cont, (voidp) mf);
|
||||
n->n_error = -1;
|
||||
return -1;
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
dlog("foreground mount of \"%s\" ...", mf->mf_info);
|
||||
#endif /* DEBUG */
|
||||
n->n_error = (*m->mf_ops->fmount_fs) (m);
|
||||
}
|
||||
dlog("foreground mount of \"%s\" ...", mf->mf_info);
|
||||
n->n_error = m->mf_ops->mount_fs(am, m);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (n->n_error > 0) {
|
||||
errno = n->n_error; /* XXX */
|
||||
dlog("underlying fmount of %s failed: %m", m->mf_mount);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
if (n->n_error > 0)
|
||||
dlog("underlying fmount of %s failed: %s", m->mf_mount, strerror(n->n_error));
|
||||
|
||||
if (n->n_error == 0) {
|
||||
glob_error = 0;
|
||||
|
@ -437,9 +422,9 @@ amfs_nfsx_remount(mntfs *mf, int fg)
|
|||
|
||||
|
||||
static int
|
||||
amfs_nfsx_fmount(mntfs *mf)
|
||||
amfs_nfsx_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return amfs_nfsx_remount(mf, FALSE);
|
||||
return amfs_nfsx_remount(am, mf, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -449,7 +434,7 @@ amfs_nfsx_fmount(mntfs *mf)
|
|||
* and so may hang under extremely rare conditions.
|
||||
*/
|
||||
static int
|
||||
amfs_nfsx_fumount(mntfs *mf)
|
||||
amfs_nfsx_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
struct amfs_nfsx *nx = (struct amfs_nfsx *) mf->mf_private;
|
||||
amfs_nfsx_mnt *n;
|
||||
|
@ -471,10 +456,8 @@ amfs_nfsx_fumount(mntfs *mf)
|
|||
* which had been successfully unmounted.
|
||||
*/
|
||||
if (n->n_error == 0) {
|
||||
#ifdef DEBUG
|
||||
dlog("calling underlying fumount on %s", m->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
n->n_error = (*m->mf_ops->fumount_fs) (m);
|
||||
n->n_error = m->mf_ops->umount_fs(am, m);
|
||||
if (n->n_error) {
|
||||
glob_error = n->n_error;
|
||||
n->n_error = 0;
|
||||
|
@ -492,7 +475,7 @@ amfs_nfsx_fumount(mntfs *mf)
|
|||
* whole lot...
|
||||
*/
|
||||
if (glob_error) {
|
||||
glob_error = amfs_nfsx_remount(mf, TRUE);
|
||||
glob_error = amfs_nfsx_remount(am, mf, TRUE);
|
||||
if (glob_error) {
|
||||
errno = glob_error; /* XXX */
|
||||
plog(XLOG_USER, "amfs_nfsx: remount of %s failed: %m", mf->mf_mount);
|
||||
|
@ -504,23 +487,13 @@ amfs_nfsx_fumount(mntfs *mf)
|
|||
*/
|
||||
for (n = nx->nx_v; n < nx->nx_v + nx->nx_c; n++) {
|
||||
mntfs *m = n->n_mnt;
|
||||
am_node am;
|
||||
|
||||
/*
|
||||
* XXX: all the umounted handler needs is a
|
||||
* mntfs pointer, so pass an am_node with the right
|
||||
* pointer in it.
|
||||
*/
|
||||
memset((voidp) &am, 0, sizeof(am));
|
||||
am.am_mnt = m;
|
||||
#ifdef DEBUG
|
||||
dlog("calling underlying umounted on %s", m->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
(*m->mf_ops->umounted) (&am);
|
||||
if (m->mf_ops->umounted)
|
||||
m->mf_ops->umounted(m);
|
||||
|
||||
if (n->n_error < 0) {
|
||||
if (m->mf_ops->fs_flags & FS_MKMNT) {
|
||||
(void) rmdirs(m->mf_mount);
|
||||
if (m->mf_fsflags & FS_MKMNT) {
|
||||
(void) rmdirs(m->mf_real_mount);
|
||||
m->mf_flags &= ~MFF_MKMNT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_program.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_program.c,v 1.1.1.5 2002/11/29 22:58:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_program.c,v 1.6.2.1 2001/01/10 03:23:03 ezk Exp
|
||||
* Id: amfs_program.c,v 1.15 2002/03/29 20:01:27 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,8 +55,8 @@
|
|||
|
||||
/* forward definitions */
|
||||
static char *amfs_program_match(am_opts *fo);
|
||||
static int amfs_program_fmount(mntfs *mf);
|
||||
static int amfs_program_fumount(mntfs *mf);
|
||||
static int amfs_program_mount(am_node *am, mntfs *mf);
|
||||
static int amfs_program_umount(am_node *am, mntfs *mf);
|
||||
static int amfs_program_init(mntfs *mf);
|
||||
|
||||
/*
|
||||
|
@ -68,17 +67,19 @@ am_ops amfs_program_ops =
|
|||
"program",
|
||||
amfs_program_match,
|
||||
amfs_program_init,
|
||||
amfs_auto_fmount,
|
||||
amfs_program_fmount,
|
||||
amfs_auto_fumount,
|
||||
amfs_program_fumount,
|
||||
amfs_error_lookuppn,
|
||||
amfs_program_mount,
|
||||
amfs_program_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* amfs_program_readlink */
|
||||
0, /* amfs_program_mounted */
|
||||
0, /* amfs_program_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_BACKGROUND | FS_AMQINFO
|
||||
FS_BACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_PROGRAM_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -144,7 +145,6 @@ amfs_program_exec(char *info)
|
|||
/*
|
||||
* Try the exec
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_FULL) {
|
||||
char **cp = xivec;
|
||||
plog(XLOG_DEBUG, "executing (un)mount command...");
|
||||
|
@ -153,7 +153,6 @@ amfs_program_exec(char *info)
|
|||
cp++;
|
||||
}
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (xivec[0] == 0 || xivec[1] == 0) {
|
||||
errno = EINVAL;
|
||||
|
@ -182,14 +181,14 @@ amfs_program_exec(char *info)
|
|||
|
||||
|
||||
static int
|
||||
amfs_program_fmount(mntfs *mf)
|
||||
amfs_program_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return amfs_program_exec(mf->mf_fo->opt_mount);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
amfs_program_fumount(mntfs *mf)
|
||||
amfs_program_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return amfs_program_exec((char *) mf->mf_private);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_root.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_root.c,v 1.1.1.5 2002/11/29 22:58:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_root.c,v 1.3.2.1 2001/01/10 03:23:03 ezk Exp
|
||||
* Id: amfs_root.c,v 1.10 2002/03/29 20:01:27 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -57,7 +56,7 @@
|
|||
/****************************************************************************
|
||||
*** FORWARD DEFINITIONS ***
|
||||
****************************************************************************/
|
||||
static int amfs_root_mount(am_node *mp);
|
||||
static int amfs_root_mount(am_node *mp, mntfs *mf);
|
||||
|
||||
/****************************************************************************
|
||||
*** OPS STRUCTURES ***
|
||||
|
@ -68,16 +67,18 @@ am_ops amfs_root_ops =
|
|||
0, /* amfs_root_match */
|
||||
0, /* amfs_root_init */
|
||||
amfs_root_mount,
|
||||
0,
|
||||
amfs_auto_umount,
|
||||
0,
|
||||
amfs_auto_lookuppn,
|
||||
amfs_auto_lookup_child,
|
||||
amfs_auto_mount_child,
|
||||
amfs_auto_readdir,
|
||||
0, /* amfs_root_readlink */
|
||||
0, /* amfs_root_mounted */
|
||||
0, /* amfs_root_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY
|
||||
FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_ROOT_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -89,10 +90,8 @@ am_ops amfs_root_ops =
|
|||
* Mount the root...
|
||||
*/
|
||||
static int
|
||||
amfs_root_mount(am_node *mp)
|
||||
amfs_root_mount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
mntfs *mf = mp->am_mnt;
|
||||
|
||||
mf->mf_mount = strealloc(mf->mf_mount, pid_fsname);
|
||||
mf->mf_private = (voidp) mapc_find(mf->mf_info, "", NULL);
|
||||
mf->mf_prfree = mapc_free;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_toplvl.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_toplvl.c,v 1.1.1.5 2002/11/29 22:58:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_toplvl.c,v 1.7.2.2 2001/04/14 21:08:20 ezk Exp
|
||||
* Id: amfs_toplvl.c,v 1.25 2002/06/23 01:05:38 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -68,16 +67,19 @@ am_ops amfs_toplvl_ops =
|
|||
amfs_auto_match,
|
||||
0, /* amfs_auto_init */
|
||||
amfs_toplvl_mount,
|
||||
0,
|
||||
amfs_toplvl_umount,
|
||||
0,
|
||||
amfs_auto_lookuppn,
|
||||
amfs_auto_lookup_child,
|
||||
amfs_auto_mount_child,
|
||||
amfs_auto_readdir, /* browsable version of readdir() */
|
||||
0, /* amfs_toplvl_readlink */
|
||||
amfs_toplvl_mounted,
|
||||
amfs_auto_mounted,
|
||||
0, /* amfs_toplvl_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND |
|
||||
FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_TOPLVL_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,76 +95,60 @@ am_ops amfs_toplvl_ops =
|
|||
* kernel so that it will talk back to us.
|
||||
*
|
||||
* NOTE: automounter mounts in themselves are using NFS Version 2.
|
||||
*
|
||||
* NEW: on certain systems, mounting can be done using the
|
||||
* kernel-level automount (autofs) support. In that case,
|
||||
* we don't need NFS at all here.
|
||||
*/
|
||||
static int
|
||||
mount_amfs_toplvl(char *dir, char *opts)
|
||||
int
|
||||
mount_amfs_toplvl(mntfs *mf, char *opts)
|
||||
{
|
||||
char fs_hostname[MAXHOSTNAMELEN + MAXPATHLEN + 1];
|
||||
int retry, error, genflags;
|
||||
int retry, error = 0, genflags;
|
||||
char *dir = mf->mf_mount;
|
||||
mntent_t mnt;
|
||||
nfs_args_t nfs_args;
|
||||
am_nfs_fh *fhp;
|
||||
am_nfs_handle_t anh;
|
||||
MTYPE_TYPE type = MOUNT_TYPE_NFS;
|
||||
#ifndef HAVE_TRANSPORT_TYPE_TLI
|
||||
u_short port;
|
||||
struct sockaddr_in sin;
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
MTYPE_TYPE type;
|
||||
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_fsname = pid_fsname;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
/*
|
||||
* Make sure that amd's top-level NFS mounts are hidden by default
|
||||
* from df.
|
||||
* If they don't appear to support the either the "ignore" mnttab
|
||||
* option entry, or the "auto" one, set the mount type to "nfs".
|
||||
*/
|
||||
mnt.mnt_type = HIDE_MOUNT_TYPE;
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mf->mf_flags & MFF_AUTOFS) {
|
||||
type = MOUNT_TYPE_AUTOFS;
|
||||
/*
|
||||
* Make sure that amd's top-level autofs mounts are hidden by default
|
||||
* from df.
|
||||
* XXX: It works ok on Linux, might not work on other systems.
|
||||
*/
|
||||
mnt.mnt_type = "autofs";
|
||||
} else
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
{
|
||||
type = MOUNT_TYPE_NFS;
|
||||
/*
|
||||
* Make sure that amd's top-level NFS mounts are hidden by default
|
||||
* from df.
|
||||
* If they don't appear to support the either the "ignore" mnttab
|
||||
* option entry, or the "auto" one, set the mount type to "nfs".
|
||||
*/
|
||||
mnt.mnt_type = HIDE_MOUNT_TYPE;
|
||||
}
|
||||
|
||||
retry = hasmntval(&mnt, MNTTAB_OPT_RETRY);
|
||||
if (retry <= 0)
|
||||
retry = 2; /* XXX */
|
||||
retry = 2; /* XXX: default to 2 retries */
|
||||
|
||||
/*
|
||||
* SET MOUNT ARGS
|
||||
*/
|
||||
/*
|
||||
* get fhandle of remote path for automount point
|
||||
*/
|
||||
fhp = root_fh(dir);
|
||||
if (!fhp) {
|
||||
plog(XLOG_FATAL, "Can't find root file handle for %s", dir);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
#ifndef HAVE_TRANSPORT_TYPE_TLI
|
||||
/*
|
||||
* Create sockaddr to point to the local machine. 127.0.0.1
|
||||
* is not used since that will not work in HP-UX clusters and
|
||||
* this is no more expensive.
|
||||
*/
|
||||
memset((voidp) &sin, 0, sizeof(sin));
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_addr = myipaddr;
|
||||
port = hasmntval(&mnt, MNTTAB_OPT_PORT);
|
||||
if (port) {
|
||||
sin.sin_port = htons(port);
|
||||
} else {
|
||||
plog(XLOG_ERROR, "no port number specified for %s", dir);
|
||||
return EINVAL;
|
||||
}
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/*
|
||||
* Make a ``hostname'' string for the kernel
|
||||
*/
|
||||
sprintf(fs_hostname, "pid%ld@%s:%s",
|
||||
(long) (foreground ? am_mypid : getppid()),
|
||||
am_get_hostname(),
|
||||
dir);
|
||||
get_server_pid(), am_get_hostname(), dir);
|
||||
/*
|
||||
* Most kernels have a name length restriction (64 bytes)...
|
||||
*/
|
||||
|
@ -185,66 +171,110 @@ mount_amfs_toplvl(char *dir, char *opts)
|
|||
genflags = compute_mount_flags(&mnt);
|
||||
genflags |= compute_automounter_mount_flags(&mnt);
|
||||
|
||||
/* setup the many fields and flags within nfs_args */
|
||||
memmove(&anh.v2.fhs_fh, fhp, sizeof(*fhp));
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
compute_nfs_args(&nfs_args,
|
||||
&mnt,
|
||||
genflags,
|
||||
nfsncp,
|
||||
NULL, /* remote host IP addr is set below */
|
||||
NFS_VERSION, /* version 2 */
|
||||
"udp",
|
||||
&anh,
|
||||
fs_hostname,
|
||||
pid_fsname);
|
||||
/*
|
||||
* IMPORTANT: set the correct IP address AFTERWARDS. It cannot
|
||||
* be done using the normal mechanism of compute_nfs_args(), because
|
||||
* that one will allocate a new address and use NFS_SA_DREF() to copy
|
||||
* parts to it, while assuming that the ip_addr passed is always
|
||||
* a "struct sockaddr_in". That assumption is incorrect on TLI systems,
|
||||
* because they define a special macro HOST_SELF which is DIFFERENT
|
||||
* than localhost (127.0.0.1)!
|
||||
*/
|
||||
nfs_args.addr = &nfsxprt->xp_ltaddr;
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
compute_nfs_args(&nfs_args,
|
||||
&mnt,
|
||||
genflags,
|
||||
&sin,
|
||||
NFS_VERSION, /* version 2 */
|
||||
"udp",
|
||||
&anh,
|
||||
fs_hostname,
|
||||
pid_fsname);
|
||||
if (!(mf->mf_flags & MFF_AUTOFS)) {
|
||||
nfs_args_t nfs_args;
|
||||
am_nfs_fh *fhp;
|
||||
am_nfs_handle_t anh;
|
||||
#ifndef HAVE_TRANSPORT_TYPE_TLI
|
||||
u_short port;
|
||||
struct sockaddr_in sin;
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/*************************************************************************
|
||||
* NOTE: while compute_nfs_args() works ok for regular NFS mounts *
|
||||
* the toplvl one is not, and so some options must be corrected by hand *
|
||||
* more carefully, *after* compute_nfs_args() runs. *
|
||||
*************************************************************************/
|
||||
compute_automounter_nfs_args(&nfs_args, &mnt);
|
||||
/*
|
||||
* get fhandle of remote path for automount point
|
||||
*/
|
||||
fhp = get_root_nfs_fh(dir);
|
||||
if (!fhp) {
|
||||
plog(XLOG_FATAL, "Can't find root file handle for %s", dir);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
/* This is it! Here we try to mount amd on its mount points */
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE) {
|
||||
print_nfs_args(&nfs_args, 0);
|
||||
plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type,
|
||||
0, NULL, mnttab_file_name);
|
||||
#ifndef HAVE_TRANSPORT_TYPE_TLI
|
||||
/*
|
||||
* Create sockaddr to point to the local machine. 127.0.0.1
|
||||
* is not used since that will not work in HP-UX clusters and
|
||||
* this is no more expensive.
|
||||
*/
|
||||
memset((voidp) &sin, 0, sizeof(sin));
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_addr = myipaddr;
|
||||
port = hasmntval(&mnt, MNTTAB_OPT_PORT);
|
||||
if (port) {
|
||||
sin.sin_port = htons(port);
|
||||
} else {
|
||||
plog(XLOG_ERROR, "no port number specified for %s", dir);
|
||||
return EINVAL;
|
||||
}
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/* setup the many fields and flags within nfs_args */
|
||||
memmove(&anh.v2.fhs_fh, fhp, sizeof(*fhp));
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
compute_nfs_args(&nfs_args,
|
||||
&mnt,
|
||||
genflags,
|
||||
nfsncp,
|
||||
NULL, /* remote host IP addr is set below */
|
||||
NFS_VERSION, /* version 2 */
|
||||
"udp",
|
||||
&anh,
|
||||
fs_hostname,
|
||||
pid_fsname);
|
||||
/*
|
||||
* IMPORTANT: set the correct IP address AFTERWARDS. It cannot
|
||||
* be done using the normal mechanism of compute_nfs_args(), because
|
||||
* that one will allocate a new address and use NFS_SA_DREF() to copy
|
||||
* parts to it, while assuming that the ip_addr passed is always
|
||||
* a "struct sockaddr_in". That assumption is incorrect on TLI systems,
|
||||
* because they define a special macro HOST_SELF which is DIFFERENT
|
||||
* than localhost (127.0.0.1)!
|
||||
*/
|
||||
nfs_args.addr = &nfsxprt->xp_ltaddr;
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
compute_nfs_args(&nfs_args,
|
||||
&mnt,
|
||||
genflags,
|
||||
NULL,
|
||||
&sin,
|
||||
NFS_VERSION, /* version 2 */
|
||||
"udp",
|
||||
&anh,
|
||||
fs_hostname,
|
||||
pid_fsname);
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/*************************************************************************
|
||||
* NOTE: while compute_nfs_args() works ok for regular NFS mounts *
|
||||
* the toplvl one is not quite regular, and so some options must be *
|
||||
* corrected by hand more carefully, *after* compute_nfs_args() runs. *
|
||||
*************************************************************************/
|
||||
compute_automounter_nfs_args(&nfs_args, &mnt);
|
||||
|
||||
amuDebug(D_TRACE) {
|
||||
print_nfs_args(&nfs_args, 0);
|
||||
plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags);
|
||||
}
|
||||
|
||||
/* This is it! Here we try to mount amd on its mount points */
|
||||
error = mount_fs2(&mnt, mf->mf_real_mount, genflags, (caddr_t) &nfs_args, retry, type,
|
||||
0, NULL, mnttab_file_name);
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
free_knetconfig(nfs_args.knconf);
|
||||
/*
|
||||
* local automounter mounts do not allocate a special address, so
|
||||
* no need to XFREE(nfs_args.addr) under TLI.
|
||||
*/
|
||||
free_knetconfig(nfs_args.knconf);
|
||||
/*
|
||||
* local automounter mounts do not allocate a special address, so
|
||||
* no need to XFREE(nfs_args.addr) under TLI.
|
||||
*/
|
||||
#endif /* HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
} else {
|
||||
/* This is it! Here we try to mount amd on its mount points */
|
||||
error = mount_fs2(&mnt, mf->mf_real_mount, genflags, (caddr_t) mf->mf_autofs_fh, retry,
|
||||
type, 0, NULL, mnttab_file_name);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -253,13 +283,11 @@ mount_amfs_toplvl(char *dir, char *opts)
|
|||
* Mount the top-level
|
||||
*/
|
||||
int
|
||||
amfs_toplvl_mount(am_node *mp)
|
||||
amfs_toplvl_mount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
mntfs *mf = mp->am_mnt;
|
||||
struct stat stb;
|
||||
char opts[256], preopts[256];
|
||||
int error;
|
||||
char *mnttype;
|
||||
|
||||
/*
|
||||
* Mounting the automounter.
|
||||
|
@ -273,16 +301,6 @@ amfs_toplvl_mount(am_node *mp)
|
|||
plog(XLOG_WARNING, "%s is not a directory", mp->am_path);
|
||||
return ENOTDIR;
|
||||
}
|
||||
if (mf->mf_ops == &amfs_toplvl_ops)
|
||||
mnttype = "indirect";
|
||||
else if (mf->mf_ops == &amfs_direct_ops)
|
||||
mnttype = "direct";
|
||||
#ifdef HAVE_AMU_FS_UNION
|
||||
else if (mf->mf_ops == &amfs_union_ops)
|
||||
mnttype = "union";
|
||||
#endif /* HAVE_AMU_FS_UNION */
|
||||
else
|
||||
mnttype = "auto";
|
||||
|
||||
/*
|
||||
* Construct some mount options:
|
||||
|
@ -290,25 +308,33 @@ amfs_toplvl_mount(am_node *mp)
|
|||
* Tack on magic map=<mapname> option in mtab to emulate
|
||||
* SunOS automounter behavior.
|
||||
*/
|
||||
preopts[0] = '\0';
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mf->mf_flags & MFF_AUTOFS) {
|
||||
autofs_get_opts(opts, mf->mf_autofs_fh);
|
||||
} else
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
{
|
||||
preopts[0] = '\0';
|
||||
#ifdef MNTTAB_OPT_INTR
|
||||
strcat(preopts, MNTTAB_OPT_INTR);
|
||||
strcat(preopts, ",");
|
||||
strcat(preopts, MNTTAB_OPT_INTR);
|
||||
strcat(preopts, ",");
|
||||
#endif /* MNTTAB_OPT_INTR */
|
||||
#ifdef MNTTAB_OPT_IGNORE
|
||||
strcat(preopts, MNTTAB_OPT_IGNORE);
|
||||
strcat(preopts, ",");
|
||||
strcat(preopts, MNTTAB_OPT_IGNORE);
|
||||
strcat(preopts, ",");
|
||||
#endif /* MNTTAB_OPT_IGNORE */
|
||||
sprintf(opts, "%s%s,%s=%d,%s=%d,%s=%d,%s,map=%s",
|
||||
preopts,
|
||||
MNTTAB_OPT_RW,
|
||||
MNTTAB_OPT_PORT, nfs_port,
|
||||
MNTTAB_OPT_TIMEO, gopt.amfs_auto_timeo,
|
||||
MNTTAB_OPT_RETRANS, gopt.amfs_auto_retrans,
|
||||
mnttype, mf->mf_info);
|
||||
sprintf(opts, "%s%s,%s=%d,%s=%d,%s=%d,%s,map=%s",
|
||||
preopts,
|
||||
MNTTAB_OPT_RW,
|
||||
MNTTAB_OPT_PORT, nfs_port,
|
||||
MNTTAB_OPT_TIMEO, gopt.amfs_auto_timeo,
|
||||
MNTTAB_OPT_RETRANS, gopt.amfs_auto_retrans,
|
||||
mf->mf_ops->fs_type, mf->mf_info);
|
||||
}
|
||||
|
||||
/* now do the mount */
|
||||
error = mount_amfs_toplvl(mf->mf_mount, opts);
|
||||
error = mount_amfs_toplvl(mf, opts);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_FATAL, "amfs_toplvl_mount: mount_amfs_toplvl failed: %m");
|
||||
|
@ -318,18 +344,11 @@ amfs_toplvl_mount(am_node *mp)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
amfs_toplvl_mounted(mntfs *mf)
|
||||
{
|
||||
amfs_auto_mkcacheref(mf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Unmount a top-level automount node
|
||||
*/
|
||||
int
|
||||
amfs_toplvl_umount(am_node *mp)
|
||||
amfs_toplvl_umount(am_node *mp, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
struct stat stb;
|
||||
|
@ -346,13 +365,26 @@ again:
|
|||
* of the mount point to see why things were not working
|
||||
* actually fixed the problem - so simulate an ls -ld here.
|
||||
*/
|
||||
if (lstat(mp->am_path, &stb) < 0) {
|
||||
#ifdef DEBUG
|
||||
if (lstat(mp->am_path, &stb) < 0)
|
||||
dlog("lstat(%s): %m", mp->am_path);
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mf->mf_flags & MFF_AUTOFS) {
|
||||
autofs_release_fh(mf->mf_autofs_fh);
|
||||
mf->mf_autofs_fh = 0;
|
||||
}
|
||||
error = UMOUNT_FS(mp->am_path, mnttab_file_name);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
error = UMOUNT_FS(mp->am_path, mf->mf_real_mount, mnttab_file_name);
|
||||
if (error == EBUSY) {
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
/*
|
||||
* autofs mounts are in place, so it is possible
|
||||
* that we can't just unmount our mount points and go away.
|
||||
* If that's the case, just give up.
|
||||
*/
|
||||
if (mf->mf_flags & MFF_AUTOFS)
|
||||
return 0;
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
plog(XLOG_WARNING, "amfs_toplvl_unmount retrying %s in 1s", mp->am_path);
|
||||
sleep(1); /* XXX */
|
||||
goto again;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amfs_union.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amfs_union.c,v 1.1.1.5 2002/11/29 22:58:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amfs_union.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp
|
||||
* Id: amfs_union.c,v 1.11 2002/03/29 20:01:27 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -69,16 +68,18 @@ am_ops amfs_union_ops =
|
|||
amfs_auto_match,
|
||||
0, /* amfs_auto_init */
|
||||
amfs_toplvl_mount,
|
||||
0,
|
||||
amfs_toplvl_umount,
|
||||
0,
|
||||
amfs_auto_lookuppn,
|
||||
amfs_auto_lookup_child,
|
||||
amfs_auto_mount_child,
|
||||
amfs_auto_readdir,
|
||||
0, /* amfs_toplvl_readlink */
|
||||
amfs_union_mounted,
|
||||
0, /* amfs_toplvl_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY,
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_UNION_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -91,7 +92,10 @@ create_amfs_union_node(char *dir, voidp arg)
|
|||
{
|
||||
if (!STREQ(dir, "/defaults")) {
|
||||
int error = 0;
|
||||
(void) amfs_toplvl_ops.lookuppn(arg, dir, &error, VLOOK_CREATE);
|
||||
am_node *am;
|
||||
am = amfs_auto_lookup_child(arg, dir, &error, VLOOK_CREATE);
|
||||
if (am && error < 0)
|
||||
am = amfs_auto_mount_child(am, &error);
|
||||
if (error > 0) {
|
||||
errno = error; /* XXX */
|
||||
plog(XLOG_ERROR, "unionfs: could not mount %s: %m", dir);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amq_svc.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: amq_svc.c,v 1.1.1.5 2002/11/29 22:58:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amq_svc.c,v 1.4.2.2 2001/01/12 22:43:42 ro Exp
|
||||
* Id: amq_svc.c,v 1.8 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: autil.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: autil.c,v 1.1.1.5 2002/11/29 22:58:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: autil.c,v 1.4.2.2 2001/04/29 05:08:35 ib42 Exp
|
||||
* Id: autil.c,v 1.22 2002/06/24 03:05:15 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -131,16 +130,12 @@ strsplit(char *s, int ch, int qc)
|
|||
*/
|
||||
ivec[ic++] = v;
|
||||
ivec = (char **) xrealloc((voidp) ivec, (ic + 1) * sizeof(char *));
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_STR)
|
||||
plog(XLOG_DEBUG, "strsplit saved \"%s\"", v);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_STR)
|
||||
plog(XLOG_DEBUG, "strsplit saved a total of %d strings", ic);
|
||||
#endif /* DEBUG */
|
||||
|
||||
ivec[ic] = 0;
|
||||
|
||||
|
@ -187,9 +182,7 @@ host_normalize(char **chp)
|
|||
clock_valid = 0;
|
||||
hp = gethostbyname(*chp);
|
||||
if (hp && hp->h_addrtype == AF_INET) {
|
||||
#ifdef DEBUG
|
||||
dlog("Hostname %s normalized to %s", *chp, hp->h_name);
|
||||
#endif /* DEBUG */
|
||||
*chp = strealloc(*chp, (char *) hp->h_name);
|
||||
}
|
||||
}
|
||||
|
@ -255,6 +248,7 @@ mf_mounted(mntfs *mf)
|
|||
if (mf->mf_ops->mounted) {
|
||||
(*mf->mf_ops->mounted) (mf);
|
||||
}
|
||||
|
||||
mf->mf_fo = 0;
|
||||
}
|
||||
|
||||
|
@ -278,16 +272,21 @@ am_mounted(am_node *mp)
|
|||
|
||||
mf_mounted(mf);
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mf->mf_flags & MFF_AUTOFS)
|
||||
autofs_mounted(mp);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/*
|
||||
* Patch up path for direct mounts
|
||||
*/
|
||||
if (mp->am_parent && mp->am_parent->am_mnt->mf_ops == &amfs_direct_ops)
|
||||
if (mp->am_parent && mp->am_parent->am_mnt->mf_fsflags & FS_DIRECT)
|
||||
mp->am_path = str3cat(mp->am_path, mp->am_parent->am_path, "/", ".");
|
||||
|
||||
/*
|
||||
* Check whether this mount should be cached permanently
|
||||
*/
|
||||
if (mf->mf_ops->fs_flags & FS_NOTIMEOUT) {
|
||||
if (mf->mf_fsflags & FS_NOTIMEOUT) {
|
||||
mp->am_flags |= AMF_NOTIMEOUT;
|
||||
} else if (mf->mf_mount[1] == '\0' && mf->mf_mount[0] == '/') {
|
||||
mp->am_flags |= AMF_NOTIMEOUT;
|
||||
|
@ -322,10 +321,23 @@ am_mounted(am_node *mp)
|
|||
mp->am_parent->am_fattr.na_mtime.nt_seconds = mp->am_stats.s_mtime;
|
||||
|
||||
/*
|
||||
* Now, if we can, do a reply to our NFS client here
|
||||
* to speed things up.
|
||||
* This is ugly, but essentially unavoidable
|
||||
* Sublinks must be treated separately as type==link
|
||||
* when the base type is different.
|
||||
*/
|
||||
quick_reply(mp, 0);
|
||||
if (mp->am_link && mp->am_mnt->mf_ops != &amfs_link_ops)
|
||||
amfs_link_ops.mount_fs(mp, mp->am_mnt);
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_flags & AMF_AUTOFS)
|
||||
autofs_mount_succeeded(mp);
|
||||
else
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
/*
|
||||
* Now, if we can, do a reply to our NFS client here
|
||||
* to speed things up.
|
||||
*/
|
||||
nfs_quick_reply(mp, 0);
|
||||
|
||||
/*
|
||||
* Update stats
|
||||
|
@ -341,13 +353,14 @@ mount_node(am_node *mp)
|
|||
int error = 0;
|
||||
|
||||
mf->mf_flags |= MFF_MOUNTING;
|
||||
error = (*mf->mf_ops->mount_fs) (mp);
|
||||
error = mf->mf_ops->mount_fs(mp, mf);
|
||||
|
||||
/* do this again, it might have changed */
|
||||
mf = mp->am_mnt;
|
||||
if (error >= 0)
|
||||
mf->mf_flags &= ~MFF_MOUNTING;
|
||||
if (!error && !(mf->mf_ops->fs_flags & FS_MBACKGROUND)) {
|
||||
/* ...but see ifs_mount */
|
||||
if (!error && !(mf->mf_fsflags & FS_MBACKGROUND)) {
|
||||
/* ...but see ifs_mount - Huh? ifs_mount doesn't exist */
|
||||
am_mounted(mp);
|
||||
}
|
||||
|
||||
|
@ -367,7 +380,39 @@ am_unmounted(am_node *mp)
|
|||
* Do unmounted callback
|
||||
*/
|
||||
if (mf->mf_ops->umounted)
|
||||
(*mf->mf_ops->umounted) (mp);
|
||||
mf->mf_ops->umounted(mf);
|
||||
|
||||
/*
|
||||
* This is ugly, but essentially unavoidable.
|
||||
* Sublinks must be treated separately as type==link
|
||||
* when the base type is different.
|
||||
*/
|
||||
if (mp->am_link && mp->am_mnt->mf_ops != &amfs_link_ops)
|
||||
amfs_link_ops.umount_fs(mp, mp->am_mnt);
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_flags & AMF_AUTOFS)
|
||||
autofs_umount_succeeded(mp);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/*
|
||||
* Clean up any directories that were made
|
||||
*
|
||||
* If we remove the mount point of a pending mount, any queued access
|
||||
* to it will fail. So don't do it in that case.
|
||||
*/
|
||||
if (mf->mf_flags & MFF_MKMNT &&
|
||||
!(mp->am_flags & AMF_REMOUNT)) {
|
||||
plog(XLOG_INFO, "removing mountpoint directory '%s'", mf->mf_real_mount);
|
||||
rmdirs(mf->mf_real_mount);
|
||||
}
|
||||
|
||||
/*
|
||||
* If this is a pseudo-directory then adjust the link count
|
||||
* in the parent
|
||||
*/
|
||||
if (mp->am_parent && mp->am_fattr.na_type == NFDIR)
|
||||
--mp->am_parent->am_fattr.na_nlink;
|
||||
|
||||
/*
|
||||
* Update mtime of parent node
|
||||
|
@ -375,7 +420,23 @@ am_unmounted(am_node *mp)
|
|||
if (mp->am_parent && mp->am_parent->am_mnt)
|
||||
mp->am_parent->am_fattr.na_mtime.nt_seconds = clocktime();
|
||||
|
||||
free_map(mp);
|
||||
if (mp->am_flags & AMF_REMOUNT) {
|
||||
char *fname = strdup(mp->am_name);
|
||||
am_node *mp_parent = mp->am_parent;
|
||||
int error = 0;
|
||||
|
||||
free_map(mp);
|
||||
plog(XLOG_INFO, "am_unmounted: remounting %s", fname);
|
||||
mp = amfs_auto_lookup_child(mp_parent, fname, &error, VLOOK_CREATE);
|
||||
if (mp && error < 0)
|
||||
mp = amfs_auto_mount_child(mp, &error);
|
||||
if (error > 0) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "am_unmounted: could not remount %s: %m", fname);
|
||||
}
|
||||
XFREE(fname);
|
||||
} else
|
||||
free_map(mp);
|
||||
}
|
||||
|
||||
|
||||
|
@ -413,9 +474,7 @@ background(void)
|
|||
int pid = dofork();
|
||||
|
||||
if (pid == 0) {
|
||||
#ifdef DEBUG
|
||||
dlog("backgrounded");
|
||||
#endif /* DEBUG */
|
||||
foreground = 0;
|
||||
}
|
||||
return pid;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: clock.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.1.1.5 2002/11/29 22:58:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: clock.c,v 1.4.2.1 2001/01/10 03:23:04 ezk Exp
|
||||
* Id: clock.c,v 1.9 2002/06/23 05:37:53 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -61,7 +60,6 @@
|
|||
#include <am_defs.h>
|
||||
#include <amd.h>
|
||||
|
||||
int timeout(u_int secs, void (*fn) (voidp), voidp closure);
|
||||
void reschedule_timeouts(time_t now, time_t then);
|
||||
|
||||
typedef struct callout callout;
|
||||
|
@ -191,10 +189,8 @@ reschedule_timeouts(time_t now, time_t then)
|
|||
for (cp = callouts.c_next; cp; cp = cp->c_next) {
|
||||
if (cp->c_time >= now && cp->c_time <= then) {
|
||||
plog(XLOG_WARNING, "job %d rescheduled to run immediately", cp->c_id);
|
||||
#ifdef DEBUG
|
||||
dlog("rescheduling job %d back %ld seconds",
|
||||
cp->c_id, (long) (cp->c_time - now));
|
||||
#endif /* DEBUG */
|
||||
next_softclock = cp->c_time = now;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: conf.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.1.1.5 2002/11/29 22:58:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: conf.c,v 1.7.2.3 2001/04/14 21:08:21 ezk Exp
|
||||
* Id: conf.c,v 1.13 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -96,6 +95,7 @@ static int gopt_local_domain(const char *val);
|
|||
static int gopt_log_file(const char *val);
|
||||
static int gopt_log_options(const char *val);
|
||||
static int gopt_map_options(const char *val);
|
||||
static int gopt_map_reload_interval(const char *val);
|
||||
static int gopt_map_type(const char *val);
|
||||
static int gopt_mount_type(const char *val);
|
||||
static int gopt_pid_file(const char *val);
|
||||
|
@ -154,6 +154,7 @@ static struct _func_map glob_functable[] = {
|
|||
{"log_file", gopt_log_file},
|
||||
{"log_options", gopt_log_options},
|
||||
{"map_options", gopt_map_options},
|
||||
{"map_reload_interval", gopt_map_reload_interval},
|
||||
{"map_type", gopt_map_type},
|
||||
{"mount_type", gopt_mount_type},
|
||||
{"pid_file", gopt_pid_file},
|
||||
|
@ -550,6 +551,16 @@ gopt_map_options(const char *val)
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
gopt_map_reload_interval(const char *val)
|
||||
{
|
||||
gopt.map_reload_interval = atoi(val);
|
||||
if (gopt.map_reload_interval <= 0)
|
||||
gopt.map_reload_interval = ONE_HOUR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
gopt_map_type(const char *val)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: conf_parse.y,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: conf_parse.y,v 1.1.1.5 2002/11/29 22:58:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: conf_parse.y,v 1.4.2.1 2001/01/10 03:23:05 ezk Exp
|
||||
* Id: conf_parse.y,v 1.8 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -57,10 +56,14 @@
|
|||
# include <alloca.h>
|
||||
# else /* not HAVE_ALLOCA_H */
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
/*
|
||||
* This pragma directive is indented so that pre-ANSI C compilers will
|
||||
* ignore it, rather than choke on it.
|
||||
*/
|
||||
#pragma alloca
|
||||
# else /* not _AIX */
|
||||
# ifndef alloca
|
||||
/* predefined by HP cc +Olibcalls */
|
||||
/* predefined by HP cc +Olibcalls */
|
||||
voidp alloca();
|
||||
# endif /* not alloca */
|
||||
# endif /* not _AIX */
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $NetBSD: conf_tok.l,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: conf_tok.l,v 1.1.1.5 2002/11/29 22:58:21 christos Exp $ */
|
||||
|
||||
%{
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +39,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: conf_tok.l,v 1.3.2.1 2001/01/10 03:23:05 ezk Exp
|
||||
* Id: conf_tok.l,v 1.6 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: get_args.c,v 1.1.1.4 2001/05/13 17:50:12 veego Exp $ */
|
||||
/* $NetBSD: get_args.c,v 1.1.1.5 2002/11/29 22:58:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: get_args.c,v 1.7.2.1 2001/01/10 03:23:05 ezk Exp
|
||||
* Id: get_args.c,v 1.17 2002/06/23 01:50:10 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -62,12 +61,6 @@ char *conf_tag = NULL; /* default conf file tags to use */
|
|||
int usage = 0;
|
||||
int use_conf_file = 0; /* default don't use amd.conf file */
|
||||
char *mnttab_file_name = NULL; /* symbol must be available always */
|
||||
#if 0
|
||||
#ifdef DEBUG
|
||||
int debug_flags = D_AMQ /* Register AMQ */
|
||||
| D_DAEMON; /* Enter daemon mode */
|
||||
#endif /* DEBUG */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return the version string (dynamic buffer)
|
||||
|
@ -87,12 +80,14 @@ get_version_string(void)
|
|||
|
||||
vers = xmalloc(2048 + wire_buf_len);
|
||||
sprintf(vers, "%s\n%s\n%s\n%s\n",
|
||||
"Copyright (c) 1997-2001 Erez Zadok",
|
||||
"Copyright (c) 1997-2002 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.");
|
||||
sprintf(tmpbuf, "%s version %s (build %d).\n",
|
||||
PACKAGE, VERSION, AMU_BUILD_VERSION);
|
||||
PACKAGE_NAME, PACKAGE_VERSION, AMU_BUILD_VERSION);
|
||||
strcat(vers, tmpbuf);
|
||||
sprintf(tmpbuf, "Report bugs to %s.\n", PACKAGE_BUGREPORT);
|
||||
strcat(vers, tmpbuf);
|
||||
sprintf(tmpbuf, "Built by %s@%s on date %s.\n",
|
||||
USER_NAME, HOST_NAME, CONFIG_DATE);
|
||||
|
@ -129,12 +124,20 @@ get_args(int argc, char *argv[])
|
|||
{
|
||||
int opt_ch;
|
||||
FILE *fp = stdin;
|
||||
char getopt_arguments[] = "+nprvSa:c:d:k:l:o:t:w:x:y:C:D:F:T:O:HA:";
|
||||
char *getopt_args;
|
||||
|
||||
#ifdef HAVE_GNU_GETOPT
|
||||
getopt_args = getopt_arguments;
|
||||
#else /* ! HAVE_GNU_GETOPT */
|
||||
getopt_args = &getopt_arguments[1];
|
||||
#endif /* HAVE_GNU_GETOPT */
|
||||
|
||||
/* if no arguments were passed, try to use /etc/amd.conf file */
|
||||
if (argc <= 1)
|
||||
use_conf_file = 1;
|
||||
|
||||
while ((opt_ch = getopt(argc, argv, "nprvSa:c:d:k:l:o:t:w:x:y:C:D:F:T:O:H")) != -1)
|
||||
while ((opt_ch = getopt(argc, argv, getopt_args)) != -1)
|
||||
switch (opt_ch) {
|
||||
|
||||
case 'a':
|
||||
|
@ -219,6 +222,10 @@ get_args(int argc, char *argv[])
|
|||
#endif /* not HAVE_MAP_NIS */
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
gopt.arch = optarg;
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
gopt.cluster = optarg;
|
||||
break;
|
||||
|
@ -325,17 +332,15 @@ get_args(int argc, char *argv[])
|
|||
strcat(hostd, hostdomain);
|
||||
|
||||
#ifdef MOUNT_TABLE_ON_FILE
|
||||
# ifdef DEBUG
|
||||
if (debug_flags & D_MTAB)
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_MTAB)
|
||||
mnttab_file_name = DEBUG_MNTTAB;
|
||||
else
|
||||
# endif /* DEBUG */
|
||||
#endif /* DEBUG */
|
||||
mnttab_file_name = MNTTAB_FILE_NAME;
|
||||
#else /* not MOUNT_TABLE_ON_FILE */
|
||||
# ifdef DEBUG
|
||||
if (debug_flags & D_MTAB)
|
||||
amuDebug(D_MTAB)
|
||||
dlog("-D mtab option ignored");
|
||||
# endif /* DEBUG */
|
||||
# ifdef MNTTAB_FILE_NAME
|
||||
mnttab_file_name = MNTTAB_FILE_NAME;
|
||||
# endif /* MNTTAB_FILE_NAME */
|
||||
|
@ -367,7 +372,7 @@ show_usage:
|
|||
fprintf(stderr,
|
||||
"Usage: %s [-nprvHS] [-a mount_point] [-c cache_time] [-d domain]\n\
|
||||
\t[-k kernel_arch] [-l logfile%s\n\
|
||||
\t[-t timeout.retrans] [-w wait_timeout] [-C cluster_name]\n\
|
||||
\t[-t timeout.retrans] [-w wait_timeout] [-A arch] [-C cluster_name]\n\
|
||||
\t[-o op_sys_ver] [-O op_sys_name]\n\
|
||||
\t[-F conf_file] [-T conf_tag]", am_get_progname(),
|
||||
#ifdef HAVE_SYSLOG
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_file.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_file.c,v 1.1.1.5 2002/11/29 22:58:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_file.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp
|
||||
* Id: info_file.c,v 1.8 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -163,9 +162,7 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m, vo
|
|||
(*fn) (m, strdup(kp), dc);
|
||||
} else {
|
||||
*val = dc;
|
||||
#ifdef DEBUG
|
||||
dlog("%s returns %s", key, dc);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
if (!fn)
|
||||
return 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_hesiod.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_hesiod.c,v 1.1.1.5 2002/11/29 22:58:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_hesiod.c,v 1.6.2.1 2001/01/10 03:23:05 ezk Exp
|
||||
* Id: info_hesiod.c,v 1.11 2002/06/23 01:05:38 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -77,9 +76,7 @@ int hesiod_isup(mnt_map *m, char *map);
|
|||
int
|
||||
amu_hesiod_init(mnt_map *m, char *map, time_t *tp)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
dlog("amu_hesiod_init(%s)", map);
|
||||
#endif /* DEBUG */
|
||||
*tp = 0;
|
||||
|
||||
#ifdef HAVE_HESIOD_INIT
|
||||
|
@ -104,22 +101,18 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp)
|
|||
int error;
|
||||
#endif /* not HAVE_HESIOD_INIT */
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("hesiod_search(m=%lx, map=%s, key=%s, pval=%lx tp=%lx)",
|
||||
(unsigned long) m, map, key, (unsigned long) pval, (unsigned long) tp);
|
||||
#endif /* DEBUG */
|
||||
|
||||
sprintf(hes_key, "%s.%s", key, map + HES_PREFLEN);
|
||||
|
||||
/*
|
||||
* Call the resolver
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
dlog("Hesiod base is: %s\n", gopt.hesiod_base);
|
||||
dlog("hesiod_search: hes_resolve(%s, %s)", hes_key, gopt.hesiod_base);
|
||||
if (debug_flags & D_INFO)
|
||||
amuDebug(D_INFO)
|
||||
_res.options |= RES_DEBUG;
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifdef HAVE_HESIOD_INIT
|
||||
/* new style hesiod */
|
||||
|
@ -146,9 +139,7 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp)
|
|||
/*
|
||||
* Otherwise reflect the hesiod error into a Un*x error
|
||||
*/
|
||||
# ifdef DEBUG
|
||||
dlog("hesiod_search: Error: %d", hes_error());
|
||||
# endif /* DEBUG */
|
||||
switch (hes_error()) {
|
||||
case HES_ER_NOTFOUND:
|
||||
error = ENOENT;
|
||||
|
@ -163,9 +154,7 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp)
|
|||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
# ifdef DEBUG
|
||||
dlog("hesiod_search: Returning: %d", error);
|
||||
# endif /* DEBUG */
|
||||
return error;
|
||||
#endif /* not HAVE_HESIOD_INIT */
|
||||
}
|
||||
|
@ -185,9 +174,7 @@ hesiod_isup(mnt_map *m, char *map)
|
|||
static int last_status = 1; /* assume up by default */
|
||||
|
||||
error = hesiod_search(m, map, "/defaults", &val, &mtime);
|
||||
#ifdef DEBUG
|
||||
dlog("hesiod_isup(%s): %s", map, strerror(error));
|
||||
#endif /* DEBUG */
|
||||
if (error != 0 && error != ENOENT) {
|
||||
plog(XLOG_ERROR,
|
||||
"hesiod_isup: error getting `/defaults' entry in map %s: %m", map);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_ldap.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_ldap.c,v 1.1.1.5 2002/11/29 22:58:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_ldap.c,v 1.9.2.2 2001/01/12 23:28:56 ro Exp
|
||||
* Id: info_ldap.c,v 1.17 2002/06/22 18:16:14 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -83,14 +82,14 @@
|
|||
*/
|
||||
typedef struct ald_ent ALD;
|
||||
typedef struct cr_ent CR;
|
||||
typedef struct he_ent HE;
|
||||
typedef struct he_ent HE_ENT;
|
||||
|
||||
/*
|
||||
* STRUCTURES:
|
||||
*/
|
||||
struct ald_ent {
|
||||
LDAP *ldap;
|
||||
HE *hostent;
|
||||
HE_ENT *hostent;
|
||||
CR *credentials;
|
||||
time_t timestamp;
|
||||
};
|
||||
|
@ -111,7 +110,7 @@ struct he_ent {
|
|||
* FORWARD DECLARATIONS:
|
||||
*/
|
||||
static int amu_ldap_rebind(ALD *a);
|
||||
static int get_ldap_timestamp(LDAP *ld, char *map, time_t *ts);
|
||||
static int get_ldap_timestamp(ALD *a, char *map, time_t *ts);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -119,7 +118,7 @@ static int get_ldap_timestamp(LDAP *ld, char *map, time_t *ts);
|
|||
*/
|
||||
|
||||
static void
|
||||
he_free(HE *h)
|
||||
he_free(HE_ENT *h)
|
||||
{
|
||||
XFREE(h->host);
|
||||
if (h->next != NULL)
|
||||
|
@ -128,22 +127,22 @@ he_free(HE *h)
|
|||
}
|
||||
|
||||
|
||||
static HE *
|
||||
static HE_ENT *
|
||||
string2he(char *s_orig)
|
||||
{
|
||||
char *c, *p;
|
||||
char *s;
|
||||
HE *new, *old = NULL;
|
||||
HE_ENT *new, *old = NULL;
|
||||
|
||||
if (NULL == s_orig || NULL == (s = strdup(s_orig)))
|
||||
return NULL;
|
||||
for (p = s; p; p = strchr(p, ',')) {
|
||||
if (old != NULL) {
|
||||
new = ALLOC(HE);
|
||||
new = ALLOC(HE_ENT);
|
||||
old->next = new;
|
||||
old = new;
|
||||
} else {
|
||||
old = ALLOC(HE);
|
||||
old = ALLOC(HE_ENT);
|
||||
old->next = NULL;
|
||||
}
|
||||
c = strchr(p, ':');
|
||||
|
@ -186,23 +185,23 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts)
|
|||
ALD *aldh;
|
||||
CR *creds;
|
||||
|
||||
dlog("-> amu_ldap_init: map <%s>\n", map);
|
||||
|
||||
/*
|
||||
* XXX: by checking that map_type must be defined, aren't we
|
||||
* excluding the possibility of automatic searches through all
|
||||
* map types?
|
||||
*/
|
||||
if (!gopt.map_type || !STREQ(gopt.map_type, AMD_LDAP_TYPE)) {
|
||||
return (ENOENT);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else {
|
||||
plog(XLOG_WARNING, "amu_ldap_init called with map_type <%s>\n",
|
||||
(gopt.map_type ? gopt.map_type : "null"));
|
||||
} else {
|
||||
dlog("Map %s is ldap\n", map);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
aldh = ALLOC(ALD);
|
||||
creds = ALLOC(CR);
|
||||
|
||||
aldh->ldap = NULL ;
|
||||
aldh->hostent = string2he(gopt.ldap_hostports);
|
||||
if (aldh->hostent == NULL) {
|
||||
plog(XLOG_USER, "Unable to parse hostport %s for ldap map %s",
|
||||
|
@ -214,22 +213,17 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts)
|
|||
creds->method = LDAP_AUTH_SIMPLE;
|
||||
aldh->credentials = creds;
|
||||
aldh->timestamp = 0;
|
||||
#ifdef DEBUG
|
||||
aldh->ldap = NULL;
|
||||
dlog("Trying for %s:%d\n", aldh->hostent->host, aldh->hostent->port);
|
||||
#endif /* DEBUG */
|
||||
if (amu_ldap_rebind(aldh)) {
|
||||
ald_free(aldh);
|
||||
return (ENOENT);
|
||||
}
|
||||
m->map_data = (void *) aldh;
|
||||
#ifdef DEBUG
|
||||
dlog("Bound to %s:%d\n", aldh->hostent->host, aldh->hostent->port);
|
||||
#endif /* DEBUG */
|
||||
if (get_ldap_timestamp(aldh->ldap, map, ts))
|
||||
if (get_ldap_timestamp(aldh, map, ts))
|
||||
return (ENOENT);
|
||||
#ifdef DEBUG
|
||||
dlog("Got timestamp for map %s: %ld\n", map, *ts);
|
||||
#endif /* DEBUG */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -239,20 +233,24 @@ static int
|
|||
amu_ldap_rebind(ALD *a)
|
||||
{
|
||||
LDAP *ld;
|
||||
HE *h;
|
||||
HE_ENT *h;
|
||||
CR *c = a->credentials;
|
||||
time_t now = clocktime();
|
||||
int try;
|
||||
|
||||
dlog("-> amu_ldap_rebind\n");
|
||||
|
||||
if (a->ldap != NULL) {
|
||||
if ((a->timestamp - now) > AMD_LDAP_TTL) {
|
||||
#ifdef DEBUG
|
||||
dlog("Reestablishing ldap connection\n");
|
||||
#endif /* DEBUG */
|
||||
dlog("Re-establishing ldap connection\n");
|
||||
ldap_unbind(a->ldap);
|
||||
a->timestamp = now;
|
||||
} else
|
||||
a->ldap = NULL;
|
||||
} else {
|
||||
/* Assume all is OK. If it wasn't we'll be back! */
|
||||
dlog("amu_ldap_rebind: timestamp OK\n");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
for (try=0; try<10; try++) { /* XXX: try up to 10 times (makes sense?) */
|
||||
|
@ -267,11 +265,15 @@ amu_ldap_rebind(ALD *a)
|
|||
break;
|
||||
}
|
||||
if (gopt.ldap_cache_seconds > 0) {
|
||||
#ifdef HAVE_LDAP_ENABLE_CACHE
|
||||
ldap_enable_cache(ld, gopt.ldap_cache_seconds, gopt.ldap_cache_maxmem);
|
||||
a->ldap = ld;
|
||||
a->timestamp = now;
|
||||
return (0);
|
||||
#else /* HAVE_LDAP_ENABLE_CACHE */
|
||||
plog(XLOG_WARNING, "ldap_enable_cache(%d) does not exist on this system!\n", gopt.ldap_cache_seconds);
|
||||
#endif /* HAVE_LDAP_ENABLE_CACHE */
|
||||
}
|
||||
a->ldap = ld;
|
||||
a->timestamp = now;
|
||||
return (0);
|
||||
}
|
||||
plog(XLOG_WARNING, "Exhausted list of ldap servers, looping.\n");
|
||||
}
|
||||
|
@ -282,24 +284,24 @@ amu_ldap_rebind(ALD *a)
|
|||
|
||||
|
||||
static int
|
||||
get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
|
||||
get_ldap_timestamp(ALD *a, char *map, time_t *ts)
|
||||
{
|
||||
struct timeval tv;
|
||||
char **vals, *end;
|
||||
char filter[MAXPATHLEN];
|
||||
int i, err = 0, nentries = 0;
|
||||
LDAPMessage *res, *entry;
|
||||
LDAPMessage *res = NULL, *entry;
|
||||
|
||||
dlog("-> get_ldap_timestamp: map <%s>\n", map);
|
||||
|
||||
tv.tv_sec = 3;
|
||||
tv.tv_usec = 0;
|
||||
sprintf(filter, AMD_LDAP_TSFILTER, map);
|
||||
#ifdef DEBUG
|
||||
dlog("Getting timestamp for map %s\n", map);
|
||||
dlog("Filter is: %s\n", filter);
|
||||
dlog("Base is: %s\n", gopt.ldap_base);
|
||||
#endif /* DEBUG */
|
||||
for (i = 0; i < AMD_LDAP_RETRIES; i++) {
|
||||
err = ldap_search_st(ld,
|
||||
err = ldap_search_st(a->ldap,
|
||||
gopt.ldap_base,
|
||||
LDAP_SCOPE_SUBTREE,
|
||||
filter,
|
||||
|
@ -309,19 +311,32 @@ get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
|
|||
&res);
|
||||
if (err == LDAP_SUCCESS)
|
||||
break;
|
||||
#ifdef DEBUG
|
||||
dlog("Timestamp search timed out, trying again...\n");
|
||||
#endif /* DEBUG */
|
||||
if (res) {
|
||||
ldap_msgfree(res);
|
||||
res = NULL;
|
||||
}
|
||||
plog(XLOG_USER, "Timestamp LDAP search attempt %d failed: %s\n",
|
||||
i + 1, ldap_err2string(err));
|
||||
if (err != LDAP_TIMEOUT) {
|
||||
dlog("get_ldap_timestamp: unbinding...\n");
|
||||
ldap_unbind(a->ldap);
|
||||
a->ldap = NULL;
|
||||
if (amu_ldap_rebind(a))
|
||||
return (ENOENT);
|
||||
}
|
||||
dlog("Timestamp search failed, trying again...\n");
|
||||
}
|
||||
|
||||
if (err != LDAP_SUCCESS) {
|
||||
*ts = 0;
|
||||
plog(XLOG_USER, "LDAP timestamp search failed: %s\n",
|
||||
ldap_err2string(err));
|
||||
if (res)
|
||||
ldap_msgfree(res);
|
||||
return (ENOENT);
|
||||
}
|
||||
|
||||
nentries = ldap_count_entries(ld, res);
|
||||
nentries = ldap_count_entries(a->ldap, res);
|
||||
if (nentries == 0) {
|
||||
plog(XLOG_USER, "No timestamp entry for map %s\n", map);
|
||||
*ts = 0;
|
||||
|
@ -329,19 +344,16 @@ get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
|
|||
return (ENOENT);
|
||||
}
|
||||
|
||||
entry = ldap_first_entry(ld, res);
|
||||
vals = ldap_get_values(ld, entry, AMD_LDAP_TSATTR);
|
||||
entry = ldap_first_entry(a->ldap, res);
|
||||
vals = ldap_get_values(a->ldap, entry, AMD_LDAP_TSATTR);
|
||||
if (ldap_count_values(vals) == 0) {
|
||||
plog(XLOG_USER, "Missing timestamp value for map %s\n", map);
|
||||
*ts = 0;
|
||||
ldap_value_free(vals);
|
||||
ldap_msgfree(res);
|
||||
ldap_msgfree(entry);
|
||||
return (ENOENT);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dlog("TS value is:%s:\n", vals[0]);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (vals[0]) {
|
||||
*ts = (time_t) strtol(vals[0], &end, 10);
|
||||
|
@ -363,10 +375,7 @@ get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
|
|||
|
||||
ldap_value_free(vals);
|
||||
ldap_msgfree(res);
|
||||
ldap_msgfree(entry);
|
||||
#ifdef DEBUG
|
||||
dlog("The timestamp for %s is %ld (err=%d)\n", map, *ts, err);
|
||||
#endif /* DEBUG */
|
||||
return (err);
|
||||
}
|
||||
|
||||
|
@ -374,12 +383,15 @@ get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
|
|||
int
|
||||
amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
|
||||
{
|
||||
char **vals, filter[MAXPATHLEN];
|
||||
char **vals, filter[MAXPATHLEN], filter2[2 * MAXPATHLEN];
|
||||
char *f1, *f2;
|
||||
struct timeval tv;
|
||||
int i, err = 0, nvals = 0, nentries = 0;
|
||||
LDAPMessage *entry, *res;
|
||||
LDAPMessage *entry, *res = NULL;
|
||||
ALD *a = (ALD *) (m->map_data);
|
||||
|
||||
dlog("-> amu_ldap_search: map <%s>, key <%s>\n", map, key);
|
||||
|
||||
tv.tv_sec = 2;
|
||||
tv.tv_usec = 0;
|
||||
if (a == NULL) {
|
||||
|
@ -390,42 +402,62 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
|
|||
return (ENOENT);
|
||||
|
||||
sprintf(filter, AMD_LDAP_FILTER, map, key);
|
||||
#ifdef DEBUG
|
||||
dlog("Search with filter: %s\n", filter);
|
||||
#endif /* DEBUG */
|
||||
/* "*" is special to ldap_search(); run through the filter escaping it. */
|
||||
f1 = filter; f2 = filter2;
|
||||
while (*f1) {
|
||||
if (*f1 == '*') {
|
||||
*f2++ = '\\'; *f2++ = '2'; *f2++ = 'a';
|
||||
f1++;
|
||||
} else {
|
||||
*f2++ = *f1++;
|
||||
}
|
||||
}
|
||||
*f2 = '\0';
|
||||
dlog("Search with filter: <%s>\n", filter2);
|
||||
for (i = 0; i < AMD_LDAP_RETRIES; i++) {
|
||||
err = ldap_search_st(a->ldap,
|
||||
gopt.ldap_base,
|
||||
LDAP_SCOPE_SUBTREE,
|
||||
filter,
|
||||
filter2,
|
||||
0,
|
||||
0,
|
||||
&tv,
|
||||
&res);
|
||||
if (err == LDAP_SUCCESS)
|
||||
break;
|
||||
if (res) {
|
||||
ldap_msgfree(res);
|
||||
res = NULL;
|
||||
}
|
||||
plog(XLOG_USER, "LDAP search attempt %d failed: %s\n",
|
||||
i + 1, ldap_err2string(err));
|
||||
if (err != LDAP_TIMEOUT) {
|
||||
dlog("amu_ldap_search: unbinding...\n");
|
||||
ldap_unbind(a->ldap);
|
||||
a->ldap = NULL;
|
||||
if (amu_ldap_rebind(a))
|
||||
return (ENOENT);
|
||||
}
|
||||
}
|
||||
|
||||
switch (err) {
|
||||
case LDAP_SUCCESS:
|
||||
break;
|
||||
case LDAP_NO_SUCH_OBJECT:
|
||||
#ifdef DEBUG
|
||||
dlog("No object\n");
|
||||
#endif /* DEBUG */
|
||||
ldap_msgfree(res);
|
||||
if (res)
|
||||
ldap_msgfree(res);
|
||||
return (ENOENT);
|
||||
default:
|
||||
plog(XLOG_USER, "LDAP search failed: %s\n",
|
||||
ldap_err2string(err));
|
||||
ldap_msgfree(res);
|
||||
if (res)
|
||||
ldap_msgfree(res);
|
||||
return (EIO);
|
||||
}
|
||||
|
||||
nentries = ldap_count_entries(a->ldap, res);
|
||||
#ifdef DEBUG
|
||||
dlog("Search found %d entries\n", nentries);
|
||||
#endif /* DEBUG */
|
||||
if (nentries == 0) {
|
||||
ldap_msgfree(res);
|
||||
return (ENOENT);
|
||||
|
@ -437,12 +469,9 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
|
|||
plog(XLOG_USER, "Missing value for %s in map %s\n", key, map);
|
||||
ldap_value_free(vals);
|
||||
ldap_msgfree(res);
|
||||
ldap_msgfree(entry);
|
||||
return (EIO);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dlog("Map %s, %s => %s\n", map, key, vals[0]);
|
||||
#endif /* DEBUG */
|
||||
if (vals[0]) {
|
||||
*pval = strdup(vals[0]);
|
||||
err = 0;
|
||||
|
@ -451,7 +480,6 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
|
|||
err = ENOENT;
|
||||
}
|
||||
ldap_msgfree(res);
|
||||
ldap_msgfree(entry);
|
||||
ldap_value_free(vals);
|
||||
|
||||
return (err);
|
||||
|
@ -464,15 +492,13 @@ amu_ldap_mtime(mnt_map *m, char *map, time_t *ts)
|
|||
ALD *aldh = (ALD *) (m->map_data);
|
||||
|
||||
if (aldh == NULL) {
|
||||
#ifdef DEBUG
|
||||
dlog("LDAP panic: unable to find map data\n");
|
||||
#endif /* DEBUG */
|
||||
return (ENOENT);
|
||||
}
|
||||
if (amu_ldap_rebind(aldh)) {
|
||||
return (ENOENT);
|
||||
}
|
||||
if (get_ldap_timestamp(aldh->ldap, map, ts)) {
|
||||
if (get_ldap_timestamp(aldh, map, ts)) {
|
||||
return (ENOENT);
|
||||
}
|
||||
return (0);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_ndbm.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_ndbm.c,v 1.1.1.5 2002/11/29 22:58:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_ndbm.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp
|
||||
* Id: info_ndbm.c,v 1.6 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_nis.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_nis.c,v 1.1.1.5 2002/11/29 22:58:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_nis.c,v 1.6.2.2 2001/04/14 21:08:21 ezk Exp
|
||||
* Id: info_nis.c,v 1.12 2002/06/23 01:05:38 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -109,9 +108,7 @@ determine_nis_domain(void)
|
|||
}
|
||||
if (!*default_domain) {
|
||||
nis_not_running = 1;
|
||||
#ifdef DEBUG
|
||||
plog(XLOG_WARNING, "NIS domain name is not set. NIS ignored.");
|
||||
#endif /* DEBUG */
|
||||
return ENOENT;
|
||||
}
|
||||
gopt.nis_domain = strdup(default_domain);
|
||||
|
@ -146,12 +143,8 @@ callback(int status, char *key, int kl, char *val, int vl, char *data)
|
|||
/* check what went wrong */
|
||||
int e = ypprot_err(status);
|
||||
|
||||
#ifdef DEBUG
|
||||
plog(XLOG_ERROR, "yp enumeration of %s: %s, status=%d, e=%d",
|
||||
ncdp->ncd_map, yperr_string(e), status, e);
|
||||
#else /* not DEBUG */
|
||||
plog(XLOG_ERROR, "yp enumeration of %s: %s", ncdp->ncd_map, yperr_string(e));
|
||||
#endif /* not DEBUG */
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -352,9 +345,7 @@ nis_init(mnt_map *m, char *map, time_t *tp)
|
|||
/* NIS server found */
|
||||
has_yp_order = 1;
|
||||
*tp = (time_t) order;
|
||||
#ifdef DEBUG
|
||||
dlog("NIS master for %s@%s has order %lu", map, gopt.nis_domain, (unsigned long) order);
|
||||
#endif /* DEBUG */
|
||||
break;
|
||||
case YPERR_YPERR:
|
||||
/* NIS+ server found ! */
|
||||
|
@ -363,9 +354,7 @@ nis_init(mnt_map *m, char *map, time_t *tp)
|
|||
if (yp_master(gopt.nis_domain, map, &master)) {
|
||||
return ENOENT;
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
dlog("NIS master for %s@%s is a NIS+ server", map, gopt.nis_domain);
|
||||
#endif /* DEBUG */
|
||||
/* Use fake timestamps */
|
||||
*tp = time(NULL);
|
||||
}
|
||||
|
@ -444,11 +433,9 @@ am_yp_all(char *indomain, char *inmap, struct ypall_callback *incallback)
|
|||
&outvallen);
|
||||
XFREE(outkey_old);
|
||||
} while (!i);
|
||||
#ifdef DEBUG
|
||||
if (i) {
|
||||
dlog("yp_next() returned error: %s\n", yperr_string(i));
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
if (i == YPERR_NOMORE)
|
||||
return 0;
|
||||
return i;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_nisplus.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_nisplus.c,v 1.1.1.5 2002/11/29 22:58:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_nisplus.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp
|
||||
* Id: info_nisplus.c,v 1.8 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -76,9 +75,7 @@ nisplus_callback(const nis_name key, const nis_object *value, voidp opaquedata)
|
|||
char *vp = strnsave(ENTRY_VAL(value, 1), ENTRY_LEN(value, 1));
|
||||
struct nis_callback_data *data = (struct nis_callback_data *) opaquedata;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus callback for <%s,%s>", kp, vp);
|
||||
#endif /* DEBUG */
|
||||
|
||||
(*data->ncd_fn) (data->ncd_m, kp, vp);
|
||||
|
||||
|
@ -117,9 +114,7 @@ nisplus_reload(mnt_map *m, char *map, void (*fn) ())
|
|||
data.ncd_map = map_name;
|
||||
data.ncd_fn = fn;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus reload for %s", map);
|
||||
#endif /* DEBUG */
|
||||
|
||||
result = nis_list(map_name,
|
||||
EXPAND_NAME | FOLLOW_LINKS | FOLLOW_PATH,
|
||||
|
@ -147,10 +142,8 @@ nisplus_search_callback(const nis_name key, const nis_object *value, voidp opaqu
|
|||
{
|
||||
struct nisplus_search_callback_data *data = (struct nisplus_search_callback_data *) opaquedata;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus search callback for <%s>", ENTRY_VAL(value, 0));
|
||||
dlog("NISplus search callback value <%s>", ENTRY_VAL(value, 1));
|
||||
#endif /* DEBUG */
|
||||
|
||||
data->value = strnsave(ENTRY_VAL(value, 1), ENTRY_LEN(value, 1));
|
||||
return TRUE;
|
||||
|
@ -196,9 +189,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
|
|||
data.key = key;
|
||||
data.value = NULL;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus search for %s", index);
|
||||
#endif /* DEBUG */
|
||||
|
||||
result = nis_list(index,
|
||||
EXPAND_NAME | FOLLOW_LINKS | FOLLOW_PATH,
|
||||
|
@ -222,11 +213,9 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
|
|||
|
||||
if (data.value == NULL) {
|
||||
nis_object *value = result->objects.objects_val;
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus search found <nothing>");
|
||||
dlog("NISplus search for %s: %s(%d)",
|
||||
map, nis_sperrno(result->status), result->status);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (value != NULL)
|
||||
data.value = strnsave(ENTRY_VAL(value, 1), ENTRY_LEN(value, 1));
|
||||
|
@ -235,23 +224,17 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
|
|||
|
||||
if (*val) {
|
||||
error = 0;
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus search found %s", *val);
|
||||
#endif /* DEBUG */
|
||||
} else {
|
||||
error = ENOENT;
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus search found nothing");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
*tp = 0;
|
||||
break;
|
||||
|
||||
case NIS_NOSUCHNAME:
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus search returned %d", result->status);
|
||||
#endif /* DEBUG */
|
||||
error = ENOENT;
|
||||
break;
|
||||
|
||||
|
@ -302,10 +285,8 @@ nisplus_init(mnt_map *m, char *map, time_t *tp)
|
|||
}
|
||||
|
||||
if (result->status != NIS_SUCCESS) {
|
||||
#ifdef DEBUG
|
||||
dlog("NISplus init <%s>: %s (%d)",
|
||||
map, nis_sperrno(result->status), result->status);
|
||||
#endif /* DEBUG */
|
||||
|
||||
error = ENOENT;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_passwd.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_passwd.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_passwd.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp
|
||||
* Id: info_passwd.c,v 1.7 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -180,9 +179,7 @@ passwd_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp)
|
|||
p = "type:=nfs;rfs:=/${var0}/${var1};rhost:=${var1};sublink:=${var2};fs:=${autodir}${var3}";
|
||||
sprintf(val, "var0:=%s;var1:=%s;var2:=%s;var3:=%s;%s",
|
||||
dir+1, rhost, user, pw->pw_dir, p);
|
||||
#ifdef DEBUG
|
||||
dlog("passwd_search: map=%s key=%s -> %s", map, key, val);
|
||||
#endif /* DEBUG */
|
||||
if (q)
|
||||
*q = '.';
|
||||
*pval = strdup(val);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: info_union.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: info_union.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: info_union.c,v 1.3.2.1 2001/01/10 03:23:07 ezk Exp
|
||||
* Id: info_union.c,v 1.7 2002/02/02 20:58:54 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -116,9 +115,7 @@ union_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *))
|
|||
}
|
||||
dlen = strlen(*dir);
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Reading directory %s...", *dir);
|
||||
#endif /* DEBUG */
|
||||
while ((dp = readdir(dirp))) {
|
||||
char *val, *dpname = &dp->d_name[0];
|
||||
if (dpname[0] == '.' &&
|
||||
|
@ -126,9 +123,7 @@ union_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *))
|
|||
(dpname[1] == '.' && dpname[2] == '\0')))
|
||||
continue;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("... gives %s", dp->d_name);
|
||||
#endif /* DEBUG */
|
||||
val = xmalloc(dlen + 5);
|
||||
sprintf(val, "fs:=%s", *dir);
|
||||
(*fn) (m, strdup(dp->d_name), val);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: map.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: map.c,v 1.1.1.5 2002/11/29 22:58:14 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: map.c,v 1.6.2.3 2001/01/10 03:23:07 ezk Exp
|
||||
* Id: map.c,v 1.32 2002/06/24 03:05:15 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -52,7 +51,6 @@
|
|||
|
||||
#define smallest_t(t1, t2) (t1 != NEVER ? (t2 != NEVER ? (t1 < t2 ? t1 : t2) : t1) : t2)
|
||||
#define IGNORE_FLAGS (MFF_MOUNTING|MFF_UNMOUNTING|MFF_RESTART)
|
||||
#define NEVER (time_t) 0
|
||||
#define new_gen() (am_gen++)
|
||||
|
||||
/*
|
||||
|
@ -108,6 +106,7 @@ static nfsfattr gen_fattr =
|
|||
static int unmount_node(am_node *mp);
|
||||
static void exported_ap_free(am_node *mp);
|
||||
static void remove_am(am_node *mp);
|
||||
static am_node *get_root_ap(char *dir, int path);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -133,6 +132,46 @@ exported_ap_realloc_map(int nsize)
|
|||
}
|
||||
|
||||
|
||||
|
||||
am_node *
|
||||
get_ap_child(am_node *mp, char *fname)
|
||||
{
|
||||
am_node *new_mp;
|
||||
mntfs *mf = mp->am_mnt;
|
||||
|
||||
/*
|
||||
* Allocate a new map
|
||||
*/
|
||||
new_mp = exported_ap_alloc();
|
||||
if (new_mp) {
|
||||
/*
|
||||
* Fill it in
|
||||
*/
|
||||
init_map(new_mp, fname);
|
||||
|
||||
/*
|
||||
* Put it in the table
|
||||
*/
|
||||
insert_am(new_mp, mp);
|
||||
|
||||
/*
|
||||
* Fill in some other fields,
|
||||
* path and mount point.
|
||||
*
|
||||
* bugfix: do not prepend old am_path if direct map
|
||||
* <wls@astro.umd.edu> William Sebok
|
||||
*/
|
||||
new_mp->am_path = str3cat(new_mp->am_path,
|
||||
(mf->mf_fsflags & FS_DIRECT)
|
||||
? ""
|
||||
: mp->am_path,
|
||||
*fname == '/' ? "" : "/", fname);
|
||||
dlog("setting path to %s", new_mp->am_path);
|
||||
}
|
||||
|
||||
return new_mp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate a new mount slot and create
|
||||
* a new node.
|
||||
|
@ -231,6 +270,10 @@ insert_am(am_node *mp, am_node *p_mp)
|
|||
if (mp->am_osib)
|
||||
mp->am_osib->am_ysib = mp;
|
||||
p_mp->am_child = mp;
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (p_mp->am_mnt->mf_flags & MFF_AUTOFS)
|
||||
mp->am_flags |= AMF_AUTOFS;
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
}
|
||||
|
||||
|
||||
|
@ -310,12 +353,16 @@ init_map(am_node *mp, char *dir)
|
|||
{
|
||||
/*
|
||||
* mp->am_mapno is initialized by exported_ap_alloc
|
||||
* other fields don't need to be initialized.
|
||||
* other fields don't need to be set to zero.
|
||||
*/
|
||||
mp->am_mnt = new_mntfs();
|
||||
mp->am_mfarray = 0;
|
||||
mp->am_name = strdup(dir);
|
||||
mp->am_path = strdup(dir);
|
||||
mp->am_gen = new_gen();
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
mp->am_autofs_data = 0;
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
mp->am_timeo = gopt.am_timeo;
|
||||
mp->am_attr.ns_status = NFS_OK;
|
||||
|
@ -328,6 +375,8 @@ init_map(am_node *mp, char *dir)
|
|||
|
||||
new_ttl(mp);
|
||||
mp->am_stats.s_mtime = mp->am_fattr.na_atime.nt_seconds;
|
||||
mp->am_dev = -1;
|
||||
mp->am_rdev = -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -355,6 +404,21 @@ free_map(am_node *mp)
|
|||
if (mp->am_mnt)
|
||||
free_mntfs(mp->am_mnt);
|
||||
|
||||
if (mp->am_transp)
|
||||
XFREE(mp->am_transp);
|
||||
|
||||
if (mp->am_mfarray) {
|
||||
mntfs **temp_mf;
|
||||
for (temp_mf = mp->am_mfarray; *temp_mf; temp_mf++)
|
||||
free_mntfs(*temp_mf);
|
||||
XFREE(mp->am_mfarray);
|
||||
}
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_autofs_data)
|
||||
mp->am_autofs_free_data(mp->am_autofs_data);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
exported_ap_free(mp);
|
||||
}
|
||||
|
||||
|
@ -412,10 +476,8 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int c_or_d)
|
|||
int error;
|
||||
am_node *orig_ap = ap;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("fh_to_mp3: %s (%s) is hung:- call lookup",
|
||||
orig_ap->am_path, orig_ap->am_mnt->mf_info);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Update modify time of parent node.
|
||||
|
@ -432,8 +494,9 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int c_or_d)
|
|||
* to the caller.
|
||||
*/
|
||||
if (c_or_d == VLOOK_CREATE) {
|
||||
ap = (*orig_ap->am_parent->am_mnt->mf_ops->lookuppn)
|
||||
(orig_ap->am_parent, orig_ap->am_name, &error, c_or_d);
|
||||
ap = orig_ap->am_parent->am_mnt->mf_ops->lookup_child(orig_ap->am_parent, orig_ap->am_name, &error, c_or_d);
|
||||
if (ap && error < 0)
|
||||
ap = orig_ap->am_parent->am_mnt->mf_ops->mount_child(ap, &error);
|
||||
} else {
|
||||
ap = 0;
|
||||
error = ESTALE;
|
||||
|
@ -535,8 +598,8 @@ mp_to_fh(am_node *mp, am_nfs_fh *fhp)
|
|||
}
|
||||
|
||||
|
||||
am_node *
|
||||
find_ap2(char *dir, am_node *mp)
|
||||
static am_node *
|
||||
find_ap_recursive(char *dir, am_node *mp)
|
||||
{
|
||||
if (mp) {
|
||||
am_node *mp2;
|
||||
|
@ -547,10 +610,10 @@ find_ap2(char *dir, am_node *mp)
|
|||
STREQ(mp->am_mnt->mf_mount, dir))
|
||||
return mp;
|
||||
|
||||
mp2 = find_ap2(dir, mp->am_osib);
|
||||
mp2 = find_ap_recursive(dir, mp->am_osib);
|
||||
if (mp2)
|
||||
return mp2;
|
||||
return find_ap2(dir, mp->am_child);
|
||||
return find_ap_recursive(dir, mp->am_child);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -569,7 +632,7 @@ find_ap(char *dir)
|
|||
for (i = last_used_map; i >= 0; --i) {
|
||||
am_node *mp = exported_ap[i];
|
||||
if (mp && (mp->am_flags & AMF_ROOT)) {
|
||||
mp = find_ap2(dir, exported_ap[i]);
|
||||
mp = find_ap_recursive(dir, exported_ap[i]);
|
||||
if (mp) {
|
||||
return mp;
|
||||
}
|
||||
|
@ -605,10 +668,10 @@ find_mf(mntfs *mf)
|
|||
* the filehandles of the initial automount points.
|
||||
*/
|
||||
am_nfs_fh *
|
||||
root_fh(char *dir)
|
||||
get_root_nfs_fh(char *dir)
|
||||
{
|
||||
static am_nfs_fh nfh;
|
||||
am_node *mp = root_ap(dir, TRUE);
|
||||
am_node *mp = get_root_ap(dir, TRUE);
|
||||
if (mp) {
|
||||
mp_to_fh(mp, &nfh);
|
||||
/*
|
||||
|
@ -617,9 +680,7 @@ root_fh(char *dir)
|
|||
if (!foreground) {
|
||||
long pid = getppid();
|
||||
((struct am_fh *) &nfh)->fhh_pid = pid;
|
||||
#ifdef DEBUG
|
||||
dlog("root_fh substitutes pid %ld", (long) pid);
|
||||
#endif /* DEBUG */
|
||||
dlog("get_root_nfs_fh substitutes pid %ld", (long) pid);
|
||||
}
|
||||
return &nfh;
|
||||
}
|
||||
|
@ -633,8 +694,8 @@ root_fh(char *dir)
|
|||
}
|
||||
|
||||
|
||||
am_node *
|
||||
root_ap(char *dir, int path)
|
||||
static am_node *
|
||||
get_root_ap(char *dir, int path)
|
||||
{
|
||||
am_node *mp = find_ap(dir);
|
||||
|
||||
|
@ -678,8 +739,19 @@ int
|
|||
mount_auto_node(char *dir, voidp arg)
|
||||
{
|
||||
int error = 0;
|
||||
am_node *mp = (am_node *) arg;
|
||||
am_node *am;
|
||||
|
||||
(void) amfs_auto_ops.lookuppn((am_node *) arg, dir, &error, VLOOK_CREATE);
|
||||
/*
|
||||
* this should be:
|
||||
* mp->am_mnt->mf_opts->lookup_child(.....);
|
||||
*
|
||||
* as it is, it uses amfs_auto's lookup_child method regardless
|
||||
* of the parent filesystem's type
|
||||
*/
|
||||
am = amfs_auto_lookup_child(mp, dir, &error, VLOOK_CREATE);
|
||||
if (am && error < 0)
|
||||
am = amfs_auto_mount_child(am, &error);
|
||||
if (error > 0) {
|
||||
errno = error; /* XXX */
|
||||
plog(XLOG_ERROR, "Could not mount %s: %m", dir);
|
||||
|
@ -737,7 +809,7 @@ make_root_node(void)
|
|||
/*
|
||||
* Mount the root
|
||||
*/
|
||||
root_mnt->mf_error = (*root_mnt->mf_ops->mount_fs) (root_node);
|
||||
root_mnt->mf_error = (*root_mnt->mf_ops->mount_fs) (root_node, root_mnt);
|
||||
}
|
||||
|
||||
|
||||
|
@ -765,7 +837,7 @@ umount_exported(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (mf && !(mf->mf_ops->fs_flags & FS_DIRECTORY)) {
|
||||
if (mf && !(mf->mf_fsflags & FS_DIRECTORY)) {
|
||||
/*
|
||||
* When shutting down this had better
|
||||
* look like a directory, otherwise it
|
||||
|
@ -786,7 +858,7 @@ umount_exported(void)
|
|||
if (mf->mf_server &&
|
||||
(mf->mf_server->fs_flags & (FSF_DOWN | FSF_VALID)) != FSF_VALID)
|
||||
mf->mf_flags &= ~MFF_MKMNT;
|
||||
if (gopt.flags & CFM_UNMOUNT_ON_EXIT) {
|
||||
if (gopt.flags & CFM_UNMOUNT_ON_EXIT || mp->am_flags & AMF_AUTOFS) {
|
||||
plog(XLOG_INFO, "on-exit attempt to unmount %s", mf->mf_mount);
|
||||
unmount_node(mp);
|
||||
}
|
||||
|
@ -817,23 +889,17 @@ unmount_node(am_node *mp)
|
|||
/*
|
||||
* Just unlink
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (mf->mf_flags & MFF_ERROR)
|
||||
dlog("No-op unmount of error node %s", mf->mf_info);
|
||||
#endif /* DEBUG */
|
||||
error = 0;
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
dlog("Unmounting %s (%s)", mf->mf_mount, mf->mf_info);
|
||||
#endif /* DEBUG */
|
||||
error = (*mf->mf_ops->umount_fs) (mp);
|
||||
error = (*mf->mf_ops->umount_fs) (mp, mf);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
errno = error; /* XXX */
|
||||
#ifdef DEBUG
|
||||
dlog("%s: unmount: %m", mf->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
return error;
|
||||
|
@ -877,7 +943,7 @@ unmount_node_wrap(voidp vp)
|
|||
* There is still a race condition here...
|
||||
* if another process is trying to access the same
|
||||
* filesystem at the time we get here, then
|
||||
* it will block, since the MF_UNMOUNTING flag will
|
||||
* it will block, since the MFF_UNMOUNTING flag will
|
||||
* be set. That may, or may not, cause the entire
|
||||
* system to deadlock. Hmmm...
|
||||
*/
|
||||
|
@ -914,27 +980,33 @@ free_map_if_success(int rc, int term, voidp closure)
|
|||
am_unmounted(mp);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_flags & AMF_AUTOFS)
|
||||
autofs_umount_failed(mp);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
amd_stats.d_uerr++;
|
||||
} else if (rc) {
|
||||
if (mf->mf_ops == &amfs_program_ops || rc == EBUSY) {
|
||||
if (mf->mf_ops == &amfs_program_ops || rc == EBUSY)
|
||||
plog(XLOG_STATS, "\"%s\" on %s still active", mp->am_path, mf->mf_mount);
|
||||
} else {
|
||||
errno = rc; /* XXX */
|
||||
plog(XLOG_ERROR, "%s: unmount: %m", mp->am_path);
|
||||
}
|
||||
else
|
||||
plog(XLOG_ERROR, "%s: unmount: %s", mp->am_path, strerror(rc));
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mp->am_flags & AMF_AUTOFS)
|
||||
autofs_umount_failed(mp);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
amd_stats.d_uerr++;
|
||||
} else {
|
||||
am_unmounted(mp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wakeup anything waiting for this mount
|
||||
* Wakeup anything waiting for this unmount
|
||||
*/
|
||||
wakeup((voidp) mf);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
int
|
||||
unmount_mp(am_node *mp)
|
||||
{
|
||||
int was_backgrounded = 0;
|
||||
|
@ -946,20 +1018,27 @@ unmount_mp(am_node *mp)
|
|||
* 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.
|
||||
*
|
||||
* Additionally, Linux currently ignores the nt_useconds field,
|
||||
* so we must update the nt_seconds field every time.
|
||||
*/
|
||||
if (mp->am_parent) {
|
||||
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;
|
||||
}
|
||||
mp->am_parent->am_attr.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 */
|
||||
|
||||
if ((mf->mf_ops->fs_flags & FS_UBACKGROUND) &&
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mf->mf_flags & MFF_AUTOFS) {
|
||||
autofs_release_fh(mf->mf_autofs_fh);
|
||||
mf->mf_autofs_fh = 0;
|
||||
}
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
if ((mf->mf_fsflags & FS_UBACKGROUND) &&
|
||||
(mf->mf_flags & MFF_MOUNTED)) {
|
||||
if (mf->mf_refc == 1 && !FSRV_ISUP(mf->mf_server)) {
|
||||
/*
|
||||
|
@ -973,10 +1052,8 @@ unmount_mp(am_node *mp)
|
|||
} else {
|
||||
/* Clear logdown flag - since the server must be up */
|
||||
mf->mf_flags &= ~MFF_LOGDOWN;
|
||||
#ifdef DEBUG
|
||||
dlog("\"%s\" on %s timed out", mp->am_path, mp->am_mnt->mf_mount);
|
||||
/* dlog("Will background the unmount attempt"); */
|
||||
#endif /* DEBUG */
|
||||
/*
|
||||
* Note that we are unmounting this node
|
||||
*/
|
||||
|
@ -984,20 +1061,14 @@ unmount_mp(am_node *mp)
|
|||
run_task(unmount_node_wrap, (voidp) mp,
|
||||
free_map_if_success, (voidp) mp);
|
||||
was_backgrounded = 1;
|
||||
#ifdef DEBUG
|
||||
dlog("unmount attempt backgrounded");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
dlog("\"%s\" on %s timed out", mp->am_path, mp->am_mnt->mf_mount);
|
||||
dlog("Trying unmount in foreground");
|
||||
#endif /* DEBUG */
|
||||
mf->mf_flags |= MFF_UNMOUNTING;
|
||||
free_map_if_success(unmount_node(mp), 0, (voidp) mp);
|
||||
#ifdef DEBUG
|
||||
dlog("unmount attempt done");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
return was_backgrounded;
|
||||
|
@ -1012,18 +1083,16 @@ timeout_mp(voidp v)
|
|||
time_t now = clocktime();
|
||||
int backoff = NumChild / 4;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Timing out automount points...");
|
||||
#endif /* DEBUG */
|
||||
|
||||
for (i = last_used_map; i >= 0; --i) {
|
||||
am_node *mp = exported_ap[i];
|
||||
mntfs *mf;
|
||||
|
||||
/*
|
||||
* Just continue if nothing mounted, or can't be timed out.
|
||||
* Just continue if nothing mounted
|
||||
*/
|
||||
if (!mp || (mp->am_flags & AMF_NOTIMEOUT))
|
||||
if (!mp)
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
@ -1033,6 +1102,17 @@ timeout_mp(voidp v)
|
|||
if (!mf)
|
||||
continue;
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (mf->mf_flags & MFF_AUTOFS) {
|
||||
if (now >= mp->am_ttl)
|
||||
autofs_timeout_mp(mp);
|
||||
t = smallest_t(t, mp->am_ttl);
|
||||
}
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
if (mp->am_flags & AMF_NOTIMEOUT)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Don't delete last reference to a restarted filesystem.
|
||||
*/
|
||||
|
@ -1089,9 +1169,7 @@ timeout_mp(voidp v)
|
|||
}
|
||||
|
||||
if (t == NEVER) {
|
||||
#ifdef DEBUG
|
||||
dlog("No further timeouts");
|
||||
#endif /* DEBUG */
|
||||
t = now + ONE_HOUR;
|
||||
}
|
||||
|
||||
|
@ -1110,9 +1188,7 @@ timeout_mp(voidp v)
|
|||
*/
|
||||
if ((int) amd_state >= (int) Finishing)
|
||||
t = now + 1;
|
||||
#ifdef DEBUG
|
||||
dlog("Next mount timeout in %lds", (long) (t - now));
|
||||
#endif /* DEBUG */
|
||||
|
||||
timeout_mp_id = timeout(t - now, timeout_mp, 0);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: mapc.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: mapc.c,v 1.1.1.5 2002/11/29 22:58:14 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: mapc.c,v 1.7.2.3 2001/04/14 21:08:22 ezk Exp
|
||||
* Id: mapc.c,v 1.15 2002/02/09 06:55:42 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -388,9 +387,7 @@ mapc_add_kv(mnt_map *m, char *key, char *val)
|
|||
regex_t re;
|
||||
#endif /* HAVE_REGEXEC */
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("add_kv: %s -> %s", key, val);
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifdef HAVE_REGEXEC
|
||||
if (MAPC_ISRE(m)) {
|
||||
|
@ -514,10 +511,8 @@ mapc_reload_map(mnt_map *m)
|
|||
if (m->reloads != 0 && do_mapc_reload != 0) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -526,9 +521,7 @@ mapc_reload_map(mnt_map *m)
|
|||
memcpy((voidp) maphash, (voidp) m->kvhash, sizeof(m->kvhash));
|
||||
memset((voidp) m->kvhash, 0, sizeof(m->kvhash));
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("calling map reload on %s", m->map_name);
|
||||
#endif /* DEBUG */
|
||||
error = (*m->reload) (m, m->map_name, mapc_add_kv);
|
||||
if (error) {
|
||||
if (m->reloads == 0)
|
||||
|
@ -552,9 +545,7 @@ mapc_reload_map(mnt_map *m)
|
|||
}
|
||||
m->wildcard = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("calling mapc_search for wildcard");
|
||||
#endif /* DEBUG */
|
||||
error = mapc_search(m, wildcard, &m->wildcard);
|
||||
if (error)
|
||||
m->wildcard = 0;
|
||||
|
@ -605,9 +596,7 @@ mapc_create(char *map, char *opt, const char *type)
|
|||
for (mt = maptypes;
|
||||
mt < maptypes + sizeof(maptypes) / sizeof(maptypes[0]);
|
||||
mt++) {
|
||||
#ifdef DEBUG
|
||||
dlog("trying to initialize map %s of type %s ...", map, mt->name);
|
||||
#endif /* DEBUG */
|
||||
if ((*mt->init) (m, map, &modify) == 0) {
|
||||
break;
|
||||
}
|
||||
|
@ -654,9 +643,7 @@ mapc_create(char *map, char *opt, const char *type)
|
|||
#endif /* HAVE_REGEXEC */
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Map for %s coming from maptype %s", map, mt->name);
|
||||
#endif /* DEBUG */
|
||||
|
||||
m->alloc = alloc;
|
||||
m->reload = mt->reload;
|
||||
|
@ -734,7 +721,7 @@ mapc_find(char *map, char *opt, const char *maptype)
|
|||
* add it to the list of maps
|
||||
*/
|
||||
ITER(m, mnt_map, &map_list_head)
|
||||
if (STREQ(m->map_name, map))
|
||||
if (STREQ(m->map_name, map))
|
||||
return mapc_dup(m);
|
||||
m = mapc_create(map, opt, maptype);
|
||||
ins_que(&m->hdr, &map_list_head);
|
||||
|
@ -888,9 +875,7 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse)
|
|||
strcpy(wildname, key);
|
||||
while (error && (subp = strrchr(wildname, '/'))) {
|
||||
strcpy(subp, "/*");
|
||||
#ifdef DEBUG
|
||||
dlog("mapc recurses on %s", wildname);
|
||||
#endif /* DEBUG */
|
||||
error = mapc_meta_search(m, wildname, pval, MREC_PART);
|
||||
if (error)
|
||||
*subp = 0;
|
||||
|
@ -1009,8 +994,8 @@ root_newmap(const char *dir, const char *opts, const char *map, const cf_map_t *
|
|||
|
||||
if (cfm) {
|
||||
if (map) {
|
||||
sprintf(str, "cache:=mapdefault;type:=%s;fs:=\"%s\"",
|
||||
cfm->cfm_flags & CFM_MOUNT_TYPE_AUTOFS ? "autofs" : "toplvl",
|
||||
sprintf(str, "cache:=mapdefault;type:=toplvl;mount_type:=%s;fs:=\"%s\"",
|
||||
cfm->cfm_flags & CFM_MOUNT_TYPE_AUTOFS ? "autofs" : "nfs",
|
||||
get_full_path(map, cfm->cfm_search_path, cfm->cfm_type));
|
||||
if (opts && opts[0] != '\0') {
|
||||
strcat(str, ";");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: mntfs.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: mntfs.c,v 1.1.1.5 2002/11/29 22:58:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: mntfs.c,v 1.5.2.1 2001/01/10 03:23:07 ezk Exp
|
||||
* Id: mntfs.c,v 1.21 2002/06/24 15:41:33 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -73,16 +72,30 @@ static void
|
|||
init_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char *mopts, char *remopts)
|
||||
{
|
||||
mf->mf_ops = ops;
|
||||
mf->mf_fsflags = ops->nfs_fs_flags;
|
||||
mf->mf_fo = mo;
|
||||
mf->mf_mount = strdup(mp);
|
||||
mf->mf_real_mount = strdup(mp);
|
||||
mf->mf_info = strdup(info);
|
||||
mf->mf_auto = strdup(auto_opts);
|
||||
mf->mf_mopts = strdup(mopts);
|
||||
mf->mf_remopts = strdup(remopts);
|
||||
mf->mf_loopdev = NULL;
|
||||
mf->mf_refc = 1;
|
||||
mf->mf_flags = 0;
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
/* Note: mo can be NULL for the root pseudo-mountpoint */
|
||||
if (mo && mo->opt_mount_type &&
|
||||
STREQ(mo->opt_mount_type, "autofs") &&
|
||||
amd_use_autofs)
|
||||
mf->mf_flags = MFF_AUTOFS;
|
||||
else
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
mf->mf_flags = 0;
|
||||
mf->mf_error = -1;
|
||||
mf->mf_cid = 0;
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
mf->mf_autofs_fh = 0;
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
mf->mf_private = 0;
|
||||
mf->mf_prfree = 0;
|
||||
|
||||
|
@ -111,12 +124,10 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char
|
|||
{
|
||||
mntfs *mf;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Locating mntfs reference to %s", mp);
|
||||
#endif /* DEBUG */
|
||||
|
||||
ITER(mf, mntfs, &mfhead) {
|
||||
if (STREQ(mf->mf_mount, mp)) {
|
||||
if (STREQ(mf->mf_mount, mp) && STREQ(mf->mf_info, info)) {
|
||||
/*
|
||||
* Handle cases where error ops are involved
|
||||
*/
|
||||
|
@ -143,9 +154,7 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char
|
|||
* Restart a previously mounted filesystem.
|
||||
*/
|
||||
mntfs *mf2 = alloc_mntfs(&amfs_inherit_ops, mo, mp, info, auto_opts, mopts, remopts);
|
||||
#ifdef DEBUG
|
||||
dlog("Restarting filesystem %s", mf->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Remember who we are restarting
|
||||
|
@ -166,7 +175,7 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char
|
|||
mf->mf_info = strealloc(mf->mf_info, info);
|
||||
|
||||
if (mf->mf_private && mf->mf_prfree) {
|
||||
(*mf->mf_prfree) (mf->mf_private);
|
||||
mf->mf_prfree(mf->mf_private);
|
||||
mf->mf_private = 0;
|
||||
}
|
||||
|
||||
|
@ -191,7 +200,7 @@ new_mntfs(void)
|
|||
|
||||
|
||||
static void
|
||||
uninit_mntfs(mntfs *mf, int rmd)
|
||||
uninit_mntfs(mntfs *mf)
|
||||
{
|
||||
if (mf->mf_auto)
|
||||
XFREE(mf->mf_auto);
|
||||
|
@ -201,17 +210,20 @@ uninit_mntfs(mntfs *mf, int rmd)
|
|||
XFREE(mf->mf_remopts);
|
||||
if (mf->mf_info)
|
||||
XFREE(mf->mf_info);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
/* shouldn't be necessary, but we do it just in case */
|
||||
if (mf->mf_autofs_fh) {
|
||||
autofs_release_fh(mf->mf_autofs_fh);
|
||||
mf->mf_autofs_fh = 0;
|
||||
}
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
if (mf->mf_private && mf->mf_prfree)
|
||||
(*mf->mf_prfree) (mf->mf_private);
|
||||
|
||||
/*
|
||||
* Clean up any directories that were made
|
||||
*/
|
||||
if (rmd && (mf->mf_flags & MFF_MKMNT))
|
||||
rmdirs(mf->mf_mount);
|
||||
/* free mf_mount _AFTER_ removing the directories */
|
||||
if (mf->mf_mount)
|
||||
XFREE(mf->mf_mount);
|
||||
if (mf->mf_real_mount)
|
||||
XFREE(mf->mf_real_mount);
|
||||
|
||||
/*
|
||||
* Clean up the file server
|
||||
|
@ -239,7 +251,7 @@ discard_mntfs(voidp v)
|
|||
/*
|
||||
* Free memory
|
||||
*/
|
||||
uninit_mntfs(mf, TRUE);
|
||||
uninit_mntfs(mf);
|
||||
XFREE(mf);
|
||||
|
||||
--mntfs_allocated;
|
||||
|
@ -283,15 +295,12 @@ free_mntfs(voidp v)
|
|||
mf->mf_ops->fs_type, mf->mf_mount);
|
||||
}
|
||||
|
||||
if (mf->mf_ops->fs_flags & FS_DISCARD) {
|
||||
#ifdef DEBUG
|
||||
if (mf->mf_fsflags & FS_DISCARD) {
|
||||
dlog("Immediately discarding mntfs for %s", mf->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
discard_mntfs(mf);
|
||||
|
||||
} else {
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mf->mf_flags & MFF_RESTART) {
|
||||
dlog("Discarding remount hook for %s", mf->mf_mount);
|
||||
} else {
|
||||
|
@ -300,7 +309,6 @@ free_mntfs(voidp v)
|
|||
}
|
||||
if (mf->mf_flags & (MFF_MOUNTED | MFF_MOUNTING | MFF_UNMOUNTING))
|
||||
dlog("mntfs reference for %s still active", mf->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
mf->mf_cid = timeout(ALLOWED_MOUNT_TIME, discard_mntfs, (voidp) mf);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: nfs_prot_svc.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: nfs_prot_svc.c,v 1.1.1.5 2002/11/29 22:58:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: nfs_prot_svc.c,v 1.5.2.2 2001/01/12 23:28:56 ro Exp
|
||||
* Id: nfs_prot_svc.c,v 1.10 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -71,7 +70,7 @@ 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;
|
||||
SVCXPRT *current_transp;
|
||||
|
||||
/* typedefs */
|
||||
typedef char *(*nfssvcproc_t)(voidp, struct svc_req *);
|
||||
|
@ -122,7 +121,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
|
|||
return;
|
||||
}
|
||||
|
||||
nfs_program_2_transp = NULL;
|
||||
current_transp = NULL;
|
||||
|
||||
switch (rqstp->rq_proc) {
|
||||
|
||||
|
@ -159,7 +158,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
|
|||
* be stored in the am_node structure and later used for
|
||||
* quick_reply().
|
||||
*/
|
||||
nfs_program_2_transp = transp;
|
||||
current_transp = transp;
|
||||
break;
|
||||
|
||||
case NFSPROC_READLINK:
|
||||
|
@ -257,7 +256,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
|
|||
}
|
||||
result = (*local) (&argument, rqstp);
|
||||
|
||||
nfs_program_2_transp = NULL;
|
||||
current_transp = NULL;
|
||||
|
||||
if (result != NULL && !svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_result,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: nfs_start.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: nfs_start.c,v 1.1.1.5 2002/11/29 22:58:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: nfs_start.c,v 1.5.2.1 2001/01/10 03:23:08 ezk Exp
|
||||
* Id: nfs_start.c,v 1.16 2002/06/23 01:46:59 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -57,12 +56,6 @@
|
|||
SVCXPRT *nfsxprt;
|
||||
u_short nfs_port;
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
SVCXPRT *autofsxprt = NULL;
|
||||
u_short autofs_port = 0;
|
||||
int amd_use_autofs = 0;
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
#ifndef HAVE_SIGACTION
|
||||
# define MASKED_SIGS (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGCHLD)|sigmask(SIGHUP))
|
||||
#endif /* not HAVE_SIGACTION */
|
||||
|
@ -91,7 +84,7 @@ checkup(void)
|
|||
#ifdef HAVE_GETPAGESIZE
|
||||
dlog("%#lx bytes of memory allocated; total is %#lx (%ld pages)",
|
||||
(long) (next_mem - max_mem), (unsigned long) next_mem,
|
||||
((long) next_mem + getpagesize() - 1) / getpagesize());
|
||||
((long) next_mem + getpagesize() - 1) / (long) getpagesize());
|
||||
#else /* not HAVE_GETPAGESIZE */
|
||||
dlog("%#lx bytes of memory allocated; total is %#lx",
|
||||
(long) (next_mem - max_mem), (unsigned long) next_mem);
|
||||
|
@ -100,7 +93,9 @@ checkup(void)
|
|||
|
||||
}
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
#else /* not DEBUG */
|
||||
#define checkup()
|
||||
#endif /* not DEBUG */
|
||||
|
||||
|
||||
static int
|
||||
|
@ -161,7 +156,7 @@ do_select(int smask, int fds, fd_set *fdp, struct timeval *tvp)
|
|||
*/
|
||||
if (do_mapc_reload < clocktime()) {
|
||||
mapc_reload();
|
||||
do_mapc_reload = clocktime() + ONE_HOUR;
|
||||
do_mapc_reload = clocktime() + gopt.map_reload_interval;
|
||||
}
|
||||
return nsel;
|
||||
}
|
||||
|
@ -240,9 +235,7 @@ run_rpc(void)
|
|||
# endif /* not FD_SET */
|
||||
#endif /* not HAVE_SVC_GETREQSET */
|
||||
|
||||
#ifdef DEBUG
|
||||
checkup();
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* If the full timeout code is not called,
|
||||
|
@ -264,27 +257,28 @@ run_rpc(void)
|
|||
amd_state = Quit;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
autofs_add_fdset(&readfds);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
if (tvv.tv_sec <= 0)
|
||||
tvv.tv_sec = SELECT_MAXWAIT;
|
||||
#ifdef DEBUG
|
||||
if (tvv.tv_sec) {
|
||||
dlog("Select waits for %ds", (int) tvv.tv_sec);
|
||||
} else {
|
||||
dlog("Select waits for Godot");
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
nsel = do_select(smask, FD_SETSIZE, &readfds, &tvv);
|
||||
|
||||
switch (nsel) {
|
||||
case -1:
|
||||
if (errno == EINTR) {
|
||||
#ifdef DEBUG
|
||||
dlog("select interrupted");
|
||||
#endif /* DEBUG */
|
||||
continue;
|
||||
}
|
||||
perror("select");
|
||||
plog(XLOG_ERROR, "select: %m");
|
||||
break;
|
||||
|
||||
case 0:
|
||||
|
@ -292,7 +286,7 @@ run_rpc(void)
|
|||
|
||||
default:
|
||||
/*
|
||||
* Read all pending NFS responses at once to avoid having responses.
|
||||
* Read all pending NFS responses at once to avoid having responses
|
||||
* queue up as a consequence of retransmissions.
|
||||
*/
|
||||
#ifdef FD_SET
|
||||
|
@ -308,6 +302,11 @@ run_rpc(void)
|
|||
} while (rpc_pending_now() > 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (nsel)
|
||||
nsel = autofs_handle_fdset(&readfds, nsel);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
if (nsel) {
|
||||
/*
|
||||
* Anything left must be a normal
|
||||
|
@ -352,41 +351,32 @@ mount_automounter(int ppid)
|
|||
int nmount, ret;
|
||||
int soNFS;
|
||||
int udp_soAMQ, tcp_soAMQ;
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
struct netconfig *udp_amqncp, *tcp_amqncp;
|
||||
#endif /* HAVE_TRANSPORT_TYPE_TLI */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
int soAUTOFS;
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/*
|
||||
* Create the nfs service for amd
|
||||
*/
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_program_2);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
ret = create_amq_service(&udp_soAMQ, &udp_amqp, &udp_amqncp, &tcp_soAMQ, &tcp_amqp, &tcp_amqncp);
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_program_2);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
ret = create_amq_service(&udp_soAMQ, &udp_amqp, &tcp_soAMQ, &tcp_amqp);
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
/* security: if user sets -D noamq, don't even create listening socket */
|
||||
amuDebug(D_AMQ) {
|
||||
ret = create_amq_service(&udp_soAMQ, &udp_amqp, &udp_amqncp, &tcp_soAMQ, &tcp_amqp, &tcp_amqncp);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (amd_use_autofs) {
|
||||
/*
|
||||
* Create the autofs service for amd, but only if autofs maps
|
||||
* were defined (so amd doesn't clash with automountd.)
|
||||
* Create the autofs service for amd.
|
||||
*/
|
||||
plog(XLOG_INFO, "creating autofs service listener");
|
||||
ret = create_autofs_service(&soAUTOFS, &autofs_port, &autofsxprt, autofs_program_1);
|
||||
ret = create_autofs_service();
|
||||
/* if autofs service fails it is OK if using a test amd */
|
||||
if (ret != 0 && gopt.portmap_program == AMQ_PROGRAM)
|
||||
return ret;
|
||||
if (ret != 0) {
|
||||
plog(XLOG_WARNING, "autofs service registration failed, turning off autofs support");
|
||||
amd_use_autofs = 0;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
|
@ -427,40 +417,28 @@ mount_automounter(int ppid)
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_AMQ) {
|
||||
amuDebug(D_AMQ)
|
||||
#endif /* DEBUG */
|
||||
{
|
||||
/*
|
||||
* Complete registration of amq (first TCP service then UDP)
|
||||
*/
|
||||
unregister_amq();
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
ret = svc_reg(tcp_amqp, get_amd_program_number(), AMQ_VERSION,
|
||||
amq_program_1, tcp_amqncp);
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
ret = svc_register(tcp_amqp, get_amd_program_number(), AMQ_VERSION,
|
||||
amq_program_1, IPPROTO_TCP);
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
ret = amu_svc_register(tcp_amqp, get_amd_program_number(), AMQ_VERSION,
|
||||
amq_program_1, IPPROTO_TCP, tcp_amqncp);
|
||||
if (ret != 1) {
|
||||
plog(XLOG_FATAL, "unable to register (AMQ_PROGRAM=%d, AMQ_VERSION, tcp)", get_amd_program_number());
|
||||
return 3;
|
||||
}
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
ret = svc_reg(udp_amqp, get_amd_program_number(), AMQ_VERSION,
|
||||
amq_program_1, udp_amqncp);
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
ret = svc_register(udp_amqp, get_amd_program_number(), AMQ_VERSION,
|
||||
amq_program_1, IPPROTO_UDP);
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
ret = amu_svc_register(udp_amqp, get_amd_program_number(), AMQ_VERSION,
|
||||
amq_program_1, IPPROTO_UDP, udp_amqncp);
|
||||
if (ret != 1) {
|
||||
plog(XLOG_FATAL, "unable to register (AMQ_PROGRAM=%d, AMQ_VERSION, udp)", get_amd_program_number());
|
||||
return 4;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Start timeout_mp rolling
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: nfs_subr.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: nfs_subr.c,v 1.1.1.5 2002/11/29 22:58:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: nfs_subr.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp
|
||||
* Id: nfs_subr.c,v 1.14 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -112,18 +111,14 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
|||
int retry;
|
||||
time_t now = clocktime();
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "getattr:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
mp = fh_to_mp2(argp, &retry);
|
||||
if (mp == 0) {
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tretry=%d", retry);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (retry < 0) {
|
||||
amd_stats.d_drops++;
|
||||
|
@ -133,13 +128,11 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
|||
} else {
|
||||
nfsattrstat *attrp = &mp->am_attr;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
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)
|
||||
|
@ -186,10 +179,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
|
|||
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)
|
||||
|
@ -207,11 +198,11 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
|
|||
} else {
|
||||
int error;
|
||||
am_node *ap;
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tlookuppn(%s, %s)", mp->am_path, argp->da_name);
|
||||
#endif /* DEBUG */
|
||||
ap = (*mp->am_mnt->mf_ops->lookuppn) (mp, argp->da_name, &error, VLOOK_CREATE);
|
||||
plog(XLOG_DEBUG, "\tlookup(%s, %s)", mp->am_path, argp->da_name);
|
||||
ap = mp->am_mnt->mf_ops->lookup_child(mp, argp->da_name, &error, VLOOK_CREATE);
|
||||
if (ap && error < 0)
|
||||
ap = mp->am_mnt->mf_ops->mount_child(ap, &error);
|
||||
if (ap == 0) {
|
||||
if (error < 0) {
|
||||
amd_stats.d_drops++;
|
||||
|
@ -239,7 +230,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
|
|||
|
||||
|
||||
void
|
||||
quick_reply(am_node *mp, int error)
|
||||
nfs_quick_reply(am_node *mp, int error)
|
||||
{
|
||||
SVCXPRT *transp = mp->am_transp;
|
||||
nfsdiropres res;
|
||||
|
@ -275,9 +266,7 @@ quick_reply(am_node *mp, int error)
|
|||
*/
|
||||
XFREE(transp);
|
||||
mp->am_transp = NULL;
|
||||
#ifdef DEBUG
|
||||
dlog("Quick reply sent for %s", mp->am_mnt->mf_mount);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,10 +278,8 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
|||
am_node *mp;
|
||||
int retry;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "readlink:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
mp = fh_to_mp2(argp, &retry);
|
||||
if (mp == 0) {
|
||||
|
@ -307,11 +294,9 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
|||
if (ln == 0)
|
||||
goto readlink_retry;
|
||||
res.rlr_status = NFS_OK;
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
if (ln)
|
||||
plog(XLOG_DEBUG, "\treadlink(%s) = %s", mp->am_path, ln);
|
||||
#endif /* DEBUG */
|
||||
res.rlr_u.rlr_data_u = ln;
|
||||
mp->am_stats.s_readlink++;
|
||||
}
|
||||
|
@ -390,12 +375,10 @@ unlink_or_rmdir(nfsdiropargs *argp, struct svc_req *rqstp, int unlinkp)
|
|||
goto out;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tremove(%s, %s)", mp->am_path, argp->da_name);
|
||||
#endif /* DEBUG */
|
||||
|
||||
mp = (*mp->am_mnt->mf_ops->lookuppn) (mp, argp->da_name, &retry, VLOOK_DELETE);
|
||||
mp = mp->am_mnt->mf_ops->lookup_child(mp, argp->da_name, &retry, VLOOK_DELETE);
|
||||
if (mp == 0) {
|
||||
/*
|
||||
* Ignore retries...
|
||||
|
@ -505,10 +488,8 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp)
|
|||
am_node *mp;
|
||||
int retry;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "readdir:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
mp = fh_to_mp2(&argp->rda_fhandle, &retry);
|
||||
if (mp == 0) {
|
||||
|
@ -518,10 +499,8 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp)
|
|||
}
|
||||
res.rdr_status = nfs_error(retry);
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\treaddir(%s)", mp->am_path);
|
||||
#endif /* DEBUG */
|
||||
res.rdr_status = nfs_error((*mp->am_mnt->mf_ops->readdir)
|
||||
(mp, argp->rda_cookie,
|
||||
&res.rdr_u.rdr_reply_u, e_res, argp->rda_count));
|
||||
|
@ -540,10 +519,8 @@ nfsproc_statfs_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
|||
int retry;
|
||||
mntent_t mnt;
|
||||
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "statfs:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
mp = fh_to_mp2(argp, &retry);
|
||||
if (mp == 0) {
|
||||
|
@ -554,10 +531,8 @@ nfsproc_statfs_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
|
|||
res.sfr_status = nfs_error(retry);
|
||||
} else {
|
||||
nfsstatfsokres *fp;
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tstat_fs(%s)", mp->am_path);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* just return faked up file system information
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_TEMPLATE.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_TEMPLATE.c,v 1.1.1.5 2002/11/29 22:58:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_TEMPLATE.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp
|
||||
* Id: ops_TEMPLATE.c,v 1.11 2002/03/29 20:01:28 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -64,15 +63,13 @@
|
|||
/* forward declarations */
|
||||
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 int foofs_mount(am_node *mp, mntfs *mf);
|
||||
static int foofs_umount(am_node *mp, mntfs *mf);
|
||||
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 void foofs_mounted(mntfs *mf);
|
||||
static void foofs_umounted(am_node *mp);
|
||||
static void foofs_mounted(am_node *am, mntfs *mf);
|
||||
static void foofs_umounted(am_node *mp, mntfs *mf);
|
||||
fserver *foofs_ffserver(mntfs *mf);
|
||||
|
||||
|
||||
|
@ -86,16 +83,18 @@ am_ops foofs_ops =
|
|||
foofs_match, /* match */
|
||||
foofs_init, /* initialize */
|
||||
foofs_mount, /* mount vnode */
|
||||
foofs_fmount, /* mount vfs */
|
||||
foofs_umount, /* unmount vnode */
|
||||
foofs_fumount, /* unmount VFS */
|
||||
foofs_lookuppn, /* lookup path-name */
|
||||
foofs_lookup_child, /* lookup path-name */
|
||||
foofs_mount_child, /* mount path-name */
|
||||
foofs_readdir, /* read directory */
|
||||
foofs_readlink, /* read link */
|
||||
foofs_mounted, /* after-mount extra actions */
|
||||
foofs_umounted, /* after-umount extra actions */
|
||||
foofs_ffserver, /* find a file server */
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO /* flags */
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_TEMPLATE_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_cachefs.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: ops_cachefs.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_cachefs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp
|
||||
* Id: ops_cachefs.c,v 1.11 2002/03/29 20:01:28 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -57,8 +56,8 @@
|
|||
/* forward declarations */
|
||||
static char *cachefs_match(am_opts *fo);
|
||||
static int cachefs_init(mntfs *mf);
|
||||
static int cachefs_fmount(mntfs *mf);
|
||||
static int cachefs_fumount(mntfs *mf);
|
||||
static int cachefs_mount(am_node *am, mntfs *mf);
|
||||
static int cachefs_umount(am_node *am, mntfs *mf);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -69,17 +68,19 @@ am_ops cachefs_ops =
|
|||
"cachefs",
|
||||
cachefs_match,
|
||||
cachefs_init,
|
||||
amfs_auto_fmount,
|
||||
cachefs_fmount,
|
||||
amfs_auto_fumount,
|
||||
cachefs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
cachefs_mount,
|
||||
cachefs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* cachefs_readlink */
|
||||
0, /* post-mount actions */
|
||||
0, /* post-umount actions */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_CACHEFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -96,9 +97,7 @@ cachefs_match(am_opts *fo)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("CACHEFS: using cache directory \"%s\"", fo->opt_cachedir);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* determine magic cookie to put in mtab */
|
||||
return strdup(fo->opt_cachedir);
|
||||
|
@ -130,7 +129,8 @@ cachefs_init(mntfs *mf)
|
|||
* cachedir is the cache directory ($cachedir)
|
||||
*/
|
||||
static int
|
||||
mount_cachefs(char *mntpt, char *backdir, char *cachedir, char *opts)
|
||||
mount_cachefs(char *mntdir, char *real_mntdir, char *backdir, char *cachedir,
|
||||
char *opts, int on_autofs)
|
||||
{
|
||||
cachefs_args_t ca;
|
||||
mntent_t mnt;
|
||||
|
@ -144,12 +144,16 @@ mount_cachefs(char *mntpt, char *backdir, char *cachedir, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = mntpt;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = backdir;
|
||||
mnt.mnt_type = MNTTAB_TYPE_CACHEFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
flags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
flags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/* Fill in cachefs mount arguments */
|
||||
|
||||
|
@ -173,7 +177,7 @@ mount_cachefs(char *mntpt, char *backdir, char *cachedir, char *opts)
|
|||
/* CFS fscdir name */
|
||||
memset(ca.cfs_cacheid, 0, sizeof(ca.cfs_cacheid));
|
||||
/* append cacheid and mountpoint */
|
||||
sprintf(ca.cfs_cacheid, "%s:%s", ca.cfs_fsid, mntpt);
|
||||
sprintf(ca.cfs_cacheid, "%s:%s", ca.cfs_fsid, mntdir);
|
||||
/* convert '/' to '_' (Solaris does that...) */
|
||||
cp = ca.cfs_cacheid;
|
||||
while ((cp = strpbrk(cp, "/")) != NULL)
|
||||
|
@ -194,19 +198,21 @@ mount_cachefs(char *mntpt, char *backdir, char *cachedir, char *opts)
|
|||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, flags, (caddr_t) &ca, 0, type, 0, NULL, mnttab_file_name);
|
||||
return mount_fs2(&mnt, real_mntdir, flags, (caddr_t) &ca, 0, type, 0, NULL, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
cachefs_fmount(mntfs *mf)
|
||||
cachefs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_cachefs(mf->mf_mount,
|
||||
mf->mf_real_mount,
|
||||
mf->mf_fo->opt_rfs,
|
||||
mf->mf_fo->opt_cachedir,
|
||||
mf->mf_mopts);
|
||||
mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS);
|
||||
if (error) {
|
||||
errno = error;
|
||||
/* according to Solaris, if errno==ESRCH, "options to not match" */
|
||||
|
@ -222,11 +228,11 @@ cachefs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
cachefs_fumount(mntfs *mf)
|
||||
cachefs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
error = UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
|
||||
/*
|
||||
* In the case of cachefs, we must fsck the cache directory. Otherwise,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_cdfs.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: ops_cdfs.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_cdfs.c,v 1.4.2.1 2001/01/10 03:23:09 ezk Exp
|
||||
* Id: ops_cdfs.c,v 1.16 2002/03/29 20:01:28 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,8 +55,8 @@
|
|||
|
||||
/* forward declarations */
|
||||
static char *cdfs_match(am_opts *fo);
|
||||
static int cdfs_fmount(mntfs *mf);
|
||||
static int cdfs_fumount(mntfs *mf);
|
||||
static int cdfs_mount(am_node *am, mntfs *mf);
|
||||
static int cdfs_umount(am_node *am, mntfs *mf);
|
||||
|
||||
/*
|
||||
* Ops structure
|
||||
|
@ -67,17 +66,19 @@ am_ops cdfs_ops =
|
|||
"cdfs",
|
||||
cdfs_match,
|
||||
0, /* cdfs_init */
|
||||
amfs_auto_fmount,
|
||||
cdfs_fmount,
|
||||
amfs_auto_fumount,
|
||||
cdfs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
cdfs_mount,
|
||||
cdfs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* cdfs_readlink */
|
||||
0, /* cdfs_mounted */
|
||||
0, /* cdfs_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_CDFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -91,10 +92,8 @@ cdfs_match(am_opts *fo)
|
|||
plog(XLOG_USER, "cdfs: no source device specified");
|
||||
return 0;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dlog("CDFS: mounting device \"%s\" on \"%s\"",
|
||||
fo->opt_dev, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Determine magic cookie to put in mtab
|
||||
|
@ -104,11 +103,11 @@ cdfs_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
mount_cdfs(char *dir, char *fs_name, char *opts)
|
||||
mount_cdfs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs, char **lpname)
|
||||
{
|
||||
cdfs_args_t cdfs_args;
|
||||
mntent_t mnt;
|
||||
int genflags, cdfs_flags;
|
||||
int genflags, cdfs_flags, retval;
|
||||
|
||||
/*
|
||||
* Figure out the name of the file system type.
|
||||
|
@ -122,7 +121,7 @@ mount_cdfs(char *dir, char *fs_name, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_type = MNTTAB_TYPE_CDFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
@ -165,46 +164,89 @@ mount_cdfs(char *dir, char *fs_name, char *opts)
|
|||
#endif /* defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) */
|
||||
|
||||
genflags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
genflags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
#ifdef HAVE_FIELD_CDFS_ARGS_T_FLAGS
|
||||
#ifdef HAVE_CDFS_ARGS_T_FLAGS
|
||||
cdfs_args.flags = cdfs_flags;
|
||||
#endif /* HAVE_FIELD_CDFS_ARGS_T_FLAGS */
|
||||
#endif /* HAVE_CDFS_ARGS_T_FLAGS */
|
||||
|
||||
#ifdef HAVE_FIELD_CDFS_ARGS_T_ISO_FLAGS
|
||||
#ifdef HAVE_CDFS_ARGS_T_ISO_FLAGS
|
||||
cdfs_args.iso_flags = genflags | cdfs_flags;
|
||||
#endif /* HAVE_FIELD_CDFS_ARGS_T_ISO_FLAGS */
|
||||
#endif /* HAVE_CDFS_ARGS_T_ISO_FLAGS */
|
||||
|
||||
#ifdef HAVE_FIELD_CDFS_ARGS_T_ISO_PGTHRESH
|
||||
#ifdef HAVE_CDFS_ARGS_T_ISO_PGTHRESH
|
||||
cdfs_args.iso_pgthresh = hasmntval(&mnt, MNTTAB_OPT_PGTHRESH);
|
||||
#endif /* HAVE_FIELD_CDFS_ARGS_T_ISO_PGTHRESH */
|
||||
#endif /* HAVE_CDFS_ARGS_T_ISO_PGTHRESH */
|
||||
|
||||
#ifdef HAVE_FIELD_CDFS_ARGS_T_FSPEC
|
||||
cdfs_args.fspec = fs_name;
|
||||
#endif /* HAVE_FIELD_CDFS_ARGS_T_FSPEC */
|
||||
|
||||
#ifdef HAVE_FIELD_CDFS_ARGS_T_NORRIP
|
||||
#ifdef HAVE_CDFS_ARGS_T_NORRIP
|
||||
/* XXX: need to provide norrip mount opt */
|
||||
cdfs_args.norrip = 0; /* use Rock-Ridge Protocol extensions */
|
||||
#endif /* HAVE_FIELD_CDFS_ARGS_T_NORRIP */
|
||||
#endif /* HAVE_CDFS_ARGS_T_NORRIP */
|
||||
|
||||
#ifdef HAVE_FIELD_CDFS_ARGS_T_SSECTOR
|
||||
#ifdef HAVE_CDFS_ARGS_T_SSECTOR
|
||||
/* XXX: need to provide ssector mount option */
|
||||
cdfs_args.ssector = 0; /* use 1st session on disk */
|
||||
#endif /* HAVE_FIELD_CDFS_ARGS_T_SSECTOR */
|
||||
#endif /* HAVE_CDFS_ARGS_T_SSECTOR */
|
||||
|
||||
#ifdef HAVE_CDFS_ARGS_T_FSPEC
|
||||
cdfs_args.fspec = fs_name; /* NOTE: may be overridden below */
|
||||
#endif /* HAVE_CDFS_ARGS_T_FSPEC */
|
||||
|
||||
#ifdef HAVE_LOOP_DEVICE
|
||||
if (hasmntopt(&mnt, MNTTAB_OPT_LOOP)) {
|
||||
*lpname = setup_loop_device(mnt.mnt_fsname);
|
||||
if (*lpname) {
|
||||
char *str;
|
||||
int len;
|
||||
|
||||
plog(XLOG_INFO, "setup loop device %s on %s OK", *lpname, mnt.mnt_fsname);
|
||||
cdfs_args.fspec = *lpname; /* NOTE: overriding cdfs device! */
|
||||
/* XXX: hack, append loop=/dev/loopX to mnttab opts */
|
||||
len = strlen(mnt.mnt_opts) + 7 + strlen(*lpname);
|
||||
str = (char *) xmalloc(len);
|
||||
if (str) {
|
||||
sprintf(str, "%s,loop=%s", mnt.mnt_opts, *lpname);
|
||||
XFREE(mnt.mnt_opts);
|
||||
mnt.mnt_opts = str;
|
||||
}
|
||||
} else {
|
||||
plog(XLOG_ERROR, "failed to set up a loop device: %m");
|
||||
return errno;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LOOP_DEVICE */
|
||||
|
||||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, genflags, (caddr_t) &cdfs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
retval = mount_fs2(&mnt, real_mntdir, genflags, (caddr_t) &cdfs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
|
||||
#ifdef HAVE_LOOP_DEVICE
|
||||
/* if mount failed and we used a loop device, then undo it */
|
||||
if (retval != 0 && *lpname != NULL) {
|
||||
if (delete_loop_device(*lpname) < 0) {
|
||||
plog(XLOG_WARNING, "mount() failed to release loop device %s: %m", *lpname);
|
||||
} else {
|
||||
plog(XLOG_INFO, "mount() released loop device %s OK", *lpname);
|
||||
}
|
||||
XFREE(*lpname);
|
||||
}
|
||||
#endif /* HAVE_LOOP_DEVICE */
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
cdfs_fmount(mntfs *mf)
|
||||
cdfs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_cdfs(mf->mf_mount, mf->mf_info, mf->mf_mopts);
|
||||
error = mount_cdfs(mf->mf_mount, mf->mf_real_mount, mf->mf_info, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS, &mf->mf_loopdev);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "mount_cdfs: %m");
|
||||
|
@ -215,7 +257,22 @@ cdfs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
cdfs_fumount(mntfs *mf)
|
||||
cdfs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
int retval;
|
||||
|
||||
retval = UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
|
||||
#ifdef HAVE_LOOP_DEVICE
|
||||
if (retval >= 0 && mf->mf_loopdev) {
|
||||
if (delete_loop_device(mf->mf_loopdev) < 0) {
|
||||
plog(XLOG_WARNING, "unmount() failed to release loop device %s: %m", mf->mf_loopdev);
|
||||
} else {
|
||||
plog(XLOG_INFO, "unmount() released loop device %s OK", mf->mf_loopdev);
|
||||
}
|
||||
XFREE(mf->mf_loopdev);
|
||||
}
|
||||
#endif /* HAVE_LOOP_DEVICE */
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_efs.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: ops_efs.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_efs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp
|
||||
* Id: ops_efs.c,v 1.12 2002/03/29 20:01:28 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,8 +55,8 @@
|
|||
|
||||
/* forward declarations */
|
||||
static char *efs_match(am_opts *fo);
|
||||
static int efs_fmount(mntfs *mf);
|
||||
static int efs_fumount(mntfs *mf);
|
||||
static int efs_mount(am_node *am, mntfs *mf);
|
||||
static int efs_umount(am_node *am, mntfs *mf);
|
||||
|
||||
/*
|
||||
* Ops structure
|
||||
|
@ -67,17 +66,19 @@ am_ops efs_ops =
|
|||
"efs",
|
||||
efs_match,
|
||||
0, /* efs_init */
|
||||
amfs_auto_fmount,
|
||||
efs_fmount,
|
||||
amfs_auto_fumount,
|
||||
efs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
efs_mount,
|
||||
efs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* efs_readlink */
|
||||
0, /* efs_mounted */
|
||||
0, /* efs_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_EFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,9 +94,7 @@ efs_match(am_opts *fo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("EFS: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Determine magic cookie to put in mtab
|
||||
|
@ -105,7 +104,7 @@ efs_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
mount_efs(char *dir, char *fs_name, char *opts)
|
||||
mount_efs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs)
|
||||
{
|
||||
efs_args_t efs_args;
|
||||
mntent_t mnt;
|
||||
|
@ -122,33 +121,38 @@ mount_efs(char *dir, char *fs_name, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_type = MNTTAB_TYPE_EFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
flags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
flags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
#ifdef HAVE_FIELD_EFS_ARGS_T_FLAGS
|
||||
#ifdef HAVE_EFS_ARGS_T_FLAGS
|
||||
efs_args.flags = 0; /* XXX: fix this to correct flags */
|
||||
#endif /* HAVE_FIELD_EFS_ARGS_T_FLAGS */
|
||||
#ifdef HAVE_FIELD_EFS_ARGS_T_FSPEC
|
||||
#endif /* HAVE_EFS_ARGS_T_FLAGS */
|
||||
#ifdef HAVE_EFS_ARGS_T_FSPEC
|
||||
efs_args.fspec = fs_name;
|
||||
#endif /* HAVE_FIELD_EFS_ARGS_T_FSPEC */
|
||||
#endif /* HAVE_EFS_ARGS_T_FSPEC */
|
||||
|
||||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, flags, (caddr_t) &efs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
return mount_fs2(&mnt, real_mntdir, flags, (caddr_t) &efs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
efs_fmount(mntfs *mf)
|
||||
efs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_efs(mf->mf_mount, mf->mf_info, mf->mf_mopts);
|
||||
error = mount_efs(mf->mf_mount, mf->mf_real_mount, mf->mf_info, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "mount_efs: %m");
|
||||
|
@ -160,7 +164,8 @@ efs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
efs_fumount(mntfs *mf)
|
||||
efs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
return UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_lofs.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: ops_lofs.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_lofs.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp
|
||||
* Id: ops_lofs.c,v 1.12 2002/03/29 20:01:28 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,9 +55,9 @@
|
|||
|
||||
/* forward definitions */
|
||||
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);
|
||||
static int lofs_mount(am_node *am, mntfs *mf);
|
||||
static int lofs_umount(am_node *am, mntfs *mf);
|
||||
static int mount_lofs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -69,17 +68,19 @@ am_ops lofs_ops =
|
|||
"lofs",
|
||||
lofs_match,
|
||||
0, /* lofs_init */
|
||||
amfs_auto_fmount,
|
||||
lofs_fmount,
|
||||
amfs_auto_fumount,
|
||||
lofs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
lofs_mount,
|
||||
lofs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* lofs_readlink */
|
||||
0, /* lofs_mounted */
|
||||
0, /* lofs_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_LOFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,10 +94,8 @@ lofs_match(am_opts *fo)
|
|||
plog(XLOG_USER, "lofs: no source filesystem specified");
|
||||
return 0;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dlog("LOFS: mounting fs \"%s\" on \"%s\"",
|
||||
fo->opt_rfs, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Determine magic cookie to put in mtab
|
||||
|
@ -106,7 +105,7 @@ lofs_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
mount_lofs(char *dir, char *fs_name, char *opts)
|
||||
mount_lofs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs)
|
||||
{
|
||||
mntent_t mnt;
|
||||
int flags;
|
||||
|
@ -120,26 +119,31 @@ mount_lofs(char *dir, char *fs_name, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_type = MNTTAB_TYPE_LOFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
flags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
flags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, flags, NULL, 0, type, 0, NULL, mnttab_file_name);
|
||||
return mount_fs2(&mnt, real_mntdir, flags, NULL, 0, type, 0, NULL, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lofs_fmount(mntfs *mf)
|
||||
lofs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_lofs(mf->mf_mount, mf->mf_info, mf->mf_mopts);
|
||||
error = mount_lofs(mf->mf_mount, mf->mf_real_mount, mf->mf_info, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "mount_lofs: %m");
|
||||
|
@ -150,7 +154,7 @@ lofs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
lofs_fumount(mntfs *mf)
|
||||
lofs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
return UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_mfs.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: ops_mfs.c,v 1.1.1.5 2002/11/29 22:58:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_mfs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp
|
||||
* Id: ops_mfs.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_nfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_nfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_nfs.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp
|
||||
* Id: ops_nfs.c,v 1.18 2002/06/23 01:05:39 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -121,17 +120,19 @@ am_ops nfs_ops =
|
|||
"nfs",
|
||||
nfs_match,
|
||||
nfs_init,
|
||||
amfs_auto_fmount,
|
||||
nfs_fmount,
|
||||
amfs_auto_fumount,
|
||||
nfs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
nfs_mount,
|
||||
nfs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* nfs_readlink */
|
||||
0, /* nfs_mounted */
|
||||
nfs_umounted,
|
||||
find_nfs_srvr,
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_BACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_NFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -148,13 +149,11 @@ find_nfs_fhandle_cache(voidp idv, int done)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (fp2) {
|
||||
dlog("fh cache gives fp %#lx, fs %s", (unsigned long) fp2, fp2->fh_path);
|
||||
} else {
|
||||
dlog("fh cache search failed");
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (fp2 && !done) {
|
||||
fp2->fh_error = ETIMEDOUT;
|
||||
|
@ -191,17 +190,13 @@ got_nfs_fh(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, v
|
|||
(XDRPROC_T_TYPE) xdr_fhstatus);
|
||||
|
||||
if (!fp->fh_error) {
|
||||
#ifdef DEBUG
|
||||
dlog("got filehandle for %s:%s", fp->fh_fs->fs_host, fp->fh_path);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Wakeup anything sleeping on this filehandle
|
||||
*/
|
||||
if (fp->fh_wchan) {
|
||||
#ifdef DEBUG
|
||||
dlog("Calling wakeup on %#lx", (unsigned long) fp->fh_wchan);
|
||||
#endif /* DEBUG */
|
||||
wakeup(fp->fh_wchan);
|
||||
}
|
||||
}
|
||||
|
@ -229,9 +224,7 @@ discard_fh(voidp v)
|
|||
|
||||
rem_que(&fp->fh_q);
|
||||
if (fp->fh_fs) {
|
||||
#ifdef DEBUG
|
||||
dlog("Discarding filehandle for %s:%s", fp->fh_fs->fs_host, fp->fh_path);
|
||||
#endif /* DEBUG */
|
||||
free_srvr(fp->fh_fs);
|
||||
}
|
||||
if (fp->fh_path)
|
||||
|
@ -244,15 +237,13 @@ discard_fh(voidp v)
|
|||
* Determine the file handle for a node
|
||||
*/
|
||||
static int
|
||||
prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, voidp wchan)
|
||||
prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, mntfs *mf)
|
||||
{
|
||||
fh_cache *fp, *fp_save = 0;
|
||||
int error;
|
||||
int reuse_id = FALSE;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Searching cache for %s:%s", fs->fs_host, path);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* First search the cache
|
||||
|
@ -262,13 +253,21 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, voidp w
|
|||
switch (fp->fh_error) {
|
||||
case 0:
|
||||
plog(XLOG_INFO, "prime_nfs_fhandle_cache: NFS version %d", (int) fp->fh_nfs_version);
|
||||
|
||||
#ifdef HAVE_FS_NFS3
|
||||
if (fp->fh_nfs_version == NFS_VERSION3)
|
||||
error = fp->fh_error = unx_error(fp->fh_nfs_handle.v3.fhs_status);
|
||||
else
|
||||
#endif /* HAVE_FS_NFS3 */
|
||||
error = fp->fh_error = unx_error(fp->fh_nfs_handle.v2.fhs_status);
|
||||
|
||||
if (error == 0) {
|
||||
if (mf->mf_flags & MFF_NFS_SCALEDOWN) {
|
||||
fp_save = fp;
|
||||
reuse_id = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (fhbuf) {
|
||||
#ifdef HAVE_FS_NFS3
|
||||
if (fp->fh_nfs_version == NFS_VERSION3)
|
||||
|
@ -345,7 +344,7 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, voidp w
|
|||
}
|
||||
if (!reuse_id)
|
||||
fp->fh_id = FHID_ALLOC(struct );
|
||||
fp->fh_wchan = wchan;
|
||||
fp->fh_wchan = (voidp) mf;
|
||||
fp->fh_error = -1;
|
||||
fp->fh_cid = timeout(FH_TTL, discard_fh, (voidp) fp);
|
||||
|
||||
|
@ -372,7 +371,7 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, voidp w
|
|||
fp->fh_fs = dup_srvr(fs);
|
||||
fp->fh_path = strdup(path);
|
||||
|
||||
error = call_mountd(fp, MOUNTPROC_MNT, got_nfs_fh, wchan);
|
||||
error = call_mountd(fp, MOUNTPROC_MNT, got_nfs_fh, (voidp) mf);
|
||||
if (error) {
|
||||
/*
|
||||
* Local error - cache for a short period
|
||||
|
@ -515,10 +514,8 @@ nfs_match(am_opts *fo)
|
|||
*/
|
||||
xmtab = (char *) xmalloc(strlen(fo->opt_rhost) + strlen(fo->opt_rfs) + 2);
|
||||
sprintf(xmtab, "%s:%s", fo->opt_rhost, fo->opt_rfs);
|
||||
#ifdef DEBUG
|
||||
dlog("NFS: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"",
|
||||
fo->opt_rhost, fo->opt_rfs, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
return xmtab;
|
||||
}
|
||||
|
@ -534,14 +531,26 @@ nfs_init(mntfs *mf)
|
|||
am_nfs_handle_t fhs;
|
||||
char *colon;
|
||||
|
||||
if (mf->mf_private)
|
||||
return 0;
|
||||
if (mf->mf_private) {
|
||||
if (mf->mf_flags & MFF_NFS_SCALEDOWN) {
|
||||
fserver *fs;
|
||||
|
||||
/* tell remote mountd that we're done with this filehandle */
|
||||
mf->mf_ops->umounted(mf);
|
||||
|
||||
mf->mf_prfree(mf->mf_private);
|
||||
fs = mf->mf_ops->ffserver(mf);
|
||||
free_srvr(mf->mf_server);
|
||||
mf->mf_server = fs;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
colon = strchr(mf->mf_info, ':');
|
||||
if (colon == 0)
|
||||
return ENOENT;
|
||||
|
||||
error = prime_nfs_fhandle_cache(colon + 1, mf->mf_server, &fhs, (voidp) mf);
|
||||
error = prime_nfs_fhandle_cache(colon + 1, mf->mf_server, &fhs, mf);
|
||||
if (!error) {
|
||||
mf->mf_private = (voidp) ALLOC(am_nfs_handle_t);
|
||||
mf->mf_prfree = (void (*)(voidp)) free;
|
||||
|
@ -552,7 +561,7 @@ nfs_init(mntfs *mf)
|
|||
|
||||
|
||||
int
|
||||
mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *mf)
|
||||
mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs, mntfs *mf)
|
||||
{
|
||||
MTYPE_TYPE type;
|
||||
char *colon;
|
||||
|
@ -596,7 +605,7 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *
|
|||
}
|
||||
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_opts = xopts;
|
||||
|
||||
|
@ -628,18 +637,19 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *
|
|||
}
|
||||
#endif /* HAVE_FS_NFS3 */
|
||||
plog(XLOG_INFO, "mount_nfs_fh: NFS version %d", (int) nfs_version);
|
||||
#if defined(HAVE_FS_NFS3) || defined(HAVE_TRANSPORT_TYPE_TLI)
|
||||
plog(XLOG_INFO, "mount_nfs_fh: using NFS transport %s", nfs_proto);
|
||||
#endif /* defined(HAVE_FS_NFS3) || defined(HAVE_TRANSPORT_TYPE_TLI) */
|
||||
|
||||
retry = hasmntval(&mnt, MNTTAB_OPT_RETRY);
|
||||
if (retry <= 0)
|
||||
retry = 1; /* XXX */
|
||||
|
||||
genflags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
genflags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
/* setup the many fields and flags within nfs_args */
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
compute_nfs_args(&nfs_args,
|
||||
&mnt,
|
||||
genflags,
|
||||
|
@ -650,27 +660,14 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *
|
|||
fhp,
|
||||
host,
|
||||
fs_name);
|
||||
#else /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
compute_nfs_args(&nfs_args,
|
||||
&mnt,
|
||||
genflags,
|
||||
fs->fs_ip,
|
||||
nfs_version,
|
||||
nfs_proto,
|
||||
fhp,
|
||||
host,
|
||||
fs_name);
|
||||
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
|
||||
|
||||
/* finally call the mounting function */
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_TRACE) {
|
||||
print_nfs_args(&nfs_args, nfs_version);
|
||||
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,
|
||||
nfs_version, nfs_proto, mnttab_file_name);
|
||||
error = mount_fs2(&mnt, real_mntdir, genflags, (caddr_t) &nfs_args, retry, type,
|
||||
nfs_version, nfs_proto, mnttab_file_name);
|
||||
XFREE(xopts);
|
||||
|
||||
#ifdef HAVE_TRANSPORT_TYPE_TLI
|
||||
|
@ -683,40 +680,37 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *dir, char *fs_name, char *opts, mntfs *
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
mount_nfs(char *dir, char *fs_name, char *opts, mntfs *mf)
|
||||
{
|
||||
if (!mf->mf_private) {
|
||||
plog(XLOG_ERROR, "Missing filehandle for %s", fs_name);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
return mount_nfs_fh((am_nfs_handle_t *) mf->mf_private, dir, fs_name, opts, mf);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
nfs_fmount(mntfs *mf)
|
||||
nfs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
error = mount_nfs(mf->mf_mount, mf->mf_info, mf->mf_mopts, mf);
|
||||
if (!mf->mf_private) {
|
||||
plog(XLOG_ERROR, "Missing filehandle for %s", mf->mf_info);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
error = mount_nfs_fh((am_nfs_handle_t *) mf->mf_private,
|
||||
mf->mf_mount,
|
||||
mf->mf_real_mount,
|
||||
mf->mf_info,
|
||||
mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS,
|
||||
mf);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (error) {
|
||||
errno = error;
|
||||
dlog("mount_nfs: %m");
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
nfs_fumount(mntfs *mf)
|
||||
nfs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error = UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
int error = UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
|
||||
/*
|
||||
* Here is some code to unmount 'restarted' file systems.
|
||||
|
@ -745,12 +739,12 @@ nfs_fumount(mntfs *mf)
|
|||
|
||||
if (NSTREQ(mf->mf_mount, new_mf->mf_mount, len) &&
|
||||
new_mf->mf_mount[len] == '/') {
|
||||
UMOUNT_FS(new_mf->mf_mount, mnttab_file_name);
|
||||
UMOUNT_FS(new_mf->mf_mount, new_mf->mf_real_mount, mnttab_file_name);
|
||||
didsome = 1;
|
||||
}
|
||||
}
|
||||
if (didsome)
|
||||
error = UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
error = UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
}
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -760,14 +754,8 @@ nfs_fumount(mntfs *mf)
|
|||
|
||||
|
||||
void
|
||||
nfs_umounted(am_node *mp)
|
||||
nfs_umounted(mntfs *mf)
|
||||
{
|
||||
/*
|
||||
* Don't bother to inform remote mountd that we are finished. Until a
|
||||
* full track of filehandles is maintained the mountd unmount callback
|
||||
* cannot be done correctly anyway...
|
||||
*/
|
||||
mntfs *mf = mp->am_mnt;
|
||||
fserver *fs;
|
||||
char *colon, *path;
|
||||
|
||||
|
@ -788,9 +776,7 @@ nfs_umounted(am_node *mp)
|
|||
if (fs && colon) {
|
||||
fh_cache f;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("calling mountd for %s", mf->mf_info);
|
||||
#endif /* DEBUG */
|
||||
*path++ = '\0';
|
||||
f.fh_path = path;
|
||||
f.fh_sin = *fs->fs_ip;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_nfs3.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_nfs3.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_nfs3.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp
|
||||
* Id: ops_nfs3.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_nullfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_nullfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_nullfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp
|
||||
* Id: ops_nullfs.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_pcfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_pcfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_pcfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp
|
||||
* Id: ops_pcfs.c,v 1.12 2002/03/29 20:01:29 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,8 +55,8 @@
|
|||
|
||||
/* forward definitions */
|
||||
static char *pcfs_match(am_opts *fo);
|
||||
static int pcfs_fmount(mntfs *mf);
|
||||
static int pcfs_fumount(mntfs *mf);
|
||||
static int pcfs_mount(am_node *am, mntfs *mf);
|
||||
static int pcfs_umount(am_node *am, mntfs *mf);
|
||||
|
||||
/*
|
||||
* Ops structure
|
||||
|
@ -67,17 +66,19 @@ am_ops pcfs_ops =
|
|||
"pcfs",
|
||||
pcfs_match,
|
||||
0, /* pcfs_init */
|
||||
amfs_auto_fmount,
|
||||
pcfs_fmount,
|
||||
amfs_auto_fumount,
|
||||
pcfs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
pcfs_mount,
|
||||
pcfs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* pcfs_readlink */
|
||||
0, /* pcfs_mounted */
|
||||
0, /* pcfs_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_PCFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -92,9 +93,7 @@ pcfs_match(am_opts *fo)
|
|||
plog(XLOG_USER, "pcfs: no source device specified");
|
||||
return 0;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dlog("PCFS: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Determine magic cookie to put in mtab
|
||||
|
@ -104,7 +103,7 @@ pcfs_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
mount_pcfs(char *dir, char *fs_name, char *opts)
|
||||
mount_pcfs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs)
|
||||
{
|
||||
pcfs_args_t pcfs_args;
|
||||
mntent_t mnt;
|
||||
|
@ -121,49 +120,54 @@ mount_pcfs(char *dir, char *fs_name, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_type = MNTTAB_TYPE_PCFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
flags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
flags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
#ifdef HAVE_FIELD_PCFS_ARGS_T_FSPEC
|
||||
#ifdef HAVE_PCFS_ARGS_T_FSPEC
|
||||
pcfs_args.fspec = fs_name;
|
||||
#endif /* HAVE_FIELD_PCFS_ARGS_T_FSPEC */
|
||||
#endif /* HAVE_PCFS_ARGS_T_FSPEC */
|
||||
|
||||
#ifdef HAVE_FIELD_PCFS_ARGS_T_MASK
|
||||
#ifdef HAVE_PCFS_ARGS_T_MASK
|
||||
pcfs_args.mask = 0777; /* this may be the msdos file modes */
|
||||
#endif /* HAVE_FIELD_PCFS_ARGS_T_MASK */
|
||||
#endif /* HAVE_PCFS_ARGS_T_MASK */
|
||||
|
||||
#ifdef HAVE_FIELD_PCFS_ARGS_T_UID
|
||||
#ifdef HAVE_PCFS_ARGS_T_UID
|
||||
pcfs_args.uid = 0; /* root */
|
||||
#endif /* HAVE_FIELD_PCFS_ARGS_T_UID */
|
||||
#endif /* HAVE_PCFS_ARGS_T_UID */
|
||||
|
||||
#ifdef HAVE_FIELD_PCFS_ARGS_T_GID
|
||||
#ifdef HAVE_PCFS_ARGS_T_GID
|
||||
pcfs_args.gid = 0; /* wheel */
|
||||
#endif /* HAVE_FIELD_PCFS_ARGS_T_GID */
|
||||
#endif /* HAVE_PCFS_ARGS_T_GID */
|
||||
|
||||
#ifdef HAVE_FIELD_PCFS_ARGS_T_SECONDSWEST
|
||||
#ifdef HAVE_PCFS_ARGS_T_SECONDSWEST
|
||||
pcfs_args.secondswest = 0; /* XXX: fill in correct values */
|
||||
#endif /* HAVE_FIELD_PCFS_ARGS_T_SECONDSWEST */
|
||||
#ifdef HAVE_FIELD_PCFS_ARGS_T_DSTTIME
|
||||
#endif /* HAVE_PCFS_ARGS_T_SECONDSWEST */
|
||||
#ifdef HAVE_PCFS_ARGS_T_DSTTIME
|
||||
pcfs_args.dsttime = 0; /* XXX: fill in correct values */
|
||||
#endif /* HAVE_FIELD_PCFS_ARGS_T_DSTTIME */
|
||||
#endif /* HAVE_PCFS_ARGS_T_DSTTIME */
|
||||
|
||||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, flags, (caddr_t) & pcfs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
return mount_fs2(&mnt, real_mntdir, flags, (caddr_t) & pcfs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
pcfs_fmount(mntfs *mf)
|
||||
pcfs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_pcfs(mf->mf_mount, mf->mf_info, mf->mf_mopts);
|
||||
error = mount_pcfs(mf->mf_mount, mf->mf_real_mount, mf->mf_info, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "mount_pcfs: %m");
|
||||
|
@ -175,7 +179,7 @@ pcfs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
pcfs_fumount(mntfs *mf)
|
||||
pcfs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
return UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_tfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_tfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_tfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp
|
||||
* Id: ops_tfs.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_tmpfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_tmpfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_tmpfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp
|
||||
* Id: ops_tmpfs.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_ufs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_ufs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_ufs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp
|
||||
* Id: ops_ufs.c,v 1.12 2002/03/29 20:01:29 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,8 +55,8 @@
|
|||
|
||||
/* forward declarations */
|
||||
static char *ufs_match(am_opts *fo);
|
||||
static int ufs_fmount(mntfs *mf);
|
||||
static int ufs_fumount(mntfs *mf);
|
||||
static int ufs_mount(am_node *am, mntfs *mf);
|
||||
static int ufs_umount(am_node *am, mntfs *mf);
|
||||
|
||||
/*
|
||||
* Ops structure
|
||||
|
@ -67,17 +66,19 @@ am_ops ufs_ops =
|
|||
"ufs",
|
||||
ufs_match,
|
||||
0, /* ufs_init */
|
||||
amfs_auto_fmount,
|
||||
ufs_fmount,
|
||||
amfs_auto_fumount,
|
||||
ufs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
ufs_mount,
|
||||
ufs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* ufs_readlink */
|
||||
0, /* ufs_mounted */
|
||||
0, /* ufs_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_UFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,9 +94,7 @@ ufs_match(am_opts *fo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("UFS: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Determine magic cookie to put in mtab
|
||||
|
@ -105,7 +104,7 @@ ufs_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
mount_ufs(char *dir, char *fs_name, char *opts)
|
||||
mount_ufs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs)
|
||||
{
|
||||
ufs_args_t ufs_args;
|
||||
mntent_t mnt;
|
||||
|
@ -122,42 +121,47 @@ mount_ufs(char *dir, char *fs_name, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_type = MNTTAB_TYPE_UFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
genflags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
genflags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
#ifdef HAVE_FIELD_UFS_ARGS_T_FLAGS
|
||||
#ifdef HAVE_UFS_ARGS_T_FLAGS
|
||||
ufs_args.flags = genflags; /* XXX: is this correct? */
|
||||
#endif /* HAVE_FIELD_UFS_ARGS_T_FLAGS */
|
||||
#endif /* HAVE_UFS_ARGS_T_FLAGS */
|
||||
|
||||
#ifdef HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS
|
||||
#ifdef HAVE_UFS_ARGS_T_UFS_FLAGS
|
||||
ufs_args.ufs_flags = genflags;
|
||||
#endif /* HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS */
|
||||
#endif /* HAVE_UFS_ARGS_T_UFS_FLAGS */
|
||||
|
||||
#ifdef HAVE_FIELD_UFS_ARGS_T_FSPEC
|
||||
#ifdef HAVE_UFS_ARGS_T_FSPEC
|
||||
ufs_args.fspec = fs_name;
|
||||
#endif /* HAVE_FIELD_UFS_ARGS_T_FSPEC */
|
||||
#endif /* HAVE_UFS_ARGS_T_FSPEC */
|
||||
|
||||
#ifdef HAVE_FIELD_UFS_ARGS_T_UFS_PGTHRESH
|
||||
#ifdef HAVE_UFS_ARGS_T_UFS_PGTHRESH
|
||||
ufs_args.ufs_pgthresh = hasmntval(&mnt, MNTTAB_OPT_PGTHRESH);
|
||||
#endif /* HAVE_FIELD_UFS_ARGS_T_UFS_PGTHRESH */
|
||||
#endif /* HAVE_UFS_ARGS_T_UFS_PGTHRESH */
|
||||
|
||||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, genflags, (caddr_t) &ufs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
return mount_fs2(&mnt, real_mntdir, genflags, (caddr_t) &ufs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ufs_fmount(mntfs *mf)
|
||||
ufs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_ufs(mf->mf_mount, mf->mf_info, mf->mf_mopts);
|
||||
error = mount_ufs(mf->mf_mount, mf->mf_real_mount, mf->mf_info, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "mount_ufs: %m");
|
||||
|
@ -169,7 +173,7 @@ ufs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
ufs_fumount(mntfs *mf)
|
||||
ufs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
return UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_umapfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_umapfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_umapfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp
|
||||
* Id: ops_umapfs.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_unionfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_unionfs.c,v 1.1.1.5 2002/11/29 22:58:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_unionfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp
|
||||
* Id: ops_unionfs.c,v 1.6 2002/02/02 20:58:55 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ops_xfs.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: ops_xfs.c,v 1.1.1.5 2002/11/29 22:58:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: ops_xfs.c,v 1.3.2.2 2001/01/12 23:28:58 ro Exp
|
||||
* Id: ops_xfs.c,v 1.13 2002/03/29 20:01:29 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,8 +55,8 @@
|
|||
|
||||
/* forward declarations */
|
||||
static char *xfs_match(am_opts *fo);
|
||||
static int xfs_fmount(mntfs *mf);
|
||||
static int xfs_fumount(mntfs *mf);
|
||||
static int xfs_mount(am_node *am, mntfs *mf);
|
||||
static int xfs_umount(am_node *am, mntfs *mf);
|
||||
|
||||
/*
|
||||
* Ops structure
|
||||
|
@ -67,17 +66,19 @@ am_ops xfs_ops =
|
|||
"xfs",
|
||||
xfs_match,
|
||||
0, /* xfs_init */
|
||||
amfs_auto_fmount,
|
||||
xfs_fmount,
|
||||
amfs_auto_fumount,
|
||||
xfs_fumount,
|
||||
amfs_error_lookuppn,
|
||||
xfs_mount,
|
||||
xfs_umount,
|
||||
amfs_error_lookup_child,
|
||||
amfs_error_mount_child,
|
||||
amfs_error_readdir,
|
||||
0, /* xfs_readlink */
|
||||
0, /* xfs_mounted */
|
||||
0, /* xfs_umounted */
|
||||
find_amfs_auto_srvr,
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO
|
||||
FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
AUTOFS_XFS_FS_FLAGS,
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,9 +94,7 @@ xfs_match(am_opts *fo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("XFS: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Determine magic cookie to put in mtab
|
||||
|
@ -105,7 +104,7 @@ xfs_match(am_opts *fo)
|
|||
|
||||
|
||||
static int
|
||||
mount_xfs(char *dir, char *fs_name, char *opts)
|
||||
mount_xfs(char *mntdir, char *real_mntdir, char *fs_name, char *opts, int on_autofs)
|
||||
{
|
||||
xfs_args_t xfs_args;
|
||||
mntent_t mnt;
|
||||
|
@ -122,33 +121,38 @@ mount_xfs(char *dir, char *fs_name, char *opts)
|
|||
* Fill in the mount structure
|
||||
*/
|
||||
memset((voidp) &mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = dir;
|
||||
mnt.mnt_dir = mntdir;
|
||||
mnt.mnt_fsname = fs_name;
|
||||
mnt.mnt_type = MNTTAB_TYPE_XFS;
|
||||
mnt.mnt_opts = opts;
|
||||
|
||||
flags = compute_mount_flags(&mnt);
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
if (on_autofs)
|
||||
genflags |= autofs_compute_mount_flags(&mnt);
|
||||
#endif /* HAVE_FS_AUTOFS */
|
||||
|
||||
#ifdef HAVE_FIELD_XFS_ARGS_T_FLAGS
|
||||
#ifdef HAVE_XFS_ARGS_T_FLAGS
|
||||
xfs_args.flags = 0; /* XXX: fix this to correct flags */
|
||||
#endif /* HAVE_FIELD_XFS_ARGS_T_FLAGS */
|
||||
#ifdef HAVE_FIELD_XFS_ARGS_T_FSPEC
|
||||
#endif /* HAVE_XFS_ARGS_T_FLAGS */
|
||||
#ifdef HAVE_XFS_ARGS_T_FSPEC
|
||||
xfs_args.fspec = fs_name;
|
||||
#endif /* HAVE_FIELD_XFS_ARGS_T_FSPEC */
|
||||
#endif /* HAVE_XFS_ARGS_T_FSPEC */
|
||||
|
||||
/*
|
||||
* Call generic mount routine
|
||||
*/
|
||||
return mount_fs(&mnt, flags, (caddr_t) &xfs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
return mount_fs2(&mnt, real_mntdir, flags, (caddr_t) &xfs_args, 0, type, 0, NULL, mnttab_file_name);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
xfs_fmount(mntfs *mf)
|
||||
xfs_mount(am_node *am, mntfs *mf)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = mount_xfs(mf->mf_mount, mf->mf_info, mf->mf_mopts);
|
||||
error = mount_xfs(mf->mf_mount, mf->mf_real_mount, mf->mf_info, mf->mf_mopts,
|
||||
am->am_flags & AMF_AUTOFS);
|
||||
if (error) {
|
||||
errno = error;
|
||||
plog(XLOG_ERROR, "mount_xfs: %m");
|
||||
|
@ -160,7 +164,7 @@ xfs_fmount(mntfs *mf)
|
|||
|
||||
|
||||
static int
|
||||
xfs_fumount(mntfs *mf)
|
||||
xfs_umount(am_node *am, mntfs *mf)
|
||||
{
|
||||
return UMOUNT_FS(mf->mf_mount, mnttab_file_name);
|
||||
return UMOUNT_FS(mf->mf_mount, mf->mf_real_mount, mnttab_file_name);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: restart.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: restart.c,v 1.1.1.5 2002/11/29 22:58:16 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: restart.c,v 1.3.2.1 2001/01/10 03:23:12 ezk Exp
|
||||
* Id: restart.c,v 1.7 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -144,6 +143,7 @@ restart(void)
|
|||
/*
|
||||
* Partially fake up an opts structure
|
||||
*/
|
||||
memset(&mo, 0, sizeof(mo));
|
||||
mo.opt_rhost = 0;
|
||||
mo.opt_rfs = 0;
|
||||
if (cp) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: rpc_fwd.c,v 1.1.1.4 2001/05/13 17:50:13 veego Exp $ */
|
||||
/* $NetBSD: rpc_fwd.c,v 1.1.1.5 2002/11/29 22:58:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: rpc_fwd.c,v 1.3.2.2 2001/04/14 21:08:23 ezk Exp
|
||||
* Id: rpc_fwd.c,v 1.8 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -119,9 +118,7 @@ fwd_alloc(void)
|
|||
* Call forwarding function to say that
|
||||
* this message was junked.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
dlog("Re-using packet forwarding slot - id %#x", p->rf_xid);
|
||||
#endif /* DEBUG */
|
||||
if (p->rf_fwd)
|
||||
(*p->rf_fwd) (0, 0, 0, &p->rf_sin, p->rf_ptr, FALSE);
|
||||
rem_que(&p->rf_q);
|
||||
|
@ -249,7 +246,6 @@ fwd_packet(int type_id, voidp pkt, int len, struct sockaddr_in *fwdto, struct so
|
|||
* Otherwise make sure the type_id is
|
||||
* fully qualified by allocating an id here.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
switch (type_id & RPC_XID_MASK) {
|
||||
case RPC_XID_PORTMAP:
|
||||
dlog("Sending PORTMAP request");
|
||||
|
@ -264,20 +260,15 @@ fwd_packet(int type_id, voidp pkt, int len, struct sockaddr_in *fwdto, struct so
|
|||
dlog("UNKNOWN RPC XID");
|
||||
break;
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (type_id & ~RPC_XID_MASK) {
|
||||
p = fwd_locate(type_id);
|
||||
if (p) {
|
||||
#ifdef DEBUG
|
||||
dlog("Discarding earlier rpc fwd handle");
|
||||
#endif /* DEBUG */
|
||||
fwd_free(p);
|
||||
}
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
dlog("Allocating a new xid...");
|
||||
#endif /* DEBUG */
|
||||
type_id = MK_RPC_XID(type_id, XID_ALLOC(struct ));
|
||||
}
|
||||
|
||||
|
@ -305,7 +296,6 @@ fwd_packet(int type_id, voidp pkt, int len, struct sockaddr_in *fwdto, struct so
|
|||
* gateway has gone down. Important to fill in the
|
||||
* rest of "p" otherwise nasty things happen later...
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
{
|
||||
char dq[20];
|
||||
if (p && fwdto)
|
||||
|
@ -314,7 +304,6 @@ fwd_packet(int type_id, voidp pkt, int len, struct sockaddr_in *fwdto, struct so
|
|||
inet_dquad(dq, fwdto->sin_addr.s_addr),
|
||||
ntohs(fwdto->sin_port));
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* if NULL, remote server probably down */
|
||||
if (!fwdto) {
|
||||
|
@ -431,7 +420,6 @@ again:
|
|||
*/
|
||||
pkt_int = (u_int *) pkt;
|
||||
|
||||
#ifdef DEBUG
|
||||
switch (*pkt_int & RPC_XID_MASK) {
|
||||
case RPC_XID_PORTMAP:
|
||||
dlog("Receiving PORTMAP reply");
|
||||
|
@ -446,13 +434,10 @@ again:
|
|||
dlog("UNKNOWN RPC XID");
|
||||
break;
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
p = fwd_locate(*pkt_int);
|
||||
if (!p) {
|
||||
#ifdef DEBUG
|
||||
dlog("Can't forward reply id %#x", *pkt_int);
|
||||
#endif /* DEBUG */
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: srvr_amfs_auto.c,v 1.1.1.4 2001/05/13 17:50:14 veego Exp $ */
|
||||
/* $NetBSD: srvr_amfs_auto.c,v 1.1.1.5 2002/11/29 22:58:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,9 +38,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: srvr_amfs_auto.c,v 1.3.2.3 2001/04/14 21:08:23 ezk Exp
|
||||
* Id: srvr_amfs_auto.c,v 1.9 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -121,9 +120,7 @@ timeout_srvr(voidp v)
|
|||
* we are free to remove this node
|
||||
*/
|
||||
if (fs->fs_refc == 0) {
|
||||
#ifdef DEBUG
|
||||
dlog("Deleting file server %s", fs->fs_host);
|
||||
#endif /* DEBUG */
|
||||
if (fs->fs_flags & FSF_WANT)
|
||||
wakeup_srvr(fs);
|
||||
|
||||
|
@ -171,9 +168,7 @@ free_srvr(fserver *fs)
|
|||
*/
|
||||
int ttl = (fs->fs_flags & (FSF_DOWN | FSF_ERROR)) ? 19 : AM_TTL;
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("Last hard reference to file server %s - will timeout in %ds", fs->fs_host, ttl);
|
||||
#endif /* DEBUG */
|
||||
if (fs->fs_cid) {
|
||||
untimeout(fs->fs_cid);
|
||||
/*
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
./amd -v 2> /dev/null
|
|
@ -29,7 +29,7 @@ EXTRA_DIST = $(man_MANS)
|
|||
|
||||
# dependencies
|
||||
$(PROGRAMS): $(LDADD)
|
||||
$(OBJECTS): \
|
||||
$(amq_OBJECTS) $(pawd_OBJECTS): \
|
||||
../config.h \
|
||||
../aux_conf.h \
|
||||
$(top_srcdir)/include/am_compat.h \
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,11 +11,12 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Package: am-utils
|
||||
# Level: Makefile for amq/ directory
|
||||
# Author: Erez Zadok
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
@ -35,13 +37,9 @@ infodir = @infodir@
|
|||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -50,11 +48,11 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
|
@ -65,29 +63,41 @@ host_alias = @host_alias@
|
|||
host_triplet = @host@
|
||||
AMD_FS_OBJS = @AMD_FS_OBJS@
|
||||
AMD_INFO_OBJS = @AMD_INFO_OBJS@
|
||||
AMTAR = @AMTAR@
|
||||
AMU_LIB_OBJS = @AMU_LIB_OBJS@
|
||||
AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LEX = @LEX@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@
|
||||
LN_S = @LN_S@
|
||||
LTALLOCA = @LTALLOCA@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
am_utils_unmount_args = @am_utils_unmount_args@
|
||||
am_utils_unmount_call = @am_utils_unmount_call@
|
||||
install_sh = @install_sh@
|
||||
|
||||
# allow users to add their own flags via "configure --enable-am-flags=ARG"
|
||||
AMU_CFLAGS = @AMU_CFLAGS@
|
||||
|
||||
sbin_PROGRAMS = amq
|
||||
bin_PROGRAMS = pawd
|
||||
|
@ -104,140 +114,55 @@ pawd_SOURCES = amq_clnt.c amq_xdr.c pawd.c
|
|||
LDADD = ../libamu/libamu.la
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
|
||||
# allow users to add their own flags via "configure --enable-am-flags=ARG"
|
||||
AMU_CFLAGS = @AMU_CFLAGS@
|
||||
CFLAGS = @CFLAGS@ $(AMU_CFLAGS)
|
||||
|
||||
# additional files to distribute and clean
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
subdir = amq
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = pawd$(EXEEXT)
|
||||
sbin_PROGRAMS = amq$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
|
||||
|
||||
am_amq_OBJECTS = amq.$(OBJEXT) amq_clnt.$(OBJEXT) amq_xdr.$(OBJEXT)
|
||||
amq_OBJECTS = $(am_amq_OBJECTS)
|
||||
amq_LDADD = $(LDADD)
|
||||
amq_DEPENDENCIES = ../libamu/libamu.la
|
||||
amq_LDFLAGS =
|
||||
am_pawd_OBJECTS = amq_clnt.$(OBJEXT) amq_xdr.$(OBJEXT) pawd.$(OBJEXT)
|
||||
pawd_OBJECTS = $(am_pawd_OBJECTS)
|
||||
pawd_LDADD = $(LDADD)
|
||||
pawd_DEPENDENCIES = ../libamu/libamu.la
|
||||
pawd_LDFLAGS =
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
DEFS = @DEFS@
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
pawd_OBJECTS = amq_clnt.o amq_xdr.o pawd.o
|
||||
pawd_LDADD = $(LDADD)
|
||||
pawd_DEPENDENCIES = ../libamu/libamu.la
|
||||
pawd_LDFLAGS =
|
||||
amq_OBJECTS = amq.o amq_clnt.o amq_xdr.o
|
||||
amq_LDADD = $(LDADD)
|
||||
amq_DEPENDENCIES = ../libamu/libamu.la
|
||||
amq_LDFLAGS =
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
depcomp =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
|
||||
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
man1dir = $(mandir)/man1
|
||||
man8dir = $(mandir)/man8
|
||||
MANS = $(man_MANS)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(amq_SOURCES) $(pawd_SOURCES)
|
||||
|
||||
NROFF = nroff
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
MANS = $(man_MANS)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
|
||||
SOURCES = $(amq_SOURCES) $(pawd_SOURCES)
|
||||
|
||||
all: all-am
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(pawd_SOURCES) $(amq_SOURCES)
|
||||
OBJECTS = $(pawd_OBJECTS) $(amq_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps amq/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
mostlyclean-sbinPROGRAMS:
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
|
||||
distclean-sbinPROGRAMS:
|
||||
|
||||
maintainer-clean-sbinPROGRAMS:
|
||||
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
@ -246,21 +171,92 @@ clean-libtool:
|
|||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps amq/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
maintainer-clean-libtool:
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(bindir)/$$f; \
|
||||
done
|
||||
|
||||
pawd: $(pawd_OBJECTS) $(pawd_DEPENDENCIES)
|
||||
@rm -f pawd
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(sbindir)/$$f; \
|
||||
done
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
amq$(EXEEXT): $(amq_OBJECTS) $(amq_DEPENDENCIES)
|
||||
@rm -f amq$(EXEEXT)
|
||||
$(LINK) $(amq_LDFLAGS) $(amq_OBJECTS) $(amq_LDADD) $(LIBS)
|
||||
pawd$(EXEEXT): $(pawd_OBJECTS) $(pawd_DEPENDENCIES)
|
||||
@rm -f pawd$(EXEEXT)
|
||||
$(LINK) $(pawd_LDFLAGS) $(pawd_OBJECTS) $(pawd_LDADD) $(LIBS)
|
||||
|
||||
amq: $(amq_OBJECTS) $(amq_DEPENDENCIES)
|
||||
@rm -f amq
|
||||
$(LINK) $(amq_LDFLAGS) $(amq_OBJECTS) $(amq_LDADD) $(LIBS)
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
|
||||
install-man1:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.c.lo:
|
||||
$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
|
||||
uninstall-info-am:
|
||||
|
||||
man1dir = $(mandir)/man1
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
|
@ -270,14 +266,16 @@ install-man1:
|
|||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man1:
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
|
@ -285,15 +283,19 @@ uninstall-man1:
|
|||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
install-man8:
|
||||
man8dir = $(mandir)/man8
|
||||
install-man8: $(man8_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(man8dir)
|
||||
@list='$(man8_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
|
@ -303,14 +305,16 @@ install-man8:
|
|||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man8:
|
||||
@list='$(man8_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
|
@ -318,158 +322,155 @@ uninstall-man8:
|
|||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man8dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man1 install-man8
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1 uninstall-man8
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -fID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
maintainer-clean-tags:
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = amq
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
amq_clnt.o: amq_clnt.c ../config.h ../include/am_defs.h \
|
||||
../amu_nfs_prot.h ../include/am_utils.h ../include/amq_defs.h \
|
||||
../aux_conf.h ../include/am_compat.h ../include/am_xdr_func.h \
|
||||
amq.h
|
||||
amq.o: amq.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amq.h
|
||||
amq_xdr.o: amq_xdr.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amq.h
|
||||
pawd.o: pawd.c ../config.h ../include/am_defs.h ../amu_nfs_prot.h \
|
||||
../include/am_utils.h ../include/amq_defs.h ../aux_conf.h \
|
||||
../include/am_compat.h ../include/am_xdr_func.h amq.h
|
||||
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS)
|
||||
|
||||
install-data-am: install-man
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) \
|
||||
$(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man8
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-sbinPROGRAMS \
|
||||
mostlyclean-compile mostlyclean-libtool \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-sbinPROGRAMS clean-compile \
|
||||
clean-libtool clean-tags clean-generic mostlyclean-am
|
||||
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-sbinPROGRAMS \
|
||||
distclean-compile distclean-libtool distclean-tags \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool \
|
||||
clean-sbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-sbinPROGRAMS maintainer-clean-compile \
|
||||
maintainer-clean-libtool maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man1 install-man8
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS clean-sbinPROGRAMS \
|
||||
maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
|
||||
install-sbinPROGRAMS mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile mostlyclean-libtool \
|
||||
distclean-libtool clean-libtool maintainer-clean-libtool install-man1 \
|
||||
uninstall-man1 install-man8 uninstall-man8 install-man uninstall-man \
|
||||
tags mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man \
|
||||
uninstall-sbinPROGRAMS
|
||||
|
||||
uninstall-man: uninstall-man1 uninstall-man8
|
||||
|
||||
.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libtool clean-sbinPROGRAMS distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am info info-am install \
|
||||
install-am install-binPROGRAMS install-data install-data-am \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
install-man install-man1 install-man8 install-sbinPROGRAMS \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
tags uninstall uninstall-am uninstall-binPROGRAMS \
|
||||
uninstall-info-am uninstall-man uninstall-man1 uninstall-man8 \
|
||||
uninstall-sbinPROGRAMS
|
||||
|
||||
|
||||
# dependencies
|
||||
$(PROGRAMS): $(LDADD)
|
||||
$(OBJECTS): \
|
||||
$(amq_OBJECTS) $(pawd_OBJECTS): \
|
||||
../config.h \
|
||||
../aux_conf.h \
|
||||
$(top_srcdir)/include/am_compat.h \
|
||||
|
@ -479,7 +480,6 @@ $(OBJECTS): \
|
|||
$(top_srcdir)/include/amq_defs.h \
|
||||
@AMU_NFS_PROT_HEADER@ \
|
||||
$(noinst_HEADERS)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amq.h,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: amq.h,v 1.1.1.5 2002/11/29 22:58:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amq.h,v 1.14.2.1 2001/01/10 03:23:14 ezk Exp
|
||||
* Id: amq.h,v 1.17 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amq_clnt.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: amq_clnt.c,v 1.1.1.5 2002/11/29 22:58:22 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amq_clnt.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp
|
||||
* Id: amq_clnt.c,v 1.6 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: amq_xdr.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: amq_xdr.c,v 1.1.1.5 2002/11/29 22:58:22 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: amq_xdr.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp
|
||||
* Id: amq_xdr.c,v 1.6 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: pawd.c,v 1.1.1.4 2001/05/13 17:50:15 veego Exp $ */
|
||||
/* $NetBSD: pawd.c,v 1.1.1.5 2002/11/29 22:58:22 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: pawd.c,v 1.6.2.1 2001/01/10 03:23:14 ezk Exp
|
||||
* Id: pawd.c,v 1.9 2002/02/02 20:58:56 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -53,4 +53,14 @@
|
|||
@am_utils_nfs_hn_dref@
|
||||
/* End of included NFS_HN_DREF macro definition file */
|
||||
|
||||
/*
|
||||
* The next line is a literal inclusion of a file which defines
|
||||
* necessary structures and functions for this system's flavor
|
||||
* of kernel-based autofs.
|
||||
* If it defines the wrong entry, check the AC_CHECK_AUTOFS_STYLE m4 macro
|
||||
* in $srcdir/aux/macros.
|
||||
*/
|
||||
@am_utils_autofs_style@
|
||||
/* End of included AUTOFS_STYLE macro definition file */
|
||||
|
||||
#endif /* not _AUX_CONF_H */
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
#!/bin/sh
|
||||
#set -x
|
||||
# helps bootstrapping am-utils, when checked out from CVS
|
||||
# requires GNU autoconf and GNU automake
|
||||
# this is not meant to go into the distributions
|
||||
# Erez Zadok <ezk@cs.columbia.edu>
|
||||
|
||||
# test cwd
|
||||
test -f ../amd/amd.c && cd ..
|
||||
if [ ! -f amd/amd.c ]; then
|
||||
echo "Must run $0 from the top level source directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# validate macros directory and some macro files
|
||||
if [ ! -d aux/macros ]; then
|
||||
echo No aux/macros directory found!
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f aux/macros/HEADER ]; then
|
||||
echo No aux/macros/HEADER file found!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove any remaining autom4te.cache directory
|
||||
rm -fr autom4te.cache
|
||||
|
||||
# generate acinclude.m4 file
|
||||
echo "AMU: prepare acinclude.m4..."
|
||||
test -f acinclude.m4 && mv -f acinclude.m4 acinclude.m4.old
|
||||
(cd aux/macros
|
||||
for i in HEADER *.m4; do
|
||||
cat $i
|
||||
echo
|
||||
echo
|
||||
done
|
||||
cat TRAILER
|
||||
) > acinclude.m4
|
||||
|
||||
# generate aclocal.m4 file
|
||||
echo "AMU: aclocal..."
|
||||
test -f aclocal.m4 && mv -f aclocal.m4 aclocal.m4.old
|
||||
# show version
|
||||
aclocal --version 2>&1 | head -1
|
||||
if aclocal ; then
|
||||
:
|
||||
else
|
||||
echo "aclocal command failed. fix errors and rerun $0."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# produce new configure.in (temp) script
|
||||
echo "AMU: autoconf..."
|
||||
# show version
|
||||
autoconf --version 2>&1 | head -1
|
||||
LOG=/tmp/amu-$$.log
|
||||
rm -f ${LOG}
|
||||
autoconf configure.in > configure.new 2> ${LOG}
|
||||
# until Automake requires Autoconf 2.50, manual says to ignore this
|
||||
CUTWARNMSG1="warning: AC_PROG_LEX invoked multiple times|do not use m4_(patsubst|regexp):"
|
||||
egrep -v "${CUTWARNMSG1}" ${LOG} > ${LOG}.new
|
||||
mv ${LOG}.new ${LOG}
|
||||
if test -s ${LOG}; then
|
||||
echo "AUTOCONF ERRORS (MUST FIX):"
|
||||
cat ${LOG}
|
||||
rm -f ${LOG}
|
||||
exit 2
|
||||
fi
|
||||
# now prepare the real configure script
|
||||
mv -f configure configure.old
|
||||
mv -f configure.new configure
|
||||
chmod a+rx configure
|
||||
rm -f configure.old
|
||||
|
||||
# run autoheader to produce C header .in files
|
||||
echo "AMU: autoheader..."
|
||||
# show version
|
||||
autoheader --version 2>&1 | head -1
|
||||
autoheader configure.in > config.h.in 2> ${LOG}
|
||||
CUTWARNMSG2="autoheader: \`config.h.in' is updated"
|
||||
egrep -v "${CUTWARNMSG2}" ${LOG} > ${LOG}.new
|
||||
mv ${LOG}.new ${LOG}
|
||||
if test -s ${LOG}; then
|
||||
echo "AUTOHEADER ERRORS (MUST FIX):"
|
||||
cat ${LOG}
|
||||
rm -f ${LOG}
|
||||
exit 2
|
||||
fi
|
||||
rm -f ${LOG}
|
||||
|
||||
# generate makefiles
|
||||
cmd="automake --add-missing --copy --ignore-deps"
|
||||
#cmd="automake --add-missing"
|
||||
echo "AMU: $cmd..."
|
||||
# show version
|
||||
automake --version 2>&1 | head -1
|
||||
if ${cmd} ; then
|
||||
:
|
||||
else
|
||||
echo "automake command failed. fix errors and rerun $0."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# save timestamp
|
||||
echo "AMU: save timestamp..."
|
||||
echo timestamp > stamp-h.in
|
||||
|
||||
exit 0
|
|
@ -38,7 +38,7 @@ fi
|
|||
bld_cmd=""
|
||||
bld_flags=""
|
||||
cnf_cmd=""
|
||||
cnf_flags=""
|
||||
cnf_flags="-C" # use config.cache cache file
|
||||
mkcnf_cmd=""
|
||||
vars=""
|
||||
expvars=""
|
||||
|
@ -160,7 +160,7 @@ case "$1" in
|
|||
;;
|
||||
|
||||
-Ds )
|
||||
cnf_cmd="../configure --prefix=/usr/local/AMD --enable-debug=yes"
|
||||
cnf_cmd="../configure -enable-debug=yes"
|
||||
# cnf_cmd="../configure --prefix=/usr/local/AMD --enable-debug=yes --enable-shared --disable-static \
|
||||
# --enable-cppflags=\"-I${HOME}/ldap/include -I${HOME}/hesiod/include\" \
|
||||
# --enable-ldflags=\"-L${HOME}/ldap/lib -L${HOME}/hesiod/lib\""
|
||||
|
@ -195,13 +195,13 @@ case "$1" in
|
|||
|
||||
-- )
|
||||
shift
|
||||
bld_flags="$*"
|
||||
cmdline_cnf_flags="$*"
|
||||
break # from while loop
|
||||
;;
|
||||
|
||||
-h | * )
|
||||
cat <<EOF
|
||||
Usage: buildall [-b] [-[cCdD][s]] [-K] [-q] [-h] [-- makeopts]
|
||||
Usage: buildall [-b] [-[cCdD][s]] [-K] [-q] [-h] [-- configopts]
|
||||
-b: build only
|
||||
-c: configure (debugging)
|
||||
-cs: configure (debugging, shared libs)
|
||||
|
@ -214,7 +214,7 @@ Usage: buildall [-b] [-[cCdD][s]] [-K] [-q] [-h] [-- makeopts]
|
|||
-K: run mkconf to update *.in files (developers only)
|
||||
-q: quick configure only (run config.status)
|
||||
-h: print usage
|
||||
makeopts: options to pass to make (must be last and after a --)
|
||||
configopts: options to pass to configure (must be last and after a --)
|
||||
You may pass variables: CFLAGS for build, MAKE for your make program
|
||||
and AM_CFLAGS for additional build flags.
|
||||
EOF
|
||||
|
@ -226,7 +226,7 @@ done
|
|||
|
||||
# if AM_CFLAGS was set before, then add it to the configure option
|
||||
if test -n "${AM_CFLAGS}"; then
|
||||
cnf_flags="--enable-am-cflags=${AM_CFLAGS}"
|
||||
extra_cnf_flags="--enable-am-cflags=${AM_CFLAGS}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
@ -275,11 +275,15 @@ fi
|
|||
# Some system's /bin/sh has limits/bugs which prevent it from being used
|
||||
# with configure
|
||||
case "${host_alias}" in
|
||||
*hpux9* )
|
||||
if test -f /bin/bash; then
|
||||
cnf_cmd="/bin/bash $cnf_cmd"
|
||||
elif test -f /bin/ksh; then
|
||||
cnf_cmd="/bin/ksh $cnf_cmd"
|
||||
*hpux9* | *aix5.1* )
|
||||
if test -n "$cnf_cmd"; then
|
||||
if test -f /bin/bash; then
|
||||
cnf_cmd="/bin/bash $cnf_cmd"
|
||||
elif test -f /bin/ksh; then
|
||||
cnf_cmd="/bin/ksh $cnf_cmd"
|
||||
fi
|
||||
else
|
||||
:
|
||||
fi
|
||||
echo "WARNING: do not use /bin/make under this system."
|
||||
echo "Instead, use GNU make or 'ksh ./configure' directly."
|
||||
|
@ -310,12 +314,12 @@ if test -n "$cnf_cmd"; then
|
|||
else
|
||||
:
|
||||
fi
|
||||
if test -z "$cnf_flags"; then
|
||||
if test -z "${cnf_flags}${extra_cnf_flags}"; then
|
||||
echo $cnf_cmd
|
||||
$cnf_cmd || exit 1
|
||||
$cnf_cmd "$cmdline_cnf_flags" || exit 1
|
||||
else
|
||||
echo $cnf_cmd "$cnf_flags"
|
||||
$cnf_cmd "$cnf_flags" || exit 1
|
||||
echo $cnf_cmd "$cnf_flags" "$extra_cnf_flags"
|
||||
$cnf_cmd "$cnf_flags" "$extra_cnf_flags" "$cmdline_cnf_flags" || exit 1
|
||||
fi
|
||||
else
|
||||
:
|
||||
|
@ -324,8 +328,8 @@ fi
|
|||
##############################################################################
|
||||
# if need to [re]build
|
||||
if test -n "$bld_cmd"; then
|
||||
echo $bld_cmd $bld_flags
|
||||
$bld_cmd $bld_flags || exit 1
|
||||
echo $bld_cmd
|
||||
$bld_cmd || exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/* $NetBSD: autofs_default.c,v 1.1.1.1 2002/11/29 22:58:26 christos Exp $ */
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/* $NetBSD: autofs_default.h,v 1.1.1.1 2002/11/29 22:58:26 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Autofs is not supported on this platform,
|
||||
* so disable it if it gets detected.
|
||||
*/
|
||||
|
||||
#ifdef MNTTYPE_AUTOFS
|
||||
# undef MNTTYPE_AUTOFS
|
||||
#endif /* MNTTYPE_AUTOFS */
|
||||
#ifdef MNTTAB_TYPE_AUTOFS
|
||||
# undef MNTTAB_TYPE_AUTOFS
|
||||
#endif /* MNTTAB_TYPE_AUTOFS */
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
# undef HAVE_FS_AUTOFS
|
||||
#endif /* HAVE_FS_AUTOFS */
|
|
@ -0,0 +1,702 @@
|
|||
/* $NetBSD: autofs_linux.c,v 1.1.1.1 2002/11/29 22:58:26 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Ion Badulescu
|
||||
* Copyright (c) 1997-2002 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.
|
||||
*
|
||||
*
|
||||
* Id: autofs_linux.c,v 1.28 2002/06/24 03:51:26 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Automounter filesystem
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <am_defs.h>
|
||||
#include <amd.h>
|
||||
|
||||
/*
|
||||
* MACROS:
|
||||
*/
|
||||
|
||||
#define AUTOFS_MIN_VERSION 3
|
||||
#define AUTOFS_MAX_VERSION 4
|
||||
|
||||
|
||||
/*
|
||||
* STRUCTURES:
|
||||
*/
|
||||
|
||||
/*
|
||||
* VARIABLES:
|
||||
*/
|
||||
|
||||
static int autofs_max_fds;
|
||||
static am_node **hash;
|
||||
static int *list;
|
||||
static int numfds = 0;
|
||||
static int bind_works = 1;
|
||||
|
||||
|
||||
static void hash_init(void)
|
||||
{
|
||||
int i;
|
||||
struct rlimit rlim;
|
||||
|
||||
if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) {
|
||||
plog(XLOG_ERROR, "getrlimit failed, defaulting to 256 fd's");
|
||||
autofs_max_fds = 256;
|
||||
} else {
|
||||
autofs_max_fds = (rlim.rlim_cur > 1024) ? 1024 : rlim.rlim_cur;
|
||||
plog(XLOG_INFO, "%d fd's available for autofs", autofs_max_fds);
|
||||
}
|
||||
|
||||
list = malloc(autofs_max_fds * sizeof(*list));
|
||||
hash = malloc(autofs_max_fds * sizeof(*hash));
|
||||
|
||||
for (i = 0 ; i < autofs_max_fds; i++)
|
||||
hash[i] = 0, list[i] = -1;
|
||||
}
|
||||
|
||||
|
||||
static void hash_insert(int fd, am_node *mp)
|
||||
{
|
||||
if (hash[fd] != 0)
|
||||
plog(XLOG_ERROR, "file descriptor %d already in the hash", fd);
|
||||
|
||||
hash[fd] = mp;
|
||||
list[numfds] = fd;
|
||||
numfds++;
|
||||
}
|
||||
|
||||
|
||||
static void hash_delete(int fd)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (hash[fd] == 0)
|
||||
plog(XLOG_WARNING, "file descriptor %d not in the hash", fd);
|
||||
|
||||
hash[fd] = 0;
|
||||
numfds--;
|
||||
for (i = 0; i < numfds; i++)
|
||||
if (list[i] == fd) {
|
||||
list[i] = list[numfds];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
autofs_fh_t *
|
||||
autofs_get_fh(am_node *mp)
|
||||
{
|
||||
int fds[2];
|
||||
autofs_fh_t *fh;
|
||||
|
||||
plog(XLOG_DEBUG, "autofs_get_fh for %s", mp->am_path);
|
||||
if (pipe(fds) < 0)
|
||||
return 0;
|
||||
|
||||
/* sanity check */
|
||||
if (fds[0] > autofs_max_fds)
|
||||
return 0;
|
||||
|
||||
fh = ALLOC(autofs_fh_t);
|
||||
fh->fd = fds[0];
|
||||
fh->kernelfd = fds[1];
|
||||
fh->ioctlfd = -1;
|
||||
fh->pending_mounts = NULL;
|
||||
fh->pending_umounts = NULL;
|
||||
|
||||
hash_insert(fh->fd, mp);
|
||||
|
||||
return fh;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_mounted(am_node *mp)
|
||||
{
|
||||
mntfs *mf = mp->am_mnt;
|
||||
autofs_fh_t *fh = mf->mf_autofs_fh;
|
||||
unsigned long timeout = gopt.am_timeo;
|
||||
|
||||
close(fh->kernelfd);
|
||||
fh->kernelfd = -1;
|
||||
|
||||
fh->ioctlfd = open(mf->mf_mount, O_RDONLY);
|
||||
/* Get autofs protocol version */
|
||||
if (ioctl(fh->ioctlfd, AUTOFS_IOC_PROTOVER, &fh->version) < 0) {
|
||||
plog(XLOG_ERROR, "AUTOFS_IOC_PROTOVER: %s", strerror(errno));
|
||||
fh->version = AUTOFS_MIN_VERSION;
|
||||
plog(XLOG_ERROR, "autofs: assuming protocol version %d", fh->version);
|
||||
} else
|
||||
plog(XLOG_INFO, "autofs: using protocol version %d", fh->version);
|
||||
|
||||
if (fh->version < 4) {
|
||||
/* no support for subdirs */
|
||||
plog(XLOG_INFO, "Turning off autofs support for host filesystems");
|
||||
amfs_host_ops.nfs_fs_flags &= ~FS_AUTOFS;
|
||||
amfs_host_ops.autofs_fs_flags &= ~FS_AUTOFS;
|
||||
}
|
||||
|
||||
/* set expiration timeout */
|
||||
if (ioctl(fh->ioctlfd, AUTOFS_IOC_SETTIMEOUT, &timeout) < 0)
|
||||
plog(XLOG_ERROR, "AUTOFS_IOC_SETTIMEOUT: %s", strerror(errno));
|
||||
|
||||
/* tell the daemon to call us for expirations */
|
||||
mp->am_ttl = clocktime() + gopt.am_timeo_w;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_release_fh(autofs_fh_t *fh)
|
||||
{
|
||||
if (fh) {
|
||||
hash_delete(fh->fd);
|
||||
/*
|
||||
* if a mount succeeded, the kernel fd was closed on
|
||||
* the amd side, so it might have been reused.
|
||||
* we set it to -1 after closing it, to avoid the problem.
|
||||
*/
|
||||
if (fh->kernelfd >= 0)
|
||||
close(fh->kernelfd);
|
||||
|
||||
if (fh->ioctlfd >= 0) {
|
||||
/*
|
||||
* Tell the kernel we're catatonic
|
||||
*/
|
||||
ioctl(fh->ioctlfd, AUTOFS_IOC_CATATONIC, 0);
|
||||
close(fh->ioctlfd);
|
||||
}
|
||||
|
||||
if (fh->fd >= 0)
|
||||
close(fh->fd);
|
||||
|
||||
XFREE(fh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_add_fdset(fd_set *readfds)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < numfds; i++)
|
||||
FD_SET(list[i], readfds);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
autofs_get_pkt(int fd, char *buf, int bytes)
|
||||
{
|
||||
int i;
|
||||
|
||||
do {
|
||||
i = read(fd, buf, bytes);
|
||||
|
||||
if (i <= 0)
|
||||
break;
|
||||
|
||||
buf += i;
|
||||
bytes -= i;
|
||||
} while (bytes);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
send_fail(int fd, unsigned long token)
|
||||
{
|
||||
if (token == 0)
|
||||
return;
|
||||
if (ioctl(fd, AUTOFS_IOC_FAIL, token) < 0)
|
||||
plog(XLOG_ERROR, "AUTOFS_IOC_FAIL: %s", strerror(errno));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
send_ready(int fd, unsigned long token)
|
||||
{
|
||||
if (token == 0)
|
||||
return;
|
||||
if (ioctl(fd, AUTOFS_IOC_READY, token) < 0)
|
||||
plog(XLOG_ERROR, "AUTOFS_IOC_READY: %s", strerror(errno));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
autofs_lookup_failed(am_node *mp, char *name)
|
||||
{
|
||||
autofs_fh_t *fh = mp->am_mnt->mf_autofs_fh;
|
||||
struct autofs_pending_mount **pp, *p;
|
||||
|
||||
pp = &fh->pending_mounts;
|
||||
while (*pp && !STREQ((*pp)->name, name))
|
||||
pp = &(*pp)->next;
|
||||
|
||||
/* sanity check */
|
||||
if (*pp == NULL)
|
||||
return;
|
||||
|
||||
p = *pp;
|
||||
plog(XLOG_INFO, "autofs: lookup of %s failed", name);
|
||||
send_fail(fh->ioctlfd, p->wait_queue_token);
|
||||
|
||||
XFREE(p->name);
|
||||
*pp = p->next;
|
||||
XFREE(p);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
autofs_expire_one(am_node *mp, char *name, unsigned long token)
|
||||
{
|
||||
autofs_fh_t *fh;
|
||||
am_node *ap;
|
||||
struct autofs_pending_umount *p;
|
||||
char *ap_path;
|
||||
|
||||
fh = mp->am_mnt->mf_autofs_fh;
|
||||
|
||||
ap_path = str3cat(NULL, mp->am_path, "/", name);
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tumount(%s)", ap_path);
|
||||
|
||||
p = fh->pending_umounts;
|
||||
while (p && p->wait_queue_token != token)
|
||||
p = p->next;
|
||||
|
||||
if (p) {
|
||||
/* already pending */
|
||||
dlog("Umounting of %s already pending", ap_path);
|
||||
amd_stats.d_drops++;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ap = find_ap(ap_path);
|
||||
if (ap == NULL) {
|
||||
/* not found??? not sure what to do here... */
|
||||
send_fail(fh->ioctlfd, token);
|
||||
goto out;
|
||||
}
|
||||
|
||||
p = ALLOC(struct autofs_pending_umount);
|
||||
p->wait_queue_token = token;
|
||||
p->name = strdup(name);
|
||||
p->next = fh->pending_umounts;
|
||||
fh->pending_umounts = p;
|
||||
|
||||
unmount_mp(ap);
|
||||
|
||||
out:
|
||||
XFREE(ap_path);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
autofs_handle_expire(am_node *mp, struct autofs_packet_expire *pkt)
|
||||
{
|
||||
autofs_expire_one(mp, pkt->name, 0);
|
||||
}
|
||||
|
||||
|
||||
#ifdef autofs_ptype_expire_multi
|
||||
static void
|
||||
autofs_handle_expire_multi(am_node *mp, struct autofs_packet_expire_multi *pkt)
|
||||
{
|
||||
autofs_expire_one(mp, pkt->name, pkt->wait_queue_token);
|
||||
}
|
||||
#endif /* autofs_packet_expire_multi */
|
||||
|
||||
|
||||
static void
|
||||
autofs_handle_missing(am_node *mp, struct autofs_packet_missing *pkt)
|
||||
{
|
||||
autofs_fh_t *fh;
|
||||
mntfs *mf;
|
||||
am_node *ap;
|
||||
struct autofs_pending_mount *p;
|
||||
int error;
|
||||
|
||||
mf = mp->am_mnt;
|
||||
fh = mf->mf_autofs_fh;
|
||||
|
||||
p = fh->pending_mounts;
|
||||
while (p && p->wait_queue_token != pkt->wait_queue_token)
|
||||
p = p->next;
|
||||
|
||||
if (p) {
|
||||
/* already pending */
|
||||
dlog("Mounting of %s/%s already pending",
|
||||
mp->am_path, pkt->name);
|
||||
amd_stats.d_drops++;
|
||||
return;
|
||||
}
|
||||
|
||||
p = ALLOC(struct autofs_pending_mount);
|
||||
p->wait_queue_token = pkt->wait_queue_token;
|
||||
p->name = strdup(pkt->name);
|
||||
p->next = fh->pending_mounts;
|
||||
fh->pending_mounts = p;
|
||||
|
||||
amuDebug(D_TRACE)
|
||||
plog(XLOG_DEBUG, "\tlookup(%s, %s)", mp->am_path, pkt->name);
|
||||
ap = mf->mf_ops->lookup_child(mp, pkt->name, &error, VLOOK_CREATE);
|
||||
if (ap && error < 0)
|
||||
ap = mf->mf_ops->mount_child(ap, &error);
|
||||
|
||||
/* some of the rest can be done in amfs_auto_cont */
|
||||
|
||||
if (ap == 0) {
|
||||
if (error < 0) {
|
||||
dlog("Mount still pending, not sending autofs reply yet");
|
||||
return;
|
||||
}
|
||||
autofs_lookup_failed(mp, pkt->name);
|
||||
}
|
||||
mp->am_stats.s_lookup++;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_handle_fdset(fd_set *readfds, int nsel)
|
||||
{
|
||||
int i;
|
||||
union autofs_packet_union pkt;
|
||||
autofs_fh_t *fh;
|
||||
am_node *mp;
|
||||
|
||||
for (i = 0; nsel && i < numfds; i++) {
|
||||
if (!FD_ISSET(list[i], readfds))
|
||||
continue;
|
||||
|
||||
nsel--;
|
||||
FD_CLR(list[i], readfds);
|
||||
mp = hash[list[i]];
|
||||
fh = mp->am_mnt->mf_autofs_fh;
|
||||
|
||||
if (autofs_get_pkt(fh->fd, (char *) &pkt,
|
||||
sizeof(union autofs_packet_union)))
|
||||
continue;
|
||||
|
||||
switch (pkt.hdr.type) {
|
||||
case autofs_ptype_missing:
|
||||
autofs_handle_missing(mp, &pkt.missing);
|
||||
break;
|
||||
case autofs_ptype_expire:
|
||||
autofs_handle_expire(mp, &pkt.expire);
|
||||
break;
|
||||
#ifdef autofs_ptype_expire_multi
|
||||
case autofs_ptype_expire_multi:
|
||||
autofs_handle_expire_multi(mp, &pkt.expire_multi);
|
||||
#endif /* autofs_handle_expire_multi */
|
||||
default:
|
||||
plog(XLOG_ERROR, "Unknown autofs packet type %d",
|
||||
pkt.hdr.type);
|
||||
}
|
||||
}
|
||||
return nsel;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
create_autofs_service(void)
|
||||
{
|
||||
hash_init();
|
||||
|
||||
/* not the best place, but... */
|
||||
if (linux_version_code() < KERNEL_VERSION(2,4,0))
|
||||
bind_works = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
destroy_autofs_service(void)
|
||||
{
|
||||
/* Nothing to do */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_link_mount(am_node *mp)
|
||||
{
|
||||
int err = -1;
|
||||
|
||||
#ifdef MNT2_GEN_OPT_BIND
|
||||
if (bind_works) {
|
||||
mntent_t mnt;
|
||||
struct stat buf;
|
||||
|
||||
/*
|
||||
* we need to stat() the destination, because the bind mount does not
|
||||
* follow symlinks and/or allow for non-existent destinations.
|
||||
* we fall back to symlinks if there are problems.
|
||||
*
|
||||
* we need to temporarily change pgrp, otherwise our stat() won't
|
||||
* trigger whatever cascading mounts are needed.
|
||||
*
|
||||
* WARNING: we will deadlock if this function is called from the master
|
||||
* amd process and it happens to trigger another auto mount. Therefore,
|
||||
* this function should be called only from a child amd process, or
|
||||
* at the very least it should not be called from the parent unless we
|
||||
* know for sure that it won't cause a recursive mount. We refuse to
|
||||
* cause the recursive mount anyway if called from the parent amd.
|
||||
*/
|
||||
if (!foreground) {
|
||||
pid_t pgrp = getpgrp();
|
||||
setpgrp();
|
||||
err = stat(mp->am_link, &buf);
|
||||
if (setpgid(0, pgrp)) {
|
||||
plog(XLOG_ERROR, "autofs: cannot restore pgrp: %s", strerror(errno));
|
||||
plog(XLOG_ERROR, "autofs: aborting the mount");
|
||||
return errno;
|
||||
}
|
||||
if (err)
|
||||
goto use_symlink;
|
||||
}
|
||||
if ((err = lstat(mp->am_link, &buf)))
|
||||
goto use_symlink;
|
||||
if (S_ISLNK(buf.st_mode))
|
||||
goto use_symlink;
|
||||
plog(XLOG_INFO, "autofs: bind-mounting %s -> %s", mp->am_path, mp->am_link);
|
||||
memset(&mnt, 0, sizeof(mnt));
|
||||
mnt.mnt_dir = mp->am_path;
|
||||
mnt.mnt_fsname = mp->am_link;
|
||||
mnt.mnt_type = "bind";
|
||||
mnt.mnt_opts = "";
|
||||
mkdirs(mp->am_path, 0555);
|
||||
err = mount_fs(&mnt, MNT2_GEN_OPT_BIND, NULL, 0, "bind", 0, NULL, mnttab_file_name);
|
||||
if (err)
|
||||
rmdir(mp->am_path);
|
||||
}
|
||||
use_symlink:
|
||||
#endif /* MNT2_GEN_OPT_BIND */
|
||||
if (err) {
|
||||
plog(XLOG_INFO, "autofs: symlinking %s -> %s", mp->am_path, mp->am_link);
|
||||
err = symlink(mp->am_link, mp->am_path);
|
||||
}
|
||||
if (err)
|
||||
return errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_link_umount(am_node *mp)
|
||||
{
|
||||
struct stat buf;
|
||||
int err;
|
||||
|
||||
if ((err = lstat(mp->am_path, &buf)))
|
||||
return errno;
|
||||
|
||||
if (S_ISDIR(buf.st_mode)) {
|
||||
plog(XLOG_INFO, "autofs: un-bind-mounting %s", mp->am_path);
|
||||
err = umount_fs(mp->am_path, mnttab_file_name);
|
||||
if (err)
|
||||
plog(XLOG_INFO, "autofs: unmounting %s failed: %m", mp->am_path);
|
||||
else
|
||||
rmdir(mp->am_path);
|
||||
} else {
|
||||
plog(XLOG_INFO, "autofs: deleting symlink %s", mp->am_path);
|
||||
err = unlink(mp->am_path);
|
||||
}
|
||||
if (err)
|
||||
return errno;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_umount_succeeded(am_node *mp)
|
||||
{
|
||||
autofs_fh_t *fh = mp->am_parent->am_mnt->mf_autofs_fh;
|
||||
struct autofs_pending_umount **pp, *p;
|
||||
|
||||
pp = &fh->pending_umounts;
|
||||
while (*pp && !STREQ((*pp)->name, mp->am_name))
|
||||
pp = &(*pp)->next;
|
||||
|
||||
/* sanity check */
|
||||
if (*pp == NULL)
|
||||
return -1;
|
||||
|
||||
p = *pp;
|
||||
plog(XLOG_INFO, "autofs: unmounting %s succeeded", mp->am_path);
|
||||
send_ready(fh->ioctlfd, p->wait_queue_token);
|
||||
|
||||
XFREE(p->name);
|
||||
*pp = p->next;
|
||||
XFREE(p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_umount_failed(am_node *mp)
|
||||
{
|
||||
autofs_fh_t *fh = mp->am_parent->am_mnt->mf_autofs_fh;
|
||||
struct autofs_pending_umount **pp, *p;
|
||||
|
||||
pp = &fh->pending_umounts;
|
||||
while (*pp && !STREQ((*pp)->name, mp->am_name))
|
||||
pp = &(*pp)->next;
|
||||
|
||||
/* sanity check */
|
||||
if (*pp == NULL)
|
||||
return -1;
|
||||
|
||||
p = *pp;
|
||||
plog(XLOG_INFO, "autofs: unmounting %s failed", mp->am_path);
|
||||
send_fail(fh->ioctlfd, p->wait_queue_token);
|
||||
|
||||
XFREE(p->name);
|
||||
*pp = p->next;
|
||||
XFREE(p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_mount_succeeded(am_node *mp)
|
||||
{
|
||||
autofs_fh_t *fh = mp->am_parent->am_mnt->mf_autofs_fh;
|
||||
struct autofs_pending_mount **pp, *p;
|
||||
|
||||
/* don't expire the entries -- the kernel will do it for us */
|
||||
mp->am_flags |= AMF_NOTIMEOUT;
|
||||
|
||||
pp = &fh->pending_mounts;
|
||||
while (*pp && !STREQ((*pp)->name, mp->am_name))
|
||||
pp = &(*pp)->next;
|
||||
|
||||
/* sanity check */
|
||||
if (*pp == NULL)
|
||||
return;
|
||||
|
||||
p = *pp;
|
||||
plog(XLOG_INFO, "autofs: mounting %s succeeded", mp->am_path);
|
||||
send_ready(fh->ioctlfd, p->wait_queue_token);
|
||||
|
||||
XFREE(p->name);
|
||||
*pp = p->next;
|
||||
XFREE(p);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_mount_failed(am_node *mp)
|
||||
{
|
||||
autofs_fh_t *fh = mp->am_parent->am_mnt->mf_autofs_fh;
|
||||
struct autofs_pending_mount **pp, *p;
|
||||
|
||||
pp = &fh->pending_mounts;
|
||||
while (*pp && !STREQ((*pp)->name, mp->am_name))
|
||||
pp = &(*pp)->next;
|
||||
|
||||
/* sanity check */
|
||||
if (*pp == NULL)
|
||||
return;
|
||||
|
||||
p = *pp;
|
||||
plog(XLOG_INFO, "autofs: mounting %s failed", mp->am_path);
|
||||
send_fail(fh->ioctlfd, p->wait_queue_token);
|
||||
|
||||
XFREE(p->name);
|
||||
*pp = p->next;
|
||||
XFREE(p);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_get_opts(char *opts, autofs_fh_t *fh)
|
||||
{
|
||||
sprintf(opts, "fd=%d,minproto=%d,maxproto=%d",
|
||||
fh->kernelfd, AUTOFS_MIN_VERSION, AUTOFS_MAX_VERSION);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_compute_mount_flags(mntent_t *mnt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef autofs_ptype_expire_multi
|
||||
static int autofs_timeout_mp_task(void *arg)
|
||||
{
|
||||
am_node *mp = (am_node *)arg;
|
||||
autofs_fh_t *fh = mp->am_mnt->mf_autofs_fh;
|
||||
int now = 0;
|
||||
|
||||
while (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE_MULTI, &now) == 0);
|
||||
return 0;
|
||||
}
|
||||
#endif /* autofs_ptype_expire_multi */
|
||||
|
||||
|
||||
void autofs_timeout_mp(am_node *mp)
|
||||
{
|
||||
autofs_fh_t *fh = mp->am_mnt->mf_autofs_fh;
|
||||
time_t now = clocktime();
|
||||
|
||||
/* update the ttl, but only if we're not going down */
|
||||
if (mp->am_flags & AMF_NOTIMEOUT)
|
||||
mp->am_ttl = now + gopt.am_timeo_w;
|
||||
|
||||
if (fh->version < 4) {
|
||||
struct autofs_packet_expire pkt;
|
||||
while (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE, &pkt) == 0)
|
||||
autofs_handle_expire(mp, &pkt);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef autofs_ptype_expire_multi
|
||||
run_task(autofs_timeout_mp_task, mp, NULL, NULL);
|
||||
#endif /* autofs_ptype_expire_multi */
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
/* $NetBSD: autofs_linux.h,v 1.1.1.1 2002/11/29 22:58:26 christos Exp $ */
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
|
||||
struct autofs_pending_mount {
|
||||
unsigned long wait_queue_token; /* Associated kernel wait token */
|
||||
char *name;
|
||||
struct autofs_pending_mount *next;
|
||||
};
|
||||
|
||||
struct autofs_pending_umount {
|
||||
unsigned long wait_queue_token; /* Associated kernel wait token */
|
||||
char *name;
|
||||
struct autofs_pending_umount *next;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
int kernelfd;
|
||||
int ioctlfd;
|
||||
int version;
|
||||
struct autofs_pending_mount *pending_mounts;
|
||||
struct autofs_pending_umount *pending_umounts;
|
||||
} autofs_fh_t;
|
||||
|
||||
typedef void * autofs_data_t;
|
||||
|
||||
#ifndef HAVE_LINUX_AUTO_FS4_H
|
||||
union autofs_packet_union {
|
||||
struct autofs_packet_hdr hdr;
|
||||
struct autofs_packet_missing missing;
|
||||
struct autofs_packet_expire expire;
|
||||
};
|
||||
#endif /* not HAVE_LINUX_AUTO_FS4_H */
|
||||
|
||||
#define AUTOFS_AUTO_FS_FLAGS (FS_MKMNT | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)
|
||||
#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS)
|
||||
#define AUTOFS_ERROR_FS_FLAGS (FS_DISCARD)
|
||||
#define AUTOFS_HOST_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS)
|
||||
#define AUTOFS_INHERIT_FS_FLAGS (FS_DISCARD)
|
||||
#define AUTOFS_LINK_FS_FLAGS (FS_MBACKGROUND)
|
||||
#define AUTOFS_LINKX_FS_FLAGS (FS_MBACKGROUND)
|
||||
#define AUTOFS_NFSL_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_NFSX_FS_FLAGS (/* FS_UBACKGROUND| */ FS_AMQINFO)
|
||||
#define AUTOFS_PROGRAM_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_ROOT_FS_FLAGS (FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY)
|
||||
#define AUTOFS_TOPLVL_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)
|
||||
#define AUTOFS_UNION_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY)
|
||||
|
||||
#define AUTOFS_CACHEFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_CDFS_FS_FLAGS (FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_EFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_LOFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_NFS_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_PCFS_FS_FLAGS (FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_UFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_XFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#endif /* HAVE_FS_AUTOFS */
|
|
@ -0,0 +1,725 @@
|
|||
/* $NetBSD: autofs_solaris_v1.c,v 1.1.1.1 2002/11/29 22:58:27 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Ion Badulescu
|
||||
* Copyright (c) 1997-2002 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.
|
||||
*
|
||||
*
|
||||
* Id: autofs_solaris_v1.c,v 1.10 2002/06/24 15:41:33 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Automounter filesystem
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <am_defs.h>
|
||||
#include <amd.h>
|
||||
|
||||
/*
|
||||
* MACROS:
|
||||
*/
|
||||
#ifndef AUTOFS_NULL
|
||||
# define AUTOFS_NULL NULLPROC
|
||||
#endif /* not AUTOFS_NULL */
|
||||
|
||||
/*
|
||||
* STRUCTURES:
|
||||
*/
|
||||
|
||||
/*
|
||||
* VARIABLES:
|
||||
*/
|
||||
|
||||
SVCXPRT *autofs_xprt = NULL;
|
||||
|
||||
/* forward declarations */
|
||||
# ifndef HAVE_XDR_MNTREQUEST
|
||||
bool_t xdr_mntrequest(XDR *xdrs, mntrequest *objp);
|
||||
# endif /* not HAVE_XDR_MNTREQUEST */
|
||||
# ifndef HAVE_XDR_MNTRES
|
||||
bool_t xdr_mntres(XDR *xdrs, mntres *objp);
|
||||
# endif /* not HAVE_XDR_MNTRES */
|
||||
# ifndef HAVE_XDR_UMNTREQUEST
|
||||
bool_t xdr_umntrequest(XDR *xdrs, umntrequest *objp);
|
||||
# endif /* not HAVE_XDR_UMNTREQUEST */
|
||||
# ifndef HAVE_XDR_UMNTRES
|
||||
bool_t xdr_umntres(XDR *xdrs, umntres *objp);
|
||||
# endif /* not HAVE_XDR_UMNTRES */
|
||||
static int autofs_mount_1_req(struct mntrequest *mr, struct mntres *result, struct authunix_parms *cred);
|
||||
static int autofs_unmount_1_req(struct umntrequest *ur, struct umntres *result, struct authunix_parms *cred);
|
||||
|
||||
/****************************************************************************
|
||||
*** VARIABLES ***
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
*** FUNCTIONS ***
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* AUTOFS XDR FUNCTIONS:
|
||||
*/
|
||||
#ifndef HAVE_XDR_MNTREQUEST
|
||||
bool_t
|
||||
xdr_mntrequest(XDR *xdrs, mntrequest *objp)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_XDRTRACE)
|
||||
plog(XLOG_DEBUG, "xdr_mntrequest:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!xdr_string(xdrs, &objp->name, A_MAXNAME))
|
||||
return (FALSE);
|
||||
|
||||
if (!xdr_string(xdrs, &objp->map, A_MAXNAME))
|
||||
return (FALSE);
|
||||
|
||||
if (!xdr_string(xdrs, &objp->opts, A_MAXOPTS))
|
||||
return (FALSE);
|
||||
|
||||
if (!xdr_string(xdrs, &objp->path, A_MAXPATH))
|
||||
return (FALSE);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
#endif /* not HAVE_XDR_MNTREQUEST */
|
||||
|
||||
|
||||
#ifndef HAVE_XDR_MNTRES
|
||||
bool_t
|
||||
xdr_mntres(XDR *xdrs, mntres *objp)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_XDRTRACE)
|
||||
plog(XLOG_DEBUG, "xdr_mntres:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!xdr_int(xdrs, &objp->status))
|
||||
return (FALSE);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
# endif /* not HAVE_XDR_MNTRES */
|
||||
|
||||
|
||||
#ifndef HAVE_XDR_UMNTREQUEST
|
||||
bool_t
|
||||
xdr_umntrequest(XDR *xdrs, umntrequest *objp)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_XDRTRACE)
|
||||
plog(XLOG_DEBUG, "xdr_umntrequest:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!xdr_int(xdrs, &objp->isdirect))
|
||||
return (FALSE);
|
||||
|
||||
if (!xdr_u_int(xdrs, (u_int *) &objp->devid))
|
||||
return (FALSE);
|
||||
|
||||
#ifdef HAVE_UMNTREQUEST_RDEVID
|
||||
if (!xdr_u_long(xdrs, &objp->rdevid))
|
||||
return (FALSE);
|
||||
#endif /* HAVE_UMNTREQUEST_RDEVID */
|
||||
|
||||
if (!xdr_pointer(xdrs, (char **) &objp->next, sizeof(umntrequest), (XDRPROC_T_TYPE) xdr_umntrequest))
|
||||
return (FALSE);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
#endif /* not HAVE_XDR_UMNTREQUEST */
|
||||
|
||||
|
||||
#ifndef HAVE_XDR_UMNTRES
|
||||
bool_t
|
||||
xdr_umntres(XDR *xdrs, umntres *objp)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
amuDebug(D_XDRTRACE)
|
||||
plog(XLOG_DEBUG, "xdr_mntres:");
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!xdr_int(xdrs, &objp->status))
|
||||
return (FALSE);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
#endif /* not HAVE_XDR_UMNTRES */
|
||||
|
||||
|
||||
/*
|
||||
* AUTOFS RPC methods
|
||||
*/
|
||||
|
||||
static int
|
||||
autofs_mount_1_req(struct mntrequest *m,
|
||||
struct mntres *res,
|
||||
struct authunix_parms *cred)
|
||||
{
|
||||
int err = 0;
|
||||
int isdirect = 0;
|
||||
am_node *mp, *ap;
|
||||
mntfs *mf;
|
||||
|
||||
dlog("MOUNT REQUEST: name=%s map=%s opts=%s path=%s\n",
|
||||
m->name, m->map, m->opts, m->path);
|
||||
|
||||
/* find the effective uid/gid from RPC request */
|
||||
sprintf(opt_uid, "%d", (int) cred->aup_uid);
|
||||
sprintf(opt_gid, "%d", (int) cred->aup_gid);
|
||||
|
||||
mp = find_ap(m->path);
|
||||
if (!mp) {
|
||||
plog(XLOG_ERROR, "map %s not found", m->path);
|
||||
err = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
mf = mp->am_mnt;
|
||||
isdirect = (mf->mf_fsflags & FS_DIRECT) ? 1 : 0;
|
||||
ap = mf->mf_ops->lookup_child(mp, m->name + isdirect, &err, VLOOK_CREATE);
|
||||
if (ap && err < 0)
|
||||
ap = mf->mf_ops->mount_child(ap, &err);
|
||||
if (ap == NULL) {
|
||||
if (err < 0) {
|
||||
/* we're working on it */
|
||||
amd_stats.d_drops++;
|
||||
return 1;
|
||||
}
|
||||
err = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
if (err) {
|
||||
if (isdirect) {
|
||||
/* direct mount */
|
||||
plog(XLOG_ERROR, "mount of %s failed", m->path);
|
||||
} else {
|
||||
/* indirect mount */
|
||||
plog(XLOG_ERROR, "mount of %s/%s failed", m->path, m->name);
|
||||
}
|
||||
}
|
||||
|
||||
dlog("MOUNT REPLY: status=%d (%s)\n", err, strerror(err));
|
||||
|
||||
res->status = err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
autofs_unmount_1_req(struct umntrequest *ul,
|
||||
struct umntres *res,
|
||||
struct authunix_parms *cred)
|
||||
{
|
||||
int i, err;
|
||||
|
||||
dlog("UNMOUNT REQUEST: dev=%lx rdev=%lx %s\n",
|
||||
(u_long) ul->devid,
|
||||
(u_long) ul->rdevid,
|
||||
ul->isdirect ? "direct" : "indirect");
|
||||
|
||||
/* by default, and if not found, succeed */
|
||||
res->status = 0;
|
||||
|
||||
for (i = 0; i <= last_used_map; i++) {
|
||||
am_node *mp = exported_ap[i];
|
||||
if (mp && mp->am_dev == ul->devid &&
|
||||
(ul->rdevid == 0 || mp->am_rdev == ul->rdevid)) {
|
||||
|
||||
/* save RPC context */
|
||||
if (!mp->am_transp && current_transp) {
|
||||
mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT));
|
||||
*(mp->am_transp) = *current_transp;
|
||||
}
|
||||
|
||||
err = unmount_mp(mp);
|
||||
|
||||
if (err)
|
||||
/* backgrounded, don't reply yet */
|
||||
return 1;
|
||||
|
||||
if (exported_ap[i])
|
||||
/* unmounting failed, tell the kernel */
|
||||
res->status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
dlog("UNMOUNT REPLY: status=%d\n", res->status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* autofs program dispatcher */
|
||||
static void
|
||||
autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp)
|
||||
{
|
||||
union {
|
||||
mntrequest autofs_mount_1_arg;
|
||||
umntrequest autofs_umount_1_arg;
|
||||
} argument;
|
||||
union {
|
||||
mntres mount_res;
|
||||
umntres umount_res;
|
||||
} result;
|
||||
int ret;
|
||||
|
||||
bool_t (*xdr_argument)();
|
||||
bool_t (*xdr_result)();
|
||||
int (*local)();
|
||||
|
||||
current_transp = transp;
|
||||
|
||||
switch (rqstp->rq_proc) {
|
||||
|
||||
case AUTOFS_NULL:
|
||||
svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_void,
|
||||
(SVC_IN_ARG_TYPE) NULL);
|
||||
return;
|
||||
|
||||
case AUTOFS_MOUNT:
|
||||
xdr_argument = xdr_mntrequest;
|
||||
xdr_result = xdr_mntres;
|
||||
local = autofs_mount_1_req;
|
||||
break;
|
||||
|
||||
case AUTOFS_UNMOUNT:
|
||||
xdr_argument = xdr_umntrequest;
|
||||
xdr_result = xdr_umntres;
|
||||
local = autofs_unmount_1_req;
|
||||
break;
|
||||
|
||||
default:
|
||||
svcerr_noproc(transp);
|
||||
return;
|
||||
}
|
||||
|
||||
memset((char *) &argument, 0, sizeof(argument));
|
||||
if (!svc_getargs(transp,
|
||||
(XDRPROC_T_TYPE) xdr_argument,
|
||||
(SVC_IN_ARG_TYPE) &argument)) {
|
||||
plog(XLOG_ERROR,
|
||||
"AUTOFS xdr decode failed for %d %d %d",
|
||||
(int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc);
|
||||
svcerr_decode(transp);
|
||||
return;
|
||||
}
|
||||
|
||||
memset((char *)&result, 0, sizeof (result));
|
||||
ret = (*local) (&argument, &result, rqstp);
|
||||
|
||||
current_transp = NULL;
|
||||
|
||||
/* send reply only if the RPC method returned 0 */
|
||||
if (!ret) {
|
||||
if (!svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_result,
|
||||
(SVC_IN_ARG_TYPE) &result)) {
|
||||
svcerr_systemerr(transp);
|
||||
}
|
||||
}
|
||||
|
||||
if (!svc_freeargs(transp,
|
||||
(XDRPROC_T_TYPE) xdr_argument,
|
||||
(SVC_IN_ARG_TYPE) &argument)) {
|
||||
plog(XLOG_FATAL, "unable to free rpc arguments in autofs_program_1");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
autofs_fh_t *
|
||||
autofs_get_fh(am_node *mp)
|
||||
{
|
||||
autofs_fh_t *fh;
|
||||
char buf[MAXHOSTNAMELEN];
|
||||
mntfs *mf = mp->am_mnt;
|
||||
struct utsname utsname;
|
||||
|
||||
plog(XLOG_DEBUG, "autofs_get_fh for %s", mp->am_path);
|
||||
fh = ALLOC(autofs_fh_t);
|
||||
memset((voidp) fh, 0, sizeof(autofs_fh_t)); /* Paranoid */
|
||||
|
||||
/*
|
||||
* SET MOUNT ARGS
|
||||
*/
|
||||
if (uname(&utsname) < 0) {
|
||||
strcpy(buf, "localhost.autofs");
|
||||
} else {
|
||||
strcpy(buf, utsname.nodename);
|
||||
strcat(buf, ".autofs");
|
||||
}
|
||||
#ifdef HAVE_AUTOFS_ARGS_T_ADDR
|
||||
fh->addr.buf = strdup(buf);
|
||||
fh->addr.len = fh->addr.maxlen = strlen(buf);
|
||||
#endif /* HAVE_AUTOFS_ARGS_T_ADDR */
|
||||
|
||||
fh->direct = (mf->mf_fsflags & FS_DIRECT) ? 1 : 0;
|
||||
fh->rpc_to = 1; /* XXX: arbitrary */
|
||||
fh->mount_to = mp->am_timeo;
|
||||
fh->path = mp->am_path;
|
||||
fh->opts = ""; /* XXX: arbitrary */
|
||||
fh->map = mp->am_path; /* this is what we get back in readdir */
|
||||
|
||||
return fh;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_mounted(am_node *mp)
|
||||
{
|
||||
/* We don't want any timeouts on autofs nodes */
|
||||
mp->am_ttl = NEVER;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_release_fh(autofs_fh_t *fh)
|
||||
{
|
||||
if (fh) {
|
||||
#ifdef HAVE_AUTOFS_ARGS_T_ADDR
|
||||
free(fh->addr.buf);
|
||||
#endif /* HAVE_AUTOFS_ARGS_T_ADDR */
|
||||
XFREE(fh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_add_fdset(fd_set *readfds)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
int
|
||||
autofs_handle_fdset(fd_set *readfds, int nsel)
|
||||
{
|
||||
/* nothing to do */
|
||||
return nsel;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* find the IP address that can be used to connect autofs service to.
|
||||
*/
|
||||
static int
|
||||
get_autofs_address(struct netconfig *ncp, struct t_bind *tbp)
|
||||
{
|
||||
int ret;
|
||||
struct nd_addrlist *addrs = (struct nd_addrlist *) NULL;
|
||||
struct nd_hostserv service;
|
||||
|
||||
service.h_host = HOST_SELF_CONNECT;
|
||||
service.h_serv = "autofs";
|
||||
|
||||
ret = netdir_getbyname(ncp, &service, &addrs);
|
||||
|
||||
if (ret) {
|
||||
plog(XLOG_FATAL, "get_autofs_address: cannot get local host address: %s", netdir_sperror());
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX: there may be more more than one address for this local
|
||||
* host. Maybe something can be done with those.
|
||||
*/
|
||||
tbp->addr.len = addrs->n_addrs->len;
|
||||
tbp->addr.maxlen = addrs->n_addrs->len;
|
||||
memcpy(tbp->addr.buf, addrs->n_addrs->buf, addrs->n_addrs->len);
|
||||
tbp->qlen = 8; /* arbitrary? who cares really */
|
||||
|
||||
/* all OK */
|
||||
netdir_free((voidp) addrs, ND_ADDRLIST);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#include <rpc/nettype.h>
|
||||
static char *autofs_conftype = "ticlts";
|
||||
static struct netconfig *autofs_ncp;
|
||||
/*
|
||||
* Create the autofs service for amd
|
||||
*/
|
||||
int
|
||||
create_autofs_service(void)
|
||||
{
|
||||
struct t_bind *tbp = 0;
|
||||
int fd = -1, err = 1; /* assume failed */
|
||||
|
||||
plog(XLOG_INFO, "creating autofs service listener");
|
||||
autofs_ncp = getnetconfigent(autofs_conftype);
|
||||
if (autofs_ncp == NULL) {
|
||||
plog(XLOG_ERROR, "create_autofs_service: cannot getnetconfigent for %s", autofs_conftype);
|
||||
goto out;
|
||||
}
|
||||
|
||||
fd = t_open(autofs_ncp->nc_device, O_RDWR, NULL);
|
||||
if (fd < 0) {
|
||||
plog(XLOG_ERROR, "create_autofs_service: t_open failed (%s)",
|
||||
t_errlist[t_errno]);
|
||||
goto out;
|
||||
}
|
||||
|
||||
tbp = (struct t_bind *) t_alloc(fd, T_BIND, T_ADDR);
|
||||
if (!tbp) {
|
||||
plog(XLOG_ERROR, "create_autofs_service: t_alloca failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (get_autofs_address(autofs_ncp, tbp) != 0) {
|
||||
plog(XLOG_ERROR, "create_autofs_service: get_autofs_address failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
autofs_xprt = svc_tli_create(fd, autofs_ncp, tbp, 0, 0);
|
||||
if (autofs_xprt == NULL) {
|
||||
plog(XLOG_ERROR, "cannot create autofs tli service for amd");
|
||||
goto out;
|
||||
}
|
||||
|
||||
rpcb_unset(AUTOFS_PROG, AUTOFS_VERS, autofs_ncp);
|
||||
if (svc_reg(autofs_xprt, AUTOFS_PROG, AUTOFS_VERS, autofs_program_1, autofs_ncp) == FALSE) {
|
||||
plog(XLOG_ERROR, "could not register amd AUTOFS service");
|
||||
goto out;
|
||||
}
|
||||
err = 0;
|
||||
goto really_out;
|
||||
|
||||
out:
|
||||
if (autofs_ncp)
|
||||
freenetconfigent(autofs_ncp);
|
||||
if (autofs_xprt)
|
||||
SVC_DESTROY(autofs_xprt);
|
||||
else {
|
||||
if (fd > 0)
|
||||
t_close(fd);
|
||||
}
|
||||
|
||||
really_out:
|
||||
if (tbp)
|
||||
t_free((char *) tbp, T_BIND);
|
||||
|
||||
dlog("create_autofs_service: returning %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
destroy_autofs_service(void)
|
||||
{
|
||||
//struct netconfig *autofs_ncp;
|
||||
int err = 1;
|
||||
|
||||
plog(XLOG_INFO, "destroying autofs service listener");
|
||||
#if 0
|
||||
autofs_ncp = getnetconfigent(autofs_conftype);
|
||||
if (autofs_ncp == NULL) {
|
||||
plog(XLOG_ERROR, "create_autofs_service: cannot getnetconfigent for %s", autofs_conftype);
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
#endif
|
||||
rpcb_unset(AUTOFS_PROG, AUTOFS_VERS, autofs_ncp);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_link_mount(am_node *mp)
|
||||
{
|
||||
int err;
|
||||
mntfs *mf = mp->am_mnt;
|
||||
|
||||
plog(XLOG_INFO, "autofs: converting from link to lofs (%s -> %s)", mp->am_path, mp->am_link);
|
||||
if ((err = mkdirs(mf->mf_real_mount, 0555)))
|
||||
goto out;
|
||||
err = lofs_ops.mount_fs(mp, mf);
|
||||
|
||||
out:
|
||||
if (err)
|
||||
return errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_link_umount(am_node *mp)
|
||||
{
|
||||
mntfs *mf = mp->am_mnt;
|
||||
return lofs_ops.umount_fs(mp, mf);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_umount_succeeded(am_node *mp)
|
||||
{
|
||||
umntres res;
|
||||
SVCXPRT *transp = mp->am_transp;
|
||||
|
||||
if (transp) {
|
||||
res.status = 0;
|
||||
|
||||
if (!svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_umntres,
|
||||
(SVC_IN_ARG_TYPE) &res))
|
||||
svcerr_systemerr(transp);
|
||||
|
||||
dlog("Quick reply sent for %s", mp->am_mnt->mf_mount);
|
||||
XFREE(transp);
|
||||
mp->am_transp = NULL;
|
||||
}
|
||||
|
||||
plog(XLOG_INFO, "autofs: unmounting %s succeeded", mp->am_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
autofs_umount_failed(am_node *mp)
|
||||
{
|
||||
umntres res;
|
||||
SVCXPRT *transp = mp->am_transp;
|
||||
|
||||
if (transp) {
|
||||
res.status = 1;
|
||||
|
||||
if (!svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_umntres,
|
||||
(SVC_IN_ARG_TYPE) &res))
|
||||
svcerr_systemerr(transp);
|
||||
|
||||
dlog("Quick reply sent for %s", mp->am_mnt->mf_mount);
|
||||
XFREE(transp);
|
||||
mp->am_transp = NULL;
|
||||
}
|
||||
|
||||
plog(XLOG_INFO, "autofs: unmounting %s failed", mp->am_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_mount_succeeded(am_node *mp)
|
||||
{
|
||||
SVCXPRT *transp = mp->am_transp;
|
||||
struct stat stb;
|
||||
|
||||
if (transp) {
|
||||
/* this was a mount request */
|
||||
mntres res;
|
||||
res.status = 0;
|
||||
|
||||
if (!svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_mntres,
|
||||
(SVC_IN_ARG_TYPE) &res))
|
||||
svcerr_systemerr(transp);
|
||||
|
||||
dlog("Quick reply sent for %s", mp->am_mnt->mf_mount);
|
||||
XFREE(transp);
|
||||
mp->am_transp = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Store dev and rdev -- but not for symlinks
|
||||
*/
|
||||
if (!mp->am_link) {
|
||||
if (!lstat(mp->am_mnt->mf_real_mount, &stb)) {
|
||||
mp->am_dev = stb.st_dev;
|
||||
mp->am_rdev = stb.st_rdev;
|
||||
}
|
||||
/* don't expire the entries -- the kernel will do it for us */
|
||||
mp->am_flags |= AMF_NOTIMEOUT;
|
||||
}
|
||||
|
||||
plog(XLOG_INFO, "autofs: mounting %s succeeded", mp->am_path);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_mount_failed(am_node *mp)
|
||||
{
|
||||
SVCXPRT *transp = mp->am_transp;
|
||||
|
||||
if (transp) {
|
||||
/* this was a mount request */
|
||||
mntres res;
|
||||
res.status = ENOENT;
|
||||
|
||||
if (!svc_sendreply(transp,
|
||||
(XDRPROC_T_TYPE) xdr_mntres,
|
||||
(SVC_IN_ARG_TYPE) &res))
|
||||
svcerr_systemerr(transp);
|
||||
|
||||
dlog("Quick reply sent for %s", mp->am_mnt->mf_mount);
|
||||
XFREE(transp);
|
||||
mp->am_transp = NULL;
|
||||
}
|
||||
|
||||
plog(XLOG_INFO, "autofs: mounting %s failed", mp->am_path);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
autofs_get_opts(char *opts, autofs_fh_t *fh)
|
||||
{
|
||||
sprintf(opts, "%sdirect",
|
||||
fh->direct ? "" : "in");
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
autofs_compute_mount_flags(mntent_t *mntp)
|
||||
{
|
||||
/* Must use overlay mounts */
|
||||
return MNT2_GEN_OPT_OVERLAY;
|
||||
}
|
||||
|
||||
|
||||
void autofs_timeout_mp(am_node *mp)
|
||||
{
|
||||
/* We don't want any timeouts on autofs nodes */
|
||||
mp->am_ttl = NEVER;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/* $NetBSD: autofs_solaris_v1.h,v 1.1.1.1 2002/11/29 22:58:26 christos Exp $ */
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
typedef struct auto_args autofs_fh_t;
|
||||
typedef void * autofs_data_t;
|
||||
|
||||
#define NEED_AUTOFS_SPACE_HACK
|
||||
|
||||
static inline char *autofs_strdup_space_hack(char *s)
|
||||
{
|
||||
/*
|
||||
* autofs hack: append a space to the directory name
|
||||
* to stop the kernel->daemon recursion.
|
||||
*
|
||||
* Returns malloc'ed space which needs to be freed by the caller.
|
||||
*/
|
||||
char *tmp = malloc(strlen(s) + 2);
|
||||
strcpy(tmp, s);
|
||||
strcat(tmp, " ");
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)
|
||||
#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS)
|
||||
#define AUTOFS_ERROR_FS_FLAGS (FS_DISCARD)
|
||||
#define AUTOFS_HOST_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS)
|
||||
#define AUTOFS_INHERIT_FS_FLAGS (FS_DISCARD)
|
||||
#define AUTOFS_LINK_FS_FLAGS (FS_MBACKGROUND)
|
||||
#define AUTOFS_LINKX_FS_FLAGS (FS_MBACKGROUND)
|
||||
#define AUTOFS_NFSL_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_NFSX_FS_FLAGS (/* FS_UBACKGROUND| */ FS_AMQINFO)
|
||||
#define AUTOFS_PROGRAM_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_ROOT_FS_FLAGS (FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY)
|
||||
#define AUTOFS_TOPLVL_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)
|
||||
#define AUTOFS_UNION_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY)
|
||||
|
||||
#define AUTOFS_CACHEFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_CDFS_FS_FLAGS (FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_EFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_LOFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_NFS_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_PCFS_FS_FLAGS (FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_UFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_XFS_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#endif /* HAVE_FS_AUTOFS */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,29 @@
|
|||
/* $NetBSD: autofs_solaris_v2_v3.h,v 1.1.1.1 2002/11/29 22:58:27 christos Exp $ */
|
||||
|
||||
#ifdef HAVE_FS_AUTOFS
|
||||
typedef struct autofs_args autofs_fh_t;
|
||||
typedef struct action_list autofs_data_t;
|
||||
|
||||
#define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)
|
||||
#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS)
|
||||
#define AUTOFS_ERROR_FS_FLAGS (FS_DISCARD)
|
||||
#define AUTOFS_HOST_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO | FS_AUTOFS)
|
||||
#define AUTOFS_INHERIT_FS_FLAGS (FS_DISCARD)
|
||||
#define AUTOFS_LINK_FS_FLAGS (0)
|
||||
#define AUTOFS_LINKX_FS_FLAGS (FS_MBACKGROUND)
|
||||
#define AUTOFS_NFSL_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_NFSX_FS_FLAGS (/* FS_UBACKGROUND| */ FS_AMQINFO)
|
||||
#define AUTOFS_PROGRAM_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_ROOT_FS_FLAGS (FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY)
|
||||
#define AUTOFS_TOPLVL_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)
|
||||
#define AUTOFS_UNION_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY)
|
||||
|
||||
#define AUTOFS_CACHEFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_CDFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_EFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_LOFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_NFS_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_PCFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_UFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#define AUTOFS_XFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO)
|
||||
#endif /* HAVE_FS_AUTOFS */
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: checkmount_aix.c,v 1.1.1.4 2001/05/13 17:50:16 veego Exp $ */
|
||||
/* $NetBSD: checkmount_aix.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: checkmount_aix.c,v 1.4.2.1 2001/01/10 03:23:15 ezk Exp
|
||||
* Id: checkmount_aix.c,v 1.7 2002/02/02 20:58:57 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: checkmount_bsd44.c,v 1.1.1.4 2001/05/13 17:50:16 veego Exp $ */
|
||||
/* $NetBSD: checkmount_bsd44.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: checkmount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp
|
||||
* Id: checkmount_bsd44.c,v 1.6 2002/02/02 20:58:57 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: checkmount_default.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: checkmount_default.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: checkmount_default.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp
|
||||
* Id: checkmount_default.c,v 1.6 2002/02/02 20:58:57 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: checkmount_osf.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: checkmount_osf.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: checkmount_osf.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp
|
||||
* Id: checkmount_osf.c,v 1.6 2002/02/02 20:58:57 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: checkmount_svr4.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: checkmount_svr4.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: checkmount_svr4.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp
|
||||
* Id: checkmount_svr4.c,v 1.6 2002/02/02 20:58:57 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: checkmount_ultrix.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: checkmount_ultrix.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: checkmount_ultrix.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp
|
||||
* Id: checkmount_ultrix.c,v 1.6 2002/02/02 20:58:57 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: mount_aix.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: mount_aix.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: mount_aix.c,v 1.4.2.1 2001/01/10 03:23:16 ezk Exp
|
||||
* Id: mount_aix.c,v 1.8 2002/06/22 16:52:11 ib42 Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -108,19 +107,22 @@ mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_o
|
|||
int size, ret;
|
||||
int real_size = sizeof(nfs_args_t); /* size passed to aix3_mkvp() */
|
||||
char *real_args = data; /* args passed to aix3_mkvp() */
|
||||
char *host = strdup(fsname);
|
||||
char *rfs = strchr(host, ':');
|
||||
int free_rfs = 0;
|
||||
char *host, *rfs, *idx;
|
||||
int aix_type = type;
|
||||
#ifdef HAVE_FS_NFS3
|
||||
struct nfs_args v2args;
|
||||
nfs_args_t *v3args = (nfs_args_t *) data;
|
||||
#ifdef MOUNT_TYPE_NFS3_BIS
|
||||
struct aix42_nfs_args_bis v3args_bis;
|
||||
#endif /* MOUNT_TYPE_NFS3_BIS */
|
||||
#endif /* HAVE_FS_NFS3 */
|
||||
|
||||
#ifdef DEBUG
|
||||
dlog("mount_aix3: fsname %s, dir %s, type %d", fsname, dir, type);
|
||||
#endif /* DEBUG */
|
||||
|
||||
switch (type) {
|
||||
#ifdef MOUNT_TYPE_NFS3_BIS
|
||||
retry_ibm_stupid_service_pack:
|
||||
#endif /* MOUNT_TYPE_NFS3_BIS */
|
||||
switch (aix_type) {
|
||||
|
||||
case MOUNT_TYPE_NFS:
|
||||
|
||||
|
@ -148,28 +150,54 @@ mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_o
|
|||
v2args.pathconf = v3args->pathconf;
|
||||
|
||||
/* now set real_* stuff */
|
||||
real_size = sizeof(struct nfs_args);
|
||||
real_size = sizeof(v2args);
|
||||
real_args = (char *) &v2args;
|
||||
|
||||
case MOUNT_TYPE_NFS3:
|
||||
/* do nothing, because the nfs_args passed is already a v3 one */
|
||||
#ifdef MOUNT_TYPE_NFS3_BIS
|
||||
case MOUNT_TYPE_NFS3_BIS:
|
||||
/* just fall through */
|
||||
if (aix_type == MOUNT_TYPE_NFS3_BIS) {
|
||||
memmove((voidp) &v3args_bis.addr, (voidp) &v3args->addr, sizeof(struct sockaddr_in));
|
||||
v3args_bis.u0 = v3args->u0;
|
||||
v3args_bis.proto = v3args->proto;
|
||||
v3args_bis.hostname = v3args->hostname;
|
||||
v3args_bis.netname = v3args->netname;
|
||||
v3args_bis.fh = v3args->fh;
|
||||
v3args_bis.flags = v3args->flags;
|
||||
v3args_bis.wsize = v3args->wsize;
|
||||
v3args_bis.rsize = v3args->rsize;
|
||||
v3args_bis.timeo = v3args->timeo;
|
||||
v3args_bis.retrans = v3args->retrans;
|
||||
v3args_bis.acregmin = v3args->acregmin;
|
||||
v3args_bis.acregmax = v3args->acregmax;
|
||||
v3args_bis.acdirmin = v3args->acdirmin;
|
||||
v3args_bis.acdirmax = v3args->acdirmax;
|
||||
v3args_bis.u14 = v3args->u14;
|
||||
v3args_bis.pathconf = v3args->pathconf;
|
||||
/* now set real_* stuff */
|
||||
real_size = sizeof(v3args_bis);
|
||||
real_args = (char *) &v3args_bis;
|
||||
}
|
||||
#endif /* MOUNT_TYPE_NFS3_BIS */
|
||||
#endif /* HAVE_FS_NFS3 */
|
||||
|
||||
if (rfs) {
|
||||
*rfs++ = '\0';
|
||||
idx = strchr(fsname, ':');
|
||||
if (idx) {
|
||||
*idx = '\0';
|
||||
rfs = strdup(idx + 1);
|
||||
host = strdup(fsname);
|
||||
*idx = ':';
|
||||
} else {
|
||||
rfs = host;
|
||||
free_rfs = 1;
|
||||
rfs = strdup(fsname);
|
||||
host = strdup(am_get_hostname());
|
||||
}
|
||||
|
||||
size = aix3_mkvp(buf, type, flags, rfs, dir, host,
|
||||
real_args, real_size, mnt_opts);
|
||||
if (free_rfs)
|
||||
XFREE(rfs);
|
||||
XFREE(rfs);
|
||||
XFREE(host);
|
||||
break;
|
||||
break;
|
||||
|
||||
case MOUNT_TYPE_UFS:
|
||||
/* Need to open block device and extract log device info from sblk. */
|
||||
|
@ -180,7 +208,15 @@ mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_o
|
|||
}
|
||||
|
||||
ret = vmount((struct vmount *)buf, size);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
#ifdef MOUNT_TYPE_NFS3_BIS
|
||||
if (aix_type == MOUNT_TYPE_NFS3 && errno == EINVAL) {
|
||||
aix_type = MOUNT_TYPE_NFS3_BIS;
|
||||
dlog("mount_aix3: retrying with alternate nfs3_args structure");
|
||||
goto retry_ibm_stupid_service_pack;
|
||||
}
|
||||
#endif /* MOUNT_TYPE_NFS3_BIS */
|
||||
plog(XLOG_ERROR, "mount_aix3: vmount failed with errno %d", errno);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: mount_bsdi3.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: mount_bsdi3.c,v 1.1.1.5 2002/11/29 22:58:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: mount_bsdi3.c,v 1.3.2.1 2001/01/10 03:23:16 ezk Exp
|
||||
* Id: mount_bsdi3.c,v 1.6 2002/02/02 20:58:58 ezk Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: mount_default.c,v 1.1.1.4 2001/05/13 17:50:17 veego Exp $ */
|
||||
/* $NetBSD: mount_default.c,v 1.1.1.5 2002/11/29 22:58:29 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 Erez Zadok
|
||||
* Copyright (c) 1997-2002 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,8 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* %W% (Berkeley) %G%
|
||||
*
|
||||
* Id: mount_default.c,v 1.1.2.1 2001/01/10 03:23:16 ezk Exp
|
||||
* Id: mount_default.c,v 1.4 2002/02/02 20:58:58 ezk Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue