代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/autofs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
autofs-5.1.4 - fix NFS version mask usage
From: Ian Kent <raven@themaw.net>
Upstream commit a8af65195 changed NFS_VERS_MASK to exclude NFSv2
so NFSv2 would be excluded in the default availability probe.
But NFS_VERS_MASK is used like a mask elsewhere and causes NFSv2
to be cleared for the availability probe even when it is requested.
So add a macro to NFS_VERS_DEFAULT (and accompanying macros) to be
used to set initial defaults and restore NFS_VERS_MASK to what it
should be when used as a mask.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
include/replicated.h | 5 ++++-
modules/mount_nfs.c | 6 +++---
3 files changed, 8 insertions(+), 4 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -23,6 +23,7 @@ xx/xx/2018 autofs-5.1.5
- tiny patch for autofs typo and possible bug.
- add units After line to include statd service.
- use systemd sd_notify() at startup.
+- fix NFS version mask usage.
19/12/2017 autofs-5.1.4
- fix spec file url.
--- autofs-5.1.4.orig/include/replicated.h
+++ autofs-5.1.4/include/replicated.h
@@ -26,7 +26,9 @@
#define NFS2_SUPPORTED 0x0010
#define NFS3_SUPPORTED 0x0020
#define NFS4_SUPPORTED 0x0040
-#define NFS_VERS_MASK (NFS3_SUPPORTED)
+#define NFS_VERS_DEFAULT (NFS3_SUPPORTED)
+#define NFS_VERS_MASK (NFS2_SUPPORTED|NFS3_SUPPORTED)
+#define NFS4_VERS_DEFAULT (NFS4_SUPPORTED)
#define NFS4_VERS_MASK (NFS4_SUPPORTED)
#define NFS2_REQUESTED NFS2_SUPPORTED
@@ -39,6 +41,7 @@
#define UDP_REQUESTED UDP_SUPPORTED
#define TCP6_REQUESTED 0x0100
#define UDP6_REQUESTED 0x0200
+#define NFS_PROTO_DEFAULT (TCP_SUPPORTED|UDP_SUPPORTED)
#define NFS_PROTO_MASK (TCP_SUPPORTED|UDP_SUPPORTED)
#define NFS2_TCP_SUPPORTED NFS2_SUPPORTED
--- autofs-5.1.4.orig/modules/mount_nfs.c
+++ autofs-5.1.4/modules/mount_nfs.c
@@ -86,11 +86,11 @@ int mount_mount(struct autofs_point *ap,
root, name, what, fstype, options);
mount_default_proto = defaults_get_mount_nfs_default_proto();
- vers = NFS_VERS_MASK | NFS_PROTO_MASK;
+ vers = NFS_VERS_DEFAULT | NFS_PROTO_DEFAULT;
if (strcmp(fstype, "nfs4") == 0)
- vers = NFS4_VERS_MASK | TCP_SUPPORTED;
+ vers = NFS4_VERS_DEFAULT | TCP_SUPPORTED;
else if (mount_default_proto == 4)
- vers = vers | NFS4_VERS_MASK;
+ vers = vers | NFS4_VERS_DEFAULT;
/* Extract "nosymlink" pseudo-option which stops local filesystems
* from being symlinked.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。