You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
1.6 KiB

autofs-5.1.3 - remove path restriction of amd external mount
From: Ian Kent <raven@themaw.net>
Remove the restriction that the external mount path must must be
within the configured external mounts directory.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
lib/mounts.c | 18 ------------------
2 files changed, 1 insertion(+), 18 deletions(-)
--- autofs-5.0.7.orig/CHANGELOG
+++ autofs-5.0.7/CHANGELOG
@@ -277,6 +277,7 @@
- fix amd parser double quote handling.
- fix expandamdent() quote handling.
- fix possible memory leak during amd parse.
+- remove path restriction of amd external mount.
25/07/2012 autofs-5.0.7
=======================
--- autofs-5.0.7.orig/lib/mounts.c
+++ autofs-5.0.7/lib/mounts.c
@@ -694,18 +694,9 @@ static struct ext_mount *ext_mount_looku
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);
@@ -751,17 +742,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);