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

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