File 0005-Revert-nfsd-Remove-the-ability-to-enable-NFS-v2.patch of Package nfs-utils.39260

From b2483064c7dc115cad9d0f1f7964f1524fa7c3cf Mon Sep 17 00:00:00 2001
From: Anthony Iliopoulos <ailiop@suse.com>
Date: Wed, 16 Oct 2024 16:00:50 +0200
Subject: [PATCH] Revert "nfsd: Remove the ability to enable NFS v2."
References: bsc#1230914

This reverts commit 2c2c36c59fa1de2ff7fd28917e54700ecb39b730.

---
 nfs.conf            | 1 +
 utils/nfsd/nfsd.c   | 2 ++
 utils/nfsd/nfsd.man | 4 ++--
 3 files changed, 5 insertions(+), 2 deletions(-)

Index: nfs-utils-2.6.4/nfs.conf
===================================================================
--- nfs-utils-2.6.4.orig/nfs.conf
+++ nfs-utils-2.6.4/nfs.conf
@@ -72,6 +72,7 @@
 # lease-time=90
 # udp=n
 # tcp=y
+# vers2=n
 # vers3=y
 # vers4=y
 # vers4.0=y
Index: nfs-utils-2.6.4/utils/nfsd/nfsd.c
===================================================================
--- nfs-utils-2.6.4.orig/utils/nfsd/nfsd.c
+++ nfs-utils-2.6.4/utils/nfsd/nfsd.c
@@ -233,6 +233,7 @@ main(int argc, char **argv)
 				}
 				/* FALLTHRU */
 			case 3:
+			case 2:
 				NFSCTL_VERUNSET(versbits, c);
 				break;
 			default:
@@ -257,6 +258,7 @@ main(int argc, char **argv)
 					minorvers = minorversset = minormask;
 				/* FALLTHRU */
 			case 3:
+			case 2:
 				NFSCTL_VERSET(versbits, c);
 				break;
 			default:
Index: nfs-utils-2.6.4/utils/nfsd/nfsd.man
===================================================================
--- nfs-utils-2.6.4.orig/utils/nfsd/nfsd.man
+++ nfs-utils-2.6.4/utils/nfsd/nfsd.man
@@ -65,7 +65,7 @@ This option can be used to request that
 .B rpc.nfsd
 does not offer certain versions of NFS. The current version of
 .B rpc.nfsd
-can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
+can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
 .TP
 .B \-s " or " \-\-syslog
 By default,
@@ -92,7 +92,7 @@ This option can be used to request that
 .B rpc.nfsd
 offer certain versions of NFS. The current version of
 .B rpc.nfsd
-can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
+can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
 .TP
 .B \-L " or " \-\-lease-time seconds
 Set the lease-time used for NFSv4.  This corresponds to how often
openSUSE Build Service is sponsored by