On Mon, Sep 14, 2009 at 08:03:14AM -0400, Stephen Gallagher wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 09/13/2009 10:38 AM, Simo Sorce wrote: > > This patch finally allows us to define the type for basic options. > > It uses a union to store different types, and an enum to list the > > allowed types. > > It also provides for helper functions that always check the type to > > safely retrieve data, or scream loudly if we messed up. > > > > This allowed me to remove all but 1 special option that was a duplicate > > made only to avoid converting from string to int every time we needed to > > get an option. > > The only remaining special case is the schema type, because that is a > > special string to special number transaltion. But these kind of options > > (another is tls_reqcert) are rare enough that we can avoid trying to > > make special handlers for them too. > > > > Currently there are 4 types supported: string, blob, number, boolean. > > String has 2 subtypes, const and non const, but they are not enforced > > (you can assign a const string and then re-read it as non-const). But > > this is not really a problem, as values are always copied in the init > > functions, furthermore, although you can get values as non-const they > > should always be regarded a immutable strings as the value returned is > > the actual string saved in the option, so changing it, means changing > > the configuration. > > > > I think we can later take this code and make it generic in the provider > > backend code, so that all backends can use it. It should be easy enough > > to do. > > > > Simo. > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > sssd-devel mailing list > > sssd-devel@lists.fedorahosted.org > > https://fedorahosted.org/mailman/listinfo/sssd-devel > > Nack. Generates a segfault running "getent passwd u...@ldap" >
I cannot reproduce this with my setup, but providers/ldap/ldap_id.c:982: warning: 'ldap_id_cleanup_done' defined but not used and there are some typos in the title and description of the patch. bye, Sumit _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel