[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gss_accept_sec_context() problem
Hi, I'm using heimdal-0.2t and am having some trouble on the
serverside. When I call gss_accept_sec_context, I get a
segmentationfault.
--cut
#include "gssapi.h"
int
main(void)
{
OM_uint32 minor_status, major_status;
gss_cred_id_t acceptor_cred_handle;
gss_channel_bindings_t chan_bindings;
gss_name_t src_name;
gss_OID mech_type;
OM_uint32 ret_flags;
OM_uint32 time_rec;
gss_cred_id_t delegated_cred_handle;
gss_ctx_id_t context_handle = GSS_C_NO_CONTEXT;
gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
gss_buffer_desc output_token;
major_status = gss_accept_sec_context(&minor_status,
&context_handle,
GSS_C_NO_CREDENTIAL,
&input_token,
GSS_C_NO_CHANNEL_BINDINGS,
&src_name,
NULL, /*&mech_type,*/
&output_token,
NULL, /* &ret_flags, */
NULL, /* &time_rec,*/
NULL /*&delegated_cred_handle*/);
return 0;
}
--cut
openbsd2.3/i386 0$ gcc -g -I/usr/local/heimdal/include -L/usr/local/heimdal/lib -R/usr/local/heimdal/lib -lgssapi -lkrb5 -lasn1 -lroken -ldes ~/src/tst/gssapi_accept.c
openbsd2.3/i386 0$ ./a.out
Segmentation fault (core dumped)
openbsd2.3/i386 139$ gdb a.out a.out.core
Reading symbols from a.out...done.
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/local/heimdal/lib/libgssapi.so.1.1...done.
Reading symbols from /usr/local/heimdal/lib/libkrb5.so.11.1...done.
Reading symbols from /usr/local/heimdal/lib/libasn1.so.2.0...done.
Reading symbols from /usr/local/heimdal/lib/libroken.so.8.1...done.
Reading symbols from /usr/local/heimdal/lib/libdes.so.2.0...done.
Reading symbols from /usr/lib/libc.so.24.0...done.
Reading in symbols for decapsulate.c...done.
#0 0x4001df5d in gssapi_krb5_verify_header (str=0xdfbfd7ec, total_len=0,
type=0x4001d521 "\001") at decapsulate.c:47
47 if (*p++ != 0x60)
(gdb) bt
Reading in symbols for accept_sec_context.c...done.
Reading in symbols for /home/michaels/src/tst/gssapi_accept.c...done.
#0 0x4001df5d in gssapi_krb5_verify_header (str=0xdfbfd7ec, total_len=0,
type=0x4001d521 "\001") at decapsulate.c:47
#1 0x4001e0bc in gssapi_krb5_decapsulate (input_token_buffer=0xdfbfd8a0,
out_data=0xdfbfd840, type=0x4001d521 "\001") at decapsulate.c:90
#2 0x4001d671 in gss_accept_sec_context (minor_status=0xdfbfd8cc,
context_handle=0xdfbfd8a8, acceptor_cred_handle=0x0,
input_token_buffer=0xdfbfd8a0, input_chan_bindings=0x0,
src_name=0xdfbfd8bc, mech_type=0x0, output_token=0xdfbfd898,
ret_flags=0x0, time_rec=0x0, delegated_cred_handle=0x0)
at accept_sec_context.c:118
#3 0x17e0 in main () at /home/michaels/src/tst/gssapi_accept.c:18
I can't see any requirement for input_token to be filled when calling
gss_accept_sec_context() and was expecting GSS_S_CONTINUE_NEEDED.
I tried filling input_token with the token gotten on the clientside
from gss_init_sec_context, a assert() in Heimdal then fails. I
guess I'm doing something wrong here?
(please include me in any reply, I'm not subscribed to the list.)
--
_ //
\X/ -- Michael Shuldman <michaels@inet.no>