NameDateSize

..06-May-202087

amd/H24-Dec-201677

amq/H30-Jun-20189

AUTHORSH A D24-Dec-201615 KiB

aux_conf.h.inH A D18-Aug-20162 KiB

bootstrapH A D24-Dec-20161.3 KiB

BUGSH A D24-Dec-201612.8 KiB

ChangeLogH A D24-Dec-2016461.1 KiB

conf/H20-Dec-201610

COPYINGH A D24-Dec-20161.7 KiB

doc/H24-Dec-20166

FAQH A D24-Dec-20162.9 KiB

fixmount/H24-Dec-20164

FREEBSD-upgradeH A D18-Aug-20163.4 KiB

FREEBSD-XlistH A D18-Aug-20167 KiB

fsinfo/H24-Dec-201621

hlfsd/H24-Dec-20168

include/H24-Dec-201610

INSTALLH A D24-Dec-201615.4 KiB

ldap-id.msH A D24-Dec-20169.3 KiB

ldap-id.txtH A D24-Dec-201610.6 KiB

ldap.schemaH A D18-Aug-20161.5 KiB

libamu/H24-Dec-201613

MIRRORS.htmlH A D24-Dec-20162.7 KiB

MIRRORS.txtH A D24-Dec-20161.9 KiB

mk-amd-map/H24-Dec-20164

NEWSH A D24-Dec-201658 KiB

READMEH A D24-Dec-20163.8 KiB

README.attrcacheH A D24-Dec-20166.4 KiB

README.ldapH A D24-Dec-20161.5 KiB

README.y2kH A D24-Dec-20161.1 KiB

scripts/H24-Dec-201621

tasksH A D18-Aug-20163.3 KiB

vers.m4H A D24-Dec-20169

wire-test/H24-Dec-20164

README

1This is the official version of am-utils.
2
3See the file NEWS for news on this and previous releases.
4
5*** General Notes to alpha/beta testers:
6
7[A] as alpha/beta testers, I expect you to be able to find certain things on
8your own (especially look at the sources to figure out how things work).
9
10[B] if you intend to modify any files, first find out if the file you want
11to modify gets autogenerated from some other place.  If so, modify it at the
12source.
13
14You can adjust some of the configuration of am-utils after it has been
15auto-configured by putting whatever definitions you wish in a file called
16localconfig.h, located in the top build directory (the same one where
17config.h is created for you).
18
19[C] there are several ways you can build am-utils:
20
21(1) run the buildall script as follows:
22
23	./buildall
24
25This would build all the applications inside a special directory relative to
26the root of the source tree, called A.<cpu-company-system>, where the <>
27part is filled in by GNU's config.guess script.  This is the preferred
28method, for it will separate the build from the sources, and allow you to
29run buildall for multiple architectures concurrently.
30
31You can run "buildall -h" to see what options it takes.
32
33(2) run the configure script such as:
34
35	./configure
36
37and then run
38
39	make
40
41This would configure amd in the directory you've run the configure script
42in, and the built it there.  Run "make install" to install all the necessary
43files.
44
45Note that this is good for building only one version of amd on one
46architecture!  Don't try this for multiple architectures.  If you must, then
47after doing one such build, run "make distclean" and then reconfigure for
48another architecture.
49
50(3) run the configure script for build in a different location.  Let's say
51that /src/am-utils-6.0 is where you unpacked the sources.  So you could
52
53	mkdir /src/build/sunos5
54	cd /src/build/sunos5
55	/src/am-utils-6.0/configure --srcdir=/src/am-utils-6.0
56	make
57
58This is a manual method that will let you build in any directory outside the
59am-utils source tree.  It requires that your "make" program understand
60VPATH.  This can be used multiple times to build am-utils concurrently in
61multiple (but different) directories.  In fact, the buildall script
62described above does precisely that, using the A.* subdirectories.
63
64(4) If you need to configure am-utils with extra libraries and/or headers,
65for example to add hesiod support, do so as follows:
66
67	configure --enable-libs="-lhesiod -lresolv" \
68		--enable-ldflags="-L/usr/local/hesiod/lib" \
69		--enable-cppflags="-I/usr/local/hesiod/include"
70
71[D] If you modify any of the *.[chyl] sources in the directories amd, amq,
72hlfsd, lib, etc, all you need to do to get a new version of am-utils is run
73make.
74
75If you modify any of the files in the m4/ or conf/ directories, or any *.in
76or *.am file, then you must rebuild the configure script, Makefile.in files,
77aclocal.m4, etc.  The best way to do so is to run
78
79	./bootstrap
80or
81	./buildall -K
82
83To be a developer and be able to run "bootstrap", you must have
84autoconf-2.68, automake-1.11.1, and libtool 2.2.6b installed on your system (or
85later versions thereof).  You no longer need to get my special version of
86automake.  Contact me if you'd like to be a maintainer and get access to the
87CVS server.
88
89After you've remade the basic configuration files you must rerun the
90buildall script to rerun configure and then remake the binaries.
91
92Modifying M4 macros may not be very intuitive to anyone that has not done so
93before.  Let me know if you are having any problems with them.  I fully
94expect, at least initially, to have to be the sole developers of the M4
95macros and let others concentrate on C sources.
96
97[E] Report all bugs via Bugzilla or the am-utils list (see
98www.am-utils.org).  Avoid reporting to my personal email address.  It is
99important to involve the whole list in bug fixes etc.
100
101Good luck.
102
103Erez Zadok,
104Maintainer, am-utils.
105

README.attrcache

1		 NFS Attribute Caching OS Problems and Amd
2		      Last updated September 18, 2005
3
4* Summary:
5
6Some OSs don't seem to have a way to turn off the NFS attribute cache, which
7breaks the Amd automounter so badly that it is not recommend using Amd on
8such OS for heavy use, not until this is fixed.
9
10
11* Details:
12
13Amd is a user-level NFSv2 server that manages automounts of all other file
14systems.  The kernel contacts Amd via RPCs, and Amd in turn performs the
15actual mounts, and then responds back to the kernel's RPCs.  Every kernel
16caches attributes of files, in a cache called the Directory Name Lookup
17Cache (DNLC), or a Directory Cache (dcache).
18
19Amd manages its namespace in the user level, but the kernel caches names
20itself.  So the two must coordinate to ensure that both namespaces are in
21sync.  If the kernel uses a cached entry from the DNLC, without consulting
22Amd, users may see corruption of the automounter namespace (symlinks
23pointing to the wrong places, ESTALE errors, and more).  For example,
24suppose Amd timed out an entry and removed the entry from Amd's namespace.
25Amd has to tell the kernel to purge its corresponding DNLC entry too.  The
26way Amd often does that is by incrementing the last modification time
27(mtime) of the parent directory.  This is the most common method for kernels
28to check if their DNLC entries are stale: if the parent directory mtime is
29newer, the kernel will discard all cached entries for that directory, and
30will re-issue lookup methods.  Those lookups will result in
31NFS_GETATTR/NFS_LOOKUP calls sent from the kernel down to Amd, and Amd can
32then properly inform the kernel of the new state of automounted entries.
33
34In order to ensure that Amd is "in charge" of its namespace without
35interference from the kernel, Amd will try to turn off the NFS attribute
36cache.  It does so by using the NFSMNT_NOAC flag, if it exists, or by
37setting various "cache timeout" fields in struct nfs_args to 0 (acregmin,
38acregmax, acdirmin, or acdirmax).
39
40We have released a major new version of am-utils, version 6.1, in June 2005.
41Since then, a lot of people have experimented with Amd, in anticipation of
42migrating from the very old am-utils 6.0 to the new 6.1.  For a couple of
43months since the release of 6.1, we have received reports of problems with
44Amd, especially under heavy use.  Users reported getting ESTALE errors from
45time to time, or seeing automounted entries whose symlinks don't point to
46where it should be.  After much debugging, we traced it to a few places in
47Amd where it wasn't updating the parent directory mtime as it should have;
48in some places where Amd was indeed updating the mtime, it was using a
49resolution of only 1 second, which was not fine enough under heavy load.  We
50fixed this problem and switched to using a microsecond resolution mtime.
51
52After fixing this in Amd, we went on to verify that things work for other
53OSs.  When we got to test certain BSDs, we found out that they always cache
54directory entries, and there is no way to turn it off completely.
55Specifically, if we set the ac{reg,dir}{min,max} fields in struct nfs_args
56all to zero, the kernel seems to cache the entries for a default number of
57seconds (something like 5-30 seconds).  On some OSs, setting these four
58fields to 0 turns off the attribute cache, but not on some BSDs.  We were
59able to verify this using Amd and a script that exercises the interaction of
60the kernel's attrcache and Amd.  (If you're interested, the script can be
61made available.)
62
63We then experimented by setting the ac{reg,dir}{min,max} fields in struct
64nfs_args all to 1, the smallest non-zero value we could.  When we ran the
65Amd exercising script, we found that the value of 1 reduced the race between
66the DNLC and Amd, and the script took a little longer to run before it
67detected an incoherency.  That makes sense: the smaller the DNLC cache
68interval is, the shorter the window of vulnerability is.  (BTW, the man
69pages on some OSs say that the ac{reg,dir}{min,max} fields use a 1 second
70resolution, but experimentation indicated it was in 0.1 second units.)
71
72Clearly, setting the ac{reg,dir}{min,max} fields to 0 is worse than setting
73it to 1 on those OSs that don't have a way to turn off the attribute cache.
74So the current workaround I've implemented in am-utils is to create a
75configuration parameter called "broken_attrcache" which, if turned on, will
76set these nfs_args fields to 1 instead of 0.  I wish I didn't have to create
77such ugly workaround features in Amd, but I've got no choice.
78
79The near term solution is for every OS to support a true 'noac' flag, which
80can be added fairly easily.  This'd make Amd work reliably.
81
82The long term solution is to implement Autofs support for all OSs and to
83support it in Amd.  Currently, Amd supports autofs on Solaris and Linux;
84FreeBSD is next.  Still, we found that even with autofs support, many
85sysadmins still prefer to use the good 'ol non-autofs mode.
86
87
88* Confirmed Status
89
90This is the confirmed status of various OSs' vulnerability to this attribute
91cache bug.  We are slowly checking the status of other OSs.  The status of
92any OS not listed is unknown as of the date at the top of this file.
93
94** Not Vulnerable (support a proper "noac" flag):
95
96Sun Solaris 8 and 9 (10 probably works fine)
97Linux: 2.6.11 kernel (2.4.latest probably works fine)
98FreeBSD 5.4 and 6.0-SNAP001 (older versions probably work fine)
99OpenBSD 3.7 (older versions probably work fine)
100
101** Vulnerable (don't support a proper "noac" flag natively):
102
103NetBSD 2.0.2 (older versions are also probably affected)
104
105Note: NetBSD has promised to support a noac flag hopefully after 2.1.0 is
106released (maybe in 3.0 or 2.2).  In the mean time, you can apply one of
107these two kernel patchs to support a 'noac' flag in NetBSD 2.x or 3.x:
108	ftp://ftp.netbsd.org/pub/NetBSD/misc/christos/2x.nfs.noac.diff
109	ftp://ftp.netbsd.org/pub/NetBSD/misc/christos/3x.nfs.noac.diff
110After applying this patch and rebuilding your kernel, reboot with the new
111kernel.  Then copy the new nfs.h and nfsmount.h from /sys/nfs/ to
112/usr/include/nfs/, and finally rebuild am-utils from scratch.
113
114** Testing
115
116When you build am-utils, a script named scripts/test-attrcache is built,
117which can be used to test the NFS attribute cache behavior of the current
118OS.  You can run this script as root as follows:
119
120# make install
121# cd scripts
122# sh test-attrcache
123
124If you run this script on an OS whose status is known (and not listed
125above), please report it to us via Bugzilla or the am-utils mailing list
126(see www.am-utils.org), so we can record it in this file.
127
128Sincerely,
129Erez.
130

README.ldap

1LDAP support for am-utils was originally done by Leif Johansson
2<leifj AT it.su.se>.  He no longer maintains it.
3
4The current LDAP support for am-utils is for LDAPv2 only.  Reportedly,
5LDAPv3 mostly works.  Volunteers and patches are welcome.
6
7The IANA has assigned the following Private Enterprise Number to:
8
9	10180  Am-utils Organization   Erez Zadok	ezk AT am-utils.org
10
11There are three files in this directory that relate to LDAP:
12
13ldap.schema:
14
15	This is the most current schema.
16
17ldap-id.txt:
18
19	This is an experimental schema for amd mount maps in LDAP.  Since
20	LDAP isn't maintained now, this code may not match with either the
21	current ldap_info.c code or with Amd mount maps in general.
22
23	The schema is written in the form of an internet-draft but it has
24	not been published as such.  We need volunteers who know and use
25	LDAP to clean it up and further its process of submission.
26
27ldap-id.ms:
28
29	This is the NROFF source of the draft.  To generate the text from
30	it, run "nroff -ms ldap-id.ms > ldap-id.txt"
31
32Erez.
33
34------- Forwarded Message
35
36From: "IANA Private Enterprise Number" <iana-pen AT icann.org>
37To: "Erez Zadok" <ezk AT cs.columbia.edu>
38Subject: RE: Application for Enterprise-number (10180)
39Date: Sun, 15 Jul 2001 14:43:45 -0700
40
41Dear Erez,
42
43The IANA has assigned the following Private Enterprise
44Number to:
45
4610180  Am-utils Organization   Erez Zadok                 ezk AT am-utils.org
47
48Please notify the IANA if there is a change in your contact
49or company information.
50
51Thank you,
52
53Bill Huang
54IANA - Private Enterprise Numbers
55
56------- End of Forwarded Message
57
58

README.y2k

1		       AM-UTILS YEAR-2000 COMPLIANCE
2
3Most likely am-utils is y2k compliant.
4
5I do not know for sure because I have not certified am-utils myself, nor do
6I have the time for it.  I do not think that amd will be affected by y2k at
7all, because it does not do anything with dates other than print the date on
8the log file, in whatever format is provided by your os/libc --- especially
9the ctime(3) call.
10
11However, on Friday, September 18th 1998, Matthew Crosby <mcrosby AT ms.com>
12reported that they evaluated 6.0a16 and found it to be compliant.
13
14On March 26, 1999, Paul Balyoz <pbalyoz AT sedona.ch.intel.com> submitted a
15patch to lostaltmail which makes it print Y2K compliant dates.  He used a
16code scanner and manually "eyeballed" the code and could not find any more
17problems.  Paul's patch is included in am-utils-6.0.1s7 and newer versions.
18Paul also said that other 2-digit years used in am-utils are "harmless."
19
20NOTE: NONE OF THE PERSONS MENTIONED HERE, AUTHOR INCLUDED, ARE WILLING TO
21CERTIFY AM-UTILS AS Y2K COMPLIANT.  USE AT YOUR OWN RISK.
22
23---
24Erez Zadok.
25Maintainer, am-utils package and am-utils list.
26WWW:   http://www.am-utils.org
27