Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 85

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.1 - fix random selection option

From: Ian Kent <raven@themaw.net>

When parsing the master map we fail to check if the random selection
option has been seen and set the random selection option unconditionally.
---

 lib/master_parse.y |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--- autofs-5.0.1.orig/lib/master_parse.y
+++ autofs-5.0.1/lib/master_parse.y
@@ -813,7 +813,8 @@ int master_parse_entry(const char *buffe
 				ops->timeout(ap->logopt, ap->ioctlfd, &tout);
 		}
 	}
-	entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
+	if (random_selection)
+		entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
 	if (negative_timeout)
 		entry->ap->negative_timeout = negative_timeout;