On (20/01/16 16:25), Pavel Reichl wrote: >Hello, > >Updated patch set is attached. > >Among other thinks I have renamed ldap_idmap_extra_slice_init to >ldap_idmap_extra_slice_min and changed desc. in man page. Feel free to propose >better name or desc. > Thank you very much for updated changes. I really appreciate it. You managed even update version script and version info.
>I'm now going to have a look at test for the 1st patch. > >Bye. >From eb21380629044858076750309be88aaf1e978b98 Mon Sep 17 00:00:00 2001 >From: Pavel Reichl <prei...@redhat.com> >Date: Fri, 27 Nov 2015 04:15:00 -0500 >Subject: [PATCH 3/3] IDMAP: Add support for automatic adding of ranges > >Resolves: >https://fedorahosted.org/sssd/ticket/2188 >--- > Makefile.am | 2 +- > src/config/SSSDConfig/__init__.py.in | 1 + > src/config/etc/sssd.api.d/sssd-ad.conf | 1 + > src/config/etc/sssd.api.d/sssd-ipa.conf | 1 + > src/config/etc/sssd.api.d/sssd-ldap.conf | 1 + > src/lib/idmap/sss_idmap.c | 535 ++++++++++++++++++++++++++++--- > src/lib/idmap/sss_idmap.exports | 10 + > src/lib/idmap/sss_idmap.h | 75 +++++ > src/lib/idmap/sss_idmap_private.h | 4 + > src/man/include/ldap_id_mapping.xml | 20 ++ > src/providers/ad/ad_opts.c | 1 + > src/providers/ipa/ipa_opts.c | 1 + > src/providers/ldap/ldap_opts.c | 1 + > src/providers/ldap/sdap.h | 1 + > src/providers/ldap/sdap_idmap.c | 16 +- > src/tests/cmocka/test_sss_idmap.c | 87 ++++- > src/tests/sss_idmap-tests.c | 332 +++++++++++++++++++ > 17 files changed, 1026 insertions(+), 63 deletions(-) > >diff --git a/src/lib/idmap/sss_idmap.exports b/src/lib/idmap/sss_idmap.exports >index >52115636d5a6b936f18b4392e9d12adc26c85f53..f10feea6f880a6e02fdc354dce2044bcfae9b05c > 100644 >--- a/src/lib/idmap/sss_idmap.exports >+++ b/src/lib/idmap/sss_idmap.exports >@@ -54,3 +54,13 @@ SSS_IDMAP_0.4 { > local: > *; > }; >+ >+SSS_IDMAP_0.5 { >+ >+ # public functions >+ global: >+ >+ sss_idmap_ctx_set_extra_slice_init; >+ sss_idmap_add_auto_domain_ex; >+ >+} SSS_IDMAP_0.4; >\ No newline at end of file >diff --git a/src/lib/idmap/sss_idmap.h b/src/lib/idmap/sss_idmap.h >index >0797083293f7e010962828ddcd72709b290859b9..5c1fd1e94fb0ae9cb2edba0923f8733083b0b7c8 > 100644 >--- a/src/lib/idmap/sss_idmap.h >+++ b/src/lib/idmap/sss_idmap.h >@@ -94,6 +94,17 @@ typedef void *(idmap_alloc_func)(size_t size, void *pvt); > typedef void (idmap_free_func)(void *ptr, void *pvt); > > /** >+ * Typedef for storing mappings of dynamically created domains >+ */ >+typedef enum idmap_error_code (*idmap_store_cb)(const char *dom_name, >+ const char *dom_sid, >+ const char *range_id, >+ uint32_t min_id, >+ uint32_t max_id, >+ uint32_t first_rid, >+ void *pvt); >+ >+/** > * Structure for id ranges > * FIXME: this struct might change when it is clear how ranges are handled on > * the server side >@@ -175,6 +186,17 @@ enum idmap_error_code > sss_idmap_ctx_set_rangesize(struct sss_idmap_ctx *ctx, id_t rangesize); > > /** >+ * @brief Set the number of secondary slices available for domain >+ * >+ * @param[in] ctx idmap context >+ * @param[in] extra_slice_init number of secondary slices to be generated >+ * at startup >+ */ >+enum idmap_error_code >+sss_idmap_ctx_set_extra_slice_init(struct sss_idmap_ctx *ctx, >+ int extra_slice_init); >+ >+/** > * @brief Check if autorid compatibility mode is set > * > * @param[in] ctx idmap context >@@ -211,6 +233,16 @@ enum idmap_error_code > sss_idmap_ctx_get_rangesize(struct sss_idmap_ctx *ctx, id_t *rangesize); > > /** >+ * @brief Get the maximal number of secondary slices available for domain >+ * >+ * @param[in] ctx idmap context >+ * @param[out] _extra_slice_init maximal number of secondary slices >+ */ >+enum idmap_error_code >+sss_idmap_ctx_get_extra_slide_max(struct sss_idmap_ctx *ctx, >+ int *_extra_slide_max); >+ >+/** This function is unused and moreover it cannot be used. Do we really need it? BTW it cannot be used because it was not added to file src/lib/idmap/sss_idmap.exports I sorry for nitpick. I didn't notice it earlier. LS _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org