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

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