diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-10-25 17:12:18 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2010-10-28 07:58:31 -0400 |
commit | 3f1293582fbede0d3dc5e4f2980eabbf61eb52c6 (patch) | |
tree | f4312fc0116440614f82b7284f3b63a70790b507 /daemons | |
parent | 874dc15c5d8ffb34520e2a90b48e664b00dda695 (diff) | |
download | freeipa-3f1293582fbede0d3dc5e4f2980eabbf61eb52c6.tar.gz freeipa-3f1293582fbede0d3dc5e4f2980eabbf61eb52c6.tar.xz freeipa-3f1293582fbede0d3dc5e4f2980eabbf61eb52c6.zip |
ipa-modrdn: Remove unused functions
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c b/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c index 6e484960a..72e16e90c 100644 --- a/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c +++ b/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c @@ -150,9 +150,6 @@ static void ipamodrdn_free_config_entry(struct configEntry ** entry); */ static char *ipamodrdn_get_dn(Slapi_PBlock * pb); static int ipamodrdn_dn_is_config(char *dn); -static int ipamodrdn_list_contains_attr(char **list, char *attr); -static int ipamodrdn_list_contains_attrs(char **list, char **attrs); -static void ipamodrdn_list_remove_attr(char **list, char *attr); /** * @@ -169,18 +166,6 @@ void ipamodrdn_dump_config(); void ipamodrdn_dump_config_entry(struct configEntry *); /** - * set the debug level - */ -#ifdef _WIN32 -int *module_ldap_debug = 0; - -void plugin_init_debug_level(int *level_ptr) -{ - module_ldap_debug = level_ptr; -} -#endif - -/** * * Deal with cache locking * @@ -690,97 +675,6 @@ static int ipamodrdn_dn_is_config(char *dn) than config and startup ****************************************************/ -/* - * ipamodrdn_list_contains_attr() - * - * Checks if a attr is contained in a list of attrs. - * Returns 1 if the attr is found, 0 otherwise. - */ -static int -ipamodrdn_list_contains_attr(char **list, char *attr) -{ - int ret = 0; - int i = 0; - - if (list && attr) { - for (i = 0; list[i]; i++) { - if (slapi_attr_types_equivalent(attr, list[i])) { - ret = 1; - break; - } - } - } - - return ret; -} - -/* - * ipamodrdn_list_contains_attrs() - * - * Checks if all attrs in one list (attrs) are contained - * in another list of attrs (list). Returns 1 if all - * attrs are found, 0 otherwise. - */ -static int -ipamodrdn_list_contains_attrs(char **list, char **attrs) -{ - int ret = 1; - int i = 0; - int j = 0; - - if (list && attrs) { - for (i = 0; attrs[i]; i++) { - int found = 0; - - for (j = 0; list[j]; j++) { - if (slapi_attr_types_equivalent(attrs[i], list[i])) { - found = 1; - break; - } - } - - if (!found) { - ret = 0; - break; - } - } - } else { - ret = 0; - } - - return ret; -} - -/* - * ipamodrdn_list_remove_attr() - * - * Removes a attr from a list of attrs. - */ -static void -ipamodrdn_list_remove_attr(char **list, char *attr) -{ - int i = 0; - int found_attr = 0; - - if (list && attr) { - /* Go through the list until we find the attr that - * we want to remove. We simply free the attr we - * want to remove and shift the remaining array - * elements down by one index. This will leave us - * with two NULL elements at the end of the list, - * but this should not cause any problems. */ - for (i = 0; list[i]; i++) { - if (found_attr) { - list[i] = list[i + 1]; - } else if (slapi_attr_types_equivalent(attr, list[i])) { - slapi_ch_free_string(&list[i]); - list[i] = list[i + 1]; - found_attr = 1; - } - } - } -} - static int ipamodrdn_change_attr(struct configEntry *cfgentry, char *targetdn, const char *value) @@ -949,43 +843,3 @@ static int ipamodrdn_config_check_post_op(Slapi_PBlock * pb) return 0; } - - -/**************************************************** - End of - Functions that actually do things other - than config and startup -****************************************************/ - -/** - * debug functions to print config - */ -void ipamodrdn_dump_config() -{ - PRCList *list; - - ipamodrdn_read_lock(); - - if (!PR_CLIST_IS_EMPTY(ipamodrdn_global_config)) { - list = PR_LIST_HEAD(ipamodrdn_global_config); - while (list != ipamodrdn_global_config) { - ipamodrdn_dump_config_entry((struct configEntry *) list); - list = PR_NEXT_LINK(list); - } - } - - ipamodrdn_unlock(); -} - - -void ipamodrdn_dump_config_entry(struct configEntry * entry) -{ - int i = 0; - - printf("<---- source attr-----> %s\n", entry->sattr); - printf("<---- target attr-----> %s\n", entry->tattr); - printf("<---- prefix ---------> %s\n", entry->prefix); - printf("<---- suffix ---------> %s\n", entry->suffix); - printf("<---- filter ---------> %s\n", entry->filter); - printf("<---- scope ----------> %s\n", entry->scope); -} |