[SSSD] [PATCH] Allow arbitrary-length PAM messages

Stephen Gallagher sgallagh at redhat.com
Wed Mar 24 10:56:10 UTC 2010


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

On 03/24/2010 06:49 AM, Stephen Gallagher wrote:
> On 03/23/2010 04:51 PM, Simo Sorce wrote:
>> On Tue, 23 Mar 2010 16:38:57 -0400
>> Stephen Gallagher <sgallagh at redhat.com> wrote:
> 
>>> +        tempbuf = talloc_realloc(state, state->buf, uint8_t,
>>> +                                 state->len + size);
>>> +        if(!tempbuf) {
>>> +            tevent_req_error(req, ENOMEM);
>>>              return;
>>>          }
>>> +        state->buf = talloc_steal(state, tempbuf);
> 
>> Why the use of tempbuf ?
> 
>> you can simply do
>> state->buf = talloc_realloc(state, state->buf, ...
> 
>> if state->buf is null you abort the whole operation anyway.
> 
>> The talloc_steal is also useless given that talloc_realloc doesn't
>> change the parent.
> 
>> Simo.
> 
> 
> 
> You are absolutely correct, of course. New patch behaves better.
> 
> I also realized that I had added an extra variable to
> pack_response_packet() in krb5_child.c that was never used (and
> generated a compiler warning). I have removed it.
> 

This time with the patch attached.
_______________________________________________
sssd-devel mailing list
sssd-devel at lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

- -- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkup78oACgkQeiVVYja6o6MpVQCfRJaX/AdoZVjgr1J2zAXp3fFa
XLEAnjOgDp2Rshn0bR0x1nSw0CobsI9f
=UB7m
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-arbitrary-length-PAM-messages.patch
Type: text/x-patch
Size: 9570 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100324/83309364/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-arbitrary-length-PAM-messages.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100324/83309364/attachment.sig>


More information about the sssd-devel mailing list