[PATCH 19/27] autofs-5.1.3 - remove path restriction of amd external mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the restriction that the external mount path must must be
within the configured external mounts directory.

Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
---
 CHANGELOG    |    1 +
 lib/mounts.c |   18 ------------------
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 453b59ee..22949785 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -52,6 +52,7 @@ xx/xx/2017 autofs-5.1.4
 - fix amd parser double quote handling.
 - fix expandamdent() quote handling.
 - fix possible memory leak during amd parse.
+- remove path restriction of amd external mount.
 
 24/05/2017 autofs-5.1.3
 =======================
diff --git a/lib/mounts.c b/lib/mounts.c
index 93c53026..fdd35984 100644
--- a/lib/mounts.c
+++ b/lib/mounts.c
@@ -696,18 +696,9 @@ static struct ext_mount *ext_mount_lookup(const char *mountpoint)
 int ext_mount_add(struct list_head *entry, const char *path, unsigned int umount)
 {
 	struct ext_mount *em;
-	char *auto_dir;
 	u_int32_t hval;
 	int ret = 0;
 
-	/* Not a mount in the external mount directory */
-	auto_dir = conf_amd_get_auto_dir();
-	if (strncmp(path, auto_dir, strlen(auto_dir))) {
-		free(auto_dir);
-		return 0;
-	}
-	free(auto_dir);
-
 	pthread_mutex_lock(&ext_mount_hash_mutex);
 
 	em = ext_mount_lookup(path);
@@ -753,17 +744,8 @@ done:
 int ext_mount_remove(struct list_head *entry, const char *path)
 {
 	struct ext_mount *em;
-	char *auto_dir;
 	int ret = 0;
 
-	/* Not a mount in the external mount directory */
-	auto_dir = conf_amd_get_auto_dir();
-	if (strncmp(path, auto_dir, strlen(auto_dir))) {
-		free(auto_dir);
-		return 0;
-	}
-	free(auto_dir);
-
 	pthread_mutex_lock(&ext_mount_hash_mutex);
 
 	em = ext_mount_lookup(path);

--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux