Blame SOURCES/cyrus-sasl-2.1.26-error-message-when-config-has-typo.patch

98b3ea
diff --git a/include/sasl.h b/include/sasl.h
98b3ea
index 8b8a63f..6ae153f 100755
98b3ea
--- a/include/sasl.h
98b3ea
+++ b/include/sasl.h
98b3ea
@@ -179,6 +179,7 @@
98b3ea
 				       because of some constrains/policy violation */
98b3ea
 
98b3ea
 #define SASL_BADBINDING -32  /* channel binding failure */
98b3ea
+#define SASL_CONFIGERR -33  /* error when parsing configuration file */
98b3ea
 
98b3ea
 /* max size of a sasl mechanism name */
98b3ea
 #define SASL_MECHNAMEMAX 20
98b3ea
diff --git a/lib/common.c b/lib/common.c
98b3ea
index 672fe2f..de0adfd 100644
98b3ea
--- a/lib/common.c
98b3ea
+++ b/lib/common.c
98b3ea
@@ -1362,6 +1362,7 @@ const char *sasl_errstring(int saslerr,
98b3ea
     case SASL_CONSTRAINT_VIOLAT: return "sasl_setpass can't store a property because "
98b3ea
 			        "of a constraint violation";
98b3ea
     case SASL_BADBINDING: return "channel binding failure";
98b3ea
+    case SASL_CONFIGERR:  return "error when parsing configuration file";
98b3ea
 
98b3ea
     default:   return "undefined error!";
98b3ea
     }
98b3ea
diff --git a/lib/config.c b/lib/config.c
98b3ea
index 7cae302..fde3757 100644
98b3ea
--- a/lib/config.c
98b3ea
+++ b/lib/config.c
98b3ea
@@ -91,7 +91,7 @@ int sasl_config_init(const char *filename)
98b3ea
 	}
98b3ea
 	if (*p != ':') {
98b3ea
 	    fclose(infile);
98b3ea
-	    return SASL_FAIL;
98b3ea
+	    return SASL_CONFIGERR;
98b3ea
 	}
98b3ea
 	*p++ = '\0';
98b3ea
 
98b3ea
@@ -99,7 +99,7 @@ int sasl_config_init(const char *filename)
98b3ea
 	
98b3ea
 	if (!*p) {
98b3ea
 	    fclose(infile);
98b3ea
-	    return SASL_FAIL;
98b3ea
+	    return SASL_CONFIGERR;
98b3ea
 	}
98b3ea
 
98b3ea
 	/* Now strip trailing spaces, if any */