[389-ds-base] tag 389-ds-base-1.4.0.20 created (now b43380f)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to tag 389-ds-base-1.4.0.20
in repository 389-ds-base.
at b43380f (commit)
No new revisions were added by this update.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch master updated: Bump version to 1.4.0.20
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new b43380f Bump version to 1.4.0.20
b43380f is described below
commit b43380f77d70b0b78f75a22c694b57fb5ee8811e
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Dec 14 13:33:58 2018 -0500
Bump version to 1.4.0.20
---
VERSION.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.sh b/VERSION.sh
index 2328d3f..88330ee 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=4
-VERSION_MAINT=0.19
+VERSION_MAINT=0.20
# NOTE: VERSION_PREREL is automatically set for builds made out of a git tree
VERSION_PREREL=
VERSION_DATE=$(date -u +%Y%m%d)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch 389-ds-base-1.3.9 updated (6084978 -> 7d89239)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
spichugi pushed a change to branch 389-ds-base-1.3.9
in repository 389-ds-base.
from 6084978 Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
add 7d89239 Issue 49618 - Increase cachememsize and dncachememsize variable sizes
No new revisions were added by this update.
Summary of changes:
ldap/servers/slapd/back-ldbm/ldbm_config.c | 2 +-
ldap/servers/slapd/back-ldbm/ldbm_instance_config.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch master updated (9130787 -> 8a08fb6)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch master
in repository 389-ds-base.
from 9130787 Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
add 8a08fb6 Ticket 49994 - Add test for backend/suffix CLI functions
No new revisions were added by this update.
Summary of changes:
ldap/servers/plugins/chainingdb/cb_instance.c | 2 +-
src/cockpit/389-console/src/replication.js | 2 +-
src/lib389/lib389/backend.py | 3 +
src/lib389/lib389/chaining.py | 2 +-
src/lib389/lib389/cli_conf/backend.py | 25 +-
src/lib389/lib389/cli_conf/chaining.py | 5 +-
src/lib389/lib389/index.py | 6 +-
src/lib389/lib389/tests/cli/__init__.py | 42 +-
src/lib389/lib389/tests/cli/conf_backend_test.py | 503 ++++++++++++++++++++--
src/lib389/lib389/tests/cli/conf_chaining_test.py | 198 +++++++++
10 files changed, 709 insertions(+), 79 deletions(-)
create mode 100644 src/lib389/lib389/tests/cli/conf_chaining_test.py
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch 389-ds-base-1.3.8 updated: Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.8
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.8 by this push:
new 60b97ef Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
60b97ef is described below
commit 60b97efbe4cd6934af3099b428d89fc13c7014d6
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Dec 14 13:14:05 2018 -0500
Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
Description: fetch_attr was recetnly moved toeh public api. This
naming context is conflicting with other applications.
Appropriately changing the name to start with "slapi_"
https://pagure.io/389-ds-base/issue/50090
Reviewed by: mreynolds(one line commit rule)
(cherry picked from commit 913078781712a92ac25193d6ae87bb92b2b26a67)
---
ldap/servers/plugins/automember/automember.c | 18 +++---
ldap/servers/plugins/linkedattrs/fixup_task.c | 2 +-
ldap/servers/plugins/memberof/memberof.c | 4 +-
.../plugins/posix-winsync/posix-group-task.c | 4 +-
.../plugins/replication/repl5_replica_config.c | 12 ++--
.../plugins/replication/windows_protocol_util.c | 2 +-
ldap/servers/plugins/schema_reload/schema_reload.c | 4 +-
ldap/servers/plugins/syntaxes/validate_task.c | 4 +-
ldap/servers/slapd/slapi-plugin.h | 2 +-
ldap/servers/slapd/task.c | 68 +++++++++++-----------
ldap/servers/slapd/test-plugins/sampletask.c | 4 +-
ldap/servers/slapd/util.c | 2 +-
12 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index d982d49..08d9e49 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -2018,17 +2018,17 @@ automember_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter __attr
/*
* Grab the task params
*/
- if ((base_dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", 0)) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- scope = fetch_attr(e, "scope", "sub");
+ scope = slapi_fetch_attr(e, "scope", "sub");
/*
* setup our task data
*/
@@ -2245,22 +2245,22 @@ automember_task_add_export_updates(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*returncode = LDAP_SUCCESS;
- if ((ldif = fetch_attr(e, "ldif", 0)) == NULL) {
+ if ((ldif = slapi_fetch_attr(e, "ldif", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((base_dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", 0)) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- scope = fetch_attr(e, "scope", "sub");
+ scope = slapi_fetch_attr(e, "scope", "sub");
slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &bind_dn);
@@ -2453,12 +2453,12 @@ automember_task_add_map_entries(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *e
/*
* Get the params
*/
- if ((ldif_in = fetch_attr(e, "ldif_in", 0)) == NULL) {
+ if ((ldif_in = slapi_fetch_attr(e, "ldif_in", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((ldif_out = fetch_attr(e, "ldif_out", 0)) == NULL) {
+ if ((ldif_out = slapi_fetch_attr(e, "ldif_out", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/linkedattrs/fixup_task.c b/ldap/servers/plugins/linkedattrs/fixup_task.c
index 4929714..4c7ab8c 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -51,7 +51,7 @@ linked_attrs_fixup_task_add(Slapi_PBlock *pb,
}
/* get arg(s) and setup our task data */
- linkdn = fetch_attr(e, "linkdn", 0);
+ linkdn = slapi_fetch_attr(e, "linkdn", 0);
if (linkdn) {
mytaskdata->linkdn = slapi_dn_normalize(slapi_ch_strdup(linkdn));
}
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index 26236dc..f4d45ed 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -2889,13 +2889,13 @@ memberof_task_add(Slapi_PBlock *pb,
*returncode = LDAP_SUCCESS;
/* get arg(s) */
- if ((dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", "(|(objectclass=inetuser)(objectclass=inetadmin)(objectclass=nsmemberof))")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(|(objectclass=inetuser)(objectclass=inetadmin)(objectclass=nsmemberof))")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c b/ldap/servers/plugins/posix-winsync/posix-group-task.c
index d8b6add..922c4f7 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-task.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c
@@ -66,7 +66,7 @@ posix_group_task_add(Slapi_PBlock *pb __attribute__((unused)),
/* get arg(s) */
/* default: set replication basedn */
- if ((dn = fetch_attr(e, "basedn", (char *)slapi_sdn_get_dn(posix_winsync_config_get_suffix()))) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", (char *)slapi_sdn_get_dn(posix_winsync_config_get_suffix()))) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -75,7 +75,7 @@ posix_group_task_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_log_err(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: retrieved basedn: %s\n", dn);
- if ((filter = fetch_attr(e, "filter", "(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 84e0263..a952b68 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -1386,7 +1386,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb __attribute__((unused)),
/*
* Get our task settings
*/
- if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL) {
+ if ((rid_str = slapi_fetch_attr(e, "replica-id", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-id attribute");
cleanruv_log(task, -1, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
@@ -1394,14 +1394,14 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb __attribute__((unused)),
goto out;
}
rid = atoi(rid_str);
- if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "replica-base-dn", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-base-dn attribute");
cleanruv_log(task, (int)rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((force_cleaning = fetch_attr(e, "replica-force-cleaning", 0)) != NULL) {
+ if ((force_cleaning = slapi_fetch_attr(e, "replica-force-cleaning", 0)) != NULL) {
if (strcasecmp(force_cleaning, "yes") != 0 && strcasecmp(force_cleaning, "no") != 0) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value for replica-force-cleaning "
"(%s). Value must be \"yes\" or \"no\" for task - (%s)",
@@ -2855,14 +2855,14 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb __attribute__((unused)),
/*
* Get our task settings
*/
- if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL) {
+ if ((rid_str = slapi_fetch_attr(e, "replica-id", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-id\"");
cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- certify_all = fetch_attr(e, "replica-certify-all", 0);
+ certify_all = slapi_fetch_attr(e, "replica-certify-all", 0);
/*
* Check the rid
*/
@@ -2875,7 +2875,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb __attribute__((unused)),
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "replica-base-dn", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-base-dn\"");
cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index f6898d0..e354372 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -764,7 +764,7 @@ send_password_modify(Slapi_DN *sdn,
/* Get the local entry if it exists */
rc = windows_get_local_entry(local_sdn, &local_entry);
if ((0 == rc) && local_entry) {
- expiration_val = (char *)fetch_attr(local_entry, "passwordExpirationtime", NULL);
+ expiration_val = (char *)slapi_fetch_attr(local_entry, "passwordExpirationtime", NULL);
if (expiration_val && parse_genTime(expiration_val) != NO_TIME){
/* The user did reset their password */
slapi_log_err(SLAPI_LOG_REPL, windows_repl_plugin_name,
diff --git a/ldap/servers/plugins/schema_reload/schema_reload.c b/ldap/servers/plugins/schema_reload/schema_reload.c
index c2399e5..00b7821 100644
--- a/ldap/servers/plugins/schema_reload/schema_reload.c
+++ b/ldap/servers/plugins/schema_reload/schema_reload.c
@@ -226,7 +226,7 @@ schemareload_add(Slapi_PBlock *pb,
char *bind_dn;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -236,7 +236,7 @@ schemareload_add(Slapi_PBlock *pb,
slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &bind_dn);
/* get arg(s) */
- schemadir = fetch_attr(e, "schemadir", NULL);
+ schemadir = slapi_fetch_attr(e, "schemadir", NULL);
/* allocate new task now */
task = slapi_plugin_new_task(slapi_entry_get_ndn(e), arg);
diff --git a/ldap/servers/plugins/syntaxes/validate_task.c b/ldap/servers/plugins/syntaxes/validate_task.c
index afec9ef..d069a33 100644
--- a/ldap/servers/plugins/syntaxes/validate_task.c
+++ b/ldap/servers/plugins/syntaxes/validate_task.c
@@ -94,13 +94,13 @@ syntax_validate_task_add(Slapi_PBlock *pb __attribute__((unused)),
*returncode = LDAP_SUCCESS;
/* get arg(s) */
- if ((dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", "(objectclass=*)")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(objectclass=*)")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index bdad4e5..54c195e 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -8295,7 +8295,7 @@ int32_t slapi_atomic_decr_32(int32_t *ptr, int memorder);
uint64_t slapi_atomic_decr_64(uint64_t *ptr, int memorder);
/* helper function */
-const char * fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val);
+const char * slapi_fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val);
#ifdef __cplusplus
}
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index 698ee19..0cf0cd7 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -386,7 +386,7 @@ slapi_task_status_changed(Slapi_Task *task)
e = get_internal_entry(pb, task->task_dn);
if (e == NULL)
return;
- ttl = atoi(fetch_attr(e, "ttl", DEFAULT_TTL));
+ ttl = atoi(slapi_fetch_attr(e, "ttl", DEFAULT_TTL));
if (ttl > 3600)
ttl = 3600; /* be reasonable. */
expire = time(NULL) + ttl;
@@ -832,14 +832,14 @@ task_modify(Slapi_PBlock *pb,
/* okay, we've decided to accept these changes. now look at the new
* entry and absorb any new values.
*/
- if (strcasecmp(fetch_attr(eAfter, "nsTaskCancel", "false"), "true") == 0) {
+ if (strcasecmp(slapi_fetch_attr(eAfter, "nsTaskCancel", "false"), "true") == 0) {
/* cancel this task, if not already */
if (task->task_state != SLAPI_TASK_CANCELLED) {
task->task_state = SLAPI_TASK_CANCELLED;
if (task->cancel) {
(*task->cancel)(task);
slapi_log_err(SLAPI_LOG_INFO, "task_modify", "Canceling task '%s'\n",
- fetch_attr(eAfter, "cn", "?"));
+ slapi_fetch_attr(eAfter, "cn", "?"));
}
}
}
@@ -869,13 +869,13 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
char *nameFrombe_name = NULL;
const char *encrypt_on_import = NULL;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
- instance_name = fetch_attr(e, "nsInstance", NULL);
+ instance_name = slapi_fetch_attr(e, "nsInstance", NULL);
- encrypt_on_import = fetch_attr(e, "nsImportEncrypt", NULL);
+ encrypt_on_import = slapi_fetch_attr(e, "nsImportEncrypt", NULL);
/* include/exclude suffixes */
if (slapi_entry_attr_find(e, "nsIncludeSuffix", &attr) == 0) {
@@ -988,8 +988,8 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
charray_add(&ldif_file, slapi_ch_strdup(slapi_value_get_string(val)));
}
- do_attr_indexes = fetch_attr(e, "nsImportIndexAttrs", "true");
- uniqueid_kind_str = fetch_attr(e, "nsUniqueIdGenerator", NULL);
+ do_attr_indexes = slapi_fetch_attr(e, "nsImportIndexAttrs", "true");
+ uniqueid_kind_str = slapi_fetch_attr(e, "nsUniqueIdGenerator", NULL);
if (uniqueid_kind_str != NULL) {
if (strcasecmp(uniqueid_kind_str, "none") == 0) {
uniqueid_kind = SLAPI_UNIQUEID_GENERATE_NONE;
@@ -1014,7 +1014,7 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_pblock_set(mypb, SLAPI_BACKEND, be);
slapi_pblock_set(mypb, SLAPI_PLUGIN, be->be_database);
- int32_t removedupvals = atoi(fetch_attr(e, "nsImportChunkSize", "0"));
+ int32_t removedupvals = atoi(slapi_fetch_attr(e, "nsImportChunkSize", "0"));
slapi_pblock_set(mypb, SLAPI_LDIF2DB_REMOVEDUPVALS, &removedupvals);
int32_t noattrindexes = !(strcasecmp(do_attr_indexes, "true") == 0);
@@ -1022,7 +1022,7 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_pblock_set(mypb, SLAPI_LDIF2DB_GENERATE_UNIQUEID, &uniqueid_kind);
- char *namespaceid = (char *)fetch_attr(e, "nsUniqueIdGeneratorNamespace", NULL);
+ char *namespaceid = (char *)slapi_fetch_attr(e, "nsUniqueIdGeneratorNamespace", NULL);
slapi_pblock_set(mypb, SLAPI_LDIF2DB_NAMESPACEID, namespaceid);
slapi_pblock_set(mypb, SLAPI_BACKEND_INSTANCE_NAME, (void *)instance_name);
@@ -1210,13 +1210,13 @@ task_export_add(Slapi_PBlock *pb __attribute__((unused)),
const char *decrypt_on_export = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- decrypt_on_export = fetch_attr(e, "nsExportDecrypt", NULL);
+ decrypt_on_export = slapi_fetch_attr(e, "nsExportDecrypt", NULL);
/* nsInstances -- from here on, memory has been allocated */
if (slapi_entry_attr_find(e, "nsInstance", &attr) == 0) {
@@ -1288,50 +1288,50 @@ task_export_add(Slapi_PBlock *pb __attribute__((unused)),
}
/* ldif file name */
- if ((my_ldif_file = fetch_attr(e, "nsFilename", NULL)) == NULL) {
+ if ((my_ldif_file = slapi_fetch_attr(e, "nsFilename", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
ldif_file = slapi_ch_strdup(my_ldif_file);
/* if true, multiple backends are dumped into one ldif file */
- use_one_file = fetch_attr(e, "nsUseOneFile", "true");
+ use_one_file = slapi_fetch_attr(e, "nsUseOneFile", "true");
if (strcasecmp(use_one_file, "true") == 0) {
ldif_printkey_flag |= EXPORT_APPENDMODE;
}
/* -r: export replica */
- export_replica = fetch_attr(e, "nsExportReplica", "false");
+ export_replica = slapi_fetch_attr(e, "nsExportReplica", "false");
if (!strcasecmp(export_replica, "true")) /* true */
export_replica_flag = 1;
/* -N: eq "false" ==> does not print out key value */
- ldif_printkey = fetch_attr(e, "nsPrintKey", "true");
+ ldif_printkey = slapi_fetch_attr(e, "nsPrintKey", "true");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_PRINTKEY;
/* -C: eq "true" ==> use only id2entry file */
- ldif_printkey = fetch_attr(e, "nsUseId2Entry", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsUseId2Entry", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_ID2ENTRY_ONLY;
/* if "true" ==> 8-bit strings are not base64 encoded */
- ldif_printkey = fetch_attr(e, "nsMinimalEncoding", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsMinimalEncoding", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_MINIMAL_ENCODING;
/* -U: eq "true" ==> does not fold the output */
- ldif_printkey = fetch_attr(e, "nsNoWrap", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsNoWrap", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_NOWRAP;
/* -1: eq "true" ==> does not print version line */
- ldif_printkey = fetch_attr(e, "nsNoVersionLine", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsNoVersionLine", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_NOVERSION;
/* -u: eq "false" ==> does not dump unique id */
- dump_uniqueid = fetch_attr(e, "nsDumpUniqId", "true");
+ dump_uniqueid = slapi_fetch_attr(e, "nsDumpUniqId", "true");
if (!strcasecmp(dump_uniqueid, "true")) /* true */
dump_uniqueid_flag = 1;
@@ -1490,21 +1490,21 @@ task_backup_add(Slapi_PBlock *pb __attribute__((unused)),
Slapi_Task *task = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
@@ -1647,25 +1647,25 @@ task_restore_add(Slapi_PBlock *pb,
PRThread *thread = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
- instance_name = fetch_attr(e, "nsInstance", NULL);
+ instance_name = slapi_fetch_attr(e, "nsInstance", NULL);
/* get backend that has archive2db and the database type matches. */
be = slapi_get_first_backend(&cookie);
@@ -1804,12 +1804,12 @@ task_index_add(Slapi_PBlock *pb __attribute__((unused)),
PRThread *thread = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((instance_name = fetch_attr(e, "nsInstance", NULL)) == NULL) {
+ if ((instance_name = slapi_fetch_attr(e, "nsInstance", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1932,26 +1932,26 @@ task_upgradedb_add(Slapi_PBlock *pb __attribute__((unused)),
char *cookie = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
/* force to reindex? */
- force = fetch_attr(e, "nsForceToReindex", NULL);
+ force = slapi_fetch_attr(e, "nsForceToReindex", NULL);
/* get backend that has db2archive and the database type matches. */
be = slapi_get_first_backend(&cookie);
diff --git a/ldap/servers/slapd/test-plugins/sampletask.c b/ldap/servers/slapd/test-plugins/sampletask.c
index 22d43dd..772b224 100644
--- a/ldap/servers/slapd/test-plugins/sampletask.c
+++ b/ldap/servers/slapd/test-plugins/sampletask.c
@@ -143,14 +143,14 @@ task_sampletask_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *
const char *myarg;
*returncode = LDAP_SUCCESS;
- if ((cn = fetch_attr(e, "cn", NULL)) == NULL) {
+ if ((cn = slapi_fetch_attr(e, "cn", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* get arg(s) */
- if ((myarg = fetch_attr(e, "myarg", NULL)) == NULL) {
+ if ((myarg = slapi_fetch_attr(e, "myarg", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index 8563c5d..fc14664 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -1586,7 +1586,7 @@ slapi_create_errormsg(
* to free the returned string value.
*/
const char *
-fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val)
+slapi_fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val)
{
Slapi_Attr *attr;
Slapi_Value *val = NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch 389-ds-base-1.3.9 updated: Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.9
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.9 by this push:
new 6084978 Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
6084978 is described below
commit 6084978400adab0218e4c66a80d79aa6852e124b
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Dec 14 13:14:05 2018 -0500
Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
Description: fetch_attr was recetnly moved toeh public api. This
naming context is conflicting with other applications.
Appropriately changing the name to start with "slapi_"
https://pagure.io/389-ds-base/issue/50090
Reviewed by: mreynolds(one line commit rule)
(cherry picked from commit 913078781712a92ac25193d6ae87bb92b2b26a67)
---
ldap/servers/plugins/automember/automember.c | 18 +++---
ldap/servers/plugins/linkedattrs/fixup_task.c | 2 +-
ldap/servers/plugins/memberof/memberof.c | 4 +-
.../plugins/posix-winsync/posix-group-task.c | 4 +-
.../plugins/replication/repl5_replica_config.c | 12 ++--
.../plugins/replication/windows_protocol_util.c | 2 +-
ldap/servers/plugins/schema_reload/schema_reload.c | 4 +-
ldap/servers/plugins/syntaxes/validate_task.c | 4 +-
ldap/servers/slapd/slapi-plugin.h | 2 +-
ldap/servers/slapd/task.c | 68 +++++++++++-----------
ldap/servers/slapd/test-plugins/sampletask.c | 4 +-
ldap/servers/slapd/util.c | 2 +-
12 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index d982d49..08d9e49 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -2018,17 +2018,17 @@ automember_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter __attr
/*
* Grab the task params
*/
- if ((base_dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", 0)) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- scope = fetch_attr(e, "scope", "sub");
+ scope = slapi_fetch_attr(e, "scope", "sub");
/*
* setup our task data
*/
@@ -2245,22 +2245,22 @@ automember_task_add_export_updates(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*returncode = LDAP_SUCCESS;
- if ((ldif = fetch_attr(e, "ldif", 0)) == NULL) {
+ if ((ldif = slapi_fetch_attr(e, "ldif", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((base_dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", 0)) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- scope = fetch_attr(e, "scope", "sub");
+ scope = slapi_fetch_attr(e, "scope", "sub");
slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &bind_dn);
@@ -2453,12 +2453,12 @@ automember_task_add_map_entries(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *e
/*
* Get the params
*/
- if ((ldif_in = fetch_attr(e, "ldif_in", 0)) == NULL) {
+ if ((ldif_in = slapi_fetch_attr(e, "ldif_in", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((ldif_out = fetch_attr(e, "ldif_out", 0)) == NULL) {
+ if ((ldif_out = slapi_fetch_attr(e, "ldif_out", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/linkedattrs/fixup_task.c b/ldap/servers/plugins/linkedattrs/fixup_task.c
index 4929714..4c7ab8c 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -51,7 +51,7 @@ linked_attrs_fixup_task_add(Slapi_PBlock *pb,
}
/* get arg(s) and setup our task data */
- linkdn = fetch_attr(e, "linkdn", 0);
+ linkdn = slapi_fetch_attr(e, "linkdn", 0);
if (linkdn) {
mytaskdata->linkdn = slapi_dn_normalize(slapi_ch_strdup(linkdn));
}
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index 26236dc..f4d45ed 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -2889,13 +2889,13 @@ memberof_task_add(Slapi_PBlock *pb,
*returncode = LDAP_SUCCESS;
/* get arg(s) */
- if ((dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", "(|(objectclass=inetuser)(objectclass=inetadmin)(objectclass=nsmemberof))")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(|(objectclass=inetuser)(objectclass=inetadmin)(objectclass=nsmemberof))")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c b/ldap/servers/plugins/posix-winsync/posix-group-task.c
index d8b6add..922c4f7 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-task.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c
@@ -66,7 +66,7 @@ posix_group_task_add(Slapi_PBlock *pb __attribute__((unused)),
/* get arg(s) */
/* default: set replication basedn */
- if ((dn = fetch_attr(e, "basedn", (char *)slapi_sdn_get_dn(posix_winsync_config_get_suffix()))) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", (char *)slapi_sdn_get_dn(posix_winsync_config_get_suffix()))) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -75,7 +75,7 @@ posix_group_task_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_log_err(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: retrieved basedn: %s\n", dn);
- if ((filter = fetch_attr(e, "filter", "(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 84e0263..a952b68 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -1386,7 +1386,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb __attribute__((unused)),
/*
* Get our task settings
*/
- if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL) {
+ if ((rid_str = slapi_fetch_attr(e, "replica-id", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-id attribute");
cleanruv_log(task, -1, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
@@ -1394,14 +1394,14 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb __attribute__((unused)),
goto out;
}
rid = atoi(rid_str);
- if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "replica-base-dn", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-base-dn attribute");
cleanruv_log(task, (int)rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((force_cleaning = fetch_attr(e, "replica-force-cleaning", 0)) != NULL) {
+ if ((force_cleaning = slapi_fetch_attr(e, "replica-force-cleaning", 0)) != NULL) {
if (strcasecmp(force_cleaning, "yes") != 0 && strcasecmp(force_cleaning, "no") != 0) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value for replica-force-cleaning "
"(%s). Value must be \"yes\" or \"no\" for task - (%s)",
@@ -2855,14 +2855,14 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb __attribute__((unused)),
/*
* Get our task settings
*/
- if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL) {
+ if ((rid_str = slapi_fetch_attr(e, "replica-id", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-id\"");
cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- certify_all = fetch_attr(e, "replica-certify-all", 0);
+ certify_all = slapi_fetch_attr(e, "replica-certify-all", 0);
/*
* Check the rid
*/
@@ -2875,7 +2875,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb __attribute__((unused)),
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "replica-base-dn", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-base-dn\"");
cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index f6898d0..e354372 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -764,7 +764,7 @@ send_password_modify(Slapi_DN *sdn,
/* Get the local entry if it exists */
rc = windows_get_local_entry(local_sdn, &local_entry);
if ((0 == rc) && local_entry) {
- expiration_val = (char *)fetch_attr(local_entry, "passwordExpirationtime", NULL);
+ expiration_val = (char *)slapi_fetch_attr(local_entry, "passwordExpirationtime", NULL);
if (expiration_val && parse_genTime(expiration_val) != NO_TIME){
/* The user did reset their password */
slapi_log_err(SLAPI_LOG_REPL, windows_repl_plugin_name,
diff --git a/ldap/servers/plugins/schema_reload/schema_reload.c b/ldap/servers/plugins/schema_reload/schema_reload.c
index c2399e5..00b7821 100644
--- a/ldap/servers/plugins/schema_reload/schema_reload.c
+++ b/ldap/servers/plugins/schema_reload/schema_reload.c
@@ -226,7 +226,7 @@ schemareload_add(Slapi_PBlock *pb,
char *bind_dn;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -236,7 +236,7 @@ schemareload_add(Slapi_PBlock *pb,
slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &bind_dn);
/* get arg(s) */
- schemadir = fetch_attr(e, "schemadir", NULL);
+ schemadir = slapi_fetch_attr(e, "schemadir", NULL);
/* allocate new task now */
task = slapi_plugin_new_task(slapi_entry_get_ndn(e), arg);
diff --git a/ldap/servers/plugins/syntaxes/validate_task.c b/ldap/servers/plugins/syntaxes/validate_task.c
index afec9ef..d069a33 100644
--- a/ldap/servers/plugins/syntaxes/validate_task.c
+++ b/ldap/servers/plugins/syntaxes/validate_task.c
@@ -94,13 +94,13 @@ syntax_validate_task_add(Slapi_PBlock *pb __attribute__((unused)),
*returncode = LDAP_SUCCESS;
/* get arg(s) */
- if ((dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", "(objectclass=*)")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(objectclass=*)")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index bdad4e5..54c195e 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -8295,7 +8295,7 @@ int32_t slapi_atomic_decr_32(int32_t *ptr, int memorder);
uint64_t slapi_atomic_decr_64(uint64_t *ptr, int memorder);
/* helper function */
-const char * fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val);
+const char * slapi_fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val);
#ifdef __cplusplus
}
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index 698ee19..0cf0cd7 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -386,7 +386,7 @@ slapi_task_status_changed(Slapi_Task *task)
e = get_internal_entry(pb, task->task_dn);
if (e == NULL)
return;
- ttl = atoi(fetch_attr(e, "ttl", DEFAULT_TTL));
+ ttl = atoi(slapi_fetch_attr(e, "ttl", DEFAULT_TTL));
if (ttl > 3600)
ttl = 3600; /* be reasonable. */
expire = time(NULL) + ttl;
@@ -832,14 +832,14 @@ task_modify(Slapi_PBlock *pb,
/* okay, we've decided to accept these changes. now look at the new
* entry and absorb any new values.
*/
- if (strcasecmp(fetch_attr(eAfter, "nsTaskCancel", "false"), "true") == 0) {
+ if (strcasecmp(slapi_fetch_attr(eAfter, "nsTaskCancel", "false"), "true") == 0) {
/* cancel this task, if not already */
if (task->task_state != SLAPI_TASK_CANCELLED) {
task->task_state = SLAPI_TASK_CANCELLED;
if (task->cancel) {
(*task->cancel)(task);
slapi_log_err(SLAPI_LOG_INFO, "task_modify", "Canceling task '%s'\n",
- fetch_attr(eAfter, "cn", "?"));
+ slapi_fetch_attr(eAfter, "cn", "?"));
}
}
}
@@ -869,13 +869,13 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
char *nameFrombe_name = NULL;
const char *encrypt_on_import = NULL;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
- instance_name = fetch_attr(e, "nsInstance", NULL);
+ instance_name = slapi_fetch_attr(e, "nsInstance", NULL);
- encrypt_on_import = fetch_attr(e, "nsImportEncrypt", NULL);
+ encrypt_on_import = slapi_fetch_attr(e, "nsImportEncrypt", NULL);
/* include/exclude suffixes */
if (slapi_entry_attr_find(e, "nsIncludeSuffix", &attr) == 0) {
@@ -988,8 +988,8 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
charray_add(&ldif_file, slapi_ch_strdup(slapi_value_get_string(val)));
}
- do_attr_indexes = fetch_attr(e, "nsImportIndexAttrs", "true");
- uniqueid_kind_str = fetch_attr(e, "nsUniqueIdGenerator", NULL);
+ do_attr_indexes = slapi_fetch_attr(e, "nsImportIndexAttrs", "true");
+ uniqueid_kind_str = slapi_fetch_attr(e, "nsUniqueIdGenerator", NULL);
if (uniqueid_kind_str != NULL) {
if (strcasecmp(uniqueid_kind_str, "none") == 0) {
uniqueid_kind = SLAPI_UNIQUEID_GENERATE_NONE;
@@ -1014,7 +1014,7 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_pblock_set(mypb, SLAPI_BACKEND, be);
slapi_pblock_set(mypb, SLAPI_PLUGIN, be->be_database);
- int32_t removedupvals = atoi(fetch_attr(e, "nsImportChunkSize", "0"));
+ int32_t removedupvals = atoi(slapi_fetch_attr(e, "nsImportChunkSize", "0"));
slapi_pblock_set(mypb, SLAPI_LDIF2DB_REMOVEDUPVALS, &removedupvals);
int32_t noattrindexes = !(strcasecmp(do_attr_indexes, "true") == 0);
@@ -1022,7 +1022,7 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_pblock_set(mypb, SLAPI_LDIF2DB_GENERATE_UNIQUEID, &uniqueid_kind);
- char *namespaceid = (char *)fetch_attr(e, "nsUniqueIdGeneratorNamespace", NULL);
+ char *namespaceid = (char *)slapi_fetch_attr(e, "nsUniqueIdGeneratorNamespace", NULL);
slapi_pblock_set(mypb, SLAPI_LDIF2DB_NAMESPACEID, namespaceid);
slapi_pblock_set(mypb, SLAPI_BACKEND_INSTANCE_NAME, (void *)instance_name);
@@ -1210,13 +1210,13 @@ task_export_add(Slapi_PBlock *pb __attribute__((unused)),
const char *decrypt_on_export = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- decrypt_on_export = fetch_attr(e, "nsExportDecrypt", NULL);
+ decrypt_on_export = slapi_fetch_attr(e, "nsExportDecrypt", NULL);
/* nsInstances -- from here on, memory has been allocated */
if (slapi_entry_attr_find(e, "nsInstance", &attr) == 0) {
@@ -1288,50 +1288,50 @@ task_export_add(Slapi_PBlock *pb __attribute__((unused)),
}
/* ldif file name */
- if ((my_ldif_file = fetch_attr(e, "nsFilename", NULL)) == NULL) {
+ if ((my_ldif_file = slapi_fetch_attr(e, "nsFilename", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
ldif_file = slapi_ch_strdup(my_ldif_file);
/* if true, multiple backends are dumped into one ldif file */
- use_one_file = fetch_attr(e, "nsUseOneFile", "true");
+ use_one_file = slapi_fetch_attr(e, "nsUseOneFile", "true");
if (strcasecmp(use_one_file, "true") == 0) {
ldif_printkey_flag |= EXPORT_APPENDMODE;
}
/* -r: export replica */
- export_replica = fetch_attr(e, "nsExportReplica", "false");
+ export_replica = slapi_fetch_attr(e, "nsExportReplica", "false");
if (!strcasecmp(export_replica, "true")) /* true */
export_replica_flag = 1;
/* -N: eq "false" ==> does not print out key value */
- ldif_printkey = fetch_attr(e, "nsPrintKey", "true");
+ ldif_printkey = slapi_fetch_attr(e, "nsPrintKey", "true");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_PRINTKEY;
/* -C: eq "true" ==> use only id2entry file */
- ldif_printkey = fetch_attr(e, "nsUseId2Entry", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsUseId2Entry", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_ID2ENTRY_ONLY;
/* if "true" ==> 8-bit strings are not base64 encoded */
- ldif_printkey = fetch_attr(e, "nsMinimalEncoding", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsMinimalEncoding", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_MINIMAL_ENCODING;
/* -U: eq "true" ==> does not fold the output */
- ldif_printkey = fetch_attr(e, "nsNoWrap", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsNoWrap", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_NOWRAP;
/* -1: eq "true" ==> does not print version line */
- ldif_printkey = fetch_attr(e, "nsNoVersionLine", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsNoVersionLine", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_NOVERSION;
/* -u: eq "false" ==> does not dump unique id */
- dump_uniqueid = fetch_attr(e, "nsDumpUniqId", "true");
+ dump_uniqueid = slapi_fetch_attr(e, "nsDumpUniqId", "true");
if (!strcasecmp(dump_uniqueid, "true")) /* true */
dump_uniqueid_flag = 1;
@@ -1490,21 +1490,21 @@ task_backup_add(Slapi_PBlock *pb __attribute__((unused)),
Slapi_Task *task = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
@@ -1647,25 +1647,25 @@ task_restore_add(Slapi_PBlock *pb,
PRThread *thread = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
- instance_name = fetch_attr(e, "nsInstance", NULL);
+ instance_name = slapi_fetch_attr(e, "nsInstance", NULL);
/* get backend that has archive2db and the database type matches. */
be = slapi_get_first_backend(&cookie);
@@ -1804,12 +1804,12 @@ task_index_add(Slapi_PBlock *pb __attribute__((unused)),
PRThread *thread = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((instance_name = fetch_attr(e, "nsInstance", NULL)) == NULL) {
+ if ((instance_name = slapi_fetch_attr(e, "nsInstance", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1932,26 +1932,26 @@ task_upgradedb_add(Slapi_PBlock *pb __attribute__((unused)),
char *cookie = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
/* force to reindex? */
- force = fetch_attr(e, "nsForceToReindex", NULL);
+ force = slapi_fetch_attr(e, "nsForceToReindex", NULL);
/* get backend that has db2archive and the database type matches. */
be = slapi_get_first_backend(&cookie);
diff --git a/ldap/servers/slapd/test-plugins/sampletask.c b/ldap/servers/slapd/test-plugins/sampletask.c
index 22d43dd..772b224 100644
--- a/ldap/servers/slapd/test-plugins/sampletask.c
+++ b/ldap/servers/slapd/test-plugins/sampletask.c
@@ -143,14 +143,14 @@ task_sampletask_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *
const char *myarg;
*returncode = LDAP_SUCCESS;
- if ((cn = fetch_attr(e, "cn", NULL)) == NULL) {
+ if ((cn = slapi_fetch_attr(e, "cn", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* get arg(s) */
- if ((myarg = fetch_attr(e, "myarg", NULL)) == NULL) {
+ if ((myarg = slapi_fetch_attr(e, "myarg", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index 8563c5d..fc14664 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -1586,7 +1586,7 @@ slapi_create_errormsg(
* to free the returned string value.
*/
const char *
-fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val)
+slapi_fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val)
{
Slapi_Attr *attr;
Slapi_Value *val = NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch master updated: Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new 9130787 Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
9130787 is described below
commit 913078781712a92ac25193d6ae87bb92b2b26a67
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Dec 14 13:14:05 2018 -0500
Ticket 50090 - refactor fetch_attr() to slapi_fetch_attr()
Description: fetch_attr was recetnly moved toeh public api. This
naming context is conflicting with other applications.
Appropriately changing the name to start with "slapi_"
https://pagure.io/389-ds-base/issue/50090
Reviewed by: mreynolds(one line commit rule)
---
ldap/servers/plugins/automember/automember.c | 18 +++---
ldap/servers/plugins/linkedattrs/fixup_task.c | 2 +-
ldap/servers/plugins/memberof/memberof.c | 4 +-
.../plugins/posix-winsync/posix-group-task.c | 4 +-
.../plugins/replication/repl5_replica_config.c | 12 ++--
.../plugins/replication/windows_protocol_util.c | 2 +-
ldap/servers/plugins/schema_reload/schema_reload.c | 4 +-
ldap/servers/plugins/syntaxes/validate_task.c | 4 +-
ldap/servers/slapd/slapi-plugin.h | 2 +-
ldap/servers/slapd/task.c | 68 +++++++++++-----------
ldap/servers/slapd/test-plugins/sampletask.c | 4 +-
ldap/servers/slapd/util.c | 2 +-
12 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index d982d49..08d9e49 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -2018,17 +2018,17 @@ automember_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter __attr
/*
* Grab the task params
*/
- if ((base_dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", 0)) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- scope = fetch_attr(e, "scope", "sub");
+ scope = slapi_fetch_attr(e, "scope", "sub");
/*
* setup our task data
*/
@@ -2245,22 +2245,22 @@ automember_task_add_export_updates(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*returncode = LDAP_SUCCESS;
- if ((ldif = fetch_attr(e, "ldif", 0)) == NULL) {
+ if ((ldif = slapi_fetch_attr(e, "ldif", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((base_dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", 0)) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- scope = fetch_attr(e, "scope", "sub");
+ scope = slapi_fetch_attr(e, "scope", "sub");
slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &bind_dn);
@@ -2453,12 +2453,12 @@ automember_task_add_map_entries(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *e
/*
* Get the params
*/
- if ((ldif_in = fetch_attr(e, "ldif_in", 0)) == NULL) {
+ if ((ldif_in = slapi_fetch_attr(e, "ldif_in", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((ldif_out = fetch_attr(e, "ldif_out", 0)) == NULL) {
+ if ((ldif_out = slapi_fetch_attr(e, "ldif_out", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/linkedattrs/fixup_task.c b/ldap/servers/plugins/linkedattrs/fixup_task.c
index 4929714..4c7ab8c 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -51,7 +51,7 @@ linked_attrs_fixup_task_add(Slapi_PBlock *pb,
}
/* get arg(s) and setup our task data */
- linkdn = fetch_attr(e, "linkdn", 0);
+ linkdn = slapi_fetch_attr(e, "linkdn", 0);
if (linkdn) {
mytaskdata->linkdn = slapi_dn_normalize(slapi_ch_strdup(linkdn));
}
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index e67ed97..329a845 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -2889,13 +2889,13 @@ memberof_task_add(Slapi_PBlock *pb,
*returncode = LDAP_SUCCESS;
/* get arg(s) */
- if ((dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", "(|(objectclass=inetuser)(objectclass=inetadmin)(objectclass=nsmemberof))")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(|(objectclass=inetuser)(objectclass=inetadmin)(objectclass=nsmemberof))")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c b/ldap/servers/plugins/posix-winsync/posix-group-task.c
index d8b6add..922c4f7 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-task.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c
@@ -66,7 +66,7 @@ posix_group_task_add(Slapi_PBlock *pb __attribute__((unused)),
/* get arg(s) */
/* default: set replication basedn */
- if ((dn = fetch_attr(e, "basedn", (char *)slapi_sdn_get_dn(posix_winsync_config_get_suffix()))) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", (char *)slapi_sdn_get_dn(posix_winsync_config_get_suffix()))) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -75,7 +75,7 @@ posix_group_task_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_log_err(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: retrieved basedn: %s\n", dn);
- if ((filter = fetch_attr(e, "filter", "(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 5d846a9..eb5e5a4 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -1386,7 +1386,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb __attribute__((unused)),
/*
* Get our task settings
*/
- if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL) {
+ if ((rid_str = slapi_fetch_attr(e, "replica-id", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-id attribute");
cleanruv_log(task, -1, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
@@ -1394,14 +1394,14 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb __attribute__((unused)),
goto out;
}
rid = atoi(rid_str);
- if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "replica-base-dn", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-base-dn attribute");
cleanruv_log(task, (int)rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((force_cleaning = fetch_attr(e, "replica-force-cleaning", 0)) != NULL) {
+ if ((force_cleaning = slapi_fetch_attr(e, "replica-force-cleaning", 0)) != NULL) {
if (strcasecmp(force_cleaning, "yes") != 0 && strcasecmp(force_cleaning, "no") != 0) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value for replica-force-cleaning "
"(%s). Value must be \"yes\" or \"no\" for task - (%s)",
@@ -2855,14 +2855,14 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb __attribute__((unused)),
/*
* Get our task settings
*/
- if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL) {
+ if ((rid_str = slapi_fetch_attr(e, "replica-id", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-id\"");
cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- certify_all = fetch_attr(e, "replica-certify-all", 0);
+ certify_all = slapi_fetch_attr(e, "replica-certify-all", 0);
/*
* Check the rid
*/
@@ -2875,7 +2875,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb __attribute__((unused)),
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL) {
+ if ((base_dn = slapi_fetch_attr(e, "replica-base-dn", 0)) == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-base-dn\"");
cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index f6898d0..e354372 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -764,7 +764,7 @@ send_password_modify(Slapi_DN *sdn,
/* Get the local entry if it exists */
rc = windows_get_local_entry(local_sdn, &local_entry);
if ((0 == rc) && local_entry) {
- expiration_val = (char *)fetch_attr(local_entry, "passwordExpirationtime", NULL);
+ expiration_val = (char *)slapi_fetch_attr(local_entry, "passwordExpirationtime", NULL);
if (expiration_val && parse_genTime(expiration_val) != NO_TIME){
/* The user did reset their password */
slapi_log_err(SLAPI_LOG_REPL, windows_repl_plugin_name,
diff --git a/ldap/servers/plugins/schema_reload/schema_reload.c b/ldap/servers/plugins/schema_reload/schema_reload.c
index c2399e5..00b7821 100644
--- a/ldap/servers/plugins/schema_reload/schema_reload.c
+++ b/ldap/servers/plugins/schema_reload/schema_reload.c
@@ -226,7 +226,7 @@ schemareload_add(Slapi_PBlock *pb,
char *bind_dn;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -236,7 +236,7 @@ schemareload_add(Slapi_PBlock *pb,
slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &bind_dn);
/* get arg(s) */
- schemadir = fetch_attr(e, "schemadir", NULL);
+ schemadir = slapi_fetch_attr(e, "schemadir", NULL);
/* allocate new task now */
task = slapi_plugin_new_task(slapi_entry_get_ndn(e), arg);
diff --git a/ldap/servers/plugins/syntaxes/validate_task.c b/ldap/servers/plugins/syntaxes/validate_task.c
index afec9ef..d069a33 100644
--- a/ldap/servers/plugins/syntaxes/validate_task.c
+++ b/ldap/servers/plugins/syntaxes/validate_task.c
@@ -94,13 +94,13 @@ syntax_validate_task_add(Slapi_PBlock *pb __attribute__((unused)),
*returncode = LDAP_SUCCESS;
/* get arg(s) */
- if ((dn = fetch_attr(e, "basedn", 0)) == NULL) {
+ if ((dn = slapi_fetch_attr(e, "basedn", 0)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((filter = fetch_attr(e, "filter", "(objectclass=*)")) == NULL) {
+ if ((filter = slapi_fetch_attr(e, "filter", "(objectclass=*)")) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 467e783..4bf2268 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -8277,7 +8277,7 @@ int32_t slapi_atomic_decr_32(int32_t *ptr, int memorder);
uint64_t slapi_atomic_decr_64(uint64_t *ptr, int memorder);
/* helper function */
-const char * fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val);
+const char * slapi_fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val);
#ifdef __cplusplus
}
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index 91b51d9..b145176 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -380,7 +380,7 @@ slapi_task_status_changed(Slapi_Task *task)
e = get_internal_entry(pb, task->task_dn);
if (e == NULL)
return;
- ttl = atoi(fetch_attr(e, "ttl", DEFAULT_TTL));
+ ttl = atoi(slapi_fetch_attr(e, "ttl", DEFAULT_TTL));
if (ttl > 3600)
ttl = 3600; /* be reasonable. */
expire = time(NULL) + ttl;
@@ -842,14 +842,14 @@ task_modify(Slapi_PBlock *pb,
/* okay, we've decided to accept these changes. now look at the new
* entry and absorb any new values.
*/
- if (strcasecmp(fetch_attr(eAfter, "nsTaskCancel", "false"), "true") == 0) {
+ if (strcasecmp(slapi_fetch_attr(eAfter, "nsTaskCancel", "false"), "true") == 0) {
/* cancel this task, if not already */
if (task->task_state != SLAPI_TASK_CANCELLED) {
task->task_state = SLAPI_TASK_CANCELLED;
if (task->cancel) {
(*task->cancel)(task);
slapi_log_err(SLAPI_LOG_INFO, "task_modify", "Canceling task '%s'\n",
- fetch_attr(eAfter, "cn", "?"));
+ slapi_fetch_attr(eAfter, "cn", "?"));
}
}
}
@@ -879,13 +879,13 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
char *nameFrombe_name = NULL;
const char *encrypt_on_import = NULL;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
- instance_name = fetch_attr(e, "nsInstance", NULL);
+ instance_name = slapi_fetch_attr(e, "nsInstance", NULL);
- encrypt_on_import = fetch_attr(e, "nsImportEncrypt", NULL);
+ encrypt_on_import = slapi_fetch_attr(e, "nsImportEncrypt", NULL);
/* include/exclude suffixes */
if (slapi_entry_attr_find(e, "nsIncludeSuffix", &attr) == 0) {
@@ -998,8 +998,8 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
charray_add(&ldif_file, slapi_ch_strdup(slapi_value_get_string(val)));
}
- do_attr_indexes = fetch_attr(e, "nsImportIndexAttrs", "true");
- uniqueid_kind_str = fetch_attr(e, "nsUniqueIdGenerator", NULL);
+ do_attr_indexes = slapi_fetch_attr(e, "nsImportIndexAttrs", "true");
+ uniqueid_kind_str = slapi_fetch_attr(e, "nsUniqueIdGenerator", NULL);
if (uniqueid_kind_str != NULL) {
if (strcasecmp(uniqueid_kind_str, "none") == 0) {
uniqueid_kind = SLAPI_UNIQUEID_GENERATE_NONE;
@@ -1024,7 +1024,7 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_pblock_set(mypb, SLAPI_BACKEND, be);
slapi_pblock_set(mypb, SLAPI_PLUGIN, be->be_database);
- int32_t removedupvals = atoi(fetch_attr(e, "nsImportChunkSize", "0"));
+ int32_t removedupvals = atoi(slapi_fetch_attr(e, "nsImportChunkSize", "0"));
slapi_pblock_set(mypb, SLAPI_LDIF2DB_REMOVEDUPVALS, &removedupvals);
int32_t noattrindexes = !(strcasecmp(do_attr_indexes, "true") == 0);
@@ -1032,7 +1032,7 @@ task_import_add(Slapi_PBlock *pb __attribute__((unused)),
slapi_pblock_set(mypb, SLAPI_LDIF2DB_GENERATE_UNIQUEID, &uniqueid_kind);
- char *namespaceid = (char *)fetch_attr(e, "nsUniqueIdGeneratorNamespace", NULL);
+ char *namespaceid = (char *)slapi_fetch_attr(e, "nsUniqueIdGeneratorNamespace", NULL);
slapi_pblock_set(mypb, SLAPI_LDIF2DB_NAMESPACEID, namespaceid);
slapi_pblock_set(mypb, SLAPI_BACKEND_INSTANCE_NAME, (void *)instance_name);
@@ -1220,13 +1220,13 @@ task_export_add(Slapi_PBlock *pb __attribute__((unused)),
const char *decrypt_on_export = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- decrypt_on_export = fetch_attr(e, "nsExportDecrypt", NULL);
+ decrypt_on_export = slapi_fetch_attr(e, "nsExportDecrypt", NULL);
/* nsInstances -- from here on, memory has been allocated */
if (slapi_entry_attr_find(e, "nsInstance", &attr) == 0) {
@@ -1298,50 +1298,50 @@ task_export_add(Slapi_PBlock *pb __attribute__((unused)),
}
/* ldif file name */
- if ((my_ldif_file = fetch_attr(e, "nsFilename", NULL)) == NULL) {
+ if ((my_ldif_file = slapi_fetch_attr(e, "nsFilename", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
ldif_file = slapi_ch_strdup(my_ldif_file);
/* if true, multiple backends are dumped into one ldif file */
- use_one_file = fetch_attr(e, "nsUseOneFile", "true");
+ use_one_file = slapi_fetch_attr(e, "nsUseOneFile", "true");
if (strcasecmp(use_one_file, "true") == 0) {
ldif_printkey_flag |= EXPORT_APPENDMODE;
}
/* -r: export replica */
- export_replica = fetch_attr(e, "nsExportReplica", "false");
+ export_replica = slapi_fetch_attr(e, "nsExportReplica", "false");
if (!strcasecmp(export_replica, "true")) /* true */
export_replica_flag = 1;
/* -N: eq "false" ==> does not print out key value */
- ldif_printkey = fetch_attr(e, "nsPrintKey", "true");
+ ldif_printkey = slapi_fetch_attr(e, "nsPrintKey", "true");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_PRINTKEY;
/* -C: eq "true" ==> use only id2entry file */
- ldif_printkey = fetch_attr(e, "nsUseId2Entry", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsUseId2Entry", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_ID2ENTRY_ONLY;
/* if "true" ==> 8-bit strings are not base64 encoded */
- ldif_printkey = fetch_attr(e, "nsMinimalEncoding", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsMinimalEncoding", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_MINIMAL_ENCODING;
/* -U: eq "true" ==> does not fold the output */
- ldif_printkey = fetch_attr(e, "nsNoWrap", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsNoWrap", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_NOWRAP;
/* -1: eq "true" ==> does not print version line */
- ldif_printkey = fetch_attr(e, "nsNoVersionLine", "false");
+ ldif_printkey = slapi_fetch_attr(e, "nsNoVersionLine", "false");
if (!strcasecmp(ldif_printkey, "true")) /* true */
ldif_printkey_flag |= EXPORT_NOVERSION;
/* -u: eq "false" ==> does not dump unique id */
- dump_uniqueid = fetch_attr(e, "nsDumpUniqId", "true");
+ dump_uniqueid = slapi_fetch_attr(e, "nsDumpUniqId", "true");
if (!strcasecmp(dump_uniqueid, "true")) /* true */
dump_uniqueid_flag = 1;
@@ -1500,21 +1500,21 @@ task_backup_add(Slapi_PBlock *pb __attribute__((unused)),
Slapi_Task *task = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
@@ -1657,25 +1657,25 @@ task_restore_add(Slapi_PBlock *pb,
PRThread *thread = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
- instance_name = fetch_attr(e, "nsInstance", NULL);
+ instance_name = slapi_fetch_attr(e, "nsInstance", NULL);
/* get backend that has archive2db and the database type matches. */
be = slapi_get_first_backend(&cookie);
@@ -1814,12 +1814,12 @@ task_index_add(Slapi_PBlock *pb __attribute__((unused)),
PRThread *thread = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
- if ((instance_name = fetch_attr(e, "nsInstance", NULL)) == NULL) {
+ if ((instance_name = slapi_fetch_attr(e, "nsInstance", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1942,26 +1942,26 @@ task_upgradedb_add(Slapi_PBlock *pb __attribute__((unused)),
char *cookie = NULL;
*returncode = LDAP_SUCCESS;
- if (fetch_attr(e, "cn", NULL) == NULL) {
+ if (slapi_fetch_attr(e, "cn", NULL) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* archive dir name */
- if ((archive_dir = fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
+ if ((archive_dir = slapi_fetch_attr(e, "nsArchiveDir", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* database type */
- my_database_type = fetch_attr(e, "nsDatabaseType", NULL);
+ my_database_type = slapi_fetch_attr(e, "nsDatabaseType", NULL);
if (NULL != my_database_type)
database_type = my_database_type;
/* force to reindex? */
- force = fetch_attr(e, "nsForceToReindex", NULL);
+ force = slapi_fetch_attr(e, "nsForceToReindex", NULL);
/* get backend that has db2archive and the database type matches. */
be = slapi_get_first_backend(&cookie);
diff --git a/ldap/servers/slapd/test-plugins/sampletask.c b/ldap/servers/slapd/test-plugins/sampletask.c
index 22d43dd..772b224 100644
--- a/ldap/servers/slapd/test-plugins/sampletask.c
+++ b/ldap/servers/slapd/test-plugins/sampletask.c
@@ -143,14 +143,14 @@ task_sampletask_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *
const char *myarg;
*returncode = LDAP_SUCCESS;
- if ((cn = fetch_attr(e, "cn", NULL)) == NULL) {
+ if ((cn = slapi_fetch_attr(e, "cn", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
/* get arg(s) */
- if ((myarg = fetch_attr(e, "myarg", NULL)) == NULL) {
+ if ((myarg = slapi_fetch_attr(e, "myarg", NULL)) == NULL) {
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index acf9784..1cfdd21 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -1614,7 +1614,7 @@ get_internal_conn_op (uint64_t *connid, int32_t *op_id, int32_t *op_internal_id,
* to free the returned string value.
*/
const char *
-fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val)
+slapi_fetch_attr(Slapi_Entry *e, const char *attrname, char *default_val)
{
Slapi_Attr *attr;
Slapi_Value *val = NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch master updated (5ed5f87 -> 967d0aa)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
tbordaz pushed a change to branch master
in repository 389-ds-base.
from 5ed5f87 Ticket 50056 - Fix CLI/UI bugs
add 967d0aa Ticket 50091 - shadowWarning is not generated if passwordWarning is lower than 86400 seconds (1 day)
No new revisions were added by this update.
Summary of changes:
ldap/servers/slapd/pw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch master updated (bb335e0 -> 5ed5f87)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch master
in repository 389-ds-base.
from bb335e0 Ticket 49864 - Revised replication status messages for transient errors
add 5ed5f87 Ticket 50056 - Fix CLI/UI bugs
No new revisions were added by this update.
Summary of changes:
src/cockpit/389-console/src/servers.js | 89 ++++++++++++++---------
src/lib389/cli/dsconf | 14 +++-
src/lib389/cli/dsidm | 16 ++++-
src/lib389/lib389/__init__.py | 4 +-
src/lib389/lib389/cli_base/__init__.py | 23 ++++--
src/lib389/lib389/cli_conf/plugin.py | 34 +++++----
src/lib389/lib389/cli_ctl/instance.py | 2 +-
src/lib389/lib389/instance/remove.py | 16 ++++-
src/lib389/lib389/instance/setup.py | 124 +++++++++++++++++++++++++--------
src/lib389/lib389/nss_ssl.py | 14 ++--
src/lib389/lib389/utils.py | 9 ++-
11 files changed, 252 insertions(+), 93 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months
[389-ds-base] branch 389-ds-base-1.3.9 updated: Ticket 49864 - Revised replication status messages for transient errors
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.9
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.9 by this push:
new b757a07 Ticket 49864 - Revised replication status messages for transient errors
b757a07 is described below
commit b757a07d133ea6c1f2d2305f0939104f2eb97019
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Dec 4 14:08:09 2018 -0500
Ticket 49864 - Revised replication status messages for transient errors
Description: Transient errors are temporary conditions that usually resolve
themselves. But the message are vague and alarming. This
patch changes it to a "warning" message.
https://pagure.io/389-ds-base/issue/49864
Reviewed by: spichugi & firstyear(Thanks!)
(cherry picked from commit bb335e01c480b762fb752d8fbc021d99a4fa91f3)
---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 2 +-
ldap/servers/plugins/replication/repl5_protocol_util.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 2aefb79..9140c34 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -1065,7 +1065,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if (rc == UPDATE_TRANSIENT_ERROR) {
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_TRANSIENT_ERROR -> STATE_BACKOFF_START");
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_TRANSIENT_ERROR,
- "Incremental update transient error. Backing off, will retry update later.");
+ "Incremental update transient warning. Backing off, will retry update later.");
next_state = STATE_BACKOFF_START;
} else if (rc == UPDATE_FATAL_ERROR) {
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_FATAL_ERROR -> STATE_STOP_FATAL_ERROR");
diff --git a/ldap/servers/plugins/replication/repl5_protocol_util.c b/ldap/servers/plugins/replication/repl5_protocol_util.c
index 78159ad..a48d4d0 100644
--- a/ldap/servers/plugins/replication/repl5_protocol_util.c
+++ b/ldap/servers/plugins/replication/repl5_protocol_util.c
@@ -662,7 +662,7 @@ protocol_response2string(int response)
case NSDS50_REPL_CONN_TIMEOUT:
return "connection timeout";
case NSDS50_REPL_TRANSIENT_ERROR:
- return "transient error";
+ return "transient warning";
case NSDS50_REPL_RUV_ERROR:
return "RUV error";
default:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 4 months