diff --git a/nfs-utils-1.2.4-rc4.patch b/nfs-utils-1-2-4-rc6.patch similarity index 63% rename from nfs-utils-1.2.4-rc4.patch rename to nfs-utils-1-2-4-rc6.patch index 621e52f..09590fc 100644 --- a/nfs-utils-1.2.4-rc4.patch +++ b/nfs-utils-1-2-4-rc6.patch @@ -1,6 +1,20 @@ -diff -up nfs-utils-1.2.3/aclocal/keyutils.m4.orig nfs-utils-1.2.3/aclocal/keyutils.m4 ---- nfs-utils-1.2.3/aclocal/keyutils.m4.orig 2010-12-13 15:04:23.551896335 -0500 -+++ nfs-utils-1.2.3/aclocal/keyutils.m4 2010-12-13 15:04:23.551896335 -0500 +diff --git a/.gitignore b/.gitignore +index 4bff9e3..f5b5cf0 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -64,6 +64,7 @@ tests/nsm_client/nlm_sm_inter.h + tests/nsm_client/nlm_sm_inter_clnt.c + tests/nsm_client/nlm_sm_inter_svc.c + tests/nsm_client/nlm_sm_inter_xdr.c ++utils/nfsidmap/nfsidmap + # cscope database files + cscope.* + # generic editor backup et al +diff --git a/aclocal/keyutils.m4 b/aclocal/keyutils.m4 +new file mode 100644 +index 0000000..84bc112 +--- /dev/null ++++ b/aclocal/keyutils.m4 @@ -0,0 +1,11 @@ +dnl Checks for keyutils library and headers +dnl @@ -13,9 +27,10 @@ diff -up nfs-utils-1.2.3/aclocal/keyutils.m4.orig nfs-utils-1.2.3/aclocal/keyuti + AC_CHECK_HEADERS([keyutils.h], , + [AC_MSG_ERROR([keyutils.h header not found.])]) +])dnl -diff -up nfs-utils-1.2.3/aclocal/libnfsidmap.m4.orig nfs-utils-1.2.3/aclocal/libnfsidmap.m4 ---- nfs-utils-1.2.3/aclocal/libnfsidmap.m4.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/aclocal/libnfsidmap.m4 2010-12-13 15:04:23.595887287 -0500 +diff --git a/aclocal/libnfsidmap.m4 b/aclocal/libnfsidmap.m4 +index cfcde2f..4faa923 100644 +--- a/aclocal/libnfsidmap.m4 ++++ b/aclocal/libnfsidmap.m4 @@ -14,4 +14,8 @@ AC_DEFUN([AC_LIBNFSIDMAP], [ [AC_DEFINE([HAVE_NFS4_SET_DEBUG], 1, [Define to 1 if you have the `nfs4_set_debug' function.])]) @@ -25,10 +40,11 @@ diff -up nfs-utils-1.2.3/aclocal/libnfsidmap.m4.orig nfs-utils-1.2.3/aclocal/lib + [enable_nfsidmap=no]) + ])dnl -diff -up nfs-utils-1.2.3/configure.ac.orig nfs-utils-1.2.3/configure.ac ---- nfs-utils-1.2.3/configure.ac.orig 2010-12-13 15:03:49.256949536 -0500 -+++ nfs-utils-1.2.3/configure.ac 2010-12-13 15:04:23.595887287 -0500 -@@ -144,7 +144,7 @@ AC_ARG_ENABLE(tirpc, +diff --git a/configure.ac b/configure.ac +index 3058be6..92833e3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -136,7 +136,7 @@ AC_ARG_ENABLE(tirpc, [AC_HELP_STRING([--enable-tirpc], [enable use of TI-RPC @<:@default=yes@:>@])], enable_tirpc=$enableval, @@ -37,7 +53,7 @@ diff -up nfs-utils-1.2.3/configure.ac.orig nfs-utils-1.2.3/configure.ac AC_ARG_ENABLE(ipv6, [AC_HELP_STRING([--enable-ipv6], [enable support for IPv6 @<:@default=no@:>@])], -@@ -255,6 +255,12 @@ if test "$enable_nfsv4" = yes; then +@@ -247,6 +247,12 @@ if test "$enable_nfsv4" = yes; then dnl check for nfsidmap libraries and headers AC_LIBNFSIDMAP @@ -50,7 +66,7 @@ diff -up nfs-utils-1.2.3/configure.ac.orig nfs-utils-1.2.3/configure.ac dnl librpcsecgss already has a dependency on libgssapi, dnl but we need to make sure we get the right version if test "$enable_gss" = yes; then -@@ -446,6 +452,7 @@ AC_CONFIG_FILES([ +@@ -435,6 +441,7 @@ AC_CONFIG_FILES([ utils/mountd/Makefile utils/nfsd/Makefile utils/nfsstat/Makefile @@ -58,20 +74,10 @@ diff -up nfs-utils-1.2.3/configure.ac.orig nfs-utils-1.2.3/configure.ac utils/showmount/Makefile utils/statd/Makefile tests/Makefile -diff -up nfs-utils-1.2.3/.gitignore.orig nfs-utils-1.2.3/.gitignore ---- nfs-utils-1.2.3/.gitignore.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/.gitignore 2010-12-13 15:04:23.551896335 -0500 -@@ -64,6 +64,7 @@ tests/nsm_client/nlm_sm_inter.h - tests/nsm_client/nlm_sm_inter_clnt.c - tests/nsm_client/nlm_sm_inter_svc.c - tests/nsm_client/nlm_sm_inter_xdr.c -+utils/nfsidmap/nfsidmap - # cscope database files - cscope.* - # generic editor backup et al -diff -up nfs-utils-1.2.3/support/export/client.c.orig nfs-utils-1.2.3/support/export/client.c ---- nfs-utils-1.2.3/support/export/client.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/export/client.c 2010-12-13 15:04:23.627880707 -0500 +diff --git a/support/export/client.c b/support/export/client.c +index dbfc2b1..ba2db8f 100644 +--- a/support/export/client.c ++++ b/support/export/client.c @@ -178,6 +178,7 @@ out_badprefix: static int init_netmask6(nfs_client *UNUSED(clp), const char *UNUSED(slash)) @@ -80,9 +86,10 @@ diff -up nfs-utils-1.2.3/support/export/client.c.orig nfs-utils-1.2.3/support/ex } #endif /* IPV6_SUPPORTED */ -diff -up nfs-utils-1.2.3/support/export/export.c.orig nfs-utils-1.2.3/support/export/export.c ---- nfs-utils-1.2.3/support/export/export.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/export/export.c 2010-12-13 15:04:23.627880707 -0500 +diff --git a/support/export/export.c b/support/export/export.c +index f528603..4fda30a 100644 +--- a/support/export/export.c ++++ b/support/export/export.c @@ -38,6 +38,7 @@ export_free(nfs_export *exp) xfree(exp->m_export.e_sqgids); free(exp->m_export.e_mountpoint); @@ -91,9 +98,10 @@ diff -up nfs-utils-1.2.3/support/export/export.c.orig nfs-utils-1.2.3/support/ex xfree(exp->m_export.e_hostname); xfree(exp); -diff -up nfs-utils-1.2.3/support/export/hostname.c.orig nfs-utils-1.2.3/support/export/hostname.c ---- nfs-utils-1.2.3/support/export/hostname.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/export/hostname.c 2010-12-13 15:04:23.652875568 -0500 +diff --git a/support/export/hostname.c b/support/export/hostname.c +index 3c55ce7..efcb75c 100644 +--- a/support/export/hostname.c ++++ b/support/export/hostname.c @@ -30,10 +30,6 @@ #include "sockaddr.h" #include "exportfs.h" @@ -114,10 +122,24 @@ diff -up nfs-utils-1.2.3/support/export/hostname.c.orig nfs-utils-1.2.3/support/ }; int error; -diff -up nfs-utils-1.2.3/support/include/nfslib.h.orig nfs-utils-1.2.3/support/include/nfslib.h ---- nfs-utils-1.2.3/support/include/nfslib.h.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/include/nfslib.h 2010-12-13 15:04:23.653875363 -0500 -@@ -163,6 +163,12 @@ void closeall(int min); +diff --git a/support/include/nfslib.h b/support/include/nfslib.h +index 3db5bec..cee826b 100644 +--- a/support/include/nfslib.h ++++ b/support/include/nfslib.h +@@ -25,6 +25,12 @@ + #ifndef _PATH_EXPORTS + #define _PATH_EXPORTS "/etc/exports" + #endif ++#ifndef _PATH_EXPORTS_D ++#define _PATH_EXPORTS_D "/etc/exports.d" ++#endif ++#ifndef _EXT_EXPORT ++#define _EXT_EXPORT ".exports" ++#endif + #ifndef _PATH_IDMAPDCONF + #define _PATH_IDMAPDCONF "/etc/idmapd.conf" + #endif +@@ -163,6 +169,12 @@ void closeall(int min); int svctcp_socket (u_long __number, int __reuse); int svcudp_socket (u_long __number); @@ -130,9 +152,37 @@ diff -up nfs-utils-1.2.3/support/include/nfslib.h.orig nfs-utils-1.2.3/support/i #define UNUSED(x) UNUSED_ ## x __attribute__((unused)) -diff -up nfs-utils-1.2.3/support/nfs/atomicio.c.orig nfs-utils-1.2.3/support/nfs/atomicio.c ---- nfs-utils-1.2.3/support/nfs/atomicio.c.orig 2010-12-13 15:04:23.695866725 -0500 -+++ nfs-utils-1.2.3/support/nfs/atomicio.c 2010-12-13 15:04:23.695866725 -0500 +diff --git a/support/include/rpcmisc.h b/support/include/rpcmisc.h +index c5847fa..0b06457 100644 +--- a/support/include/rpcmisc.h ++++ b/support/include/rpcmisc.h +@@ -31,7 +31,7 @@ struct rpc_dentry { + + struct rpc_dtable { + struct rpc_dentry *entries; +- int nproc; ++ rpcproc_t nproc; + }; + + #define dtable_ent(func, vers, arg_type, res_type) \ +diff --git a/support/nfs/Makefile.am b/support/nfs/Makefile.am +index 60400b2..05c2fc4 100644 +--- a/support/nfs/Makefile.am ++++ b/support/nfs/Makefile.am +@@ -5,7 +5,7 @@ libnfs_a_SOURCES = exports.c rmtab.c xio.c rpcmisc.c rpcdispatch.c \ + xlog.c xcommon.c wildmat.c nfsclient.c \ + nfsexport.c getfh.c nfsctl.c rpc_socket.c getport.c \ + svc_socket.c cacheio.c closeall.c nfs_mntent.c conffile.c \ +- svc_create.c ++ svc_create.c atomicio.c strlcpy.c strlcat.c + + MAINTAINERCLEANFILES = Makefile.in + +diff --git a/support/nfs/atomicio.c b/support/nfs/atomicio.c +new file mode 100644 +index 0000000..5e760e6 +--- /dev/null ++++ b/support/nfs/atomicio.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002 Marius Aamodt Eriksen @@ -188,10 +238,11 @@ diff -up nfs-utils-1.2.3/support/nfs/atomicio.c.orig nfs-utils-1.2.3/support/nfs + } + return pos; +} -diff -up nfs-utils-1.2.3/support/nfs/conffile.c.orig nfs-utils-1.2.3/support/nfs/conffile.c ---- nfs-utils-1.2.3/support/nfs/conffile.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/nfs/conffile.c 2010-12-13 15:04:23.720861584 -0500 -@@ -271,9 +271,9 @@ conf_parse_line(int trans, char *line, s +diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c +index 24640f4..798e5f3 100644 +--- a/support/nfs/conffile.c ++++ b/support/nfs/conffile.c +@@ -271,9 +271,9 @@ conf_parse_line(int trans, char *line, size_t sz) if (ptr == NULL) return; line = ++ptr; @@ -203,10 +254,11 @@ diff -up nfs-utils-1.2.3/support/nfs/conffile.c.orig nfs-utils-1.2.3/support/nfs xlog_warn("config file error: line %d: " "non-matched '\"', ignoring until next section", ln); } else { -diff -up nfs-utils-1.2.3/support/nfs/exports.c.orig nfs-utils-1.2.3/support/nfs/exports.c ---- nfs-utils-1.2.3/support/nfs/exports.c.orig 2010-12-13 15:03:49.280944601 -0500 -+++ nfs-utils-1.2.3/support/nfs/exports.c 2010-12-13 15:04:23.720861584 -0500 -@@ -332,6 +332,8 @@ dupexportent(struct exportent *dst, stru +diff --git a/support/nfs/exports.c b/support/nfs/exports.c +index a93941c..1744ed6 100644 +--- a/support/nfs/exports.c ++++ b/support/nfs/exports.c +@@ -332,6 +332,8 @@ dupexportent(struct exportent *dst, struct exportent *src) dst->e_mountpoint = strdup(src->e_mountpoint); if (src->e_fslocdata) dst->e_fslocdata = strdup(src->e_fslocdata); @@ -215,36 +267,29 @@ diff -up nfs-utils-1.2.3/support/nfs/exports.c.orig nfs-utils-1.2.3/support/nfs/ dst->e_hostname = NULL; } -diff -up nfs-utils-1.2.3/support/nfs/Makefile.am.orig nfs-utils-1.2.3/support/nfs/Makefile.am ---- nfs-utils-1.2.3/support/nfs/Makefile.am.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/nfs/Makefile.am 2010-12-13 15:04:23.694866929 -0500 -@@ -5,7 +5,7 @@ libnfs_a_SOURCES = exports.c rmtab.c xio - xlog.c xcommon.c wildmat.c nfsclient.c \ - nfsexport.c getfh.c nfsctl.c rpc_socket.c getport.c \ - svc_socket.c cacheio.c closeall.c nfs_mntent.c conffile.c \ -- svc_create.c -+ svc_create.c atomicio.c strlcpy.c strlcat.c - - MAINTAINERCLEANFILES = Makefile.in - -diff -up nfs-utils-1.2.3/support/nfs/rpcdispatch.c.orig nfs-utils-1.2.3/support/nfs/rpcdispatch.c ---- nfs-utils-1.2.3/support/nfs/rpcdispatch.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/nfs/rpcdispatch.c 2010-12-13 15:04:23.761853154 -0500 -@@ -37,6 +37,11 @@ rpc_dispatch(struct svc_req *rqstp, SVCX +diff --git a/support/nfs/rpcdispatch.c b/support/nfs/rpcdispatch.c +index 984c646..f7c27c9 100644 +--- a/support/nfs/rpcdispatch.c ++++ b/support/nfs/rpcdispatch.c +@@ -32,7 +32,12 @@ rpc_dispatch(struct svc_req *rqstp, SVCXPRT *transp, return; } - -+ if (dtable->nproc <= rqstp->rq_proc) { + dtable += (rqstp->rq_vers - 1); +- if (((int)rqstp->rq_proc) > dtable->nproc) { ++ if (rqstp->rq_proc > dtable->nproc) { + svcerr_noproc(transp); + return; + } + - dent = dtable->entries + rqstp->rq_proc; - - if (dent->func == NULL) { -diff -up nfs-utils-1.2.3/support/nfs/strlcat.c.orig nfs-utils-1.2.3/support/nfs/strlcat.c ---- nfs-utils-1.2.3/support/nfs/strlcat.c.orig 2010-12-13 15:04:23.762852948 -0500 -+++ nfs-utils-1.2.3/support/nfs/strlcat.c 2010-12-13 15:04:23.762852948 -0500 ++ if (dtable->nproc <= rqstp->rq_proc) { + svcerr_noproc(transp); + return; + } +diff --git a/support/nfs/strlcat.c b/support/nfs/strlcat.c +new file mode 100644 +index 0000000..daedd7a +--- /dev/null ++++ b/support/nfs/strlcat.c @@ -0,0 +1,76 @@ +/* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */ + @@ -322,9 +367,11 @@ diff -up nfs-utils-1.2.3/support/nfs/strlcat.c.orig nfs-utils-1.2.3/support/nfs/ + + return(dlen + (s - src)); /* count does not include NUL */ +} -diff -up nfs-utils-1.2.3/support/nfs/strlcpy.c.orig nfs-utils-1.2.3/support/nfs/strlcpy.c ---- nfs-utils-1.2.3/support/nfs/strlcpy.c.orig 2010-12-13 15:04:23.788847602 -0500 -+++ nfs-utils-1.2.3/support/nfs/strlcpy.c 2010-12-13 15:04:23.788847602 -0500 +diff --git a/support/nfs/strlcpy.c b/support/nfs/strlcpy.c +new file mode 100644 +index 0000000..a2653ee +--- /dev/null ++++ b/support/nfs/strlcpy.c @@ -0,0 +1,72 @@ +/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */ + @@ -398,9 +445,10 @@ diff -up nfs-utils-1.2.3/support/nfs/strlcpy.c.orig nfs-utils-1.2.3/support/nfs/ + + return(s - src - 1); /* count does not include NUL */ +} -diff -up nfs-utils-1.2.3/support/nfs/svc_create.c.orig nfs-utils-1.2.3/support/nfs/svc_create.c ---- nfs-utils-1.2.3/support/nfs/svc_create.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/support/nfs/svc_create.c 2010-12-13 15:04:23.788847602 -0500 +diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c +index 59ba505..b3f75ed 100644 +--- a/support/nfs/svc_create.c ++++ b/support/nfs/svc_create.c @@ -27,6 +27,7 @@ #include #include @@ -478,7 +526,7 @@ diff -up nfs-utils-1.2.3/support/nfs/svc_create.c.orig nfs-utils-1.2.3/support/n /* * Set up an appropriate bind address, given @port and @nconf. * -@@ -98,17 +156,113 @@ svc_create_bindaddr(struct netconfig *nc +@@ -98,17 +156,113 @@ svc_create_bindaddr(struct netconfig *nconf, const uint16_t port) return ai; } @@ -595,7 +643,7 @@ diff -up nfs-utils-1.2.3/support/nfs/svc_create.c.orig nfs-utils-1.2.3/support/n if (ai == NULL) return 0; -@@ -119,7 +273,7 @@ svc_create_nconf(const char *name, const +@@ -119,7 +273,7 @@ svc_create_nconf(const char *name, const rpcprog_t program, freeaddrinfo(ai); if (xprt == NULL) { xlog(D_GENERAL, "Failed to create listener xprt " @@ -604,7 +652,7 @@ diff -up nfs-utils-1.2.3/support/nfs/svc_create.c.orig nfs-utils-1.2.3/support/n return 0; } -@@ -133,6 +287,93 @@ svc_create_nconf(const char *name, const +@@ -133,6 +287,93 @@ svc_create_nconf(const char *name, const rpcprog_t program, return 1; } @@ -698,7 +746,7 @@ diff -up nfs-utils-1.2.3/support/nfs/svc_create.c.orig nfs-utils-1.2.3/support/n /** * nfs_svc_create - start up RPC svc listeners * @name: C string containing name of new service -@@ -145,8 +386,7 @@ svc_create_nconf(const char *name, const +@@ -145,8 +386,7 @@ svc_create_nconf(const char *name, const rpcprog_t program, * the RPC dispatcher. Returns the number of started network transports. */ unsigned int @@ -708,10 +756,11 @@ diff -up nfs-utils-1.2.3/support/nfs/svc_create.c.orig nfs-utils-1.2.3/support/n void (*dispatch)(struct svc_req *, SVCXPRT *), const uint16_t port) { -diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/file.c ---- nfs-utils-1.2.3/support/nsm/file.c.orig 2010-12-13 15:03:49.256949536 -0500 -+++ nfs-utils-1.2.3/support/nsm/file.c 2010-12-13 15:04:23.821840816 -0500 -@@ -127,7 +127,7 @@ exact_error_check(const ssize_t len, con +diff --git a/support/nsm/file.c b/support/nsm/file.c +index f4baeb9..98b47bf 100644 +--- a/support/nsm/file.c ++++ b/support/nsm/file.c +@@ -126,7 +126,7 @@ exact_error_check(const ssize_t len, const size_t buflen) * containing an appropriate pathname, or NULL if an error * occurs. Caller must free the returned result with free(3). */ @@ -720,7 +769,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil static char * nsm_make_record_pathname(const char *directory, const char *hostname) { -@@ -175,7 +175,7 @@ nsm_make_record_pathname(const char *dir +@@ -174,7 +174,7 @@ nsm_make_record_pathname(const char *directory, const char *hostname) * containing an appropriate pathname, or NULL if an error * occurs. Caller must free the returned result with free(3). */ @@ -729,7 +778,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil static char * nsm_make_pathname(const char *directory) { -@@ -205,7 +205,7 @@ nsm_make_pathname(const char *directory) +@@ -204,7 +204,7 @@ nsm_make_pathname(const char *directory) * containing an appropriate pathname, or NULL if an error * occurs. Caller must free the returned result with free(3). */ @@ -738,7 +787,16 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil static char * nsm_make_temp_pathname(const char *pathname) { -@@ -569,9 +569,8 @@ nsm_retire_monitored_hosts(void) +@@ -421,7 +421,7 @@ nsm_drop_privileges(const int pidfd) + */ + if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1) { + xlog(L_ERROR, "prctl(PR_SET_KEEPCAPS) failed: %m"); +- return 0; ++ return false; + } + + if (setgroups(0, NULL) == -1) { +@@ -568,9 +568,8 @@ nsm_retire_monitored_hosts(void) while ((de = readdir(dir)) != NULL) { char *src, *dst; @@ -749,7 +807,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil if (de->d_name[0] == '.') continue; -@@ -581,6 +580,20 @@ nsm_retire_monitored_hosts(void) +@@ -580,6 +579,20 @@ nsm_retire_monitored_hosts(void) continue; } @@ -770,7 +828,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil dst = nsm_make_record_pathname(NSM_NOTIFY_DIR, de->d_name); if (dst == NULL) { free(src); -@@ -635,7 +648,7 @@ nsm_priv_to_hex(const char *priv, char * +@@ -634,7 +647,7 @@ nsm_priv_to_hex(const char *priv, char *buf, const size_t buflen) /* * Returns the length in bytes of the created record. */ @@ -779,7 +837,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil static size_t nsm_create_monitor_record(char *buf, const size_t buflen, const struct sockaddr *sap, const struct mon *m) -@@ -785,7 +798,7 @@ out: +@@ -784,7 +797,7 @@ out: return result; } @@ -788,7 +846,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil static _Bool nsm_parse_line(char *line, struct sockaddr_in *sin, struct mon *m) { -@@ -847,7 +860,7 @@ nsm_read_line(const char *hostname, cons +@@ -846,7 +859,7 @@ nsm_read_line(const char *hostname, const time_t timestamp, char *line, } /* @@ -797,7 +855,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil * and invokes @func so caller can populate their in-core * database with this data. */ -@@ -864,10 +877,15 @@ nsm_load_host(const char *directory, con +@@ -863,10 +876,15 @@ nsm_load_host(const char *directory, const char *filename, nsm_populate_t func) if (path == NULL) goto out_err; @@ -814,7 +872,7 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil f = fopen(path, "r"); if (f == NULL) { -@@ -914,8 +932,6 @@ nsm_load_dir(const char *directory, nsm_ +@@ -913,8 +931,6 @@ nsm_load_dir(const char *directory, nsm_populate_t func) } while ((de = readdir(dir)) != NULL) { @@ -823,10 +881,11 @@ diff -up nfs-utils-1.2.3/support/nsm/file.c.orig nfs-utils-1.2.3/support/nsm/fil if (de->d_name[0] == '.') continue; -diff -up nfs-utils-1.2.3/tests/nsm_client/nsm_client.c.orig nfs-utils-1.2.3/tests/nsm_client/nsm_client.c ---- nfs-utils-1.2.3/tests/nsm_client/nsm_client.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/tests/nsm_client/nsm_client.c 2010-12-13 15:04:23.821840816 -0500 -@@ -205,7 +205,7 @@ nsm_client_get_rpcclient(const char *nod +diff --git a/tests/nsm_client/nsm_client.c b/tests/nsm_client/nsm_client.c +index 0d1159a..0fa3422 100644 +--- a/tests/nsm_client/nsm_client.c ++++ b/tests/nsm_client/nsm_client.c +@@ -205,7 +205,7 @@ nsm_client_get_rpcclient(const char *node) { unsigned short port; struct addrinfo *ai; @@ -835,9 +894,218 @@ diff -up nfs-utils-1.2.3/tests/nsm_client/nsm_client.c.orig nfs-utils-1.2.3/test int err; CLIENT *client = NULL; -diff -up nfs-utils-1.2.3/utils/exportfs/exports.man.orig nfs-utils-1.2.3/utils/exportfs/exports.man ---- nfs-utils-1.2.3/utils/exportfs/exports.man.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/exportfs/exports.man 2010-12-13 15:04:23.839837115 -0500 +diff --git a/utils/Makefile.am b/utils/Makefile.am +index 8665183..a0ea116 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -4,6 +4,9 @@ OPTDIRS = + + if CONFIG_NFSV4 + OPTDIRS += idmapd ++if CONFIG_NFSIDMAP ++OPTDIRS += nfsidmap ++endif + endif + + if CONFIG_GSS +diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c +index b78957f..26d0504 100644 +--- a/utils/exportfs/exportfs.c ++++ b/utils/exportfs/exportfs.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "sockaddr.h" + #include "misc.h" +@@ -41,6 +42,7 @@ static void error(nfs_export *exp, int err); + static void usage(const char *progname); + static void validate_export(nfs_export *exp); + static int matchhostname(const char *hostname1, const char *hostname2); ++static void export_d_read(const char *dname); + + int + main(int argc, char **argv) +@@ -127,8 +129,10 @@ main(int argc, char **argv) + return 0; + } + } +- if (f_export && ! f_ignore) ++ if (f_export && ! f_ignore) { + export_read(_PATH_EXPORTS); ++ export_d_read(_PATH_EXPORTS_D); ++ } + if (f_export) { + if (f_all) + export_all(f_verbose); +@@ -485,6 +489,59 @@ out: + return result; + } + ++/* Based on mnt_table_parse_dir() in ++ util-linux-ng/shlibs/mount/src/tab_parse.c */ ++static void ++export_d_read(const char *dname) ++{ ++ int n = 0, i; ++ struct dirent **namelist = NULL; ++ ++ ++ n = scandir(dname, &namelist, NULL, versionsort); ++ if (n < 0) ++ xlog(L_NOTICE, "scandir %s: %s\n", dname, strerror(errno)); ++ else if (n == 0) ++ return; ++ ++ for (i = 0; i < n; i++) { ++ struct dirent *d = namelist[i]; ++ size_t namesz; ++ char fname[PATH_MAX + 1]; ++ int fname_len; ++ ++ ++ if (d->d_type != DT_UNKNOWN ++ && d->d_type != DT_REG ++ && d->d_type != DT_LNK) ++ continue; ++ if (*d->d_name == '.') ++ continue; ++ ++#define _EXT_EXPORT_SIZ (sizeof(_EXT_EXPORT) - 1) ++ namesz = strlen(d->d_name); ++ if (!namesz ++ || namesz < _EXT_EXPORT_SIZ + 1 ++ || strcmp(d->d_name + (namesz - _EXT_EXPORT_SIZ), ++ _EXT_EXPORT)) ++ continue; ++ ++ fname_len = snprintf(fname, PATH_MAX +1, "%s/%s", dname, d->d_name); ++ if (fname_len > PATH_MAX) { ++ xlog(L_WARNING, "Too long file name: %s in %s\n", d->d_name, dname); ++ continue; ++ } ++ ++ export_read(fname); ++ } ++ ++ for (i = 0; i < n; i++) ++ free(namelist[i]); ++ free(namelist); ++ ++ return; ++} ++ + static char + dumpopt(char c, char *fmt, ...) + { +diff --git a/utils/exportfs/exportfs.man b/utils/exportfs/exportfs.man +index 089f75b..364f247 100644 +--- a/utils/exportfs/exportfs.man ++++ b/utils/exportfs/exportfs.man +@@ -37,11 +37,15 @@ when a client sends an NFS MOUNT request. + .PP + Normally the master export table is initialized with the contents of + .I /etc/exports ++and files under ++.I /etc/exports.d + by invoking + .BR "exportfs -a" . + However, a system administrator can choose to add or delete + exports without modifying + .I /etc/exports ++or files under ++.I /etc/exports.d + by using the + .B exportfs + command. +@@ -92,17 +96,24 @@ Specify a list of export options in the same manner as in + .B -i + Ignore the + .I /etc/exports +-file. Only default options and options given on the command line are used. ++file and files under ++.I /etc/exports.d ++directory. Only default options and options given on the command line are used. + .TP + .B -r + Reexport all directories, synchronizing + .I /var/lib/nfs/etab + with +-.IR /etc/exports . ++.IR /etc/exports ++and files under ++.IR /etc/exports.d . + This option removes entries in + .I /var/lib/nfs/etab + which have been deleted from +-.I /etc/exports, and removes any entries from the ++.I /etc/exports ++or files under ++.IR /etc/exports.d , ++and removes any entries from the + kernel export table which are no longer valid. + .TP + .B -u +@@ -130,6 +141,8 @@ when adding new entries to the export table. When using + .BR "exportfs -a" , + all exports listed in + .I /etc/exports ++and files under ++.I /etc/exports.d + are added to + .IR /var/lib/nfs/etab . + The kernel's export table is also updated as needed. +@@ -149,7 +162,9 @@ several sources. + The default export options are + .BR sync,ro,root_squash,wdelay . + These can be overridden by entries in +-.IR /etc/exports . ++.IR /etc/exports ++or files under ++.IR /etc/exports.d . + .PP + A system administrator may override options from these sources using the + .B -o +@@ -188,6 +203,8 @@ to display the export options for each export. + .SH EXAMPLES + The following adds all directories listed in + .I /etc/exports ++and files under ++.I /etc/exports.d + to + .I /var/lib/nfs/etab + and pushes the resulting export entries into the kernel: +@@ -215,7 +232,9 @@ directory: + .fi + .PP + To unexport all exports listed in +-.IR /etc/exports : ++.IR /etc/exports ++and files under ++.IR /etc/exports.d : + .PP + .nf + .B "# exportfs -au +@@ -238,6 +257,13 @@ if they themselves are no longer valid they will be removed. + .I /etc/exports + input file listing exports, export options, and access control lists + .TP 2.5i ++.I /etc/exports.d ++directory where extra input files are stored. ++.B Note: ++only files that end with ++.I .exports ++are used. ++.TP 2.5i + .I /var/lib/nfs/etab + master table of exports + .TP 2.5i +diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man +index c726dd9..85e25d4 100644 +--- a/utils/exportfs/exports.man ++++ b/utils/exportfs/exports.man @@ -145,7 +145,9 @@ storage (see .IR async above). @@ -849,7 +1117,7 @@ diff -up nfs-utils-1.2.3/utils/exportfs/exports.man.orig nfs-utils-1.2.3/utils/e default. In all releases after 1.0.0, .I sync is the default, and -@@ -375,20 +377,6 @@ If the client asks for alternative locat +@@ -375,20 +377,6 @@ If the client asks for alternative locations for the export point, it will be given this list of alternatives. (Note that actual replication of the filesystem must be handled elsewhere.) @@ -870,23 +1138,313 @@ diff -up nfs-utils-1.2.3/utils/exportfs/exports.man.orig nfs-utils-1.2.3/utils/e .SS User ID Mapping .PP .B nfsd -diff -up nfs-utils-1.2.3/utils/idmapd/idmapd.c.orig nfs-utils-1.2.3/utils/idmapd/idmapd.c ---- nfs-utils-1.2.3/utils/idmapd/idmapd.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/idmapd/idmapd.c 2010-12-13 15:04:23.873830124 -0500 -@@ -158,10 +158,6 @@ static int nfsdopenone(struct idmap_clie - static void nfsdreopen_one(struct idmap_client *); - static void nfsdreopen(void); +@@ -456,6 +444,24 @@ export entry for + .B /home/joe + in the example section below, which maps all requests to uid 150 (which + is supposedly that of user joe). ++.SS Extra Export Tables ++After reading ++.I /etc/exports ++.B exportfs ++reads files under ++.I /etc/exports.d. ++directory as extra export tables. ++.B exportfs ++regards only a file which name is ended with ++.I .exports ++and ++not started with ++.I . ++as an extra export file. A file which name ++is not met this condition is just ignored. ++The format for extra export tables is the same as ++.I /etc/exports ++. + .IP + .SH EXAMPLE + .PP +@@ -501,6 +507,7 @@ all three mounts with the `sync' option enabled. + '''entry. + .SH FILES + /etc/exports ++/etc/exports.d + .SH SEE ALSO + .BR exportfs (8), + .BR netgroup (5), +diff --git a/utils/gssd/gss_util.c b/utils/gssd/gss_util.c +index 8fe1e9b..ee304cc 100644 +--- a/utils/gssd/gss_util.c ++++ b/utils/gssd/gss_util.c +@@ -138,6 +138,83 @@ display_status_1(char *m, u_int32_t code, int type, const gss_OID mech) + } + } + #endif ++static char * ++gss_display_error(OM_uint32 status) ++{ ++ char *error = NULL; ++ ++ switch(status) { ++ case GSS_S_COMPLETE: ++ error = "GSS_S_COMPLETE"; ++ break; ++ case GSS_S_CALL_INACCESSIBLE_READ: ++ error = "GSS_S_CALL_INACCESSIBLE_READ"; ++ break; ++ case GSS_S_CALL_INACCESSIBLE_WRITE: ++ error = "GSS_S_CALL_INACCESSIBLE_WRITE"; ++ break; ++ case GSS_S_CALL_BAD_STRUCTURE: ++ error = "GSS_S_CALL_BAD_STRUCTURE"; ++ break; ++ case GSS_S_BAD_MECH: ++ error = "GSS_S_BAD_MECH"; ++ break; ++ case GSS_S_BAD_NAME: ++ error = "GSS_S_BAD_NAME"; ++ break; ++ case GSS_S_BAD_NAMETYPE: ++ error = "GSS_S_BAD_NAMETYPE"; ++ break; ++ case GSS_S_BAD_BINDINGS: ++ error = "GSS_S_BAD_BINDINGS"; ++ break; ++ case GSS_S_BAD_STATUS: ++ error = "GSS_S_BAD_STATUS"; ++ break; ++ case GSS_S_BAD_SIG: ++ error = "GSS_S_BAD_SIG"; ++ break; ++ case GSS_S_NO_CRED: ++ error = "GSS_S_NO_CRED"; ++ break; ++ case GSS_S_NO_CONTEXT: ++ error = "GSS_S_NO_CONTEXT"; ++ break; ++ case GSS_S_DEFECTIVE_TOKEN: ++ error = "GSS_S_DEFECTIVE_TOKEN"; ++ break; ++ case GSS_S_DEFECTIVE_CREDENTIAL: ++ error = "GSS_S_DEFECTIVE_CREDENTIAL"; ++ break; ++ case GSS_S_CREDENTIALS_EXPIRED: ++ error = "GSS_S_CREDENTIALS_EXPIRED"; ++ break; ++ case GSS_S_CONTEXT_EXPIRED: ++ error = "GSS_S_CONTEXT_EXPIRED"; ++ break; ++ case GSS_S_FAILURE: ++ error = "GSS_S_FAILURE"; ++ break; ++ case GSS_S_BAD_QOP: ++ error = "GSS_S_BAD_QOP"; ++ break; ++ case GSS_S_UNAUTHORIZED: ++ error = "GSS_S_UNAUTHORIZED"; ++ break; ++ case GSS_S_UNAVAILABLE: ++ error = "GSS_S_UNAVAILABLE"; ++ break; ++ case GSS_S_DUPLICATE_ELEMENT: ++ error = "GSS_S_DUPLICATE_ELEMENT"; ++ break; ++ case GSS_S_NAME_NOT_MN: ++ error = "GSS_S_NAME_NOT_MN"; ++ break; ++ default: ++ error = "Not defined"; ++ } ++ return error; ++} --size_t strlcat(char *, const char *, size_t); --size_t strlcpy(char *, const char *, size_t); --ssize_t atomicio(ssize_t (*f) (int, void*, size_t), -- int, void *, size_t); - void mydaemon(int, int); - void release_parent(void); + static void + display_status_2(char *m, u_int32_t major, u_int32_t minor, const gss_OID mech) +@@ -175,8 +252,8 @@ display_status_2(char *m, u_int32_t major, u_int32_t minor, const gss_OID mech) -diff -up nfs-utils-1.2.3/utils/idmapd/Makefile.am.orig nfs-utils-1.2.3/utils/idmapd/Makefile.am ---- nfs-utils-1.2.3/utils/idmapd/Makefile.am.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/idmapd/Makefile.am 2010-12-13 15:04:23.871830535 -0500 + if (major == GSS_S_CREDENTIALS_EXPIRED) + msg_verbosity = 1; +- printerr(msg_verbosity, "ERROR: GSS-API: error in %s(): %s - %s\n", +- m, maj, min); ++ printerr(msg_verbosity, "ERROR: GSS-API: error in %s(): %s (%s) - %s(%s)\n", ++ m, gss_display_error(major), maj, min); + + if (maj_gss_buf.length != 0) + (void) gss_release_buffer(&min_stat1, &maj_gss_buf); +diff --git a/utils/gssd/gssd.man b/utils/gssd/gssd.man +index 0a23cd6..073379d 100644 +--- a/utils/gssd/gssd.man ++++ b/utils/gssd/gssd.man +@@ -53,6 +53,8 @@ To be more consistent with other implementations, we now look for + specific keytab entries. The search order for keytabs to be used + for "machine credentials" is now: + .br ++ $@ ++.br + root/@ + .br + nfs/@ +@@ -64,6 +66,9 @@ for "machine credentials" is now: + nfs/@ + .br + host/@ ++.IP ++If this search order does not use the correct key then provide a ++keytab file that contains only correct keys. + .TP + .B -p path + Tells +diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c +index c301d46..41328c9 100644 +--- a/utils/gssd/gssd_proc.c ++++ b/utils/gssd/gssd_proc.c +@@ -1245,7 +1245,7 @@ handle_gssd_upcall(struct clnt_info *clp) + goto out; + if (sscanf(p, "enctypes=%s", enctypes) != 1) { + printerr(0, "WARNING: handle_gssd_upcall: " +- "failed to parse target name " ++ "failed to parse encryption types " + "in upcall string '%s'\n", lbuf); + goto out; + } +diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c +index f071600..4b13fa1 100644 +--- a/utils/gssd/krb5_util.c ++++ b/utils/gssd/krb5_util.c +@@ -768,6 +768,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname, + krb5_error_code code; + char **realmnames = NULL; + char myhostname[NI_MAXHOST], targethostname[NI_MAXHOST]; ++ char myhostad[NI_MAXHOST+1]; + int i, j, retval; + char *default_realm = NULL; + char *realm; +@@ -789,6 +790,14 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname, + printerr(1, "%s while getting local hostname\n", k5err); + goto out; + } ++ ++ /* Compute the active directory machine name HOST$ */ ++ strcpy(myhostad, myhostname); ++ for (i = 0; myhostad[i] != 0; ++i) ++ myhostad[i] = toupper(myhostad[i]); ++ myhostad[i] = '$'; ++ myhostad[i+1] = 0; ++ + retval = get_full_hostname(myhostname, myhostname, sizeof(myhostname)); + if (retval) + goto out; +@@ -833,32 +842,47 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname, + if (strcmp(realm, default_realm) == 0) + tried_default = 1; + for (j = 0; svcnames[j] != NULL; j++) { +- code = krb5_build_principal_ext(context, &princ, +- strlen(realm), +- realm, +- strlen(svcnames[j]), +- svcnames[j], +- strlen(myhostname), +- myhostname, +- NULL); ++ char spn[300]; ++ ++ /* ++ * The special svcname "$" means 'try the active ++ * directory machine account' ++ */ ++ if (strcmp(svcnames[j],"$") == 0) { ++ snprintf(spn, sizeof(spn), "%s@%s", myhostad, realm); ++ code = krb5_build_principal_ext(context, &princ, ++ strlen(realm), ++ realm, ++ strlen(myhostad), ++ myhostad, ++ NULL); ++ } else { ++ snprintf(spn, sizeof(spn), "%s/%s@%s", ++ svcnames[j], myhostname, realm); ++ code = krb5_build_principal_ext(context, &princ, ++ strlen(realm), ++ realm, ++ strlen(svcnames[j]), ++ svcnames[j], ++ strlen(myhostname), ++ myhostname, ++ NULL); ++ } ++ + if (code) { + k5err = gssd_k5_err_msg(context, code); +- printerr(1, "%s while building principal for " +- "'%s/%s@%s'\n", k5err, svcnames[j], +- myhostname, realm); ++ printerr(1, "%s while building principal for '%s'\n", ++ k5err, spn); + continue; + } + code = krb5_kt_get_entry(context, kt, princ, 0, 0, kte); + krb5_free_principal(context, princ); + if (code) { + k5err = gssd_k5_err_msg(context, code); +- printerr(3, "%s while getting keytab entry for " +- "'%s/%s@%s'\n", k5err, svcnames[j], +- myhostname, realm); ++ printerr(3, "%s while getting keytab entry for '%s'\n", ++ k5err, spn); + } else { +- printerr(3, "Success getting keytab entry for " +- "'%s/%s@%s'\n", +- svcnames[j], myhostname, realm); ++ printerr(3, "Success getting keytab entry for '%s'\n",spn); + retval = 0; + goto out; + } +@@ -870,6 +894,8 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname, + */ + for (j = 0; svcnames[j] != NULL; j++) { + int found = 0; ++ if (strcmp(svcnames[j],"$") == 0) ++ continue; + code = gssd_search_krb5_keytab(context, kt, realm, + svcnames[j], &found, kte); + if (!code && found) { +@@ -1160,7 +1186,7 @@ gssd_refresh_krb5_machine_credential(char *hostname, + krb5_keytab kt = NULL;; + int retval = 0; + char *k5err = NULL; +- const char *svcnames[4] = { "root", "nfs", "host", NULL }; ++ const char *svcnames[5] = { "$", "root", "nfs", "host", NULL }; + + /* + * If a specific service name was specified, use it. +diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c +index 9b463f3..17af2da 100644 +--- a/utils/gssd/svcgssd.c ++++ b/utils/gssd/svcgssd.c +@@ -267,6 +267,7 @@ main(int argc, char *argv[]) + if (!fg) + release_parent(); + ++ nfs4_init_name_mapping(NULL); /* XXX: should only do this once */ + gssd_run(); + printerr(0, "gssd_run returned!\n"); + abort(); +diff --git a/utils/gssd/svcgssd_proc.c b/utils/gssd/svcgssd_proc.c +index 3894078..0ecbab6 100644 +--- a/utils/gssd/svcgssd_proc.c ++++ b/utils/gssd/svcgssd_proc.c +@@ -241,7 +241,7 @@ get_ids(gss_name_t client_name, gss_OID mech, struct svc_cred *cred) + "file for name '%s'\n", sname); + goto out_free; + } +- nfs4_init_name_mapping(NULL); /* XXX: should only do this once */ ++ + res = nfs4_gss_princ_to_ids(secname, sname, &uid, &gid); + if (res < 0) { + /* +diff --git a/utils/idmapd/Makefile.am b/utils/idmapd/Makefile.am +index 4218048..4328e41 100644 +--- a/utils/idmapd/Makefile.am ++++ b/utils/idmapd/Makefile.am @@ -11,12 +11,8 @@ EXTRA_DIST = \ idmapd.conf @@ -900,67 +1458,255 @@ diff -up nfs-utils-1.2.3/utils/idmapd/Makefile.am.orig nfs-utils-1.2.3/utils/idm nfs_idmap.h \ queue.h -diff -up nfs-utils-1.2.3/utils/Makefile.am.orig nfs-utils-1.2.3/utils/Makefile.am ---- nfs-utils-1.2.3/utils/Makefile.am.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/Makefile.am 2010-12-13 15:04:23.838837321 -0500 -@@ -4,6 +4,9 @@ OPTDIRS = - - if CONFIG_NFSV4 - OPTDIRS += idmapd -+if CONFIG_NFSIDMAP -+OPTDIRS += nfsidmap -+endif - endif - - if CONFIG_GSS -diff -up nfs-utils-1.2.3/utils/mountd/mountd.c.orig nfs-utils-1.2.3/utils/mountd/mountd.c ---- nfs-utils-1.2.3/utils/mountd/mountd.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mountd/mountd.c 2010-12-13 15:04:24.008802365 -0500 -@@ -99,12 +99,9 @@ static int version_any(void) - static void - unregister_services (void) - { -- if (version2()) { -- nfs_svc_unregister(MOUNTPROG, MOUNTVERS); -- nfs_svc_unregister(MOUNTPROG, MOUNTVERS_POSIX); +diff --git a/utils/idmapd/atomicio.c b/utils/idmapd/atomicio.c +deleted file mode 100644 +index 1fb1ff9..0000000 +--- a/utils/idmapd/atomicio.c ++++ /dev/null +@@ -1,64 +0,0 @@ +-/* +- * Copyright (c) 2002 Marius Aamodt Eriksen +- * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. +- * All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * +- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +- +-#include +-#include +-#include +- +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif /* HAVE_CONFIG_H */ +- +-/* +- * ensure all of data on socket comes through. f==read || f==write +- */ +-ssize_t +-atomicio( +- ssize_t (*f) (int, void*, size_t), +- int fd, +- void *_s, +- size_t n) +-{ +- char *s = _s; +- ssize_t res; +- size_t pos = 0; +- +- while (n > pos) { +- res = (f) (fd, s + pos, n - pos); +- switch (res) { +- case -1: +- if (errno == EINTR || errno == EAGAIN) +- continue; +- case 0: +- if (pos != 0) +- return (pos); +- return (res); +- default: +- pos += res; +- } - } -- if (version3()) -- nfs_svc_unregister(MOUNTPROG, MOUNTVERS_NFSV3); -+ nfs_svc_unregister(MOUNTPROG, MOUNTVERS); -+ nfs_svc_unregister(MOUNTPROG, MOUNTVERS_POSIX); -+ nfs_svc_unregister(MOUNTPROG, MOUNTVERS_NFSV3); - } +- return (pos); +-} +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c +index b76607a..76a56ef 100644 +--- a/utils/idmapd/idmapd.c ++++ b/utils/idmapd/idmapd.c +@@ -158,10 +158,6 @@ static int nfsdopenone(struct idmap_client *); + static void nfsdreopen_one(struct idmap_client *); + static void nfsdreopen(void); - static void -@@ -840,6 +837,7 @@ main(int argc, char **argv) - if (new_cache) - cache_open(); +-size_t strlcat(char *, const char *, size_t); +-size_t strlcpy(char *, const char *, size_t); +-ssize_t atomicio(ssize_t (*f) (int, void*, size_t), +- int, void *, size_t); + void mydaemon(int, int); + void release_parent(void); -+ unregister_services(); - if (version2()) { - listeners += nfs_svc_create("mountd", MOUNTPROG, - MOUNTVERS, mount_dispatch, port); -diff -up nfs-utils-1.2.3/utils/mountd/mountd.man.orig nfs-utils-1.2.3/utils/mountd/mountd.man ---- nfs-utils-1.2.3/utils/mountd/mountd.man.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mountd/mountd.man 2010-12-13 15:04:24.052793317 -0500 -@@ -106,11 +106,11 @@ This option can be used to request that - .B rpc.mountd - do not offer certain versions of NFS. The current version of - .B rpc.mountd --can support both NFS version 2 and the newer version 3. If the --NFS kernel module was compiled without support for NFSv3, -+can support both NFS version 2, 3 and 4. If the -+either one of these version should not be offered, - .B rpc.mountd - must be invoked with the option --.B "\-\-no-nfs-version 3" . -+.B "\-\-no-nfs-version " . - .TP - .B \-n " or " \-\-no-tcp - Don't advertise TCP for mount. -diff -up nfs-utils-1.2.3/utils/mount/fstab.c.orig nfs-utils-1.2.3/utils/mount/fstab.c ---- nfs-utils-1.2.3/utils/mount/fstab.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/fstab.c 2010-12-13 15:04:23.873830124 -0500 +diff --git a/utils/idmapd/strlcat.c b/utils/idmapd/strlcat.c +deleted file mode 100644 +index daedd7a..0000000 +--- a/utils/idmapd/strlcat.c ++++ /dev/null +@@ -1,76 +0,0 @@ +-/* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */ +- +-/* +- * Copyright (c) 1998 Todd C. Miller +- * All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * 3. The name of the author may not be used to endorse or promote products +- * derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +- +-#if defined(LIBC_SCCS) && !defined(lint) +-static char *rcsid = "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $"; +-#endif /* LIBC_SCCS and not lint */ +- +-#include +-#include +- +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif /* HAVE_CONFIG_H */ +- +-/* +- * Appends src to string dst of size siz (unlike strncat, siz is the +- * full size of dst, not space left). At most siz-1 characters +- * will be copied. Always NUL terminates (unless siz <= strlen(dst)). +- * Returns strlen(src) + MIN(siz, strlen(initial dst)). +- * If retval >= siz, truncation occurred. +- */ +-size_t +-strlcat(char *dst, +- const char *src, +- size_t siz) +-{ +- register char *d = dst; +- register const char *s = src; +- register size_t n = siz; +- size_t dlen; +- +- /* Find the end of dst and adjust bytes left but don't go past end */ +- while (n-- != 0 && *d != '\0') +- d++; +- dlen = d - dst; +- n = siz - dlen; +- +- if (n == 0) +- return(dlen + strlen(s)); +- while (*s != '\0') { +- if (n != 1) { +- *d++ = *s; +- n--; +- } +- s++; +- } +- *d = '\0'; +- +- return(dlen + (s - src)); /* count does not include NUL */ +-} +diff --git a/utils/idmapd/strlcpy.c b/utils/idmapd/strlcpy.c +deleted file mode 100644 +index a2653ee..0000000 +--- a/utils/idmapd/strlcpy.c ++++ /dev/null +@@ -1,72 +0,0 @@ +-/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */ +- +-/* +- * Copyright (c) 1998 Todd C. Miller +- * All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * 3. The name of the author may not be used to endorse or promote products +- * derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +- +-#if defined(LIBC_SCCS) && !defined(lint) +-static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $"; +-#endif /* LIBC_SCCS and not lint */ +- +-#include +-#include +- +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif /* HAVE_CONFIG_H */ +- +-/* +- * Copy src to string dst of size siz. At most siz-1 characters +- * will be copied. Always NUL terminates (unless siz == 0). +- * Returns strlen(src); if retval >= siz, truncation occurred. +- */ +-size_t +-strlcpy(char *dst, +- const char *src, +- size_t siz) +-{ +- register char *d = dst; +- register const char *s = src; +- register size_t n = siz; +- +- /* Copy as many bytes as will fit */ +- if (n != 0 && --n != 0) { +- do { +- if ((*d++ = *s++) == 0) +- break; +- } while (--n != 0); +- } +- +- /* Not enough room in dst, add NUL and traverse rest of src */ +- if (n == 0) { +- if (siz != 0) +- *d = '\0'; /* NUL-terminate dst */ +- while (*s++) +- ; +- } +- +- return(s - src - 1); /* count does not include NUL */ +-} +diff --git a/utils/mount/fstab.c b/utils/mount/fstab.c +index 051fa38..a742e64 100644 +--- a/utils/mount/fstab.c ++++ b/utils/mount/fstab.c @@ -364,19 +364,22 @@ lock_mtab (void) { /* Repeat until it was us who made the link */ while (!we_created_lockfile) { @@ -1016,80 +1762,11 @@ diff -up nfs-utils-1.2.3/utils/mount/fstab.c.orig nfs-utils-1.2.3/utils/mount/fs (void) unlink(linktargetfile); close(lockfile_fd); die (EX_FILEIO, _("Cannot create link %s\n" -diff -up nfs-utils-1.2.3/utils/mount/mount_config.h.orig nfs-utils-1.2.3/utils/mount/mount_config.h ---- nfs-utils-1.2.3/utils/mount/mount_config.h.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/mount_config.h 2010-12-13 15:04:23.915821488 -0500 -@@ -1,7 +1,7 @@ --#ifndef _LINUX_MOUNT__CONFIG_H --#define _LINUX_MOUNT_CONFIG__H -+#ifndef _LINUX_MOUNT_CONFIG_H -+#define _LINUX_MOUNT_CONFIG_H - /* -- * mount_config.h -- mount configuration file routines -+ * mount_config.h -- mount configuration file routines - * Copyright (C) 2008 Red Hat, Inc - * - * This program is free software; you can redistribute it and/or modify -@@ -16,15 +16,13 @@ - * - */ - --inline void mount_config_init(char *); -- - #ifdef MOUNT_CONFIG - #include "conffile.h" - #include "xlog.h" - - extern char *conf_get_mntopts(char *, char *, char *); - --inline void mount_config_init(char *program) -+static inline void mount_config_init(char *program) - { - xlog_open(program); - /* -@@ -32,19 +30,22 @@ inline void mount_config_init(char *prog - */ - conf_init(); - } --inline char *mount_config_opts(char *spec, -+ -+static inline char *mount_config_opts(char *spec, - char *mount_point, char *mount_opts) - { - return conf_get_mntopts(spec, mount_point, mount_opts); - } -+ - #else /* MOUNT_CONFIG */ - --inline void mount_config_init(char *program) { } -+static inline void mount_config_init(char *program) { } - --inline char *mount_config_opts(char *spec, -+static inline char *mount_config_opts(char *spec, - char *mount_point, char *mount_opts) - { - return mount_opts; - } - #endif /* MOUNT_CONFIG */ --#endif -+ -+#endif /* _LINUX_MOUNT_CONFIG_H */ -diff -up nfs-utils-1.2.3/utils/mount/mount_constants.h.orig nfs-utils-1.2.3/utils/mount/mount_constants.h ---- nfs-utils-1.2.3/utils/mount/mount_constants.h.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/mount_constants.h 2010-12-13 15:04:23.915821488 -0500 -@@ -64,4 +64,8 @@ if we have a stack or plain mount - moun - #define MS_MGC_MSK 0xffff0000 /* magic flag number mask */ - #endif - -+/* Generic options that are prevented from appearing -+ * in the options field in /etc/mtab. */ -+#define MS_NOMTAB (MS_REMOUNT) -+ - #endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */ -diff -up nfs-utils-1.2.3/utils/mount/mount.c.orig nfs-utils-1.2.3/utils/mount/mount.c ---- nfs-utils-1.2.3/utils/mount/mount.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/mount.c 2010-12-13 15:04:23.874829919 -0500 -@@ -209,7 +209,7 @@ static char *fix_opts_string(int flags, +diff --git a/utils/mount/mount.c b/utils/mount/mount.c +index 82b9169..a19af53 100644 +--- a/utils/mount/mount.c ++++ b/utils/mount/mount.c +@@ -209,7 +209,7 @@ static char *fix_opts_string(int flags, const char *extra_opts) } if (flags & MS_USERS) new_opts = xstrconcat3(new_opts, ",users", ""); @@ -1098,7 +1775,7 @@ diff -up nfs-utils-1.2.3/utils/mount/mount.c.orig nfs-utils-1.2.3/utils/mount/mo for (om = opt_map; om->opt != NULL; om++) { if (om->skip) continue; -@@ -224,6 +224,20 @@ static char *fix_opts_string(int flags, +@@ -224,6 +224,20 @@ static char *fix_opts_string(int flags, const char *extra_opts) return new_opts; } @@ -1153,7 +1830,7 @@ diff -up nfs-utils-1.2.3/utils/mount/mount.c.orig nfs-utils-1.2.3/utils/mount/mo if (!nomtab && mtab_does_not_exist()) { if (verbose > 1) -@@ -321,7 +327,7 @@ static int add_mtab(char *spec, char *mo +@@ -321,7 +327,7 @@ static int add_mtab(char *spec, char *mount_point, char *fstype, return result; } @@ -1171,7 +1848,7 @@ diff -up nfs-utils-1.2.3/utils/mount/mount.c.orig nfs-utils-1.2.3/utils/mount/mo { const struct opt_map *om; -@@ -371,7 +377,7 @@ static void parse_opts(const char *optio +@@ -371,7 +377,7 @@ static void parse_opts(const char *options, int *flags, char **extra_opts) if (options != NULL) { char *opts = xstrdup(options); char *opt, *p; @@ -1180,7 +1857,7 @@ diff -up nfs-utils-1.2.3/utils/mount/mount.c.orig nfs-utils-1.2.3/utils/mount/mo int open_quote = 0; *extra_opts = xmalloc(len); -@@ -441,9 +447,7 @@ static int try_mount(char *spec, char *m +@@ -441,9 +447,7 @@ static int try_mount(char *spec, char *mount_point, int flags, if (!fake) print_one(spec, mount_point, fs_type, mount_opts); @@ -1191,9 +1868,83 @@ diff -up nfs-utils-1.2.3/utils/mount/mount.c.orig nfs-utils-1.2.3/utils/mount/mo } int main(int argc, char *argv[]) -diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/network.c ---- nfs-utils-1.2.3/utils/mount/network.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/network.c 2010-12-13 15:04:23.931818198 -0500 +diff --git a/utils/mount/mount_config.h b/utils/mount/mount_config.h +index 3023306..69ffd1e 100644 +--- a/utils/mount/mount_config.h ++++ b/utils/mount/mount_config.h +@@ -1,7 +1,7 @@ +-#ifndef _LINUX_MOUNT__CONFIG_H +-#define _LINUX_MOUNT_CONFIG__H ++#ifndef _LINUX_MOUNT_CONFIG_H ++#define _LINUX_MOUNT_CONFIG_H + /* +- * mount_config.h -- mount configuration file routines ++ * mount_config.h -- mount configuration file routines + * Copyright (C) 2008 Red Hat, Inc + * + * This program is free software; you can redistribute it and/or modify +@@ -16,15 +16,13 @@ + * + */ + +-inline void mount_config_init(char *); +- + #ifdef MOUNT_CONFIG + #include "conffile.h" + #include "xlog.h" + + extern char *conf_get_mntopts(char *, char *, char *); + +-inline void mount_config_init(char *program) ++static inline void mount_config_init(char *program) + { + xlog_open(program); + /* +@@ -32,19 +30,22 @@ inline void mount_config_init(char *program) + */ + conf_init(); + } +-inline char *mount_config_opts(char *spec, ++ ++static inline char *mount_config_opts(char *spec, + char *mount_point, char *mount_opts) + { + return conf_get_mntopts(spec, mount_point, mount_opts); + } ++ + #else /* MOUNT_CONFIG */ + +-inline void mount_config_init(char *program) { } ++static inline void mount_config_init(__attribute__ ((unused)) char *program) { } + +-inline char *mount_config_opts(char *spec, +- char *mount_point, char *mount_opts) ++static inline char *mount_config_opts(__attribute__ ((unused)) char *spec, ++ __attribute__ ((unused)) char *mount_point, char *mount_opts) + { + return mount_opts; + } + #endif /* MOUNT_CONFIG */ +-#endif ++ ++#endif /* _LINUX_MOUNT_CONFIG_H */ +diff --git a/utils/mount/mount_constants.h b/utils/mount/mount_constants.h +index cbfb099..4d050d8 100644 +--- a/utils/mount/mount_constants.h ++++ b/utils/mount/mount_constants.h +@@ -64,4 +64,8 @@ if we have a stack or plain mount - mount atop of it, forming a stack. */ + #define MS_MGC_MSK 0xffff0000 /* magic flag number mask */ + #endif + ++/* Generic options that are prevented from appearing ++ * in the options field in /etc/mtab. */ ++#define MS_NOMTAB (MS_REMOUNT) ++ + #endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */ +diff --git a/utils/mount/network.c b/utils/mount/network.c +index d612427..9b6504d 100644 +--- a/utils/mount/network.c ++++ b/utils/mount/network.c @@ -59,6 +59,8 @@ #define CONNECT_TIMEOUT (20) #define MOUNT_TIMEOUT (30) @@ -1203,7 +1954,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ extern int nfs_mount_data_version; extern char *progname; extern int verbose; -@@ -208,9 +210,6 @@ int nfs_lookup(const char *hostname, con +@@ -208,9 +210,6 @@ int nfs_lookup(const char *hostname, const sa_family_t family, { struct addrinfo *gai_results; struct addrinfo gai_hint = { @@ -1213,7 +1964,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ .ai_family = family, }; socklen_t len = *salen; -@@ -428,12 +427,12 @@ static int get_socket(struct sockaddr_in +@@ -428,12 +427,12 @@ static int get_socket(struct sockaddr_in *saddr, unsigned int p_prot, if (bindresvport(so, &laddr) < 0) goto err_bindresvport; } else { @@ -1228,7 +1979,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ timeout); if (cc < 0) goto err_connect; -@@ -756,11 +755,12 @@ int nfs_probe_bothports(const struct soc +@@ -756,11 +755,12 @@ int nfs_probe_bothports(const struct sockaddr *mnt_saddr, */ int probe_bothports(clnt_addr_t *mnt_server, clnt_addr_t *nfs_server) { @@ -1254,7 +2005,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ program, (rpcvers_t)1, IPPROTO_UDP); } -@@ -901,7 +901,7 @@ int nfs_advise_umount(const struct socka +@@ -901,7 +901,7 @@ int nfs_advise_umount(const struct sockaddr *sap, const socklen_t salen, */ int nfs_call_umount(clnt_addr_t *mnt_server, dirpath *argp) { @@ -1263,7 +2014,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ socklen_t salen = sizeof(mnt_server->saddr); struct pmap *pmap = &mnt_server->pmap; CLIENT *clnt; -@@ -1011,11 +1011,11 @@ int clnt_ping(struct sockaddr_in *saddr, +@@ -1011,11 +1011,11 @@ int clnt_ping(struct sockaddr_in *saddr, const unsigned long prog, struct sockaddr_in *caddr) { CLIENT *clnt = NULL; @@ -1277,7 +2028,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ sock = get_socket(saddr, prot, CONNECT_TIMEOUT, FALSE, TRUE); if (sock == RPC_ANYSOCK) { if (rpc_createerr.cf_error.re_errno == ETIMEDOUT) { -@@ -1058,18 +1058,18 @@ int clnt_ping(struct sockaddr_in *saddr, +@@ -1058,18 +1058,18 @@ int clnt_ping(struct sockaddr_in *saddr, const unsigned long prog, return 0; } memset(&clnt_res, 0, sizeof(clnt_res)); @@ -1300,7 +2051,7 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ return 1; else return 0; -@@ -1103,13 +1103,13 @@ static int nfs_ca_sockname(const struct +@@ -1103,13 +1103,13 @@ static int nfs_ca_sockname(const struct sockaddr *sap, const socklen_t salen, switch (sap->sa_family) { case AF_INET: @@ -1316,7 +2067,16 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ close(sock); return 0; } -@@ -1518,7 +1518,11 @@ nfs_mount_protocol(struct mount_options +@@ -1346,7 +1346,7 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port) + case PO_NOT_FOUND: + break; + case PO_FOUND: +- if (tmp >= 1 && tmp <= 65535) { ++ if (tmp >= 0 && tmp <= 65535) { + *port = tmp; + return 1; + } +@@ -1518,7 +1518,11 @@ nfs_mount_protocol(struct mount_options *options, unsigned long *protocol) * set @protocol to zero. The pmap protocol value will * be filled in later by an rpcbind query in this case. */ @@ -1329,10 +2089,20 @@ diff -up nfs-utils-1.2.3/utils/mount/network.c.orig nfs-utils-1.2.3/utils/mount/ } /* -diff -up nfs-utils-1.2.3/utils/mount/nfs.man.orig nfs-utils-1.2.3/utils/mount/nfs.man ---- nfs-utils-1.2.3/utils/mount/nfs.man.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/nfs.man 2010-12-13 15:04:23.939816552 -0500 -@@ -69,10 +69,9 @@ for details on specifying raw IPv6 addre +@@ -1534,7 +1538,7 @@ nfs_mount_port(struct mount_options *options, unsigned long *port) + case PO_NOT_FOUND: + break; + case PO_FOUND: +- if (tmp >= 1 && tmp <= 65535) { ++ if (tmp >= 0 && tmp <= 65535) { + *port = tmp; + return 1; + } +diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man +index 55d4b55..be91a25 100644 +--- a/utils/mount/nfs.man ++++ b/utils/mount/nfs.man +@@ -69,10 +69,9 @@ for details on specifying raw IPv6 addresses. .P The .I fstype @@ -1346,7 +2116,7 @@ diff -up nfs-utils-1.2.3/utils/mount/nfs.man.orig nfs-utils-1.2.3/utils/mount/nf .SH "MOUNT OPTIONS" Refer to .BR mount (8) -@@ -464,9 +463,9 @@ by other clients, but can impact applica +@@ -464,9 +463,9 @@ by other clients, but can impact application and server performance. .IP The DATA AND METADATA COHERENCE section contains a detailed discussion of these trade-offs. @@ -1367,7 +2137,7 @@ diff -up nfs-utils-1.2.3/utils/mount/nfs.man.orig nfs-utils-1.2.3/utils/mount/nf the server, trying version 4 first, version 3 second, and version 2 last. .TP 1.5i .BI vers= n -@@ -717,9 +716,53 @@ If this option is not specified, the NFS +@@ -717,9 +716,53 @@ If this option is not specified, the NFS client uses READDIRPLUS requests on NFS version 3 mounts to read small directories. Some applications perform better if the client uses only READDIR requests for all directories. @@ -1423,7 +2193,7 @@ diff -up nfs-utils-1.2.3/utils/mount/nfs.man.orig nfs-utils-1.2.3/utils/mount/nf .TP 1.5i .BI proto= netid The transport protocol name and protocol family the NFS client uses -@@ -1480,32 +1523,54 @@ of Access Control Lists that are semanti +@@ -1480,32 +1523,54 @@ of Access Control Lists that are semantically richer than POSIX ACLs. NFS version 4 ACLs are not fully compatible with POSIX ACLs; as such, some translation between the two is required in an environment that mixes POSIX ACLs and NFS version 4. @@ -1473,11 +2243,11 @@ diff -up nfs-utils-1.2.3/utils/mount/nfs.man.orig nfs-utils-1.2.3/utils/mount/nf +MNT operation. +These options are stored on disk by the NFS mount subcommand, +and can be erased by a remount. -+.P + .P +To ensure that the saved mount options are not erased during a remount, +specify either the local mount directory, or the server hostname and +export pathname, but not both, during a remount. For example, - .P ++.P +.NF +.TA 2.5i + mount -o remount,ro /mnt @@ -1494,9 +2264,10 @@ diff -up nfs-utils-1.2.3/utils/mount/nfs.man.orig nfs-utils-1.2.3/utils/mount/nf Before 2.4.7, the Linux NFS client did not support NFS over TCP. .P Before 2.4.20, the Linux NFS client used a heuristic -diff -up nfs-utils-1.2.3/utils/mount/nfsumount.c.orig nfs-utils-1.2.3/utils/mount/nfsumount.c ---- nfs-utils-1.2.3/utils/mount/nfsumount.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/nfsumount.c 2010-12-13 15:04:23.979808328 -0500 +diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c +index 1514340..02d40ff 100644 +--- a/utils/mount/nfsumount.c ++++ b/utils/mount/nfsumount.c @@ -31,12 +31,16 @@ #include "nls.h" @@ -1514,7 +2285,7 @@ diff -up nfs-utils-1.2.3/utils/mount/nfsumount.c.orig nfs-utils-1.2.3/utils/moun #if !defined(MNT_FORCE) /* dare not try to include -- lots of errors */ #define MNT_FORCE 1 -@@ -109,7 +113,7 @@ static int del_mtab(const char *spec, co +@@ -109,7 +113,7 @@ static int del_mtab(const char *spec, const char *node) res = try_remount(spec, node); if (res) goto writemtab; @@ -1523,7 +2294,7 @@ diff -up nfs-utils-1.2.3/utils/mount/nfsumount.c.orig nfs-utils-1.2.3/utils/moun } else umnt_err = errno; } -@@ -127,7 +131,7 @@ static int del_mtab(const char *spec, co +@@ -127,7 +131,7 @@ static int del_mtab(const char *spec, const char *node) } if (res >= 0) @@ -1532,7 +2303,7 @@ diff -up nfs-utils-1.2.3/utils/mount/nfsumount.c.orig nfs-utils-1.2.3/utils/moun if (umnt_err) umount_error(umnt_err, node); -@@ -241,6 +245,91 @@ static int nfs_umount23(const char *devn +@@ -241,6 +245,91 @@ static int nfs_umount23(const char *devname, char *string) return result; } @@ -1659,10 +2430,11 @@ diff -up nfs-utils-1.2.3/utils/mount/nfsumount.c.orig nfs-utils-1.2.3/utils/moun } else if (*spec != '/') { if (!lazy) ret = nfs_umount23(spec, "tcp,v3"); -diff -up nfs-utils-1.2.3/utils/mount/parse_opt.c.orig nfs-utils-1.2.3/utils/mount/parse_opt.c ---- nfs-utils-1.2.3/utils/mount/parse_opt.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/parse_opt.c 2010-12-13 15:04:23.979808328 -0500 -@@ -508,7 +508,7 @@ po_found_t po_get_numeric(struct mount_o +diff --git a/utils/mount/parse_opt.c b/utils/mount/parse_opt.c +index f0918f7..ab869d9 100644 +--- a/utils/mount/parse_opt.c ++++ b/utils/mount/parse_opt.c +@@ -508,7 +508,7 @@ po_found_t po_get_numeric(struct mount_options *options, char *keyword, long *va int po_rightmost(struct mount_options *options, const char *keys[]) { struct mount_option *option; @@ -1671,9 +2443,10 @@ diff -up nfs-utils-1.2.3/utils/mount/parse_opt.c.orig nfs-utils-1.2.3/utils/moun if (options) { for (option = options->tail; option; option = option->prev) { -diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/stropts.c ---- nfs-utils-1.2.3/utils/mount/stropts.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/stropts.c 2010-12-13 15:04:24.000804010 -0500 +diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c +index 50a1a2a..f1aa503 100644 +--- a/utils/mount/stropts.c ++++ b/utils/mount/stropts.c @@ -49,10 +49,6 @@ #include "parse_dev.h" #include "conffile.h" @@ -1685,7 +2458,16 @@ diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/ #ifndef NFS_PROGRAM #define NFS_PROGRAM (100003) #endif -@@ -123,10 +119,12 @@ inline void nfs_default_version(struct n +@@ -114,7 +110,7 @@ static void nfs_default_version(struct nfsmount_info *mi) + } + } + #else +-inline void nfs_default_version(struct nfsmount_info *mi) {} ++inline void nfs_default_version(__attribute__ ((unused)) struct nfsmount_info *mi) {} + #endif /* MOUNT_CONFIG */ + + /* +@@ -123,10 +119,12 @@ inline void nfs_default_version(struct nfsmount_info *mi) {} * Returns a time_t timeout timestamp, in seconds. */ static time_t nfs_parse_retry_option(struct mount_options *options, @@ -1699,7 +2481,7 @@ diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/ switch (po_get_numeric(options, "retry", &tmp)) { case PO_NOT_FOUND: break; -@@ -135,6 +133,7 @@ static time_t nfs_parse_retry_option(str +@@ -135,6 +133,7 @@ static time_t nfs_parse_retry_option(struct mount_options *options, timeout_minutes = tmp; break; } @@ -1707,7 +2489,7 @@ diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/ case PO_BAD_VALUE: if (verbose) nfs_error(_("%s: invalid retry timeout was specified; " -@@ -142,7 +141,7 @@ static time_t nfs_parse_retry_option(str +@@ -142,7 +141,7 @@ static time_t nfs_parse_retry_option(struct mount_options *options, break; } @@ -1716,7 +2498,7 @@ diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/ } /* -@@ -343,7 +342,6 @@ static int nfs_validate_options(struct n +@@ -343,7 +342,6 @@ static int nfs_validate_options(struct nfsmount_info *mi) { struct addrinfo hint = { .ai_protocol = (int)IPPROTO_UDP, @@ -1724,7 +2506,7 @@ diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/ }; sa_family_t family; int error; -@@ -570,16 +568,18 @@ static int nfs_sys_mount(struct nfsmount +@@ -570,16 +568,18 @@ static int nfs_sys_mount(struct nfsmount_info *mi, struct mount_options *opts) char *options = NULL; int result; @@ -1764,10 +2546,11 @@ diff -up nfs-utils-1.2.3/utils/mount/stropts.c.orig nfs-utils-1.2.3/utils/mount/ for (ai = mi->address; ai != NULL; ai = ai->ai_next) { ret = nfs_do_mount_v4(mi, ai->ai_addr, ai->ai_addrlen); -diff -up nfs-utils-1.2.3/utils/mount/version.h.orig nfs-utils-1.2.3/utils/mount/version.h ---- nfs-utils-1.2.3/utils/mount/version.h.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/mount/version.h 2010-12-13 15:04:24.007802570 -0500 -@@ -42,9 +42,9 @@ static inline unsigned int linux_version +diff --git a/utils/mount/version.h b/utils/mount/version.h +index 46552a1..af61a6f 100644 +--- a/utils/mount/version.h ++++ b/utils/mount/version.h +@@ -42,9 +42,9 @@ static inline unsigned int linux_version_code(void) if (uname(&my_utsname)) return 0; @@ -1780,9 +2563,70 @@ diff -up nfs-utils-1.2.3/utils/mount/version.h.orig nfs-utils-1.2.3/utils/mount/ return MAKE_VERSION(p, q, r); } -diff -up nfs-utils-1.2.3/utils/nfsidmap/Makefile.am.orig nfs-utils-1.2.3/utils/nfsidmap/Makefile.am ---- nfs-utils-1.2.3/utils/nfsidmap/Makefile.am.orig 2010-12-13 15:04:24.052793317 -0500 -+++ nfs-utils-1.2.3/utils/nfsidmap/Makefile.am 2010-12-13 15:04:24.052793317 -0500 +diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c +index d309950..035624c 100644 +--- a/utils/mountd/mountd.c ++++ b/utils/mountd/mountd.c +@@ -99,12 +99,9 @@ static int version_any(void) + static void + unregister_services (void) + { +- if (version2()) { +- nfs_svc_unregister(MOUNTPROG, MOUNTVERS); +- nfs_svc_unregister(MOUNTPROG, MOUNTVERS_POSIX); +- } +- if (version3()) +- nfs_svc_unregister(MOUNTPROG, MOUNTVERS_NFSV3); ++ nfs_svc_unregister(MOUNTPROG, MOUNTVERS); ++ nfs_svc_unregister(MOUNTPROG, MOUNTVERS_POSIX); ++ nfs_svc_unregister(MOUNTPROG, MOUNTVERS_NFSV3); + } + + static void +@@ -840,6 +837,7 @@ main(int argc, char **argv) + if (new_cache) + cache_open(); + ++ unregister_services(); + if (version2()) { + listeners += nfs_svc_create("mountd", MOUNTPROG, + MOUNTVERS, mount_dispatch, port); +diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man +index 4bb96e8..016a357 100644 +--- a/utils/mountd/mountd.man ++++ b/utils/mountd/mountd.man +@@ -106,11 +106,11 @@ This option can be used to request that + .B rpc.mountd + do not offer certain versions of NFS. The current version of + .B rpc.mountd +-can support both NFS version 2 and the newer version 3. If the +-NFS kernel module was compiled without support for NFSv3, ++can support both NFS version 2, 3 and 4. If the ++either one of these version should not be offered, + .B rpc.mountd + must be invoked with the option +-.B "\-\-no-nfs-version 3" . ++.B "\-\-no-nfs-version " . + .TP + .B \-n " or " \-\-no-tcp + Don't advertise TCP for mount. +diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c +index d339296..527377f 100644 +--- a/utils/mountd/rmtab.c ++++ b/utils/mountd/rmtab.c +@@ -205,6 +205,7 @@ mountlist_list(void) + } + if (stb.st_mtime != last_mtime) { + mountlist_freeall(mlist); ++ mlist = NULL; + last_mtime = stb.st_mtime; + + setrmtabent("r"); +diff --git a/utils/nfsidmap/Makefile.am b/utils/nfsidmap/Makefile.am +new file mode 100644 +index 0000000..f837b91 +--- /dev/null ++++ b/utils/nfsidmap/Makefile.am @@ -0,0 +1,9 @@ +## Process this file with automake to produce Makefile.in + @@ -1793,9 +2637,11 @@ diff -up nfs-utils-1.2.3/utils/nfsidmap/Makefile.am.orig nfs-utils-1.2.3/utils/n +nfsidmap_LDADD = -lnfsidmap -lkeyutils + +MAINTAINERCLEANFILES = Makefile.in -diff -up nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.c.orig nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.c ---- nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.c.orig 2010-12-13 15:04:24.067790234 -0500 -+++ nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.c 2010-12-13 15:04:24.067790234 -0500 +diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c +new file mode 100644 +index 0000000..2d87381 +--- /dev/null ++++ b/utils/nfsidmap/nfsidmap.c @@ -0,0 +1,118 @@ + +#include @@ -1915,9 +2761,11 @@ diff -up nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.c.orig nfs-utils-1.2.3/utils/nf + free(arg); + return rc; +} -diff -up nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.man.orig nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.man ---- nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.man.orig 2010-12-13 15:04:24.068790029 -0500 -+++ nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.man 2010-12-13 15:04:24.068790029 -0500 +diff --git a/utils/nfsidmap/nfsidmap.man b/utils/nfsidmap/nfsidmap.man +new file mode 100644 +index 0000000..6c1a2d4 +--- /dev/null ++++ b/utils/nfsidmap/nfsidmap.man @@ -0,0 +1,60 @@ +.\" +.\"@(#)nfsidmap(8) - The NFS idmapper upcall program @@ -1979,10 +2827,11 @@ diff -up nfs-utils-1.2.3/utils/nfsidmap/nfsidmap.man.orig nfs-utils-1.2.3/utils/ +/usr/sbin/nfsidmap will handle gid, user, and group lookups. +.SH AUTHOR +Bryan Schumaker, -diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.c.orig nfs-utils-1.2.3/utils/nfsstat/nfsstat.c ---- nfs-utils-1.2.3/utils/nfsstat/nfsstat.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/nfsstat/nfsstat.c 2010-12-13 15:04:24.085786533 -0500 -@@ -46,7 +46,7 @@ static unsigned int cltproc3info[CLTPROC +diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c +index bacef8e..f31bb81 100644 +--- a/utils/nfsstat/nfsstat.c ++++ b/utils/nfsstat/nfsstat.c +@@ -46,7 +46,7 @@ static unsigned int cltproc3info[CLTPROC3_SZ+2], static unsigned int srvproc4info[SRVPROC4_SZ+2], srvproc4info_old[SRVPROC4_SZ+2]; /* NFSv4 call counts ([0] == 2) */ static unsigned int cltproc4info[CLTPROC4_SZ+2], @@ -2043,7 +2892,7 @@ diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.c.orig nfs-utils-1.2.3/utils/nfss if (opt_prt & PRNT_NET) { if (opt_sleep && !has_rpcstats(srvnetinfo, 4)) { } else { -@@ -582,31 +582,29 @@ print_server_stats(int opt_srv, int opt_ +@@ -582,31 +582,29 @@ print_server_stats(int opt_srv, int opt_prt) printf("\n"); } if (opt_prt & PRNT_CALLS) { @@ -2085,7 +2934,7 @@ diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.c.orig nfs-utils-1.2.3/utils/nfss print_callstats( LABEL_srvproc4, nfssrvproc4name, srvproc4info + 1, sizeof(nfssrvproc4name)/sizeof(char *)); -@@ -618,11 +616,8 @@ print_server_stats(int opt_srv, int opt_ +@@ -618,11 +616,8 @@ print_server_stats(int opt_srv, int opt_prt) } } static void @@ -2098,7 +2947,7 @@ diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.c.orig nfs-utils-1.2.3/utils/nfss if (opt_prt & PRNT_NET) { if (opt_sleep && !has_rpcstats(cltnetinfo, 4)) { ; -@@ -644,31 +639,28 @@ print_client_stats(int opt_clt, int opt_ +@@ -644,31 +639,28 @@ print_client_stats(int opt_clt, int opt_prt) } } if (opt_prt & PRNT_CALLS) { @@ -2241,10 +3090,11 @@ diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.c.orig nfs-utils-1.2.3/utils/nfss } static int has_rpcstats(const unsigned int *info, int size) -diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.man.orig nfs-utils-1.2.3/utils/nfsstat/nfsstat.man ---- nfs-utils-1.2.3/utils/nfsstat/nfsstat.man.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/nfsstat/nfsstat.man 2010-12-13 15:04:24.085786533 -0500 -@@ -30,10 +30,12 @@ Print only NFS v2 statistics. The defaul +diff --git a/utils/nfsstat/nfsstat.man b/utils/nfsstat/nfsstat.man +index 52215a9..cd573b0 100644 +--- a/utils/nfsstat/nfsstat.man ++++ b/utils/nfsstat/nfsstat.man +@@ -30,10 +30,12 @@ Print only NFS v2 statistics. The default is to only print information about the versions of \fBNFS\fR that have non-zero counts. .TP .B \-3 @@ -2259,9 +3109,10 @@ diff -up nfs-utils-1.2.3/utils/nfsstat/nfsstat.man.orig nfs-utils-1.2.3/utils/nf .TP .B \-m, \-\-mounts Print information about each of the mounted \fBNFS\fR file systems. -diff -up nfs-utils-1.2.3/utils/statd/hostname.c.orig nfs-utils-1.2.3/utils/statd/hostname.c ---- nfs-utils-1.2.3/utils/statd/hostname.c.orig 2010-09-28 08:24:16.000000000 -0400 -+++ nfs-utils-1.2.3/utils/statd/hostname.c 2010-12-13 15:04:24.120779335 -0500 +diff --git a/utils/statd/hostname.c b/utils/statd/hostname.c +index 38f2265..616a3cb 100644 +--- a/utils/statd/hostname.c ++++ b/utils/statd/hostname.c @@ -39,10 +39,6 @@ #include "statd.h" #include "xlog.h" @@ -2273,10 +3124,11 @@ diff -up nfs-utils-1.2.3/utils/statd/hostname.c.orig nfs-utils-1.2.3/utils/statd /** * statd_present_address - convert sockaddr to presentation address * @sap: pointer to socket address to convert -diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c ---- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig 2010-12-13 15:03:49.283943983 -0500 -+++ nfs-utils-1.2.3/utils/statd/sm-notify.c 2010-12-13 15:04:24.135776251 -0500 -@@ -37,8 +37,9 @@ +diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c +index 437e37a..1f490b0 100644 +--- a/utils/statd/sm-notify.c ++++ b/utils/statd/sm-notify.c +@@ -34,8 +34,9 @@ #include "nsm.h" #include "nfsrpc.h" @@ -2288,7 +3140,7 @@ diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/stat #endif #define NSM_TIMEOUT 2 -@@ -81,7 +82,6 @@ smn_lookup(const char *name) +@@ -78,7 +79,6 @@ smn_lookup(const char *name) { struct addrinfo *ai = NULL; struct addrinfo hint = { @@ -2296,7 +3148,7 @@ diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/stat .ai_family = (nsm_family == AF_INET ? AF_INET: AF_UNSPEC), .ai_protocol = (int)IPPROTO_UDP, }; -@@ -257,6 +257,7 @@ smn_bind_address(const char *srcaddr, co +@@ -253,6 +253,7 @@ smn_bind_address(const char *srcaddr, const char *srcport) if (srcaddr == NULL) hint.ai_flags |= AI_PASSIVE; diff --git a/nfs-utils-1.2.3-mountd-mlist.patch b/nfs-utils-1.2.3-mountd-mlist.patch deleted file mode 100644 index 568ed56..0000000 --- a/nfs-utils-1.2.3-mountd-mlist.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up nfs-utils-1.2.3/utils/mountd/rmtab.c.orig nfs-utils-1.2.3/utils/mountd/rmtab.c ---- nfs-utils-1.2.3/utils/mountd/rmtab.c.orig 2011-01-25 11:09:29.484980000 -0500 -+++ nfs-utils-1.2.3/utils/mountd/rmtab.c 2011-01-25 11:09:40.693309000 -0500 -@@ -205,6 +205,7 @@ mountlist_list(void) - } - if (stb.st_mtime != last_mtime) { - mountlist_freeall(mlist); -+ mlist = NULL; - last_mtime = stb.st_mtime; - - setrmtabent("r"); diff --git a/nfs-utils.spec b/nfs-utils.spec index acd163e..6b7e531 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser Name: nfs-utils URL: http://sourceforge.net/projects/nfs Version: 1.2.3 -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 1 # group all 32bit related archs @@ -18,7 +18,6 @@ Source14: rpcsvcgssd.init Source15: nfs.sysconfig Patch001: nfs-utils-1.2.4-rc5.patch -Patch002: nfs-utils-1.2.3-mountd-mlist.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.2-statdpath.patch @@ -73,7 +72,6 @@ This package also contains the mount.nfs and umount.nfs program. %setup -q %patch001 -p1 -%patch002 -p1 %patch100 -p1 %patch101 -p1 @@ -255,6 +253,9 @@ fi %attr(4755,root,root) /sbin/umount.nfs4 %changelog +* Mon Mar 7 2011 Steve Dickson 1.2.3-11 +- Updated to latest upstream release: nfs-utils-1-2-4-rc6 + * Wed Feb 09 2011 Christopher Aillon - 1.2.3-10 - Rebuild against newer libevent