Blame SOURCES/autofs-5.1.3-remove-path-restriction-of-amd-external-mount.patch

306fa1
autofs-5.1.3 - remove path restriction of amd external mount
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Remove the restriction that the external mount path must must be
306fa1
within the configured external mounts directory.
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG    |    1 +
306fa1
 lib/mounts.c |   18 ------------------
306fa1
 2 files changed, 1 insertion(+), 18 deletions(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -277,6 +277,7 @@
306fa1
 - fix amd parser double quote handling.
306fa1
 - fix expandamdent() quote handling.
306fa1
 - fix possible memory leak during amd parse.
306fa1
+- remove path restriction of amd external mount.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/lib/mounts.c
306fa1
+++ autofs-5.0.7/lib/mounts.c
306fa1
@@ -694,18 +694,9 @@ static struct ext_mount *ext_mount_looku
306fa1
 int ext_mount_add(struct list_head *entry, const char *path, unsigned int umount)
306fa1
 {
306fa1
 	struct ext_mount *em;
306fa1
-	char *auto_dir;
306fa1
 	u_int32_t hval;
306fa1
 	int ret = 0;
306fa1
 
306fa1
-	/* Not a mount in the external mount directory */
306fa1
-	auto_dir = conf_amd_get_auto_dir();
306fa1
-	if (strncmp(path, auto_dir, strlen(auto_dir))) {
306fa1
-		free(auto_dir);
306fa1
-		return 0;
306fa1
-	}
306fa1
-	free(auto_dir);
306fa1
-
306fa1
 	pthread_mutex_lock(&ext_mount_hash_mutex);
306fa1
 
306fa1
 	em = ext_mount_lookup(path);
306fa1
@@ -751,17 +742,8 @@ done:
306fa1
 int ext_mount_remove(struct list_head *entry, const char *path)
306fa1
 {
306fa1
 	struct ext_mount *em;
306fa1
-	char *auto_dir;
306fa1
 	int ret = 0;
306fa1
 
306fa1
-	/* Not a mount in the external mount directory */
306fa1
-	auto_dir = conf_amd_get_auto_dir();
306fa1
-	if (strncmp(path, auto_dir, strlen(auto_dir))) {
306fa1
-		free(auto_dir);
306fa1
-		return 0;
306fa1
-	}
306fa1
-	free(auto_dir);
306fa1
-
306fa1
 	pthread_mutex_lock(&ext_mount_hash_mutex);
306fa1
 
306fa1
 	em = ext_mount_lookup(path);