version 1.12, 2005/10/13 19:08:08 |
version 1.13, 2005/10/13 22:24:31 |
|
|
OM_uint32 offset; |
OM_uint32 offset; |
OM_uint32 oidl; |
OM_uint32 oidl; |
|
|
tok=ename->value; |
tok = ename->value; |
|
|
/* |
/* |
* Check that ename is long enough for all of the fixed length |
* Check that ename is long enough for all of the fixed length |
* header, and that the initial ID bytes are correct |
* header, and that the initial ID bytes are correct |
*/ |
*/ |
|
|
if (ename->length<6 || memcmp(tok,"\x04\x01", 2)!=0) |
if (ename->length < 6 || memcmp(tok, "\x04\x01", 2) != 0) |
return GSS_S_FAILURE; |
return GSS_S_FAILURE; |
|
|
/* |
/* |
|
|
*/ |
*/ |
if (tok[4] != 0x06 || tok[5] != oidl || |
if (tok[4] != 0x06 || tok[5] != oidl || |
ename->length < oidl+6 || |
ename->length < oidl+6 || |
!ssh_gssapi_check_oid(ctx,tok+6,oidl)) |
!ssh_gssapi_check_oid(ctx, tok+6, oidl)) |
return GSS_S_FAILURE; |
return GSS_S_FAILURE; |
|
|
offset = oidl+6; |
offset = oidl+6; |
|
|
return GSS_S_FAILURE; |
return GSS_S_FAILURE; |
|
|
name->value = xmalloc(name->length+1); |
name->value = xmalloc(name->length+1); |
memcpy(name->value,tok+offset,name->length); |
memcpy(name->value, tok+offset,name->length); |
((char *)name->value)[name->length] = 0; |
((char *)name->value)[name->length] = 0; |
|
|
return GSS_S_COMPLETE; |
return GSS_S_COMPLETE; |
|
|
|
|
if (gssapi_client.store.envvar != NULL && |
if (gssapi_client.store.envvar != NULL && |
gssapi_client.store.envval != NULL) { |
gssapi_client.store.envval != NULL) { |
|
|
debug("Setting %s to %s", gssapi_client.store.envvar, |
debug("Setting %s to %s", gssapi_client.store.envvar, |
gssapi_client.store.envval); |
gssapi_client.store.envval); |
child_set_env(envp, envsizep, gssapi_client.store.envvar, |
child_set_env(envp, envsizep, gssapi_client.store.envvar, |
gssapi_client.store.envval); |
gssapi_client.store.envval); |
} |
} |