Update to upstream RC release: nfs-utils-1-2-2-rc9

This commit is contained in:
Steve Dickson 2010-01-25 12:28:46 +00:00
parent 9eb77489c1
commit c1fc9c166c
4 changed files with 198 additions and 110 deletions

View File

@ -1,33 +0,0 @@
diff -up nfs-utils-1.2.1/utils/exportfs/exportfs.c.orig nfs-utils-1.2.1/utils/exportfs/exportfs.c
--- nfs-utils-1.2.1/utils/exportfs/exportfs.c.orig 2009-11-04 06:13:56.000000000 -0500
+++ nfs-utils-1.2.1/utils/exportfs/exportfs.c 2010-01-12 07:59:03.730815650 -0500
@@ -13,6 +13,7 @@
#endif
#include <sys/vfs.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
diff -up nfs-utils-1.2.1/utils/mount/mount.c.orig nfs-utils-1.2.1/utils/mount/mount.c
--- nfs-utils-1.2.1/utils/mount/mount.c.orig 2010-01-12 07:58:57.697003286 -0500
+++ nfs-utils-1.2.1/utils/mount/mount.c 2010-01-12 08:00:45.274357659 -0500
@@ -24,6 +24,7 @@
#include <unistd.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
diff -up nfs-utils-1.2.1/utils/mount/network.c.orig nfs-utils-1.2.1/utils/mount/network.c
--- nfs-utils-1.2.1/utils/mount/network.c.orig 2010-01-12 07:58:57.698003139 -0500
+++ nfs-utils-1.2.1/utils/mount/network.c 2010-01-12 07:59:44.041815690 -0500
@@ -37,6 +37,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <sys/stat.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>

View File

@ -1,53 +0,0 @@
commit d63f9e0ccb836d592593a9816ccc00a51c903328
Author: Steve Dickson <steved@redhat.com>
Date: Wed Jan 20 15:05:46 2010 -0500
mount.nfs: Configuration file parser ignoring options
When the protocol version is set on the command line,
none of the variables set in the configuration file
are passed down to the kernel due to a bug in the
parsing routine.
Tested-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
index 28b722c..1dd4159 100644
--- a/utils/mount/configfile.c
+++ b/utils/mount/configfile.c
@@ -194,13 +194,29 @@ void free_all(void)
static char *versions[] = {"v2", "v3", "v4", "vers", "nfsvers", NULL};
int inline check_vers(char *mopt, char *field)
{
- int i;
+ int i, found=0;
- if (strncmp("mountvers", field, strlen("mountvers")) != 0) {
- for (i=0; versions[i]; i++)
- if (strcasestr(mopt, versions[i]) != NULL)
- return 1;
+ /*
+ * First check to see if the config setting is one
+ * of the many version settings
+ */
+ for (i=0; versions[i]; i++) {
+ if (strcasestr(field, versions[i]) != NULL) {
+ found++;
+ break;
+ }
}
+ if (!found)
+ return 0;
+ /*
+ * It appears the version is being set, now see
+ * if the version appears on the command
+ */
+ for (i=0; versions[i]; i++) {
+ if (strcasestr(mopt, versions[i]) != NULL)
+ return 1;
+ }
+
return 0;
}

View File

@ -4739,6 +4739,18 @@ index 0000000..3d47264
+kill_statd() { +kill_statd() {
+ kill `cat /var/run/rpc.statd.pid` + kill `cat /var/run/rpc.statd.pid`
+} +}
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index 593a8eb..331e57e 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -13,6 +13,7 @@
#endif
#include <sys/vfs.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
index 40a2b4d..bd37a5f 100644 index 40a2b4d..bd37a5f 100644
--- a/utils/gssd/gssd.c --- a/utils/gssd/gssd.c
@ -5968,11 +5980,168 @@ index 6f2ba61..f1bfbef 100644
printerr(1, "finished handling null request\n"); printerr(1, "finished handling null request\n");
return; return;
diff --git a/utils/idmapd/Makefile.am b/utils/idmapd/Makefile.am
index 4dabb3d..4218048 100644
--- a/utils/idmapd/Makefile.am
+++ b/utils/idmapd/Makefile.am
@@ -1,6 +1,5 @@
## Process this file with automake to produce Makefile.in
-man5_MANS = idmapd.conf.man
man8_MANS = idmapd.man
RPCPREFIX = rpc.
@@ -8,7 +7,6 @@ KPREFIX = @kprefix@
sbin_PROGRAMS = idmapd
EXTRA_DIST = \
- $(man5_MANS) \
$(man8_MANS) \
idmapd.conf
@@ -48,8 +46,8 @@ uninstall-hook:
# XXX This makes some assumptions about what automake does.
# XXX But there is no install-man-hook or install-man-local.
-install-man: install-man5 install-man8 install-man-links
-uninstall-man: uninstall-man5 uninstall-man8 uninstall-man-links
+install-man: install-man8 install-man-links
+uninstall-man: uninstall-man8 uninstall-man-links
install-man-links:
(cd $(DESTDIR)$(man8dir) && \
diff --git a/utils/idmapd/idmapd.conf.man b/utils/idmapd/idmapd.conf.man
deleted file mode 100644
index 02722b1..0000000
--- a/utils/idmapd/idmapd.conf.man
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" $OpenBSD: mdoc.template,v 1.6 2001/02/03 08:22:44 niklas Exp $
-.\"
-.\" The following requests are required for all man pages.
-.Dd July 16, 2003
-.Dt idmapd.conf 5
-.Os
-.Sh NAME
-.Nm idmapd.conf
-.Nd configuration file for idmapd, the NFSv4 ID <-> Name Mapper
-.Sh SYNOPSIS
-Configuration file for idmapd, the NFSv4 ID <-> Name Mapper
-.Sh DESCRIPTION
-The
-.Nm
-configuration file has two sections, initiated by the strings
-[General] and [Mapping]. Each section may contain lines of the form
-.Dl ""
-.Dl variable = value
-.Dl ""
-The variables allowed in the General section are
-.Va Verbosity,
-.Va Pipefs-Directory,
-and
-.Va Domain,
-whose values have the same effect as the arguments to the
-.Fl v,
-.Fl p,
-and
-.Fl d
-commandline options, respectively. The variables allowed in the
-Mapping section are
-.Va Nobody-User
-and
-.Va Nobody-Group,
-which have the same effect as the
-.Fl U
-and
-.Fl G
-commandline options.
-'
-.Sh EXAMPLES
-'
-An example
-.Pa /etc/idmapd.conf
-file:
-'
-.Bd -literal
-[General]
-
-Verbosity = 0
-Pipefs-Directory = /var/lib/nfs/rpc_pipefs
-Domain = localdomain
-
-[Mapping]
-
-Nobody-User = nobody
-Nobody-Group = nobody
-.Ed
-'
-.Sh SEE ALSO
-.Xr idmapd 8
-.\".Sh SEE ALSO
-.\".Xr nylon.conf 4
-.\" .Sh COMPATIBILITY
-.\".Sh STANDARDS
-.\".Sh ACKNOWLEDGEMENTS
-.Sh AUTHORS
-The idmapd software has been developed by Marius Aamodt Eriksen
-.Aq marius@citi.umich.edu .
-.\" .Sh HISTORY
-.\".Sh BUGS
-.\"Please report any bugs to Marius Aamodt Eriksen
-.\".Aq marius@monkey.org .
-.\" .Sh CAVEATS
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
index 28b722c..1dd4159 100644
--- a/utils/mount/configfile.c
+++ b/utils/mount/configfile.c
@@ -194,13 +194,29 @@ void free_all(void)
static char *versions[] = {"v2", "v3", "v4", "vers", "nfsvers", NULL};
int inline check_vers(char *mopt, char *field)
{
- int i;
+ int i, found=0;
- if (strncmp("mountvers", field, strlen("mountvers")) != 0) {
- for (i=0; versions[i]; i++)
- if (strcasestr(mopt, versions[i]) != NULL)
- return 1;
+ /*
+ * First check to see if the config setting is one
+ * of the many version settings
+ */
+ for (i=0; versions[i]; i++) {
+ if (strcasestr(field, versions[i]) != NULL) {
+ found++;
+ break;
+ }
}
+ if (!found)
+ return 0;
+ /*
+ * It appears the version is being set, now see
+ * if the version appears on the command
+ */
+ for (i=0; versions[i]; i++) {
+ if (strcasestr(mopt, versions[i]) != NULL)
+ return 1;
+ }
+
return 0;
}
diff --git a/utils/mount/mount.c b/utils/mount/mount.c diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 355df79..6b9e164 100644 index 355df79..82b9169 100644
--- a/utils/mount/mount.c --- a/utils/mount/mount.c
+++ b/utils/mount/mount.c +++ b/utils/mount/mount.c
@@ -593,6 +593,9 @@ int main(int argc, char *argv[]) @@ -24,6 +24,7 @@
#include <unistd.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -593,6 +594,9 @@ int main(int argc, char *argv[])
if (mnt_err == EX_BG) { if (mnt_err == EX_BG) {
printf(_("%s: backgrounding \"%s\"\n"), printf(_("%s: backgrounding \"%s\"\n"),
progname, spec); progname, spec);
@ -5983,10 +6152,16 @@ index 355df79..6b9e164 100644
/* /*
diff --git a/utils/mount/network.c b/utils/mount/network.c diff --git a/utils/mount/network.c b/utils/mount/network.c
index 7b1152a..92bba2d 100644 index 7b1152a..06cab6a 100644
--- a/utils/mount/network.c --- a/utils/mount/network.c
+++ b/utils/mount/network.c +++ b/utils/mount/network.c
@@ -42,6 +42,7 @@ @@ -37,11 +37,13 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <sys/stat.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h> #include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h> #include <rpc/pmap_clnt.h>
@ -5994,7 +6169,7 @@ index 7b1152a..92bba2d 100644
#include "xcommon.h" #include "xcommon.h"
#include "mount.h" #include "mount.h"
#include "nls.h" #include "nls.h"
@@ -56,10 +57,6 @@ @@ -56,10 +58,6 @@
#define CONNECT_TIMEOUT (20) #define CONNECT_TIMEOUT (20)
#define MOUNT_TIMEOUT (30) #define MOUNT_TIMEOUT (30)
@ -6005,7 +6180,7 @@ index 7b1152a..92bba2d 100644
extern int nfs_mount_data_version; extern int nfs_mount_data_version;
extern char *progname; extern char *progname;
extern int verbose; extern int verbose;
@@ -193,8 +190,18 @@ static const unsigned int *nfs_default_proto() @@ -193,8 +191,18 @@ static const unsigned int *nfs_default_proto()
} }
#endif /* MOUNT_CONFIG */ #endif /* MOUNT_CONFIG */
@ -6026,7 +6201,7 @@ index 7b1152a..92bba2d 100644
{ {
struct addrinfo *gai_results; struct addrinfo *gai_results;
struct addrinfo gai_hint = { struct addrinfo gai_hint = {
@@ -243,25 +250,6 @@ static int nfs_lookup(const char *hostname, const sa_family_t family, @@ -243,25 +251,6 @@ static int nfs_lookup(const char *hostname, const sa_family_t family,
} }
/** /**
@ -6052,7 +6227,7 @@ index 7b1152a..92bba2d 100644
* nfs_gethostbyname - resolve a hostname to an IPv4 address * nfs_gethostbyname - resolve a hostname to an IPv4 address
* @hostname: pointer to a C string containing a DNS hostname * @hostname: pointer to a C string containing a DNS hostname
* @sin: returns an IPv4 address * @sin: returns an IPv4 address
@@ -283,8 +271,8 @@ int nfs_gethostbyname(const char *hostname, struct sockaddr_in *sin) @@ -283,8 +272,8 @@ int nfs_gethostbyname(const char *hostname, struct sockaddr_in *sin)
* OUT: length of converted socket address * OUT: length of converted socket address
* *
* Convert a presentation format address string to a socket address. * Convert a presentation format address string to a socket address.
@ -6063,7 +6238,7 @@ index 7b1152a..92bba2d 100644
* *
* Returns 1 and fills in @sap and @salen if successful; otherwise zero. * Returns 1 and fills in @sap and @salen if successful; otherwise zero.
* *
@@ -549,8 +537,8 @@ static int nfs_probe_port(const struct sockaddr *sap, const socklen_t salen, @@ -549,8 +538,8 @@ static int nfs_probe_port(const struct sockaddr *sap, const socklen_t salen,
struct pmap *pmap, const unsigned long *versions, struct pmap *pmap, const unsigned long *versions,
const unsigned int *protos) const unsigned int *protos)
{ {
@ -6074,7 +6249,7 @@ index 7b1152a..92bba2d 100644
const unsigned long prog = pmap->pm_prog, *p_vers; const unsigned long prog = pmap->pm_prog, *p_vers;
const unsigned int prot = (u_int)pmap->pm_prot, *p_prot; const unsigned int prot = (u_int)pmap->pm_prot, *p_prot;
const u_short port = (u_short) pmap->pm_port; const u_short port = (u_short) pmap->pm_port;
@@ -840,8 +828,8 @@ int start_statd(void) @@ -840,8 +829,8 @@ int start_statd(void)
int nfs_advise_umount(const struct sockaddr *sap, const socklen_t salen, int nfs_advise_umount(const struct sockaddr *sap, const socklen_t salen,
const struct pmap *pmap, const dirpath *argp) const struct pmap *pmap, const dirpath *argp)
{ {
@ -6085,7 +6260,7 @@ index 7b1152a..92bba2d 100644
struct pmap mnt_pmap = *pmap; struct pmap mnt_pmap = *pmap;
struct timeval timeout = { struct timeval timeout = {
.tv_sec = MOUNT_TIMEOUT >> 3, .tv_sec = MOUNT_TIMEOUT >> 3,
@@ -1289,6 +1277,7 @@ nfs_nfs_version(struct mount_options *options, unsigned long *version) @@ -1289,6 +1278,7 @@ nfs_nfs_version(struct mount_options *options, unsigned long *version)
int int
nfs_nfs_protocol(struct mount_options *options, unsigned long *protocol) nfs_nfs_protocol(struct mount_options *options, unsigned long *protocol)
{ {
@ -6093,7 +6268,7 @@ index 7b1152a..92bba2d 100644
char *option; char *option;
switch (po_rightmost(options, nfs_transport_opttbl)) { switch (po_rightmost(options, nfs_transport_opttbl)) {
@@ -1300,17 +1289,8 @@ nfs_nfs_protocol(struct mount_options *options, unsigned long *protocol) @@ -1300,17 +1290,8 @@ nfs_nfs_protocol(struct mount_options *options, unsigned long *protocol)
return 1; return 1;
case 2: /* proto */ case 2: /* proto */
option = po_get(options, "proto"); option = po_get(options, "proto");
@ -6113,7 +6288,7 @@ index 7b1152a..92bba2d 100644
} }
/* /*
@@ -1352,6 +1332,40 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port) @@ -1352,6 +1333,40 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port)
} }
/* /*
@ -6154,7 +6329,7 @@ index 7b1152a..92bba2d 100644
* "mountprog" is supported only by the legacy mount command. The * "mountprog" is supported only by the legacy mount command. The
* kernel mount client does not support this option. * kernel mount client does not support this option.
* *
@@ -1419,20 +1433,12 @@ nfs_mount_version(struct mount_options *options, unsigned long *version) @@ -1419,20 +1434,12 @@ nfs_mount_version(struct mount_options *options, unsigned long *version)
static int static int
nfs_mount_protocol(struct mount_options *options, unsigned long *protocol) nfs_mount_protocol(struct mount_options *options, unsigned long *protocol)
{ {
@ -6178,7 +6353,7 @@ index 7b1152a..92bba2d 100644
/* /*
* MNT transport protocol wasn't specified. If the NFS * MNT transport protocol wasn't specified. If the NFS
@@ -1472,6 +1478,35 @@ nfs_mount_port(struct mount_options *options, unsigned long *port) @@ -1472,6 +1479,35 @@ nfs_mount_port(struct mount_options *options, unsigned long *port)
return 1; return 1;
} }

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils Name: nfs-utils
URL: http://sourceforge.net/projects/nfs URL: http://sourceforge.net/projects/nfs
Version: 1.2.1 Version: 1.2.1
Release: 13%{?dist} Release: 14%{?dist}
Epoch: 1 Epoch: 1
# group all 32bit related archs # group all 32bit related archs
@ -18,11 +18,9 @@ Source13: rpcgssd.init
Source14: rpcsvcgssd.init Source14: rpcsvcgssd.init
Source15: nfs.sysconfig Source15: nfs.sysconfig
Patch000: nfs-utils-1.2.2-rc8.patch Patch000: nfs-utils-1.2.2-rc9.patch
Patch001: nfs-utils-1.2.1-compile.patch Patch001: nfs-utils-1.2.1-statdpath.patch
Patch002: nfs-utils-1.2.1-statdpath.patch Patch002: nfs-utils-1.2.1-default-family.patch
Patch003: nfs-utils-1.2.1-mount-config.patch
Patch004: nfs-utils-1.2.1-default-family.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -77,8 +75,6 @@ This package also contains the mount.nfs and umount.nfs program.
%patch000 -p1 %patch000 -p1
%patch001 -p1 %patch001 -p1
%patch002 -p1 %patch002 -p1
%patch003 -p1
%patch004 -p1
%patch100 -p1 %patch100 -p1
%patch101 -p1 %patch101 -p1
@ -112,7 +108,7 @@ make all
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/sbin} mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/sbin}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/{man5,man8} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig} mkdir -p $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/usr/sbin install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/usr/sbin
@ -255,6 +251,9 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4 %attr(4755,root,root) /sbin/umount.nfs4
%changelog %changelog
* Fri Jan 22 2010 Steve Dickson <steved@redhat.com> 1.2.1-14
- Update to upstream RC release: nfs-utils-1-2-2-rc9
* Thu Jan 21 2010 Steve Dickson <steved@redhat.com> 1.2.1-13 * Thu Jan 21 2010 Steve Dickson <steved@redhat.com> 1.2.1-13
- mount.nfs: Configuration file parser ignoring options - mount.nfs: Configuration file parser ignoring options
- mount.nfs: Set the default family for lookups based on - mount.nfs: Set the default family for lookups based on