rewrite gss_krb5_ccache_name

Jeffrey Altman jaltman at secure-endpoints.com
Mon Nov 24 12:10:05 EST 2008


Douglas E. Engert wrote:
>
>
> Stephen Ince wrote:
>> Thx. Not really possible and has other side effects. We need the
>> application needs to run as lean as possible. One thread consumes a
>> lot of memory and will have to be around for the life of the program.
>> At one point you could have 2000 threads and at another point 10
>> threads. We basically simulate browsers and their http connections.
>
>
> As a temporary fix, could you do something like:
>
> char * not_needed_name;
> gss_buffer_desc not_needed_buffer;
>
> not_needed_name = NULL;
> major_status =gss_krb5_ccache_name(&minor_status,
>                                       krb5_ccache_name,
>                                       &not_needed_name);
> if (not_needed_name) {
>    not_needed_buffer.length = strlen(not_needed_name)+1;
>    not_needed_buffer.value = not_needed_name;
>    gss_release_buffer(&minor_status, &not_needed_buffer);
>    not_needed_name = NULL;
> }
>
> This would then allow you application to get the string
> so it can be freeded, but let the gssapi lib use the free()
> function linked with the lib.
Doug:

That could be done byt why do it when passing NULL instead of
&not_needed_name causes gss_krb5_ccache_name() to free the
C string instead of returning it?

Jeffrey Altman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3355 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.mit.edu/pipermail/krbdev/attachments/20081124/270f1dfa/attachment.bin


More information about the krbdev mailing list