Skip to content

Commit

Permalink
RT#42191 Only use pass for GSSAPI credentials if it is an object of t…
Browse files Browse the repository at this point in the history
…ype GSSAPI::Cred
  • Loading branch information
gbarr committed Sep 24, 2009
1 parent c636a06 commit 2997ef6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Authen/SASL/Perl/GSSAPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use strict;
use vars qw($VERSION @ISA);
use GSSAPI;

$VERSION= "0.04";
$VERSION= "0.05";
@ISA = qw(Authen::SASL::Perl);

my %secflags = (
Expand Down Expand Up @@ -57,7 +57,8 @@ sub client_start {
$self->{gss_ctx} = new GSSAPI::Context;
$self->{gss_state} = 0;
$self->{gss_layer} = undef;
$self->{gss_cred} = $self->_call('pass') || GSS_C_NO_CREDENTIAL;
my $cred = $self->_call('pass');
$self->{gss_cred} = (ref($cred) && $cred->isa('GSSAPI::Cred')) ? $cred : GSS_C_NO_CREDENTIAL;
$self->{gss_mech} = $self->_call('gssmech') || gss_mech_krb5;

# reset properties for new session
Expand Down

0 comments on commit 2997ef6

Please sign in to comment.