File autofs-5.1.6-remove-intr-hosts-map-mount-option.patch of Package autofs.34435
From 90d73999c59953e7fe391fac69c7f6b880cda738 Mon Sep 17 00:00:00 2001
From: Ian Kent <raven@themaw.net>
Date: Thu, 21 May 2020 12:44:38 +0800
Subject: [PATCH] autofs-5.1.6 - remove intr hosts map mount option
Don't use the intr option on NFS mounts by default, it's been ignored
by the kernel for a long time now.
Signed-off-by: Ian Kent <raven@themaw.net>
---
man/auto.master.5.in | 4 ++--
man/autofs.5 | 4 ++--
modules/parse_sun.c | 9 +++------
samples/auto.misc | 2 +-
samples/auto.net | 2 +-
6 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/man/auto.master.5.in b/man/auto.master.5.in
index 2a0b672..72fbfd2 100644
--- a/man/auto.master.5.in
+++ b/man/auto.master.5.in
@@ -231,8 +231,8 @@ For example, with an entry in the master map of
accessing /net/myserver will mount exports from myserver on directories below
/net/myserver.
.P
-NOTE: mounts done from a hosts map will be mounted with the "nosuid,nodev,intr" options
-unless overridden by explicily specifying the "suid", "dev" or "nointr" options in the
+NOTE: mounts done from a hosts map will be mounted with the "nosuid,nodev" options
+unless overridden by explicitly specifying the "suid", "dev" options in the
master map entry.
.SH LDAP MAPS
If the map type \fBldap\fP is specified the mapname is of the form
diff --git a/man/autofs.5 b/man/autofs.5
index d32e772..569a268 100644
--- a/man/autofs.5
+++ b/man/autofs.5
@@ -86,13 +86,13 @@ Indirect map:
.RS +.2i
.ta 1.0i 3.0i
.nf
-kernel \-ro,soft,intr ftp.kernel.org:/pub/linux
+kernel \-ro,soft ftp.kernel.org:/pub/linux
boot \-fstype=ext2 :/dev/hda1
windoze \-fstype=smbfs ://windoze/c
removable \-fstype=ext2 :/dev/hdd
cd \-fstype=iso9660,ro :/dev/hdc
floppy \-fstype=auto :/dev/fd0
-server \-rw,hard,intr / \-ro myserver.me.org:/ \\
+server \-rw,hard / \-ro myserver.me.org:/ \\
/usr myserver.me.org:/usr \\
/home myserver.me.org:/home
.fi
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 88dde0b..71867ef 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -618,10 +618,9 @@ static int sun_mount(struct autofs_point *ap, const char *root,
int len = strlen(options);
int suid = strstr(options, "suid") ? 0 : 7;
int dev = strstr(options, "dev") ? 0 : 6;
- int nointr = strstr(options, "nointr") ? 0 : 5;
- if (suid || dev || nointr) {
- char *tmp = alloca(len + suid + dev + nointr + 1);
+ if (suid || dev) {
+ char *tmp = alloca(len + suid + dev + 1);
if (!tmp) {
error(ap->logopt, MODPREFIX
"alloca failed for options");
@@ -635,8 +634,6 @@ static int sun_mount(struct autofs_point *ap, const char *root,
strcat(tmp, ",nosuid");
if (dev)
strcat(tmp, ",nodev");
- if (nointr)
- strcat(tmp, ",intr");
options = tmp;
}
} else {
@@ -648,7 +645,7 @@ static int sun_mount(struct autofs_point *ap, const char *root,
return -1;
return 1;
}
- strcpy(tmp, "nosuid,nodev,intr");
+ strcpy(tmp, "nosuid,nodev");
options = tmp;
}
}
diff --git a/samples/auto.misc b/samples/auto.misc
index 0ee5e75..fdda0e7 100644
--- a/samples/auto.misc
+++ b/samples/auto.misc
@@ -6,7 +6,7 @@
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
# the following entries are samples to pique your imagination
-#linux -ro,soft,intr ftp.example.org:/pub/linux
+#linux -ro,soft ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
diff --git a/samples/auto.net b/samples/auto.net
index 0384f61..c5b145d 100755
--- a/samples/auto.net
+++ b/samples/auto.net
@@ -9,7 +9,7 @@ key="$1"
# add "nosymlink" here if you want to suppress symlinking local filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
-opts="-fstype=nfs,hard,intr,nodev,nosuid"
+opts="-fstype=nfs,hard,nodev,nosuid"
for P in /bin /sbin /usr/bin /usr/sbin
do
--
2.35.3