autofs/autofs-5.1.6-remove-intr-hosts-map-mount-option.patch
Petr Šabata a275d04aab RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/autofs#1cda5aaae19a25dd9afa10a9ed1763ac59640019
2020-10-14 22:07:18 +02:00

126 lines
4.1 KiB
Diff

autofs-5.1.6 - remove intr hosts map mount option
From: Ian Kent <raven@themaw.net>
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>
---
CHANGELOG | 1 +
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/CHANGELOG b/CHANGELOG
index 106b811c..fa5992aa 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ xx/xx/2020 autofs-5.1.7
- fix a regression with map instance lookup.
- correct fsf address.
- samples: fix Makefile targets' directory dependencies
+- remove intr hosts map mount option.
07/10/2019 autofs-5.1.6
- support strictexpire mount option.
diff --git a/man/auto.master.5.in b/man/auto.master.5.in
index 2a0b672a..72fbfd23 100644
--- a/man/auto.master.5.in
+++ b/man/auto.master.5.in
@@ -262,8 +262,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 explicitly 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 d32e772e..569a2683 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 88dde0b2..71867ef1 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 0ee5e75f..fdda0e73 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 0384f611..c5b145d5 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