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

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