Subject: | GSSAPI::NAME->display broken |
The following test will always fail :
my $keystring = 'chpasswd@mars.gac.edu';
$status = GSSAPI::Name->import($name, $keystring);
$status = $name->display($display);
check($keystring eq $display);
This is because the buffer output from
gss_buffer_str_out output
RETVAL.major =
gss_display_name(&RETVAL.minor, src, &output, &outputtype);
is converted in the 'typemap' like this :
T_BUFFER_STR_OUT
if ($var.value != NULL) {
sv_setpvn($arg, $var.value, $var.length);
SvCUR_set($arg, $var.length-1);
SvSETMAGIC($arg);
} else {
sv_setsv_mg($arg, &PL_sv_undef);
}
{
OM_uint32 minor;
gss_release_buffer(&minor, &$var);
}
This is not correct for some buffers. I've changed it so the two lines sv_setpvn/SvCUR_set are one line :
sv_setpv($arg, $var.value);
This now works and passes all the tests. I've added the above check as well.