Blame SOURCES/autofs-5.0.7-fix-incorrect-check-in-flag_is_owned.patch

4d476f
autofs-5.0.7 - fix incorrect check in flag_is_owned()
4d476f
4d476f
From: Ian Kent <raven@themaw.net>
4d476f
4d476f
The flag file code isn't used any more but this is clearly incorrect
4d476f
so fix it in case it gets used sometime in the future.
4d476f
---
4d476f
 daemon/flag.c |    7 +++----
4d476f
 1 file changed, 3 insertions(+), 4 deletions(-)
4d476f
4d476f
diff --git a/daemon/flag.c b/daemon/flag.c
4d476f
index f8fe163..db9a4bd 100644
4d476f
--- a/daemon/flag.c
4d476f
+++ b/daemon/flag.c
4d476f
@@ -66,12 +66,11 @@ static int flag_is_owned(int fd)
4d476f
 
4d476f
 			continue;
4d476f
 		}
4d476f
-
4d476f
-		/* Stale flagfile */
4d476f
-		if (!tries)
4d476f
-			return 0;
4d476f
 	}
4d476f
 
4d476f
+	/* Stale flagfile */
4d476f
+	if (!tries)
4d476f
+		return 0;
4d476f
 
4d476f
 	if (pid) {
4d476f
 		int ret;