diff options
author | Yixun Lan <dlan@gentoo.org> | 2015-04-21 02:21:50 +0000 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2015-04-21 02:21:50 +0000 |
commit | da2da6e837129f016ca7ce8ca282ac0250c656a3 (patch) | |
tree | f5a9407a8a9d423e4adb5f3b4ff454acccad34db /net-fs/autofs/files | |
parent | vanilla-3.19.5 + genpatches-3.19-6 + grgrsecurity-3.1-3.19.5-201504190814 (diff) | |
download | gentoo-2-da2da6e837129f016ca7ce8ca282ac0250c656a3.tar.gz gentoo-2-da2da6e837129f016ca7ce8ca282ac0250c656a3.tar.bz2 gentoo-2-da2da6e837129f016ca7ce8ca282ac0250c656a3.zip |
fix sloopy mount option which break other than nfs, bug 545258
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)
Diffstat (limited to 'net-fs/autofs/files')
-rw-r--r-- | net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch new file mode 100644 index 000000000000..86e02bce5558 --- /dev/null +++ b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch @@ -0,0 +1,99 @@ +From: Ian Kent <ikent@redhat.com> + +Historically autofs added an option to mounts, called the sloppy +option, meant to allow mount(8) to ignore invalid mount options. +This was done so that mount map entries for sites that needed to +use different mount options for some machines would still work. +It was needed for nfs mounts in particular. + +Recent changes to mount(8) cause the sloppy option to be passed on +for all mounts when it is given. + +Previously mount(8) only passed on the option to nfs mounts so now, +for other than nfs mounts, the mount will fail if the file system +doesn't understand the sloppy option. + +Since the option was not passed on to other than nfs mounts before +it seems sensible for autofs to not add it for other than nfs mounts +now. + +Signed-off-by: Ian Kent <ikent@redhat.com> +--- + modules/mount_bind.c | 9 ++++----- + modules/mount_changer.c | 6 +++--- + modules/mount_ext2.c | 6 +++--- + modules/mount_generic.c | 4 ++-- + 4 files changed, 12 insertions(+), 13 deletions(-) + +--- a/modules/mount_bind.c ++++ b/modules/mount_bind.c +@@ -158,13 +158,12 @@ int mount_mount(struct autofs_point *ap, + if (!status) + existed = 0; + +- debug(ap->logopt, +- MODPREFIX +- "calling mount --bind " SLOPPY " -o %s %s %s", ++ debug(ap->logopt, MODPREFIX ++ "calling mount --bind -o %s %s %s", + options, what, fullpath); + +- err = spawn_bind_mount(ap->logopt, +- SLOPPYOPT "-o", options, what, fullpath, NULL); ++ err = spawn_bind_mount(ap->logopt, "-o", ++ options, what, fullpath, NULL); + + if (err) { + if (ap->type != LKP_INDIRECT) +--- a/modules/mount_changer.c ++++ b/modules/mount_changer.c +@@ -103,12 +103,12 @@ int mount_mount(struct autofs_point *ap, + } + + if (options && options[0]) { +- debug(ap->logopt, +- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s", ++ debug(ap->logopt, MODPREFIX ++ "calling mount -t %s -o %s %s %s", + fstype, options, what, fullpath); + + err = spawn_mount(ap->logopt, "-t", fstype, +- SLOPPYOPT "-o", options, what, fullpath, NULL); ++ "-o", options, what, fullpath, NULL); + } else { + debug(ap->logopt, + MODPREFIX "calling mount -t %s %s %s", +--- a/modules/mount_ext2.c ++++ b/modules/mount_ext2.c +@@ -116,11 +116,11 @@ int mount_mount(struct autofs_point *ap, + } + + if (options) { +- debug(ap->logopt, +- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s", ++ debug(ap->logopt, MODPREFIX ++ "calling mount -t %s -o %s %s %s", + fstype, options, what, fullpath); + err = spawn_mount(ap->logopt, "-t", fstype, +- SLOPPYOPT "-o", options, what, fullpath, NULL); ++ "-o", options, what, fullpath, NULL); + } else { + debug(ap->logopt, + MODPREFIX "calling mount -t %s %s %s", +--- a/modules/mount_generic.c ++++ b/modules/mount_generic.c +@@ -97,11 +97,11 @@ int mount_mount(struct autofs_point *ap, + + if (options && options[0]) { + debug(ap->logopt, +- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s", ++ MODPREFIX "calling mount -t %s -o %s %s %s", + fstype, options, loc, fullpath); + + err = spawn_mount(ap->logopt, "-t", fstype, +- SLOPPYOPT "-o", options, loc, fullpath, NULL); ++ "-o", options, loc, fullpath, NULL); + } else { + debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s", + fstype, loc, fullpath); + |