mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48: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:
parent
70df860c8d
commit
5d0d5e0466
1
sshgss.h
1
sshgss.h
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#define SSH2_GSS_OIDTYPE 0x06
|
#define SSH2_GSS_OIDTYPE 0x06
|
||||||
typedef void *Ssh_gss_ctx;
|
typedef void *Ssh_gss_ctx;
|
||||||
typedef void *Ssh_gss_name;
|
|
||||||
|
|
||||||
typedef enum Ssh_gss_stat {
|
typedef enum Ssh_gss_stat {
|
||||||
SSH_GSS_OK = 0,
|
SSH_GSS_OK = 0,
|
||||||
|
@ -67,6 +67,7 @@ extern long tickcount_offset;
|
|||||||
#include <gssapi/gssapi.h>
|
#include <gssapi/gssapi.h>
|
||||||
typedef gss_buffer_desc Ssh_gss_buf;
|
typedef gss_buffer_desc Ssh_gss_buf;
|
||||||
#define SSH_GSS_EMPTY_BUF GSS_C_EMPTY_BUFFER
|
#define SSH_GSS_EMPTY_BUF GSS_C_EMPTY_BUFFER
|
||||||
|
typedef gss_name_t Ssh_gss_name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -46,8 +46,7 @@ Ssh_gss_stat ssh_gss_import_name(char *host,
|
|||||||
host_buf.length = strlen(pStr);
|
host_buf.length = strlen(pStr);
|
||||||
|
|
||||||
maj_stat = gss_import_name(&min_stat, &host_buf,
|
maj_stat = gss_import_name(&min_stat, &host_buf,
|
||||||
GSS_C_NT_HOSTBASED_SERVICE,
|
GSS_C_NT_HOSTBASED_SERVICE, srv_name);
|
||||||
(gss_name_t *)srv_name);
|
|
||||||
/* Release buffer */
|
/* Release buffer */
|
||||||
sfree(pStr);
|
sfree(pStr);
|
||||||
if (maj_stat == GSS_S_COMPLETE) return SSH_GSS_OK;
|
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,
|
uxctx->maj_stat = gss_init_sec_context(&uxctx->min_stat,
|
||||||
GSS_C_NO_CREDENTIAL,
|
GSS_C_NO_CREDENTIAL,
|
||||||
&uxctx->ctx,
|
&uxctx->ctx,
|
||||||
(gss_name_t) srv_name,
|
srv_name,
|
||||||
(gss_OID) putty_gss_mech_krb5,
|
(gss_OID) putty_gss_mech_krb5,
|
||||||
GSS_C_MUTUAL_FLAG |
|
GSS_C_MUTUAL_FLAG |
|
||||||
GSS_C_INTEG_FLAG | to_deleg,
|
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)
|
Ssh_gss_stat ssh_gss_release_name(Ssh_gss_name *srv_name)
|
||||||
{
|
{
|
||||||
OM_uint32 min_stat,maj_stat;
|
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;
|
if (maj_stat == GSS_S_COMPLETE) return SSH_GSS_OK;
|
||||||
return SSH_GSS_FAILURE;
|
return SSH_GSS_FAILURE;
|
||||||
|
@ -118,6 +118,7 @@ typedef struct Ssh_gss_buf {
|
|||||||
} Ssh_gss_buf;
|
} Ssh_gss_buf;
|
||||||
|
|
||||||
#define SSH_GSS_EMPTY_BUF (Ssh_gss_buf) {0,NULL}
|
#define SSH_GSS_EMPTY_BUF (Ssh_gss_buf) {0,NULL}
|
||||||
|
typedef void *Ssh_gss_name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user