projects
/
cyrus-sasl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a0878a
)
Treat GSS_C_NO_CRED identically to GSS_C_CRED_UNAVAIL
author
Luke Howard
<lukeh@padl.com>
Mon, 3 Jan 2011 11:45:47 +0000
(22:45 +1100)
committer
Luke Howard
<lukeh@padl.com>
Mon, 3 Jan 2011 11:45:47 +0000
(22:45 +1100)
plugins/gs2.c
patch
|
blob
|
history
diff --git
a/plugins/gs2.c
b/plugins/gs2.c
index
930d70b
..
bb04c77
100644
(file)
--- a/
plugins/gs2.c
+++ b/
plugins/gs2.c
@@
-1481,6
+1481,7
@@
gs2_escape_authzid(const sasl_utils_t *utils,
}
#define GOT_CREDS(text, params) ((text)->client_creds != NULL || (params)->gss_creds != NULL)
}
#define GOT_CREDS(text, params) ((text)->client_creds != NULL || (params)->gss_creds != NULL)
+#define CRED_ERROR(status) ((status) == GSS_S_CRED_UNAVAIL || (status) == GSS_S_NO_CRED)
static int
gs2_get_init_creds(context_t *text,
static int
gs2_get_init_creds(context_t *text,
@@
-1531,7
+1532,7
@@
gs2_get_init_creds(context_t *text,
NULL);
if (GSS_ERROR(maj_stat))
goto cleanup;
NULL);
if (GSS_ERROR(maj_stat))
goto cleanup;
- } else if (
maj_stat != GSS_S_CRED_UNAVAIL
)
+ } else if (
!CRED_ERROR(maj_stat)
)
goto cleanup;
if (text->client_name != GSS_C_NO_NAME) {
goto cleanup;
if (text->client_name != GSS_C_NO_NAME) {
@@
-1617,7
+1618,7
@@
gs2_get_init_creds(context_t *text,
&text->client_creds,
NULL,
&text->lifetime);
&text->client_creds,
NULL,
&text->lifetime);
- if (
maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CRED_UNAVAIL
)
+ if (
GSS_ERROR(maj_stat) && !CRED_ERROR(maj_stat)
)
goto cleanup;
}
goto cleanup;
}