Erez Zadok [Wed, 26 Jan 2005 06:16:30 +0000 (06:16 +0000)]
* doc/am-utils.texi (xhost Selector Function): document new
selector function.
* amd/opts.c (f_xhost): new function for use when matching the
(CNAMES) that gethostbyname() returns. This function now supports
a new function selector called xhost(ARG); the old host==ARG
selector is unharmed.
Erez Zadok [Wed, 19 Jan 2005 04:35:47 +0000 (04:35 +0000)]
xhost:slightly better info reporting
Erez Zadok [Wed, 19 Jan 2005 04:28:40 +0000 (04:28 +0000)]
* amd/opts.c (f_in_xhost): new function for use when matching the
"host" selector for the current host's name. This function will
now match the primary host name as well as all known aliases
(CNAMES) that gethostbyname() returns.
Ion Badulescu [Tue, 18 Jan 2005 03:01:24 +0000 (03:01 +0000)]
* NEWS: document the ability to restart old mount points
* amd/map.c (mount_auto_node): force the fileid of the
root to be 1, so that it won't change between restarts; use the
root filesystem's own methods instead of hard-coding the use of
the default methods
* conf/transp/transp_tli.c (create_nfs_service): better cleanup on
error conditions.
(bind_resv_port2): allow the caller to request a certain port.
* conf/transp/transp_sockets.c (bind_resv_port): allow the caller
to request a certain port.
(create_nfs_service): better cleanup on error conditions.
* amd/restart.c (restart_automounter_nodes): new function, takes
care of restarting automounter NFS mount points (autofs will come
later).
(restart): skip all automounter mount points.
* amd/nfs_subr.c (fh_to_mp3, mp_to_fh): new filehandle
implementation: if the path to the node is shorter than sizeof(fh)
chars (currently 32 chars for a NFSv2 fh), simply store it inside
the fh. For longer paths, keep the old implementation.
* amd/nfs_start.c (mount_automounter): reorder things so that
restarting the toplvl filesystems occurs before anything else (so
that we can grab all the ports we need before we accidentally use
them for something else).
* amd/mntfs.c (locate_mntfs): remove dead code; add special
handling of restarted toplvl filesystems.
* amd/mapc.c (root_keyiter): fix up a comment.
* amd/map.c (path_to_exported_ap): new function, searches for and
returns a node by the path to it.
(get_root_nfs_fh): remove unnecessary fiddling with the root fh.
* config.guess.long: support Red Hat Enterprise Linux
Erez Zadok [Mon, 17 Jan 2005 22:41:28 +0000 (22:41 +0000)]
* libamu/util.c (rmdirs): prevent amd from logging 'Read-only
filesystem' errors when the mount point has an ancestor (i.e. '/')
that is mounted read-only. Patch from David Rage <rage@ucl.ac.uk>.
Ion Badulescu [Mon, 17 Jan 2005 19:31:54 +0000 (19:31 +0000)]
* conf/umount/umount_linux.c (umount_fs): Linux doesn't need the
autofs space hack
* conf/umount/umount_default.c (umount_fs): there is no need for
HAVE_LOOP_DEV, now that Linux has its own dedicated umount_linux.c
Erez Zadok [Mon, 17 Jan 2005 06:00:41 +0000 (06:00 +0000)]
* doc/am-utils.texi (Automatic Unmounting): document new umount2()
behavior on Linux.
* conf/umount/umount_linux.c (umount_fs): new file. On Linux, if
umount(2) failed with EIO or ESTALE, try umount2(2) with
MNT_FORCE+MNT_DETACH. Based on patch from Christos Zoulas
<christos@zoulas.com>.
* m4/macros/check_umount_style.m4: pick new linux umount style.
* Makefile.am (EXTRA_DIST_CONF): distribute new umount_linux.c
file.
Erez Zadok [Sun, 16 Jan 2005 23:59:25 +0000 (23:59 +0000)]
* conf/nfs_prot/nfs_prot_aix{4_2,4_3,5_1,5_2}.h,
m4/macros/struct_nfs_args.m4: minor cleanups for quicker execution
of "nfs_args" test.
Erez Zadok [Fri, 14 Jan 2005 04:50:38 +0000 (04:50 +0000)]
* amd/get_args.c (show_usage): separate function to print usage
string.
(get_args) Call show_usage() from get_args when needed, then exit.
* amd/get_args.c (get_version_string): print also domain, host,
and hostd.
(get_args): print version string at the very end, after all other
values had been initialized. Patch from Christos Zoulas
<christos@zoulas.com>.
Erez Zadok [Fri, 14 Jan 2005 03:29:45 +0000 (03:29 +0000)]
* conf/transp/transp_sockets.c (check_pmap_up, get_nfs_version),
conf/transp/transp_tli.c (check_pmap_up): correct an inconsistency
in timeouts in the RPC code between socket and TLI
implementations. The clntudp_create timeout has a different
meaning than the clnt_call timeout. Set the timeout of the create
to 2 seconds which means retry if no answer in two seconds, and
the timeout call to 6 seconds, which will give us consistently 2
to 3 pings. This is useful on occasional network UDP loss where a
single packet loss would wrongfully mark a server down. (The TLI
code is the one that had the problem occurs.) Patch from Christos
Zoulas <christos@zoulas.com>.
Erez Zadok [Fri, 14 Jan 2005 02:47:52 +0000 (02:47 +0000)]
* libamu/mount_fs.c (compute_nfs_attrcache_flags): make sure code
compiles even for systems that don't have the nfs_args
ac{reg,dir}{min,max} fields.
* amd/amfs_toplvl.c (set_auto_attrcache_timeout): just to be safe,
add "noac" if amd.conf option auto_attrcache was set to 0. This
should hopefully make the compute_nfs_attrcache_flags patch even
safer.
* libamu/mount_fs.c (compute_nfs_attrcache_flags): separate
function to compute attribute-cache values. This function now
computes attribute-cache flags for BOTH Amd's automount points
(NFS) as well as any normal NFS mount that Amd performs.
(compute_nfs_args, compute_automounter_nfs_args): call
compute_nfs_attrcache_flags to figure out attribute-cache related
flags. Patch from Christos Zoulas <christos@zoulas.com>.
auto_attrcache. Add warning to auto_attrcache use in case of
ESTALE.
options domain_strip and auto_attrcache. Add warning to
auto_attrcache use in case of ESTALE.
Erez Zadok [Fri, 14 Jan 2005 01:14:00 +0000 (01:14 +0000)]
* scripts/amd.conf-sample: show examples of new global options
domain_strip and auto_attrcache.
* scripts/amd.conf.5: document new global options domain_strip and
auto_attrcache.
* doc/am-utils.texi: minor cleanups and document new global
options domain_strip and auto_attrcache.
* amd/conf.c (gopt_auto_attrcache): parse new global amd.conf
option auto_attrcache.
(gopt_domain_strip): parse new global amd.conf option
domain_strip. Part of a patch from Christos Zoulas
<christos@zoulas.com>.
* amd/autil.c (host_normalize): don't call domain_strip()
unconditionally, but depend on the new global amd.conf flag
domain_strip.
* amd/amfs_toplvl.c (set_auto_attrcache_timeout): new function to
set attribute cache timeout value given other configured global
defaults.
(amfs_toplvl_mount): set automount point attribute cache option
value to "noac" if attrcache=0, else set it to whatever
set_auto_attrcache_timeout() returns.
* amd/amd.h (CFM_DOMAIN_STRIP, CFM_DEFAULT_FLAGS): flag to decide
if to strip the domain from the host name or not, default options
set to strip the domain.
Store global value of automount attribute cache timeout value.
* amd/amd.c (init_global_options): add flag to record automount
point attribute cache value.
Erez Zadok [Thu, 13 Jan 2005 22:30:37 +0000 (22:30 +0000)]
* amd/amd.c (do_memory_locking): new function to encapsulate all
of the memory-locking functionality, which was in main() before.
Also added a call to madvise(), just in case.
(main): call do_memory_locking() to pin process memory if amd.conf
asked for it, but do so after the main Amd process daemonizes,
because mlock/mlockall is not inherited by fork() by default.
Slightly restructured patch from Jonathan Chen
<jon+amd@spock.org>.
* configure.in: check for madvise(2).
Erez Zadok [Thu, 13 Jan 2005 21:25:19 +0000 (21:25 +0000)]
* config.guess, config.sub: updates for latest official GNU
versions.
* m4/GNUmakefile: update paths to "make update"
Erez Zadok [Thu, 13 Jan 2005 21:24:11 +0000 (21:24 +0000)]
* conf/nfs_prot/nfs_prot_hpux11.h: define an nfs_fh3 structure
that's compatible for HPUX11 as well as NFSv3.
* include/am_defs.h: On AIX 5.2, both <resolv.h> and
<arpa/nameser_compat.h> define MAXDNAME, if compiling with gcc
-D_USE_IRS (so that we get extern definitions for hstrerror() and
others). So undef MAXDNAME before it gets redefined.
* include/am_defs.h: Solaris 10 (build 72) defines GROUP_OBJ in
<sys/acl.h>, which is included in many other header files.
<rpcsvc/nis.h> uses GROUP_OBJ inside enum zotypes. So if you're
unlucky enough to include both headers, you get a compile error
because the two symbols conflict. Temp hack: undefine acl.h's
GROUP_OBJ before including nis.h, because we don't need acl.h for
am-utils.
* m4/macros/os_cflags.m4: turn -D_USE_IRS for AIX5+ so that
certain extern definitions of resolver functions become available.
* amd/opts.c (expand_op): use #define for expand_error string
because some compilers complain about the use of static const
char[] inside a varargs function.
* minor new port i386-unknown-netbsdelf1.6.2.
* new port i386-unknown-netbsdelf2.0.
* minor port i386-unknown-freebsd5.3.
* libamu/mount_fs.c (compute_nfs_args): don't compare
nap->maxgrouplist against NULL but against 0 directly, because on
FreeBSD 4.3, NULL is defined is (void *)0 and gcc 3.4 complains
about a type mismatch.
* minor port i386-pc-linux-fc3 (Fedora Core 3).
* hlfsd/hlfsd.c (main): use sigsuspend() over sigpause(), because
FC3 doesn't have proper extern definition for the defunct
sigpause().
* configure.in: look for sigsuspend().
Erez Zadok [Mon, 3 Jan 2005 20:56:45 +0000 (20:56 +0000)]
* updated copyright year to 2005 on all files.
Erez Zadok [Mon, 29 Nov 2004 16:31:34 +0000 (16:31 +0000)]
* scripts/amd.conf.5: Small fixes to typos in man page, from
Thomas Klausner <tk@giga.or.at>.
* ldap.schema: add this file to distribution.
Erez Zadok [Wed, 15 Sep 2004 15:05:57 +0000 (15:05 +0000)]
* doc/am-utils.texi: fix old URLs.
Erez Zadok [Wed, 1 Sep 2004 16:48:44 +0000 (16:48 +0000)]
* conf/mtab/mtab_aix.c (read_mtab): avoid a race condition between
multiple calls to mntctl(). Patch suggested by Michael van Elst
<M.van.Elst@science-computing.de>.
Erez Zadok [Sat, 7 Aug 2004 17:01:50 +0000 (17:01 +0000)]
* doc/am-utils.texi (Program Filesystem): document how to get
double slashes in Amd maps.
* amd/opts.c (normalize_slash): support escaped slashes, needed
for SMB mounts. Use '\/\/' in a string to get a double slash.
Erez Zadok [Sat, 7 Aug 2004 16:32:49 +0000 (16:32 +0000)]
* amd/amfs_program.c (amfs_program_match): bug fix. Complain if
both opt_unmount and opt_umount are missing, not when just one of
them is missing.
Erez Zadok [Tue, 3 Aug 2004 21:28:41 +0000 (21:28 +0000)]
* amq/pawd.c (find_mt): recognize "linkx" type mounts. Patch from
Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>. Support "nfsx" while
we're at it.
Erez Zadok [Tue, 3 Aug 2004 18:37:23 +0000 (18:37 +0000)]
* doc/am-utils.texi: mention bugzilla. Fix broken URL HREF's.
Erez Zadok [Tue, 3 Aug 2004 18:23:13 +0000 (18:23 +0000)]
* amq/pawd.c (find_mt): recognize "host" type mounts. Patch from
Dan Nelson <dnelson@allantgroup.com>.
Erez Zadok [Fri, 30 Jul 2004 21:32:54 +0000 (21:32 +0000)]
* doc/am-utils.texi, NEWS: minor typos fixed.
Erez Zadok [Fri, 30 Jul 2004 21:13:07 +0000 (21:13 +0000)]
* include/am_xdr_func.h: cannot have field-less structure; put a
dummy field in.
* conf/autofs/autofs_solaris_v2_v3.c (xdr_autofs_rddirargs): cast
2nd arg of xdr_u_int to a u_int*, not int*.
(autofs_mount_2_req): don't use C++ // comments.
Erez Zadok [Fri, 30 Jul 2004 18:13:10 +0000 (18:13 +0000)]
* m4/macros/{try_compile_anyfs,check_field}.m4: include
<fs/msdosfs/msdosfsmount.h> if it exists. Part of a set of
FreeBSD 5 patches from Martin Blapp <mb@imp.ch>.
* include/am_defs.h: include <fs/msdosfs/msdosfsmount.h> if it
exists.
* amd/ops_pcfs.c (mount_pcfs): set pcfs_args_t.dirmask field to
0777 by default.
* configure.in: check for pcfs_args_t.dirmask field. Check for
existence of <fs/msdosfs/msdosfsmount.h>, new on FreeBSD 5.
Erez Zadok [Thu, 29 Jul 2004 22:50:52 +0000 (22:50 +0000)]
* minor new port: i386-pc-linux-fc2 (Fedora Core 2).
* amd/info_ldap.c (amu_ldap_rebind): don't use ldap_enable_cache()
unless the function exists in libldap and the extern is in
<ldap.h>. Recently, openldap removed the extern from ldap.h, but
left the function in libldap, for binary compatibility; however
ldap_enable_cache and related functions have been deprecated (and
no longer listed in the header files), and therefore should be
avoided.
* m4/macros/check_extern_ldap.m4: new macro to check for
LDAP-specific externs. This is separate from check_extern.m4 so
as to avoid breaking the general-purpose macro with LDAP-specific
headers.
* m4/macros/header_templates.m4: extern template for new
HAVE_EXTERN_LDAP_ENABLE_CACHE.
* configure.in: call new check_extern_ldap.m4 macro.
* Makefile.am (EXTRA_DIST_M4): distribute new check_extern_ldap.m4
macro.
* config.guess.long: distinguish between redhat and fedora-core
releases.
Erez Zadok [Fri, 23 Jul 2004 18:29:22 +0000 (18:29 +0000)]
* Minor new port i386-pc-linux-suse8.2: minor new port to SuSE
8.2. This systems' latest GCC (gcc version 3.3
20030226
prerelease) correctly caught a lot of possibly bad comparisons
between signed and unsigned quantities.
* hlfsd/homedir.c (table_add, plt_search): changed first arg of
both functions to u_int.
* hlfsd/hlfsd.h, hlfsd/hlfsd.c: change 'cache_interval' to u_int.
Changed proto for plt_search arg to u_int.
* amq/amq.c (show_mi, main): change 'i' to u_int.
* amq/pawd.c (find_mlp): change 'i' to u_int.
* amd/srvr_nfs.c (find_nfs_srvr): change proto_nfs_version to
u_int.
* amd/amd.h: change prototype of vreaddir and amfs_error_readdir
to use u_int count parameter.
* amd/ops_TEMPLATE.c (foofs_readdir), amd/amfs_error.c
(amfs_error_readdir): change 'count' parameter in proto to u_int.
* amd/amd.h: change proto of amfs_generic_readdir() to use u_int
count parameter.
* amd/readdir.c (make_entry_chain): preflen should be u_int.
(amfs_readdir_browsable): change 'count' to u_int.
(amfs_generic_readdir): change 'count' to u_int.
* amd/amd.h: amu_global_options's portmap_program field should be
u_long, not int (to match RPC conventions). Change am_fh's
fhh_gen field to u_int, to match am_gen field in struct am_node.
* amd/conf.c (gopt_portmap_program): use atol() instead of atoi()
to avoid size differences.
* conf/mount/mount_linux.c (find_unused_loop_device): cast to int
to avoid comparison between chars and integers.
* libamu/mount_fs.c (get_hex_string): change 'i' to u_int to avoid
comparisons between signed and unsigned integers.
Erez Zadok [Tue, 13 Jul 2004 21:28:47 +0000 (21:28 +0000)]
ignore freebsd4.10 and suse9.1
Erez Zadok [Tue, 13 Jul 2004 21:28:22 +0000 (21:28 +0000)]
* minor new port: i386-pc-linux-suse9.1.
* include/am_defs.h: don't use __kernel_dev_t for dev_t on Linux,
because SuSE wants __kernel_old_dev_t. Instead, just define it
directly to what they both use: an unsigned short.
Erez Zadok [Thu, 27 May 2004 20:28:48 +0000 (20:28 +0000)]
* minor new port: i386-unknown-freebsd4.10
Ion Badulescu [Fri, 30 Apr 2004 01:11:12 +0000 (01:11 +0000)]
* amd/amfs_generic.c (amfs_lookup_one_mntfs): fix the creation of
mountpoints for autofs-based sublinks the right way
Ion Badulescu [Wed, 28 Apr 2004 04:22:13 +0000 (04:22 +0000)]
Fixes for various memory management problems discovered by
Rainer's purify run:
* conf/transp/transp_tli.c (check_pmap_up): zero out struct
timeval before using;
(get_nfs_version): ditto
* amd/map.c (umount_exported): make sure we don't try to free the
same am_node multiple times, by setting its corresponding
exported_ap slot to null
* amd/get_args.c (get_version_string): a static pointer is pretty
pointless, make it automatic
* amd/conf.c (gopt_debug_options): remove unnecessary strdup();
(gopt_log_options): ditto
(gopt_print_version): free version string after using it
* amd/autil.c (mf_mounted): free mntfs->mf_fo instead of leaking
it
* amd/amfs_generic.c (amfs_lookup_one_mntfs): use the CALLOC macro
(amfs_lookup_mntfs): free def_opts on return
* amd/amd.c (daemon_mode): zero out struct sigaction before using
it;
(main): ditto
Ion Badulescu [Tue, 27 Apr 2004 04:38:39 +0000 (04:38 +0000)]
* amd/amfs_generic.c (amfs_lookup_one_mntfs): force FS_MKMNT on
the real mount of an autofs-based sublink
Ion Badulescu [Sun, 25 Apr 2004 23:58:46 +0000 (23:58 +0000)]
* amd/map.c (free_map_if_success): avoid dereferencing a pointer
to potentially freed memory
Erez Zadok [Fri, 27 Feb 2004 01:30:26 +0000 (01:30 +0000)]
* minor new port: i386-unknown-freebsd5.2.1.
Ion Badulescu [Fri, 30 Jan 2004 18:06:43 +0000 (18:06 +0000)]
* scripts/ctl-hlfsd.in: don't run hlfsd with -D fork
Erez Zadok [Mon, 26 Jan 2004 00:07:03 +0000 (00:07 +0000)]
* minor new port: sparc64-unknown-linux-deb3.0
* config.guess.long: recoognize Debian Linux.
Erez Zadok [Thu, 22 Jan 2004 15:44:37 +0000 (15:44 +0000)]
* conf/transp/transp_tli.c (amu_get_myaddress): use
htonl(INADDR_LOOPBACK) and define INADDR_LOOPBACK if not already
available.
Ion Badulescu [Thu, 22 Jan 2004 05:23:32 +0000 (05:23 +0000)]
mention nfs_allow_insecure_port
Erez Zadok [Thu, 22 Jan 2004 05:01:06 +0000 (05:01 +0000)]
* wire-test/wire-test.c, hlfsd/hlfsd.c (main): pass NULL as second
parameter to amu_get_myaddress().
* conf/transp/transp_tli.c (amu_get_myaddress): resolve value of
localhost_address amd.conf parameter, if defined (else default to
HOST_SELF_CONNECT).
Removed htonl() around socket address copying (I think it was
wrong) since plog("My IP address is...") in amd.c was printing
addresses wrong on Solaris x86..
* conf/transp/transp_sockets.c (amu_get_myaddress): comment out
old DEBUG code that warns if 127.0.0.1 isn't the same as what
get_myaddress() reports. Add code to resolve value of
localhost_address amd.conf parameter, if defined (else default to
127.0.0.1).
* amd/conf.c (gopt_localhost_address): new function to parse
amd.conf parameter localhost_address.
* amd/amd.h: global field to store amd.conf localhost_address
parameter.
* amd/amd.c (main): call amu_get_myaddress with global option,
which could have been set in amd.conf.
* NEWS, doc/am-utils.texi, scripts/amd.conf-sample,
scripts/amd.conf.5: document new option localhost_address.
Ion Badulescu [Wed, 21 Jan 2004 03:42:11 +0000 (03:42 +0000)]
* amd/conf.c (gopt_nfs_allow_insecure_port): support function for
the new "nfs_allow_insecure_port" amd.conf directive
* amd/nfs_prot_svc.c (nfs_program_2): complain about the insecure
port and drop the request only if the "nfs_allow_insecure_port"
option is not set in amd.conf
* doc/am-utils.texi (Global Parameters): documented the new
amd.conf directive "nfs_allow_insecure_port"
* scripts/amd.conf.5 (nfs_allow_insecure_port): ditto
* scripts/amd.conf-sample (nfs_allow_insecure_port): added the
"nfs_allow_insecure_port" directive
Erez Zadok [Tue, 20 Jan 2004 19:05:09 +0000 (19:05 +0000)]
* doc/am-utils.texi: amd-workers is defunct.
Erez Zadok [Tue, 20 Jan 2004 00:13:45 +0000 (00:13 +0000)]
* cvs-server.txt: updated instructions
Erez Zadok [Mon, 19 Jan 2004 00:25:42 +0000 (00:25 +0000)]
* minor new port: i386-unknown-freebsd5.2.
Erez Zadok [Wed, 7 Jan 2004 00:58:34 +0000 (00:58 +0000)]
sol10 done indeed
Erez Zadok [Tue, 6 Jan 2004 22:36:15 +0000 (22:36 +0000)]
remove solaris10 from news -- not done
Erez Zadok [Tue, 6 Jan 2004 03:56:19 +0000 (03:56 +0000)]
* MIRRORS.{txt,html}: verify each mirror site, update to new
locations (if found), and remove stale mirrors URLs.
* updated copyright year to 2004 on all files.
Erez Zadok [Sun, 4 Jan 2004 00:59:35 +0000 (00:59 +0000)]
* MIRRORS.txt: track status.
* Makefile.am (install-snapshot): new directory to install
snapshots (now that am-utils home page is moved).
Erez Zadok [Fri, 2 Jan 2004 22:33:01 +0000 (22:33 +0000)]
updates
Erez Zadok [Fri, 2 Jan 2004 21:01:34 +0000 (21:01 +0000)]
* INSTALL, README.autofs: remove forced text-mode.
Erez Zadok [Fri, 2 Jan 2004 20:51:06 +0000 (20:51 +0000)]
* doc/am-utils.texi: fix Amd book URL.
Erez Zadok [Fri, 2 Jan 2004 20:07:22 +0000 (20:07 +0000)]
* Makefile.am (EXTRA_DIST): include new mirror files in tarball.
Erez Zadok [Fri, 2 Jan 2004 20:02:46 +0000 (20:02 +0000)]
* AUTHORS, BUGS, README, README.y2k, configure.in,
doc/am-utils.texi: revisions to use newer URLs for Web site, FTP,
and mailing lists.
* MIRRORS.{html,txt}: updates.
* doc/Makefile.am: install mirror lists officially.
Erez Zadok [Thu, 1 Jan 2004 22:30:00 +0000 (22:30 +0000)]
* tasks: things to do after migrating ftp/Web sites.
Erez Zadok [Thu, 1 Jan 2004 03:04:29 +0000 (03:04 +0000)]
fake version upgrade
Erez Zadok [Thu, 1 Jan 2004 03:01:50 +0000 (03:01 +0000)]
fake version upgrade
Erez Zadok [Thu, 1 Jan 2004 03:00:41 +0000 (03:00 +0000)]
* fsinfo/fsinfo.8: fixed typo (unbalanced []) in man page. Bug
report from Eric S. Raymond <esr@thyrsus.com>.
* Makefile.am (EXTRA_DIST_M4): exclude removed file
m4/macros/struct_nfs_fh3.m4 from distro.
Rainer Orth [Fri, 24 Oct 2003 21:43:54 +0000 (21:43 +0000)]
* libamu/xdr_func.c (xdr_am_nfs_fh3): Use AM_FHSIZE3 instead of
FHSIZE3 (may be undefined).
Ion Badulescu [Fri, 24 Oct 2003 14:34:40 +0000 (14:34 +0000)]
Compile fix for Solaris7 with LDAP:
* include/am_defs.h: moved the ldap headers before am_nfs_prot.h
to facilitate using ldap types in it
* conf/nfs_prot/nfs_prot_sunos5_7.h: add a couple of ldap
definitions that Sun left out of their headers
Ion Badulescu [Fri, 24 Oct 2003 04:50:17 +0000 (04:50 +0000)]
* conf/nfs_prot/nfs_prot_*.h: remove all NFSv3-related
definitions, they are now defined globally
* libamu/xdr_func.c: unconditionally define all xdr functions
needed for NFSv3, but with an am_ prefix to prevent namespace
collisions
* amd/amfs_host.c, amd/ops_nfs.c, amd/srvr_nfs.c,
libamu/mount_fs.c: added the am_ prefix to all
structures and functions having to do with NFSv3 to prevent
namespace collisions
* include/am_utils.h: moved definition of am_nfs_handle to ...
* include/am_xdr_func.h: ... here. Also define AM_FHSIZE3,
am_nfs_fh3, AM_NFSPROC3_LOOKUP, am_nfsstat3, am_fhandle3,
am_mountstat3, am_mountres3_ok, am_mountres3, am_filename3,
am_diropargs3, am_LOOKUP3args, am_LOOKUP3resok, am_LOOKUP3resfail,
am_LOOKUP3res here; remove cross-platform compile helper macros
AMU_LOOKUP3RES_*.
* include/am_defs.h: include am_xdr_func.h before am_utils.h to
provide definitions for NFS filehandles
* amd/amd.h: removed declaration for xdr_mountres3
* doc/am-utils.text: minor warning fix
* BUGS: document the autoconf warnings when trying to compile
system header files in isolation
* m4/macros/struct_nfs_fh3.m4: removed, not needed
* configure.in: check if struct mounta has the optptr field;
removed all NFSv3-related checks, we implement everything
internally now
* conf/autofs/autofs_solaris_v2_v3.c (autofs_mount_2_free): don't
touch mnt->optptr unless HAVE_MOUNTA_OPTPTR is defined
Ion Badulescu [Wed, 22 Oct 2003 20:04:41 +0000 (20:04 +0000)]
* BUGS: document the limitations of bind mounts on Linux
Ion Badulescu [Tue, 21 Oct 2003 23:31:52 +0000 (23:31 +0000)]
* buildall: added support for -i (make install)
Rainer Orth [Thu, 16 Oct 2003 16:58:00 +0000 (16:58 +0000)]
* NEWS: New minor port i386-pc-solaris2.10 (Solaris 10).
* INSTALL: Mention its test status.
Erez Zadok [Thu, 16 Oct 2003 05:03:25 +0000 (05:03 +0000)]
* amd/ops_nfs.c (nfs_init): declare as static to match forward
definition at top of file.
* conf/nfs_prot/nfs_prot_{hpux11, netbsd1_4,openbsd,aix5_2}.h:
added missing definitions for LOOKUP3res, diropargs3, etc.
* libamu/xdr_func.c (xdr_LOOKUP3res, xdr_am_nfs_fh3),
libamu/mount_fs.c (compute_nfs_args), amd/ops_nfs.c
(got_nfs_fh_mount, got_nfs_fh_webnfs, prime_nfs_fhandle_cache,
webnfs_lookup), amd/amfs_host.c (fetch_fhandle): Attempt to
cleanup some inconsistencies with how we treat NFSv3 file handles.
Whenever we need to get data out of a filehandle given to us, we
assume that it uses the OS's native fhandle structure
(often struct nfs_fh3). When we store the fhandle data for our
own use, however, we store it in one of two ways. The first, is
that we use the system's default nfs_fh3 structure; the second is
that we define out own struct am_nfs_fh3 in nfs_prot.h (and go
through an elaborate autoconf song-and-dance to "discover" it as a
native fh3 handle structure). It appears that we do the latter,
instead of using the system's default fhandle structure, simply to
avoid extra malloc's and free's, because whereas nfsv2's fhandle
structure is a simple 32-byte buffer, nfsv3's fhandle structures
often just define a "char *" for the fhandle data, and the caller
must malloc/free the space inside as needed. Our code was never
written with constructor/destructor callbacks for these nfsv3
filehandles. Moreover, we carefully wrote our own am_nfs_fh3
structure so IT JUST SO HAPPENS to align with most (hopefully all)
of the fhandle structures for v3: first four bytes are the length
fields and the next four bytes are the fhandle data. Sigh.
Having this inconsistent use of v3 filehandles can be a real bear,
because we simply cannot avoid using the system's default fhandle
structure indirectly, through things like diropargs3 in
xdr_diropargs3(), which has inside of it a reference to the
system's default nfs_fh3 structure. ANYWAY, the current fix I've
come up with is to generalize the way we dereference field names
within the nfs_fh3 structure (whether ours or the system's) and
the same for the system's LOOKUP3res structure. I'm not pleased
with this fix; I'd rather we don't use our own am_nfs_fh3
structure at all.
* libamu/xdr_func.c (xdr_am_nfs_fh3): always definine this
function if we have NFS3, because we often use our own,
incompatible am_nfs_fh3 structure.
* include/am_xdr_func.h: We cannot use the native system's
xdr_nfs_fh3 because we are defining our own incompatible
am_hfs_fh3 structure for some systems.
* include/am_xdr_func.h: Define default values for field names of
struct nfs_fh3 and LOOKUP3res.
* doc/am-utils.texi (debug_options Parameter): minor typo fixed.
* conf/nfs_prot/nfs_prot_freebsd3.h: FreeBSD uses different fields
names for struct nfs_fh3 and LOOKUP3res, so override the default
names here.
* configure.in: AMU_CHECK_FS_MNTENT(nfs3) test before
AMU_STRUCT_NFS_FH3, because the latter depends on the former.
* amd/ops_nfs.c (prime_nfs_fhandle_cache): add {} to disambiguate
and clarify if-the-else clauses.
Ion Badulescu [Tue, 14 Oct 2003 00:47:40 +0000 (00:47 +0000)]
* amd/get_args.c (get_version_string): change "Built by" to
"Configured by", and add a new "Built by" line using the variables
below
* m4/update_build_version (vers): add BUILD_USER, BUILD_HOST, and
BUILD_DATE to build_version.h
* amd/mntfs.c (locate_mntfs): fix restarted filesystems: mf_fo
must be initialized even for them, otherwise we lose opt_sublink
(and perhaps other options as well)
Ion Badulescu [Tue, 14 Oct 2003 00:08:13 +0000 (00:08 +0000)]
* amd/amfs_generic.c (amfs_bgmount): The fix for the mf_fo NULL
pointer dereferencing was a bit too aggressive and could end up
not processing the sublink option if the filesystem was already
mounted. Report from Rainer Orth.
Ion Badulescu [Sun, 12 Oct 2003 00:49:44 +0000 (00:49 +0000)]
Fix restarted filesystem by disabling the amfs_inherit filesystem
and moving the restarting logic into the generic code. The old
code is still there, will be removed sometime in the near future.
* amd/mntfs.c (locate_mntfs): disable amfs_inherit and simply
return the pointer to the restarted filesystem
(free_mntfs): check for the MFF_RESTART flag instead of the
amfs_inherit ops
* amd/autil.c (mf_mounted): remove the MFF_RESTART flag once the
filesystem is use
* amd/amfs_nfsx.c (amfs_nfsx_init): only call fs_init() if the
filesystem is not being restarted
(amfs_nfsx_remount): if the filesystem is already mounted,
short-circuit the code and just continue
* amd/amfs_generic.c (amfs_bgmount): only call fs_init() if the
filesystem is not being restarted; remove hack that was used to
work around an amfs_inherit problem
Ion Badulescu [Sat, 11 Oct 2003 06:02:04 +0000 (06:02 +0000)]
don't try to move configure to configure.old if it doesn't exist
Rainer Orth [Thu, 9 Oct 2003 20:33:44 +0000 (20:33 +0000)]
Use WebNFS to obtain file handles for mount(2).
* NEWS: Document WebNFS support.
* configure.in: Check for public mount option.
* include/am_compat.h (MNTTAB_OPT_PUBLIC): Define if missing.
* doc/am-utils.texi (opts Option): Renamed webnfs to public,
update description.
* amd/amd.h (FSF_WEBNFS): New mntfs flag.
* include/am_utils.h (RPC_XID_WEBNFS): New XID type.
* amd/amfs_host.c (amfs_host_mount, amfs_host_umounted): Reject
WebNFS mount/umount attempts.
* amd/ops_nfs.c (got_nfs_fh_mount): Renamed from got_nfs_fh.
(got_nfs_fh_webnfs): New function.
(flush_nfs_fhandle_cache): Don't invalidate port for WebNFS servers.
(prime_nfs_fhandle_cache): Likewise.
Remove unconditional return of public file handle for WebNFS, but
get NFS file handles via mountd or WebNFS instead.
(webnfs_lookup): New function.
(nfs_umounted): Don't inform mountd if MFF_WEBNFS.
* amd/rpc_fwd.c (fwd_packet, fwd_reply): Send/receive WebNFS
packets.
* amd/srvr_nfs.c (recompute_portmap): Don't contact portmap for
WebNFS servers.
Mention host in info message.
(find_nfs_srvr): Handle public mount option.
Prefer NFSv3/tcp if the client supports it.
Allow port mount option to override default or result from portmap
lookup.
* libamu/xdr_func.c (xdr_diropargs3, xdr_filename3,
xdr_LOOKUP3args, xdr_LOOKUP3res, xdr_LOOKUP3resfail,
xdr_LOOKUP3resok, xdr_nfs_fh3, xdr_nfsstat3): New functions.
* include/am_xdr_func.h: Declare them.
* configure.in: Check for them.
* conf/nfs_prot/nfs_prot_linux.h: Provide missing NFSv3
definitions and types.
Rainer Orth [Thu, 9 Oct 2003 19:31:12 +0000 (19:31 +0000)]
Support IRIX 6 private mount option.
* configure.in (AC_CHECK_MNTTAB_OPTS): Check for private option
name string.
(AC_CHECK_MNT2_NFS_OPTS): Check for private NFS mount option (IRIX 6).
* aux/macros/header_templates.m4 (MNTTAB_OPT_PRIVATE,
MNT2_NFS_OPT_PRIVATE): Provide templates.
* include/am_compat.h (MNTTAB_OPT_PRIVATE): Define if missing.
* doc/am-utils.texi (opts Option): Document it.
Rainer Orth [Thu, 9 Oct 2003 19:26:49 +0000 (19:26 +0000)]
* doc/am-utils.texi (opts Option): Fix Tru64 UNIX name in proplist
mount option.
Rainer Orth [Thu, 9 Oct 2003 19:23:06 +0000 (19:23 +0000)]
* libamu/mount_fs.c (compute_nfs_args) [HAVE_NFS_ARGS_T_FH_LEN]:
Don't reference removed fh3.
Rainer Orth [Thu, 9 Oct 2003 19:18:52 +0000 (19:18 +0000)]
* NEWS: New minor port sparc-sun-solaris2.10 (Solaris 10).
* INSTALL: Mention test status of various ports.
Describe IRIX 6 autofs status.
Ion Badulescu [Thu, 9 Oct 2003 05:13:56 +0000 (05:13 +0000)]
* NEWS: updated
* amd/amfs_generic.c (amfs_bgmount): don't use mf_fo until after
we've done all the tests and we know we have a valid and mountable
mntfs. Otherwise we could end up dereferencing null pointers.
* amd/amd.h: fixed a copy&paste comment bug
* amd/am_ops.c (ops_match): minor code cleanup
* doc/am-utils.texi: fixed various typos; added warning about the
racy nature of nfsx; removed duplicated listing of debug options;
added paragraph about signals supported by hlfsd; removed the long
list of (maybe) supported platforms since it duplicates the list
in INSTALL.
Rainer Orth [Thu, 2 Oct 2003 17:41:31 +0000 (17:41 +0000)]
Simplify FD_SET etc. use.
* include/am_defs.h (FD_SET, FD_ISSET, FD_CLR, FD_ZERO): Provide
if missing.
(rpc_pending_now, run_rpc): Use them.
* configure.in: Check for fds_bits field in fd_set.
* amd/nfs_start.c (run_rpc): Use it.
Rainer Orth [Thu, 2 Oct 2003 17:13:22 +0000 (17:13 +0000)]
Forgotten in previous commit.
Rainer Orth [Thu, 2 Oct 2003 16:53:51 +0000 (16:53 +0000)]
Improve RPC XID handling.
* amd/rpc_fwd.c (fwd_packet, fwd_reply): Always log xid.
Convert xid to/from host/network byte order.
Rainer Orth [Thu, 2 Oct 2003 16:29:27 +0000 (16:29 +0000)]
Use NFS V2/V3 file handles instead of mount results.
* include/am_utils.h (am_nfs_fhandle): Use NFS V2/V3 file handles
only, not MOUNTPROC_MNT results.
* amd/amfs_host.c (fetch_fhandle): Use local variables to store
MOUNTPROC_MNT results.
* amd/autil.c (amfs_mount): Use new am_nfs_fhandle_t.
* amd/ops_nfs.c (struct fh_cache): New member fh_status.
(got_nfs_fh): Use local variables to store MOUNTPROC_MNT results.
Store MOUNTPROC_MNT errors in fh_status.
(prime_nfs_fhandle_cache): Get fh_error from fh_status.
* hlfsd/hlfsd.c (main): Use new am_nfs_fhandle_t.
* libamu/mount_fs.c (compute_nfs_args): Copy NFS V2/V3 file
handles straight from new am_nfs_fhandle_t.
Rainer Orth [Thu, 2 Oct 2003 16:03:45 +0000 (16:03 +0000)]
* amd/clock.c (CID_ALLOC): Remove unused argument.
(timeout): Likewise.
* amd/ops_nfs.c (FHID_ALLOC): Remove unused argument.
(prime_nfs_fhandle_cache): Likewise.
(call_mountd): Use UDPMSGSIZE instead of magic constant.
* amd/rpc_fwd.c (XID_ALLOC): Remove unused argument.
(fwd_packet): Likewise.
Handle TLOOK error from t_rcvudata().
Ion Badulescu [Wed, 1 Oct 2003 02:45:12 +0000 (02:45 +0000)]
slightly different #ifdef structuring, no real code changes
Ion Badulescu [Wed, 1 Oct 2003 01:50:27 +0000 (01:50 +0000)]
* NEWS: updated
* libamu/mount_fs.c (mount_fs): don't try to recreate the mount
point if the mount fails with ENOENT: in the best case we would be
papering over a bug, and in the worst case we could cause a
deadlock (with autofs). If there are races, they need to be
exposed and fixed properly.
* conf/autofs/autofs_solaris_v1.h,
conf/autofs/autofs_solaris_v2_v3.h,
conf/autofs/autofs_linux.h: (AUTOFS_NFSX_FS_FLAGS): autofs
semantics don't allow us to mount nfsx directly onto an autofs
mountpoint, so disallow it
* amd/amfs_nfsx.c (amfs_nfsx_match): more restrictive sanity check
to avoid trying to memmove(foo, bar, (unsigned)-1) due to invalid
map entries...
(amfs_nfsx_cont): amfs_retry does most of the cleanup work for us
in the upper layer, so don't do anything else beside wakeup() on
success
(amfs_nfsx_remount): only create the mountpoints as we need them,
avoids creating them on the wrong filesystem in the case of
hierarchical mounts; fix crash-generating typo (m should really be
mf and I swear I hate single-character variable names)
* amd/amfs_generic.c (amfs_cont): one more dlog
(amfs_bgmount): amazingly enough, even foreground mounts can be
backgrounded (in the case of nfsx), so account for this
possibility and permit retries
* m4/macros/check_autofs_style.m4 (AMU_AUTOFS_PROT_HEADER): define
and AC_SUBST it as ${top_builddir}/amu_autofs_prot.h
* amd/Makefile.am ($(amd_OBJECTS) $(EXTRA_amd_OBJECTS)): depend on
@AMU_AUTOFS_PROT_HEADER@
Ion Badulescu [Wed, 1 Oct 2003 01:48:03 +0000 (01:48 +0000)]
updated with the nfsx fix
Ion Badulescu [Wed, 1 Oct 2003 01:47:40 +0000 (01:47 +0000)]
There is still a bug in nfsx when combined with restarted
filesystems, because they both use the mf_private field and stomp
on each other's data. I'm going to look into that next, I think I have
an elegant solution for it. -Ion
* libamu/mount_fs.c (mount_fs): don't try to recreate the mount
point if the mount fails with ENOENT: in the best case we would be
papering over a bug, and in the worst case we could cause a
deadlock (with autofs). If there are races, they need to be
exposed and fixed properly.
* conf/autofs/autofs_solaris_v1.h,
conf/autofs/autofs_solaris_v2_v3.h,
conf/autofs/autofs_linux.h: (AUTOFS_NFSX_FS_FLAGS): autofs
semantics don't allow us to mount nfsx directly onto an autofs
mountpoint, so disallow it
* amd/amfs_nfsx.c (amfs_nfsx_match): more restrictive sanity check
to avoid trying to memmove(foo, bar, (unsigned)-1) due to invalid
map entries...
(amfs_nfsx_cont): amfs_retry does most of the cleanup work for us
in the upper layer, so don't do anything else beside wakeup() on
success
(amfs_nfsx_remount): only create the mountpoints as we need them,
avoids creating them on the wrong filesystem in the case of
hierarchical mounts; fix crash-generating typo (m should really be
mf and I swear I hate single-character variable names)
* amd/amfs_generic.c (amfs_cont): one more dlog
(amfs_bgmount): amazingly enough, even foreground mounts can be
backgrounded (in the case of nfsx), so account for this
possibility and permit retries
* m4/macros/check_autofs_style.m4 (AMU_AUTOFS_PROT_HEADER): define
and AC_SUBST it as ${top_builddir}/amu_autofs_prot.h
* amd/Makefile.am ($(amd_OBJECTS) $(EXTRA_amd_OBJECTS)): depend on
@AMU_AUTOFS_PROT_HEADER@
Erez Zadok [Tue, 30 Sep 2003 01:22:11 +0000 (01:22 +0000)]
* minor new port mipsel-unknown-linux-rhPS2 (Linux on Sony
PlayStation 2)
* amd/srvr_nfs.c (find_nfs_srvr): don't run code that expects
"char protocols[]" unless MNTTAB_OPT_PROTO is defined.
Rainer Orth [Fri, 26 Sep 2003 20:15:12 +0000 (20:15 +0000)]
Consolidate alloca support.
* amd/amq_svc.c: Move alloca support ...
* include/am_defs.h: ... here.
* amd/conf_parse.y: Remove alloca support.
* fsinfo/fsi_gram.y: Likewise.
Rainer Orth [Thu, 25 Sep 2003 22:26:10 +0000 (22:26 +0000)]
Handle Solaris 10.
* m4/macros/check_nfs_prot_headers.m4
(AMU_CHECK_NFS_PROT_HEADERS): Don't use wildcards for
sunos5.[0-3], solaris 2.[0-3], there were no micro releases.
Explicitly match sunos5*, solaris2* for Solaris 8 and beyond.
* m4/macros/os_cflags.m4 (AMU_OS_CFLAGS): Dont use wildcards for
solaris2.[0-5], sunos5.[0-5], but explicitly handle Solaris 2.5
micro releases to cope with Solaris 2.5.1.
Explicitly match solaris2*, sunos5*.
Rainer Orth [Thu, 25 Sep 2003 20:19:07 +0000 (20:19 +0000)]
* amd/amq_svc.c: Provide alloca prerequisites.
* conf/transp/transp_tli.c (register_autofs_service): Fix typo.
Ion Badulescu [Wed, 24 Sep 2003 02:44:38 +0000 (02:44 +0000)]
* minor new port: x86_64-unknown-linux-rh2.9.5AS. (Red Hat
Enterprise Linux 3.0 beta running on a 64-bit AMD64 platform)
Ion Badulescu [Mon, 22 Sep 2003 19:43:13 +0000 (19:43 +0000)]
* conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): compile fix
Ion Badulescu [Sat, 20 Sep 2003 03:19:47 +0000 (03:19 +0000)]
* amd/amfs_nfsl.c (amfs_nfsl_match): checking opt_fs is not always
enough, we should lstat() the sublink if it's defined.
(amfs_nfsl_ffserver): ditto
(ALL): Removed some obsolete comments. The nfsl code is now little
more than a very straight-forward switch between link and nfs.
* amd/amfs_link.c (amfs_link_match): more up-to-date explanation
for the prepend-the-dot hack for type link; also, the sublink is
already normalized and absolute, so take advantage of that
* amd/amfs_generic.c (amfs_lookup_one_mntfs): the sublink is
already normalized and absolute, so take advantage of that
* amd/am_ops.c (ops_match): normalize the sublink here, early into
the matching process
Ion Badulescu [Sat, 20 Sep 2003 01:09:04 +0000 (01:09 +0000)]
* amd/autil.c (am_mounted): be consistent and accept both
"nounmount" and "noumount" as pseudo mount options (same as
"unmount" and "umount" nearby)
Ion Badulescu [Sat, 20 Sep 2003 00:53:00 +0000 (00:53 +0000)]
* amd/Makefile.am (build_version.h): fixed dependencies (depends
on amd_OBJECTS, not OBJECTS -- which doesn't even exist)
Erez Zadok [Fri, 19 Sep 2003 23:38:23 +0000 (23:38 +0000)]
* amd/amq_subr.c (amqproc_export_1_svc): force double casting to
avoid gcc-3.3 complaints on Solaris 9 about "dereferencing
type-punned pointer will break strict-aliasing rules".
Ion Badulescu [Wed, 17 Sep 2003 19:20:24 +0000 (19:20 +0000)]
* Released beta version 6.1b4
Ion Badulescu [Tue, 16 Sep 2003 23:45:12 +0000 (23:45 +0000)]
* doc/am-utils.texi (opts Option): removed documentation for old
ignore_portmapper mount option, documented the new webnfs option
Ion Badulescu [Tue, 16 Sep 2003 04:14:36 +0000 (04:14 +0000)]
* NEWS: webnfs support
* amd/srvr_nfs.c (find_nfs_srvr): set MFF_WEBNFS if the "webnfs"
(former "ignore_portmapper") mount option is present
* amd/ops_nfs.c (prime_nfs_fhandle_cache): generate a public
filehandle (all zeros) if MFF_WEBNFS is set
(nfs_umounted): don't talk to mountd if MFF_WEBNFS is set
* amd/amd.h (MFF_WEBNFS): new flag, obvious meaning
Ion Badulescu [Sat, 13 Sep 2003 23:07:55 +0000 (23:07 +0000)]
* amd/srvr_nfs.c: renamed np_xid to global_xid; sanitized the
NPXID_ALLOC macro and renamed it to XID_ALLOC; renamed start_ping
to create_ping_payload; renamed nfs_pinged to
nfs_keepalive_callback; renamed nfs_timed_out to
nfs_keepalive_timeout; renamed nfs_srvr_port to get_mountd_port;
made ping_buf and ping_len arrays with one element for each
supported nfs version
* amd/amd.h: renamed nfs_srvr_port() to get_mountd_port()
* amd/amfs_host.c (amfs_host_init): ditto
* amd/ops_nfs.c (call_mountd): ditto
Rainer Orth [Wed, 3 Sep 2003 21:08:04 +0000 (21:08 +0000)]
* BUGS: Mention fix for broken Solaris 8 <rpcsvc/autofs_prot.h>
patches.