Blame SOURCES/autofs-5.0.8-fix-fix-options-compare.patch

306fa1
autofs-5.0.8 - fix fix options compare
306fa1
306fa1
From: Ian Kent <ikent@redhat.com>
306fa1
306fa1
The change to fix the mount options compare replaced the strncmp()
306fa1
function used to compare substrings of options with an internal
306fa1
function that also used the passed in length for the compare.
306fa1
306fa1
But the case of a passed in length of 0 was not handled and for
306fa1
that case the function returned a value different to strncmp()
306fa1
and code that relied on that behaviour n longer behaves as expected.
306fa1
---
306fa1
 CHANGELOG      |    1 +
306fa1
 lib/cat_path.c |    2 +-
306fa1
 2 files changed, 2 insertions(+), 1 deletion(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -74,6 +74,7 @@
306fa1
 - fix fix negative status being reset on map read.
306fa1
 - check for non existent negative entries in lookup_ghost().
306fa1
 - fix options compare.
306fa1
+- fix fix options compare.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/lib/cat_path.c
306fa1
+++ autofs-5.0.7/lib/cat_path.c
306fa1
@@ -92,7 +92,7 @@ int _strncmp(const char *s1, const char
306fa1
 {
306fa1
 	size_t len = strlen(s1);
306fa1
 
306fa1
-	if (n != len)
306fa1
+	if (n && n != len)
306fa1
 		return n - len;
306fa1
 	return strncmp(s1, s2, n);
306fa1
 }