Use apr_strdup instead of the manual strcpy.
Add LookupUserAttr and call to sss_lookup_user_get_attr.
Make the LookupUserAttr functionality compile-time conditional.