diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-06-17 13:39:43 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-16 11:12:51 +0200 |
commit | fe9a0097970d12ff261b7417f9e57db95957ab24 (patch) | |
tree | 3d3114d3806fcf35a9281be7a5e9fee428bb053f /src/responder/ifp/ifp_private.h | |
parent | 4e795d8ff3a1d1f5cd5a7dddaf364909c60d9191 (diff) | |
download | sssd-fe9a0097970d12ff261b7417f9e57db95957ab24.tar.gz sssd-fe9a0097970d12ff261b7417f9e57db95957ab24.tar.xz sssd-fe9a0097970d12ff261b7417f9e57db95957ab24.zip |
IFP: Add wildcard requests
Resolves:
https://fedorahosted.org/sssd/ticket/2553
Can be used as:
dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe \
/org/freedesktop/sssd/infopipe/Users \
org.freedesktop.sssd.infopipe.Users.ListByName \
string:r\* uint32:10
dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe \
/org/freedesktop/sssd/infopipe/Groups \
org.freedesktop.sssd.infopipe.Groups.ListByName \
string:r\* uint32:10
dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe \
/org/freedesktop/sssd/infopipe/Users \
org.freedesktop.sssd.infopipe.Users.ListByDomainAndName \
string:ipaldap string:r\* uint32:10
dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe \
/org/freedesktop/sssd/infopipe/Groups \
org.freedesktop.sssd.infopipe.Groups.ListByDomainAndName \
string:ipaldap string:r\* uint32:10
By default the wildcard_limit is unset, that is, the request will return
all cached entries that match.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder/ifp/ifp_private.h')
-rw-r--r-- | src/responder/ifp/ifp_private.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/responder/ifp/ifp_private.h b/src/responder/ifp/ifp_private.h index 304e4dc53..43519de6f 100644 --- a/src/responder/ifp/ifp_private.h +++ b/src/responder/ifp/ifp_private.h @@ -44,6 +44,7 @@ struct ifp_ctx { struct sysbus_ctx *sysbus; const char **user_whitelist; + uint32_t wildcard_limit; }; errno_t ifp_register_sbus_interface(struct sbus_connection *conn, @@ -84,4 +85,25 @@ ifp_get_user_extra_attributes(TALLOC_CTX *mem_ctx, struct ifp_ctx *ifp_ctx); bool ifp_attr_allowed(const char *whitelist[], const char *attr); bool ifp_is_user_attr_allowed(struct ifp_ctx *ifp_ctx, const char *attr); +/* Used for list calls */ +struct ifp_list_ctx { + struct sbus_request *sbus_req; + const char *filter; + uint32_t limit; + + struct sss_domain_info *dom; + struct ifp_ctx *ctx; + + const char **paths; + size_t path_count; +}; + +struct ifp_list_ctx *ifp_list_ctx_new(struct sbus_request *sbus_req, + struct ifp_ctx *ctx, + const char *filter, + uint32_t limit); + +size_t ifp_list_ctx_remaining_capacity(struct ifp_list_ctx *list_ctx, + size_t entries); + #endif /* _IFPSRV_PRIVATE_H_ */ |