Temporary fixes for failed segment and forgotten min_stat exception#29
Temporary fixes for failed segment and forgotten min_stat exception#29Zogoo wants to merge 2 commits intozentourist:masterfrom
Conversation
I hope GSS will doing clean up before this one called.
| class GssCtxIdT < GssPointer | ||
| def self.release_ptr(context_ptr) | ||
| min_stat = FFI::MemoryPointer.new :OM_uint32 | ||
| maj_stat = LibGSSAPI.gss_delete_sec_context(min_stat, context_ptr, LibGSSAPI::GSS_C_NO_BUFFER) |
There was a problem hiding this comment.
Suspecting that C implementation has been already clean up memory. So, In here it's called again and failing with segmentation.
| # @param [String] keytab the path to the keytab | ||
| def set_keytab(keytab) | ||
| maj_stat = LibGSSAPI.krb5_gss_register_acceptor_identity(keytab) | ||
| raise GssApiError.new(maj_stat, min_stat), "krb5_gss_register_acceptor_identity did not return GSS_S_COMPLETE" if maj_stat != 0 |
There was a problem hiding this comment.
min_stat will be nil in here, but still, it's trying to get some status from here.
There was a problem hiding this comment.
@zenchild in this method there is no min_stat defined in here right? Any explanation that why you use undefined min_stat in here?
There was a problem hiding this comment.
Hmmm, that looks like an oversight. There are a few things implemented in this library that I haven't used. I was coding most of it from documentation. 😄 I'll create a new issue to look into it.
There was a problem hiding this comment.
So I looked at the MIT source and this PR should fix the issue (#33 ). I'll push to a new gem soon.
Not expecting to be merged, but I hope this will help some guys figure out the issues.