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

« back to all changes in this revision

Viewing changes to debian/patches/autofs-5.0.5-fix-random-selection-option.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 random selection option
2
 
 
3
 
From: Ian Kent <raven@themaw.net>
4
 
 
5
 
When parsing the master map we fail to check if the random selection
6
 
option has been seen and set the random selection option unconditionally.
7
 
---
8
 
 
9
 
 CHANGELOG          |    1 +
10
 
 lib/master_parse.y |    3 ++-
11
 
 2 files changed, 3 insertions(+), 1 deletions(-)
12
 
 
13
 
 
14
 
diff --git a/CHANGELOG b/CHANGELOG
15
 
index f38fc3f..c976f79 100644
16
 
--- a/CHANGELOG
17
 
+++ b/CHANGELOG
18
 
@@ -19,6 +19,7 @@
19
 
 - fix memory leak on reload.
20
 
 - update kernel patches for 2.6.18 and 2.6.19.
21
 
 - dont connect at ldap lookup module init.
22
 
+- fix random selection option.
23
 
 
24
 
 03/09/2009 autofs-5.0.5
25
 
 -----------------------
26
 
diff --git a/lib/master_parse.y b/lib/master_parse.y
27
 
index 454a2ed..8adb393 100644
28
 
--- a/lib/master_parse.y
29
 
+++ b/lib/master_parse.y
30
 
@@ -811,7 +811,8 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne
31
 
                                ops->timeout(ap->logopt, ap->ioctlfd, &tout);
32
 
                }
33
 
        }
34
 
-       entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
35
 
+       if (random_selection)
36
 
+               entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
37
 
        if (negative_timeout)
38
 
                entry->ap->negative_timeout = negative_timeout;
39