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