rewrite gss_krb5_ccache_name

Stephen Ince since at opendemand.com
Mon Nov 24 12:14:50 EST 2008


NULL does not work and "" does not work.

gss_krb5_ccache_name(&minor_status,"", NULL);
gss_krb5_ccache_name(&minor_status,NULL, NULL);
----- Original Message ----- 
From: "Jeffrey Altman" <jaltman at secure-endpoints.com>
To: <deengert at anl.gov>
Cc: "Stephen Ince" <since at opendemand.com>; "krbdev" <krbdev at mit.edu>; 
"Jeffrey Hutzelman" <jhutz at cmu.edu>
Sent: Monday, November 24, 2008 12:10 PM
Subject: Re: rewrite gss_krb5_ccache_name


> 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: 1880 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/krbdev/attachments/20081124/f58230f3/attachment.bin


More information about the krbdev mailing list