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

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