Re: Conversation response deallocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your module should free() it.

http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/mwg-expected-by-module-item.html#mwg-pam_conv
2.1.6.1. DESCRIPTION
third paragraph.

Cheers

Andrew

Ludvig Ericson wrote:
> I've been pondering this for a while now, and I can't come up with
> anything.
> 
> When a conversation function is called, the response data is allocated
> by the conversation function itself; hence, it should probably be
> freed up by that same function.
> But the response data has to be returned to pam first, and the
> function itself has to return and pam has to process these messages,
> so you don't have a chance to free that conversation data unless you
> store it in another scope, which would be rather ugly according to me.
> 
> Am I missing something here? Does the response argument point to an
> already allocated memory region? misc_conv doesn't look like it thinks
> so; it allocates it's own memory and sets the pointer to that new
> memory region. I couldn't see where they free the data up.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFF/CkzQheEq9QabfIRAk35AJkBd7rrkbDRvaH3Mvkba+O6WIDiSwCfdaSY
K2BaWk643t93Z4sbBeKoLdY=
=MPG7
-----END PGP SIGNATURE-----

_______________________________________________
Pam-list mailing list
Pam-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux