|
|
516ab0 |
autofs-5.1.0 - ensure negative cache isn't updated on remount
|
|
|
516ab0 |
|
|
|
516ab0 |
From: Ian Kent <ikent@redhat.com>
|
|
|
516ab0 |
|
|
|
516ab0 |
The negative cache shouldn't be updated when re-connecting at
|
|
|
516ab0 |
startup but a couple of lookup modules didn't check for this
|
|
|
516ab0 |
case.
|
|
|
516ab0 |
---
|
|
|
516ab0 |
CHANGELOG | 1 +
|
|
|
516ab0 |
modules/lookup_hosts.c | 3 +++
|
|
|
516ab0 |
modules/lookup_program.c | 3 +++
|
|
|
516ab0 |
3 files changed, 7 insertions(+)
|
|
|
516ab0 |
|
|
|
516ab0 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
516ab0 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
516ab0 |
@@ -160,6 +160,7 @@
|
|
|
516ab0 |
- fix typo in update_hosts_mounts().
|
|
|
516ab0 |
- fix hosts map update on reload.
|
|
|
516ab0 |
- make negative cache update consistent for all lookup modules.
|
|
|
516ab0 |
+- ensure negative cache isn't updated on remount.
|
|
|
516ab0 |
|
|
|
516ab0 |
25/07/2012 autofs-5.0.7
|
|
|
516ab0 |
=======================
|
|
|
516ab0 |
--- autofs-5.0.7.orig/modules/lookup_hosts.c
|
|
|
516ab0 |
+++ autofs-5.0.7/modules/lookup_hosts.c
|
|
|
516ab0 |
@@ -151,6 +151,9 @@ static int do_parse_mount(struct autofs_
|
|
|
516ab0 |
if (ret) {
|
|
|
516ab0 |
struct mapent_cache *mc = source->mc;
|
|
|
516ab0 |
|
|
|
516ab0 |
+ /* Don't update negative cache when re-connecting */
|
|
|
516ab0 |
+ if (ap->flags & MOUNT_FLAG_REMOUNT)
|
|
|
516ab0 |
+ return NSS_STATUS_TRYAGAIN;
|
|
|
516ab0 |
cache_writelock(mc);
|
|
|
516ab0 |
cache_update_negative(mc, source, name, ap->negative_timeout);
|
|
|
516ab0 |
cache_unlock(mc);
|
|
|
516ab0 |
--- autofs-5.0.7.orig/modules/lookup_program.c
|
|
|
516ab0 |
+++ autofs-5.0.7/modules/lookup_program.c
|
|
|
516ab0 |
@@ -622,6 +622,9 @@ out_free:
|
|
|
516ab0 |
free(mapent);
|
|
|
516ab0 |
|
|
|
516ab0 |
if (ret) {
|
|
|
516ab0 |
+ /* Don't update negative cache when re-connecting */
|
|
|
516ab0 |
+ if (ap->flags & MOUNT_FLAG_REMOUNT)
|
|
|
516ab0 |
+ return NSS_STATUS_TRYAGAIN;
|
|
|
516ab0 |
cache_writelock(mc);
|
|
|
516ab0 |
cache_update_negative(mc, source, name, ap->negative_timeout);
|
|
|
516ab0 |
cache_unlock(mc);
|