[Freeipa-devel] [PATCH][SSSD] Implement GetUserAttributes in the InfoPipe

Stephen Gallagher sgallagh at redhat.com
Mon Mar 2 14:16:48 UTC 2009


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

Simo Sorce wrote:
> On Mon, 2009-03-02 at 08:56 -0500, Stephen Gallagher wrote:
>> You can't use strdup, because btreemap takes a void *. This is
>> necessary
>> so it can hold arbitrary data (see its use in
>> create_getattr_result_map).
> 
> If thekeys are void we can turn them into a char *, are we ever going to
> use keys that are not strings?

Probably not, but I wanted to leave it expandable in case we discovered
such a case.

> 
>> Also, I wasn't using talloc_reference, it's talloc_steal. Yes, I know
>> that's not ideal either. I'm open to suggestions.
> 
> talloc_steal() is much worse in this case.
> 

Can you explain to me what, exactly, is dangerous about
talloc_reference? It seems to me that calling
talloc_reference(btreemap_node, btreemap_value) would solve this handily.


- --
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmr6lAACgkQeiVVYja6o6PJogCfQCjRrGTEI8dIYL4P8Z3govo2
mogAnR0GMtq/xXa+04VPcDwCgxyJ0Gzw
=3jlF
-----END PGP SIGNATURE-----




More information about the Freeipa-devel mailing list