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

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