Sophie

Sophie

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

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

autofs-5.0.1 - fix disable timeout

From: Ian Kent <raven@themaw.net>

Using a timeout of zero should disable expires but instead causes
the alarm handler to fire constant expires.
---

 lib/alarm.c |    3 +++
 1 file changed, 3 insertions(+)


--- autofs-5.0.1.orig/lib/alarm.c
+++ autofs-5.0.1/lib/alarm.c
@@ -67,6 +67,9 @@ int alarm_add(struct autofs_point *ap, t
 	unsigned int empty = 1;
 	int status;
 
+	if (!seconds)
+		return 1;
+
 	new = malloc(sizeof(struct alarm));
 	if (!new)
 		return 0;