Branch '389-ds-base-1.3.1' - include/base include/i18n.h include/libaccess include/public ldap/servers lib/base lib/ldaputil lib/libaccess lib/libadmin lib/libsi18n
by Mark Reynolds
include/base/ereport.h | 4 ++--
include/base/file.h | 2 +-
include/i18n.h | 6 +++---
include/libaccess/acl.h | 4 ++--
include/libaccess/aclerror.h | 2 +-
include/libaccess/aclproto.h | 4 ++--
include/libaccess/las.h | 2 +-
include/libaccess/nsautherr.h | 2 +-
include/libaccess/nserror.h | 2 +-
include/libaccess/symbols.h | 4 ++--
include/public/nsacl/aclapi.h | 9 +++++----
include/public/nsacl/acldef.h | 2 +-
ldap/servers/plugins/posix-winsync/posix-group-func.c | 4 +---
ldap/servers/plugins/replication/repl-session-plugin.h | 4 ----
ldap/servers/plugins/replication/winsync-plugin.h | 4 ----
ldap/servers/slapd/saslbind.c | 10 +++++++++-
ldap/servers/slapd/slapi-plugin.h | 17 ++++++-----------
lib/base/file.cpp | 4 ++--
lib/base/util.cpp | 10 +++++-----
lib/ldaputil/cert.c | 12 +++++++++---
lib/libaccess/acl.tab.cpp | 2 +-
lib/libaccess/aclerror.cpp | 4 ++--
lib/libaccess/acleval.cpp | 4 ++--
lib/libaccess/aclspace.cpp | 4 ++--
lib/libaccess/acltext.y | 2 +-
lib/libaccess/acltools.cpp | 10 +++++-----
lib/libaccess/lasip.cpp | 8 ++++----
lib/libaccess/nsautherr.cpp | 12 ++++++------
lib/libaccess/oneeval.cpp | 12 ++++++------
lib/libaccess/symbols.cpp | 4 ++--
lib/libadmin/error.c | 2 +-
lib/libsi18n/getstrprop.c | 12 ++++++------
32 files changed, 92 insertions(+), 92 deletions(-)
New commits:
commit 926cf1d051ebc866204b90d7421326516ccbbbd2
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 30 13:09:53 2013 -0400
Ticket 47440 - Fix compilation warnings and header files
Original patches submitted by: lslebodn(Thanks!!)
https://fedorahosted.org/389/ticket/47440
Reviewed by: richm(Thanks!)
(cherry picked from commit 29a1a2d0a7780d22a0724955370cbc4a0e6e6023)
diff --git a/include/base/ereport.h b/include/base/ereport.h
index e97be14..40813ea 100644
--- a/include/base/ereport.h
+++ b/include/base/ereport.h
@@ -65,13 +65,13 @@ NSPR_BEGIN_EXTERN_C
* the current date.
*/
-NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...)
+NSAPI_PUBLIC int INTereport(int degree, const char *fmt, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)));
#else
;
#endif
-NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args);
+NSAPI_PUBLIC int INTereport_v(int degree, const char *fmt, va_list args);
NSPR_END_EXTERN_C
diff --git a/include/base/file.h b/include/base/file.h
index fa53eb5..6ad9fc7 100644
--- a/include/base/file.h
+++ b/include/base/file.h
@@ -103,7 +103,7 @@ NSAPI_PUBLIC void INTfile_unix2local(char *path, char *p2);
NSAPI_PUBLIC int INTsystem_nocoredumps(void);
NSAPI_PUBLIC int INTfile_setinherit(SYS_FILE fd, int value);
NSAPI_PUBLIC int INTfile_notfound(void);
-NSAPI_PUBLIC char *INTsystem_errmsg(void);
+NSAPI_PUBLIC const char *INTsystem_errmsg(void);
NSAPI_PUBLIC int INTsystem_errmsg_fn(char **buff, size_t maxlen);
NSPR_END_EXTERN_C
diff --git a/include/i18n.h b/include/i18n.h
index 2d53b20..d73e604 100644
--- a/include/i18n.h
+++ b/include/i18n.h
@@ -172,9 +172,9 @@ extern "C"
/******************************/
NSAPI_PUBLIC
-extern char*
-XP_GetStringFromDatabase(char* strLibraryName,
- char* strLanguage,
+extern const char*
+XP_GetStringFromDatabase(const char* strLibraryName,
+ const char* strLanguage,
int iToken);
#ifdef __cplusplus
diff --git a/include/libaccess/acl.h b/include/libaccess/acl.h
index c3f61ea..8242935 100644
--- a/include/libaccess/acl.h
+++ b/include/libaccess/acl.h
@@ -67,8 +67,8 @@
NSPR_BEGIN_EXTERN_C
-extern char *generic_rights[];
-extern char *http_generic[];
+extern const char *generic_rights[];
+extern const char *http_generic[];
NSPR_END_EXTERN_C
diff --git a/include/libaccess/aclerror.h b/include/libaccess/aclerror.h
index b8214b3..3aff2c7 100644
--- a/include/libaccess/aclerror.h
+++ b/include/libaccess/aclerror.h
@@ -45,7 +45,7 @@
/* ACL facility name string (in aclbuild.c) */
NSPR_BEGIN_EXTERN_C
-extern char * ACL_Program;
+extern const char * ACL_Program;
NSPR_END_EXTERN_C
/* Define error identifiers */
diff --git a/include/libaccess/aclproto.h b/include/libaccess/aclproto.h
index fe6545c..4579e8d 100644
--- a/include/libaccess/aclproto.h
+++ b/include/libaccess/aclproto.h
@@ -67,12 +67,12 @@ NSAPI_PUBLIC ACLExprHandle_t *ACL_ExprNew(const ACLExprType_t expr_type);
NSAPI_PUBLIC void ACL_ExprDestroy(ACLExprHandle_t *expr);
NSAPI_PUBLIC int ACL_ExprSetPFlags(NSErr_t *errp, ACLExprHandle_t *expr, PFlags_t flags);
NSAPI_PUBLIC int ACL_ExprClearPFlags(NSErr_t *errp, ACLExprHandle_t *expr);
-NSAPI_PUBLIC int ACL_ExprTerm(NSErr_t *errp, ACLExprHandle_t *acl_expr, char *attr_name, CmpOp_t cmp, char *attr_pattern);
+NSAPI_PUBLIC int ACL_ExprTerm(NSErr_t *errp, ACLExprHandle_t *acl_expr, const char *attr_name, CmpOp_t cmp, char *attr_pattern);
NSAPI_PUBLIC int ACL_ExprNot(NSErr_t *errp, ACLExprHandle_t *acl_expr);
NSAPI_PUBLIC int ACL_ExprAnd(NSErr_t *errp, ACLExprHandle_t *acl_expr);
NSAPI_PUBLIC int ACL_ExprOr(NSErr_t *errp, ACLExprHandle_t *acl_expr);
NSAPI_PUBLIC int ACL_ExprAddAuthInfo(ACLExprHandle_t *expr, PList_t auth_info);
-NSAPI_PUBLIC int ACL_ExprAddArg(NSErr_t *errp, ACLExprHandle_t *expr, char *arg);
+NSAPI_PUBLIC int ACL_ExprAddArg(NSErr_t *errp, ACLExprHandle_t *expr, const char *arg);
NSAPI_PUBLIC int ACL_ExprSetDenyWith(NSErr_t *errp, ACLExprHandle_t *expr, char *deny_type, char *deny_response);
NSAPI_PUBLIC int ACL_ExprGetDenyWith(NSErr_t *errp, ACLExprHandle_t *expr, char **deny_type, char **deny_response);
diff --git a/include/libaccess/las.h b/include/libaccess/las.h
index 2e5673d..f2f4f33 100644
--- a/include/libaccess/las.h
+++ b/include/libaccess/las.h
@@ -74,7 +74,7 @@ struct ACLAttrGetter {
NSPR_BEGIN_EXTERN_C
NSAPI_PUBLIC extern int
- ACL_LasRegister(NSErr_t *errp, char *attr_name, LASEvalFunc_t
+ ACL_LasRegister(NSErr_t *errp, const char *attr_name, LASEvalFunc_t
eval_func, LASFlushFunc_t flush_func);
NSAPI_PUBLIC extern int
ACL_LasFindEval(NSErr_t *errp, char *attr_name, LASEvalFunc_t
diff --git a/include/libaccess/nsautherr.h b/include/libaccess/nsautherr.h
index 325e037..2e36fce 100644
--- a/include/libaccess/nsautherr.h
+++ b/include/libaccess/nsautherr.h
@@ -120,7 +120,7 @@
NSPR_BEGIN_EXTERN_C
/* Authentication facility name in nsuser.c */
-extern char * NSAuth_Program;
+extern const char * NSAuth_Program;
/* Functions in nsautherr.c */
extern NSAPI_PUBLIC void nsadbErrorFmt(NSErr_t * errp,
diff --git a/include/libaccess/nserror.h b/include/libaccess/nserror.h
index f6b5ef2..c03ca7c 100644
--- a/include/libaccess/nserror.h
+++ b/include/libaccess/nserror.h
@@ -71,7 +71,7 @@ extern void nserrDispose(NSErr_t * errp);
extern NSEFrame_t * nserrFAlloc(NSErr_t * errp);
extern void nserrFFree(NSErr_t * errp, NSEFrame_t * efp);
extern NSEFrame_t * nserrGenerate(NSErr_t * errp, long retcode, long errorid,
- char * program, int errc, ...);
+ const char * program, int errc, ...);
/* Functions in nserrmsg.c */
extern char * nserrMessage(NSEFrame_t * efp, int flags);
diff --git a/include/libaccess/symbols.h b/include/libaccess/symbols.h
index 73d04a4..f56b934 100644
--- a/include/libaccess/symbols.h
+++ b/include/libaccess/symbols.h
@@ -97,7 +97,7 @@ static void symFreeTable(void * pool, void * item);
typedef struct Symbol_s Symbol_t;
struct Symbol_s {
- char * sym_name; /* pointer to symbol name string */
+ const char * sym_name; /* pointer to symbol name string */
int sym_type; /* symbol type */
void *sym_data; /* symbol data storage */
};
@@ -127,7 +127,7 @@ extern void symTableEnumerate(void * table, void * argp,
int (*func)(Symbol_t * sym, void * parg));
#endif /* UnixWare */
-extern int symTableFindSym(void * table, char * symname,
+extern int symTableFindSym(void * table, const char * symname,
int symtype, void **psymref);
extern int symTableNew(void **ptable);
diff --git a/include/public/nsacl/aclapi.h b/include/public/nsacl/aclapi.h
index 617cabf..3b2f641 100644
--- a/include/public/nsacl/aclapi.h
+++ b/include/public/nsacl/aclapi.h
@@ -78,7 +78,7 @@ struct ACLDispatchVector {
NSEFrame_t *(*f_nserrFAlloc)(NSErr_t * errp);
void (*f_nserrFFree)(NSErr_t * errp, NSEFrame_t * efp);
NSEFrame_t *(*f_nserrGenerate)(NSErr_t * errp, long retcode,
- long errorid, char * program,
+ long errorid, const char * program,
int errc, ...);
/* Property list support
@@ -117,7 +117,7 @@ struct ACLDispatchVector {
/* ACL attribute handling */
- int (*f_ACL_LasRegister)(NSErr_t *errp, char *attr_name,
+ int (*f_ACL_LasRegister)(NSErr_t *errp, const char *attr_name,
LASEvalFunc_t eval_func,
LASFlushFunc_t flush_func);
@@ -202,12 +202,13 @@ struct ACLDispatchVector {
ACLExprHandle_t *expr, PFlags_t flags);
int (*f_ACL_ExprClearPFlags)(NSErr_t *errp, ACLExprHandle_t *expr);
int (*f_ACL_ExprTerm)(NSErr_t *errp, ACLExprHandle_t *acl_expr,
- char *attr_name, CmpOp_t cmp, char *attr_pattern);
+ const char *attr_name, CmpOp_t cmp,
+ char *attr_pattern);
int (*f_ACL_ExprNot)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
int (*f_ACL_ExprAnd)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
int (*f_ACL_ExprOr)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
int (*f_ACL_ExprAddAuthInfo)(ACLExprHandle_t *expr, PList_t auth_info);
- int (*f_ACL_ExprAddArg)(NSErr_t *errp, ACLExprHandle_t *expr, char *arg);
+ int (*f_ACL_ExprAddArg)(NSErr_t *errp, ACLExprHandle_t *expr, const char *arg);
int (*f_ACL_ExprSetDenyWith)(NSErr_t *errp, ACLExprHandle_t *expr,
char *deny_type, char *deny_response);
int (*f_ACL_ExprGetDenyWith)(NSErr_t *errp, ACLExprHandle_t *expr,
diff --git a/include/public/nsacl/acldef.h b/include/public/nsacl/acldef.h
index b3e9f4d..dd2846f 100644
--- a/include/public/nsacl/acldef.h
+++ b/include/public/nsacl/acldef.h
@@ -429,7 +429,7 @@ typedef struct ldap LDAP;
#ifdef ALLOCATE_ATTR_TABLE
/* Must be in the same order as the index numbers */
-char *ACLAttrTable[] = {
+const char *ACLAttrTable[] = {
NULL, /* 0 */
/* Don't have one numbered 0 */
ACL_ATTR_GROUP, /* 1 */
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c
index 7e069be..664d637 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
@@ -17,11 +17,9 @@
$Id: posix-group-func.c 28 2011-05-13 14:35:29Z grzemba $
*/
-#include "slapi-plugin.h"
-#include "slapi-private.h"
-
#include <string.h>
#include <nspr.h>
+#include "slapi-plugin.h"
#include "posix-wsp-ident.h"
#define MAX_RECURSION_DEPTH (5)
diff --git a/ldap/servers/plugins/replication/repl-session-plugin.h b/ldap/servers/plugins/replication/repl-session-plugin.h
index 1c684af..4e624f6 100644
--- a/ldap/servers/plugins/replication/repl-session-plugin.h
+++ b/ldap/servers/plugins/replication/repl-session-plugin.h
@@ -37,10 +37,6 @@
#ifndef REPL_SESSION_PLUGIN_PUBLIC_API
#define REPL_SESSION_PLUGIN_PUBLIC_API
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include "slapi-plugin.h"
/*
diff --git a/ldap/servers/plugins/replication/winsync-plugin.h b/ldap/servers/plugins/replication/winsync-plugin.h
index 0f3b757..1052207 100644
--- a/ldap/servers/plugins/replication/winsync-plugin.h
+++ b/ldap/servers/plugins/replication/winsync-plugin.h
@@ -37,10 +37,6 @@
#ifndef WINSYNC_PLUGIN_PUBLIC_API
#define WINSYNC_PLUGIN_PUBLIC_API
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
/* windows_private.c */
#include "slapi-plugin.h"
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index 9119c8a..ab096e1 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -119,7 +119,12 @@ static Slapi_ComponentId *sasl_get_component_id()
* entry from the internal database, at the same time we get any other
* properties we need - it's more efficient that way.
*/
-static void ids_auxprop_lookup(void *glob_context,
+#if SASL_AUXPROP_PLUG_VERSION > 4
+static int ids_auxprop_lookup(
+#else
+static void ids_auxprop_lookup(
+#endif
+ void *glob_context,
sasl_server_params_t *sparams,
unsigned flags,
const char *user,
@@ -127,6 +132,9 @@ static void ids_auxprop_lookup(void *glob_context,
{
/* do nothing - we don't need auxprops - we just do this to avoid
sasldb_auxprop_lookup */
+#if SASL_AUXPROP_PLUG_VERSION > 4
+ return 0;
+#endif
}
static sasl_auxprop_plug_t ids_auxprop_plugin = {
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 3e0cf74..bbad2a6 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -42,11 +42,6 @@
*
* END COPYRIGHT BLOCK */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
/*! \file slapi-plugin.h
* \brief Public Directory Server plugin interface.
*
@@ -2208,7 +2203,7 @@ int slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod *mod, int modc
/**
* Invalidate all entries in the virtual attribute cache.
*/
-void slapi_entrycache_vattrcache_watermark_invalidate();
+void slapi_entrycache_vattrcache_watermark_invalidate(void);
/*
@@ -3648,7 +3643,7 @@ void slapi_rand_array(void *randx, size_t len);
* \see slapi_rand_r()
* \see slapi_rand_array()
*/
-int slapi_rand();
+int slapi_rand(void);
/**
* Escape special characters in a search filter value
@@ -5017,7 +5012,7 @@ int slapi_attr_syntax_exists(const char *type);
* \return \c 0 if the reload was successful.
* \return non-0 if the reload failed.
*/
-int slapi_reload_internal_attr_syntax();
+int slapi_reload_internal_attr_syntax(void);
/*
* slapi_filter_apply() is used to apply a function to each simple filter
@@ -5291,7 +5286,7 @@ int slapi_apib_release(void **api);
int slapi_td_init(int indexType);
int slapi_td_set_val(int indexType, void *value);
void slapi_td_get_val(int indexType, void **value);
-int slapi_td_dn_init();
+int slapi_td_dn_init(void);
int slapi_td_set_dn(char *dn);
void slapi_td_get_dn(char **dn);
@@ -5497,7 +5492,7 @@ char *slapi_err2string(int result);
*
* \return 1 if the server is shutting down
*/
-int slapi_is_shutting_down();
+int slapi_is_shutting_down(void);
/*
* checking routines for allocating and freeing memory
@@ -6316,7 +6311,7 @@ void slapi_destroy_task(void *arg);
/* End of interface to support online tasks **********************************/
/* Slapi_Counter Interface */
-Slapi_Counter *slapi_counter_new();
+Slapi_Counter *slapi_counter_new(void);
void slapi_counter_init(Slapi_Counter *counter);
void slapi_counter_destroy(Slapi_Counter **counter);
PRUint64 slapi_counter_increment(Slapi_Counter *counter);
diff --git a/lib/base/file.cpp b/lib/base/file.cpp
index 6dc39e6..82a1852 100644
--- a/lib/base/file.cpp
+++ b/lib/base/file.cpp
@@ -613,7 +613,7 @@ with lmsg =strerror(errno);*/
return msglen;
}
-NSAPI_PUBLIC char *
+NSAPI_PUBLIC const char *
system_errmsg(void)
{
char *buff = 0;
@@ -632,7 +632,7 @@ system_errmsg(void)
}
system_errmsg_fn(&buff, errbuf_size);
if (buff == 0)
- buff = "Could not retrieve system error message";
+ return "Could not retrieve system error message";
return buff;
}
diff --git a/lib/base/util.cpp b/lib/base/util.cpp
index 01f916d..164d1a0 100644
--- a/lib/base/util.cpp
+++ b/lib/base/util.cpp
@@ -232,19 +232,19 @@ static char sccsid[] = "@(#)strftime.c 5.11 (Berkeley) 2/24/91";
#include <stdio.h>
#endif
-static char *afmt[] = {
+static const char *afmt[] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
};
-static char *Afmt[] = {
+static const char *Afmt[] = {
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday",
};
-static char *bfmt[] = {
+static const char *bfmt[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec",
};
-static char *Bfmt[] = {
+static const char *Bfmt[] = {
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December",
};
@@ -265,7 +265,7 @@ int
util_strftime(char *pt, const char *format, const struct tm *t)
{
char *start = pt;
- char *scrap;
+ const char *scrap;
for (; *format; ++format) {
if (*format == '%')
diff --git a/lib/ldaputil/cert.c b/lib/ldaputil/cert.c
index c26ff41..cc767fd 100644
--- a/lib/ldaputil/cert.c
+++ b/lib/ldaputil/cert.c
@@ -48,8 +48,9 @@
#include <sec.h>
*/
#include "prmem.h"
-#include "key.h"
-#include "cert.h"
+#include <key.h>
+#include <cert.h>
+#include <nss.h>
#include <ldaputil/certmap.h>
#include <ldaputil/errors.h>
#include <ldaputil/cert.h>
@@ -285,7 +286,12 @@ _replaceAVA (char* attr, char** avas)
}
struct _attr_getter_pair {
- char* (*getter) (CERTName* dn);
+#if NSS_VMAJOR < 3 || (NSS_VMAJOR == 3 && NSS_VMINOR < 15)
+ char* (*getter) ( CERTName* dn);
+#else
+ /* in 3.15.x "const" was added to the declarations */
+ char* (*getter) (const CERTName* dn);
+#endif
const char* name1;
const char* name2;
} _attr_getter_table[] =
diff --git a/lib/libaccess/acl.tab.cpp b/lib/libaccess/acl.tab.cpp
index 27c8c1b..db4b0f5 100644
--- a/lib/libaccess/acl.tab.cpp
+++ b/lib/libaccess/acl.tab.cpp
@@ -179,7 +179,7 @@ acl_set_ip_dns(ACLExprHandle_t *expr, char **ip_dns)
int ii;
int jj;
int len;
- char *attr;
+ const char *attr;
char *val;
if (expr == NULL)
diff --git a/lib/libaccess/aclerror.cpp b/lib/libaccess/aclerror.cpp
index 8e94f64..7fadf33 100644
--- a/lib/libaccess/aclerror.cpp
+++ b/lib/libaccess/aclerror.cpp
@@ -76,8 +76,8 @@
#define aclerrfail XP_GetAdminStr(DBT_AclerrfmtAclerrfail)
#define aclerrio XP_GetAdminStr(DBT_AclerrfmtAclerrio)
-char * NSAuth_Program = "NSAUTH";
-char * ACL_Program = "NSACL"; /* ACL facility name */
+const char * NSAuth_Program = "NSAUTH";
+const char * ACL_Program = "NSACL"; /* ACL facility name */
/*
* Description (aclErrorFmt)
diff --git a/lib/libaccess/acleval.cpp b/lib/libaccess/acleval.cpp
index bf7a473..dde3487 100644
--- a/lib/libaccess/acleval.cpp
+++ b/lib/libaccess/acleval.cpp
@@ -72,9 +72,9 @@
!strcmp((rlm1)->rlm_dbname, \
(rlm2)->rlm_dbname))))
-int aclDNSLookup(DNSFilter_t * dnf, char * dnsspec, int fqdn, char **match)
+int aclDNSLookup(DNSFilter_t * dnf, const char * dnsspec, int fqdn, const char **match)
{
- char * subdns; /* suffix of client DNS name */
+ const char * subdns; /* suffix of client DNS name */
void * table; /* hash table pointer */
Symbol_t * sym; /* DNS spec symbol pointer */
int rv; /* result value */
diff --git a/lib/libaccess/aclspace.cpp b/lib/libaccess/aclspace.cpp
index a33c862..c9a1cfb 100644
--- a/lib/libaccess/aclspace.cpp
+++ b/lib/libaccess/aclspace.cpp
@@ -47,7 +47,7 @@
#include <libaccess/aclglobal.h>
/* Ordered list of generic rights */
-char *generic_rights[7] = {
+const char *generic_rights[7] = {
"read",
"write",
"execute",
@@ -57,7 +57,7 @@ char *generic_rights[7] = {
NULL
} ;
-char *http_generic[7] = {
+const char *http_generic[7] = {
"http_get, http_head, http_trace, http_revlog, http_options, http_copy, http_getattribute, http_index, http_getproperties, http_getattributenames ",
"http_put, http_mkdir, http_startrev, http_stoprev, http_edit, http_post, http_save, http_setattribute, http_revadd, http_revlabel, http_lock, http_unlock, http_unedit, http_stoprev, http_startrev",
"http_post",
diff --git a/lib/libaccess/acltext.y b/lib/libaccess/acltext.y
index 6ec9567..2019812 100644
--- a/lib/libaccess/acltext.y
+++ b/lib/libaccess/acltext.y
@@ -179,7 +179,7 @@ acl_set_ip_dns(ACLExprHandle_t *expr, char **ip_dns)
int ii;
int jj;
int len;
- char *attr;
+ const char *attr;
char *val;
if (expr == NULL)
diff --git a/lib/libaccess/acltools.cpp b/lib/libaccess/acltools.cpp
index 3ef2beb..0eb7387 100644
--- a/lib/libaccess/acltools.cpp
+++ b/lib/libaccess/acltools.cpp
@@ -229,7 +229,7 @@ ACL_AddPermInfo( NSErr_t *errp, ACLHandle_t *acl,
NSAPI_PUBLIC int
ACL_ExprAddArg( NSErr_t *errp,
ACLExprHandle_t *expr,
- char *arg )
+ const char *arg )
{
if ( expr == NULL )
@@ -406,7 +406,7 @@ acl_index_string ( int value, char *buffer )
* displays ASCII equivalent of CmpOp_t
*/
-static char *
+static const char *
acl_comp_string( CmpOp_t cmp )
{
switch (cmp) {
@@ -445,7 +445,7 @@ acl_comp_string( CmpOp_t cmp )
NSAPI_PUBLIC int
ACL_ExprTerm( NSErr_t *errp, ACLExprHandle_t *acl_expr,
- char *attr_name,
+ const char *attr_name,
CmpOp_t cmp,
char *attr_pattern )
{
@@ -1381,7 +1381,7 @@ ACL_ParseString( NSErr_t *errp, char *buffer )
ACLListHandle_t *handle = NULL;
int eid = 0;
int rv = 0;
-char *errmsg;
+const char *errmsg;
ACL_InitAttr2Index();
@@ -1555,7 +1555,7 @@ ACL_ListGetNameList(NSErr_t *errp, ACLListHandle_t *acl_list, char ***name_list)
int list_size;
char **tmp_list;
char **local_list;
- char *name;
+ const char *name;
if ( acl_list == NULL )
diff --git a/lib/libaccess/lasip.cpp b/lib/libaccess/lasip.cpp
index e66f48a..f6d664a 100644
--- a/lib/libaccess/lasip.cpp
+++ b/lib/libaccess/lasip.cpp
@@ -69,7 +69,7 @@
extern int LASIpGetIp();
#endif
-static int colonhex_ipv6(char *ipstr, char *netmaskstr, PRIPv6Addr *ipv6, int *netmask);
+static int colonhex_ipv6(char *ipstr, const char *netmaskstr, PRIPv6Addr *ipv6, int *netmask);
static int LASIpAddPattern(NSErr_t *errp, int netmask, int pattern, LASIpTree_t **treetop);
static int LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LASIpTree_t **treetop);
@@ -86,7 +86,7 @@ static int LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LAS
* result NULL on success or else one of the LAS_EVAL_* codes.
*/
int
-dotdecimal(char *ipstr, char *netmaskstr, int *ip, int *netmask)
+dotdecimal(char *ipstr, const char *netmaskstr, int *ip, int *netmask)
{
int i;
char token[64];
@@ -114,7 +114,7 @@ dotdecimal(char *ipstr, char *netmaskstr, int *ip, int *netmask)
*netmask = *ip = 0; /* Start with "don't care" */
for (i=0; i<4; i++) {
- dotptr = strchr(netmaskstr, '.');
+ dotptr = strchr((char*)netmaskstr, '.');
/* copy out the token, then point beyond it */
if (dotptr == NULL)
@@ -725,7 +725,7 @@ LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LASIpTree_t **
* This is very similar to dotdecimal(), but for ipv6 addresses
*/
static int
-colonhex_ipv6(char *ipstr, char *netmaskstr, PRIPv6Addr *ipv6, int *netmask)
+colonhex_ipv6(char *ipstr, const char *netmaskstr, PRIPv6Addr *ipv6, int *netmask)
{
PRNetAddr addr;
/*
diff --git a/lib/libaccess/nsautherr.cpp b/lib/libaccess/nsautherr.cpp
index 7cea84e..cccb194 100644
--- a/lib/libaccess/nsautherr.cpp
+++ b/lib/libaccess/nsautherr.cpp
@@ -55,12 +55,12 @@
#include "libaccess/nsautherr.h"
/* Error message formats XXX internationalize XXX */
-static char * nsaerrnomem = "insufficient dynamic memory";
-static char * nsaerrinval = "invalid argument";
-static char * nsaerropen = "error opening %s";
-static char * nsaerrmkdir = "error creating %s";
-static char * nsaerrname = "%s not found in database %s";
-static char * unknownerr = "error code %d";
+static const char * nsaerrnomem = "insufficient dynamic memory";
+static const char * nsaerrinval = "invalid argument";
+static const char * nsaerropen = "error opening %s";
+static const char * nsaerrmkdir = "error creating %s";
+static const char * nsaerrname = "%s not found in database %s";
+static const char * unknownerr = "error code %d";
/*
* Description (nsadbErrorFmt)
diff --git a/lib/libaccess/oneeval.cpp b/lib/libaccess/oneeval.cpp
index a6d3bbd..fbaa6d8 100644
--- a/lib/libaccess/oneeval.cpp
+++ b/lib/libaccess/oneeval.cpp
@@ -612,8 +612,8 @@ static int
ACL_INTEvalTestRights(
NSErr_t *errp,
ACLEvalHandle_t *acleval,
- char **rights,
- char **map_generic,
+ const char **rights,
+ const char **map_generic,
char **deny_type,
char **deny_response,
char **acl_tag,
@@ -641,7 +641,7 @@ ACL_INTEvalTestRights(
int absolute = 0;
int skipflag;
int g_num; /* index into the generic rights array. */
- char **g_rights;
+ const char **g_rights;
PList_t global_auth=NULL;
int allow_error = 0;
int allow_absolute = 0;
@@ -956,7 +956,7 @@ ACL_CachableAclList(ACLListHandle_t *acllist)
char *acl_tag;
int expr_num;
int rv;
- static char *rights[] = { "http_get", NULL };
+ static const char *rights[] = { "http_get", NULL };
ACLCachable_t cachable=ACL_INDEF_CACHABLE;
if (!acllist || acllist == ACL_LIST_NO_ACLS) {
@@ -981,8 +981,8 @@ NSAPI_PUBLIC int
ACL_EvalTestRights(
NSErr_t *errp,
ACLEvalHandle_t *acleval,
- char **rights,
- char **map_generic,
+ const char **rights,
+ const char **map_generic,
char **deny_type,
char **deny_response,
char **acl_tag,
diff --git a/lib/libaccess/symbols.cpp b/lib/libaccess/symbols.cpp
index 209c05b..a1cba9d 100644
--- a/lib/libaccess/symbols.cpp
+++ b/lib/libaccess/symbols.cpp
@@ -121,7 +121,7 @@ static int symCmpValue(const void * value1, const void * value2)
static PLHashNumber symHash(const void * symkey)
{
Symbol_t * sym = (Symbol_t *)symkey;
- char * cp;
+ const char * cp;
PLHashNumber h;
h = sym->sym_type;
@@ -289,7 +289,7 @@ void symTableEnumerate(void * table, void * argp,
* negative return code (SYMERRxxxx - see symbols.h).
*/
-int symTableFindSym(void * table, char * symname,
+int symTableFindSym(void * table, const char * symname,
int symtype, void **psymref)
{
SymTable_t * st = (SymTable_t *)table;
diff --git a/lib/libadmin/error.c b/lib/libadmin/error.c
index 4ba9803..a277cd8 100644
--- a/lib/libadmin/error.c
+++ b/lib/libadmin/error.c
@@ -127,7 +127,7 @@ NSAPI_PUBLIC void output_alert(int type, char *info, char *details, int wait)
if(type==FILE_ERROR || type==SYSTEM_ERROR) {
err = get_error();
if(err != 0){
- char *err_str = verbose_error();
+ const char *err_str = verbose_error();
fprintf(stdout,
"\\n\\nThe system returned error number %d, "
"which is %s.", err, err_str);
diff --git a/lib/libsi18n/getstrprop.c b/lib/libsi18n/getstrprop.c
index c63d6ba..22cbafb 100644
--- a/lib/libsi18n/getstrprop.c
+++ b/lib/libsi18n/getstrprop.c
@@ -50,7 +50,7 @@
#include "getstrmem.h"
static char*
-XP_GetStringFromMemory(char* strLibraryName,int iToken)
+XP_GetStringFromMemory(const char* strLibraryName,int iToken)
{
/*
* In memory model called by XP_GetStringFromDatabase
@@ -66,7 +66,7 @@ XP_GetStringFromMemory(char* strLibraryName,int iToken)
unsigned hashKey;
int found = 0;
unsigned uToken = iToken;
- char* cPtr;
+ const char* cPtr;
DATABIN* pBucket;
/* calculate hash key */
@@ -102,12 +102,12 @@ XP_GetStringFromMemory(char* strLibraryName,int iToken)
}
-char*
-XP_GetStringFromDatabase(char* strLibraryName,
- char* strLanguage,
+const char*
+XP_GetStringFromDatabase(const char* strLibraryName,
+ const char* strLanguage,
int key)
{
- char *result = NULL;
+ const char *result = NULL;
/* we use memory strings only in ds. */
if (result == NULL)
10 years, 8 months
include/base include/i18n.h include/libaccess include/public ldap/servers lib/base lib/ldaputil lib/libaccess lib/libadmin lib/libsi18n
by Mark Reynolds
include/base/ereport.h | 4 ++--
include/base/file.h | 2 +-
include/i18n.h | 6 +++---
include/libaccess/acl.h | 4 ++--
include/libaccess/aclerror.h | 2 +-
include/libaccess/aclproto.h | 4 ++--
include/libaccess/las.h | 2 +-
include/libaccess/nsautherr.h | 2 +-
include/libaccess/nserror.h | 2 +-
include/libaccess/symbols.h | 4 ++--
include/public/nsacl/aclapi.h | 9 +++++----
include/public/nsacl/acldef.h | 2 +-
ldap/servers/plugins/posix-winsync/posix-group-func.c | 4 +---
ldap/servers/plugins/replication/repl-session-plugin.h | 4 ----
ldap/servers/plugins/replication/winsync-plugin.h | 4 ----
ldap/servers/slapd/saslbind.c | 10 +++++++++-
ldap/servers/slapd/slapi-plugin.h | 17 ++++++-----------
lib/base/file.cpp | 4 ++--
lib/base/util.cpp | 10 +++++-----
lib/ldaputil/cert.c | 12 +++++++++---
lib/libaccess/acl.tab.cpp | 2 +-
lib/libaccess/aclerror.cpp | 4 ++--
lib/libaccess/acleval.cpp | 4 ++--
lib/libaccess/aclspace.cpp | 4 ++--
lib/libaccess/acltext.y | 2 +-
lib/libaccess/acltools.cpp | 10 +++++-----
lib/libaccess/lasip.cpp | 8 ++++----
lib/libaccess/nsautherr.cpp | 12 ++++++------
lib/libaccess/oneeval.cpp | 12 ++++++------
lib/libaccess/symbols.cpp | 4 ++--
lib/libadmin/error.c | 2 +-
lib/libsi18n/getstrprop.c | 12 ++++++------
32 files changed, 92 insertions(+), 92 deletions(-)
New commits:
commit 29a1a2d0a7780d22a0724955370cbc4a0e6e6023
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 30 13:09:53 2013 -0400
Ticket 47440 - Fix compilation warnings and header files
Original patches submitted by: lslebodn(Thanks!!)
https://fedorahosted.org/389/ticket/47440
Reviewed by: richm(Thanks!)
diff --git a/include/base/ereport.h b/include/base/ereport.h
index e97be14..40813ea 100644
--- a/include/base/ereport.h
+++ b/include/base/ereport.h
@@ -65,13 +65,13 @@ NSPR_BEGIN_EXTERN_C
* the current date.
*/
-NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...)
+NSAPI_PUBLIC int INTereport(int degree, const char *fmt, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)));
#else
;
#endif
-NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args);
+NSAPI_PUBLIC int INTereport_v(int degree, const char *fmt, va_list args);
NSPR_END_EXTERN_C
diff --git a/include/base/file.h b/include/base/file.h
index fa53eb5..6ad9fc7 100644
--- a/include/base/file.h
+++ b/include/base/file.h
@@ -103,7 +103,7 @@ NSAPI_PUBLIC void INTfile_unix2local(char *path, char *p2);
NSAPI_PUBLIC int INTsystem_nocoredumps(void);
NSAPI_PUBLIC int INTfile_setinherit(SYS_FILE fd, int value);
NSAPI_PUBLIC int INTfile_notfound(void);
-NSAPI_PUBLIC char *INTsystem_errmsg(void);
+NSAPI_PUBLIC const char *INTsystem_errmsg(void);
NSAPI_PUBLIC int INTsystem_errmsg_fn(char **buff, size_t maxlen);
NSPR_END_EXTERN_C
diff --git a/include/i18n.h b/include/i18n.h
index 2d53b20..d73e604 100644
--- a/include/i18n.h
+++ b/include/i18n.h
@@ -172,9 +172,9 @@ extern "C"
/******************************/
NSAPI_PUBLIC
-extern char*
-XP_GetStringFromDatabase(char* strLibraryName,
- char* strLanguage,
+extern const char*
+XP_GetStringFromDatabase(const char* strLibraryName,
+ const char* strLanguage,
int iToken);
#ifdef __cplusplus
diff --git a/include/libaccess/acl.h b/include/libaccess/acl.h
index c3f61ea..8242935 100644
--- a/include/libaccess/acl.h
+++ b/include/libaccess/acl.h
@@ -67,8 +67,8 @@
NSPR_BEGIN_EXTERN_C
-extern char *generic_rights[];
-extern char *http_generic[];
+extern const char *generic_rights[];
+extern const char *http_generic[];
NSPR_END_EXTERN_C
diff --git a/include/libaccess/aclerror.h b/include/libaccess/aclerror.h
index b8214b3..3aff2c7 100644
--- a/include/libaccess/aclerror.h
+++ b/include/libaccess/aclerror.h
@@ -45,7 +45,7 @@
/* ACL facility name string (in aclbuild.c) */
NSPR_BEGIN_EXTERN_C
-extern char * ACL_Program;
+extern const char * ACL_Program;
NSPR_END_EXTERN_C
/* Define error identifiers */
diff --git a/include/libaccess/aclproto.h b/include/libaccess/aclproto.h
index fe6545c..4579e8d 100644
--- a/include/libaccess/aclproto.h
+++ b/include/libaccess/aclproto.h
@@ -67,12 +67,12 @@ NSAPI_PUBLIC ACLExprHandle_t *ACL_ExprNew(const ACLExprType_t expr_type);
NSAPI_PUBLIC void ACL_ExprDestroy(ACLExprHandle_t *expr);
NSAPI_PUBLIC int ACL_ExprSetPFlags(NSErr_t *errp, ACLExprHandle_t *expr, PFlags_t flags);
NSAPI_PUBLIC int ACL_ExprClearPFlags(NSErr_t *errp, ACLExprHandle_t *expr);
-NSAPI_PUBLIC int ACL_ExprTerm(NSErr_t *errp, ACLExprHandle_t *acl_expr, char *attr_name, CmpOp_t cmp, char *attr_pattern);
+NSAPI_PUBLIC int ACL_ExprTerm(NSErr_t *errp, ACLExprHandle_t *acl_expr, const char *attr_name, CmpOp_t cmp, char *attr_pattern);
NSAPI_PUBLIC int ACL_ExprNot(NSErr_t *errp, ACLExprHandle_t *acl_expr);
NSAPI_PUBLIC int ACL_ExprAnd(NSErr_t *errp, ACLExprHandle_t *acl_expr);
NSAPI_PUBLIC int ACL_ExprOr(NSErr_t *errp, ACLExprHandle_t *acl_expr);
NSAPI_PUBLIC int ACL_ExprAddAuthInfo(ACLExprHandle_t *expr, PList_t auth_info);
-NSAPI_PUBLIC int ACL_ExprAddArg(NSErr_t *errp, ACLExprHandle_t *expr, char *arg);
+NSAPI_PUBLIC int ACL_ExprAddArg(NSErr_t *errp, ACLExprHandle_t *expr, const char *arg);
NSAPI_PUBLIC int ACL_ExprSetDenyWith(NSErr_t *errp, ACLExprHandle_t *expr, char *deny_type, char *deny_response);
NSAPI_PUBLIC int ACL_ExprGetDenyWith(NSErr_t *errp, ACLExprHandle_t *expr, char **deny_type, char **deny_response);
diff --git a/include/libaccess/las.h b/include/libaccess/las.h
index 2e5673d..f2f4f33 100644
--- a/include/libaccess/las.h
+++ b/include/libaccess/las.h
@@ -74,7 +74,7 @@ struct ACLAttrGetter {
NSPR_BEGIN_EXTERN_C
NSAPI_PUBLIC extern int
- ACL_LasRegister(NSErr_t *errp, char *attr_name, LASEvalFunc_t
+ ACL_LasRegister(NSErr_t *errp, const char *attr_name, LASEvalFunc_t
eval_func, LASFlushFunc_t flush_func);
NSAPI_PUBLIC extern int
ACL_LasFindEval(NSErr_t *errp, char *attr_name, LASEvalFunc_t
diff --git a/include/libaccess/nsautherr.h b/include/libaccess/nsautherr.h
index 325e037..2e36fce 100644
--- a/include/libaccess/nsautherr.h
+++ b/include/libaccess/nsautherr.h
@@ -120,7 +120,7 @@
NSPR_BEGIN_EXTERN_C
/* Authentication facility name in nsuser.c */
-extern char * NSAuth_Program;
+extern const char * NSAuth_Program;
/* Functions in nsautherr.c */
extern NSAPI_PUBLIC void nsadbErrorFmt(NSErr_t * errp,
diff --git a/include/libaccess/nserror.h b/include/libaccess/nserror.h
index f6b5ef2..c03ca7c 100644
--- a/include/libaccess/nserror.h
+++ b/include/libaccess/nserror.h
@@ -71,7 +71,7 @@ extern void nserrDispose(NSErr_t * errp);
extern NSEFrame_t * nserrFAlloc(NSErr_t * errp);
extern void nserrFFree(NSErr_t * errp, NSEFrame_t * efp);
extern NSEFrame_t * nserrGenerate(NSErr_t * errp, long retcode, long errorid,
- char * program, int errc, ...);
+ const char * program, int errc, ...);
/* Functions in nserrmsg.c */
extern char * nserrMessage(NSEFrame_t * efp, int flags);
diff --git a/include/libaccess/symbols.h b/include/libaccess/symbols.h
index 73d04a4..f56b934 100644
--- a/include/libaccess/symbols.h
+++ b/include/libaccess/symbols.h
@@ -97,7 +97,7 @@ static void symFreeTable(void * pool, void * item);
typedef struct Symbol_s Symbol_t;
struct Symbol_s {
- char * sym_name; /* pointer to symbol name string */
+ const char * sym_name; /* pointer to symbol name string */
int sym_type; /* symbol type */
void *sym_data; /* symbol data storage */
};
@@ -127,7 +127,7 @@ extern void symTableEnumerate(void * table, void * argp,
int (*func)(Symbol_t * sym, void * parg));
#endif /* UnixWare */
-extern int symTableFindSym(void * table, char * symname,
+extern int symTableFindSym(void * table, const char * symname,
int symtype, void **psymref);
extern int symTableNew(void **ptable);
diff --git a/include/public/nsacl/aclapi.h b/include/public/nsacl/aclapi.h
index 617cabf..3b2f641 100644
--- a/include/public/nsacl/aclapi.h
+++ b/include/public/nsacl/aclapi.h
@@ -78,7 +78,7 @@ struct ACLDispatchVector {
NSEFrame_t *(*f_nserrFAlloc)(NSErr_t * errp);
void (*f_nserrFFree)(NSErr_t * errp, NSEFrame_t * efp);
NSEFrame_t *(*f_nserrGenerate)(NSErr_t * errp, long retcode,
- long errorid, char * program,
+ long errorid, const char * program,
int errc, ...);
/* Property list support
@@ -117,7 +117,7 @@ struct ACLDispatchVector {
/* ACL attribute handling */
- int (*f_ACL_LasRegister)(NSErr_t *errp, char *attr_name,
+ int (*f_ACL_LasRegister)(NSErr_t *errp, const char *attr_name,
LASEvalFunc_t eval_func,
LASFlushFunc_t flush_func);
@@ -202,12 +202,13 @@ struct ACLDispatchVector {
ACLExprHandle_t *expr, PFlags_t flags);
int (*f_ACL_ExprClearPFlags)(NSErr_t *errp, ACLExprHandle_t *expr);
int (*f_ACL_ExprTerm)(NSErr_t *errp, ACLExprHandle_t *acl_expr,
- char *attr_name, CmpOp_t cmp, char *attr_pattern);
+ const char *attr_name, CmpOp_t cmp,
+ char *attr_pattern);
int (*f_ACL_ExprNot)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
int (*f_ACL_ExprAnd)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
int (*f_ACL_ExprOr)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
int (*f_ACL_ExprAddAuthInfo)(ACLExprHandle_t *expr, PList_t auth_info);
- int (*f_ACL_ExprAddArg)(NSErr_t *errp, ACLExprHandle_t *expr, char *arg);
+ int (*f_ACL_ExprAddArg)(NSErr_t *errp, ACLExprHandle_t *expr, const char *arg);
int (*f_ACL_ExprSetDenyWith)(NSErr_t *errp, ACLExprHandle_t *expr,
char *deny_type, char *deny_response);
int (*f_ACL_ExprGetDenyWith)(NSErr_t *errp, ACLExprHandle_t *expr,
diff --git a/include/public/nsacl/acldef.h b/include/public/nsacl/acldef.h
index b3e9f4d..dd2846f 100644
--- a/include/public/nsacl/acldef.h
+++ b/include/public/nsacl/acldef.h
@@ -429,7 +429,7 @@ typedef struct ldap LDAP;
#ifdef ALLOCATE_ATTR_TABLE
/* Must be in the same order as the index numbers */
-char *ACLAttrTable[] = {
+const char *ACLAttrTable[] = {
NULL, /* 0 */
/* Don't have one numbered 0 */
ACL_ATTR_GROUP, /* 1 */
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c
index 7e069be..664d637 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
@@ -17,11 +17,9 @@
$Id: posix-group-func.c 28 2011-05-13 14:35:29Z grzemba $
*/
-#include "slapi-plugin.h"
-#include "slapi-private.h"
-
#include <string.h>
#include <nspr.h>
+#include "slapi-plugin.h"
#include "posix-wsp-ident.h"
#define MAX_RECURSION_DEPTH (5)
diff --git a/ldap/servers/plugins/replication/repl-session-plugin.h b/ldap/servers/plugins/replication/repl-session-plugin.h
index 1c684af..4e624f6 100644
--- a/ldap/servers/plugins/replication/repl-session-plugin.h
+++ b/ldap/servers/plugins/replication/repl-session-plugin.h
@@ -37,10 +37,6 @@
#ifndef REPL_SESSION_PLUGIN_PUBLIC_API
#define REPL_SESSION_PLUGIN_PUBLIC_API
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include "slapi-plugin.h"
/*
diff --git a/ldap/servers/plugins/replication/winsync-plugin.h b/ldap/servers/plugins/replication/winsync-plugin.h
index 0f3b757..1052207 100644
--- a/ldap/servers/plugins/replication/winsync-plugin.h
+++ b/ldap/servers/plugins/replication/winsync-plugin.h
@@ -37,10 +37,6 @@
#ifndef WINSYNC_PLUGIN_PUBLIC_API
#define WINSYNC_PLUGIN_PUBLIC_API
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
/* windows_private.c */
#include "slapi-plugin.h"
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index 22e4fe2..96b1f8c 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -119,7 +119,12 @@ static Slapi_ComponentId *sasl_get_component_id()
* entry from the internal database, at the same time we get any other
* properties we need - it's more efficient that way.
*/
-static void ids_auxprop_lookup(void *glob_context,
+#if SASL_AUXPROP_PLUG_VERSION > 4
+static int ids_auxprop_lookup(
+#else
+static void ids_auxprop_lookup(
+#endif
+ void *glob_context,
sasl_server_params_t *sparams,
unsigned flags,
const char *user,
@@ -127,6 +132,9 @@ static void ids_auxprop_lookup(void *glob_context,
{
/* do nothing - we don't need auxprops - we just do this to avoid
sasldb_auxprop_lookup */
+#if SASL_AUXPROP_PLUG_VERSION > 4
+ return 0;
+#endif
}
static sasl_auxprop_plug_t ids_auxprop_plugin = {
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index ecbf993..8309012 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -42,11 +42,6 @@
*
* END COPYRIGHT BLOCK */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
/*! \file slapi-plugin.h
* \brief Public Directory Server plugin interface.
*
@@ -2216,7 +2211,7 @@ int slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod *mod, int modc
/**
* Invalidate all entries in the virtual attribute cache.
*/
-void slapi_entrycache_vattrcache_watermark_invalidate();
+void slapi_entrycache_vattrcache_watermark_invalidate(void);
/*
@@ -3666,7 +3661,7 @@ void slapi_rand_array(void *randx, size_t len);
* \see slapi_rand_r()
* \see slapi_rand_array()
*/
-int slapi_rand();
+int slapi_rand(void);
/**
* Escape special characters in a search filter value
@@ -5035,7 +5030,7 @@ int slapi_attr_syntax_exists(const char *type);
* \return \c 0 if the reload was successful.
* \return non-0 if the reload failed.
*/
-int slapi_reload_internal_attr_syntax();
+int slapi_reload_internal_attr_syntax(void);
/*
* slapi_filter_apply() is used to apply a function to each simple filter
@@ -5309,7 +5304,7 @@ int slapi_apib_release(void **api);
int slapi_td_init(int indexType);
int slapi_td_set_val(int indexType, void *value);
void slapi_td_get_val(int indexType, void **value);
-int slapi_td_dn_init();
+int slapi_td_dn_init(void);
int slapi_td_set_dn(char *dn);
void slapi_td_get_dn(char **dn);
@@ -5530,7 +5525,7 @@ char *slapi_err2string(int result);
*
* \return 1 if the server is shutting down
*/
-int slapi_is_shutting_down();
+int slapi_is_shutting_down(void);
/*
* checking routines for allocating and freeing memory
@@ -6360,7 +6355,7 @@ void slapi_destroy_task(void *arg);
/* End of interface to support online tasks **********************************/
/* Slapi_Counter Interface */
-Slapi_Counter *slapi_counter_new();
+Slapi_Counter *slapi_counter_new(void);
void slapi_counter_init(Slapi_Counter *counter);
void slapi_counter_destroy(Slapi_Counter **counter);
PRUint64 slapi_counter_increment(Slapi_Counter *counter);
diff --git a/lib/base/file.cpp b/lib/base/file.cpp
index 6dc39e6..82a1852 100644
--- a/lib/base/file.cpp
+++ b/lib/base/file.cpp
@@ -613,7 +613,7 @@ with lmsg =strerror(errno);*/
return msglen;
}
-NSAPI_PUBLIC char *
+NSAPI_PUBLIC const char *
system_errmsg(void)
{
char *buff = 0;
@@ -632,7 +632,7 @@ system_errmsg(void)
}
system_errmsg_fn(&buff, errbuf_size);
if (buff == 0)
- buff = "Could not retrieve system error message";
+ return "Could not retrieve system error message";
return buff;
}
diff --git a/lib/base/util.cpp b/lib/base/util.cpp
index 01f916d..164d1a0 100644
--- a/lib/base/util.cpp
+++ b/lib/base/util.cpp
@@ -232,19 +232,19 @@ static char sccsid[] = "@(#)strftime.c 5.11 (Berkeley) 2/24/91";
#include <stdio.h>
#endif
-static char *afmt[] = {
+static const char *afmt[] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
};
-static char *Afmt[] = {
+static const char *Afmt[] = {
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday",
};
-static char *bfmt[] = {
+static const char *bfmt[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec",
};
-static char *Bfmt[] = {
+static const char *Bfmt[] = {
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December",
};
@@ -265,7 +265,7 @@ int
util_strftime(char *pt, const char *format, const struct tm *t)
{
char *start = pt;
- char *scrap;
+ const char *scrap;
for (; *format; ++format) {
if (*format == '%')
diff --git a/lib/ldaputil/cert.c b/lib/ldaputil/cert.c
index c26ff41..cc767fd 100644
--- a/lib/ldaputil/cert.c
+++ b/lib/ldaputil/cert.c
@@ -48,8 +48,9 @@
#include <sec.h>
*/
#include "prmem.h"
-#include "key.h"
-#include "cert.h"
+#include <key.h>
+#include <cert.h>
+#include <nss.h>
#include <ldaputil/certmap.h>
#include <ldaputil/errors.h>
#include <ldaputil/cert.h>
@@ -285,7 +286,12 @@ _replaceAVA (char* attr, char** avas)
}
struct _attr_getter_pair {
- char* (*getter) (CERTName* dn);
+#if NSS_VMAJOR < 3 || (NSS_VMAJOR == 3 && NSS_VMINOR < 15)
+ char* (*getter) ( CERTName* dn);
+#else
+ /* in 3.15.x "const" was added to the declarations */
+ char* (*getter) (const CERTName* dn);
+#endif
const char* name1;
const char* name2;
} _attr_getter_table[] =
diff --git a/lib/libaccess/acl.tab.cpp b/lib/libaccess/acl.tab.cpp
index 27c8c1b..db4b0f5 100644
--- a/lib/libaccess/acl.tab.cpp
+++ b/lib/libaccess/acl.tab.cpp
@@ -179,7 +179,7 @@ acl_set_ip_dns(ACLExprHandle_t *expr, char **ip_dns)
int ii;
int jj;
int len;
- char *attr;
+ const char *attr;
char *val;
if (expr == NULL)
diff --git a/lib/libaccess/aclerror.cpp b/lib/libaccess/aclerror.cpp
index 8e94f64..7fadf33 100644
--- a/lib/libaccess/aclerror.cpp
+++ b/lib/libaccess/aclerror.cpp
@@ -76,8 +76,8 @@
#define aclerrfail XP_GetAdminStr(DBT_AclerrfmtAclerrfail)
#define aclerrio XP_GetAdminStr(DBT_AclerrfmtAclerrio)
-char * NSAuth_Program = "NSAUTH";
-char * ACL_Program = "NSACL"; /* ACL facility name */
+const char * NSAuth_Program = "NSAUTH";
+const char * ACL_Program = "NSACL"; /* ACL facility name */
/*
* Description (aclErrorFmt)
diff --git a/lib/libaccess/acleval.cpp b/lib/libaccess/acleval.cpp
index bf7a473..dde3487 100644
--- a/lib/libaccess/acleval.cpp
+++ b/lib/libaccess/acleval.cpp
@@ -72,9 +72,9 @@
!strcmp((rlm1)->rlm_dbname, \
(rlm2)->rlm_dbname))))
-int aclDNSLookup(DNSFilter_t * dnf, char * dnsspec, int fqdn, char **match)
+int aclDNSLookup(DNSFilter_t * dnf, const char * dnsspec, int fqdn, const char **match)
{
- char * subdns; /* suffix of client DNS name */
+ const char * subdns; /* suffix of client DNS name */
void * table; /* hash table pointer */
Symbol_t * sym; /* DNS spec symbol pointer */
int rv; /* result value */
diff --git a/lib/libaccess/aclspace.cpp b/lib/libaccess/aclspace.cpp
index a33c862..c9a1cfb 100644
--- a/lib/libaccess/aclspace.cpp
+++ b/lib/libaccess/aclspace.cpp
@@ -47,7 +47,7 @@
#include <libaccess/aclglobal.h>
/* Ordered list of generic rights */
-char *generic_rights[7] = {
+const char *generic_rights[7] = {
"read",
"write",
"execute",
@@ -57,7 +57,7 @@ char *generic_rights[7] = {
NULL
} ;
-char *http_generic[7] = {
+const char *http_generic[7] = {
"http_get, http_head, http_trace, http_revlog, http_options, http_copy, http_getattribute, http_index, http_getproperties, http_getattributenames ",
"http_put, http_mkdir, http_startrev, http_stoprev, http_edit, http_post, http_save, http_setattribute, http_revadd, http_revlabel, http_lock, http_unlock, http_unedit, http_stoprev, http_startrev",
"http_post",
diff --git a/lib/libaccess/acltext.y b/lib/libaccess/acltext.y
index 6ec9567..2019812 100644
--- a/lib/libaccess/acltext.y
+++ b/lib/libaccess/acltext.y
@@ -179,7 +179,7 @@ acl_set_ip_dns(ACLExprHandle_t *expr, char **ip_dns)
int ii;
int jj;
int len;
- char *attr;
+ const char *attr;
char *val;
if (expr == NULL)
diff --git a/lib/libaccess/acltools.cpp b/lib/libaccess/acltools.cpp
index 3ef2beb..0eb7387 100644
--- a/lib/libaccess/acltools.cpp
+++ b/lib/libaccess/acltools.cpp
@@ -229,7 +229,7 @@ ACL_AddPermInfo( NSErr_t *errp, ACLHandle_t *acl,
NSAPI_PUBLIC int
ACL_ExprAddArg( NSErr_t *errp,
ACLExprHandle_t *expr,
- char *arg )
+ const char *arg )
{
if ( expr == NULL )
@@ -406,7 +406,7 @@ acl_index_string ( int value, char *buffer )
* displays ASCII equivalent of CmpOp_t
*/
-static char *
+static const char *
acl_comp_string( CmpOp_t cmp )
{
switch (cmp) {
@@ -445,7 +445,7 @@ acl_comp_string( CmpOp_t cmp )
NSAPI_PUBLIC int
ACL_ExprTerm( NSErr_t *errp, ACLExprHandle_t *acl_expr,
- char *attr_name,
+ const char *attr_name,
CmpOp_t cmp,
char *attr_pattern )
{
@@ -1381,7 +1381,7 @@ ACL_ParseString( NSErr_t *errp, char *buffer )
ACLListHandle_t *handle = NULL;
int eid = 0;
int rv = 0;
-char *errmsg;
+const char *errmsg;
ACL_InitAttr2Index();
@@ -1555,7 +1555,7 @@ ACL_ListGetNameList(NSErr_t *errp, ACLListHandle_t *acl_list, char ***name_list)
int list_size;
char **tmp_list;
char **local_list;
- char *name;
+ const char *name;
if ( acl_list == NULL )
diff --git a/lib/libaccess/lasip.cpp b/lib/libaccess/lasip.cpp
index e66f48a..f6d664a 100644
--- a/lib/libaccess/lasip.cpp
+++ b/lib/libaccess/lasip.cpp
@@ -69,7 +69,7 @@
extern int LASIpGetIp();
#endif
-static int colonhex_ipv6(char *ipstr, char *netmaskstr, PRIPv6Addr *ipv6, int *netmask);
+static int colonhex_ipv6(char *ipstr, const char *netmaskstr, PRIPv6Addr *ipv6, int *netmask);
static int LASIpAddPattern(NSErr_t *errp, int netmask, int pattern, LASIpTree_t **treetop);
static int LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LASIpTree_t **treetop);
@@ -86,7 +86,7 @@ static int LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LAS
* result NULL on success or else one of the LAS_EVAL_* codes.
*/
int
-dotdecimal(char *ipstr, char *netmaskstr, int *ip, int *netmask)
+dotdecimal(char *ipstr, const char *netmaskstr, int *ip, int *netmask)
{
int i;
char token[64];
@@ -114,7 +114,7 @@ dotdecimal(char *ipstr, char *netmaskstr, int *ip, int *netmask)
*netmask = *ip = 0; /* Start with "don't care" */
for (i=0; i<4; i++) {
- dotptr = strchr(netmaskstr, '.');
+ dotptr = strchr((char*)netmaskstr, '.');
/* copy out the token, then point beyond it */
if (dotptr == NULL)
@@ -725,7 +725,7 @@ LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LASIpTree_t **
* This is very similar to dotdecimal(), but for ipv6 addresses
*/
static int
-colonhex_ipv6(char *ipstr, char *netmaskstr, PRIPv6Addr *ipv6, int *netmask)
+colonhex_ipv6(char *ipstr, const char *netmaskstr, PRIPv6Addr *ipv6, int *netmask)
{
PRNetAddr addr;
/*
diff --git a/lib/libaccess/nsautherr.cpp b/lib/libaccess/nsautherr.cpp
index 7cea84e..cccb194 100644
--- a/lib/libaccess/nsautherr.cpp
+++ b/lib/libaccess/nsautherr.cpp
@@ -55,12 +55,12 @@
#include "libaccess/nsautherr.h"
/* Error message formats XXX internationalize XXX */
-static char * nsaerrnomem = "insufficient dynamic memory";
-static char * nsaerrinval = "invalid argument";
-static char * nsaerropen = "error opening %s";
-static char * nsaerrmkdir = "error creating %s";
-static char * nsaerrname = "%s not found in database %s";
-static char * unknownerr = "error code %d";
+static const char * nsaerrnomem = "insufficient dynamic memory";
+static const char * nsaerrinval = "invalid argument";
+static const char * nsaerropen = "error opening %s";
+static const char * nsaerrmkdir = "error creating %s";
+static const char * nsaerrname = "%s not found in database %s";
+static const char * unknownerr = "error code %d";
/*
* Description (nsadbErrorFmt)
diff --git a/lib/libaccess/oneeval.cpp b/lib/libaccess/oneeval.cpp
index 8e31940..8077969 100644
--- a/lib/libaccess/oneeval.cpp
+++ b/lib/libaccess/oneeval.cpp
@@ -609,8 +609,8 @@ static int
ACL_INTEvalTestRights(
NSErr_t *errp,
ACLEvalHandle_t *acleval,
- char **rights,
- char **map_generic,
+ const char **rights,
+ const char **map_generic,
char **deny_type,
char **deny_response,
char **acl_tag,
@@ -638,7 +638,7 @@ ACL_INTEvalTestRights(
int absolute = 0;
int skipflag;
int g_num; /* index into the generic rights array. */
- char **g_rights;
+ const char **g_rights;
PList_t global_auth=NULL;
int allow_error = 0;
int allow_absolute = 0;
@@ -953,7 +953,7 @@ ACL_CachableAclList(ACLListHandle_t *acllist)
char *acl_tag;
int expr_num;
int rv;
- static char *rights[] = { "http_get", NULL };
+ static const char *rights[] = { "http_get", NULL };
ACLCachable_t cachable=ACL_INDEF_CACHABLE;
if (!acllist || acllist == ACL_LIST_NO_ACLS) {
@@ -978,8 +978,8 @@ NSAPI_PUBLIC int
ACL_EvalTestRights(
NSErr_t *errp,
ACLEvalHandle_t *acleval,
- char **rights,
- char **map_generic,
+ const char **rights,
+ const char **map_generic,
char **deny_type,
char **deny_response,
char **acl_tag,
diff --git a/lib/libaccess/symbols.cpp b/lib/libaccess/symbols.cpp
index 209c05b..a1cba9d 100644
--- a/lib/libaccess/symbols.cpp
+++ b/lib/libaccess/symbols.cpp
@@ -121,7 +121,7 @@ static int symCmpValue(const void * value1, const void * value2)
static PLHashNumber symHash(const void * symkey)
{
Symbol_t * sym = (Symbol_t *)symkey;
- char * cp;
+ const char * cp;
PLHashNumber h;
h = sym->sym_type;
@@ -289,7 +289,7 @@ void symTableEnumerate(void * table, void * argp,
* negative return code (SYMERRxxxx - see symbols.h).
*/
-int symTableFindSym(void * table, char * symname,
+int symTableFindSym(void * table, const char * symname,
int symtype, void **psymref)
{
SymTable_t * st = (SymTable_t *)table;
diff --git a/lib/libadmin/error.c b/lib/libadmin/error.c
index 4ba9803..a277cd8 100644
--- a/lib/libadmin/error.c
+++ b/lib/libadmin/error.c
@@ -127,7 +127,7 @@ NSAPI_PUBLIC void output_alert(int type, char *info, char *details, int wait)
if(type==FILE_ERROR || type==SYSTEM_ERROR) {
err = get_error();
if(err != 0){
- char *err_str = verbose_error();
+ const char *err_str = verbose_error();
fprintf(stdout,
"\\n\\nThe system returned error number %d, "
"which is %s.", err, err_str);
diff --git a/lib/libsi18n/getstrprop.c b/lib/libsi18n/getstrprop.c
index c63d6ba..22cbafb 100644
--- a/lib/libsi18n/getstrprop.c
+++ b/lib/libsi18n/getstrprop.c
@@ -50,7 +50,7 @@
#include "getstrmem.h"
static char*
-XP_GetStringFromMemory(char* strLibraryName,int iToken)
+XP_GetStringFromMemory(const char* strLibraryName,int iToken)
{
/*
* In memory model called by XP_GetStringFromDatabase
@@ -66,7 +66,7 @@ XP_GetStringFromMemory(char* strLibraryName,int iToken)
unsigned hashKey;
int found = 0;
unsigned uToken = iToken;
- char* cPtr;
+ const char* cPtr;
DATABIN* pBucket;
/* calculate hash key */
@@ -102,12 +102,12 @@ XP_GetStringFromMemory(char* strLibraryName,int iToken)
}
-char*
-XP_GetStringFromDatabase(char* strLibraryName,
- char* strLanguage,
+const char*
+XP_GetStringFromDatabase(const char* strLibraryName,
+ const char* strLanguage,
int key)
{
- char *result = NULL;
+ const char *result = NULL;
/* we use memory strings only in ds. */
if (result == NULL)
10 years, 8 months
ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/acl/aclutil.c | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 904416f4631d842a105851b4a9931ae17822a107
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Tue Jul 30 11:29:47 2013 +0200
fix compiler warning
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 2002276..4f81bc0 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -1400,7 +1400,6 @@ void acl_ht_add_and_freeOld(acl_ht_t * acl_ht,
void acl_ht_remove_and_free(acl_ht_t * acl_ht,
PLHashNumber key){
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);
10 years, 8 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/acl/acl.c | 6 +++++-
ldap/servers/plugins/acl/acl.h | 1 +
ldap/servers/plugins/acl/aclutil.c | 11 +++++++++++
ldap/servers/slapd/filterentry.c | 14 ++++++++++----
4 files changed, 27 insertions(+), 5 deletions(-)
New commits:
commit a682fe5364324a7001c99129684e99fd826e43da
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Jun 27 16:03:56 2013 +0200
CVE-2013-2219 ACLs inoperative in some search scenarios
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index 0cfeaa7..09f28ee 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -2137,7 +2137,11 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int skip_attrEval, int *
* calculated from the targetdn and stored judiciously there
*/
matched_val = (char *)acl_ht_lookup( aclpb->aclpb_macro_ht,
- (PLHashNumber)aci->aci_index);
+ (PLHashNumber)aci->aci_index);
+ } else {
+ /* new entry, remove macro evaluation from hash table */
+ acl_ht_remove_and_free( aclpb->aclpb_macro_ht,
+ (PLHashNumber)aci->aci_index);
}
if ( matched_val == NULL &&
(aclpb->aclpb_res_type & (ACLPB_NEW_ENTRY | ACLPB_EFFECTIVE_RIGHTS))) {
diff --git a/ldap/servers/plugins/acl/acl.h b/ldap/servers/plugins/acl/acl.h
index 9cf15aa..c61ee70 100644
--- a/ldap/servers/plugins/acl/acl.h
+++ b/ldap/servers/plugins/acl/acl.h
@@ -929,6 +929,7 @@ int aclutil_str_append_ext(char **dest, size_t *dlen, const char *src, size_t sl
/* acl hash table functions */
void acl_ht_add_and_freeOld(acl_ht_t * acl_ht, PLHashNumber key,char *value);
+void acl_ht_remove_and_free(acl_ht_t * acl_ht, PLHashNumber key);
acl_ht_t *acl_ht_new(void);
void acl_ht_free_all_entries_and_values( acl_ht_t *acl_ht);
void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key);
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 5969b26..2002276 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -1397,6 +1397,17 @@ void acl_ht_add_and_freeOld(acl_ht_t * acl_ht,
PL_HashTableAdd( acl_ht, (const void *)pkey, value);
}
+void acl_ht_remove_and_free(acl_ht_t * acl_ht,
+ PLHashNumber key){
+ 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_string(&old_value);
+ }
+}
+
/*
* Return a new acl_ht_t *
*/
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index 549bac7..880169a 100644
--- a/ldap/servers/slapd/filterentry.c
+++ b/ldap/servers/slapd/filterentry.c
@@ -1037,8 +1037,11 @@ vattr_test_filter_list(
for ( f = flist; f != NULL; f = f->f_next ) {
if ( slapi_vattr_filter_test_ext_internal( pb, e, f, verify_access, only_check_access, access_check_done ) != 0 ) {
/* optimize AND evaluation */
- if ( ftype == LDAP_FILTER_AND ) {
- /* one false is failure */
+ if ( ftype == LDAP_FILTER_AND || verify_access) {
+ /* one false is failure
+ * for AND all components need to match
+ * and for AND and OR access to ALL filter attributes is required
+ */
nomatch = 1;
break;
}
@@ -1046,8 +1049,11 @@ vattr_test_filter_list(
nomatch = 0;
/* optimize OR evaluation too */
- if ( ftype == LDAP_FILTER_OR ) {
- /* only one needs to be true */
+ if ( ftype == LDAP_FILTER_OR && !verify_access) {
+ /* access to all atributes needs to be evaluated
+ * for filter matching
+ * only one needs to be true
+ */
break;
}
}
10 years, 8 months
Branch '389-ds-base-1.3.0' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/acl/acl.c | 6 +++++-
ldap/servers/plugins/acl/acl.h | 1 +
ldap/servers/plugins/acl/aclutil.c | 11 +++++++++++
ldap/servers/slapd/filterentry.c | 14 ++++++++++----
4 files changed, 27 insertions(+), 5 deletions(-)
New commits:
commit 6d6354f1740ec9a8111dd2a4efce6034ef211d02
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Jun 27 16:03:56 2013 +0200
CVE-2013-2219 ACLs inoperative in some search scenarios
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index 1ae925b..7423972 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -2142,7 +2142,11 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int skip_attrEval, int *
* calculated from the targetdn and stored judiciously there
*/
matched_val = (char *)acl_ht_lookup( aclpb->aclpb_macro_ht,
- (PLHashNumber)aci->aci_index);
+ (PLHashNumber)aci->aci_index);
+ } else {
+ /* new entry, remove macro evaluation from hash table */
+ acl_ht_remove_and_free( aclpb->aclpb_macro_ht,
+ (PLHashNumber)aci->aci_index);
}
if ( matched_val == NULL &&
(aclpb->aclpb_res_type & (ACLPB_NEW_ENTRY | ACLPB_EFFECTIVE_RIGHTS))) {
diff --git a/ldap/servers/plugins/acl/acl.h b/ldap/servers/plugins/acl/acl.h
index 9cf15aa..c61ee70 100644
--- a/ldap/servers/plugins/acl/acl.h
+++ b/ldap/servers/plugins/acl/acl.h
@@ -929,6 +929,7 @@ int aclutil_str_append_ext(char **dest, size_t *dlen, const char *src, size_t sl
/* acl hash table functions */
void acl_ht_add_and_freeOld(acl_ht_t * acl_ht, PLHashNumber key,char *value);
+void acl_ht_remove_and_free(acl_ht_t * acl_ht, PLHashNumber key);
acl_ht_t *acl_ht_new(void);
void acl_ht_free_all_entries_and_values( acl_ht_t *acl_ht);
void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key);
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 5969b26..2002276 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -1397,6 +1397,17 @@ void acl_ht_add_and_freeOld(acl_ht_t * acl_ht,
PL_HashTableAdd( acl_ht, (const void *)pkey, value);
}
+void acl_ht_remove_and_free(acl_ht_t * acl_ht,
+ PLHashNumber key){
+ 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_string(&old_value);
+ }
+}
+
/*
* Return a new acl_ht_t *
*/
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index 549bac7..880169a 100644
--- a/ldap/servers/slapd/filterentry.c
+++ b/ldap/servers/slapd/filterentry.c
@@ -1037,8 +1037,11 @@ vattr_test_filter_list(
for ( f = flist; f != NULL; f = f->f_next ) {
if ( slapi_vattr_filter_test_ext_internal( pb, e, f, verify_access, only_check_access, access_check_done ) != 0 ) {
/* optimize AND evaluation */
- if ( ftype == LDAP_FILTER_AND ) {
- /* one false is failure */
+ if ( ftype == LDAP_FILTER_AND || verify_access) {
+ /* one false is failure
+ * for AND all components need to match
+ * and for AND and OR access to ALL filter attributes is required
+ */
nomatch = 1;
break;
}
@@ -1046,8 +1049,11 @@ vattr_test_filter_list(
nomatch = 0;
/* optimize OR evaluation too */
- if ( ftype == LDAP_FILTER_OR ) {
- /* only one needs to be true */
+ if ( ftype == LDAP_FILTER_OR && !verify_access) {
+ /* access to all atributes needs to be evaluated
+ * for filter matching
+ * only one needs to be true
+ */
break;
}
}
10 years, 8 months
Branch '389-ds-base-1.3.1' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/acl/acl.c | 6 +++++-
ldap/servers/plugins/acl/acl.h | 1 +
ldap/servers/plugins/acl/aclutil.c | 11 +++++++++++
ldap/servers/slapd/filterentry.c | 14 ++++++++++----
4 files changed, 27 insertions(+), 5 deletions(-)
New commits:
commit 45260ff1f5e40cd65cb9861f1c3437e1e1928f42
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Jun 27 16:03:56 2013 +0200
CVE-2013-2219 ACLs inoperative in some search scenarios
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index 764d15b..22c17dc 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -2142,7 +2142,11 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int skip_attrEval, int *
* calculated from the targetdn and stored judiciously there
*/
matched_val = (char *)acl_ht_lookup( aclpb->aclpb_macro_ht,
- (PLHashNumber)aci->aci_index);
+ (PLHashNumber)aci->aci_index);
+ } else {
+ /* new entry, remove macro evaluation from hash table */
+ acl_ht_remove_and_free( aclpb->aclpb_macro_ht,
+ (PLHashNumber)aci->aci_index);
}
if ( matched_val == NULL &&
(aclpb->aclpb_res_type & (ACLPB_NEW_ENTRY | ACLPB_EFFECTIVE_RIGHTS))) {
diff --git a/ldap/servers/plugins/acl/acl.h b/ldap/servers/plugins/acl/acl.h
index a346781..bedb6da 100644
--- a/ldap/servers/plugins/acl/acl.h
+++ b/ldap/servers/plugins/acl/acl.h
@@ -930,6 +930,7 @@ int aclutil_str_append_ext(char **dest, size_t *dlen, const char *src, size_t sl
/* acl hash table functions */
void acl_ht_add_and_freeOld(acl_ht_t * acl_ht, PLHashNumber key,char *value);
+void acl_ht_remove_and_free(acl_ht_t * acl_ht, PLHashNumber key);
acl_ht_t *acl_ht_new(void);
void acl_ht_free_all_entries_and_values( acl_ht_t *acl_ht);
void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key);
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 5969b26..2002276 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -1397,6 +1397,17 @@ void acl_ht_add_and_freeOld(acl_ht_t * acl_ht,
PL_HashTableAdd( acl_ht, (const void *)pkey, value);
}
+void acl_ht_remove_and_free(acl_ht_t * acl_ht,
+ PLHashNumber key){
+ 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_string(&old_value);
+ }
+}
+
/*
* Return a new acl_ht_t *
*/
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index 549bac7..880169a 100644
--- a/ldap/servers/slapd/filterentry.c
+++ b/ldap/servers/slapd/filterentry.c
@@ -1037,8 +1037,11 @@ vattr_test_filter_list(
for ( f = flist; f != NULL; f = f->f_next ) {
if ( slapi_vattr_filter_test_ext_internal( pb, e, f, verify_access, only_check_access, access_check_done ) != 0 ) {
/* optimize AND evaluation */
- if ( ftype == LDAP_FILTER_AND ) {
- /* one false is failure */
+ if ( ftype == LDAP_FILTER_AND || verify_access) {
+ /* one false is failure
+ * for AND all components need to match
+ * and for AND and OR access to ALL filter attributes is required
+ */
nomatch = 1;
break;
}
@@ -1046,8 +1049,11 @@ vattr_test_filter_list(
nomatch = 0;
/* optimize OR evaluation too */
- if ( ftype == LDAP_FILTER_OR ) {
- /* only one needs to be true */
+ if ( ftype == LDAP_FILTER_OR && !verify_access) {
+ /* access to all atributes needs to be evaluated
+ * for filter matching
+ * only one needs to be true
+ */
break;
}
}
10 years, 8 months
ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/acl/acl.c | 6 +++++-
ldap/servers/plugins/acl/acl.h | 1 +
ldap/servers/plugins/acl/aclutil.c | 11 +++++++++++
ldap/servers/slapd/filterentry.c | 14 ++++++++++----
4 files changed, 27 insertions(+), 5 deletions(-)
New commits:
commit a803b52307119881f2ec7fae2a73621a7b3666aa
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Jun 27 16:03:56 2013 +0200
CVE-2013-2219 ACLs inoperative in some search scenarios
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index 891bc44..fb6c2d6 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -2142,7 +2142,11 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int skip_attrEval, int *
* calculated from the targetdn and stored judiciously there
*/
matched_val = (char *)acl_ht_lookup( aclpb->aclpb_macro_ht,
- (PLHashNumber)aci->aci_index);
+ (PLHashNumber)aci->aci_index);
+ } else {
+ /* new entry, remove macro evaluation from hash table */
+ acl_ht_remove_and_free( aclpb->aclpb_macro_ht,
+ (PLHashNumber)aci->aci_index);
}
if ( matched_val == NULL &&
(aclpb->aclpb_res_type & (ACLPB_NEW_ENTRY | ACLPB_EFFECTIVE_RIGHTS))) {
diff --git a/ldap/servers/plugins/acl/acl.h b/ldap/servers/plugins/acl/acl.h
index d69db30..6fcef51 100644
--- a/ldap/servers/plugins/acl/acl.h
+++ b/ldap/servers/plugins/acl/acl.h
@@ -933,6 +933,7 @@ int aclutil_str_append_ext(char **dest, size_t *dlen, const char *src, size_t sl
/* acl hash table functions */
void acl_ht_add_and_freeOld(acl_ht_t * acl_ht, PLHashNumber key,char *value);
+void acl_ht_remove_and_free(acl_ht_t * acl_ht, PLHashNumber key);
acl_ht_t *acl_ht_new(void);
void acl_ht_free_all_entries_and_values( acl_ht_t *acl_ht);
void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key);
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 5969b26..2002276 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -1397,6 +1397,17 @@ void acl_ht_add_and_freeOld(acl_ht_t * acl_ht,
PL_HashTableAdd( acl_ht, (const void *)pkey, value);
}
+void acl_ht_remove_and_free(acl_ht_t * acl_ht,
+ PLHashNumber key){
+ 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_string(&old_value);
+ }
+}
+
/*
* Return a new acl_ht_t *
*/
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index 549bac7..880169a 100644
--- a/ldap/servers/slapd/filterentry.c
+++ b/ldap/servers/slapd/filterentry.c
@@ -1037,8 +1037,11 @@ vattr_test_filter_list(
for ( f = flist; f != NULL; f = f->f_next ) {
if ( slapi_vattr_filter_test_ext_internal( pb, e, f, verify_access, only_check_access, access_check_done ) != 0 ) {
/* optimize AND evaluation */
- if ( ftype == LDAP_FILTER_AND ) {
- /* one false is failure */
+ if ( ftype == LDAP_FILTER_AND || verify_access) {
+ /* one false is failure
+ * for AND all components need to match
+ * and for AND and OR access to ALL filter attributes is required
+ */
nomatch = 1;
break;
}
@@ -1046,8 +1049,11 @@ vattr_test_filter_list(
nomatch = 0;
/* optimize OR evaluation too */
- if ( ftype == LDAP_FILTER_OR ) {
- /* only one needs to be true */
+ if ( ftype == LDAP_FILTER_OR && !verify_access) {
+ /* access to all atributes needs to be evaluated
+ * for filter matching
+ * only one needs to be true
+ */
break;
}
}
10 years, 8 months
ldap/servers
by Mark Reynolds
ldap/servers/slapd/back-ldbm/ldbm_add.c | 6 +++---
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 95d07e1f4709a0d115db73e7bb6842625452354e
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jul 29 15:56:11 2013 -0400
Ticket 47323 - resurrected entry is not correctly indexed
Bug Description: If a tombstone entry is resurrected to a glue entry
the indexes are not updated correctly. The objectclass
index still shows the resurrected ID in the nsTombstone key.
Fix Description: Add the correct EQUALITY flag to the index delete function.
Otherwise the delete operation is skipped in
index_addordel_values_ext_sv().
https://fedorahosted.org/389/ticket/47323
Reviewed by: richm(Thanks!!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index 50748a7..dbcc914 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -817,7 +817,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
if(is_resurect_operation)
{
- retval = index_addordel_string(be,SLAPI_ATTR_OBJECTCLASS,SLAPI_ATTR_VALUE_TOMBSTONE,addingentry->ep_id,BE_INDEX_DEL,&txn);
+ retval = index_addordel_string(be,SLAPI_ATTR_OBJECTCLASS,SLAPI_ATTR_VALUE_TOMBSTONE,addingentry->ep_id,BE_INDEX_DEL|BE_INDEX_EQUALITY,&txn);
if (DB_LOCK_DEADLOCK == retval) {
LDAPDebug( LDAP_DEBUG_ARGS, "add 2 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
@@ -834,7 +834,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
goto error_return;
}
- retval = index_addordel_string(be,SLAPI_ATTR_UNIQUEID,slapi_entry_get_uniqueid(addingentry->ep_entry),addingentry->ep_id,BE_INDEX_DEL,&txn);
+ retval = index_addordel_string(be,SLAPI_ATTR_UNIQUEID,slapi_entry_get_uniqueid(addingentry->ep_entry),addingentry->ep_id,BE_INDEX_DEL|BE_INDEX_EQUALITY,&txn);
if (DB_LOCK_DEADLOCK == retval) {
LDAPDebug( LDAP_DEBUG_ARGS, "add 3 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
@@ -855,7 +855,7 @@ ldbm_back_add( Slapi_PBlock *pb )
SLAPI_ATTR_NSCP_ENTRYDN,
slapi_sdn_get_ndn(sdn),
addingentry->ep_id,
- BE_INDEX_DEL, &txn);
+ BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
LDAPDebug( LDAP_DEBUG_ARGS, "add 4 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index 9c8b471..a447435 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -889,7 +889,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
retval = index_addordel_string(be, SLAPI_ATTR_OBJECTCLASS,
SLAPI_ATTR_VALUE_TOMBSTONE, e->ep_id,
- BE_INDEX_DEL, &txn);
+ BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
LDAPDebug( LDAP_DEBUG_ARGS,
"delete (deleting %s) DB_LOCK_DEADLOCK\n",
@@ -909,7 +909,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
retval = index_addordel_string(be, SLAPI_ATTR_UNIQUEID,
slapi_entry_get_uniqueid(e->ep_entry),
- e->ep_id, BE_INDEX_DEL, &txn);
+ e->ep_id, BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
LDAPDebug( LDAP_DEBUG_ARGS,
"delete (deleting %s) DB_LOCK_DEADLOCK\n",
@@ -932,7 +932,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
SLAPI_ATTR_NSCP_ENTRYDN);
if (nscpedn) {
retval = index_addordel_string(be, SLAPI_ATTR_NSCP_ENTRYDN,
- nscpedn, e->ep_id, BE_INDEX_DEL, &txn);
+ nscpedn, e->ep_id, BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
slapi_ch_free((void **)&nscpedn);
if (DB_LOCK_DEADLOCK == retval) {
LDAPDebug( LDAP_DEBUG_ARGS,
10 years, 8 months
Branch '389-ds-base-1.3.1' - man/man1
by Mark Reynolds
man/man1/logconv.pl.1 | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)
New commits:
commit ed245c45813255400c6962707f7269caa253e953
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jul 29 15:44:10 2013 -0400
Ticket 47447 - logconv.pl man page missing -m,-M,-B,-D
Fix Description: Added the missing info, and also updated the main arguments
with their long option names.
https://fedorahosted.org/389/ticket/47447
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 4ea4c8bf91f5c28bd643b0c06f590ec164156358)
diff --git a/man/man1/logconv.pl.1 b/man/man1/logconv.pl.1
index ab81c69..c2a8cd8 100644
--- a/man/man1/logconv.pl.1
+++ b/man/man1/logconv.pl.1
@@ -29,30 +29,46 @@ line
.SH OPTIONS
A summary of options is included below:
.TP
-.B \fB\-h\fR
+.B \fB\-h, \-\-help\fR
help/usage
.TP
-.B \fB\-d\fR <Directory Managers DN>
+.B \fB\-d, \-\-rootDN\fR <Directory Managers DN>
DEFAULT \-> cn=directory manager
.TP
-.B \fB\-s\fR <Number of results to return per category>
+.B \fB\-D, \-\-data\fR <Location for temporary data files>
+DEFAULT \-> /tmp
+.br
+TIP \-> If there is not enough RAM, a RAM disk can be used instead:
+
+ mkdir /dev/shm/logconv, and use this directory for the "-D" value.
+.TP
+.B \fB\-s, \-\-sizeLimit\fR <Number of results to return per category>
DEFAULT \-> 20
.TP
-.B \fB\-X\fR <IP address to exclude from connection stats>
+.B \fB\-X, \-\-excludeIP\fR <IP address to exclude from connection stats>
E.g. Load balancers
.TP
-.B \fB\-v\fR show version of tool
+.B \fB\-v, \-\-version\fR show version of tool
Print version of the tool
.TP
-.B \fB\-S\fR <time to begin analyzing logfile from>
+.B \fB\-S, \-\-startTime\fR <time to begin analyzing logfile from>
Time to begin analyzing logfile from
-E.g. [28/Mar/2002:13:14:22 \fB\-0800]\fR
+E.g. [28/Mar/2002:13:14:22 \f \-0800]\fR
.TP
-.B \fB\-E\fR <time to stop analyzing logfile>
+.B \fB\-E, \-\-endTime\fR <time to stop analyzing logfile>
Time to stop analyzing logfile from
-E.g. [28/Mar/2002:13:24:62 \fB\-0800]\fR
+E.g. [28/Mar/2002:13:24:62 \f \-0800]\fR
+.TP
+.B \fB\-M, \-\-reportFileMins\fR <CSV output file>
+This option creates a CSV report for spreadsheets.
+.TP
+.B \fB\-m, \-\-reportFileSecs\fR <CSV output file>
+This option creates a CSV report for spreadsheets.
+.TP
+.B \fB\-B, \-\-bind\fR <ALL | ANONYMOUS | "Bind DN">
+This generates a report based on either ALL bind dn's, anonymous binds, or a specific DN.
.TP
-\fB\-V\fR <enable verbose output \- includes all stats listed below>
+\fB\-V, \-\-verbose\fR <enable verbose output \- includes all stats listed below>
Verbose output
.TP
.B \fB\-[efcibaltnxgju]\fR
10 years, 8 months
man/man1
by Mark Reynolds
man/man1/logconv.pl.1 | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)
New commits:
commit 4ea4c8bf91f5c28bd643b0c06f590ec164156358
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jul 29 15:44:10 2013 -0400
Ticket 47447 - logconv.pl man page missing -m,-M,-B,-D
Fix Description: Added the missing info, and also updated the main arguments
with their long option names.
https://fedorahosted.org/389/ticket/47447
Reviewed by: nhosoi(Thanks!)
diff --git a/man/man1/logconv.pl.1 b/man/man1/logconv.pl.1
index ab81c69..c2a8cd8 100644
--- a/man/man1/logconv.pl.1
+++ b/man/man1/logconv.pl.1
@@ -29,30 +29,46 @@ line
.SH OPTIONS
A summary of options is included below:
.TP
-.B \fB\-h\fR
+.B \fB\-h, \-\-help\fR
help/usage
.TP
-.B \fB\-d\fR <Directory Managers DN>
+.B \fB\-d, \-\-rootDN\fR <Directory Managers DN>
DEFAULT \-> cn=directory manager
.TP
-.B \fB\-s\fR <Number of results to return per category>
+.B \fB\-D, \-\-data\fR <Location for temporary data files>
+DEFAULT \-> /tmp
+.br
+TIP \-> If there is not enough RAM, a RAM disk can be used instead:
+
+ mkdir /dev/shm/logconv, and use this directory for the "-D" value.
+.TP
+.B \fB\-s, \-\-sizeLimit\fR <Number of results to return per category>
DEFAULT \-> 20
.TP
-.B \fB\-X\fR <IP address to exclude from connection stats>
+.B \fB\-X, \-\-excludeIP\fR <IP address to exclude from connection stats>
E.g. Load balancers
.TP
-.B \fB\-v\fR show version of tool
+.B \fB\-v, \-\-version\fR show version of tool
Print version of the tool
.TP
-.B \fB\-S\fR <time to begin analyzing logfile from>
+.B \fB\-S, \-\-startTime\fR <time to begin analyzing logfile from>
Time to begin analyzing logfile from
-E.g. [28/Mar/2002:13:14:22 \fB\-0800]\fR
+E.g. [28/Mar/2002:13:14:22 \f \-0800]\fR
.TP
-.B \fB\-E\fR <time to stop analyzing logfile>
+.B \fB\-E, \-\-endTime\fR <time to stop analyzing logfile>
Time to stop analyzing logfile from
-E.g. [28/Mar/2002:13:24:62 \fB\-0800]\fR
+E.g. [28/Mar/2002:13:24:62 \f \-0800]\fR
+.TP
+.B \fB\-M, \-\-reportFileMins\fR <CSV output file>
+This option creates a CSV report for spreadsheets.
+.TP
+.B \fB\-m, \-\-reportFileSecs\fR <CSV output file>
+This option creates a CSV report for spreadsheets.
+.TP
+.B \fB\-B, \-\-bind\fR <ALL | ANONYMOUS | "Bind DN">
+This generates a report based on either ALL bind dn's, anonymous binds, or a specific DN.
.TP
-\fB\-V\fR <enable verbose output \- includes all stats listed below>
+\fB\-V, \-\-verbose\fR <enable verbose output \- includes all stats listed below>
Verbose output
.TP
.B \fB\-[efcibaltnxgju]\fR
10 years, 8 months