Christos Zoulas [Thu, 26 May 2011 21:02:53 +0000 (17:02 -0400)]
Remove ``# serial 57 LT_INIT''. Newer autoconf does not like it because it
is not the first macro in the file.
Christos Zoulas [Sun, 22 May 2011 02:36:52 +0000 (22:36 -0400)]
Put back the sys/socket.h header and remove __KERNEL__. It was probably
needed for some ancient version of linux that nobody uses anymore. If
someone complains, I promise to fix it.
Erez Zadok [Sun, 22 May 2011 00:14:54 +0000 (20:14 -0400)]
am-utils: update copyrights for 2011
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 22 May 2011 00:07:17 +0000 (20:07 -0400)]
Fix compile errors on Linux, CentOS 5.5 (can't find linux/nfs_mount.h)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 22 May 2011 00:02:54 +0000 (20:02 -0400)]
Double quote square brackets in M4 macros.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 22 May 2011 00:25:41 +0000 (20:25 -0400)]
Update autotools to aut autoconf 2.68, automake 1.10.3, and libtool 2.4.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Christos Zoulas [Fri, 20 May 2011 02:32:36 +0000 (22:32 -0400)]
Fixes for Fedora Core 15 and RHEL 6
Erez Zadok [Wed, 24 Nov 2010 19:11:04 +0000 (14:11 -0500)]
Amd map.c: don't ignore return value from write(2)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 24 Nov 2010 19:01:40 +0000 (14:01 -0500)]
Assorted yacc/lex compile errors for fsinfo/amd
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 24 Nov 2010 17:39:01 +0000 (12:39 -0500)]
On Linux, cast "res" arg in clnt_call to proper type.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 24 Nov 2010 17:16:25 +0000 (12:16 -0500)]
On Linux, define _GNU_SOURCE to enable O_LARGEFILE definitions
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Christos Zoulas [Wed, 24 Nov 2010 16:43:57 +0000 (11:43 -0500)]
Don't use $^. The whole world is not gmake.
Christos Zoulas [Sat, 20 Nov 2010 23:04:38 +0000 (18:04 -0500)]
move rpc/auth* to the list of headers that need others
Christos Zoulas [Sat, 20 Nov 2010 22:35:16 +0000 (17:35 -0500)]
Add new ops_udf.c
Christos Zoulas [Sat, 20 Nov 2010 19:08:15 +0000 (14:08 -0500)]
- repository allows only annotated tags
- build target is gone; use distcheck instead
Christos Zoulas [Sat, 20 Nov 2010 18:47:23 +0000 (13:47 -0500)]
update for rc1
Christos Zoulas [Sat, 20 Nov 2010 17:48:32 +0000 (12:48 -0500)]
mention addopts fix
Christos Zoulas [Sat, 20 Nov 2010 17:44:18 +0000 (12:44 -0500)]
Don't use haseq() to get the keyword to feed to hasmntopt(3), because
haseq() will return the position after the "=" and while the internal
hasmntopt() that amd provides works with the extra equal, the regular
os ones, don't work. To do:
- remove haseq(); it is not used anywhere now.
- fix our hasmntopt() code to not accept "key="
Christos Zoulas [Thu, 10 Dec 2009 18:31:35 +0000 (13:31 -0500)]
Copy all fields of the am_opts structure
When we introduced am_loc we also added a function to create a
duplicate of an am_opts structure. As it turns out, that only made
a partial copy of the struct and some fields (e.g. opt_cache) was
left blank in the new structure.
Unfortunately any code that was checking the options through the
mntfs structure was mislead by the partial copy: caching was disabled
completely, for example, and since browsing relies on caching being
enabled it wasn't working either.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 18:29:48 +0000 (13:29 -0500)]
Initialize RPC authentication flavor to AUTH_UNIX instead of zero.
RHEL 5 uses version 6 of the mount_arg structure that includes the
desired RPC authorization flavour. Unfortunately amd initializes
that value to zero, meaning AUTH_NULL, resulting in all NFS servers
denying operations.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 18:27:07 +0000 (13:27 -0500)]
Make sure to remove nodes in the proper order when going down.
Depending on what order the nodes got created it's possible that
the parent of a node has a bigger am_mapno (index in exported_ap[])
so that it gets freed before its child while the child's am_parent
pointer is still pointing to the already freed block of memory.
This change makes sure that umount_exported() cleans up all children
of a node first before freeing the node.
XXX: This patch did not apply cleanly because it pre-dated the am_al
patches.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 18:04:27 +0000 (13:04 -0500)]
fix typo
Christos Zoulas [Thu, 10 Dec 2009 17:59:48 +0000 (12:59 -0500)]
Fix Linux-specific stuff in ops_tmpfs.c
AUTOFS_TMPFS_FS_FLAGS is defined only in the Linux-specific
conf_linux.c file, so it cannot be built on Solaris.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:58:13 +0000 (12:58 -0500)]
Add missing parenthesis to fix defined(XXX
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:56:57 +0000 (12:56 -0500)]
In the previous commit we've already made a change that
makes this code unnecessary since the node is returned
even if the backing file server is known to be down.
Since the code path is unused it should be removed.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:55:18 +0000 (12:55 -0500)]
amfs_generic_lookup_child() tries to find an alternate file server
if it detects that the current one is down. However, in the
comparison used to decide if a possible mount is the same as the
current one it compares the am_loc pointers instead of the actual
mntfs pointers. Since amfs_lookup_one_location() creates a brand
new am_loc structure for the returned mntfs structure the am_loc
pointer will be different even if the mntfs it's pointing to is
the same. This tricks amfs_generic_lookup_child() think it has
found an alternate file server while it hasn't and thus starts
multiple racing mounts for the very same node and mntfs.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:53:28 +0000 (12:53 -0500)]
Setting the error flag of the mntfs for which the share
is already mounted results in the mount point not being
removed when it times out. (Amd considers it an error
mntfs and thus umount becomse a no-op.)
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:51:00 +0000 (12:51 -0500)]
Setting the error flag of the mntfs for which the share
is already mounted results in the mount point not being
removed when it times out. (Amd considers it an error
mntfs and thus umount becomse a no-op.)
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:49:28 +0000 (12:49 -0500)]
Right now AMD sets all timeout values to their defaults
even if you explicitly set them to zero. This patch
introduces separate flags that store if the respective
values have been set and the code path setting default
values checks these flags instead of testing the values
for zero. [Linux only]
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 17:46:23 +0000 (12:46 -0500)]
Currently, the mount options (struct am_opts) are associated with the
mntfs structure. This is usually not a problem since these options are
not used once the mount has been completed. However, if two lookups
are within a short time it's possible that the options derived during
the second lookup will overwrite the option information in the mntfs
structure and thus the first lookup's options are lost.
We've seen plenty of problems where two keys which referenced the same
share but had different sublinks ended up pointing to the same
subdirectory of the share.
This patch introduces a new structure linking an mntfs to a node and
moves the am_opts pointer to this structure.
This is what we currently have:
+---------+ 1 n +-------+
| am_node |-------| mntfs |
+---------+ +-------+
|
+---------+
| am_opts |
+---------+
This patch changes the structure above into something like this:
+---------+ 1 n +--------+ n 1 +-------+
| am_node |-------| am_loc |-------| mntfs |
+---------+ +--------+ +-------+
| |
+---------+ +---------+
| am_opts | | am_opts |
+---------+ +---------+
In this schema am_opts is a per-node structure so that parallel
lookups don't overwrite each other's options. The am_opts structure
associated with mntfs is filled in when the actual mount happens.
(Note that this structure is far from being perfect. The problem is
that am_opts contains two types of fields: fields which are
mount-specific (rhost, rfs, etc.) and fields which would rather belong
to the node (sublink). The diagram above means that we're
unnecessarily duplicating all mount-specific information for each
node.)
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Thu, 10 Dec 2009 16:23:47 +0000 (11:23 -0500)]
We have to free the buffers allocated by the XDR routines when
decoding the mount response after copying them to their final place.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Wed, 9 Dec 2009 16:17:38 +0000 (11:17 -0500)]
Free continuation in amfs_retry() if we don't call amfs_bgmount()
Normally it's amfs_bgmount() which frees the continuation. However, if
the mount is already in progress and we're in amfs_retry() for another
node we don't try mounting the filesystem once again. Still, we have
to free the continuation as we won't get called again and thus would
leak the continuation structure and our am_loc references.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Wed, 9 Dec 2009 16:15:05 +0000 (11:15 -0500)]
Fix use-after-free and double free of mntfs private data
ops_nfs.c(nfs_init) does not clear private data pointer after free().
This leads to use-after-free and double free in case mount() fails.
(found by valgrind)
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Christos Zoulas [Mon, 23 Nov 2009 16:14:11 +0000 (11:14 -0500)]
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
Date: Tue, 29 Jan 2008 17:59:19 +0100
Subject: [PATCH 01/20] Fix filename buffer leak in mtab_linux.c
The temporary filename buffer was leaked in lock_mtab().
Christos Zoulas [Wed, 28 Oct 2009 13:12:08 +0000 (09:12 -0400)]
If both <errno.h> and <sys/errno.h> exist, include only <errno.h>, don't
include both and manually define errno.
Christos Zoulas [Mon, 26 Oct 2009 17:27:43 +0000 (13:27 -0400)]
* Fix issue with autoconf-2.63
* Fix warnings for gcc-4.4
Christos Zoulas [Wed, 15 Apr 2009 16:10:33 +0000 (12:10 -0400)]
Share a single LDAP connection by default for all the maps.
Christos Zoulas [Fri, 20 Mar 2009 20:13:19 +0000 (16:13 -0400)]
Remove stray line.
Christos Zoulas [Fri, 20 Mar 2009 20:11:05 +0000 (16:11 -0400)]
Merge branch 'master' of git://git.fsl.cs.sunysb.edu/am-utils-6.2
Christos Zoulas [Thu, 19 Feb 2009 22:05:17 +0000 (17:05 -0500)]
Add code to do synchronous unmounts in amq that report back success/failure.
Christos Zoulas [Fri, 13 Feb 2009 20:30:34 +0000 (15:30 -0500)]
mention today's fixes.
Christos Zoulas [Fri, 13 Feb 2009 20:28:30 +0000 (15:28 -0500)]
move am_fd to the right place. Somehow my patch put it in the wrong place.
Christos Zoulas [Fri, 13 Feb 2009 20:27:20 +0000 (15:27 -0500)]
- Don't define __USE macros. They are reserved for internal OS use.
- Move the largefile64 macro to the beginning of the file to avoid
redefinitions.
Christos Zoulas [Thu, 12 Feb 2009 21:10:21 +0000 (16:10 -0500)]
Add a synchronous unmount amq rpc that will wait for the remote
filesystem to be unmounted, or return an error. Enabled by amq -uu
Erez Zadok [Mon, 12 Jan 2009 04:30:26 +0000 (23:30 -0500)]
am-utils: update copyrights for 2008-2009
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 11 Jan 2009 22:52:46 +0000 (22:52 +0000)]
* amd/ops_udf.c: don't define functions/variables which may not be
used.
* amd/ops_tmpfs.c (mount_tmpfs): force gcc not to complain about
unused variables.
* config.guess.long: properly support Fedora Core.
Christos Zoulas [Fri, 9 Jan 2009 19:10:35 +0000 (19:10 +0000)]
mention today's fixes.
Christos Zoulas [Fri, 9 Jan 2009 19:09:03 +0000 (19:09 +0000)]
Treat an empty sublink as an unset sublink.
Christos Zoulas [Fri, 9 Jan 2009 19:03:51 +0000 (19:03 +0000)]
Add 2 more members on linux nfs_args, pseudoflavor and context. Explicitly
initialize them to 0, otherwise on 2.6.26.x mount returns EINVAL if
context is not 0.
Christos Zoulas [Tue, 6 Jan 2009 22:45:21 +0000 (22:45 +0000)]
add documentation about cdf mounts.
Christos Zoulas [Tue, 6 Jan 2009 21:14:18 +0000 (21:14 +0000)]
fix udf mounts for linux.
Christos Zoulas [Tue, 6 Jan 2009 20:39:06 +0000 (20:39 +0000)]
Bring back our local ylwrap fix.
Christos Zoulas [Tue, 6 Jan 2009 19:13:23 +0000 (19:13 +0000)]
add the rest of the udf glue.
Christos Zoulas [Tue, 6 Jan 2009 19:08:54 +0000 (19:08 +0000)]
add udf glue.
Christos Zoulas [Tue, 6 Jan 2009 19:07:24 +0000 (19:07 +0000)]
recognize new NetBSD nfs filehandle.
Christos Zoulas [Tue, 6 Jan 2009 18:55:04 +0000 (18:55 +0000)]
mention new auto-stuff.
Christos Zoulas [Tue, 6 Jan 2009 18:52:36 +0000 (18:52 +0000)]
Regen with newer versions of all the tools.
Christos Zoulas [Tue, 6 Jan 2009 18:50:52 +0000 (18:50 +0000)]
Since autoconf generates INSTALL now, so we move our local info here.
Christos Zoulas [Sun, 4 Jan 2009 22:54:56 +0000 (22:54 +0000)]
new autoconf wants _cv_ in cached variables.
Christos Zoulas [Sun, 4 Jan 2009 22:54:40 +0000 (22:54 +0000)]
comment out the message, because it breaks with gm4 > 1.2.10
Christos Zoulas [Fri, 2 Jan 2009 16:33:34 +0000 (16:33 +0000)]
add the cdfs options here.
Christos Zoulas [Fri, 2 Jan 2009 15:59:10 +0000 (15:59 +0000)]
enable more options for cd9660 filesystems (from NetBSD)
Christos Zoulas [Wed, 3 Dec 2008 18:17:20 +0000 (18:17 +0000)]
multiple server ldap patch.
Christos Zoulas [Fri, 19 Sep 2008 21:34:50 +0000 (21:34 +0000)]
work done today.
Christos Zoulas [Fri, 19 Sep 2008 21:33:52 +0000 (21:33 +0000)]
netbsd is int too.
Christos Zoulas [Fri, 19 Sep 2008 21:32:38 +0000 (21:32 +0000)]
When using flex -P<prefix> instead of ylwrap all the yy symbols get #defined
to the prefixed ones in the begining of the c file. This breaks the #ifndef
yywrap test. We detect this by checking also yylex and if that is defined
too we declare and define yywrap.
Christos Zoulas [Fri, 19 Sep 2008 21:30:19 +0000 (21:30 +0000)]
correct prototypes
Christos Zoulas [Fri, 19 Sep 2008 17:56:58 +0000 (17:56 +0000)]
Don't use __GNUC__ but the proper HAVE_ variables.
Christos Zoulas [Wed, 17 Sep 2008 23:24:06 +0000 (23:24 +0000)]
fix reversed ifdef, thanks Ion!
Christos Zoulas [Wed, 17 Sep 2008 21:59:31 +0000 (21:59 +0000)]
fix linux tmpfs (make it compile only)
Christos Zoulas [Wed, 17 Sep 2008 21:59:18 +0000 (21:59 +0000)]
mention yylwrap lossage
Christos Zoulas [Wed, 17 Sep 2008 21:57:06 +0000 (21:57 +0000)]
deal with crap automake versions < 1.9 that do not run ylwrap on a single
yacc or lex file. Any better way to do this?
Christos Zoulas [Wed, 17 Sep 2008 20:55:17 +0000 (20:55 +0000)]
hook in tmpfs
Christos Zoulas [Wed, 17 Sep 2008 20:30:15 +0000 (20:30 +0000)]
today's changes
Christos Zoulas [Wed, 17 Sep 2008 20:27:50 +0000 (20:27 +0000)]
sort man pages by section and then alphabetically as is the norm
Christos Zoulas [Wed, 17 Sep 2008 20:25:58 +0000 (20:25 +0000)]
add missing field for NetBSD
Christos Zoulas [Wed, 17 Sep 2008 20:25:33 +0000 (20:25 +0000)]
add missing forward declarations
Christos Zoulas [Wed, 17 Sep 2008 20:24:59 +0000 (20:24 +0000)]
use sizeof var instead of constant
Christos Zoulas [Wed, 17 Sep 2008 20:23:59 +0000 (20:23 +0000)]
now that yy renaming works, fix the remaining callers
Christos Zoulas [Wed, 17 Sep 2008 20:22:53 +0000 (20:22 +0000)]
fix yyerror declaration and definition
Christos Zoulas [Wed, 17 Sep 2008 20:21:45 +0000 (20:21 +0000)]
use sizeof var instead of constant.
Christos Zoulas [Wed, 17 Sep 2008 20:20:55 +0000 (20:20 +0000)]
Felt free to implement this
Christos Zoulas [Wed, 17 Sep 2008 20:20:06 +0000 (20:20 +0000)]
NetBSD calls its ufs ffs.
Christos Zoulas [Wed, 17 Sep 2008 20:19:34 +0000 (20:19 +0000)]
typo, getpwd -> getcwd
Christos Zoulas [Wed, 17 Sep 2008 20:19:07 +0000 (20:19 +0000)]
newer NetBSD uses statvfs (perhaps handle this with autoconf?)
Christos Zoulas [Wed, 17 Sep 2008 20:18:08 +0000 (20:18 +0000)]
there is no section 8C
Christos Zoulas [Wed, 17 Sep 2008 20:17:35 +0000 (20:17 +0000)]
handle newer netbsd using statvfs
Christos Zoulas [Wed, 17 Sep 2008 20:16:50 +0000 (20:16 +0000)]
add missing forward declaration
Christos Zoulas [Wed, 17 Sep 2008 20:16:21 +0000 (20:16 +0000)]
avoid possible null pointer deref (coverity)
Christos Zoulas [Wed, 17 Sep 2008 20:14:56 +0000 (20:14 +0000)]
* more portable endian detection support
* add tmpfs and efs support
Christos Zoulas [Wed, 17 Sep 2008 20:14:25 +0000 (20:14 +0000)]
handle tmpfs and efs
Christos Zoulas [Wed, 17 Sep 2008 20:14:02 +0000 (20:14 +0000)]
strlen returns size_t not int
Christos Zoulas [Wed, 17 Sep 2008 20:13:30 +0000 (20:13 +0000)]
add options log, noatime, nocoredump, nodevmtime, softdep, symperm, union
Christos Zoulas [Wed, 17 Sep 2008 20:12:59 +0000 (20:12 +0000)]
NetBSD efs and tmpfs support
Christos Zoulas [Wed, 17 Sep 2008 20:12:07 +0000 (20:12 +0000)]
new autoconf tools bitch about # serial in the middle of the file, so
add an extra #.
Christos Zoulas [Wed, 17 Sep 2008 20:11:24 +0000 (20:11 +0000)]
NetBSD's new mount system call needs the size of the opaque filesystem
specific structure, but passing 0 for now works. We would need to change
a lot more code to pass the size from the fs-specific calls, so for now punt.
Christos Zoulas [Wed, 17 Sep 2008 20:10:29 +0000 (20:10 +0000)]
recvfrom takes socklen_t * on NetBSD
Christos Zoulas [Wed, 17 Sep 2008 20:09:47 +0000 (20:09 +0000)]
Most recent kernels have trouble with trying to parse the pid hostname
and do locking. What before was a silent failure, now there is a warning
printed and the mount is rejected. This is the simplest fix:
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479884)
Christos Zoulas [Wed, 17 Sep 2008 20:07:20 +0000 (20:07 +0000)]
avoid possible null pointer deref (coverity)
Christos Zoulas [Wed, 17 Sep 2008 20:06:28 +0000 (20:06 +0000)]
NetBSD's new mount system call needs the size of the opaque filesystem
specific structure, but passing 0 for now works. We would need to change
a lot more code to pass the size from the fs-specific calls, so for now
punt.