Re: [Perlgssapi-developer] Warning cropping up...
Brought to you by:
achimgrolms
From: Merijn B. <me...@il...> - 2006-02-08 17:12:39
|
I changed the code in Context.xs to look like this: void DESTROY(context) GSSAPI::Context_opt context PREINIT: OM_uint32 minor; OM_uint32 major; CODE: if (context != NULL) { major = gss_delete_sec_context(&minor, &context, GSS_C_NO_BUFFER); if ( major == GSS_S_COMPLETE) { warn("gss_delete_sec_context() complete in module Context.xs"); } if ( major == GSS_S_NO_CONTEXT) { warn("failed gss_delete_sec_context() with invalid context in module Context.xs"); } if ( major == GSS_S_FAILURE) { warn("failed gss_delete_sec_context() with unspecified error in module Context.xs"); } } so I could figure out what was going on. turns out that my code looks like this in broad overview: while (1) { my $sec_context ; ... $sec_context->DESTROY; } which means the DESTROY is called twice. Once by me explicitly and once on destruction of the variable. My server output now looks like this: SERVER::waiting for request ... SERVER::accepted connection from client ... SERVER::received token (length is 459): SERVER::authenticated client name is me...@is...rgan SERVER::Have mutual token to send ... SERVER::GSS token size: 114 SERVER::sent token (length is 114) gss_delete_sec_context() complete in module Context.xs at gss-server.pl line 159, <GEN3> line 1. failed gss_delete_sec_context() with invalid context in module Context.xs at gss-server.pl line 159. So my bad. But we might want to make this more forgiving, by only warning on GSS_S_FAILURE, not on GSS_S_NO_CONTEXT. ;-) Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |