Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.3.1
2 changes: 2 additions & 0 deletions gssapi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = '>= 1.8.7'
gem.add_runtime_dependency 'ffi', '>= 1.0.1'

gem.add_development_dependency "pry-byebug"
end
6 changes: 4 additions & 2 deletions lib/gssapi/lib_gssapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,13 @@ def self.release_ptr(name_ptr)
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)
ptr_p = FFI::MemoryPointer.new :pointer
ctx_ptr = ptr_p.write_pointer(context_ptr)
maj_stat = LibGSSAPI.gss_delete_sec_context(min_stat, ctx_ptr, LibGSSAPI::GSS_C_NO_BUFFER)
end

def self.gss_c_no_context
self.new(GSSAPI::LibGSSAPI::GSS_C_NO_CONTEXT)
GssPointer.new(GSSAPI::LibGSSAPI::GSS_C_NO_CONTEXT)
end
end

Expand Down
6 changes: 5 additions & 1 deletion lib/gssapi/simple.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ def unwrap_message(msg, encrypted = true)
# @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), "krb5_gss_register_acceptor_identity did not return GSS_S_COMPLETE" if maj_stat != 0
if maj_stat != 0
min_stat = FFI::MemoryPointer.new :OM_uint32
min_stat.write_int(0)
raise GssApiError.new(maj_stat, min_stat), "krb5_gss_register_acceptor_identity did not return GSS_S_COMPLETE"
end
true
end

Expand Down