|
|
f3080c |
autofs-5.1.8 - dont fail on duplicate host export entry
|
|
|
f3080c |
|
|
|
f3080c |
From: Ian Kent <raven@themaw.net>
|
|
|
f3080c |
|
|
|
f3080c |
If we encounter a duplicate host export entry don't fail, just ignore
|
|
|
f3080c |
it and return the duplicate.
|
|
|
f3080c |
|
|
|
f3080c |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
f3080c |
---
|
|
|
f3080c |
CHANGELOG | 1 +
|
|
|
f3080c |
lib/mounts.c | 6 ++++--
|
|
|
f3080c |
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
|
f3080c |
|
|
|
f3080c |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
f3080c |
+++ autofs-5.1.4/CHANGELOG
|
|
|
f3080c |
@@ -85,6 +85,7 @@
|
|
|
f3080c |
- fix double quoting of ampersand in auto.smb as well.
|
|
|
f3080c |
- fix root offset error handling.
|
|
|
f3080c |
- fix nonstrict fail handling of last offset mount.
|
|
|
f3080c |
+- dont fail on duplicate offset entry tree add.
|
|
|
f3080c |
|
|
|
f3080c |
xx/xx/2018 autofs-5.1.5
|
|
|
f3080c |
- fix flag file permission.
|
|
|
f3080c |
--- autofs-5.1.4.orig/lib/mounts.c
|
|
|
f3080c |
+++ autofs-5.1.4/lib/mounts.c
|
|
|
f3080c |
@@ -1341,7 +1341,7 @@ static struct tree_node *tree_add_node(s
|
|
|
f3080c |
}
|
|
|
f3080c |
|
|
|
f3080c |
if (!eq)
|
|
|
f3080c |
- error(LOGOPT_ANY, "cannot add duplicate entry to tree");
|
|
|
f3080c |
+ return p;
|
|
|
f3080c |
else {
|
|
|
f3080c |
if (eq < 0)
|
|
|
f3080c |
return tree_add_left(p, ptr);
|
|
|
f3080c |
@@ -1515,8 +1515,10 @@ static int tree_host_cmp(struct tree_nod
|
|
|
f3080c |
int eq;
|
|
|
f3080c |
|
|
|
f3080c |
eq = strcmp(exp->dir, n_exp->dir);
|
|
|
f3080c |
- if (!eq)
|
|
|
f3080c |
+ if (!eq) {
|
|
|
f3080c |
+ error(LOGOPT_ANY, "duplicate entry %s ignored", exp->dir);
|
|
|
f3080c |
return 0;
|
|
|
f3080c |
+ }
|
|
|
f3080c |
return (exp_len < n_exp_len) ? -1 : 1;
|
|
|
f3080c |
}
|
|
|
f3080c |
|