|
|
dc8c34 |
From 04b1ecd63235370143f3239301f26be69e5c961c Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Noriko Hosoi <nhosoi@redhat.com>
|
|
|
dc8c34 |
Date: Tue, 22 Jul 2014 11:50:57 -0700
|
|
|
dc8c34 |
Subject: [PATCH 237/243] Ticket #47863 - New defects found in
|
|
|
dc8c34 |
389-ds-base-1.2.11
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Description:
|
|
|
dc8c34 |
* Compiler Warnings
|
|
|
dc8c34 |
1-11. Defect type: COMPILER_WARNING
|
|
|
dc8c34 |
389-ds-base-1.2.11.15/ldap/servers/slapd/libglobs.c
|
|
|
dc8c34 |
Casted to (long long int) to adjust to the format %lld.
|
|
|
dc8c34 |
- ..., LONG_MAX );
|
|
|
dc8c34 |
+ ..., (long long int)LONG_MAX );
|
|
|
dc8c34 |
Note: this is a partial backport of ticket #47450 from the master branch.
|
|
|
dc8c34 |
(cherry picked from commit 502629aac8591808ff89e91bd76e626870967105)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/slapd/libglobs.c | 30 ++++++++++++++++--------------
|
|
|
dc8c34 |
1 file changed, 16 insertions(+), 14 deletions(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
|
|
|
dc8c34 |
index b7dadcd..6711534 100644
|
|
|
dc8c34 |
--- a/ldap/servers/slapd/libglobs.c
|
|
|
dc8c34 |
+++ b/ldap/servers/slapd/libglobs.c
|
|
|
dc8c34 |
@@ -1288,7 +1288,7 @@ config_set_disk_threshold( const char *attrname, char *value, char *errorbuf, in
|
|
|
dc8c34 |
if ( *endp != '\0' || threshold <= 4096 || errno == ERANGE ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
dc8c34 |
"%s: \"%s\" is invalid, threshold must be greater than 4096 and less then %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -1786,7 +1786,7 @@ config_set_sizelimit( const char *attrname, char *value, char *errorbuf, int app
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || sizelimit < -1 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: \"%s\" is invalid, sizelimit must range from -1 to %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -1830,7 +1830,7 @@ config_set_pagedsizelimit( const char *attrname, char *value, char *errorbuf, in
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || pagedsizelimit < -1 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: \"%s\" is invalid, pagedsizelimit must range from -1 to %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -2593,7 +2593,7 @@ config_set_pw_gracelimit( const char *attrname, char *value, char *errorbuf, int
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || gracelimit < 0 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
dc8c34 |
"password grace limit \"%s\" is invalid, password grace limit must range from 0 to %lld",
|
|
|
dc8c34 |
- value , LONG_MAX );
|
|
|
dc8c34 |
+ value , (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -3322,7 +3322,7 @@ config_set_ioblocktimeout( const char *attrname, char *value, char *errorbuf, in
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || nValue < 0 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: invalid value \"%s\", I/O block timeout must range from 0 to %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -3364,7 +3364,7 @@ config_set_idletimeout( const char *attrname, char *value, char *errorbuf, int a
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if (*endp != '\0' || errno == ERANGE || nValue < 0 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: invalid value \"%s\", idle timeout must range from 0 to %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -3466,10 +3466,10 @@ config_set_timelimit( const char *attrname, char *value, char *errorbuf, int app
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || nVal < -1 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
dc8c34 |
- "%s: invalid value \"%s\", time limit must range from -1 to %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
- retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
- return retVal;
|
|
|
dc8c34 |
+ "%s: invalid value \"%s\", time limit must range from -1 to %lld",
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
+ retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
+ return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( apply ) {
|
|
|
dc8c34 |
@@ -3663,7 +3663,7 @@ config_set_pw_warning( const char *attrname, char *value, char *errorbuf, int ap
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
dc8c34 |
"%s: password warning age \"%s\" is invalid, password warning "
|
|
|
dc8c34 |
"age must range from 0 to %lld seconds",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -3693,7 +3693,8 @@ config_set_errorlog_level( const char *attrname, char *value, char *errorbuf, in
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || level < 0 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: error log level \"%s\" is invalid,"
|
|
|
dc8c34 |
- " error log level must range from 0 to %lld", attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ " error log level must range from 0 to %lld",
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -3731,7 +3732,8 @@ config_set_accesslog_level( const char *attrname, char *value, char *errorbuf, i
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if ( *endp != '\0' || errno == ERANGE || level < 0 ) {
|
|
|
dc8c34 |
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: access log level \"%s\" is invalid,"
|
|
|
dc8c34 |
- " access log level must range from 0 to %lld", attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ " access log level must range from 0 to %lld",
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
retVal = LDAP_OPERATIONS_ERROR;
|
|
|
dc8c34 |
return retVal;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -5096,7 +5098,7 @@ config_set_maxsasliosize( const char *attrname, char *value, char *errorbuf, int
|
|
|
dc8c34 |
if (retVal != LDAP_SUCCESS) {
|
|
|
dc8c34 |
PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
dc8c34 |
"%s: \"%s\" is invalid. Value must range from -1 to %lld",
|
|
|
dc8c34 |
- attrname, value, LONG_MAX );
|
|
|
dc8c34 |
+ attrname, value, (long long int)LONG_MAX );
|
|
|
dc8c34 |
} else if (apply) {
|
|
|
dc8c34 |
CFG_LOCK_WRITE(slapdFrontendConfig);
|
|
|
dc8c34 |
slapdFrontendConfig->maxsasliosize = maxsasliosize;
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.8.1.4
|
|
|
dc8c34 |
|