[Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_instance.c, 1.9, 1.10
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/chainingdb
Modified Files:
cb_instance.c
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: cb_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_instance.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cb_instance.c 27 Jun 2008 19:28:22 -0000 1.9
+++ cb_instance.c 8 Oct 2008 17:29:01 -0000 1.10
@@ -903,7 +903,7 @@
static void *cb_instance_sizelimit_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->sizelimit;
@@ -916,10 +916,10 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->sizelimit=(int) value;
+ inst->sizelimit=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
if (inst->inst_be)
- be_set_sizelimit(inst->inst_be, (int) value);
+ be_set_sizelimit(inst->inst_be, (int) ((uintptr_t)value));
}
return LDAP_SUCCESS;
}
@@ -927,7 +927,7 @@
static void *cb_instance_timelimit_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->timelimit;
@@ -940,10 +940,10 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->timelimit=(int) value;
+ inst->timelimit=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
if (inst->inst_be)
- be_set_timelimit(inst->inst_be, (int) value);
+ be_set_timelimit(inst->inst_be, (int) ((uintptr_t)value));
}
return LDAP_SUCCESS;
}
@@ -951,7 +951,7 @@
static void *cb_instance_max_test_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->max_test_time;
@@ -964,7 +964,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->max_test_time=(int) value;
+ inst->max_test_time=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -973,7 +973,7 @@
static void *cb_instance_max_idle_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->max_idle_time;
@@ -986,7 +986,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->max_idle_time=(int) value;
+ inst->max_idle_time=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -996,7 +996,7 @@
static void *cb_instance_hoplimit_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->hoplimit;
@@ -1009,7 +1009,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->hoplimit=(int) value;
+ inst->hoplimit=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1018,7 +1018,7 @@
static void *cb_instance_maxbconn_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->bind_pool->conn.maxconnections;
@@ -1031,7 +1031,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->bind_pool->conn.maxconnections=(int) value;
+ inst->bind_pool->conn.maxconnections=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1040,7 +1040,7 @@
static void *cb_instance_maxconn_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->pool->conn.maxconnections;
@@ -1053,7 +1053,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->pool->conn.maxconnections=(int) value;
+ inst->pool->conn.maxconnections=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1062,7 +1062,7 @@
static void *cb_instance_abandonto_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->abandon_timeout.tv_sec;
@@ -1084,7 +1084,7 @@
}
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->abandon_timeout.tv_sec=(int) value;
+ inst->abandon_timeout.tv_sec=(int) ((uintptr_t)value);
inst->abandon_timeout.tv_usec=0;
PR_RWLock_Unlock(inst->rwl_config_lock);
}
@@ -1094,7 +1094,7 @@
static void *cb_instance_maxbconc_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->bind_pool->conn.maxconcurrency;
@@ -1107,7 +1107,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->bind_pool->conn.maxconcurrency=(int) value;
+ inst->bind_pool->conn.maxconcurrency=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1116,7 +1116,7 @@
static void *cb_instance_maxconc_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->pool->conn.maxconcurrency;
@@ -1129,7 +1129,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->pool->conn.maxconcurrency=(int) value;
+ inst->pool->conn.maxconcurrency=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1138,7 +1138,7 @@
static void *cb_instance_imperson_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data = inst->impersonate;
@@ -1153,7 +1153,7 @@
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->impersonate=(int) value;
+ inst->impersonate=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
} else {
/* Security check: Make sure the proxing user is */
@@ -1162,7 +1162,7 @@
char * rootdn=cb_get_rootdn();
PR_RWLock_Rlock(inst->rwl_config_lock);
- if (((int) value) && inst->pool && inst->pool->binddn &&
+ if (((int) ((uintptr_t)value)) && inst->pool && inst->pool->binddn &&
!strcmp(inst->pool->binddn,rootdn)) { /* UTF-8 aware */
rc=LDAP_UNWILLING_TO_PERFORM;
if (errorbuf)
@@ -1179,7 +1179,7 @@
static void *cb_instance_connlife_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data=inst->pool->conn.connlifetime;
@@ -1192,7 +1192,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->pool->conn.connlifetime=(int) value;
+ inst->pool->conn.connlifetime=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1201,7 +1201,7 @@
static void *cb_instance_bindto_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data=inst->bind_pool->conn.op_timeout.tv_sec;
@@ -1214,12 +1214,12 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->bind_pool->conn.op_timeout.tv_sec=(int) value;
+ inst->bind_pool->conn.op_timeout.tv_sec=(int) ((uintptr_t)value);
inst->bind_pool->conn.op_timeout.tv_usec=0;
- inst->bind_pool->conn.bind_timeout.tv_sec=(int) value;
+ inst->bind_pool->conn.bind_timeout.tv_sec=(int) ((uintptr_t)value);
inst->bind_pool->conn.bind_timeout.tv_usec=0;
/* Used to bind to the farm server */
- inst->pool->conn.bind_timeout.tv_sec=(int) value;
+ inst->pool->conn.bind_timeout.tv_sec=(int) ((uintptr_t)value);
inst->pool->conn.bind_timeout.tv_usec=0;
PR_RWLock_Unlock(inst->rwl_config_lock);
}
@@ -1229,7 +1229,7 @@
static void *cb_instance_opto_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data=inst->pool->conn.op_timeout.tv_sec;
@@ -1242,7 +1242,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->pool->conn.op_timeout.tv_sec=(int) value;
+ inst->pool->conn.op_timeout.tv_sec=(int) ((uintptr_t)value);
inst->pool->conn.op_timeout.tv_usec=0;
PR_RWLock_Unlock(inst->rwl_config_lock);
}
@@ -1252,7 +1252,7 @@
static void *cb_instance_ref_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data=inst->searchreferral;
@@ -1265,7 +1265,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->searchreferral=(int) value;
+ inst->searchreferral=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1274,7 +1274,7 @@
static void *cb_instance_acl_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data=inst->local_acl;
@@ -1295,7 +1295,7 @@
return LDAP_SUCCESS;
}
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->local_acl=(int) value;
+ inst->local_acl=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1304,7 +1304,7 @@
static void *cb_instance_bindretry_get(void *arg)
{
cb_backend_instance * inst=(cb_backend_instance *) arg;
- int data;
+ uintptr_t data;
PR_RWLock_Rlock(inst->rwl_config_lock);
data=inst->bind_retry;
@@ -1317,7 +1317,7 @@
cb_backend_instance * inst=(cb_backend_instance *) arg;
if (apply) {
PR_RWLock_Wlock(inst->rwl_config_lock);
- inst->bind_retry=(int) value;
+ inst->bind_retry=(int) ((uintptr_t)value);
PR_RWLock_Unlock(inst->rwl_config_lock);
}
return LDAP_SUCCESS;
@@ -1383,7 +1383,7 @@
} else {
int_val = cb_atoi((char *)bval->bv_val);
}
- retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod);
+ retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod);
break;
case CB_CONFIG_TYPE_INT_OCTAL:
if (use_default) {
@@ -1391,7 +1391,7 @@
} else {
int_val = (int) strtol((char *)bval->bv_val, NULL, 8);
}
- retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod);
+ retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod);
break;
case CB_CONFIG_TYPE_LONG:
if (use_default) {
@@ -1414,7 +1414,7 @@
} else {
int_val = !strcasecmp((char *) bval->bv_val, "on");
}
- retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod);
+ retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod);
break;
}
return retval;
@@ -1435,10 +1435,10 @@
switch(config->config_type) {
case CB_CONFIG_TYPE_INT:
- sprintf(buf, "%d", (int) config->config_get_fn(arg));
+ sprintf(buf, "%d", (int) ((uintptr_t)config->config_get_fn(arg)));
break;
case CB_CONFIG_TYPE_INT_OCTAL:
- sprintf(buf, "%o", (int) config->config_get_fn(arg));
+ sprintf(buf, "%o", (int) ((uintptr_t)config->config_get_fn(arg)));
break;
case CB_CONFIG_TYPE_LONG:
sprintf(buf, "%ld", (long) config->config_get_fn(arg));
@@ -1451,7 +1451,7 @@
slapi_ch_free((void **)&tmp_string);
break;
case CB_CONFIG_TYPE_ONOFF:
- if ((int) config->config_get_fn(arg)) {
+ if ((int) ((uintptr_t)config->config_get_fn(arg))) {
sprintf(buf,"%s","on");
} else {
sprintf(buf,"%s","off");
15 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/presence presence.c, 1.6, 1.7
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/presence
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/presence
Modified Files:
presence.c
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: presence.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/presence/presence.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- presence.c 10 Nov 2006 23:45:09 -0000 1.6
+++ presence.c 8 Oct 2008 17:29:02 -0000 1.7
@@ -66,13 +66,7 @@
/*** from proto-slap.h ***/
-int slapd_log_error_proc( char *subsystem, char *fmt, ... )
-#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)));
-#else
- ;
-#endif
-
+int slapd_log_error_proc( char *subsystem, char *fmt, ... );
/*** from ldaplog.h ***/
@@ -346,7 +340,6 @@
int presence_start( Slapi_PBlock *pb )
{
char * plugindn = NULL;
- char * httpRootDir = NULL;
LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_start -- begin\n",0,0,0);
@@ -1105,7 +1098,6 @@
{
int status;
int props = SLAPI_ATTR_FLAG_OPATTR;
- Slapi_Attr *attr = NULL;
Slapi_ValueSet *results = NULL;
int type_name_disposition = 0;
char *actual_type_name = 0;
@@ -1150,7 +1142,6 @@
v = slapi_value_get_berval(val);
if (v) {
char *ldifvalue;
- size_t attrnamelen = strlen( attrname );
LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> %s size [%d] \n",
attrname,v->bv_len,0);
15 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.10, 1.11
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/dna
Modified Files:
dna.c
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dna.c 3 Oct 2008 04:28:21 -0000 1.10
+++ dna.c 8 Oct 2008 17:29:02 -0000 1.11
@@ -55,6 +55,13 @@
#include "prclist.h"
#include "ldif.h"
+/* Required to get portable printf/scanf format macros */
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#error Need to define portable format macros such as PRIu64
+#endif /* HAVE_INTTYPES_H */
+
/* get file mode flags for unix */
#ifndef _WIN32
#include <sys/stat.h>
@@ -708,7 +715,7 @@
}
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%llu]\n", DNA_NEXTVAL, entry->nextval, 0,
+ "----------> %s [%" PRIu64 "]\n", DNA_NEXTVAL, entry->nextval, 0,
0);
value = slapi_entry_attr_get_charptr(e, DNA_PREFIX);
@@ -736,7 +743,7 @@
}
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%llu]\n", DNA_INTERVAL, entry->interval, 0, 0);
+ "----------> %s [%" PRIu64 "]\n", DNA_INTERVAL, entry->interval, 0, 0);
#endif
value = slapi_entry_attr_get_charptr(e, DNA_GENERATE);
@@ -844,7 +851,7 @@
entry->threshold = strtoull(value, 0, 0);
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%llu]\n", DNA_THRESHOLD, value, 0, 0);
+ "----------> %s [%" PRIu64 "]\n", DNA_THRESHOLD, value, 0, 0);
slapi_ch_free_string(&value);
} else {
@@ -1319,8 +1326,8 @@
* don't need to do this if we already have a next range on deck. */
if ((config_entry->next_range_lower == 0) && (config_entry->remaining <= config_entry->threshold)) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
- "dna_notice_allocation: Passed threshold of %llu remaining values "
- "for range %s. (%llu values remain)\n",
+ "dna_notice_allocation: Passed threshold of %" PRIu64 " remaining values "
+ "for range %s. (%" PRIu64 " values remain)\n",
config_entry->threshold, config_entry->dn, config_entry->remaining);
/* Only attempt to fix maxval if the fix flag is set. */
if (fix != 0) {
@@ -1461,13 +1468,11 @@
struct dnaServer *server,
PRUint64 *lower, PRUint64 *upper)
{
- Slapi_DN *agmt_sdn = NULL;
char *bind_dn = NULL;
char *bind_passwd = NULL;
char *bind_method = NULL;
int is_ssl = 0;
int is_client_auth = 0;
- int replport = 0;
struct berval *request = NULL;
char *retoid = NULL;
struct berval *responsedata = NULL;
@@ -1767,12 +1772,12 @@
if (prefix) {
/* The 7 below is for all of the filter characters "(&(=))"
* plus the trailing \0. The 20 is for the maximum string
- * representation of a %llu. */
+ * representation of a " PRIu64 ". */
filterlen = strlen(config_entry->filter) +
strlen(prefix) + strlen(type)
+ 7 + 20;
filter = slapi_ch_malloc(filterlen);
- snprintf(filter, filterlen, "(&%s(%s=%s%llu))",
+ snprintf(filter, filterlen, "(&%s(%s=%s%" PRIu64 "))",
config_entry->filter, type, prefix, tmpval);
} else {
ctrls = (LDAPControl **)slapi_ch_calloc(2, sizeof(LDAPControl));
@@ -1785,7 +1790,7 @@
return LDAP_OPERATIONS_ERROR;
}
- filter = slapi_ch_smprintf("(&%s(&(%s>=%llu)(%s<=%llu)))",
+ filter = slapi_ch_smprintf("(&%s(&(%s>=%" PRIu64 ")(%s<=%" PRIu64 ")))",
config_entry->filter,
type, tmpval,
type, config_entry->maxval);
@@ -1836,7 +1841,7 @@
/* filter is guaranteed to be big enough since we allocated
* enough space to fit a string representation of any unsigned
* 64-bit integer */
- snprintf(filter, filterlen, "(&%s(%s=%s%llu))",
+ snprintf(filter, filterlen, "(&%s(%s=%s%" PRIu64 "))",
config_entry->filter, type, prefix, tmpval);
/* clear out the pblock so we can re-use it */
@@ -1968,7 +1973,7 @@
* of our current range */
if (nextval <= (config_entry->maxval + config_entry->interval)) {
/* try to set the new next value in the config entry */
- snprintf(next_value, sizeof(next_value),"%llu", nextval);
+ snprintf(next_value, sizeof(next_value),"%" PRIu64, nextval);
/* set up our replace modify operation */
replace_val[0] = next_value;
@@ -1998,7 +2003,7 @@
if (LDAP_SUCCESS == ret) {
slapi_ch_free_string(next_value_ret);
- *next_value_ret = slapi_ch_smprintf("%llu", setval);
+ *next_value_ret = slapi_ch_smprintf("%" PRIu64, setval);
if (NULL == *next_value_ret) {
ret = LDAP_OPERATIONS_ERROR;
goto done;
@@ -2045,7 +2050,7 @@
/* We store the number of remaining assigned values
* in the shared config entry. */
- snprintf(remaining_vals, sizeof(remaining_vals),"%llu", config_entry->remaining);
+ snprintf(remaining_vals, sizeof(remaining_vals),"%" PRIu64, config_entry->remaining);
/* set up our replace modify operation */
replace_val[0] = remaining_vals;
@@ -2130,7 +2135,7 @@
int ret = 0;
/* Try to set the new next range in the config entry. */
- snprintf(nextrange_value, sizeof(nextrange_value), "%llu-%llu",
+ snprintf(nextrange_value, sizeof(nextrange_value), "%" PRIu64 "-%" PRIu64,
lower, upper);
/* set up our replace modify operation */
@@ -2199,8 +2204,8 @@
int ret = 0;
/* Setup the modify operation for the config entry */
- snprintf(maxval_val, sizeof(maxval_val),"%llu", config_entry->next_range_upper);
- snprintf(nextval_val, sizeof(nextval_val),"%llu", config_entry->next_range_lower);
+ snprintf(maxval_val, sizeof(maxval_val),"%" PRIu64, config_entry->next_range_upper);
+ snprintf(nextval_val, sizeof(nextval_val),"%" PRIu64, config_entry->next_range_lower);
maxval_vals[0] = maxval_val;
maxval_vals[1] = 0;
@@ -2817,8 +2822,8 @@
char highstr[16];
/* Create the exop response */
- snprintf(lowstr, sizeof(lowstr), "%llu", lower);
- snprintf(highstr, sizeof(highstr), "%llu", upper);
+ snprintf(lowstr, sizeof(lowstr), "%" PRIu64, lower);
+ snprintf(highstr, sizeof(highstr), "%" PRIu64, upper);
range_low.bv_val = lowstr;
range_low.bv_len = strlen(range_low.bv_val);
range_high.bv_val = highstr;
@@ -2846,12 +2851,12 @@
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, respdata);
/* send the response ourselves */
- send_ldap_result( pb, ret, NULL, NULL, 0, NULL );
+ slapi_send_ldap_result( pb, ret, NULL, NULL, 0, NULL );
ret = SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
ber_bvfree(respdata);
slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
- "dna_extend_exop: Released range %llu-%llu.\n",
+ "dna_extend_exop: Released range %" PRIu64 "-%" PRIu64 ".\n",
lower, upper);
}
@@ -2993,7 +2998,7 @@
*lower = *upper - release + 1;
/* try to set the new maxval in the config entry */
- snprintf(max_value, sizeof(max_value),"%llu", (*lower - 1));
+ snprintf(max_value, sizeof(max_value),"%" PRIu64, (*lower - 1));
/* set up our replace modify operation */
replace_val[0] = max_value;
@@ -3092,11 +3097,11 @@
printf("<---- filter ---------> %s\n", entry->filter);
printf("<---- prefix ---------> %s\n", entry->prefix);
printf("<---- scope ----------> %s\n", entry->scope);
- printf("<---- next value -----> %llu\n", entry->nextval);
- printf("<---- max value ------> %llu\n", entry->maxval);
- printf("<---- interval -------> %llu\n", entry->interval);
+ printf("<---- next value -----> %" PRIu64 "\n", entry->nextval);
+ printf("<---- max value ------> %" PRIu64 "\n", entry->maxval);
+ printf("<---- interval -------> %" PRIu64 "\n", entry->interval);
printf("<---- generate flag --> %s\n", entry->generate);
printf("<---- shared cfg base > %s\n", entry->shared_cfg_base);
printf("<---- shared cfg DN --> %s\n", entry->shared_cfg_dn);
- printf("<---- threshold -----> %llu", entry->threshold);
+ printf("<---- threshold ------> %" PRIu64 "", entry->threshold);
}
15 years, 6 months
[Fedora-directory-commits] ldapserver configure.ac, 1.50, 1.51 aclocal.m4, 1.71, 1.72 configure, 1.88, 1.89 config.h.in, 1.18, 1.19 missing, 1.53, 1.54 install-sh, 1.53, 1.54 depcomp, 1.53, 1.54 compile, 1.48, 1.49 config.sub, 1.52, 1.53 config.guess, 1.52, 1.53 Makefile.in, 1.93, 1.94
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver
Modified Files:
configure.ac aclocal.m4 configure config.h.in missing
install-sh depcomp compile config.sub config.guess Makefile.in
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- configure.ac 23 Sep 2008 21:50:25 -0000 1.50
+++ configure.ac 8 Oct 2008 17:29:00 -0000 1.51
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
# This version is the version returned by ns-slapd -v
-AC_INIT([dirsrv], [1.1.3], [http://bugzilla.redhat.com/])
+AC_INIT([dirsrv], [1.1.4], [http://bugzilla.redhat.com/])
# AC_CONFIG_HEADER must be called right after AC_INIT.
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
@@ -21,7 +21,7 @@
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- configure 23 Sep 2008 21:50:25 -0000 1.88
+++ configure 8 Oct 2008 17:29:00 -0000 1.89
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for dirsrv 1.1.3.
+# Generated by GNU Autoconf 2.59 for dirsrv 1.1.4.
#
# Report bugs to <http://bugzilla.redhat.com/>.
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='dirsrv'
PACKAGE_TARNAME='dirsrv'
-PACKAGE_VERSION='1.1.3'
-PACKAGE_STRING='dirsrv 1.1.3'
+PACKAGE_VERSION='1.1.4'
+PACKAGE_STRING='dirsrv 1.1.4'
PACKAGE_BUGREPORT='http://bugzilla.redhat.com/'
# Factoring default headers for most tests.
@@ -954,7 +954,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dirsrv 1.1.3 to adapt to many kinds of systems.
+\`configure' configures dirsrv 1.1.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1020,7 +1020,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dirsrv 1.1.3:";;
+ short | recursive ) echo "Configuration of dirsrv 1.1.4:";;
esac
cat <<\_ACEOF
@@ -1203,7 +1203,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-dirsrv configure 1.1.3
+dirsrv configure 1.1.4
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1217,7 +1217,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dirsrv $as_me 1.1.3, which was
+It was created by dirsrv $as_me 1.1.4, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1863,7 +1863,7 @@
# Define the identity of the package.
PACKAGE='dirsrv'
- VERSION='1.1.3'
+ VERSION='1.1.4'
cat >>confdefs.h <<_ACEOF
@@ -19369,7 +19369,8 @@
-for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h
+
+for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -25795,7 +25796,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by dirsrv $as_me 1.1.3, which was
+This file was extended by dirsrv $as_me 1.1.4, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25858,7 +25859,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-dirsrv config.status 1.1.3
+dirsrv config.status 1.1.4
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl aclparse.c, 1.11, 1.12 aclutil.c, 1.8, 1.9
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/acl
Modified Files:
aclparse.c aclutil.c
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: aclparse.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- aclparse.c 24 Oct 2007 18:41:15 -0000 1.11
+++ aclparse.c 8 Oct 2008 17:29:01 -0000 1.12
@@ -936,8 +936,8 @@
* eg. "'ldap:///all"' or 'ldap:///all")' then exit in_dn_expr mode.
*/
if ( in_dn_expr && (word[len-1] == '"' ||
- len>1 && word[len-2] == '"' ||
- len>2 && word[len-3] == '"')) {
+ (len>1 && word[len-2] == '"') ||
+ (len>2 && word[len-3] == '"')) ) {
in_dn_expr = 0;
}
@@ -1692,7 +1692,7 @@
if ((str = strstr(s , "del=")) || ((str = strstr(s , "del ="))) ) {
str--;
*str = '\0';
- *str++;
+ str++;
}
@@ -1704,7 +1704,7 @@
if ((str = strstr(s , "add=")) || ((str = strstr(s , "add ="))) ) {
str--;
*str = '\0';
- *str++;
+ str++;
}
} else {
return(ACL_SYNTAX_ERR);
Index: aclutil.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclutil.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- aclutil.c 18 Oct 2007 00:08:27 -0000 1.8
+++ aclutil.c 8 Oct 2008 17:29:01 -0000 1.9
@@ -1328,13 +1328,14 @@
PLHashNumber key,
char *value){
char *old_value = NULL;
+ uintptr_t pkey = (uintptr_t)key;
if ( (old_value = (char *)acl_ht_lookup( acl_ht, key)) != NULL ) {
acl_ht_remove( acl_ht, key);
slapi_ch_free((void **)&old_value);
}
- PL_HashTableAdd( acl_ht, (const void *)key, value);
+ PL_HashTableAdd( acl_ht, (const void *)pkey, value);
}
/*
@@ -1349,7 +1350,7 @@
static PLHashNumber acl_ht_hash( const void *key) {
- return( (PLHashNumber)key );
+ return( (PLHashNumber)((uintptr_t)key) );
}
/* Free all the values in the ht */
@@ -1397,14 +1398,14 @@
/* remove this entry from the ht--doesn't free the value.*/
void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key) {
- PL_HashTableRemove( acl_ht, (const void *)key);
+ PL_HashTableRemove( acl_ht, (const void *)((uintptr_t)key) );
}
/* Retrieve a pointer to the value of the entry with key */
void *acl_ht_lookup( acl_ht_t *acl_ht,
PLHashNumber key) {
- return( PL_HashTableLookup( acl_ht, (const void *)key) );
+ return( PL_HashTableLookup( acl_ht, (const void *)((uintptr_t)key)) );
}
15 years, 6 months
[Fedora-directory-commits] ldapserver/include/ldaputil certmap.h, 1.5, 1.6
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/include/ldaputil
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/include/ldaputil
Modified Files:
certmap.h
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: certmap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/include/ldaputil/certmap.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- certmap.h 10 Nov 2006 23:44:25 -0000 1.5
+++ certmap.h 8 Oct 2008 17:29:01 -0000 1.6
@@ -61,6 +61,8 @@
LDAPU_STR_MAX_INDEX
};
+#ifdef DEFINE_LDAPU_STRINGS
+/* used only in certmap.c and ldaputil.c */
static char *ldapu_strings[] = {
"objectclass=*", /* LDAPU_STR_DEFAULT */
"uid=%s", /* LDAPU_STR_FILTER_USER */
@@ -71,7 +73,8 @@
"userCertificate;binary", /* LDAPU_STR_ATTR_CERT */
"userCertificate" /* LDAPU_STR_ATTR_CERT_NOSUBTYPE */
};
-
+#endif /* DEFINE_LDAPU_STRINGS */
+
typedef struct {
char *str;
int size;
15 years, 6 months
[Fedora-directory-commits] ldapserver/include i18n.h,1.6,1.7
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/include
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/include
Modified Files:
i18n.h
Log Message:
Bug Description: Need to address 64-bit compiler warnings - part 1
Reviewed by: nhosoi (Thanks!)
Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *.
For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t.
I removed many unused variables and some unused functions.
I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them.
I cleaned up some #defines that were defined more than once.
I commented out some unused goto labels.
Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings.
I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway.
I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr.
I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining.
There are a lot of warnings like this:
lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules
These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed.
The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well.
Platforms tested: RHEL5 x86_64, Fedora 8 i386
Flag Day: no
Doc impact: no
Index: i18n.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/include/i18n.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- i18n.h 10 Nov 2006 23:44:24 -0000 1.6
+++ i18n.h 8 Oct 2008 17:29:01 -0000 1.7
@@ -111,11 +111,11 @@
#ifdef RESOURCE_STR
#define BEGIN_STR(argLibraryName) \
- RESOURCE_TABLE argLibraryName[] = { 0, #argLibraryName,
+ RESOURCE_TABLE argLibraryName[] = { {0, #argLibraryName},
#define ResDef(argToken,argID,argString) \
- argID, argString,
+ {argID, argString},
#define END_STR(argLibraryName) \
- 0, 0 };
+ {0, 0} };
#else
#define BEGIN_STR(argLibraryName) \
enum {
15 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.9, 1.10
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25263/ldap/servers/plugins/dna
Modified Files:
dna.c
Log Message:
Resolves: 464188
Summary: Perform better config validation in the DNA plug-in.
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dna.c 24 Sep 2008 21:21:51 -0000 1.9
+++ dna.c 3 Oct 2008 04:28:21 -0000 1.10
@@ -210,7 +210,7 @@
*
*/
static int dna_load_plugin_config();
-static int dna_parse_config_entry(Slapi_Entry * e);
+static int dna_parse_config_entry(Slapi_Entry * e, int apply);
static void dna_delete_config();
static void dna_free_config_entry(struct configEntry ** entry);
static int dna_load_host_port();
@@ -617,9 +617,10 @@
}
for (i = 0; (entries[i] != NULL); i++) {
- status = dna_parse_config_entry(entries[i]);
- if (DNA_SUCCESS != status)
- break;
+ /* We don't care about the status here because we may have
+ * some invalid config entries, but we just want to continue
+ * looking for valid ones. */
+ dna_parse_config_entry(entries[i], 1);
}
cleanup:
@@ -632,22 +633,43 @@
return status;
}
+/*
+ * dna_parse_config_entry()
+ *
+ * Parses a single config entry. If apply is non-zero, then
+ * we will load and start using the new config. You can simply
+ * validate config without making any changes by setting apply
+ * to 0.
+ *
+ * Returns DNA_SUCCESS if the entry is valid and DNA_FAILURE
+ * if it is invalid.
+ */
static int
-dna_parse_config_entry(Slapi_Entry * e)
+dna_parse_config_entry(Slapi_Entry * e, int apply)
{
char *value;
- struct configEntry *entry;
+ struct configEntry *entry = NULL;
struct configEntry *config_entry;
PRCList *list;
int entry_added = 0;
+ int ret = DNA_SUCCESS;
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_parse_config_entry\n");
+ /* If this is the main DNA plug-in
+ * config entry, just bail. */
+ if (strcasecmp(getPluginDN(), slapi_entry_get_ndn(e)) == 0) {
+ ret = DNA_FAILURE;
+ goto bail;
+ }
+
entry = (struct configEntry *)
slapi_ch_calloc(1, sizeof(struct configEntry));
- if (NULL == entry)
+ if (NULL == entry) {
+ ret = DNA_FAILURE;
goto bail;
+ }
value = slapi_entry_get_ndn(e);
if (value) {
@@ -660,8 +682,14 @@
value = slapi_entry_attr_get_charptr(e, DNA_TYPE);
if (value) {
entry->type = value;
- } else
+ } else {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: The %s config "
+ "setting is required for range %s.\n",
+ DNA_TYPE, entry->dn);
+ ret = DNA_FAILURE;
goto bail;
+ }
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_TYPE, entry->type, 0, 0);
@@ -670,8 +698,14 @@
if (value) {
entry->nextval = strtoull(value, 0, 0);
slapi_ch_free_string(&value);
- } else
+ } else {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: The %s config "
+ "setting is required for range %s.\n",
+ DNA_NEXTVAL, entry->dn);
+ ret = DNA_FAILURE;
goto bail;
+ }
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%llu]\n", DNA_NEXTVAL, entry->nextval, 0,
@@ -699,8 +733,7 @@
if (value) {
entry->interval = strtoull(value, 0, 0);
slapi_ch_free_string(&value);
- } else
- goto bail;
+ }
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%llu]\n", DNA_INTERVAL, entry->interval, 0, 0);
@@ -722,9 +755,15 @@
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM ,
"Error: Invalid search filter in entry [%s]: [%s]\n",
entry->dn, value);
+ ret = DNA_FAILURE;
goto bail;
}
} else {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: The %s config "
+ "setting is required for range %s.\n",
+ DNA_FILTER, entry->dn);
+ ret = DNA_FAILURE;
goto bail;
}
@@ -733,7 +772,16 @@
value = slapi_entry_attr_get_charptr(e, DNA_SCOPE);
if (value) {
+ /* TODO - Allow multiple scope settings for a single range. This may
+ * make ordering the scopes tough when we put them in the clist. */
entry->scope = slapi_dn_normalize(value);
+ } else {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: The %s config "
+ "config setting is required for range %s.\n",
+ DNA_SCOPE, entry->dn);
+ ret = DNA_FAILURE;
+ goto bail;
}
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
@@ -744,15 +792,14 @@
value = slapi_entry_attr_get_charptr(e, DNA_MAXVAL);
if (value) {
entry->maxval = strtoull(value, 0, 0);
-
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%llu]\n", DNA_MAXVAL, value, 0, 0);
-
slapi_ch_free_string(&value);
} else {
entry->maxval = -1;
}
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "----------> %s [%llu]\n", DNA_MAXVAL, entry->maxval, 0, 0);
+
value = slapi_entry_attr_get_charptr(e, DNA_SHARED_CFG_DN);
if (value) {
Slapi_Entry *shared_e = NULL;
@@ -772,6 +819,7 @@
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Unable to locate "
"shared configuration entry (%s)\n", value);
+ ret = DNA_FAILURE;
goto bail;
} else {
slapi_entry_free(shared_e);
@@ -803,19 +851,21 @@
entry->threshold = 1;
}
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "----------> %s [%llu]\n", DNA_THRESHOLD, entry->threshold, 0, 0);
+
value = slapi_entry_attr_get_charptr(e, DNA_RANGE_REQUEST_TIMEOUT);
if (value) {
entry->timeout = strtoull(value, 0, 0);
-
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%llu]\n", DNA_RANGE_REQUEST_TIMEOUT,
- value, 0, 0);
-
slapi_ch_free_string(&value);
} else {
entry->timeout = DNA_DEFAULT_TIMEOUT;
}
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "----------> %s [%llu]\n", DNA_RANGE_REQUEST_TIMEOUT,
+ entry->timeout, 0, 0);
+
value = slapi_entry_attr_get_charptr(e, DNA_NEXT_RANGE);
if (value) {
char *p = NULL;
@@ -831,16 +881,47 @@
if (entry->next_range_upper <= entry->next_range_lower) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Illegal %s "
- "setting specified for range %s.\n",
+ "setting specified for range %s. Legal "
+ "format is <lower>-<upper>.\n",
DNA_NEXT_RANGE, entry->dn);
+ ret = DNA_FAILURE;
entry->next_range_lower = 0;
entry->next_range_upper = 0;
}
+
+ /* make sure next range doesn't overlap with
+ * the active range */
+ if (((entry->next_range_upper <= entry->maxval) &&
+ (entry->next_range_upper >= entry->nextval)) ||
+ ((entry->next_range_lower <= entry->maxval) &&
+ (entry->next_range_lower >= entry->nextval))) {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: Illegal %s "
+ "setting specified for range %s. %s "
+ "overlaps with the active range.\n",
+ DNA_NEXT_RANGE, entry->dn, DNA_NEXT_RANGE);
+ ret = DNA_FAILURE;
+ entry->next_range_lower = 0;
+ entry->next_range_upper = 0;
+ }
+ } else {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: Illegal %s "
+ "setting specified for range %s. Legal "
+ "format is <lower>-<upper>.\n",
+ DNA_NEXT_RANGE, entry->dn);
+ ret = DNA_FAILURE;
}
slapi_ch_free_string(&value);
}
+ /* If we were only called to validate config, we can
+ * just bail out before applying the config changes */
+ if (apply == 0) {
+ goto bail;
+ }
+
/* Calculate number of remaining values. */
if (entry->next_range_lower != 0) {
entry->remaining = ((entry->next_range_upper - entry->next_range_lower + 1) /
@@ -856,6 +937,10 @@
/* create the new value lock for this range */
entry->lock = slapi_new_mutex();
if (!entry->lock) {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: Unable to create lock "
+ "for range %s.\n", entry->dn);
+ ret = DNA_FAILURE;
goto bail;
}
@@ -912,8 +997,12 @@
bail:
if (0 == entry_added) {
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
- "config entry [%s] skipped\n", entry->dn, 0, 0);
+ /* Don't log error if we weren't asked to apply config */
+ if ((apply != 0) && (entry != NULL)) {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry: Invalid config entry "
+ "[%s] skipped\n", entry->dn, 0, 0);
+ }
dna_free_config_entry(&entry);
} else {
time_t now;
@@ -925,12 +1014,14 @@
* performing the operation now would cause the
* change to not get changelogged. */
slapi_eq_once(dna_update_config_event, entry, now + 30);
+
+ ret = DNA_SUCCESS;
}
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_parse_config_entry\n");
- return DNA_SUCCESS;
+ return ret;
}
static void
@@ -938,6 +1029,9 @@
{
struct configEntry *e = *entry;
+ if (e == NULL)
+ return;
+
if (e->dn) {
slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
"freeing config entry [%s]\n", e->dn, 0, 0);
@@ -2396,9 +2490,6 @@
if (0 == (dn = dna_get_dn(pb)))
goto bail;
- if (dna_dn_is_config(dn))
- goto bail;
-
if (LDAP_CHANGETYPE_ADD == modtype) {
slapi_pblock_get(pb, SLAPI_ADD_ENTRY, &e);
} else {
@@ -2431,6 +2522,34 @@
if (0 == e)
goto bailmod;
+ if (dna_dn_is_config(dn)) {
+ /* Validate config changes, but don't apply them.
+ * This allows us to reject invalid config changes
+ * here at the pre-op stage. Applying the config
+ * needs to be done at the post-op stage. */
+ if (smods) {
+ if (slapi_entry_apply_mods(e, mods) != LDAP_SUCCESS) {
+ /* The mods don't apply cleanly, so we just let this op go
+ * to let the main server handle it. */
+ goto bailmod;
+ }
+ }
+
+ if (dna_parse_config_entry(e, 0) != DNA_SUCCESS) {
+ /* Refuse the operation if config parsing failed. */
+ ret = LDAP_UNWILLING_TO_PERFORM;
+ if (LDAP_CHANGETYPE_ADD == modtype) {
+ errstr = slapi_ch_smprintf("Not a valid DNA configuration entry.");
+ } else {
+ errstr = slapi_ch_smprintf("Changes result in an invalid "
+ "DNA configuration.");
+ }
+ }
+
+ /* We're done, so just bail. */
+ goto bailmod;
+ }
+
dna_read_lock();
if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
15 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd entry.c, 1.17, 1.18 slapi-plugin.h, 1.30, 1.31 slapi-private.h, 1.26, 1.27
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25263/ldap/servers/slapd
Modified Files:
entry.c slapi-plugin.h slapi-private.h
Log Message:
Resolves: 464188
Summary: Perform better config validation in the DNA plug-in.
Index: entry.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- entry.c 24 Sep 2008 21:21:52 -0000 1.17
+++ entry.c 3 Oct 2008 04:28:22 -0000 1.18
@@ -2578,6 +2578,12 @@
* Apply a set of modifications to an entry
*/
int
+slapi_entry_apply_mods( Slapi_Entry *e, LDAPMod **mods )
+{
+ return entry_apply_mods(e, mods);
+}
+
+int
entry_apply_mods( Slapi_Entry *e, LDAPMod **mods )
{
int err, j;
Index: slapi-plugin.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- slapi-plugin.h 24 Sep 2008 21:21:52 -0000 1.30
+++ slapi-plugin.h 3 Oct 2008 04:28:22 -0000 1.31
@@ -278,6 +278,7 @@
int slapi_entry_add_string(Slapi_Entry *e, const char *type, const char *value);
int slapi_entry_delete_string(Slapi_Entry *e, const char *type, const char *value);
void slapi_entry_diff(Slapi_Mods *smods, Slapi_Entry *e1, Slapi_Entry *e2, int diff_ctrl);
+int slapi_entry_apply_mods(Slapi_Entry *e, LDAPMod **mods);
/*
Index: slapi-private.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- slapi-private.h 27 Aug 2008 21:47:00 -0000 1.26
+++ slapi-private.h 3 Oct 2008 04:28:22 -0000 1.27
@@ -315,7 +315,7 @@
int entry_add_deleted_attribute_wsi(Slapi_Entry *e, Slapi_Attr *a);
/*
- * slapi_entry_apply_mods_wsi is similar to slapi_entry_apply_mods. It also
+ * entry_apply_mods_wsi is similar to entry_apply_mods. It also
* handles the state storage information. "csn" is the CSN associated with
* this modify operation.
*/
15 years, 6 months