[Perlgssapi-developer] Re: Feedback on LWP-Authen-Negotiate-0.02
Brought to you by:
achimgrolms
From: Leif J. <le...@it...> - 2006-02-17 06:50:50
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dax Kelson wrote: > A 'make test' generates the error: > > Use of uninitialized value in subroutine entry > at /tmp/too/LWP-Authen-Negotiate-0.02/blib/lib/LWP/Authen/Negotiate.pm > line 76. > > 57 my $status = GSSAPI::Name->import($target,"HTTP@".$uri->host,GSSAPI::OID::gss_nt_hostbased_service); > 58 my $tname; > 59 $target->display($tname); > 60 #warn "Using HTTP@".$uri->host." -> ".$tname."\n"; > 61 my $auth_header = $proxy ? "Proxy-Authorization" : "Authorization"; > 62 > 63 my $itoken; > 64 foreach ($response->header('WWW-Authenticate')) { > 65 last if /^Negotiate (.+)/ && ($itoken=decode_base64($1)); > 66 } > 67 > 68 my $ctx = GSSAPI::Context->new(); > 69 my $mech = $ENV{LWP_AUTHEN_NEGOTIATE_MECH} || 'KRB5'; > 70 my $imech = mech2oid($mech); > 71 $imech = GSSAPI::OID::gss_mech_krb5 unless $imech; > 72 my $iflags = GSS_C_MUTUAL_FLAG; > 73 my $bindings = GSS_C_NO_CHANNEL_BINDINGS; > 74 my $creds = GSS_C_NO_CREDENTIAL; > 75 my $itime = 0; > 76 $status = $ctx->init($creds,$target,$imech,$iflags,$itime,$bindings,$itoken,$omech,$otoken,$oflags,$otime); > > Line 57 and line 76 together look strange. Should one of them use a different name? > > Dax Kelson > Guru Labs > Are you talking about the variable reuse for $status? Imho it is acceptable in this case since they both represent return-status from different functions from the same library. MVH leifj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD9XI+8Jx8FtbMZncRAoutAJ90SoQgVbUGlHazTkkpe+2I9lp4SACgjQxC tHFPR7PJByNwVsQ7IfZWQQY= =IhLV -----END PGP SIGNATURE----- |