rewrite gss_krb5_ccache_name
Douglas E. Engert
deengert at anl.gov
Mon Nov 24 12:18:31 EST 2008
Jeffrey Altman wrote:
> 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,
>> ¬_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, ¬_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
> ¬_needed_name causes gss_krb5_ccache_name() to free the
> C string instead of returning it?
I might have miss understood the problem. I though he was saying the
when he use the NULL there was a leak. But if he passed ¬_needed_name
the library would not leak, and he could then free the string using this
trick.
>
> Jeffrey Altman
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> krbdev mailing list krbdev at mit.edu
> https://mailman.mit.edu/mailman/listinfo/krbdev
--
Douglas E. Engert <DEEngert at anl.gov>
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois 60439
(630) 252-5444
More information about the krbdev
mailing list