]> git.decadent.org.uk Git - nfs-utils.git/log
nfs-utils.git
13 years agoImported Debian patch 1.0.9-11 debian/1%1.0.9-11
Steinar H. Gunderson [Wed, 30 Aug 2006 23:53:45 +0000 (01:53 +0200)]
Imported Debian patch 1.0.9-11

13 years agoImported Debian patch 1.0.9-10 debian/1%1.0.9-10
Steinar H. Gunderson [Sat, 26 Aug 2006 01:29:09 +0000 (03:29 +0200)]
Imported Debian patch 1.0.9-10

13 years agoImported Debian patch 1.0.9-9 debian/1%1.0.9-9
Anibal Monsalve Salazar [Fri, 25 Aug 2006 01:45:07 +0000 (11:45 +1000)]
Imported Debian patch 1.0.9-9

13 years agoImported Debian patch 1.0.9-8 debian/1%1.0.9-8
Steinar H. Gunderson [Thu, 17 Aug 2006 15:24:11 +0000 (17:24 +0200)]
Imported Debian patch 1.0.9-8

13 years agoImported Debian patch 1.0.9-7 debian/1%1.0.9-7
Steinar H. Gunderson [Sat, 12 Aug 2006 17:55:35 +0000 (19:55 +0200)]
Imported Debian patch 1.0.9-7

13 years agoImported Debian patch 1.0.9-6 debian/1%1.0.9-6
Steinar H. Gunderson [Mon, 7 Aug 2006 19:27:37 +0000 (21:27 +0200)]
Imported Debian patch 1.0.9-6

13 years agoImported Debian patch 1.0.9-5 debian/1%1.0.9-5
Steinar H. Gunderson [Wed, 19 Jul 2006 12:06:33 +0000 (14:06 +0200)]
Imported Debian patch 1.0.9-5

13 years agoImported Debian patch 1.0.9-4 debian/1%1.0.9-4
Steinar H. Gunderson [Sat, 15 Jul 2006 23:59:13 +0000 (01:59 +0200)]
Imported Debian patch 1.0.9-4

13 years agoImported Debian patch 1.0.9-3 debian/1%1.0.9-3
Steinar H. Gunderson [Thu, 13 Jul 2006 19:39:08 +0000 (21:39 +0200)]
Imported Debian patch 1.0.9-3

13 years agoImported Debian patch 1.0.9-2 debian/1%1.0.9-2
Steinar H. Gunderson [Sat, 8 Jul 2006 22:16:54 +0000 (00:16 +0200)]
Imported Debian patch 1.0.9-2

13 years agoImported Debian patch 1.0.9-1 debian/1%1.0.9-1
Anibal Monsalve Salazar [Sat, 8 Jul 2006 04:26:40 +0000 (14:26 +1000)]
Imported Debian patch 1.0.9-1

13 years agoMerge branch 'upstream'
Ben Hutchings [Wed, 14 Jul 2010 01:35:24 +0000 (02:35 +0100)]
Merge branch 'upstream'

Conflicts:
Makefile.in
configure
linux-nfs/Makefile.in
support/Makefile.in
support/export/Makefile.in
support/include/Makefile.in
support/include/config.h.in
support/include/nfs/Makefile.in
support/include/rpcsvc/Makefile.in
support/include/sys/Makefile.in
support/include/sys/fs/Makefile.in
support/misc/Makefile.in
support/nfs/Makefile.in
support/nfs/clients.c
tools/Makefile.in
tools/getiversion/Makefile.in
tools/getkversion/Makefile.in
tools/locktest/Makefile.in
tools/nlmtest/Makefile.in
tools/rpcdebug/Makefile.in
tools/rpcgen/Makefile.in
utils/Makefile.in
utils/exportfs/Makefile.in
utils/gssd/Makefile.am
utils/gssd/Makefile.in
utils/gssd/svcgssd_proc.c
utils/idmapd/Makefile.in
utils/lockd/Makefile.in
utils/mount/Makefile.in
utils/mountd/Makefile.in
utils/nfsd/Makefile.in
utils/nfsstat/Makefile.in
utils/nhfsstone/Makefile.in
utils/rquotad/Makefile.in
utils/showmount/Makefile.in
utils/statd/Makefile.in

13 years agoImported Upstream version 1.0.9 upstream/1.0.9
Ben Hutchings [Wed, 14 Jul 2010 01:33:27 +0000 (02:33 +0100)]
Imported Upstream version 1.0.9

13 years agoImported Debian patch 1.0.8+1.0.9pre1-4 debian/1%1.0.8+1.0.9pre1-4
Steinar H. Gunderson [Sat, 8 Jul 2006 14:43:38 +0000 (16:43 +0200)]
Imported Debian patch 1.0.8+1.0.9pre1-4

13 years agoImported Debian patch 1.0.8+1.0.9pre1-3 debian/1%1.0.8+1.0.9pre1-3
Steinar H. Gunderson [Fri, 7 Jul 2006 19:12:06 +0000 (21:12 +0200)]
Imported Debian patch 1.0.8+1.0.9pre1-3

13 years agoImported Debian patch 1.0.8+1.0.9pre1-2 debian/1%1.0.8+1.0.9pre1-2
Steinar H. Gunderson [Thu, 6 Jul 2006 17:37:58 +0000 (19:37 +0200)]
Imported Debian patch 1.0.8+1.0.9pre1-2

13 years agoImported Debian patch 1.0.8+1.0.9pre1-1 debian/1%1.0.8+1.0.9pre1-1
Steinar H. Gunderson [Tue, 4 Jul 2006 16:55:51 +0000 (18:55 +0200)]
Imported Debian patch 1.0.8+1.0.9pre1-1

13 years agoMerge branch 'upstream'
Ben Hutchings [Wed, 14 Jul 2010 01:32:49 +0000 (02:32 +0100)]
Merge branch 'upstream'

Conflicts:
configure
debian/changelog
debian/control
debian/etc.exports
debian/nfs-common.default
debian/nfs-common.dirs
debian/nfs-common.init
debian/nfs-common.install
debian/nfs-common.postinst
debian/nfs-common.postrm
debian/nfs-common.prerm
debian/nfs-kernel-server.default
debian/nfs-kernel-server.dirs
debian/nfs-kernel-server.init
debian/nfs-kernel-server.postinst
debian/nfs-kernel-server.postrm
debian/nfs-kernel-server.prerm
debian/rules
support/nfs/exports.c
utils/mountd/mountd.c
utils/mountd/mountd.man

13 years agoImported Upstream version 1.0.8+1.0.9pre1 upstream/1.0.8+1.0.9pre1
Ben Hutchings [Wed, 14 Jul 2010 01:30:42 +0000 (02:30 +0100)]
Imported Upstream version 1.0.8+1.0.9pre1

13 years agoImported Debian patch 1.0.8-10 debian/1%1.0.8-10
Anibal Monsalve Salazar [Sat, 1 Jul 2006 23:53:16 +0000 (09:53 +1000)]
Imported Debian patch 1.0.8-10

13 years agoImported Debian patch 1.0.8-9 debian/1%1.0.8-9
Anibal Monsalve Salazar [Sat, 1 Jul 2006 12:30:11 +0000 (22:30 +1000)]
Imported Debian patch 1.0.8-9

13 years agoImported Debian patch 1.0.8-8 debian/1%1.0.8-8
Steinar H. Gunderson [Wed, 14 Jun 2006 08:47:23 +0000 (10:47 +0200)]
Imported Debian patch 1.0.8-8

13 years agoImported Debian patch 1.0.8-7 debian/1%1.0.8-7
Steinar H. Gunderson [Thu, 8 Jun 2006 15:31:28 +0000 (17:31 +0200)]
Imported Debian patch 1.0.8-7

13 years agoImported Debian patch 1.0.8-6 debian/1%1.0.8-6
Steinar H. Gunderson [Wed, 7 Jun 2006 21:30:15 +0000 (23:30 +0200)]
Imported Debian patch 1.0.8-6

13 years agoImported Debian patch 1.0.8-5 debian/1%1.0.8-5
Steinar H. Gunderson [Tue, 6 Jun 2006 23:13:28 +0000 (01:13 +0200)]
Imported Debian patch 1.0.8-5

13 years agoImported Debian patch 1.0.8-4 debian/1%1.0.8-4
Steinar H. Gunderson [Tue, 6 Jun 2006 09:59:28 +0000 (11:59 +0200)]
Imported Debian patch 1.0.8-4

13 years agoImported Debian patch 1.0.8-3 debian/1%1.0.8-3
Steinar H. Gunderson [Sat, 3 Jun 2006 09:00:14 +0000 (11:00 +0200)]
Imported Debian patch 1.0.8-3

13 years agoImported Debian patch 1.0.8-2 debian/1%1.0.8-2
Anibal Monsalve Salazar [Fri, 2 Jun 2006 09:08:11 +0000 (19:08 +1000)]
Imported Debian patch 1.0.8-2

13 years agoImported Debian patch 1.0.8-1 debian/1%1.0.8-1
Steinar H. Gunderson [Wed, 31 May 2006 23:59:39 +0000 (01:59 +0200)]
Imported Debian patch 1.0.8-1

13 years agoMerge branch 'upstream'
Ben Hutchings [Wed, 14 Jul 2010 01:29:37 +0000 (02:29 +0100)]
Merge branch 'upstream'

Conflicts:
config.guess
config.sub
configure
debian/changelog
debian/control
debian/etc.exports
debian/nfs-common.default
debian/nfs-common.dirs
debian/nfs-common.init
debian/nfs-common.install
debian/nfs-common.postinst
debian/nfs-common.postrm
debian/nfs-common.prerm
debian/nfs-kernel-server.default
debian/nfs-kernel-server.dirs
debian/nfs-kernel-server.init
debian/nfs-kernel-server.postinst
debian/nfs-kernel-server.postrm
debian/nfs-kernel-server.prerm
debian/rules
utils/gssd/Makefile
utils/svcgssd/Makefile

13 years agoImported Upstream version 1.0.8 upstream/1.0.8
Ben Hutchings [Wed, 14 Jul 2010 01:28:28 +0000 (02:28 +0100)]
Imported Upstream version 1.0.8

13 years agoImported Debian patch 1.0.7-19 debian/1%1.0.7-19
Steinar H. Gunderson [Sat, 27 May 2006 10:54:50 +0000 (12:54 +0200)]
Imported Debian patch 1.0.7-19

13 years agoImported Debian patch 1.0.7-18 debian/1%1.0.7-18
Steinar H. Gunderson [Sun, 21 May 2006 23:44:33 +0000 (01:44 +0200)]
Imported Debian patch 1.0.7-18

13 years agoImported Debian patch 1.0.7-17 debian/1%1.0.7-17
Steinar H. Gunderson [Sun, 14 May 2006 16:22:19 +0000 (18:22 +0200)]
Imported Debian patch 1.0.7-17

13 years agoImported Debian patch 1.0.7-16 debian/1%1.0.7-16
Steinar H. Gunderson [Sat, 13 May 2006 14:06:08 +0000 (16:06 +0200)]
Imported Debian patch 1.0.7-16

13 years agoImported Debian patch 1.0.7-15 debian/1%1.0.7-15
Steinar H. Gunderson [Thu, 11 May 2006 10:42:13 +0000 (12:42 +0200)]
Imported Debian patch 1.0.7-15

13 years agoImported Debian patch 1.0.7-14 debian/1%1.0.7-14
Steinar H. Gunderson [Wed, 10 May 2006 20:00:59 +0000 (22:00 +0200)]
Imported Debian patch 1.0.7-14

13 years agoImported Debian patch 1.0.7-13 debian/1%1.0.7-13
Steinar H. Gunderson [Fri, 5 May 2006 23:50:10 +0000 (01:50 +0200)]
Imported Debian patch 1.0.7-13

13 years agoImported Debian patch 1.0.7-12 debian/1%1.0.7-12
Steinar H. Gunderson [Wed, 3 May 2006 19:27:18 +0000 (21:27 +0200)]
Imported Debian patch 1.0.7-12

13 years agoImported Debian patch 1.0.7-11 debian/1%1.0.7-11
Steinar H. Gunderson [Wed, 3 May 2006 17:51:17 +0000 (19:51 +0200)]
Imported Debian patch 1.0.7-11

13 years agoImported Debian patch 1.0.7-10 debian/1%1.0.7-10
Steinar H. Gunderson [Wed, 26 Apr 2006 22:32:27 +0000 (00:32 +0200)]
Imported Debian patch 1.0.7-10

13 years agoImported Debian patch 1.0.7-9 debian/1%1.0.7-9
Steinar H. Gunderson [Thu, 6 Apr 2006 11:31:48 +0000 (13:31 +0200)]
Imported Debian patch 1.0.7-9

13 years agoImported Debian patch 1.0.7-8 debian/1%1.0.7-8
Steinar H. Gunderson [Wed, 5 Apr 2006 20:54:09 +0000 (22:54 +0200)]
Imported Debian patch 1.0.7-8

13 years agoImported Debian patch 1.0.7-7 debian/1%1.0.7-7
Steinar H. Gunderson [Wed, 5 Apr 2006 16:15:20 +0000 (18:15 +0200)]
Imported Debian patch 1.0.7-7

13 years agoImported Debian patch 1.0.7-6 debian/1%1.0.7-6
Steinar H. Gunderson [Sat, 1 Apr 2006 00:46:53 +0000 (02:46 +0200)]
Imported Debian patch 1.0.7-6

13 years agoImported Debian patch 1.0.7-5 debian/1%1.0.7-5
Steinar H. Gunderson [Tue, 28 Mar 2006 00:57:23 +0000 (02:57 +0200)]
Imported Debian patch 1.0.7-5

13 years agoImported Debian patch 1.0.7-4 debian/1%1.0.7-4
Anibal Monsalve Salazar [Mon, 27 Mar 2006 02:22:51 +0000 (13:22 +1100)]
Imported Debian patch 1.0.7-4

13 years agoImported Debian patch 1.0.7-3 debian/1%1.0.7-3
Anibal Monsalve Salazar [Fri, 8 Apr 2005 01:25:17 +0000 (11:25 +1000)]
Imported Debian patch 1.0.7-3

13 years agoMerge commit 'debian/1.0.7-2'
Ben Hutchings [Tue, 13 Jul 2010 03:03:30 +0000 (04:03 +0100)]
Merge commit 'debian/1.0.7-2'

Conflicts:
debian/changelog

13 years agoImported Debian patch 1.0.6-3.1 debian/1%1.0.6-3.1
Joey Hess [Wed, 5 Jan 2005 12:39:41 +0000 (07:39 -0500)]
Imported Debian patch 1.0.6-3.1

13 years agoMerge commit 'debian/1.0.6-3'
Ben Hutchings [Tue, 13 Jul 2010 02:51:44 +0000 (03:51 +0100)]
Merge commit 'debian/1.0.6-3'

13 years agoImported Upstream version 1.0.6
Ben Hutchings [Tue, 13 Jul 2010 02:51:20 +0000 (03:51 +0100)]
Imported Upstream version 1.0.6

13 years agonfs-iostat.py: divide by zero with fresh mount nfs-utils-1-2-3-rc4
Kevin Constantine [Tue, 22 Jun 2010 21:43:19 +0000 (17:43 -0400)]
nfs-iostat.py: divide by zero with fresh mount

When an export is freshly mounted, /proc/self/mountstats displays age = 0.
This causes nfs-iostat.py to divide by zero throwing an error.  When we
have age = 0, other stats are greater than 0, so we'll set age = 1 and
print the relevant stats.

Signed-off-by: Kevin Constantine <kevin.constantine@disneyanimation.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Remove unused hostent-based DNS helper functions
Chuck Lever [Tue, 22 Jun 2010 17:31:38 +0000 (13:31 -0400)]
libexport.a: Remove unused hostent-based DNS helper functions

Clean up:  Get rid of hostent-based DNS helper functions in
libexport.a that have been replaced by addrinfo-based DNS helpers.

None of the original code remains, so replace the copyright notice as
well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Replace matchhostname()
Chuck Lever [Tue, 22 Jun 2010 17:06:40 +0000 (13:06 -0400)]
libexport.a: Replace matchhostname()

So that exportfs can eventually support IPv6 addresses, copy statd's
getaddrinfo(3)-based matchhostname to exportfs, with adjustments for
dealing with export wildcards and netgroups.  Until exportfs has full
IPv6 support, however, we want to ensure that IPv6 addresses continue
to remain blocked in the address comparison code used by exportfs.  At
a later point we'll replace much of this with the generic functions
in sockaddr.h.

Since it contains special logic for handling wildcard and netgroups,
this function is specialized for exportfs, and does not belong in
one of the shared libraries.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Add documenting comments
Chuck Lever [Tue, 22 Jun 2010 16:51:42 +0000 (12:51 -0400)]
libexport.a: Add documenting comments

Clean up.  Add a few additional documenting comments for globally
visible functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Make export_add() static
Chuck Lever [Tue, 22 Jun 2010 16:44:44 +0000 (12:44 -0400)]
libexport.a: Make export_add() static

Clean up: export_add() is not called from outside of export.c, so make
it a static helper.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Make export_read() return void
Chuck Lever [Tue, 22 Jun 2010 16:43:55 +0000 (12:43 -0400)]
libexport.a: Make export_read() return void

Clean up: export_read()'s return value is always zero, and its only
caller never checks it.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agomountd: Replace "struct hostent" with "struct addrinfo"
Chuck Lever [Tue, 22 Jun 2010 16:43:01 +0000 (12:43 -0400)]
mountd: Replace "struct hostent" with "struct addrinfo"

struct hostent can store either IPv4 or IPv6 addresses, but it can't
store both address families concurrently for the same host.  Neither
can hostent deal with parts of socket addresses that are outside of
the sin{,6}_addr field.

Replace the use of "struct hostent" everywhere in libexport.a, mountd,
and exportfs with "struct addrinfo".  This is a large change, but
there are so many strong dependencies on struct hostent that this
can't easily be broken into smaller pieces.

One benefit of this change is that hostent_dup() is no longer
required, since the results of getaddrinfo(3) are already dynamically
allocated.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agoexportfs: Add a common exit label in exportfs()
Chuck Lever [Tue, 22 Jun 2010 16:40:27 +0000 (12:40 -0400)]
exportfs: Add a common exit label in exportfs()

Clean up: Reduce code duplication by introducing a goto label for
freeing hp and exiting.  This will make replacing "struct hostent *"
with "struct addrinfo *" more straightforward in this code.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Add helpers to manage DNS lookups
Chuck Lever [Tue, 22 Jun 2010 14:41:03 +0000 (10:41 -0400)]
libexport.a: Add helpers to manage DNS lookups

Introduce DNS query helpers based on getaddrinfo(3) and
getnameinfo(3).  These will eventually replace the existing
hostent-based functions in support/export/hostname.c.

Put some of these new helpers to immediate use, where convenient.

As they are part of libexport.a, I've added the forward declarations
for these new functions in exportfs.h rather than misc.h, where the
hostent-based forward declarations are currently.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agoImprove support for exporting btrfs subvolumes
NeilBrown [Tue, 22 Jun 2010 14:37:25 +0000 (10:37 -0400)]
Improve support for exporting btrfs subvolumes

If you export two subvolumes of a btrfs filesystem, they will both be
given the same uuid so lookups will be confused.
blkid cannot differentiate the two, so we must use the fsid from
statfs64 to identify the filesystem.

We cannot tell if blkid or statfs is best without knowing internal
details of the filesystem in question, so we need to encode specific
knowledge of btrfs in mountd.  This is unfortunate.

To ensure smooth handling of this and possible future changes in uuid
generation, we add infrastructure for multiple different uuids to be
recognised on old filehandles, but only the preferred on is used on
new filehandles.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agomount.nfs: silently fails when the network protocol is not found
Steve Dickson [Thu, 3 Jun 2010 12:53:22 +0000 (08:53 -0400)]
mount.nfs: silently fails when the network protocol is not found

mount.nfs should display some type of error diagnostics when
the network protocol can not be determined.

Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agomount: silently fails when bad option values are given
Steve Dickson [Thu, 3 Jun 2010 12:32:56 +0000 (08:32 -0400)]
mount: silently fails when bad option values are given

mount.nfs should not only fail when an invalid option values
are supplied (as it does), it should also print a diagnostic
message identifying the problem

Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agonfsiostat.man: Add linebreak before --version option
Kevin Constantine [Wed, 2 Jun 2010 12:34:14 +0000 (08:34 -0400)]
nfsiostat.man: Add linebreak before --version option

The nfsiostat man file was missing a linebreak before the --verbose option

Signed-off-by: Kevin Constantine <kevin.constantine@disneyanimation.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agomountd: Convert colons in IPv6 presentation addresses tosemicolons
Chuck Lever [Mon, 24 May 2010 10:02:22 +0000 (06:02 -0400)]
mountd: Convert colons in IPv6 presentation addresses tosemicolons

The /var/lib/nfs/rmtab file delineates fields in each of its lines
with a ":".  The first field contains the IP address of a client, in
presentation format.  IPv6 presentation format addresses contain
colons, which screws up the field delineation of rmtab.

Use a simple simple scheme to convert the colons in incoming client
names to some other character, and then convert them back when the
rmtab file is read.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agolibexport.a: Refactor rmtab_read()
Chuck Lever [Mon, 24 May 2010 10:01:22 +0000 (06:01 -0400)]
libexport.a: Refactor rmtab_read()

Clean up: Make it easier to add IPv6 support by refactoring part of
rmtab_read() into a helper function.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
13 years agoMountd listens on 2 different versions for NFSv2 (MOUNTv1 and MOUNTv2)
NeilBrown [Mon, 24 May 2010 09:55:26 +0000 (05:55 -0400)]
Mountd listens on 2 different versions for NFSv2 (MOUNTv1 and MOUNTv2)
and one for NFSv3 (MOUNTv3)

When --no-nfs-version requests an NFS version to be disabled, the
code actually disabled the MOUNT version. This works is several cases,
but requires --no-nfs-version 1 to completely disable NFSv2, which
is wrong.

So if we do disable 1, 2, and 3. mountd complain and won't run, it
is not possible to run just v4 - i.e. not listening for MOUNT requests
at all (as v4 doesn't need them).

So change the handling of "--no-nfs-version 2" it disable MOUNTv1 as
well as
MOUNTv2, and allow mountd to continue running as long as one of
NFSv2 NFSv3 NFSv4 is enabled.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agomountd/exportfs: Make m_addrlist field a nfs_sockaddr nfs-utils-1-2-3-rc3
Chuck Lever [Wed, 5 May 2010 19:41:07 +0000 (15:41 -0400)]
mountd/exportfs: Make m_addrlist field a nfs_sockaddr

To store non-AF_INET addresses in the nfs_client structure, we need to
use more than in_addr for the m_addrlist field.  Make m_addrlist
larger, then add a few helper functions to handle type casting and
array indexing cleanly.

We could treat the nfs_client address list as if all the addresses
in the list were the same family.  This might work for MCL_SUBNETWORK
type nfs_clients.  However, during the transition to IPv6, most hosts
will have at least one IPv4 and one IPv6 address.  For MCL_FQDN, I
think we need to have the ability to store addresses from both
families in one nfs_client.

Additionally, IPv6 scope IDs are not part of struct sin6_addr.  To
support link-local IPv6 addresses and the like, a scope ID must be
stored.

Thus, each slot in the address list needs to be capable of storing an
entire socket address, and not simply the network address part.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Clean up client_add()
Chuck Lever [Wed, 5 May 2010 18:42:01 +0000 (14:42 -0400)]
libexport.a: Clean up client_add()

Clean up: client_add()'s current callers never set unknown m_type
values, so the m_type check is unnecessary.

All of client_add()'s callers are in the same source file where it is
defined, so make it a static helper function.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Refactor client_init()
Chuck Lever [Wed, 5 May 2010 18:37:13 +0000 (14:37 -0400)]
libexport.a: Refactor client_init()

Clean up:  Move subnet hostname parsing logic out of client_init() to
make it simpler to introduce IPv6 support.

Make client_init() a helper, since it's already static.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoMake capabilities support optional
Mike Frysinger [Fri, 23 Apr 2010 16:22:53 +0000 (12:22 -0400)]
Make capabilities support optional

The new code using libcap is quite minor, so rather than always reqiure
libcap support, make it a normal --enable type flag.  Current default
behavior is retained -- if libcap is found, it is enabled, else it is
disabled like every nfs-utils version in the past.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoset +x on autogen.sh
Mike Frysinger [Fri, 23 Apr 2010 16:18:27 +0000 (12:18 -0400)]
set +x on autogen.sh

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Allow malloc(3) failures in client_lookup() and friends
Chuck Lever [Fri, 23 Apr 2010 16:09:35 +0000 (12:09 -0400)]
libexport.a: Allow malloc(3) failures in client_lookup() and friends

Clean up: Use malloc(3) instead of xmalloc() in client_lookup() and
client_dup(), ensuring that a failed memory allocation here doesn't
cause our process to exit suddenly.

Allocation of nfs_client records and the m_hostname string are now
consistently handled with malloc(3), calloc(3), strdup(3), and
free(3).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Allow m_hostname allocation to fail instead of exit
Chuck Lever [Fri, 23 Apr 2010 16:08:49 +0000 (12:08 -0400)]
libexport.a: Allow m_hostname allocation to fail instead of exit

Clean up: Replace xstrdup() with strdup(3) in client_init(), to
prevent the process from exiting if the memory allocation fails.

Note that both of client_init()'s callers set m_hostname equal to NULL
before calling, thus the extra free(3) at the top of client_init() is
unneeded.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Allow client_init() to fail instead of exit
Chuck Lever [Fri, 23 Apr 2010 16:02:34 +0000 (12:02 -0400)]
libexport.a: Allow client_init() to fail instead of exit

client_init()'s current callers can now deal correctly with a failure.
Get rid of code that can cause our process to exit in client_init(),
if address mask parsing or memory allocation fails.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Add client_free()
Chuck Lever [Fri, 23 Apr 2010 16:00:28 +0000 (12:00 -0400)]
libexport.a: Add client_free()

Clean up: Introduce a helper to free a nfs_client record.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoAdd in autoconf support for mountstats and nfsiostats nfs-utils-1-2-3-rc2
Steve Dickson [Fri, 16 Apr 2010 14:56:29 +0000 (10:56 -0400)]
Add in autoconf support for mountstats and nfsiostats

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoIntroduce man page for the nfsiostats command
Steve Dickson [Fri, 16 Apr 2010 14:49:10 +0000 (10:49 -0400)]
Introduce man page for the nfsiostats command

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoIntroduce man page for the mountstats command
Steve Dickson [Fri, 16 Apr 2010 14:46:41 +0000 (10:46 -0400)]
Introduce man page for the mountstats command

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoRemoved some miscellaneous warnings in the new gssd code.
Steve Dickson [Fri, 16 Apr 2010 17:31:57 +0000 (13:31 -0400)]
Removed some miscellaneous warnings in the new gssd code.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoAdd support for non-DES encryption types.
Kevin Coffman [Mon, 12 Apr 2010 21:13:25 +0000 (17:13 -0400)]
Add support for non-DES encryption types.

Sends a new format of context information to the kernel.
(Requires kernel support to do anything useful.)

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoTry to use kernel function to determine supported Kerberos enctypes.
Kevin Coffman [Thu, 15 Apr 2010 12:32:20 +0000 (08:32 -0400)]
Try to use kernel function to determine supported Kerberos enctypes.

This patch replaces a hard-coded list with a function to obtain
the Kerberos encryption types that the kernel's rpcsec_gss code
can support.  Defaults to old behavior if kernel does not supply
information.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agogssd: move function limit_krb5_enctypes into the exported functions area
Kevin Coffman [Mon, 12 Apr 2010 21:06:30 +0000 (17:06 -0400)]
gssd: move function limit_krb5_enctypes into the exported functions area

cleanup: Move function limit_krb5_enctypes() from the section
containing static functions into the section containing
externally visible functions.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: export_find() should handle address parsing errors
Chuck Lever [Fri, 16 Apr 2010 17:03:20 +0000 (13:03 -0400)]
libexport.a: export_find() should handle address parsing errors

An address mask parsing error can cause client_init(), and therefore
client_dup(), to make our process exit suddenly.  Soon we want to add
more complex address parsing in client_init(), so we need this
interface to be a little more robust.

Since export_find() can return NULL in some cases, it can handle NULL
returns from its subroutines if an address parsing error occurs, or if
memory is exhausted.  Allow for client_dup() to return NULL instead of
exiting sideways.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Add export_free()
Chuck Lever [Fri, 16 Apr 2010 17:02:15 +0000 (13:02 -0400)]
libexport.a: Add export_free()

Clean up: Introduce a helper to free an nfs_export record.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Add helper for populating m_addrlist[]
Chuck Lever [Thu, 15 Apr 2010 12:59:18 +0000 (08:59 -0400)]
libexport.a: Add helper for populating m_addrlist[]

Clean up: Move common code that populates an nfs_client record's
m_addrlist to a helper function.  This eliminates a little code
duplication, and makes it simpler to add IPv6 support later.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Reduce code duplication in client_init()
Chuck Lever [Thu, 15 Apr 2010 12:57:29 +0000 (08:57 -0400)]
libexport.a: Reduce code duplication in client_init()

Clean up:  Most cases in client_init() set clp->m_naddr to zero.  Move
it to the common part of the function, and simplify the logic.  This
will make adding IPv6 support here more straightforward.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoset +x on t0001-statd-basic-mon-unmon.sh
Mike Frysinger [Thu, 15 Apr 2010 12:49:28 +0000 (08:49 -0400)]
set +x on t0001-statd-basic-mon-unmon.sh

The test framework tries to exec this script, but it fails because it
lacks the +x bit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: replace xlog(L_FATAL) in client_check()
Chuck Lever [Thu, 8 Apr 2010 15:01:14 +0000 (11:01 -0400)]
libexport.a: replace xlog(L_FATAL) in client_check()

Clean up: Prevent the process from exiting in client_check().  Report
bad m_type values, but return 0.

This removes another site where a mountd or exportfs process can exit
sideways.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Refactor wildcard checking in client_check()
Chuck Lever [Thu, 8 Apr 2010 14:55:02 +0000 (10:55 -0400)]
libexport.a: Refactor wildcard checking in client_check()

Clean up: refactor wildcard logic out of client_check() to make it
easier to introduce IPv6 support.

Match the style used for client_check_{fqdn,subnetwork,netgroup}.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Refactor netgroup checking in client_check()
Chuck Lever [Thu, 8 Apr 2010 14:54:01 +0000 (10:54 -0400)]
libexport.a: Refactor netgroup checking in client_check()

Clean up: refactor netgroup logic out of client_check() to make it
easier to introduce IPv6 support.

 +  Use preferred style of keeping #ifdef out of the middle of
    function definitions.  Squelch compiler warnings for "#ifndef
    HAVE_INNETGR" by using __attribute__((unused)).

 +  Use preferred style of not using curly braces around switch cases.

 +  Match style used for check_{fqdn,subnetwork}.

 +  Clarify comment documenting use of h_aliases

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Remove unused function client_checkaddr()
Chuck Lever [Thu, 8 Apr 2010 14:52:33 +0000 (10:52 -0400)]
libexport.a: Remove unused function client_checkaddr()

Clean up.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Factor SUBNETWORK checking out of check_client()
Chuck Lever [Thu, 8 Apr 2010 14:51:54 +0000 (10:51 -0400)]
libexport.a: Factor SUBNETWORK checking out of check_client()

Clean up:  Factor the MCL_SUBNETWORK case out of check_client() and
client_checkaddr().  This will make it easier to add IPv6 support
eventually.

The logic in the new helper function will get a little more tangled
once IPv6 support is introduced.  Each slot in the clp address list
eventually may contain an address from either address family.

Note that the switch statement in client_checkaddr() is redundant,
since clp->cl_mtype is loop invariant.  This change makes SUBNETWORK
client checking more computationally efficient, at the cost of a few
extra lines of code.

This commit should not change code behavior in any way.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Factor FQDN checking out of check_client()
Chuck Lever [Thu, 8 Apr 2010 14:50:41 +0000 (10:50 -0400)]
libexport.a: Factor FQDN checking out of check_client()

Clean up:  Factor the MCL_FQDN case out of check_client() and
client_checkaddr().  This will make it easier to add IPv6 support
eventually.

The logic in the new helper function will get a little more tangled
once IPv6 support is introduced.  Each slot in the clp address list
eventually may contain an address from either address family.

Note that the switch statement in client_checkaddr() is redundant,
since clp->cl_mtype is loop invariant.  This change makes FQDN client
checking more computationally efficient, at the cost of a few extra
lines of code.

This commit should not change code behavior in any way.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoRemove some warnings that were introduced by commit 6ca440c
Steve Dickson [Thu, 8 Apr 2010 14:43:49 +0000 (10:43 -0400)]
Remove some warnings that were introduced by commit 6ca440c

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: e_fslocdata should be freed with free(3) nfs-utils-1-2-3-rc1
Chuck Lever [Mon, 22 Mar 2010 14:18:00 +0000 (10:18 -0400)]
libexport.a: e_fslocdata should be freed with free(3)

Clean up: Since e_fslocdata is allocated with strdup(3), and not
xstrdup(), it should be freed with free(3), and not xfree().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Fix whitespace damage in support/export/export.c
Chuck Lever [Mon, 22 Mar 2010 14:16:04 +0000 (10:16 -0400)]
libexport.a: Fix whitespace damage in support/export/export.c

Clean up whitespace damage introduced by commit 4cacc965.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Clean up client_compose() and client_member()
Chuck Lever [Mon, 22 Mar 2010 14:13:15 +0000 (10:13 -0400)]
libexport.a: Clean up client_compose() and client_member()

Clean up:  Replace outdated comments, and fix some function
declarations.  Use proper type for a couple of automatic variables.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agolibexport.a: Remove dead code
Chuck Lever [Mon, 22 Mar 2010 14:10:59 +0000 (10:10 -0400)]
libexport.a: Remove dead code

Clean up:  I can't find any call sites for client_find() or
client_match().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>