[15675] in Kerberos_V5_Development
Re: issue with krb5_prompter_posix() design
daemon@ATHENA.MIT.EDU (Nicolas Williams)
Thu Apr 15 17:56:24 2010
Date: Thu, 15 Apr 2010 16:56:07 -0500
From: Nicolas Williams <Nicolas.Williams@oracle.com>
To: Greg Hudson <ghudson@mit.edu>
Message-ID: <20100415215606.GZ10389@Sun.COM>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <1271368244.23242.531.camel@ray>
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, Apr 15, 2010 at 05:50:44PM -0400, Greg Hudson wrote:
> 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.
krb5_prompter_posix() is not a good example because it's effectively
demo code (useful demo code, I'll grant). It's the prompters that
_don't_ come with MIT krb5 that matter. Sundry pam_krb5 module
implementations are truly the main and most complicated consumers of the
krb5_gic prompter facility. And much pain arises for any pam_krb5
developer from design problems in PAM and impedance mismatches between
PAM and the krb5_gic prompter.
Nico
--
_______________________________________________
krbdev mailing list krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev