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

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