[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling of ssh



Ken Hornstein <kenh@cmf.nrl.navy.mil> writes:
> It's actually:
> 
> krb5_error_code krb5_fwd_tgt_creds
>         KRB5_PROTOTYPE((krb5_context, 
>                         krb5_auth_context,
>                         char *foo,
>                         krb5_principal, 
>                         krb5_principal, 
>                         krb5_ccache,
>                         int forwardable,
>                         krb5_data *));  

Thanks.  An implementation follows at the end of this mail.  Could
someone test and see if this works with ssh?  Thanks.

/assar
/*
 *
 */

krb5_error_code
krb5_fwd_tgt_creds (krb5_context	context,
		    krb5_auth_context	auth_context,
		    const char		*hostname,
		    krb5_principal	client,
		    krb5_principal	server,
		    krb5_ccache		ccache,
		    int			forwardable,
		    krb5_data		*out_data)
{
    krb5_flags flags = 0;
    krb5_creds creds;
    krb5_error_code ret;

    if (forwardable)
	flags |= KDC_OPT_FORWARDABLE;

    
    memset (&creds, 0, sizeof(creds));
    creds.client = client;
    creds.server = server;

    ret = krb5_get_forwarded_creds (context,
				    auth_context,
				    ccache,
				    flags,
				    hostname,
				    &creds,
				    out_data);
    return ret;
}