]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
nfsd: Disble NFS 4.1 functionality by default
authorSteve Dickson <steved@redhat.com>
Wed, 17 Feb 2010 19:38:19 +0000 (14:38 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 17 Feb 2010 19:38:19 +0000 (14:38 -0500)
Due to the fact the current kernel code do not completely
conform to the NFS 4.1 RFC, this patch disable the 4.1 support
on the server.

To control this 41 functionality, the NFS41_SUPPORTED
configuration variable now exist that will allow us to
re enable the functionality  without any code changes.

Signed-off-by: Steve Dickson <steved@redhat.com>
configure.ac
support/include/nfs/nfs.h

index 1dc42496af2459904ca37458da43ae130ae35630..f6b11891c8c2f4156cae5f79f7be13212db8eb5d 100644 (file)
@@ -72,6 +72,20 @@ AC_ARG_ENABLE(nfsv4,
        AC_SUBST(IDMAPD)
        AC_SUBST(enable_nfsv4)
        AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
+
+AC_ARG_ENABLE(nfsv41,
+       [AC_HELP_STRING([--enable-nfsv41],
+                        [enable support for NFSv41 @<:@default=no@:>@])],
+       enable_nfsv41=$enableval,
+       enable_nfsv41=no)
+       if test "$enable_nfsv41" = yes; then
+               AC_DEFINE(NFS41_SUPPORTED, 1, [Define this if you want NFSv41 support compiled in])
+       else
+               enable_nfsv4=
+       fi
+       AC_SUBST(enable_nfsv41)
+       AM_CONDITIONAL(CONFIG_NFSV41, [test "$enable_nfsv41" = "yes"])
+
 AC_ARG_ENABLE(gss,
        [AC_HELP_STRING([--enable-gss],
                         [enable support for rpcsec_gss @<:@default=yes@:>@])],
index a64eb0a7fc0768191d425e2b6972d9071aa97000..c939d78105b6599857d659b9ba99178e85c98aa4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _NFS_NFS_H
 #define _NFS_NFS_H
 
+#include <config.h>
+
 #include <linux/posix_types.h>
 #include <sys/types.h>
 #include <netinet/in.h>
 #define NFSD_MAXVERS 4
 
 #define NFSD_MINMINORVERS4 1
+#ifdef  NFS41_SUPPORTED
 #define NFSD_MAXMINORVERS4 1
+#else
+#define NFSD_MAXMINORVERS4 0
+#endif
 
 struct nfs_fh_len {
        int             fh_size;