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

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