diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-03-02 09:35:06 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-02 09:47:54 -0500 |
commit | 5e3966c99180abdcd1e21774a882f1c14c47aae8 (patch) | |
tree | 1a882b9d49f2c7ac25d70f0bbb644b5cefed6439 /server/infopipe/infopipe_private.h | |
parent | 6f5b1ad8c234d58041e45aef4558d50f44d7f021 (diff) | |
download | sssd-5e3966c99180abdcd1e21774a882f1c14c47aae8.tar.gz sssd-5e3966c99180abdcd1e21774a882f1c14c47aae8.tar.xz sssd-5e3966c99180abdcd1e21774a882f1c14c47aae8.zip |
Implement GetUserAttributes in the InfoPipe
This patch adds support for requesting user data in the sysdb via
the InfoPipe. It currently has support for reading defined entries
of integral, floating-point or string types.
Tasks remaining:
1) Implement call to the provider when cache is out of date
2) Support byte arrays for userpic and similar
I modified sysdb_search_ctx in sysdb_search.c to accept an array of
attributes to pass into the LDB search.
I also made one additional related fix: the btreemap now sorts in the
correct order. Previously I had accidentally transposed the two
values for sorting, so the map would always have been in exact
reverse order.
Diffstat (limited to 'server/infopipe/infopipe_private.h')
-rw-r--r-- | server/infopipe/infopipe_private.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/server/infopipe/infopipe_private.h b/server/infopipe/infopipe_private.h index 8ea2586bf..f1d6694a4 100644 --- a/server/infopipe/infopipe_private.h +++ b/server/infopipe/infopipe_private.h @@ -27,27 +27,39 @@ struct infp_ctx { struct confdb_ctx *cdb; struct service_sbus_ctx *ss_ctx; struct sysbus_ctx *sysbus; + struct sysdb_ctx *sysdb; + struct btreemap *domain_map; char *introspect_xml; + + int cache_timeout; +}; + +struct infp_req_ctx { + struct infp_ctx *infp; + struct sbus_conn_ctx *sconn; + DBusMessage *req_message; + bool check_provider; }; -enum object_types { +enum infp_object_types { INFP_OBJ_TYPE_INVALID = 0, INFP_OBJ_TYPE_USER, INFP_OBJ_TYPE_GROUP }; -int get_object_type(const char *obj); +int infp_get_object_type(const char *obj); -enum action_types { +enum infp_action_types { INFP_ACTION_TYPE_INVALID = 0, + INFP_ACTION_TYPE_READ, INFP_ACTION_TYPE_CREATE, INFP_ACTION_TYPE_DELETE, INFP_ACTION_TYPE_MODIFY, INFP_ACTION_TYPE_ADDMEMBER, INFP_ACTION_TYPE_REMOVEMEMBER }; -int get_action_type(const char *action); +int infp_get_action_type(const char *action); -enum attribute_types { +enum infp_attribute_types { INFP_ATTR_TYPE_INVALID = 0, INFP_ATTR_TYPE_DEFAULTGROUP, INFP_ATTR_TYPE_GECOS, @@ -60,13 +72,17 @@ enum attribute_types { INFP_ATTR_TYPE_LAST_LOGIN, INFP_ATTR_TYPE_USERPIC }; -int get_attribute_type(const char *attribute); +int infp_get_attribute_type(const char *attribute); + +int infp_get_user_attr_dbus_type(int attr_type, int *subtype); bool infp_get_permissions(const char *username, - const char *domain, + struct sss_domain_info *domain, int object_type, const char *instance, int action_type, int action_attribute); +struct sss_domain_info *infp_get_domain_obj(struct infp_ctx *infp, const char *domain_name); + #endif /* INFOPIPE_PRIVATE_H_ */ |