1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Change the Unix version of Ssh_gss_name to be a gss_name_t rather than

void *, and hence eliminate a few casts.  The Windows definition is
unchanged, but I daresay I've managed to stop it compiling nonetheless.

[originally from svn r8359]
This commit is contained in:
Ben Harris 2008-12-01 21:18:29 +00:00
parent 70df860c8d
commit 5d0d5e0466
4 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,6 @@
#define SSH2_GSS_OIDTYPE 0x06
typedef void *Ssh_gss_ctx;
typedef void *Ssh_gss_name;
typedef enum Ssh_gss_stat {
SSH_GSS_OK = 0,

View File

@ -67,6 +67,7 @@ extern long tickcount_offset;
#include <gssapi/gssapi.h>
typedef gss_buffer_desc Ssh_gss_buf;
#define SSH_GSS_EMPTY_BUF GSS_C_EMPTY_BUFFER
typedef gss_name_t Ssh_gss_name;
#endif
/*

View File

@ -46,8 +46,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 +77,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 +163,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;

View File

@ -118,6 +118,7 @@ typedef struct Ssh_gss_buf {
} Ssh_gss_buf;
#define SSH_GSS_EMPTY_BUF (Ssh_gss_buf) {0,NULL}
typedef void *Ssh_gss_name;
#endif
/*