diff --git a/nfs-utils-1.0.12-export-nosubtree.patch b/nfs-utils-1.0.12-export-nosubtree.patch new file mode 100644 index 0000000..b62a32b --- /dev/null +++ b/nfs-utils-1.0.12-export-nosubtree.patch @@ -0,0 +1,83 @@ +--- nfs-utils-1.0.12/support/nfs/exports.c.orig 2007-02-26 23:55:40.000000000 -0500 ++++ nfs-utils-1.0.12/support/nfs/exports.c 2007-03-09 12:25:37.000000000 -0500 +@@ -32,7 +32,8 @@ + #include "xio.h" + + #define EXPORT_DEFAULT_FLAGS \ +- (NFSEXP_READONLY|NFSEXP_ROOTSQUASH|NFSEXP_GATHERED_WRITES) ++ (NFSEXP_READONLY|NFSEXP_ROOTSQUASH|NFSEXP_GATHERED_WRITES|\ ++ NFSEXP_NOSUBTREECHECK) + + int export_errno; + +@@ -45,7 +46,7 @@ static int *squids = NULL, nsquids = 0, + + static int getexport(char *exp, int len); + static int getpath(char *path, int len); +-static int parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr); ++static int parseopts(char *cp, struct exportent *ep); + static int parsesquash(char *list, int **idp, int *lenp, char **ep); + static int parsenum(char **cpp); + static int parsemaptype(char *type); +@@ -122,7 +123,7 @@ getexportent(int fromkernel, int fromexp + + /* Check for default options */ + if (exp[0] == '-') { +- if (parseopts(exp + 1, &def_ee, 0, &has_default_subtree_opts) < 0) ++ if (parseopts(exp + 1, &def_ee) < 0) + return NULL; + + has_default_opts = 1; +@@ -166,7 +167,7 @@ getexportent(int fromkernel, int fromexp + strncpy(ee.e_hostname, hostname, sizeof (ee.e_hostname) - 1); + ee.e_hostname[sizeof (ee.e_hostname) - 1] = '\0'; + +- if (parseopts(opt, &ee, fromexports && !has_default_subtree_opts, NULL) < 0) ++ if (parseopts(opt, &ee) < 0) + return NULL; + + /* resolve symlinks */ +@@ -343,7 +344,7 @@ mkexportent(char *hname, char *path, cha + ee.e_path[sizeof (ee.e_path) - 1] = '\0'; + strncpy (ee.m_path, ee.e_path, sizeof (ee.m_path) - 1); + ee.m_path [sizeof (ee.m_path) - 1] = '\0'; +- if (parseopts(options, &ee, 0, NULL) < 0) ++ if (parseopts(options, &ee) < 0) + return NULL; + return ⅇ + } +@@ -351,7 +352,7 @@ mkexportent(char *hname, char *path, cha + int + updateexportent(struct exportent *eep, char *options) + { +- if (parseopts(options, eep, 0, NULL) < 0) ++ if (parseopts(options, eep) < 0) + return 0; + return 1; + } +@@ -371,7 +372,7 @@ static int valid_uuid(char *uuid) + * Parse option string pointed to by cp and set mount options accordingly. + */ + static int +-parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr) ++parseopts(char *cp, struct exportent *ep) + { + int had_subtree_opt = 0; + char *flname = efname?efname:"command line"; +@@ -539,16 +540,6 @@ bad_option: + ep->e_nsqgids = nsqgids; + + out: +- if (warn && !had_subtree_opt) +- xlog(L_WARNING, "%s [%d]: Neither 'subtree_check' or 'no_subtree_check' specified for export \"%s:%s\".\n" +- " Assuming default behaviour ('subtree_check').\n" +- " NOTE: this default will change with nfs-utils version 1.1.0\n", +- +- flname, flline, +- ep->e_hostname, ep->e_path); +- if (had_subtree_opt_ptr) +- *had_subtree_opt_ptr = had_subtree_opt; +- + return 1; + } + diff --git a/nfs-utils.spec b/nfs-utils.spec index 2c1adfc..ad122e3 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -30,6 +30,7 @@ Patch51: nfs-utils-1.0.6-mountd.patch Patch52: nfs-utils-1.0.6-idmap.conf.patch Patch53: nfs-utils-1.0.6-gssd_mixed_case.patch Patch54: nfs-utils-1.0.8-privports.patch +Patch55: nfs-utils-1.0.12-export-nosubtree.patch %if %{enablemount} Patch70: nfs-utils-1.0.9-mount-options-v3.patch @@ -71,8 +72,8 @@ Requires: modutils >= 2.4.26-9 BuildPrereq: nfs-utils-lib-devel libevent-devel libgssapi-devel BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2 BuildRequires: nfs-utils-lib-devel >= 1.0.8-2 -BuildRequires: libevent-devel libgssapi-devel krb5-devel BuildRequires: automake, libtool, tcp_wrappers-devel +BuildRequires: automake, libtool PreReq: shadow-utils >= 4.0.3-25 PreReq: /sbin/chkconfig /sbin/nologin PreReq: nfs-utils-lib >= 1.0.8-2 libevent libgssapi @@ -287,6 +288,7 @@ fi %changelog * Fri Mar 9 2007 Steve Dickson 1.0.12-2 - Added condstop to all the initscripts (bz 196934) +- Made no_subtree_check a default export option (bz 212218) * Tue Mar 6 2007 Steve Dickson 1.0.12-1 - Upgraded to 1.0.12