[Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acleffectiverights.c, 1.11, 1.12
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4424
Modified Files:
acleffectiverights.c
Log Message:
Resolves: #457156
Summary: GER: allow GER for non-existing entries (phase 2) (comment #6)
Description: additional fix for the previous checkin.
Not just checking if dn is NULL or not, but also checking the length of dn is
greater than 0. If both conditions are satisfied, locate the template entry at
the dn.
Index: acleffectiverights.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acleffectiverights.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- acleffectiverights.c 31 Jul 2008 17:25:37 -0000 1.11
+++ acleffectiverights.c 31 Jul 2008 21:27:26 -0000 1.12
@@ -873,8 +873,16 @@
siz += 32 + strlen(object);
}
templateentry = (char *)slapi_ch_malloc(siz);
- PR_snprintf(templateentry, siz,
- "dn: cn=template_%s_objectclass%s%s\n", object, dn?",":"", dn?dn:"");
+ if (NULL != dn && strlen(dn) > 0)
+ {
+ PR_snprintf(templateentry, siz,
+ "dn: cn=template_%s_objectclass,%s\n", object, dn);
+ }
+ else
+ {
+ PR_snprintf(templateentry, siz,
+ "dn: cn=template_%s_objectclass\n", object);
+ }
for (--i; i >= 0; i--)
{
len = strlen(templateentry);
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acleffectiverights.c, 1.10, 1.11
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30103
Modified Files:
acleffectiverights.c
Log Message:
Resolves: #457156
Summary: GER: allow GER for non-existing entries (phase 2) (comment #3)
Description: get the target dn from the pblock and add it to the template entry
dn if available. Plus a memory leak was found and fixed at the same time.
Following the suggestion from Nathan, the "dummy" attributes are replaced with
"(template_attribute)".
Index: acleffectiverights.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acleffectiverights.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- acleffectiverights.c 28 Jul 2008 15:49:28 -0000 1.10
+++ acleffectiverights.c 31 Jul 2008 17:25:37 -0000 1.11
@@ -811,6 +811,7 @@
char *object = NULL;
char *superior = NULL;
char *p = NULL;
+ char *dn = NULL;
int siz = 0;
int len = 0;
int i = 0;
@@ -826,6 +827,8 @@
rc = LDAP_SUCCESS;
goto bailout;
}
+ /* get the target dn where the template entry is located */
+ slapi_pblock_get( pb, SLAPI_TARGET_DN, &dn );
for (i = 0; gerattrs && gerattrs[i]; i++)
{
object = strchr(gerattrs[i], '@');
@@ -855,14 +858,23 @@
}
else
{
- /* <*attrp>: dummy\n\0 */
- siz += strlen(attrs[i]) + 4 + 5;
+ /* <*attrp>: (template_attribute)\n\0 */
+ siz += strlen(attrs[i]) + 4 + 20;
}
}
- siz += 32 + strlen(object); /* dn: cn=<template_name>\n\0 */
+ if (dn)
+ {
+ /* dn: cn=<template_name>,<dn>\n\0 */
+ siz += 32 + strlen(object) + strlen(dn);
+ }
+ else
+ {
+ /* dn: cn=<template_name>\n\0 */
+ siz += 32 + strlen(object);
+ }
templateentry = (char *)slapi_ch_malloc(siz);
PR_snprintf(templateentry, siz,
- "dn: cn=template_%s_objectclass\n", object);
+ "dn: cn=template_%s_objectclass%s%s\n", object, dn?",":"", dn?dn:"");
for (--i; i >= 0; i--)
{
len = strlen(templateentry);
@@ -873,7 +885,7 @@
}
else
{
- PR_snprintf(p, siz - len, "%s: dummy\n", attrs[i]);
+ PR_snprintf(p, siz - len, "%s: (template_attribute)\n", attrs[i]);
}
}
charray_free(attrs);
@@ -909,6 +921,10 @@
}
charray_free(attrs);
}
+ if (notfirst)
+ {
+ slapi_ch_free_string(&object);
+ }
slapi_ch_free_string(&superior);
siz += 18; /* objectclass: top\n\0 */
len = strlen(templateentry);
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.6, 1.7
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20120
Modified Files:
dna.c
Log Message:
Resolves: 457329
Summary: Make better use of cached DNA config information
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dna.c 30 Jul 2008 18:17:26 -0000 1.6
+++ dna.c 31 Jul 2008 16:22:25 -0000 1.7
@@ -695,7 +695,7 @@
Distributed ranges Helpers
****************************************************/
-static int dna_fix_maxval(Slapi_DN *dn, PRUint64 *cur, PRUint64 *max)
+static int dna_fix_maxval(struct configEntry *config_entry, PRUint64 *cur)
{
/* TODO: check the main partition to see if another range
* is available, and set the new local configuration
@@ -707,8 +707,13 @@
return LDAP_OPERATIONS_ERROR;
}
-static void dna_notice_allocation(Slapi_DN *dn, PRUint64 new)
+static void dna_notice_allocation(struct configEntry *config_entry, PRUint64 new)
{
+ /* update our cached config entry with the newly allocated
+ * value.
+ */
+ config_entry->nextval = new;
+
/* TODO: check if we passed a new chunk threshold and update
* the shared configuration on the public partition.
*/
@@ -794,13 +799,11 @@
than config and startup
****************************************************/
-/* we do search all values between newval and maxval asking the
+/* we do search all values between nextval and maxval asking the
* server to sort them, then we check the first free spot and
* use it as newval */
static int dna_first_free_value(struct configEntry *config_entry,
- PRUint64 *newval,
- PRUint64 maxval,
- PRUint64 increment)
+ PRUint64 *newval)
{
Slapi_Entry **entries = NULL;
Slapi_PBlock *pb = NULL;
@@ -816,7 +819,7 @@
prefix = config_entry->prefix;
type = config_entry->type;
- tmpval = *newval;
+ tmpval = config_entry->nextval;
attrs[0] = type;
attrs[1] = NULL;
@@ -834,7 +837,7 @@
filter = slapi_ch_smprintf("(&%s(&(%s>=%s%llu)(%s<=%s%llu)))",
config_entry->filter,
type, prefix?prefix:"", tmpval,
- type, prefix?prefix:"", maxval);
+ type, prefix?prefix:"", config_entry->maxval);
if (NULL == filter) {
ldap_control_free(ctrls[0]);
slapi_ch_free((void **)&ctrls);
@@ -870,6 +873,7 @@
if (NULL == entries || NULL == entries[0]) {
/* no values means we already have a good value */
+ *newval = tmpval;
status = LDAP_SUCCESS;
goto cleanup;
}
@@ -904,10 +908,10 @@
if (tmpval != sval)
break;
- if (maxval < sval)
+ if (config_entry->maxval < sval)
break;
- tmpval += increment;
+ tmpval += config_entry->interval;
}
*newval = tmpval;
@@ -924,201 +928,107 @@
/*
* Perform ldap operationally atomic increment
* Return the next value to be assigned
- * Method:
- * 1. retrieve entry
- * 2. do increment operations
- * 3. remove current value, add new value in one operation
- * 4. if failed, and less than 3 times, goto 1
*/
static int dna_get_next_value(struct configEntry *config_entry,
char **next_value_ret)
{
Slapi_PBlock *pb = NULL;
- char *old_value = NULL;
- Slapi_Entry *e = NULL;
- Slapi_DN *dn = NULL;
- char *attrlist[4];
- int attempts;
+ LDAPMod mod_replace;
+ LDAPMod *mods[2];
+ char *replace_val[2];
+ char next_value[16];
+ PRUint64 setval = 0;
+ PRUint64 nextval = 0;
int ret;
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_get_next_value\n");
- /* get pre-requisites to search */
- dn = slapi_sdn_new_dn_byref(config_entry->dn);
- attrlist[0] = DNA_NEXTVAL;
- attrlist[1] = DNA_MAXVAL;
- attrlist[2] = DNA_INTERVAL;
- attrlist[3] = NULL;
-
-
- /* the operation is constructed such that race conditions
- * to increment the value are detected and avoided - one wins,
- * one loses - however, there is no need for the server to compete
- * with itself so we lock here
- */
-
+ /* get the lock to prevent contention with other threads over
+ * the next new value for this range. */
slapi_lock_mutex(config_entry->new_value_lock);
- for (attempts = 0; attempts < 3; attempts++) {
+ /* get the first value */
+ ret = dna_first_free_value(config_entry, &setval);
+ if (LDAP_SUCCESS != ret)
+ goto done;
- LDAPMod mod_add;
- LDAPMod mod_delete;
- LDAPMod *mods[3];
- char *delete_val[2];
- char *add_val[2];
- char new_value[16];
- char *interval;
- char *max_value;
- PRUint64 increment = 1; /* default increment */
- PRUint64 setval = 0;
- PRUint64 newval = 0;
- PRUint64 maxval = -1;
-
- /* do update */
- ret = slapi_search_internal_get_entry(dn, attrlist, &e,
- getPluginID());
+ /* try for a new range or fail */
+ if (setval > config_entry->maxval) {
+ ret = dna_fix_maxval(config_entry, &setval);
if (LDAP_SUCCESS != ret) {
- ret = LDAP_OPERATIONS_ERROR;
- goto done;
- }
-
- old_value = slapi_entry_attr_get_charptr(e, DNA_NEXTVAL);
- if (NULL == old_value) {
- ret = LDAP_OPERATIONS_ERROR;
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_next_value: no more IDs available!!\n");
goto done;
}
- setval = strtoul(old_value, 0, 0);
-
- max_value = slapi_entry_attr_get_charptr(e, DNA_MAXVAL);
- if (max_value) {
- maxval = strtoul(max_value, 0, 0);
- slapi_ch_free_string(&max_value);
- }
-
- /* if not present the default is 1 */
- interval = slapi_entry_attr_get_charptr(e, DNA_INTERVAL);
- if (NULL != interval) {
- increment = strtoul(interval, 0, 0);
- }
-
- slapi_entry_free(e);
- e = NULL;
-
- /* check the value is actually in range */
-
- /* verify the new value is actually free and get the first
- * one free if not*/
- ret = dna_first_free_value(config_entry, &setval, maxval, increment);
+ /* get the first value from our newly extended range */
+ ret = dna_first_free_value(config_entry, &setval);
if (LDAP_SUCCESS != ret)
goto done;
+ }
- /* try for a new range or fail */
- if (setval > maxval) {
- ret = dna_fix_maxval(dn, &setval, &maxval);
- if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_next_value: no more IDs available!!\n");
- goto done;
- }
+ /* ensure that we haven't gone past the end of our range */
+ if (setval > config_entry->maxval) {
+ ret = LDAP_OPERATIONS_ERROR;
+ goto done;
+ }
- /* verify the new value is actually free and get the first
- * one free if not */
- ret = dna_first_free_value(config_entry, &setval, maxval, increment);
- if (LDAP_SUCCESS != ret)
- goto done;
- }
+ nextval = setval + config_entry->interval;
- if (setval > maxval) {
- ret = LDAP_OPERATIONS_ERROR;
+ /* try for a new range or fail */
+ if (nextval > config_entry->maxval) {
+ ret = dna_fix_maxval(config_entry, &nextval);
+ if (LDAP_SUCCESS != ret) {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_next_value: no more IDs available!!\n");
goto done;
}
+ }
- newval = setval + increment;
-
- /* try for a new range or fail */
- if (newval > maxval) {
- ret = dna_fix_maxval(dn, &newval, &maxval);
- if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_next_value: no more IDs available!!\n");
- goto done;
- }
- }
-
- /* try to set the new value */
+ /* try to set the new next value in the config entry */
+ snprintf(next_value, sizeof(next_value),"%llu", nextval);
- sprintf(new_value, "%llu", newval);
+ /* set up our replace modify operation */
+ replace_val[0] = next_value;
+ replace_val[1] = 0;
+ mod_replace.mod_op = LDAP_MOD_REPLACE;
+ mod_replace.mod_type = DNA_NEXTVAL;
+ mod_replace.mod_values = replace_val;
+ mods[0] = &mod_replace;
+ mods[1] = 0;
- delete_val[0] = old_value;
- delete_val[1] = 0;
+ pb = slapi_pblock_new();
+ if (NULL == pb) {
+ ret = LDAP_OPERATIONS_ERROR;
+ goto done;
+ }
- mod_delete.mod_op = LDAP_MOD_DELETE;
- mod_delete.mod_type = DNA_NEXTVAL;
- mod_delete.mod_values = delete_val;
+ slapi_modify_internal_set_pb(pb, config_entry->dn,
+ mods, 0, 0, getPluginID(), 0);
- add_val[0] = new_value;
- add_val[1] = 0;
+ slapi_modify_internal_pb(pb);
- mod_add.mod_op = LDAP_MOD_ADD;
- mod_add.mod_type = DNA_NEXTVAL;
- mod_add.mod_values = add_val;
+ slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
- mods[0] = &mod_delete;
- mods[1] = &mod_add;
- mods[2] = 0;
+ slapi_pblock_destroy(pb);
+ pb = NULL;
- pb = slapi_pblock_new();
- if (NULL == pb) {
+ if (LDAP_SUCCESS == ret) {
+ *next_value_ret = slapi_ch_smprintf("%llu", setval);
+ if (NULL == *next_value_ret) {
ret = LDAP_OPERATIONS_ERROR;
goto done;
}
- slapi_modify_internal_set_pb(pb, config_entry->dn,
- mods, 0, 0, getPluginID(), 0);
-
- slapi_modify_internal_pb(pb);
-
- slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
-
- slapi_pblock_destroy(pb);
- pb = NULL;
- slapi_ch_free_string(&interval);
- slapi_ch_free_string(&old_value);
-
- if (LDAP_SUCCESS == ret) {
- *next_value_ret = slapi_ch_smprintf("%llu", setval);
- if (NULL == *next_value_ret) {
- ret = LDAP_OPERATIONS_ERROR;
- goto done;
- }
-
- dna_notice_allocation(dn, newval);
- goto done;
- }
-
- if (LDAP_NO_SUCH_ATTRIBUTE != ret) {
- /* not the result of a race
- to change the value
- */
- goto done;
- }
+ /* update our cached config */
+ dna_notice_allocation(config_entry, nextval);
}
done:
slapi_unlock_mutex(config_entry->new_value_lock);
- if (LDAP_SUCCESS != ret)
- slapi_ch_free_string(&old_value);
-
- if (dn)
- slapi_sdn_free(&dn);
-
- if (e)
- slapi_entry_free(e);
-
if (pb)
slapi_pblock_destroy(pb);
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.5, 1.6
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32691/ldap/servers/plugins/dna
Modified Files:
dna.c
Log Message:
Resolves: 456968
Summary: Use a separate new value lock for each DNA managed range.
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dna.c 30 Jul 2008 17:43:40 -0000 1.5
+++ dna.c 30 Jul 2008 18:17:26 -0000 1.6
@@ -114,6 +114,7 @@
Slapi_Filter *slapi_filter;
char *generate;
char *scope;
+ Slapi_Mutex *new_value_lock;
};
static PRCList *dna_global_config = NULL;
@@ -123,11 +124,6 @@
static char *_PluginDN = NULL;
-/*
- * new value lock
- */
-static Slapi_Mutex *g_new_value_lock;
-
/**
*
* DNA plug-in management functions
@@ -332,9 +328,8 @@
"--> dna_start\n");
g_dna_cache_lock = PR_NewRWLock(PR_RWLOCK_RANK_NONE, "dna");
- g_new_value_lock = slapi_new_mutex();
- if (!g_dna_cache_lock || !g_new_value_lock) {
+ if (!g_dna_cache_lock) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_start: lock creation failed\n");
@@ -570,9 +565,15 @@
"----------> dnaMaxValue [%ld]\n", value, 0, 0);
slapi_ch_free_string(&value);
- } else
+ } else {
entry->maxval = -1;
+ }
+ /* create the new value lock for this range */
+ entry->new_value_lock = slapi_new_mutex();
+ if (!entry->new_value_lock) {
+ goto bail;
+ }
/**
* Finally add the entry to the list
@@ -666,6 +667,9 @@
if (e->scope)
slapi_ch_free_string(&e->scope);
+ if (e->new_value_lock)
+ slapi_destroy_mutex(e->new_value_lock);
+
slapi_ch_free((void **) entry);
}
@@ -954,7 +958,7 @@
* with itself so we lock here
*/
- slapi_lock_mutex(g_new_value_lock);
+ slapi_lock_mutex(config_entry->new_value_lock);
for (attempts = 0; attempts < 3; attempts++) {
@@ -1104,7 +1108,7 @@
done:
- slapi_unlock_mutex(g_new_value_lock);
+ slapi_unlock_mutex(config_entry->new_value_lock);
if (LDAP_SUCCESS != ret)
slapi_ch_free_string(&old_value);
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.4, 1.5
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24105/ldap/servers/plugins/dna
Modified Files:
dna.c
Log Message:
Resolves: 457260
Summary: Load the dnaFilter config attribute properly.
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dna.c 23 Jul 2008 16:33:31 -0000 1.4
+++ dna.c 30 Jul 2008 17:43:40 -0000 1.5
@@ -111,7 +111,7 @@
PRUint64 interval;
PRUint64 maxval;
char *filter;
- struct slapi_filter *slapi_filter;
+ Slapi_Filter *slapi_filter;
char *generate;
char *scope;
};
@@ -539,7 +539,7 @@
value = slapi_entry_attr_get_charptr(e, DNA_FILTER);
if (value) {
entry->filter = value;
- if (NULL == (entry->filter = slapi_str2filter(value))) {
+ if (NULL == (entry->slapi_filter = slapi_str2filter(value))) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM ,
"Error: Invalid search filter in entry [%s]: [%s]\n",
entry->dn, value);
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_modrdn.c, 1.7, 1.8
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27301
Modified Files:
ldbm_modrdn.c
Log Message:
Resolves: #428232
Summary: DN Rename with case change only fails
Description: The modrdn operation allows the source dn and the target dn are
identical or the same except the cases.
Index: ldbm_modrdn.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ldbm_modrdn.c 18 Oct 2007 22:40:18 -0000 1.7
+++ ldbm_modrdn.c 29 Jul 2008 20:37:22 -0000 1.8
@@ -263,12 +263,14 @@
ldap_result_code= -1;
goto error_return; /* error result sent by find_entry2modify() */
}
-
/* Check that an entry with the same DN doesn't already exist. */
{
Slapi_Entry *entry;
slapi_pblock_get( pb, SLAPI_MODRDN_EXISTING_ENTRY, &entry);
- if(entry!=NULL)
+ if((entry != NULL) &&
+ /* allow modrdn even if the src dn and dest dn are identical */
+ (0 != slapi_sdn_compare((const Slapi_DN *)&dn_newdn,
+ (const Slapi_DN *)&dn_olddn)))
{
ldap_result_code= LDAP_ALREADY_EXISTS;
goto error_return;
@@ -279,14 +281,14 @@
oldparent_addr.dn = (char*)slapi_sdn_get_dn (&dn_parentdn);
oldparent_addr.uniqueid = NULL;
parententry = find_entry2modify_only( pb, be, &oldparent_addr, NULL );
- modify_init(&parent_modify_context,parententry);
+ modify_init(&parent_modify_context,parententry);
/* Fetch and lock the new parent of the entry that is moving */
if(slapi_sdn_get_ndn(&dn_newsuperiordn)!=NULL)
{
slapi_pblock_get (pb, SLAPI_MODRDN_NEWSUPERIOR_ADDRESS, &newsuperior_addr);
newparententry = find_entry2modify_only( pb, be, newsuperior_addr, NULL);
- modify_init(&newparent_modify_context,newparententry);
+ modify_init(&newparent_modify_context,newparententry);
}
opcsn = operation_get_csn (operation);
@@ -414,21 +416,25 @@
goto error_return;
}
- slapi_entry_set_sdn( ec->ep_entry, &dn_newdn );
+ slapi_entry_set_sdn( ec->ep_entry, &dn_newdn );
/* create it in the cache - prevents others from creating it */
- if ( cache_add_tentative( &inst->inst_cache, ec, NULL ) != 0 ) {
+ if (( cache_add_tentative( &inst->inst_cache, ec, NULL ) != 0 ) &&
+ /* allow modrdn even if the src dn and dest dn are identical */
+ ( 0 != slapi_sdn_compare((const Slapi_DN *)&dn_newdn,
+ (const Slapi_DN *)&dn_olddn)) )
+ {
/* somebody must've created it between dn2entry() and here */
/* JCMREPL - Hmm... we can't permit this to happen...? */
ldap_result_code= LDAP_ALREADY_EXISTS;
goto error_return;
}
- ec_in_cache= 1;
+ ec_in_cache= 1;
/* Build the list of modifications required to the existing entry */
{
- slapi_mods_init(&smods_generated,4);
- slapi_mods_init(&smods_generated_wsi,4);
+ slapi_mods_init(&smods_generated,4);
+ slapi_mods_init(&smods_generated_wsi,4);
ldap_result_code = moddn_newrdn_mods(pb, slapi_sdn_get_ndn(&dn_olddn), ec, &smods_generated, &smods_generated_wsi,
is_replicated_operation);
if (ldap_result_code != LDAP_SUCCESS) {
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acleffectiverights.c, 1.9, 1.10
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16936
Modified Files:
acleffectiverights.c
Log Message:
Resolves: #456752
Summary: GER: supporting "dn" and extensible object class is missing
Description:
1. Extensible object class cannot use the schema info. Evaluate existing
attributes with no schema check.
2. dn is not an attribute belonging to an entry, but treat is as it is if it's
given as a part of the attribute list.
Index: acleffectiverights.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acleffectiverights.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- acleffectiverights.c 23 Jul 2008 15:14:11 -0000 1.9
+++ acleffectiverights.c 28 Jul 2008 15:49:28 -0000 1.10
@@ -580,7 +580,6 @@
} \
}
-
void
_ger_get_attrs_rights (
Slapi_PBlock *gerpb,
@@ -609,6 +608,7 @@
int hasplus = charray_inlist(attrs, "+");
Slapi_Attr *objclasses = NULL;
Slapi_ValueSet *objclassvals = NULL;
+ int isextensibleobj = 0;
/* get all attrs available for the entry */
slapi_entry_attr_find(e, "objectclass", &objclasses);
@@ -616,10 +616,18 @@
Slapi_Value *v;
slapi_attr_get_valueset(objclasses, &objclassvals);
i = slapi_valueset_first_value(objclassvals, &v);
- if (-1 != i) {
+ if (-1 != i)
+ {
+ const char *ocname = NULL;
allattrs = slapi_schema_list_objectclass_attributes(
(const char *)v->bv.bv_val,
SLAPI_OC_FLAG_REQUIRED|SLAPI_OC_FLAG_ALLOWED);
+ /* check if this entry is an extensble object or not */
+ ocname = slapi_value_get_string(v);
+ if ( strcasecmp( ocname, "extensibleobject" ) == 0 )
+ {
+ isextensibleobj = 1;
+ }
/* add "aci" to the allattrs to adjust to do_search */
charray_add(&allattrs, slapi_attr_syntax_normalize("aci"));
while (-1 != i)
@@ -630,6 +638,12 @@
myattrs = slapi_schema_list_objectclass_attributes(
(const char *)v->bv.bv_val,
SLAPI_OC_FLAG_REQUIRED|SLAPI_OC_FLAG_ALLOWED);
+ /* check if this entry is an extensble object or not */
+ ocname = slapi_value_get_string(v);
+ if ( strcasecmp( ocname, "extensibleobject" ) == 0 )
+ {
+ isextensibleobj = 1;
+ }
charray_merge_nodup(&allattrs, myattrs, 1/*copy_strs*/);
charray_free(myattrs);
}
@@ -640,48 +654,61 @@
/* get operational attrs */
opattrs = slapi_schema_list_attribute_names(SLAPI_ATTR_FLAG_OPATTR);
- if (hasstar && hasplus)
- {
- GER_GET_ATTR_RIGHTS(allattrs);
- GER_GET_ATTR_RIGHTS(opattrs);
- }
- else if (hasstar)
+ if (isextensibleobj)
{
- GER_GET_ATTR_RIGHTS(allattrs);
- GER_GET_ATTR_RIGHTA_EXT('*', opattrs, allattrs);
- }
- else if (hasplus)
- {
- GER_GET_ATTR_RIGHTS(opattrs);
- GER_GET_ATTR_RIGHTA_EXT('+', allattrs, opattrs);
+ for ( i = 0; attrs[i]; i++ )
+ {
+ _ger_get_attr_rights ( gerpb, e, subjectndn, attrs[i], gerstr,
+ gerstrsize, gerstrcap, isfirstattr, errbuf );
+ isfirstattr = 0;
+ }
}
else
{
- for ( i = 0; attrs[i]; i++ )
+ if (hasstar && hasplus)
{
- if (charray_inlist(allattrs, attrs[i]) ||
- charray_inlist(opattrs, attrs[i]))
- {
- _ger_get_attr_rights ( gerpb, e, subjectndn, attrs[i],
- gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf );
- isfirstattr = 0;
- }
- else
+ GER_GET_ATTR_RIGHTS(allattrs);
+ GER_GET_ATTR_RIGHTS(opattrs);
+ }
+ else if (hasstar)
+ {
+ GER_GET_ATTR_RIGHTS(allattrs);
+ GER_GET_ATTR_RIGHTA_EXT('*', opattrs, allattrs);
+ }
+ else if (hasplus)
+ {
+ GER_GET_ATTR_RIGHTS(opattrs);
+ GER_GET_ATTR_RIGHTA_EXT('+', allattrs, opattrs);
+ }
+ else
+ {
+ for ( i = 0; attrs[i]; i++ )
{
- /* if the attr does not belong to the entry,
- "<attr>:none" is returned */
- if (!isfirstattr)
+ if (charray_inlist(allattrs, attrs[i]) ||
+ charray_inlist(opattrs, attrs[i]) ||
+ (0 == strcasecmp(attrs[i], "dn")))
+ {
+ _ger_get_attr_rights ( gerpb, e, subjectndn, attrs[i],
+ gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf );
+ isfirstattr = 0;
+ }
+ else
{
- _append_gerstr(gerstr, gerstrsize, gerstrcap, ", ", NULL);
+ /* if the attr does not belong to the entry,
+ "<attr>:none" is returned */
+ if (!isfirstattr)
+ {
+ _append_gerstr(gerstr, gerstrsize, gerstrcap, ", ", NULL);
+ }
+ _append_gerstr(gerstr, gerstrsize, gerstrcap, attrs[i], ":");
+ _append_gerstr(gerstr, gerstrsize, gerstrcap, "none", NULL);
+ isfirstattr = 0;
}
- _append_gerstr(gerstr, gerstrsize, gerstrcap, attrs[i], ":");
- _append_gerstr(gerstr, gerstrsize, gerstrcap, "none", NULL);
- isfirstattr = 0;
}
}
+ charray_free(allattrs);
+ charray_free(opattrs);
}
- charray_free(allattrs);
- charray_free(opattrs);
}
else
{
15 years, 4 months
[Fedora-directory-commits] adminserver/admserv/newinst/src AdminUtil.pm.in, 1.18, 1.18.2.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3818
Modified Files:
Tag: Directory_Server_8_0_Branch
AdminUtil.pm.in
Log Message:
Resolves: bug 431103
Bug Description: Cannot setup ds with remote config DS
Reviewed by: nhosoi (Thanks!)
Branch: Directory_Server_8_0_Branch
Fix Description: If using a non-standard config dir for the directory server, creating additional instances with setup-ds-admin.pl fails, because it doesn't take into consideration the location. DS_CONFIG_DIR is set in DSCreate.pm to the real location of the new directory server instance config directory.
Platforms tested: Fedora 8
Flag Day: no
Doc impact: no
Index: AdminUtil.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -r1.18 -r1.18.2.1
--- AdminUtil.pm.in 17 Dec 2007 20:10:04 -0000 1.18
+++ AdminUtil.pm.in 24 Jul 2008 16:03:25 -0000 1.18.2.1
@@ -357,8 +357,11 @@
sub createSubDSNoConn {
my $inf = shift;
my $errs = shift;
+ # $ENV{DS_CONFIG_DIR} is set in ds instance creation
+ my $dsconfdir = $ENV{DS_CONFIG_DIR} ||
+ "@instconfigdir@/slapd-" . $inf->{slapd}->{ServerIdentifier};
- my $dseldif = "@instconfigdir@/slapd-" . $inf->{slapd}->{ServerIdentifier} . "/dse.ldif";
+ my $dseldif = "$dsconfdir/dse.ldif";
my $conn = new FileConn($dseldif);
return internalCreateSubDS($conn, $inf, $errs);
15 years, 4 months
[Fedora-directory-commits] adminserver/admserv/newinst/src AdminUtil.pm.in, 1.18, 1.19
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29410
Modified Files:
AdminUtil.pm.in
Log Message:
Resolves: bug 431103
Bug Description: Cannot setup ds with remote config DS
Reviewed by: nhosoi (Thanks!)
Branch: HEAD
Fix Description: If using a non-standard config dir for the directory server, creating additional instances with setup-ds-admin.pl fails, because it doesn't take into consideration the location. DS_CONFIG_DIR is set in DSCreate.pm to the real location of the new directory server instance config directory.
Platforms tested: Fedora 8
Flag Day: no
Doc impact: no
Index: AdminUtil.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- AdminUtil.pm.in 17 Dec 2007 20:10:04 -0000 1.18
+++ AdminUtil.pm.in 24 Jul 2008 16:00:20 -0000 1.19
@@ -357,8 +357,11 @@
sub createSubDSNoConn {
my $inf = shift;
my $errs = shift;
+ # $ENV{DS_CONFIG_DIR} is set in ds instance creation
+ my $dsconfdir = $ENV{DS_CONFIG_DIR} ||
+ "@instconfigdir@/slapd-" . $inf->{slapd}->{ServerIdentifier};
- my $dseldif = "@instconfigdir@/slapd-" . $inf->{slapd}->{ServerIdentifier} . "/dse.ldif";
+ my $dseldif = "$dsconfdir/dse.ldif";
my $conn = new FileConn($dseldif);
return internalCreateSubDS($conn, $inf, $errs);
15 years, 4 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.3, 1.4
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26526
Modified Files:
dna.c
Log Message:
Resolves: 456162
Summary: Merge in DNA plug-in code from FreeIPA
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.3 -r 1.4 dna.c
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dna.c 18 Oct 2007 22:25:14 -0000 1.3
+++ dna.c 23 Jul 2008 16:33:31 -0000 1.4
@@ -2,15 +2,15 @@
* This Program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; version 2 of the License.
- *
+ *
* This Program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License along with
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
- *
+ *
* In addition, as a special exception, Red Hat, Inc. gives You the additional
* right to link the code of this Program with code not covered under the GNU
* General Public License ("Non-GPL Code") and to distribute linked combinations
@@ -28,9 +28,9 @@
* version of the file, but you are not obligated to do so. If you do not wish to
* provide this exception without modification, you must delete this exception
* statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
+ * exception.
+ *
+ *
* Copyright (C) 2007 Red Hat, Inc.
* All rights reserved.
* END COPYRIGHT BLOCK **/
@@ -41,11 +41,12 @@
/**
- * Distributed Numeric Assignment plug-in
+ * Distributed Numeric Assignment plug-in
*/
#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#include <errno.h>
#include "portable.h"
#include "nspr.h"
#include "slapi-private.h"
@@ -59,55 +60,67 @@
#include <sys/stat.h>
#endif
-#define DNA_PLUGIN_SUBSYSTEM "dna-plugin"
-#define DNA_PLUGIN_VERSION 0x00010000
+#define DNA_PLUGIN_SUBSYSTEM "dna-plugin"
+#define DNA_PLUGIN_VERSION 0x00020000
-#define DNA_DN "cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config" /* temporary */
+#define DNA_DN "cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config" /* temporary */
-#define DNA_SUCCESS 0
-#define DNA_FAILURE -1
+#define DNA_SUCCESS 0
+#define DNA_FAILURE -1
/**
* DNA config types
*/
-#define DNA_TYPE "dnaType"
-#define DNA_PREFIX "dnaPrefix"
-#define DNA_NEXTVAL "dnaNextValue"
-#define DNA_INTERVAL "dnaInterval"
-#define DNA_GENERATE "dnaMagicRegen"
-#define DNA_FILTER "dnaFilter"
-#define DNA_SCOPE "dnaScope"
-
-#define FEATURE_DESC "Distributed Numeric Assignment"
-#define PLUGIN_DESC "Distributed Numeric Assignment plugin"
-
-static Slapi_PluginDesc pdesc = { FEATURE_DESC,
- PLUGIN_MAGIC_VENDOR_STR,
- PRODUCTTEXT,
- PLUGIN_DESC };
+#define DNA_TYPE "dnaType"
+#define DNA_PREFIX "dnaPrefix"
+#define DNA_NEXTVAL "dnaNextValue"
+#define DNA_INTERVAL "dnaInterval"
+#define DNA_GENERATE "dnaMagicRegen"
+#define DNA_FILTER "dnaFilter"
+#define DNA_SCOPE "dnaScope"
+
+/* since v2 */
+#define DNA_MAXVAL "dnaMaxValue"
+#define DNA_SHARED_CFG_DN "dnaSharedCfgDN"
+
+/* Shared Config */
+#define DNA_GLOBAL_RANGE "dnaGlobalRange"
+#define DNA_RANGE "dnaRange"
+#define DNA_MAX_RANGE_SIZE "dnaMaxRangeSize"
+#define DNA_CHUNK_SIZE "dnaChunkSize"
+
+#define FEATURE_DESC "Distributed Numeric Assignment"
+#define PLUGIN_DESC "Distributed Numeric Assignment plugin"
+
+static Slapi_PluginDesc pdesc = { FEATURE_DESC,
+ PLUGIN_MAGIC_VENDOR_STR,
+ PRODUCTTEXT,
+ PLUGIN_DESC };
/**
* linked list of config entries
*/
-struct _defs {
- PRCList list;
- char *dn;
- char *type;
- char *prefix;
- unsigned long nextval;
- unsigned long interval;
- struct slapi_filter *filter;
- char *generate;
- char *scope;
-} dna_anchor;
-typedef struct _defs configEntry;
-static PRCList *config;
+struct configEntry {
+ PRCList list;
+ char *dn;
+ char *type;
+ char *prefix;
+ PRUint64 nextval;
+ PRUint64 interval;
+ PRUint64 maxval;
+ char *filter;
+ struct slapi_filter *slapi_filter;
+ char *generate;
+ char *scope;
+};
+
+static PRCList *dna_global_config = NULL;
static PRRWLock *g_dna_cache_lock;
-static void *_PluginID = NULL;
-static char *_PluginDN = NULL;
+static void *_PluginID = NULL;
+static char *_PluginDN = NULL;
/*
@@ -116,49 +129,50 @@
static Slapi_Mutex *g_new_value_lock;
/**
- *
+ *
* DNA plug-in management functions
*
*/
-int dna_init(Slapi_PBlock *pb);
-static int dna_start(Slapi_PBlock *pb);
-static int dna_close(Slapi_PBlock *pb);
-static int dna_postop_init(Slapi_PBlock *pb);
+int dna_init(Slapi_PBlock * pb);
+static int dna_start(Slapi_PBlock * pb);
+static int dna_close(Slapi_PBlock * pb);
+static int dna_postop_init(Slapi_PBlock * pb);
/**
- *
+ *
* Local operation functions
*
*/
static int loadPluginConfig();
-static int parseConfigEntry(Slapi_Entry *e);
+static int parseConfigEntry(Slapi_Entry * e);
static void deleteConfig();
-static void freeConfigEntry(configEntry **entry);
+static void freeConfigEntry(struct configEntry ** entry);
/**
*
* helpers
*
*/
-static char *dna_get_dn(Slapi_PBlock *pb);
+static char *dna_get_dn(Slapi_PBlock * pb);
static int dna_dn_is_config(char *dn);
-static int dna_get_next_value(configEntry *config_entry, char **next_value_ret);
+static int dna_get_next_value(struct configEntry * config_entry,
+ char **next_value_ret);
[...1820 lines suppressed...]
- slapi_ch_free_string(&new_value);
-
- /* make sure we don't generate for this
- * type again
- */
- if(LDAP_SUCCESS == ret)
- {
- last_type = config_entry->type;
- }
+ new_value = slapi_ch_malloc(len);
- generate = 0;
- }
-next:
- list = PR_NEXT_LINK (list);
+ if (config_entry->prefix) {
+ strcpy(new_value, config_entry->prefix);
+ strcat(new_value, value);
+ } else
+ strcpy(new_value, value);
+
+ /* do the mod */
+ if (LDAP_CHANGETYPE_ADD == modtype) {
+ /* add - add to entry */
+ slapi_entry_attr_set_charptr(e,
+ config_entry->type,
+ new_value);
+ } else {
+ /* mod - add to mods */
+ slapi_mods_add_string(smods,
+ LDAP_MOD_REPLACE,
+ config_entry->type, new_value);
+ }
+
+ /* free up */
+ slapi_ch_free_string(&value);
+ slapi_ch_free_string(&new_value);
+
+ /* make sure we don't generate for this
+ * type again
+ */
+ if (LDAP_SUCCESS == ret) {
+ last_type = config_entry->type;
}
+
+ generate = 0;
+ }
+ next:
+ list = PR_NEXT_LINK(list);
}
+ }
- dna_unlock();
+ dna_unlock();
-bailmod:
- if(LDAP_CHANGETYPE_MODIFY == modtype)
- {
- /* these are the mods you made, really,
- * I didn't change them, honest, just had a quick look
- */
- mods = slapi_mods_get_ldapmods_passout(smods);
- slapi_pblock_set( pb, SLAPI_MODIFY_MODS, mods);
- slapi_mods_free(&smods);
- }
+ bailmod:
+ if (LDAP_CHANGETYPE_MODIFY == modtype) {
+ /* these are the mods you made, really,
+ * I didn't change them, honest, just had a quick look
+ */
+ mods = slapi_mods_get_ldapmods_passout(smods);
+ slapi_pblock_set(pb, SLAPI_MODIFY_MODS, mods);
+ slapi_mods_free(&smods);
+ }
-bail:
+ bail:
- if(free_entry && e)
- slapi_entry_free(e);
+ if (free_entry && e)
+ slapi_entry_free(e);
- if(ret)
- slapi_log_error( SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM , "dna_pre_op: operation failure [%d]\n", ret);
+ if (ret) {
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_pre_op: operation failure [%d]\n", ret);
+ slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
+ slapi_ch_free((void **)&errstr);
+ ret = DNA_FAILURE;
+ }
- slapi_log_error( SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM , "<-- dna_pre_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ "<-- dna_pre_op\n");
- return ret;
+ return ret;
}
-
-static int dna_add_pre_op( Slapi_PBlock *pb )
+static int dna_add_pre_op(Slapi_PBlock * pb)
{
- return dna_pre_op(pb, LDAP_CHANGETYPE_ADD);
+ return dna_pre_op(pb, LDAP_CHANGETYPE_ADD);
}
-static int dna_mod_pre_op( Slapi_PBlock *pb )
+static int dna_mod_pre_op(Slapi_PBlock * pb)
{
- return dna_pre_op(pb, LDAP_CHANGETYPE_MODIFY);
+ return dna_pre_op(pb, LDAP_CHANGETYPE_MODIFY);
}
-static int dna_config_check_post_op(Slapi_PBlock *pb)
+static int dna_config_check_post_op(Slapi_PBlock * pb)
{
- char *dn;
+ char *dn;
- slapi_log_error( SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM , "--> dna_config_check_post_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ "--> dna_config_check_post_op\n");
- if(dn = dna_get_dn(pb))
- {
- if(dna_dn_is_config(dn))
- loadPluginConfig();
- }
+ if ((dn = dna_get_dn(pb))) {
+ if (dna_dn_is_config(dn))
+ loadPluginConfig();
+ }
- slapi_log_error( SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM , "<-- dna_config_check_post_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ "<-- dna_config_check_post_op\n");
- return 0;
+ return 0;
}
/****************************************************
@@ -1149,36 +1387,27 @@
*/
void dnaDumpConfig()
{
- PRCList *list;
+ PRCList *list;
- dna_read_lock();
-
- if(!PR_CLIST_IS_EMPTY(config))
- {
- list = PR_LIST_HEAD(config);
- while(list != config)
- {
- dnaDumpConfigEntry((configEntry*)list);
- list = PR_NEXT_LINK (list);
- }
- }
-
- dna_unlock();
-}
+ dna_read_lock();
+ if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
+ list = PR_LIST_HEAD(dna_global_config);
+ while (list != dna_global_config) {
+ dnaDumpConfigEntry((struct configEntry *) list);
+ list = PR_NEXT_LINK(list);
+ }
+ }
-void dnaDumpConfigEntry(configEntry *entry)
-{
- char buffer[BUFSIZ];
- size_t bufsiz = (size_t)sizeof(buffer);
- printf("<- type --------------> %s\n", entry->type);
- printf("<---- prefix ---------> %s\n", entry->prefix);
- printf("<---- next value -----> %lu\n", entry->nextval);
- printf("<---- interval -------> %lu\n", entry->interval);
- buffer[0] = '\0';
- printf("<---- filter ---------> %s\n",
- slapi_filter_to_string_internal((const struct slapi_filter *)entry->filter, buffer, &bufsiz));
- printf("<---- generate flag --> %s\n", entry->generate);
+ dna_unlock();
}
+void dnaDumpConfigEntry(struct configEntry * entry)
+{
+ printf("<- type --------------> %s\n", entry->type);
+ printf("<---- prefix ---------> %s\n", entry->prefix);
+ printf("<---- next value -----> %lu\n", entry->nextval);
+ printf("<---- interval -------> %lu\n", entry->interval);
+ printf("<---- generate flag --> %s\n", entry->generate);
+}
15 years, 4 months