Imported Upstream version 4.0.5

This commit is contained in:
Mario Fetka
2021-07-25 07:50:50 +02:00
parent 8ff3be4216
commit 3bfaa6e020
2049 changed files with 317193 additions and 1632423 deletions

View File

@@ -64,7 +64,6 @@
#define IPAUUID_GENERATE "ipaUuidMagicRegen"
#define IPAUUID_FILTER "ipaUuidFilter"
#define IPAUUID_SCOPE "ipaUuidScope"
#define IPAUUID_EXCLUDE_SUBTREE "ipaUuidExcludeSubtree"
#define IPAUUID_ENFORCE "ipaUuidEnforce"
#define IPAUUID_FEATURE_DESC "IPA UUID"
@@ -92,7 +91,6 @@ struct configEntry {
Slapi_Filter *slapi_filter;
char *generate;
char *scope;
char *exclude_subtree;
bool enforce;
};
@@ -539,10 +537,6 @@ ipauuid_parse_config_entry(Slapi_Entry * e, bool apply)
}
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_SCOPE, entry->scope);
value = slapi_entry_attr_get_charptr(e, IPAUUID_EXCLUDE_SUBTREE);
entry->exclude_subtree = value;
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_EXCLUDE_SUBTREE, entry->exclude_subtree);
entry->enforce = slapi_entry_attr_get_bool(e, IPAUUID_ENFORCE);
LOG_CONFIG("----------> %s [%s]\n",
IPAUUID_ENFORCE, entry->enforce ? "True" : "False");
@@ -646,10 +640,6 @@ ipauuid_free_config_entry(struct configEntry **entry)
slapi_ch_free_string(&e->scope);
}
if (e->exclude_subtree) {
slapi_ch_free_string(&e->exclude_subtree);
}
slapi_ch_free((void **)entry);
}
@@ -911,7 +901,6 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
list != ipauuid_global_config;
list = PR_NEXT_LINK(list)) {
cfgentry = (struct configEntry *) list;
char *current_dn = NULL;
generate = false;
set_attr = false;
@@ -921,25 +910,14 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
cfgentry->attr)) {
continue;
}
/* Current DN may have been reset by
* slapi_pblock_set(pb, SLAPI_ADD_TARGET,..) see below
* need to reread it
*/
current_dn = ipauuid_get_dn(pb);
/* is the entry in scope? */
if (cfgentry->scope) {
if (!slapi_dn_issuffix(current_dn, cfgentry->scope)) {
if (!slapi_dn_issuffix(dn, cfgentry->scope)) {
continue;
}
}
if (cfgentry->exclude_subtree) {
if (slapi_dn_issuffix(current_dn, cfgentry->exclude_subtree)) {
continue;
}
}
/* does the entry match the filter? */
if (cfgentry->slapi_filter) {
Slapi_Entry *test_e = NULL;
@@ -1052,8 +1030,6 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
default:
/* never reached, just silence compiler */
LOG_TRACE("File '%s' line %d: Got unexpected value of modtype:"
"%d\n", __FILE__, __LINE__, modtype);
break;
}
@@ -1114,7 +1090,7 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
ret = LDAP_OPERATIONS_ERROR;
goto done;
}
sdn = slapi_sdn_new_dn_byval(current_dn);
sdn = slapi_sdn_new_dn_byval(dn);
if (!sdn) {
LOG_OOM();
ret = LDAP_OPERATIONS_ERROR;