47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
diff --git a/include/sasl.h b/include/sasl.h
|
|
index d52269f..ed208a5 100644
|
|
--- a/include/sasl.h
|
|
+++ b/include/sasl.h
|
|
@@ -177,6 +177,7 @@
|
|
because of some constrains/policy violation */
|
|
|
|
#define SASL_BADBINDING -32 /* channel binding failure */
|
|
+#define SASL_CONFIGERR -100 /* error when parsing configuration file */
|
|
|
|
/* max size of a sasl mechanism name */
|
|
#define SASL_MECHNAMEMAX 20
|
|
diff --git a/lib/common.c b/lib/common.c
|
|
index e0f59eb..1a1715e 100644
|
|
--- a/lib/common.c
|
|
+++ b/lib/common.c
|
|
@@ -1362,6 +1362,7 @@ const char *sasl_errstring(int saslerr,
|
|
case SASL_CONSTRAINT_VIOLAT: return "sasl_setpass can't store a property because "
|
|
"of a constraint violation";
|
|
case SASL_BADBINDING: return "channel binding failure";
|
|
+ case SASL_CONFIGERR: return "error when parsing configuration file";
|
|
|
|
default: return "undefined error!";
|
|
}
|
|
diff --git a/lib/config.c b/lib/config.c
|
|
index 7cae302..fde3757 100644
|
|
--- a/lib/config.c
|
|
+++ b/lib/config.c
|
|
@@ -91,7 +91,7 @@ int sasl_config_init(const char *filename)
|
|
}
|
|
if (*p != ':') {
|
|
fclose(infile);
|
|
- return SASL_FAIL;
|
|
+ return SASL_CONFIGERR;
|
|
}
|
|
*p++ = '\0';
|
|
|
|
@@ -99,7 +99,7 @@ int sasl_config_init(const char *filename)
|
|
|
|
if (!*p) {
|
|
fclose(infile);
|
|
- return SASL_FAIL;
|
|
+ return SASL_CONFIGERR;
|
|
}
|
|
|
|
/* Now strip trailing spaces, if any */
|