X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c677cad690637a1ceaf6e039dcdbd3a267ad3c86..f03bd6da7b947c872e9d829e8d84fc97e04cc4f9:/unix/uxgss.c diff --git a/unix/uxgss.c b/unix/uxgss.c index db653f3c..7bc6dca4 100644 --- a/unix/uxgss.c +++ b/unix/uxgss.c @@ -1,11 +1,12 @@ +#include "putty.h" + +#ifndef NO_GSSAPI + #include #include -#include "putty.h" #include "sshgss.h" #include "misc.h" -#ifndef NO_GSSAPI - static gss_OID_desc putty_gss_mech_krb5_desc = { 9, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" }; static gss_OID const putty_gss_mech_krb5 = &putty_gss_mech_krb5_desc; @@ -46,8 +47,7 @@ Ssh_gss_stat ssh_gss_import_name(char *host, host_buf.length = strlen(pStr); maj_stat = gss_import_name(&min_stat, &host_buf, - GSS_C_NT_HOSTBASED_SERVICE, - (gss_name_t *)srv_name); + GSS_C_NT_HOSTBASED_SERVICE, srv_name); /* Release buffer */ sfree(pStr); if (maj_stat == GSS_S_COMPLETE) return SSH_GSS_OK; @@ -78,7 +78,7 @@ Ssh_gss_stat ssh_gss_init_sec_context(Ssh_gss_ctx *ctx, uxctx->maj_stat = gss_init_sec_context(&uxctx->min_stat, GSS_C_NO_CREDENTIAL, &uxctx->ctx, - (gss_name_t) srv_name, + srv_name, (gss_OID) putty_gss_mech_krb5, GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG | to_deleg, @@ -164,7 +164,7 @@ Ssh_gss_stat ssh_gss_release_cred(Ssh_gss_ctx *ctx) Ssh_gss_stat ssh_gss_release_name(Ssh_gss_name *srv_name) { OM_uint32 min_stat,maj_stat; - maj_stat = gss_release_name(&min_stat, (gss_name_t *) srv_name); + maj_stat = gss_release_name(&min_stat, srv_name); if (maj_stat == GSS_S_COMPLETE) return SSH_GSS_OK; return SSH_GSS_FAILURE;