summaryrefslogtreecommitdiffstats
path: root/src/gss_err.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-08-10 11:45:49 -0400
committerSimo Sorce <simo@redhat.com>2014-08-10 14:29:38 -0400
commit20b7ce48d8249e39eae58859bacd4d715b4623dd (patch)
treee73bb60b66b59fc4fc6a193ab19be07d68259f9f /src/gss_err.c
parent4149cbd77bba720db460f42fcd88e547ba2bbdfc (diff)
downloadgss-ntlmssp-20b7ce48d8249e39eae58859bacd4d715b4623dd.tar.gz
gss-ntlmssp-20b7ce48d8249e39eae58859bacd4d715b4623dd.tar.xz
gss-ntlmssp-20b7ce48d8249e39eae58859bacd4d715b4623dd.zip
Add more custom error message
This should make error reporting a little bit better.
Diffstat (limited to 'src/gss_err.c')
-rw-r--r--src/gss_err.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/gss_err.c b/src/gss_err.c
index ad2fcec..cccc0e4 100644
--- a/src/gss_err.c
+++ b/src/gss_err.c
@@ -18,6 +18,32 @@ static const char *err_strs[] = {
_("Failed to decode data"), /* ERR_DECODE */
_("Failed to encode data"), /* ERR_ENCODE */
_("Crypto routine failure"), /* ERR_CRYPTO */
+ _("A required argument is missing"), /* ERR_NOARG */
+ _("Invalid value in argument"), /* ERR_BADARG */
+ _("Name is empty"), /* ERR_NONAME */
+ _("Not a server name"), /* ERR_NOSRVNAME */
+ _("Not a user name"), /* ERR_NOUSRNAME */
+ _("Bad LM compatibility Level"), /* ERR_BADLMLEVEL */
+ _("An impossible error occurred"), /* ERR_IMPOSSIBLE */
+ _("Invalid or incomplete context"), /* ERR_BADCTX */
+ _("Wrong context type"), /* ERR_WRONGCTX */
+ _("Wrong message type"), /* ERR_WRONGMSG */
+ _("A required Negotiate flag was no provided"), /* ERR_REQNEGFLAG */
+ _("Failed to negotiate a common set of flags"), /* ERR_FAILNEGFLAGS */
+ _("Invalid combinations of negotiate flags"), /* ERR_BADNEGFLAGS */
+ _("Not a server credential type"), /* ERR_NOSRVCRED */
+ _("Not a user redential type"), /* ERR_NOUSRCRED */
+ _("Invalid or unknown credential"), /* ERR_BADCRED */
+ _("Empty or missing token"), /* ERR_NOTOKEN */
+ _("Feature not supported"), /* ERR_NOTSUPPORTED */
+ _("Feature not available"), /* ERR_NOTAVAIL */
+ _("Name is too long"), /* ERR_NAMETOOLONG */
+ _("Required channel bingings are not available"), /* ERR_NOBINDINGS */
+ _("Server and client clocks are too far apart"), /* ERR_TIMESKEW */
+ _("Expired"), /* ERR_EXPIRED */
+ _("Invalid key length"), /* ERR_KEYLEN */
+ _("NTLM version 1 not allowed"), /* ERR_NONTLMV1 */
+ _("User not found"), /* ERR_NOUSRFOUND */
};
#define UNKNOWN_ERROR err_strs[0]
@@ -36,11 +62,11 @@ uint32_t gssntlm_display_status(uint32_t *minor_status,
int err;
if (!status_string) {
- return GSSERRS(EINVAL, GSS_S_CALL_INACCESSIBLE_READ);
+ return GSSERRS(ERR_NOARG, GSS_S_CALL_INACCESSIBLE_READ);
}
if (status_type != GSS_C_MECH_CODE) {
- return GSSERRS(EINVAL, GSS_S_BAD_STATUS);
+ return GSSERRS(ERR_BADARG, GSS_S_BAD_STATUS);
}
*minor_status = 0;