Blame SOURCES/autofs-5.0.8-check-for-bind-onto-self-in-mount_bind-c.patch
|
|
4d476f |
autofs-5.0.8 - check for bind onto self in mount_bind.c
|
|
|
4d476f |
|
|
|
4d476f |
From: Ian Kent <raven@themaw.net>
|
|
|
4d476f |
|
|
|
4d476f |
Check for an obviously impossible request to bind or symlink to the
|
|
|
4d476f |
same patch for source and target.
|
|
|
4d476f |
---
|
|
|
4d476f |
CHANGELOG | 1 +
|
|
|
4d476f |
modules/mount_bind.c | 6 ++++++
|
|
|
4d476f |
2 files changed, 7 insertions(+)
|
|
|
4d476f |
|
|
|
4d476f |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
4d476f |
+++ autofs-5.0.7/CHANGELOG
|
|
|
4d476f |
@@ -85,6 +85,7 @@
|
|
|
4d476f |
- fix compilation of lookup_ldap.c without sasl.
|
|
|
4d476f |
- fix undefined authtype_requires_creds err if ldap enabled but without sasl.
|
|
|
4d476f |
- pass map_source as function paramter where possible.
|
|
|
4d476f |
+- check for bind onto self in mount_bind.c.
|
|
|
4d476f |
|
|
|
4d476f |
25/07/2012 autofs-5.0.7
|
|
|
4d476f |
=======================
|
|
|
4d476f |
--- autofs-5.0.7.orig/modules/mount_bind.c
|
|
|
4d476f |
+++ autofs-5.0.7/modules/mount_bind.c
|
|
|
4d476f |
@@ -135,6 +135,12 @@ int mount_mount(struct autofs_point *ap,
|
|
|
4d476f |
if (options == NULL || *options == '\0')
|
|
|
4d476f |
options = "defaults";
|
|
|
4d476f |
|
|
|
4d476f |
+ if (!strcmp(what, fullpath)) {
|
|
|
4d476f |
+ debug(ap->logopt, MODPREFIX
|
|
|
4d476f |
+ "cannot mount or symlink %s to itself", fullpath);
|
|
|
4d476f |
+ return 1;
|
|
|
4d476f |
+ }
|
|
|
4d476f |
+
|
|
|
4d476f |
if (!symlnk && bind_works) {
|
|
|
4d476f |
int status, existed = 1;
|
|
|
4d476f |
|