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