1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-03 13:31:11 +03:00

gssapi: Check return code of gss_indicate_mechs()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-09-26 11:20:03 +02:00
parent bb081f6681
commit 7e5291668c

View File

@@ -216,6 +216,15 @@ int ssh_gssapi_handle_userauth(ssh_session session, const char *user, uint32_t n
gss_create_empty_oid_set(&min_stat, &both_supported);
maj_stat = gss_indicate_mechs(&min_stat, &supported);
if (maj_stat != GSS_S_COMPLETE) {
SSH_LOG(SSH_LOG_WARNING, "indicate mecks %d, %d", maj_stat, min_stat);
ssh_gssapi_log_error(SSH_LOG_WARNING,
"indicate mechs",
maj_stat,
min_stat);
return SSH_ERROR;
}
for (i=0; i < supported->count; ++i){
ptr = ssh_get_hexa(supported->elements[i].elements, supported->elements[i].length);
SSH_LOG(SSH_LOG_DEBUG, "Supported mech %zu: %s", i, ptr);