~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to debian/patches/autofs-5.0.5-fix-direct-map-not-updating-on-reread.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
autofs-5.0.5 - fix direct map not updating on reread
2
 
 
3
 
From: Ian Kent <raven@themaw.net>
4
 
 
5
 
If the map type is explicitly specified for a map the map isn't
6
 
properly updated when a re-read is requested. This is because
7
 
the map stale flag is incorrectly cleared after after the lookup
8
 
module reads the map instead of at the completion of the update
9
 
procedure. The map stale flag should only be cleared if the map
10
 
read fails for some reason, otherwise it is updated when the
11
 
refresh is completed.
12
 
---
13
 
 
14
 
 CHANGELOG       |    1 +
15
 
 daemon/lookup.c |    3 ++-
16
 
 2 files changed, 3 insertions(+), 1 deletions(-)
17
 
 
18
 
 
19
 
diff --git a/CHANGELOG b/CHANGELOG
20
 
index e05038b..46eb3ce 100644
21
 
--- a/CHANGELOG
22
 
+++ b/CHANGELOG
23
 
@@ -51,6 +51,7 @@
24
 
 - fix init script restart option.
25
 
 - fix init script status privilege error.
26
 
 - always read file maps mount lookup map read fix.
27
 
+- fix direct map not updating on reread.
28
 
 
29
 
 03/09/2009 autofs-5.0.5
30
 
 -----------------------
31
 
diff --git a/daemon/lookup.c b/daemon/lookup.c
32
 
index a4bd07f..a9a1f4d 100644
33
 
--- a/daemon/lookup.c
34
 
+++ b/daemon/lookup.c
35
 
@@ -295,7 +295,8 @@ static int do_read_map(struct autofs_point *ap, struct map_source *map, time_t a
36
 
 
37
 
        status = lookup->lookup_read_map(ap, age, lookup->context);
38
 
 
39
 
-       map->stale = 0;
40
 
+       if (status != NSS_STATUS_SUCCESS)
41
 
+               map->stale = 0;
42
 
 
43
 
        /*
44
 
         * For maps that don't support enumeration return success