Skip to content

Commit

Permalink
sdap: make some nested group related calls public
Browse files Browse the repository at this point in the history
sdap_nested_groups_store() and rfc2307bis_nested_groups_send/recv() will
be reused for domain local group lookups.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 49d3f0a)
  • Loading branch information
sumit-bose authored and jhrozek committed Oct 31, 2016
1 parent 9a243dc commit f38c62f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/providers/ldap/sdap_async_initgroups.c
Expand Up @@ -622,7 +622,7 @@ static int sdap_initgr_rfc2307_recv(struct tevent_req *req)
}

/* ==Common code for pure RFC2307bis and IPA/AD========================= */
static errno_t
errno_t
sdap_nested_groups_store(struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
struct sdap_options *opts,
Expand Down Expand Up @@ -1558,14 +1558,6 @@ static void sdap_initgr_rfc2307bis_process(struct tevent_req *subreq);
static void sdap_initgr_rfc2307bis_done(struct tevent_req *subreq);
errno_t save_rfc2307bis_user_memberships(
struct sdap_initgr_rfc2307bis_state *state);
struct tevent_req *rfc2307bis_nested_groups_send(
TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct sdap_options *opts, struct sysdb_ctx *sysdb,
struct sss_domain_info *dom, struct sdap_handle *sh,
struct sdap_search_base **search_bases,
struct sysdb_attrs **groups, size_t num_groups,
hash_table_t *group_hash, size_t nesting);
static errno_t rfc2307bis_nested_groups_recv(struct tevent_req *req);

static struct tevent_req *sdap_initgr_rfc2307bis_send(
TALLOC_CTX *memctx,
Expand Down Expand Up @@ -2616,7 +2608,7 @@ static void rfc2307bis_nested_groups_process(struct tevent_req *subreq)
tevent_req_set_callback(subreq, rfc2307bis_nested_groups_done, req);
}

static errno_t rfc2307bis_nested_groups_recv(struct tevent_req *req)
errno_t rfc2307bis_nested_groups_recv(struct tevent_req *req)
{
TEVENT_REQ_RETURN_ON_ERROR(req);
return EOK;
Expand Down
16 changes: 16 additions & 0 deletions src/providers/ldap/sdap_async_private.h
Expand Up @@ -157,4 +157,20 @@ errno_t sdap_check_ad_group_type(struct sss_domain_info *dom,
struct sysdb_attrs *group_attrs,
const char *group_name,
bool *_need_filter);

struct tevent_req *rfc2307bis_nested_groups_send(
TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct sdap_options *opts, struct sysdb_ctx *sysdb,
struct sss_domain_info *dom, struct sdap_handle *sh,
struct sdap_search_base **search_bases,
struct sysdb_attrs **groups, size_t num_groups,
hash_table_t *group_hash, size_t nesting);
errno_t rfc2307bis_nested_groups_recv(struct tevent_req *req);

errno_t sdap_nested_groups_store(struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
struct sdap_options *opts,
struct sysdb_attrs **groups,
unsigned long count);

#endif /* _SDAP_ASYNC_PRIVATE_H_ */

0 comments on commit f38c62f

Please sign in to comment.