summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2008-03-26 09:51:27 -0400
committerSteve Dickson <steved@redhat.com>2008-03-26 09:51:27 -0400
commit2cce0cbf10de524e869aa46a5c6996d3ed74917b (patch)
tree5d1181109449622b32818f125e3a776d34a99049
parent65329342f5d66074e2fa31116c7c5aaa47776fcb (diff)
parent3899db6d602901523d6db6e2280c3bffd6c9ed63 (diff)
downloadnfs-utils-pseudo-v4root.tar.gz
Merge git://linux-nfs.org/~steved/nfs-utils-exp into pseudo-v4rootpseudo-v4root
-rw-r--r--README2
-rw-r--r--configure.ac2
-rw-r--r--support/export/rmtab.c2
-rw-r--r--utils/exportfs/exportfs.man20
-rw-r--r--utils/exportfs/exports.man2
-rw-r--r--utils/exportfs/nfsd.man2
-rw-r--r--utils/gssd/gss_util.c5
-rw-r--r--utils/gssd/gssd.h2
-rw-r--r--utils/gssd/gssd.man2
-rw-r--r--utils/gssd/gssd_proc.c2
-rw-r--r--utils/mount/error.c5
-rw-r--r--utils/mount/mount.c9
-rw-r--r--utils/mount/mount.nfs.man3
-rw-r--r--utils/mount/network.c4
-rw-r--r--utils/mount/nfs4mount.c4
-rw-r--r--utils/mount/nfsmount.c19
-rw-r--r--utils/mount/stropts.c4
-rw-r--r--utils/mount/umount.nfs.man3
-rw-r--r--utils/mountd/cache.c2
-rw-r--r--utils/mountd/mountd.c9
-rw-r--r--utils/nfsstat/nfsstat.c2
-rw-r--r--utils/nfsstat/nfsstat.man2
-rw-r--r--utils/showmount/showmount.c4
23 files changed, 73 insertions, 38 deletions
diff --git a/README b/README
index e2196da..e7588cf 100644
--- a/README
+++ b/README
@@ -162,4 +162,4 @@ scripts can be written to work correctly.
Share And Enjoy!
-- the nfs-utils developers
- <nfs@lists.sourceforge.net>
+ <linux-nfs@vger.kernel.org>
diff --git a/configure.ac b/configure.ac
index 68c02f3..6ecbf55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_INIT([linux nfs-utils],[1.1.1],[nfs@lists.sf.net],[nfs-utils])
+AC_INIT([linux nfs-utils],[1.1.2],[linux-nfs@vger.kernel.org],[nfs-utils])
AC_CANONICAL_BUILD([])
AC_CANONICAL_HOST([])
AC_CONFIG_MACRO_DIR(aclocal)
diff --git a/support/export/rmtab.c b/support/export/rmtab.c
index 2a882aa..8f392a7 100644
--- a/support/export/rmtab.c
+++ b/support/export/rmtab.c
@@ -31,7 +31,7 @@ rmtab_read(void)
int htype;
htype = client_gettype(rep->r_client);
- if (htype == MCL_FQDN
+ if (htype == MCL_FQDN || htype == MCL_SUBNETWORK
&& (hp = gethostbyname (rep->r_client))
&& (hp = hostent_dup (hp),
exp = export_allowed (hp, rep->r_path))) {
diff --git a/utils/exportfs/exportfs.man b/utils/exportfs/exportfs.man
index 59789cc..a8fdb05 100644
--- a/utils/exportfs/exportfs.man
+++ b/utils/exportfs/exportfs.man
@@ -22,14 +22,14 @@ The
.B exportfs
command is used to maintain the current table of exported file systems for
NFS. This list is kept in a separate file named
-.BR /var/lib/nfs/xtab
+.BR /var/lib/nfs/etab
which is read by
.B mountd
when a remote host requests access to mount a file tree, and parts of
the list which are active are kept in the kernel's export table.
.P
Normally this
-.B xtab
+.B etab
file is initialized with the list of all file systems named in
.B /etc/exports
by invoking
@@ -59,7 +59,7 @@ In the new mode,
does not give any information to the kernel but only provides it to
.B mountd
through the
-.B /var/lib/nfs/xtab
+.B /var/lib/nfs/etab
file.
.B mountd
will listen to requests from the kernel and will provide information
@@ -69,7 +69,7 @@ In the legacy mode,
any export requests which identify a specific host (rather than a
subnet or netgroup etc) are entered directly into the kernel's export
table as well as being written to
-.BR /var/lib/nfs/xtab .
+.BR /var/lib/nfs/etab .
Further, any mount points listed in
.B /var/lib/nfs/rmtab
which match a non host-specific export request will cause an
@@ -93,8 +93,8 @@ file, so that only default options and options given on the command
line are used.
.TP
.B -r
-Reexport all directories. It synchronizes /var/lib/nfs/xtab
-with /etc/exports. It removes entries in /var/lib/nfs/xtab
+Reexport all directories. It synchronizes /var/lib/nfs/etab
+with /etc/exports. It removes entries in /var/lib/nfs/etab
which are deleted from /etc/exports, and remove any entries from the
kernel export table which are no longer valid.
.TP
@@ -120,7 +120,7 @@ entries to the export table. When using
all directories in
.B exports(5)
are added to
-.B xtab
+.B etab
and the resulting list is pushed into the kernel.
.P
The
@@ -152,7 +152,7 @@ directory.
Modifications of the kernel export table used by
.B nfsd(8)
take place immediately after parsing the command line and updating the
-.B xtab
+.B etab
file.
.P
The default export options are
@@ -163,14 +163,14 @@ The third synopsis shows how to unexported a currently exported directory.
When using
.BR "exportfs -ua" ,
all entries listed in
-.B xtab
+.B etab
are removed from the kernel export tables, and the file is cleared. This
effectively shuts down all NFS activity.
.P
To remove an export to a host, specify a
.I host:/path
pair. This deletes the specified entry from
-.B xtab
+.B etab
and removes the corresponding kernel entry (if any).
To remove one or more exports to several hosts, use
.BR "exportfs -ua" .
diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man
index 73817d7..3d3d7f5 100644
--- a/utils/exportfs/exports.man
+++ b/utils/exportfs/exports.man
@@ -34,6 +34,8 @@ double quotes. You can also specify spaces or other unusual character in
the export name using a backslash followed by the character code as three
octal digits.
.PP
+To apply changes to this file, run exportfs \-ra or restart the NFS server.
+.PP
.SS Machine Name Formats
NFS clients may be specified in a number of ways:
.IP "single host
diff --git a/utils/exportfs/nfsd.man b/utils/exportfs/nfsd.man
index cf3639d..7365a1b 100644
--- a/utils/exportfs/nfsd.man
+++ b/utils/exportfs/nfsd.man
@@ -12,7 +12,7 @@ nfsd \- special filesystem for controlling Linux NFS server
.SH DESCRIPTION
The
.B nfsd
-filessytem is a special filesystem which provides access to the Linux
+filesytem is a special filesystem which provides access to the Linux
NFS server. The filesystem consists of a single directory which
contains a number of files. These files are actually gateways into
the NFS server. Writing to them can affect the server. Reading from
diff --git a/utils/gssd/gss_util.c b/utils/gssd/gss_util.c
index d316b4d..8a7bcaa 100644
--- a/utils/gssd/gss_util.c
+++ b/utils/gssd/gss_util.c
@@ -145,6 +145,7 @@ display_status_2(char *m, u_int32_t major, u_int32_t minor, const gss_OID mech)
char maj_buf[30], min_buf[30];
char *maj, *min;
u_int32_t msg_ctx = 0;
+ int msg_verbosity = 0;
/* Get major status message */
maj_stat1 = gss_display_status(&min_stat1, major,
@@ -168,7 +169,9 @@ display_status_2(char *m, u_int32_t major, u_int32_t minor, const gss_OID mech)
min = min_gss_buf.value;
}
- printerr(0, "ERROR: GSS-API: error in %s(): %s - %s\n",
+ if (major == GSS_S_CREDENTIALS_EXPIRED)
+ msg_verbosity = 1;
+ printerr(msg_verbosity, "ERROR: GSS-API: error in %s(): %s - %s\n",
m, maj, min);
if (maj_gss_buf.length != 0)
diff --git a/utils/gssd/gssd.h b/utils/gssd/gssd.h
index 6b96ce1..e17edde 100644
--- a/utils/gssd/gssd.h
+++ b/utils/gssd/gssd.h
@@ -36,7 +36,7 @@
#include <gssapi/gssapi.h>
#define MAX_FILE_NAMELEN 32
-#define FD_ALLOC_BLOCK 32
+#define FD_ALLOC_BLOCK 256
#ifndef GSSD_PIPEFS_DIR
#define GSSD_PIPEFS_DIR "/var/lib/nfs/rpc_pipefs"
#endif
diff --git a/utils/gssd/gssd.man b/utils/gssd/gssd.man
index 8da10b2..2fa749e 100644
--- a/utils/gssd/gssd.man
+++ b/utils/gssd/gssd.man
@@ -35,7 +35,7 @@ With the \-n option, "machine credentials" will not be used
for accesses by UID 0. Instead, credentials must be obtained
manually like all other users. Use of this option means that
"root" must manually obtain Kerberos credentials before
-attemtpting to mount an nfs filesystem requiring Kerberos
+attempting to mount an nfs filesystem requiring Kerberos
authentication.
.TP
.B -k keytab
diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
index 48880b6..6860cc8 100644
--- a/utils/gssd/gssd_proc.c
+++ b/utils/gssd/gssd_proc.c
@@ -464,7 +464,7 @@ do_error_downcall(int k5_fd, uid_t uid, int err)
if (write(k5_fd, buf, p - buf) < p - buf) goto out_err;
return 0;
out_err:
- printerr(0, "Failed to write error downcall!\n");
+ printerr(1, "Failed to write error downcall!\n");
return -1;
}
diff --git a/utils/mount/error.c b/utils/mount/error.c
index 10d4ed2..23a91ff 100644
--- a/utils/mount/error.c
+++ b/utils/mount/error.c
@@ -23,7 +23,10 @@
* + Proper support for internationalization
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 403d6f4..5076468 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -18,7 +18,10 @@
*
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
@@ -136,6 +139,10 @@ static const struct opt_map opt_map[] = {
{ "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
to mtime/ctime */
#endif
+ { "noquota", 0, 0, MS_DUMMY }, /* Don't enforce quota */
+ { "quota", 0, 0, MS_DUMMY }, /* Enforce user quota */
+ { "usrquota", 0, 0, MS_DUMMY }, /* Enforce user quota */
+ { "grpquota", 0, 0, MS_DUMMY }, /* Enforce group quota */
{ NULL, 0, 0, 0 }
};
diff --git a/utils/mount/mount.nfs.man b/utils/mount/mount.nfs.man
index 624358c..1a4561b 100644
--- a/utils/mount/mount.nfs.man
+++ b/utils/mount/mount.nfs.man
@@ -82,8 +82,5 @@ table of mounted file systems
.BR nfs (5),
.BR mount (8),
-.SH "BUGS"
-Please notify nfs@lists.sourceforge.net of any bugs found in this software.
-
.SH "AUTHOR"
Amit Gud <agud@redhat.com>
diff --git a/utils/mount/network.c b/utils/mount/network.c
index 38d0135..ab7f6d0 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -21,6 +21,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c
index 0a32c3c..311e5a0 100644
--- a/utils/mount/nfs4mount.c
+++ b/utils/mount/nfs4mount.c
@@ -18,6 +18,10 @@
* - Moved to nfs-utils/utils/mount from util-linux/mount.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <unistd.h>
#include <stdio.h>
#include <string.h>
diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c
index 3d2ebb1..ff0ff93 100644
--- a/utils/mount/nfsmount.c
+++ b/utils/mount/nfsmount.c
@@ -35,6 +35,10 @@
* nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
@@ -714,7 +718,7 @@ nfsmount(const char *spec, const char *node, int flags,
rpc_mount_errors(*nfs_server.hostname, 1, bg);
}
- if (nfs_pmap->pm_vers == 2) {
+ if (mnt_pmap->pm_vers <= 2) {
if (mntres.nfsv2.fhs_status != 0) {
nfs_error(_("%s: %s:%s failed, reason given by server: %s"),
progname, hostname, dirname,
@@ -734,7 +738,7 @@ nfsmount(const char *spec, const char *node, int flags,
#if NFS_MOUNT_VERSION >= 4
mountres3_ok *mountres;
fhandle3 *fhandle;
- int i, *flavor, yum = 0;
+ int i, n_flavors, *flavor, yum = 0;
if (mntres.nfsv3.fhs_status != 0) {
nfs_error(_("%s: %s:%s failed, reason given by server: %s"),
progname, hostname, dirname,
@@ -743,13 +747,16 @@ nfsmount(const char *spec, const char *node, int flags,
}
#if NFS_MOUNT_VERSION >= 5
mountres = &mntres.nfsv3.mountres3_u.mountinfo;
- i = mountres->auth_flavors.auth_flavors_len;
- if (i <= 0)
+ n_flavors = mountres->auth_flavors.auth_flavors_len;
+ if (n_flavors <= 0)
goto noauth_flavors;
flavor = mountres->auth_flavors.auth_flavors_val;
- while (--i >= 0) {
- /* If no flavour requested, use first simple
+ for (i = 0; i < n_flavors; ++i) {
+ /*
+ * Per RFC2623, section 2.7, we should prefer the
+ * flavour listed first.
+ * If no flavour requested, use the first simple
* flavour that is offered.
*/
if (! (data.flags & NFS_MOUNT_SECFLAVOUR) &&
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 0c8d3e1..cadb1f4 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -21,6 +21,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/utils/mount/umount.nfs.man b/utils/mount/umount.nfs.man
index ee4cdaf..15addfa 100644
--- a/utils/mount/umount.nfs.man
+++ b/utils/mount/umount.nfs.man
@@ -66,8 +66,5 @@ table of mounted file systems
.BR nfs (5),
.BR umount (8),
-.SH "BUGS"
-Please notify nfs@lists.sourceforge.net of any bugs found in this software.
-
.SH "AUTHOR"
Amit Gud <agud@redhat.com>
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index ee3fa7b..3de599a 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -173,8 +173,6 @@ int get_uuid(char *path, char *uuid, int uuidlen, char *u)
if (cache == NULL)
blkid_get_cache(&cache, NULL);
- blkid_probe_all_new(cache);
-
if (stat(path, &stb) != 0)
return 0;
devname = blkid_devno_to_devname(stb.st_dev);
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index 38e5dbc..d016f09 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -345,7 +345,14 @@ mount_mnt_3_svc(struct svc_req *rqstp, dirpath *path, mountres3 *res)
#define AUTH_GSS_KRB5 390003
#define AUTH_GSS_KRB5I 390004
#define AUTH_GSS_KRB5P 390005
- static int flavors[] = { AUTH_NULL, AUTH_UNIX, AUTH_GSS_KRB5, AUTH_GSS_KRB5I, AUTH_GSS_KRB5P};
+ static int flavors[] = { AUTH_UNIX, AUTH_GSS_KRB5, AUTH_GSS_KRB5I, AUTH_GSS_KRB5P};
+ /*
+ * We should advertise the preferred flavours first. (See RFC 2623
+ * section 2.7.) AUTH_UNIX is arbitrarily ranked over the GSS's.
+ * AUTH_NULL is dropped from the list to avoid backward compatibility
+ * issue with older Linux clients, who inspect the list in reversed
+ * order.
+ */
struct nfs_fh_len *fh;
xlog(D_CALL, "MNT3(%s) called", *path);
diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
index ed8cfc8..aa6c961 100644
--- a/utils/nfsstat/nfsstat.c
+++ b/utils/nfsstat/nfsstat.c
@@ -207,7 +207,7 @@ void usage(char *name)
{
printf("Usage: %s [OPTION]...\n\
\n\
- -m, --mounted\t\tShow statistics on mounted NFS filesystems\n\
+ -m, --mounts\t\tShow statistics on mounted NFS filesystems\n\
-c, --client\t\tShow NFS client statistics\n\
-s, --server\t\tShow NFS server statistics\n\
-2\t\t\tShow NFS version 2 statistics\n\
diff --git a/utils/nfsstat/nfsstat.man b/utils/nfsstat/nfsstat.man
index 2c39191..cb5f89f 100644
--- a/utils/nfsstat/nfsstat.man
+++ b/utils/nfsstat/nfsstat.man
@@ -35,7 +35,7 @@ Print only NFS v3 statistics.
.B \-4
Print only NFS v4 statistics.
.TP
-.B \-m, \-\-mounted
+.B \-m, \-\-mounts
Print information about each of the mounted \fBNFS\fR file systems.
If this option is used, all other options are ignored.
diff --git a/utils/showmount/showmount.c b/utils/showmount/showmount.c
index 4e10a29..76bef19 100644
--- a/utils/showmount/showmount.c
+++ b/utils/showmount/showmount.c
@@ -240,6 +240,8 @@ static unsigned short getport(struct sockaddr_in *addr,
rpc_createerr.cf_stat = status;
clnt_destroy(client);
return 0;
+ } else if (port == 0) {
+ rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
}
clnt_destroy(client);
@@ -364,7 +366,7 @@ int main(int argc, char **argv)
server_addr.sin_port = getport(&server_addr,
MOUNTPROG, MOUNTVERS, IPPROTO_UDP);
if (!server_addr.sin_port) {
- clnt_pcreateerror("portmap getport");
+ clnt_pcreateerror("showmount");
exit(1);
}
msock = RPC_ANYSOCK;