[15674] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: issue with krb5_prompter_posix() design

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Apr 15 17:50:48 2010

From: Greg Hudson <ghudson@mit.edu>
To: Nicolas Williams <Nicolas.Williams@oracle.com>
In-Reply-To: <20100415210317.GX10389@Sun.COM>
Date: Thu, 15 Apr 2010 17:50:44 -0400
Message-ID: <1271368244.23242.531.camel@ray>
Mime-Version: 1.0
Cc: MIT Kerberos Dev List <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

On Thu, 2010-04-15 at 17:03 -0400, Nicolas Williams wrote:
> I'm not so sure.  On the one hand the conv/prompter function will know
> how much memory to allocate, not the caller of the prompting function.
> OTOH requiring the prompting function to free() memory allocated by the
> prompter means that the application and the library must share the same
> memory allocator

Yes, but if krb5_prompter_posix() had been designed to allocate the
memory, the caller would probably free it with krb5_free_data() (or
krb5_free_data_contents(), perhaps), so the actual free would happen
inside the library.

I chose not to complicate my message with that detail, but only
succeeded in adding three more messages to the thread. :)


_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post