ldap/servers
by William Brown
ldap/servers/slapd/counters.c | 6 +++---
ldap/servers/slapd/csn.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit d46a0f6479417e32db7f91a019f7bcffabe80f82
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Sep 5 10:01:38 2016 +1000
Ticket 48979 - Strict Prototypes
Bug Description: Fix strict prototypes for freeipa development.
Fix Description: If csn and counters to use (void) rather than () in function
definitions.
https://fedorahosted.org/389/ticket/48979
Author: wibrown
Review by: lslebodn (Thanks!)
diff --git a/ldap/servers/slapd/counters.c b/ldap/servers/slapd/counters.c
index 19e6562..1d4ac89 100644
--- a/ldap/servers/slapd/counters.c
+++ b/ldap/servers/slapd/counters.c
@@ -29,7 +29,7 @@ static int num_counters= 0;
static struct counter *counters= NULL;
static int
-count_counters()
+count_counters(void)
{
int i= 0;
PR_DEFINE_COUNTER(qh);
@@ -51,7 +51,7 @@ count_counters()
}
static int
-do_fetch_counters()
+do_fetch_counters(void)
{
int i= 0;
PR_DEFINE_COUNTER(qh);
@@ -79,7 +79,7 @@ do_fetch_counters()
}
static void
-fetch_counters()
+fetch_counters(void)
{
int i;
if(counters==NULL)
diff --git a/ldap/servers/slapd/csn.c b/ldap/servers/slapd/csn.c
index a3f4815..203789d 100644
--- a/ldap/servers/slapd/csn.c
+++ b/ldap/servers/slapd/csn.c
@@ -44,7 +44,7 @@ static Slapi_Counter *slapi_csn_counter_exist;
#ifdef DEBUG
static void
-csn_create_counters()
+csn_create_counters(void)
{
slapi_csn_counter_created = slapi_counter_new();
slapi_csn_counter_deleted = slapi_counter_new();
@@ -53,7 +53,7 @@ csn_create_counters()
}
#endif
-CSN *csn_new()
+CSN *csn_new(void)
{
#ifdef DEBUG
if(!counters_created)
7 years, 7 months
include/ldaputil include/libaccess include/libadmin include/netsite.h include/public ldap/include ldap/libraries ldap/servers lib/libsi18n
by William Brown
include/ldaputil/certmap.h | 2
include/ldaputil/ldaputil.h | 2
include/libaccess/aclproto.h | 2
include/libadmin/libadmin.h | 2
include/netsite.h | 2
include/public/nsacl/plistdef.h | 2
ldap/include/avl.h | 35 -
ldap/libraries/libavl/avl.c | 26
ldap/servers/plugins/acct_usability/acct_usability.c | 4
ldap/servers/plugins/acctpolicy/acct_init.c | 2
ldap/servers/plugins/acl/acl.h | 40 -
ldap/servers/plugins/acl/acl_ext.c | 12
ldap/servers/plugins/acl/acllist.c | 19
ldap/servers/plugins/acl/aclplugin.c | 2
ldap/servers/plugins/automember/automember.c | 14
ldap/servers/plugins/automember/automember.h | 12
ldap/servers/plugins/chainingdb/cb.h | 10
ldap/servers/plugins/chainingdb/cb_conn_stateless.c | 4
ldap/servers/plugins/cos/cos.c | 4
ldap/servers/plugins/cos/cos_cache.c | 14
ldap/servers/plugins/cos/cos_cache.h | 4
ldap/servers/plugins/deref/deref.c | 4
ldap/servers/plugins/dna/dna.c | 38 -
ldap/servers/plugins/http/http_client.c | 2
ldap/servers/plugins/http/http_client.h | 2
ldap/servers/plugins/http/http_impl.c | 6
ldap/servers/plugins/http/http_impl.h | 2
ldap/servers/plugins/linkedattrs/linked_attrs.c | 8
ldap/servers/plugins/linkedattrs/linked_attrs.h | 16
ldap/servers/plugins/memberof/memberof.h | 24
ldap/servers/plugins/mep/mep.c | 14
ldap/servers/plugins/mep/mep.h | 12
ldap/servers/plugins/pam_passthru/pam_passthru.h | 18
ldap/servers/plugins/pam_passthru/pam_ptconfig.c | 6
ldap/servers/plugins/passthru/passthru.h | 2
ldap/servers/plugins/posix-winsync/posix-group-func.h | 8
ldap/servers/plugins/posix-winsync/posix-winsync.c | 4
ldap/servers/plugins/posix-winsync/posix-wsp-ident.h | 32 -
ldap/servers/plugins/presence/presence.c | 18
ldap/servers/plugins/pwdstorage/pwdstorage.h | 2
ldap/servers/plugins/referint/referint.c | 28
ldap/servers/plugins/replication/cl4.h | 4
ldap/servers/plugins/replication/cl5.h | 8
ldap/servers/plugins/replication/cl5_api.c | 60 +-
ldap/servers/plugins/replication/cl5_api.h | 18
ldap/servers/plugins/replication/cl5_clcache.c | 8
ldap/servers/plugins/replication/cl5_clcache.h | 4
ldap/servers/plugins/replication/csnpl.h | 2
ldap/servers/plugins/replication/legacy_consumer.c | 4
ldap/servers/plugins/replication/llist.h | 2
ldap/servers/plugins/replication/repl.h | 32 -
ldap/servers/plugins/replication/repl5.h | 42 -
ldap/servers/plugins/replication/repl5_inc_protocol.c | 2
ldap/servers/plugins/replication/repl5_init.c | 2
ldap/servers/plugins/replication/repl5_prot_private.h | 8
ldap/servers/plugins/replication/repl5_replica_config.c | 8
ldap/servers/plugins/replication/repl_init.c | 2
ldap/servers/plugins/replication/repl_shared.h | 4
ldap/servers/plugins/replication/replutil.c | 2
ldap/servers/plugins/replication/windowsrepl.h | 2
ldap/servers/plugins/rever/rever.h | 2
ldap/servers/plugins/roles/roles_cache.c | 12
ldap/servers/plugins/roles/roles_cache.h | 6
ldap/servers/plugins/roles/roles_plugin.c | 2
ldap/servers/plugins/rootdn_access/rootdn_access.c | 6
ldap/servers/plugins/sync/sync.h | 4
ldap/servers/plugins/sync/sync_persist.c | 8
ldap/servers/plugins/syntaxes/bin.c | 2
ldap/servers/plugins/syntaxes/bitstring.c | 2
ldap/servers/plugins/syntaxes/ces.c | 2
ldap/servers/plugins/syntaxes/cis.c | 2
ldap/servers/plugins/syntaxes/dn.c | 2
ldap/servers/plugins/syntaxes/int.c | 2
ldap/servers/plugins/syntaxes/nameoptuid.c | 2
ldap/servers/plugins/syntaxes/numericstring.c | 2
ldap/servers/plugins/syntaxes/tel.c | 2
ldap/servers/plugins/syntaxes/validate_task.c | 4
ldap/servers/plugins/usn/usn.c | 2
ldap/servers/plugins/usn/usn.h | 4
ldap/servers/plugins/usn/usn_cleanup.c | 2
ldap/servers/plugins/views/views.c | 20
ldap/servers/slapd/agtmmap.h | 2
ldap/servers/slapd/attrsyntax.c | 6
ldap/servers/slapd/auth.c | 8
ldap/servers/slapd/back-ldbm/dblayer.c | 20
ldap/servers/slapd/back-ldbm/idl.c | 2
ldap/servers/slapd/back-ldbm/idl_new.c | 2
ldap/servers/slapd/back-ldbm/idl_shim.c | 6
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 24
ldap/servers/slapd/back-ldbm/sort.c | 2
ldap/servers/slapd/back-ldbm/vlv_key.h | 2
ldap/servers/slapd/back-ldbm/vlv_srch.h | 4
ldap/servers/slapd/ch_malloc.c | 2
ldap/servers/slapd/connection.c | 2
ldap/servers/slapd/csngen.c | 10
ldap/servers/slapd/daemon.c | 22
ldap/servers/slapd/detach.c | 2
ldap/servers/slapd/dn.c | 12
ldap/servers/slapd/dse.c | 4
ldap/servers/slapd/entry.c | 3
ldap/servers/slapd/eventq.c | 2
ldap/servers/slapd/factory.c | 2
ldap/servers/slapd/fe.h | 24
ldap/servers/slapd/fedse.c | 8
ldap/servers/slapd/filter.c | 3
ldap/servers/slapd/filterentry.c | 23
ldap/servers/slapd/generation.c | 2
ldap/servers/slapd/getfilelist.c | 3
ldap/servers/slapd/index_subsys.h | 2
ldap/servers/slapd/index_subsystem.c | 6
ldap/servers/slapd/ldaputil.c | 4
ldap/servers/slapd/libglobs.c | 158 ++---
ldap/servers/slapd/localhost.c | 4
ldap/servers/slapd/log.c | 12
ldap/servers/slapd/main.c | 42 -
ldap/servers/slapd/mapping_tree.c | 14
ldap/servers/slapd/plugin.c | 14
ldap/servers/slapd/plugin_mr.c | 4
ldap/servers/slapd/protect_db.c | 8
ldap/servers/slapd/protect_db.h | 2
ldap/servers/slapd/proto-slap.h | 460 ++++++++--------
ldap/servers/slapd/psearch.c | 4
ldap/servers/slapd/resourcelimit.c | 4
ldap/servers/slapd/sasl_map.c | 4
ldap/servers/slapd/saslbind.c | 4
ldap/servers/slapd/schema.c | 4
ldap/servers/slapd/slap.h | 14
ldap/servers/slapd/slapi-plugin.h | 2
ldap/servers/slapd/slapi-private.h | 59 +-
ldap/servers/slapd/snmp_collator.c | 30 -
ldap/servers/slapd/snmp_collator.h | 4
ldap/servers/slapd/ssl.c | 12
ldap/servers/slapd/str2filter.c | 6
ldap/servers/slapd/tools/ldclt/ldcltU.c | 2
ldap/servers/slapd/tools/pwenc.c | 7
ldap/servers/slapd/tools/rsearch/infadd.c | 2
ldap/servers/slapd/tools/rsearch/nametable.h | 2
ldap/servers/slapd/tools/rsearch/rsearch.c | 6
ldap/servers/slapd/util.c | 4
ldap/servers/slapd/uuid.c | 18
ldap/servers/slapd/uuid.h | 2
ldap/servers/slapd/vattr.c | 12
ldap/servers/snmp/ldap-agent.h | 2
ldap/servers/snmp/main.c | 2
lib/libsi18n/makstrdb.c | 2
145 files changed, 976 insertions(+), 928 deletions(-)
New commits:
commit 5b0c9c0a90b73f0b1a200d9ccb1209ccc5dcd7e3
Author: Lukas Slebodnik <lslebodn(a)redhat.com>
Date: Fri Sep 2 15:10:44 2016 +0000
Ticket 48979 - Allow to compile 389ds with warning Wstrict-prototypes
- Remove unused forward declaration
- Remove declaration of errno
The declaration of errno is in the header file errno.h
which is alreadu included in ldap/servers/slapd/agtmmap.h
- Remove explicit casting of db_env_set_func_exists
- Fix casting of db_env_set_func_seek calback
- Fix prototype of str2simple
- Fix prototypes in str2filter.c
ldap/servers/slapd/str2filter.c:22:15: warning: function declaration isn't a prototype [-Wstrict-prototypes]
static struct slapi_filter *str2list();
^~~~~~~~~~~~
ldap/servers/slapd/str2filter.c:23:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
static int str2subvals();
- Fix prototype vlv_getindexnames
- Fix prototypes in plugins/replication/repl5_prot_private.h
Use exact prototypes for functions Windows_Tot_Protocol_new and
Windows_Inc_Protocol_new
- Fix prototype setup_internal_backends
- Fix prototypes in repl5_prot_private.h
- Fix declaration of get_substring_filter
- Fix declarations in ldap/servers/slapd/filterentry.c
- Prepare for fixing avl_free prototype
The prototyep of the function avl_free is:
"int avl_free(Avlnode *root, IFP dfree);"
and IFP is a typedef for function returning int
with undefined parameters.
This patch definition of callbacks used in function avl_free
to avoid warnings Wincompatible-pointer-types
e.g.
ldap/servers/plugins/roles/roles_cache.c: In function 'roles_cache_role_object_free':
ldap/servers/plugins/roles/roles_cache.c:2145:35: warning: passing argument 2 of 'avl_free' from incompatible pointer type [-Wincompatible-pointer-types]
avl_free(this_role->avl_tree, roles_cache_role_object_nested_free);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ldap/servers/slapd/slap.h:113:0,
from ldap/servers/plugins/roles/roles_cache.c:24:
./ldap/include/avl.h:75:13: note: expected 'IFP {aka int (*)()}' but argument is of type 'void (*)(role_object_nested *) {aka void (*)(struct _role_object_nested *)}'
extern int avl_free( Avlnode *root, IFP dfree );
^~~~~~~~
- Use strict prototypes in avl.h
There is a change in definiton of avl_ functions.
The type of data was changed caddr_t into "void *".
This change was necessary because avl_* functions
were used also with other tyes then caddr_t and there
would be compile time warning Wincompatible-pointer-types
There is still one declaration/typedef which is not
prototype. And it is a typedef for callbacks (IFP)
which is used by avl_* functions and cannot have defined
argumets.
- Suppress warnings caused by undefined parameters in IFP
- Suppress Wstrict-prototypes
- Fix warnings Wstrict-prototypes
Functions which does not expect any agumets shoudl be declared with void
as parameter otherwise they can expect any count of arguments.
https://fedorahosted.org/389/ticket/48979
Author: lslebodn
Review by: wibrown (Thanks so much Lukas!)
diff --git a/include/ldaputil/certmap.h b/include/ldaputil/certmap.h
index 5b71c6d..ca66469 100644
--- a/include/ldaputil/certmap.h
+++ b/include/ldaputil/certmap.h
@@ -121,7 +121,7 @@ NSAPI_PUBLIC void *ldapu_realloc (void *ptr, int size);
NSAPI_PUBLIC void ldapu_free (void *ptr);
-NSAPI_PUBLIC int ldaputil_exit ();
+NSAPI_PUBLIC int ldaputil_exit(void);
#ifdef __cplusplus
}
diff --git a/include/ldaputil/ldaputil.h b/include/ldaputil/ldaputil.h
index 23fa3a0..7e586f1 100644
--- a/include/ldaputil/ldaputil.h
+++ b/include/ldaputil/ldaputil.h
@@ -74,7 +74,7 @@ extern void ldapu_certmap_listinfo_free (void *certmap_listinfo);
extern void ldapu_propval_list_free (void *propval_list);
-NSAPI_PUBLIC extern int ldaputil_exit ();
+NSAPI_PUBLIC extern int ldaputil_exit(void);
NSAPI_PUBLIC extern int ldapu_cert_to_user (void *cert, LDAP *ld,
const char *basedn,
diff --git a/include/libaccess/aclproto.h b/include/libaccess/aclproto.h
index 3ff89f5..ab8fdf9 100644
--- a/include/libaccess/aclproto.h
+++ b/include/libaccess/aclproto.h
@@ -118,7 +118,7 @@ NSAPI_PUBLIC int ACL_DatabaseNamesFree(NSErr_t *errp, char **names, int count);
NSAPI_PUBLIC int ACL_InitAttr2Index(void);
NSAPI_PUBLIC int ACL_Attr2Index(const char *attrname);
-NSAPI_PUBLIC void ACL_Attr2IndexListDestroy();
+NSAPI_PUBLIC void ACL_Attr2IndexListDestroy(void);
NSAPI_PUBLIC void ACL_AttrGetterHashDestroy(void);
NSAPI_PUBLIC void ACL_Destroy(void);
NSAPI_PUBLIC void ACL_DestroyPools(void);
diff --git a/include/libadmin/libadmin.h b/include/libadmin/libadmin.h
index 7db6d13..3336199 100644
--- a/include/libadmin/libadmin.h
+++ b/include/libadmin/libadmin.h
@@ -61,7 +61,7 @@ NSAPI_PUBLIC int ADM_Init(void);
/* Since everyone seems to be doing this independently, at least centralize
the code. Useful for onClicks and automatic help */
-NSAPI_PUBLIC char *helpJavaScript();
+NSAPI_PUBLIC char *helpJavaScript(void);
NSAPI_PUBLIC char *helpJavaScriptForTopic( char *topic );
/* Report an error. Takes 3 args: 1. Category of error
diff --git a/include/netsite.h b/include/netsite.h
index 9db5cb1..f80aaee 100644
--- a/include/netsite.h
+++ b/include/netsite.h
@@ -104,7 +104,7 @@ NSAPI_PUBLIC char *INTdns_guess_domain(char * hname);
#ifdef INTNSAPI
-NSAPI_PUBLIC char *INTsystem_version();
+NSAPI_PUBLIC char *INTsystem_version(void);
/*
Depending on the system, memory allocated via these macros may come from
diff --git a/include/public/nsacl/plistdef.h b/include/public/nsacl/plistdef.h
index cdf9fb4..fdc5be4 100644
--- a/include/public/nsacl/plistdef.h
+++ b/include/public/nsacl/plistdef.h
@@ -45,7 +45,7 @@ typedef struct PListStruct_s *PList_t;
#ifdef __cplusplus
typedef void (PListFunc_t)(char*, const void*, void*);
#else
-typedef void (PListFunc_t)();
+typedef void (PListFunc_t)(void);
#endif
#ifndef INTNSACL
diff --git a/ldap/include/avl.h b/ldap/include/avl.h
index 7f4fe68..34209cc 100644
--- a/ldap/include/avl.h
+++ b/ldap/include/avl.h
@@ -39,6 +39,20 @@ typedef struct avlnode {
struct avlnode *avl_right;
} Avlnode;
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
+#ifndef _IFP
+#define _IFP
+typedef int (*IFP)(); /* takes undefined arguments */
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic pop
+#endif
+
#define NULLAVL ((Avlnode *) NULL)
/* balance factor values */
@@ -49,14 +63,14 @@ typedef struct avlnode {
/* avl routines */
#define avl_getone(x) (x == 0 ? 0 : (x)->avl_data)
#define avl_onenode(x) (x == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
-extern int avl_insert();
-extern caddr_t avl_delete();
-extern caddr_t avl_find();
-extern caddr_t avl_getfirst();
-extern caddr_t avl_getnext();
-extern int avl_dup_error();
-extern int avl_apply();
-extern int avl_free();
+extern int avl_insert(Avlnode **root, void *data, IFP fcmp, IFP fdup);
+extern caddr_t avl_delete(Avlnode **root, void *data, IFP fcmp );
+extern caddr_t avl_find(Avlnode *root, void *data, IFP fcmp );
+extern caddr_t avl_getfirst(Avlnode *root );
+extern caddr_t avl_getnext(void);
+extern int avl_dup_error(void);
+extern int avl_apply(Avlnode *root, IFP fn, void *arg, int stopflag, int type);
+extern int avl_free(Avlnode *root, IFP dfree);
/* apply traversal types */
#define AVL_PREORDER 1
@@ -65,11 +79,6 @@ extern int avl_free();
/* what apply returns if it ran out of nodes */
#define AVL_NOMORE -6
-#ifndef _IFP
-#define _IFP
-typedef int (*IFP)();
-#endif
-
caddr_t avl_find_lin( Avlnode *root, caddr_t data, IFP fcmp );
#endif /* _AVL */
diff --git a/ldap/libraries/libavl/avl.c b/ldap/libraries/libavl/avl.c
index 72651cf..d3e705b 100644
--- a/ldap/libraries/libavl/avl.c
+++ b/ldap/libraries/libavl/avl.c
@@ -218,14 +218,14 @@ ravl_insert(
int
avl_insert(
Avlnode **root,
- caddr_t data,
+ void *data,
IFP fcmp,
IFP fdup
)
{
int taller;
- return( ravl_insert( root, data, &taller, fcmp, fdup, 0 ) );
+ return ravl_insert( root, (caddr_t)data, &taller, fcmp, fdup, 0 );
}
/*
@@ -458,11 +458,11 @@ ravl_delete(
*/
caddr_t
-avl_delete( Avlnode **root, caddr_t data, IFP fcmp )
+avl_delete( Avlnode **root, void *data, IFP fcmp )
{
int shorter;
- return( ravl_delete( root, data, fcmp, &shorter ) );
+ return ravl_delete( root, (caddr_t)data, fcmp, &shorter );
}
static int
@@ -536,18 +536,18 @@ int
avl_apply(
Avlnode *root,
IFP fn,
- caddr_t arg,
+ void *arg,
int stopflag,
int type
)
{
switch ( type ) {
case AVL_INORDER:
- return( avl_inapply( root, fn, arg, stopflag ) );
+ return avl_inapply( root, fn, (caddr_t)arg, stopflag);
case AVL_PREORDER:
- return( avl_preapply( root, fn, arg, stopflag ) );
+ return avl_preapply( root, fn, (caddr_t)arg, stopflag);
case AVL_POSTORDER:
- return( avl_postapply( root, fn, arg, stopflag ) );
+ return avl_postapply( root, fn, (caddr_t)arg, stopflag);
default:
fprintf( stderr, "Invalid traversal type %d\n", type );
return( -1 );
@@ -649,11 +649,11 @@ avl_free( Avlnode *root, IFP dfree )
*/
caddr_t
-avl_find( Avlnode *root, caddr_t data, IFP fcmp )
+avl_find(Avlnode *root, void *data, IFP fcmp)
{
int cmp;
- while ( root != 0 && (cmp = (*fcmp)( data, root->avl_data )) != 0 ) {
+ while ( root != 0 && (cmp = (*fcmp)( (caddr_t)data, root->avl_data )) != 0 ) {
if ( cmp < 0 )
root = root->avl_left;
else
@@ -753,7 +753,7 @@ avl_getfirst( Avlnode *root )
}
caddr_t
-avl_getnext()
+avl_getnext(void)
{
if ( avl_list == 0 )
return( 0 );
@@ -767,12 +767,12 @@ avl_getnext()
return( avl_list[ avl_nextlist++ ] );
}
-int avl_dup_error()
+int avl_dup_error(void)
{
return( -1 );
}
-int avl_dup_ok()
+int avl_dup_ok(void)
{
return( 0 );
}
diff --git a/ldap/servers/plugins/acct_usability/acct_usability.c b/ldap/servers/plugins/acct_usability/acct_usability.c
index 21d3fac..09c2ee4 100644
--- a/ldap/servers/plugins/acct_usability/acct_usability.c
+++ b/ldap/servers/plugins/acct_usability/acct_usability.c
@@ -53,7 +53,7 @@ auc_set_plugin_id(void *pluginID)
}
void *
-auc_get_plugin_id()
+auc_get_plugin_id(void)
{
return _PluginID;
}
@@ -65,7 +65,7 @@ auc_set_plugin_dn(char *pluginDN)
}
char *
-auc_get_plugin_dn()
+auc_get_plugin_dn(void)
{
return _PluginDN;
}
diff --git a/ldap/servers/plugins/acctpolicy/acct_init.c b/ldap/servers/plugins/acctpolicy/acct_init.c
index 0b1af91..4584765 100644
--- a/ldap/servers/plugins/acctpolicy/acct_init.c
+++ b/ldap/servers/plugins/acctpolicy/acct_init.c
@@ -75,7 +75,7 @@ acct_policy_set_plugin_id(void *pluginID)
}
void *
-acct_policy_get_plugin_id()
+acct_policy_get_plugin_id(void)
{
return _PluginID;
}
diff --git a/ldap/servers/plugins/acl/acl.h b/ldap/servers/plugins/acl/acl.h
index 9818c03..fd3b098 100644
--- a/ldap/servers/plugins/acl/acl.h
+++ b/ldap/servers/plugins/acl/acl.h
@@ -765,7 +765,7 @@ extern int DS_LASSSFEval(NSErr_t *errp, char *attribute,
PList_t global_auth);
/* other function declaration */
-int aclinit_main();
+int aclinit_main(void);
int acl_match_substring (struct slapi_filter *f, char *str, int match);
void acl_print_acllib_err(NSErr_t *errp, char * str);
void acl_initBlock ( Slapi_PBlock *pb );
@@ -798,8 +798,8 @@ int acl_verify_syntax(Slapi_PBlock *pb, const Slapi_DN *e_sdn,
int acllist_insert_aci_needsLock_ext( Slapi_PBlock *pb, const Slapi_DN *e_sdn,
const struct berval* aci_attr);
char * acl_access2str ( int access );
-int acl_init_ext ();
-void acl_remove_ext ();
+int acl_init_ext(void);
+void acl_remove_ext(void);
void * acl_get_ext (ext_type type, void *object);
void acl_set_ext (ext_type type, void *object, void *data);
void acl_reset_ext_status (ext_type type, void *object);
@@ -813,19 +813,19 @@ void acl_copyEval_context ( struct acl_pblock *aclpb, aclEvalContext *src
aclEvalContext *dest , int copy_attr_only );
struct acl_pblock * acl_get_aclpb ( Slapi_PBlock *pb, int type );
int acl_client_anonymous ( Slapi_PBlock *pb );
-short acl_get_aclsignature();
+short acl_get_aclsignature(void);
void acl_set_aclsignature( short value);
-void acl_regen_aclsignature();
+void acl_regen_aclsignature(void);
struct acl_pblock * acl_new_proxy_aclpb( Slapi_PBlock *pb );
void acl_set_authorization_dn( Slapi_PBlock *pb, char *dn, int type );
void acl_init_aclpb ( Slapi_PBlock *pb , Acl_PBlock *aclpb,
const char *dn, int copy_from_aclcb);
-int acl_create_aclpb_pool ();
-void acl_destroy_aclpb_pool ();
+int acl_create_aclpb_pool(void);
+void acl_destroy_aclpb_pool(void);
int acl_skip_access_check ( Slapi_PBlock *pb, Slapi_Entry *e, int access );
-int aclext_alloc_lockarray ();
-void aclext_free_lockarray();
+int aclext_alloc_lockarray(void);
+void aclext_free_lockarray(void);
int aclutil_str_append(char **str1, const char *str2);
void aclutil_print_err (int rv , const Slapi_DN *sdn,
@@ -839,7 +839,7 @@ char * aclutil_expand_paramString ( char *str, Slapi_Entry *e );
void acllist_init_scan (Slapi_PBlock *pb, int scope, const char *base);
aci_t * acllist_get_first_aci (Acl_PBlock *aclpb, PRUint32 *cookie );
aci_t * acllist_get_next_aci ( Acl_PBlock *aclpb, aci_t *curraci, PRUint32 *cookie );
-aci_t * acllist_get_aci_new ();
+aci_t * acllist_get_aci_new(void);
void acllist_free_aci (aci_t *item);
void acllist_acicache_READ_UNLOCK(void);
void acllist_acicache_READ_LOCK(void);
@@ -847,13 +847,13 @@ void acllist_acicache_WRITE_UNLOCK(void);
void acllist_acicache_WRITE_LOCK(void);
void acllist_aciscan_update_scan ( Acl_PBlock *aclpb, char *edn );
int acllist_remove_aci_needsLock( const Slapi_DN *sdn, const struct berval *attr );
-void free_acl_avl_list();
+void free_acl_avl_list(void);
int acllist_insert_aci_needsLock( const Slapi_DN *e_sdn, const struct berval* aci_attr);
-int acllist_init ();
-void acllist_free();
+int acllist_init(void);
+void acllist_free(void);
int acllist_moddn_aci_needsLock ( Slapi_DN *oldsdn, char *newdn );
void acllist_print_tree ( Avlnode *root, int *depth, char *start, char *side);
-AciContainer *acllist_get_aciContainer_new ( );
+AciContainer *acllist_get_aciContainer_new(void);
void acllist_free_aciContainer ( AciContainer **container);
void acllist_done_aciContainer ( AciContainer *);
void free_targetattrfilters( Targetattrfilter ***attrFilterArray);
@@ -863,9 +863,9 @@ void aclg_regen_ugroup_signature( aclUserGroup *ugroup);
void aclg_markUgroupForRemoval ( aclUserGroup *u_group );
void aclg_reader_incr_ugroup_refcnt(aclUserGroup* u_group);
int aclg_numof_usergroups(void);
-int aclgroup_init ();
-void aclgroup_free();
-void aclg_regen_group_signature ();
+int aclgroup_init(void);
+void aclgroup_free(void);
+void aclg_regen_group_signature(void);
void aclg_reset_userGroup ( struct acl_pblock *aclpb );
void aclg_init_userGroup ( struct acl_pblock *aclpb, const char *dn , int got_lock);
aclUserGroup * aclg_get_usersGroup ( struct acl_pblock *aclpb , char *n_dn);
@@ -873,11 +873,11 @@ aclUserGroup * aclg_get_usersGroup ( struct acl_pblock *aclpb , char *n_dn);
void aclg_lock_groupCache (int type );
void aclg_unlock_groupCache (int type );
-int aclanom_init();
+int aclanom_init(void);
int aclanom_match_profile (Slapi_PBlock *pb, struct acl_pblock *aclpb,
Slapi_Entry *e, char *attr, int access);
void aclanom_get_suffix_info(Slapi_Entry *e, struct acl_pblock *aclpb );
-void aclanom_invalidateProfile();
+void aclanom_invalidateProfile(void);
void aclanom__del_profile (int closing);
typedef enum{
@@ -888,7 +888,7 @@ typedef enum{
}acl_lock_flag_t;
void aclanom_gen_anomProfile (acl_lock_flag_t lock_flag);
int aclanom_is_client_anonymous ( Slapi_PBlock *pb );
-int aclinit_main ();
+int aclinit_main(void);
typedef struct aclinit_handler_callback_data {
#define ACL_ADD_ACIS 1
#define ACL_REMOVE_ACIS 0
diff --git a/ldap/servers/plugins/acl/acl_ext.c b/ldap/servers/plugins/acl/acl_ext.c
index 7c2e275..5ef20f8 100644
--- a/ldap/servers/plugins/acl/acl_ext.c
+++ b/ldap/servers/plugins/acl/acl_ext.c
@@ -18,11 +18,11 @@ static void acl__done_aclpb ( struct acl_pblock *aclpb );
static void acl__dump_stats ( struct acl_pblock *aclpb , const char *block_type);
static char * acl__get_aclpb_type ( Acl_PBlock *aclpb );
#endif
-static Acl_PBlock * acl__get_aclpb_from_pool ( );
+static Acl_PBlock * acl__get_aclpb_from_pool(void);
static int acl__put_aclpb_back_to_pool ( Acl_PBlock *aclpb );
-static Acl_PBlock * acl__malloc_aclpb ( );
+static Acl_PBlock * acl__malloc_aclpb(void);
static void acl__free_aclpb ( Acl_PBlock **aclpb_ptr);
-static PRLock *aclext_get_lock ();
+static PRLock *aclext_get_lock(void);
struct acl_pbqueue {
@@ -179,7 +179,7 @@ aclext_free_lockarray()
static PRUint32 slot_id =0;
static PRLock *
-aclext_get_lock ()
+aclext_get_lock(void)
{
PRUint16 slot = slot_id % ACLEXT_MAX_LOCKS;
@@ -545,7 +545,7 @@ acl_destroy_aclpb_pool ()
*
*/
static Acl_PBlock *
-acl__get_aclpb_from_pool ( )
+acl__get_aclpb_from_pool(void)
{
Acl_PBlock *aclpb = NULL;
Acl_PBlock *t_aclpb = NULL;
@@ -626,7 +626,7 @@ acl__put_aclpb_back_to_pool ( Acl_PBlock *aclpb )
*
*/
static Acl_PBlock *
-acl__malloc_aclpb ( )
+acl__malloc_aclpb(void)
{
Acl_PBlock *aclpb = NULL;
diff --git a/ldap/servers/plugins/acl/acllist.c b/ldap/servers/plugins/acl/acllist.c
index cc0e9b3..2db505c 100644
--- a/ldap/servers/plugins/acl/acllist.c
+++ b/ldap/servers/plugins/acl/acllist.c
@@ -68,7 +68,7 @@ static int __acllist_aciContainer_node_dup ( caddr_t d1, caddr_t d2 );
void my_print( Avlnode *root );
int
-acllist_init ()
+acllist_init(void)
{
if (( aci_rwlock = slapi_new_rwlock() ) == NULL ) {
@@ -86,7 +86,7 @@ acllist_init ()
}
void
-acllist_free()
+acllist_free(void)
{
if(aci_rwlock){
slapi_destroy_rwlock(aci_rwlock);
@@ -470,7 +470,7 @@ acllist_done_aciContainer ( AciContainer *head )
head->acic_list = NULL;
}
-static void
+static int
free_aci_avl_container(AciContainer *data)
{
aci_t *head, *next = NULL;
@@ -485,17 +485,18 @@ free_aci_avl_container(AciContainer *data)
data->acic_list = NULL;
acllist_free_aciContainer(&data);
+ return 0;
}
void
-free_acl_avl_list()
+free_acl_avl_list(void)
{
avl_free(acllistRoot,free_aci_avl_container);
acllistRoot = NULL;
}
aci_t *
-acllist_get_aci_new ()
+acllist_get_aci_new(void)
{
aci_t *aci_item;
@@ -862,14 +863,14 @@ start:
}
void
-acllist_acicache_READ_UNLOCK( )
+acllist_acicache_READ_UNLOCK(void)
{
ACILIST_UNLOCK_READ ();
}
void
-acllist_acicache_READ_LOCK()
+acllist_acicache_READ_LOCK(void)
{
/* get a reader lock */
ACILIST_LOCK_READ ();
@@ -877,14 +878,14 @@ acllist_acicache_READ_LOCK()
}
void
-acllist_acicache_WRITE_UNLOCK( )
+acllist_acicache_WRITE_UNLOCK(void)
{
ACILIST_UNLOCK_WRITE ();
}
void
-acllist_acicache_WRITE_LOCK( )
+acllist_acicache_WRITE_LOCK(void)
{
ACILIST_LOCK_WRITE ();
diff --git a/ldap/servers/plugins/acl/aclplugin.c b/ldap/servers/plugins/acl/aclplugin.c
index f48b327..d963bd7 100644
--- a/ldap/servers/plugins/acl/aclplugin.c
+++ b/ldap/servers/plugins/acl/aclplugin.c
@@ -267,7 +267,7 @@ aclplugin_init (Slapi_PBlock *pb )
{
int rc = 0; /* OK */
- rc = aclinit_main ( pb );
+ rc = aclinit_main();
return rc;
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index 269d752..d4c0707 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -54,8 +54,8 @@ static int automember_add_pre_op(Slapi_PBlock *pb);
/*
* Config cache management functions
*/
-static int automember_load_config();
-static void automember_delete_config();
+static int automember_load_config(void);
+static void automember_delete_config(void);
static int automember_parse_config_entry(Slapi_Entry * e, int apply);
static void automember_free_config_entry(struct configEntry ** entry);
@@ -63,7 +63,7 @@ static void automember_free_config_entry(struct configEntry ** entry);
* helpers
*/
static Slapi_DN *automember_get_sdn(Slapi_PBlock *pb);
-static Slapi_DN *automember_get_config_area();
+static Slapi_DN *automember_get_config_area(void);
static void automember_set_config_area(Slapi_DN *sdn);
static int automember_dn_is_config(Slapi_DN *sdn);
static int automember_oktodo(Slapi_PBlock *pb);
@@ -140,7 +140,7 @@ automember_set_plugin_sdn(Slapi_DN *pluginDN)
}
Slapi_DN *
-automember_get_plugin_sdn()
+automember_get_plugin_sdn(void)
{
return _PluginDN;
}
@@ -405,7 +405,7 @@ automember_get_config()
* Parse and load the config entries.
*/
static int
-automember_load_config()
+automember_load_config(void)
{
int status = 0;
int result;
@@ -829,7 +829,7 @@ automember_delete_configEntry(PRCList *entry)
}
static void
-automember_delete_config()
+automember_delete_config(void)
{
PRCList *list;
@@ -865,7 +865,7 @@ automember_set_config_area(Slapi_DN *sdn)
}
Slapi_DN *
-automember_get_config_area()
+automember_get_config_area(void)
{
return _ConfigAreaDN;
}
diff --git a/ldap/servers/plugins/automember/automember.h b/ldap/servers/plugins/automember/automember.h
index 0e5a19a..07e7fe6 100644
--- a/ldap/servers/plugins/automember/automember.h
+++ b/ldap/servers/plugins/automember/automember.h
@@ -86,20 +86,20 @@ struct configEntry {
/*
* Config fetch function
*/
-PRCList *automember_get_config();
+PRCList *automember_get_config(void);
/*
* Config cache locking functions
*/
-void automember_config_read_lock();
-void automember_config_write_lock();
-void automember_config_unlock();
+void automember_config_read_lock(void);
+void automember_config_write_lock(void);
+void automember_config_unlock(void);
/*
* Plugin identity functions
*/
void automember_set_plugin_id(void *pluginID);
-void *automember_get_plugin_id();
+void *automember_get_plugin_id(void);
void automember_set_plugin_dn(char *pluginDN);
-char *automember_get_plugin_dn();
+char *automember_get_plugin_dn(void);
diff --git a/ldap/servers/plugins/chainingdb/cb.h b/ldap/servers/plugins/chainingdb/cb.h
index 7e9a251..5fc76df 100644
--- a/ldap/servers/plugins/chainingdb/cb.h
+++ b/ldap/servers/plugins/chainingdb/cb.h
@@ -458,19 +458,19 @@ void chainingdb_prev_search_results ( Slapi_PBlock *pb );
long cb_atol(char *str);
Slapi_Entry * cb_LDAPMessage2Entry(LDAP * ctx, LDAPMessage * msg, int attrsonly);
-char * cb_get_rootdn();
+char * cb_get_rootdn(void);
struct berval ** referrals2berval(char ** referrals);
cb_backend_instance * cb_get_instance(Slapi_Backend * be);
-cb_backend * cb_get_backend_type();
-int cb_debug_on();
+cb_backend * cb_get_backend_type(void);
+int cb_debug_on(void);
void cb_set_debug(int on);
int cb_ping_farm(cb_backend_instance *cb,cb_outgoing_conn * cnx,time_t end);
void cb_update_failed_conn_cpt ( cb_backend_instance *cb ) ;
void cb_reset_conn_cpt( cb_backend_instance *cb ) ;
int cb_check_availability( cb_backend_instance *cb, Slapi_PBlock *pb ) ;
-time_t current_time();
-char* get_localhost_DNS();
+time_t current_time(void);
+char* get_localhost_DNS(void);
/* this function is called when state of a backend changes */
void cb_be_state_change (void *handle, char *be_name, int old_be_state, int new_be_state);
diff --git a/ldap/servers/plugins/chainingdb/cb_conn_stateless.c b/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
index a63ada4..91e38ff 100644
--- a/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
+++ b/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
@@ -62,14 +62,14 @@ PRUint32 PR_GetThreadID(PRThread *thread);
/* returns the threadId of the current thread modulo MAX_CONN_ARRAY
=> gives the position of the thread in the array of secure connections */
-static int PR_ThreadSelf() {
+static int PR_ThreadSelf(void) {
PRThread *thr = PR_GetCurrentThread();
PRUint32 myself = PR_GetThreadID(thr);
myself &= 0x000007FF ;
return myself;
}
-static int PR_MyThreadId() {
+static int PR_MyThreadId(void) {
PRThread *thr = PR_GetCurrentThread();
PRUint32 myself = PR_GetThreadID(thr);
return myself;
diff --git a/ldap/servers/plugins/cos/cos.c b/ldap/servers/plugins/cos/cos.c
index 3eb83f4..75ef2ba 100644
--- a/ldap/servers/plugins/cos/cos.c
+++ b/ldap/servers/plugins/cos/cos.c
@@ -75,12 +75,12 @@ void cos_set_plugin_identity(void * identity)
cos_plugin_identity=identity;
}
-void * cos_get_plugin_identity()
+void * cos_get_plugin_identity(void)
{
return cos_plugin_identity;
}
-int cos_version()
+int cos_version(void)
{
return COS_VERSION;
}
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index e2394dd..e6889d8 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -89,14 +89,14 @@ struct objclass {
/*** from proto-slap.h ***/
-int config_get_schemacheck();
+int config_get_schemacheck(void);
void oc_lock_read( void );
void oc_unlock( void );
-struct objclass* g_get_global_oc_nolock();
+struct objclass* g_get_global_oc_nolock(void);
int slapd_log_error_proc( char *subsystem, char *fmt, ... );
/* defined in cos.c */
-void * cos_get_plugin_identity();
+void * cos_get_plugin_identity(void);
/*** end secrets ***/
@@ -199,7 +199,7 @@ typedef struct _cos_cache cosCache;
static cosCache *pCache; /* always the current global cache, only use getref to get */
/* the place to start if you want a new cache */
-static int cos_cache_create();
+static int cos_cache_create(void);
/* cache index related functions */
static int cos_cache_index_all(cosCache *pCache);
@@ -284,7 +284,7 @@ static Slapi_CondVar *start_cond = NULL;
fires off the cache re-creation when one is detected
also registers vattr callbacks
*/
-int cos_cache_init()
+int cos_cache_init(void)
{
int ret = 0;
@@ -439,7 +439,7 @@ static void cos_cache_wait_on_change(void *arg)
releasing its refcount to the old cache and allowing it
to be destroyed.
*/
-static int cos_cache_create()
+static int cos_cache_create(void)
{
int ret = -1;
cosCache *pNewCache;
@@ -3384,7 +3384,7 @@ bail:
--------------
notifies the cache thread we are stopping
*/
-void cos_cache_stop()
+void cos_cache_stop(void)
{
LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_stop\n",0,0,0);
diff --git a/ldap/servers/plugins/cos/cos_cache.h b/ldap/servers/plugins/cos/cos_cache.h
index 9903e7b..34bcd59 100644
--- a/ldap/servers/plugins/cos/cos_cache.h
+++ b/ldap/servers/plugins/cos/cos_cache.h
@@ -18,8 +18,8 @@
typedef void cos_cache;
-int cos_cache_init();
-void cos_cache_stop();
+int cos_cache_init(void);
+void cos_cache_stop(void);
int cos_cache_getref(cos_cache **ppCache);
int cos_cache_addref(cos_cache *pCache);
int cos_cache_release(cos_cache *pCache);
diff --git a/ldap/servers/plugins/deref/deref.c b/ldap/servers/plugins/deref/deref.c
index f476a4d..76c7af3 100644
--- a/ldap/servers/plugins/deref/deref.c
+++ b/ldap/servers/plugins/deref/deref.c
@@ -131,7 +131,7 @@ deref_set_plugin_id(void *pluginID)
}
void *
-deref_get_plugin_id()
+deref_get_plugin_id(void)
{
return _PluginID;
}
@@ -143,7 +143,7 @@ deref_set_plugin_dn(char *pluginDN)
}
char *
-deref_get_plugin_dn()
+deref_get_plugin_dn(void)
{
return _PluginDN;
}
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index cf640d8..c766dd1 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -221,7 +221,7 @@ static int dna_load_plugin_config(Slapi_PBlock *pb, int use_eventq);
static int dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply);
static void dna_delete_config(PRCList *list);
static void dna_free_config_entry(struct configEntry ** entry);
-static int dna_load_host_port();
+static int dna_load_host_port(void);
/**
*
@@ -263,10 +263,10 @@ static void dna_create_valcheck_filter(struct configEntry *config_entry, PRUint6
static int dna_isrepl(Slapi_PBlock *pb);
static int dna_get_remote_config_info( struct dnaServer *server, char **bind_dn, char **bind_passwd,
char **bind_method, int *is_ssl, int *port);
-static int dna_load_shared_servers();
-static void dna_delete_global_servers();
+static int dna_load_shared_servers(void);
+static void dna_delete_global_servers(void);
static int dna_get_shared_config_attr_val(struct configEntry *config_entry, char *attr, char *value);
-static PRCList *dna_config_copy();
+static PRCList *dna_config_copy(void);
/**
*
* the ops (where the real work is done)
@@ -285,7 +285,7 @@ static int dna_be_txn_mod_pre_op(Slapi_PBlock *pb);
/**
* debug functions - global, for the debugger
*/
-void dna_dump_config();
+void dna_dump_config(void);
void dna_dump_config_entry(struct configEntry *);
/*
@@ -295,7 +295,7 @@ void dna_dump_config_entry(struct configEntry *);
* hold the read lock while starting a transaction(potential deadlock).
*/
static PRCList *
-dna_config_copy()
+dna_config_copy(void)
{
PRCList *copy = (PRCList *)slapi_ch_calloc(1, sizeof(struct configEntry));
PRCList *config_list;
@@ -361,32 +361,32 @@ dna_config_copy()
* Deal with cache locking
*
*/
-void dna_read_lock()
+void dna_read_lock(void)
{
slapi_rwlock_rdlock(g_dna_cache_lock);
}
-void dna_write_lock()
+void dna_write_lock(void)
{
slapi_rwlock_wrlock(g_dna_cache_lock);
}
-void dna_unlock()
+void dna_unlock(void)
{
slapi_rwlock_unlock(g_dna_cache_lock);
}
-void dna_server_read_lock()
+void dna_server_read_lock(void)
{
slapi_rwlock_rdlock(g_dna_cache_server_lock);
}
-void dna_server_write_lock()
+void dna_server_write_lock(void)
{
slapi_rwlock_wrlock(g_dna_cache_server_lock);
}
-void dna_server_unlock()
+void dna_server_unlock(void)
{
slapi_rwlock_unlock(g_dna_cache_server_lock);
}
@@ -396,7 +396,7 @@ void dna_server_unlock()
* Get the dna plug-in version
*
*/
-int dna_version()
+int dna_version(void)
{
return DNA_PLUGIN_VERSION;
}
@@ -409,7 +409,7 @@ void setPluginID(void *pluginID)
_PluginID = pluginID;
}
-void *getPluginID()
+void *getPluginID(void)
{
return _PluginID;
}
@@ -419,7 +419,7 @@ void setPluginDN(const char *pluginDN)
_PluginDN = pluginDN;
}
-const char *getPluginDN()
+const char *getPluginDN(void)
{
return _PluginDN;
}
@@ -764,7 +764,7 @@ out:
* Free the global linkedl ist of shared servers
*/
static void
-dna_delete_global_servers()
+dna_delete_global_servers(void)
{
struct dnaServer *server, *next;
@@ -784,7 +784,7 @@ dna_delete_global_servers()
* shared server config list.
*/
static int
-dna_load_shared_servers()
+dna_load_shared_servers(void)
{
struct configEntry *config_entry = NULL;
struct dnaServer *server = NULL, *global_servers = NULL;
@@ -1521,7 +1521,7 @@ dna_delete_shared_servers(PRCList **servers)
}
static int
-dna_load_host_port()
+dna_load_host_port(void)
{
int status = DNA_SUCCESS;
Slapi_Entry *e = NULL;
@@ -4663,7 +4663,7 @@ bail:
/**
* debug functions to print config
*/
-void dna_dump_config()
+void dna_dump_config(void)
{
PRCList *list;
diff --git a/ldap/servers/plugins/http/http_client.c b/ldap/servers/plugins/http/http_client.c
index 5366bbe..4ce992c 100644
--- a/ldap/servers/plugins/http/http_client.c
+++ b/ldap/servers/plugins/http/http_client.c
@@ -105,7 +105,7 @@ static void _http_shutdown( void );
* Get the presence plug-in version
*
*/
-int http_client_version()
+int http_client_version(void)
{
return HTTP_PLUGIN_VERSION;
}
diff --git a/ldap/servers/plugins/http/http_client.h b/ldap/servers/plugins/http/http_client.h
index 936cf64..ac72dcf 100644
--- a/ldap/servers/plugins/http/http_client.h
+++ b/ldap/servers/plugins/http/http_client.h
@@ -39,7 +39,7 @@ typedef void (*api_http_init)(Slapi_ComponentId *plugin_id);
typedef int (*api_http_get_text)(char *url, char **data, int *bytesRead);
typedef int (*api_http_get_binary)(char *url, char **data, int *bytesRead);
typedef int (*api_http_get_redirected_uri)(char *url, char **data, int *bytesRead);
-typedef void (*api_http_shutdown)();
+typedef void (*api_http_shutdown)(void);
typedef int (*api_http_post)(char *url, httpheader **httpheaderArray, char *body, char **data, int *bytesRead);
/* API ID for http_apib_get_interface */
diff --git a/ldap/servers/plugins/http/http_impl.c b/ldap/servers/plugins/http/http_impl.c
index 82ba0c9..e2a141a 100644
--- a/ldap/servers/plugins/http/http_impl.c
+++ b/ldap/servers/plugins/http/http_impl.c
@@ -37,8 +37,6 @@
int slapd_log_error_proc( char *subsystem, char *fmt, ... );
-char *config_get_instancedir();
-
/*** from ldaplog.h ***/
/* edited ldaplog.h for LDAPDebug()*/
@@ -132,7 +130,7 @@ int http_impl_get_text(char *url, char **data, int *bytesRead);
int http_impl_get_binary(char *url, char **data, int *bytesRead);
int http_impl_get_redirected_uri(char *url, char **data, int *bytesRead);
int http_impl_post(char *url, httpheader **httpheaderArray, char *body, char **data, int *bytesRead);
-void http_impl_shutdown();
+void http_impl_shutdown(void);
/**
* Http handling functions
@@ -1270,7 +1268,7 @@ int http_impl_post(char *url, httpheader **httpheaderArray, char *body, char **d
return status;
}
-void http_impl_shutdown()
+void http_impl_shutdown(void)
{
/**
* Put cleanup code here
diff --git a/ldap/servers/plugins/http/http_impl.h b/ldap/servers/plugins/http/http_impl.h
index 14c9488..be21742 100644
--- a/ldap/servers/plugins/http/http_impl.h
+++ b/ldap/servers/plugins/http/http_impl.h
@@ -24,7 +24,7 @@ int http_impl_get_text(char *url, char **data, int *bytesRead);
int http_impl_get_binary(char *url, char **data, int *bytesRead);
int http_impl_get_redirected_uri(char *url, char **data, int *bytesRead);
int http_impl_post(char *url, httpheader **httpheaderArray, char *body, char **data, int *bytesRead);
-void http_impl_shutdown();
+void http_impl_shutdown(void);
#ifdef __cplusplus
}
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.c b/ldap/servers/plugins/linkedattrs/linked_attrs.c
index 27af287..72711f1 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.c
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.c
@@ -55,8 +55,8 @@ static int linked_attrs_add_pre_op(Slapi_PBlock *pb);
/*
* Config cache management functions
*/
-static int linked_attrs_load_config();
-static void linked_attrs_delete_config();
+static int linked_attrs_load_config(void);
+static void linked_attrs_delete_config(void);
static int linked_attrs_parse_config_entry(Slapi_Entry * e, int apply);
static void linked_attrs_insert_config_index(struct configEntry *entry);
static void linked_attrs_free_config_entry(struct configEntry ** entry);
@@ -380,7 +380,7 @@ linked_attrs_get_config()
* --- cn=etc
*/
static int
-linked_attrs_load_config()
+linked_attrs_load_config(void)
{
int status = 0;
int result;
@@ -783,7 +783,7 @@ linked_attrs_delete_configEntry(PRCList *entry)
}
static void
-linked_attrs_delete_config()
+linked_attrs_delete_config(void)
{
PRCList *list;
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.h b/ldap/servers/plugins/linkedattrs/linked_attrs.h
index e250855..6a6368e 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.h
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.h
@@ -79,29 +79,29 @@ typedef struct _task_data
/*
* Debug functions - global, for the debugger
*/
-void linked_attrs_dump_config();
-void linked_attrs_dump_config_index();
+void linked_attrs_dump_config(void);
+void linked_attrs_dump_config_index(void);
void linked_attrs_dump_config_entry(struct configEntry *);
/*
* Config fetch function
*/
-PRCList *linked_attrs_get_config();
+PRCList *linked_attrs_get_config(void);
/*
* Config cache locking functions
*/
-void linked_attrs_read_lock();
-void linked_attrs_write_lock();
-void linked_attrs_unlock();
+void linked_attrs_read_lock(void);
+void linked_attrs_write_lock(void);
+void linked_attrs_unlock(void);
/*
* Plugin identity functions
*/
void linked_attrs_set_plugin_id(void *pluginID);
-void *linked_attrs_get_plugin_id();
+void *linked_attrs_get_plugin_id(void);
void linked_attrs_set_plugin_dn(const char *pluginDN);
-char *linked_attrs_get_plugin_dn();
+char *linked_attrs_get_plugin_dn(void);
/*
* Fixup task callback
diff --git a/ldap/servers/plugins/memberof/memberof.h b/ldap/servers/plugins/memberof/memberof.h
index ece18e4..bea0353 100644
--- a/ldap/servers/plugins/memberof/memberof.h
+++ b/ldap/servers/plugins/memberof/memberof.h
@@ -71,22 +71,22 @@ typedef struct memberofconfig {
int memberof_config(Slapi_Entry *config_e, Slapi_PBlock *pb);
void memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src);
void memberof_free_config(MemberOfConfig *config);
-MemberOfConfig *memberof_get_config();
-void memberof_lock();
-void memberof_unlock();
-void memberof_rlock_config();
-void memberof_wlock_config();
-void memberof_unlock_config();
-int memberof_config_get_all_backends();
+MemberOfConfig *memberof_get_config(void);
+void memberof_lock(void);
+void memberof_unlock(void);
+void memberof_rlock_config(void);
+void memberof_wlock_config(void);
+void memberof_unlock_config(void);
+int memberof_config_get_all_backends(void);
void memberof_set_config_area(Slapi_DN *sdn);
-Slapi_DN * memberof_get_config_area();
+Slapi_DN * memberof_get_config_area(void);
void memberof_set_plugin_area(Slapi_DN *sdn);
-Slapi_DN * memberof_get_plugin_area();
+Slapi_DN * memberof_get_plugin_area(void);
int memberof_shared_config_validate(Slapi_PBlock *pb);
int memberof_apply_config (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e,
int *returncode, char *returntext, void *arg);
-void *memberof_get_plugin_id();
-void memberof_release_config();
-PRUint64 get_plugin_started();
+void *memberof_get_plugin_id(void);
+void memberof_release_config(void);
+PRUint64 get_plugin_started(void);
#endif /* _MEMBEROF_H_ */
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 46acb4b..a59cfd8 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -57,8 +57,8 @@ static int mep_modrdn_pre_op(Slapi_PBlock *pb);
/*
* Config cache management functions
*/
-static int mep_load_config();
-static void mep_delete_config();
+static int mep_load_config(void);
+static void mep_delete_config(void);
static int mep_parse_config_entry(Slapi_Entry * e, int apply);
static void mep_free_config_entry(struct configEntry ** entry);
@@ -66,7 +66,7 @@ static void mep_free_config_entry(struct configEntry ** entry);
* helpers
*/
static Slapi_DN *mep_get_sdn(Slapi_PBlock * pb);
-static Slapi_DN *mep_get_config_area();
+static Slapi_DN *mep_get_config_area(void);
static void mep_set_config_area(Slapi_DN *sdn);
static int mep_dn_is_config(Slapi_DN *sdn);
static int mep_dn_is_template(Slapi_DN *dn);
@@ -136,7 +136,7 @@ mep_set_plugin_sdn(Slapi_DN *pluginDN)
}
Slapi_DN *
-mep_get_plugin_sdn()
+mep_get_plugin_sdn(void)
{
return _PluginDN;
}
@@ -390,7 +390,7 @@ mep_get_config()
* --- cn=etc,...
*/
static int
-mep_load_config()
+mep_load_config(void)
{
int status = 0;
int result;
@@ -749,7 +749,7 @@ mep_delete_configEntry(PRCList *entry)
}
static void
-mep_delete_config()
+mep_delete_config(void)
{
PRCList *list;
@@ -990,7 +990,7 @@ mep_set_config_area(Slapi_DN *sdn)
}
static Slapi_DN *
-mep_get_config_area()
+mep_get_config_area(void)
{
return _ConfigAreaDN;
}
diff --git a/ldap/servers/plugins/mep/mep.h b/ldap/servers/plugins/mep/mep.h
index b0df32b..2874b87 100644
--- a/ldap/servers/plugins/mep/mep.h
+++ b/ldap/servers/plugins/mep/mep.h
@@ -82,20 +82,20 @@ struct configEntry {
/*
* Config fetch function
*/
-PRCList *mep_get_config();
+PRCList *mep_get_config(void);
/*
* Config cache locking functions
*/
-void mep_config_read_lock();
-void mep_config_write_lock();
-void mep_config_unlock();
+void mep_config_read_lock(void);
+void mep_config_write_lock(void);
+void mep_config_unlock(void);
/*
* Plugin identity functions
*/
void mep_set_plugin_id(void *pluginID);
-void *mep_get_plugin_id();
+void *mep_get_plugin_id(void);
void mep_set_plugin_dn(char *pluginDN);
-char *mep_get_plugin_dn();
+char *mep_get_plugin_dn(void);
diff --git a/ldap/servers/plugins/pam_passthru/pam_passthru.h b/ldap/servers/plugins/pam_passthru/pam_passthru.h
index cf1a668..e9f8036 100644
--- a/ldap/servers/plugins/pam_passthru/pam_passthru.h
+++ b/ldap/servers/plugins/pam_passthru/pam_passthru.h
@@ -107,25 +107,25 @@ typedef struct pam_passthruconfig {
*/
void pam_passthruauth_set_plugin_identity(void * identity);
-void * pam_passthruauth_get_plugin_identity();
+void * pam_passthruauth_get_plugin_identity(void);
void pam_passthruauth_set_plugin_sdn(const Slapi_DN *plugin_sdn);
-const Slapi_DN *pam_passthruauth_get_plugin_sdn();
-const char *pam_passthruauth_get_plugin_dn();
-void pam_passthru_read_lock();
-void pam_passthru_write_lock();
-void pam_passthru_unlock();
+const Slapi_DN *pam_passthruauth_get_plugin_sdn(void);
+const char *pam_passthruauth_get_plugin_dn(void);
+void pam_passthru_read_lock(void);
+void pam_passthru_write_lock(void);
+void pam_passthru_unlock(void);
/*
* pam_ptconfig.c:
*/
int pam_passthru_load_config(int skip_validate);
-void pam_passthru_delete_config();
+void pam_passthru_delete_config(void);
Pam_PassthruConfig *pam_passthru_get_config( Slapi_DN *bind_sdn );
int pam_passthru_validate_config (Slapi_Entry* e, char *returntext);
int pam_passthru_dn_is_config(Slapi_DN *sdn);
void pam_passthru_set_config_area(Slapi_DN *sdn);
-Slapi_DN* pam_passthru_get_config_area();
-void pam_passthru_free_config_area();
+Slapi_DN* pam_passthru_get_config_area(void);
+void pam_passthru_free_config_area(void);
/*
* pam_ptimpl.c
diff --git a/ldap/servers/plugins/pam_passthru/pam_ptconfig.c b/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
index d0b3d1c..01f115d 100644
--- a/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
+++ b/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
@@ -215,13 +215,13 @@ check_missing_suffix_flag(int val) {
return PR_FALSE;
}
-static char *get_missing_suffix_values()
+static char *get_missing_suffix_values(void)
{
return PAMPT_MISSING_SUFFIX_ERROR_STRING ", " PAMPT_MISSING_SUFFIX_ALLOW_STRING ", "
PAMPT_MISSING_SUFFIX_IGNORE_STRING;
}
-static char *get_map_method_values()
+static char *get_map_method_values(void)
{
return PAMPT_MAP_METHOD_DN_STRING " or " PAMPT_MAP_METHOD_RDN_STRING " or " PAMPT_MAP_METHOD_ENTRY_STRING;
}
@@ -333,7 +333,7 @@ parse_map_method(char *map_method, int *one, int *two, int *three, char *returnt
}
static void
-print_suffixes()
+print_suffixes(void)
{
void *cookie = NULL;
Slapi_DN *sdn = NULL;
diff --git a/ldap/servers/plugins/passthru/passthru.h b/ldap/servers/plugins/passthru/passthru.h
index eb42a16..15b86c5 100644
--- a/ldap/servers/plugins/passthru/passthru.h
+++ b/ldap/servers/plugins/passthru/passthru.h
@@ -136,6 +136,6 @@ void passthru_free_bervals( struct berval **bvs );
/*
* ptpreop.c
*/
-void passthru_free_config();
+void passthru_free_config(void);
#endif /* _PASSTHRU_H_ */
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.h b/ldap/servers/plugins/posix-winsync/posix-group-func.h
index c37740c..dc5e6c7 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.h
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.h
@@ -14,10 +14,10 @@ int dn_in_set(const char* uid, char **uids);
int modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify, int newposixgroup);
int addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry);
char * searchUid(const char *udn);
-void memberUidLock();
-void memberUidUnlock();
-int memberUidLockInit();
-void memberUidLockDestroy();
+void memberUidLock(void);
+void memberUidUnlock(void);
+int memberUidLockInit(void);
+void memberUidLockDestroy(void);
int addUserToGroupMembership(Slapi_Entry *entry);
void propogateDeletionsUpward(Slapi_Entry *, const Slapi_DN *, Slapi_ValueSet*, Slapi_ValueSet *, int);
int hasObjectClass(Slapi_Entry *entry, const char *objectClass);
diff --git a/ldap/servers/plugins/posix-winsync/posix-winsync.c b/ldap/servers/plugins/posix-winsync/posix-winsync.c
index bdc9bdd..1b1f44d 100644
--- a/ldap/servers/plugins/posix-winsync/posix-winsync.c
+++ b/ldap/servers/plugins/posix-winsync/posix-winsync.c
@@ -73,7 +73,7 @@
Slapi_Value **
valueset_get_valuearray(const Slapi_ValueSet *vs); /* stolen from proto-slap.h */
void *
-posix_winsync_get_plugin_identity();
+posix_winsync_get_plugin_identity(void);
void *
posix_winsync_agmt_init(const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree);
@@ -1995,7 +1995,7 @@ posix_winsync_set_plugin_identity(void * identity)
}
void *
-posix_winsync_get_plugin_identity()
+posix_winsync_get_plugin_identity(void)
{
return posix_winsync_plugin_id;
}
diff --git a/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h b/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h
index 7691e56..9ddb194 100644
--- a/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h
+++ b/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h
@@ -19,7 +19,7 @@
#define POSIX_WINSYNC_LOWER_CASE "posixWinsyncLowerCaseUID"
#define POSIX_WINSYNC_MAP_NESTED_GROUPING "posixWinsyncMapNestedGrouping"
-void * posix_winsync_get_plugin_identity();
+void * posix_winsync_get_plugin_identity(void);
typedef struct posix_winsync_config_struct {
Slapi_Mutex *lock; /* for config access */
@@ -34,25 +34,25 @@ typedef struct posix_winsync_config_struct {
} POSIX_WinSync_Config;
int posix_winsync_config(Slapi_Entry *config_e);
-void posix_winsync_config_free();
-POSIX_WinSync_Config *posix_winsync_get_config();
-PRBool posix_winsync_config_get_mapMemberUid();
-PRBool posix_winsync_config_get_msSFUSchema();
-PRBool posix_winsync_config_get_lowercase();
-PRBool posix_winsync_config_get_createMOFTask();
-Slapi_DN *posix_winsync_config_get_suffix();
-void posix_winsync_config_reset_MOFTaskCreated();
-void posix_winsync_config_set_MOFTaskCreated();
-PRBool posix_winsync_config_get_MOFTaskCreated();
-PRBool posix_winsync_config_get_mapNestedGrouping();
+void posix_winsync_config_free(void);
+POSIX_WinSync_Config *posix_winsync_get_config(void);
+PRBool posix_winsync_config_get_mapMemberUid(void);
+PRBool posix_winsync_config_get_msSFUSchema(void);
+PRBool posix_winsync_config_get_lowercase(void);
+PRBool posix_winsync_config_get_createMOFTask(void);
+Slapi_DN *posix_winsync_config_get_suffix(void);
+void posix_winsync_config_reset_MOFTaskCreated(void);
+void posix_winsync_config_set_MOFTaskCreated(void);
+PRBool posix_winsync_config_get_MOFTaskCreated(void);
+PRBool posix_winsync_config_get_mapNestedGrouping(void);
int posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter, int *returncode, char *returntext,
void *arg);
-PRUint64 get_plugin_started();
-void plugin_op_started();
-void plugin_op_finished();
-void posix_winsync_plugin_op_all_finished();
+PRUint64 get_plugin_started(void);
+void plugin_op_started(void);
+void plugin_op_finished(void);
+void posix_winsync_plugin_op_all_finished(void);
#endif
diff --git a/ldap/servers/plugins/presence/presence.c b/ldap/servers/plugins/presence/presence.c
index 50851cf..0c9a485 100644
--- a/ldap/servers/plugins/presence/presence.c
+++ b/ldap/servers/plugins/presence/presence.c
@@ -186,7 +186,7 @@ static int presence_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_typ
* Local operation functions
*
*/
-static int loadPluginConfig();
+static int loadPluginConfig(void);
static int parseConfigEntry(Slapi_Entry *e);
static int imIDExists(Slapi_Entry *e, char *type, char **value, _Vmap **map, _ConfigEntry **entry);
static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info, char **buf, int *size);
@@ -194,7 +194,7 @@ static char * replaceIdWithValue(char *str, char *id, char *value);
static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info, char *returnedBUF, int size, Slapi_ValueSet **results);
static int setTypes(PLHashEntry *he, PRIntn i, void *arg);
-static void deleteMapTables();
+static void deleteMapTables(void);
static PRIntn destroyHashEntry(PLHashEntry *he, PRIntn index, void *arg);
static void logGraphicAttributeValue( Slapi_Attr *attr, const char *attrname );
static void toLowerCase(char* str);
@@ -202,7 +202,7 @@ static void toLowerCase(char* str);
/**
* utility function
*/
-void printMapTable();
+void printMapTable(void);
PRIntn printIdVattrMapTable(PLHashEntry *he, PRIntn i, void *arg);
PRIntn printIdConfigMapTable(PLHashEntry *he, PRIntn i, void *arg);
@@ -211,7 +211,7 @@ PRIntn printIdConfigMapTable(PLHashEntry *he, PRIntn i, void *arg);
* Get the presence plug-in version
*
*/
-int presence_version()
+int presence_version(void)
{
return PRESENCE_PLUGIN_VERSION;
}
@@ -224,7 +224,7 @@ void setPluginID(void * pluginID)
_PluginID=pluginID;
}
-void * getPluginID()
+void * getPluginID(void)
{
return _PluginID;
}
@@ -234,7 +234,7 @@ void setPluginDN(char *pluginDN)
_PluginDN = pluginDN;
}
-char * getPluginDN()
+char * getPluginDN(void)
{
return _PluginDN;
}
@@ -490,7 +490,7 @@ static int presence_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_typ
return status;
}
-static int loadPluginConfig()
+static int loadPluginConfig(void)
{
int status = PRESENCE_SUCCESS;
int result;
@@ -1107,7 +1107,7 @@ logGraphicAttributeValue( Slapi_Attr *attr, const char *attrname )
}
-static void deleteMapTables()
+static void deleteMapTables(void)
{
PL_HashTableEnumerateEntries(_IdConfigMapTable, destroyHashEntry, 0);
if (_IdConfigMapTable)
@@ -1152,7 +1152,7 @@ static void toLowerCase(char* str)
/**
* utility function to print the array
*/
-void printMapTable()
+void printMapTable(void)
{
PL_HashTableEnumerateEntries(_IdVattrMapTable, printIdVattrMapTable, 0);
PL_HashTableEnumerateEntries(_IdConfigMapTable, printIdConfigMapTable, 0);
diff --git a/ldap/servers/plugins/pwdstorage/pwdstorage.h b/ldap/servers/plugins/pwdstorage/pwdstorage.h
index 244988a..16ea745 100644
--- a/ldap/servers/plugins/pwdstorage/pwdstorage.h
+++ b/ldap/servers/plugins/pwdstorage/pwdstorage.h
@@ -72,7 +72,7 @@ char * sha512_pw_enc( const char *pwd );
char * salted_sha512_pw_enc( const char *pwd );
int clear_pw_cmp( const char *userpwd, const char *dbpwd );
char *clear_pw_enc( const char *pwd );
-void crypt_init();
+void crypt_init(void);
int crypt_pw_cmp( const char *userpwd, const char *dbpwd );
char *crypt_pw_enc( const char *pwd );
int ns_mta_md5_pw_cmp( const char *userpwd, const char *dbpwd );
diff --git a/ldap/servers/plugins/referint/referint.c b/ldap/servers/plugins/referint/referint.c
index 5885a76..91bf7e0 100644
--- a/ldap/servers/plugins/referint/referint.c
+++ b/ldap/servers/plugins/referint/referint.c
@@ -56,17 +56,17 @@ int my_fgetc(PRFileDesc *stream);
void referint_thread_func(void *arg);
void writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn, char *newrdn, Slapi_DN *newsuperior, Slapi_DN *requestorsdn);
int load_config(Slapi_PBlock *pb, Slapi_Entry *config_entry, int apply);
-int referint_get_delay();
-int referint_get_logchanges();
-char *referint_get_logfile();
-char **referint_get_attrs();
+int referint_get_delay(void);
+int referint_get_logchanges(void);
+char *referint_get_logfile(void);
+char **referint_get_attrs(void);
int referint_postop_modify(Slapi_PBlock *pb);
int referint_validate_config(Slapi_PBlock *pb);
static int referint_preop_init(Slapi_PBlock *pb);
void referint_set_config_area(Slapi_DN *dn);
-Slapi_DN *referint_get_config_area();
+Slapi_DN *referint_get_config_area(void);
void referint_set_plugin_area(Slapi_DN *sdn);
-Slapi_DN *referint_get_plugin_area();
+Slapi_DN *referint_get_plugin_area(void);
int referint_sdn_config_cmp(Slapi_DN *sdn);
void referint_get_config(int *delay, int *logchanges, char **logfile);
@@ -91,7 +91,7 @@ static int premodfn = SLAPI_PLUGIN_PRE_MODIFY_FN;
static void
-referint_lock()
+referint_lock(void)
{
if (use_txn) { /* no lock if betxn is enabled */
return;
@@ -105,7 +105,7 @@ referint_lock()
}
static void
-referint_unlock()
+referint_unlock(void)
{
if (use_txn) { /* no lock if betxn is enabled */
return;
@@ -129,7 +129,7 @@ referint_set_config_area(Slapi_DN *dn)
* which does take the lock.
*/
Slapi_DN *
-referint_get_config_area()
+referint_get_config_area(void)
{
return _ConfigAreaDN;
}
@@ -143,7 +143,7 @@ referint_set_plugin_area(Slapi_DN *sdn)
}
Slapi_DN *
-referint_get_plugin_area()
+referint_get_plugin_area(void)
{
return _pluginDN;
}
@@ -488,7 +488,7 @@ bail:
}
int
-referint_get_delay()
+referint_get_delay(void)
{
int delay;
@@ -500,7 +500,7 @@ referint_get_delay()
}
int
-referint_get_logchanges()
+referint_get_logchanges(void)
{
int log_changes;
@@ -512,7 +512,7 @@ referint_get_logchanges()
}
char *
-referint_get_logfile()
+referint_get_logfile(void)
{
char *log_file;
@@ -543,7 +543,7 @@ referint_get_config(int *delay, int *logchanges, char **logfile)
* might need to find an alternate option instead of copying
*/
char **
-referint_get_attrs()
+referint_get_attrs(void)
{
char **attrs = NULL;
diff --git a/ldap/servers/plugins/replication/cl4.h b/ldap/servers/plugins/replication/cl4.h
index 3a2cf4e..65da4c8 100644
--- a/ldap/servers/plugins/replication/cl4.h
+++ b/ldap/servers/plugins/replication/cl4.h
@@ -44,8 +44,8 @@ char *get_changelog_dataversion(const chglog4Info* cl4);
void set_changelog_dataversion(chglog4Info* cl4, const char *dataversion);
/* In cl4_config.c */
-int changelog4_config_init();
-void changelog4_config_destroy();
+int changelog4_config_init(void);
+void changelog4_config_destroy(void);
/*
* backend configuration information
diff --git a/ldap/servers/plugins/replication/cl5.h b/ldap/servers/plugins/replication/cl5.h
index ac18b3b..681ae57 100644
--- a/ldap/servers/plugins/replication/cl5.h
+++ b/ldap/servers/plugins/replication/cl5.h
@@ -32,13 +32,13 @@ typedef struct changelog5Config
}changelog5Config;
/* initializes changelog*/
-int changelog5_init();
+int changelog5_init(void);
/* cleanups changelog data */
-void changelog5_cleanup();
+void changelog5_cleanup(void);
/* initializes changelog configurationd */
-int changelog5_config_init();
+int changelog5_config_init(void);
/* cleanups config data */
-void changelog5_config_cleanup();
+void changelog5_config_cleanup(void);
/* reads changelog configuration */
int changelog5_read_config (changelog5Config *config);
/* cleanups the content of the config structure */
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
index 6a09aea..acb1bf1 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -246,19 +246,19 @@ static CL5Desc s_cl5Desc;
static int _cl5Open (const char *dir, const CL5DBConfig *config, CL5OpenMode openMode);
static int _cl5AppInit (void);
static int _cl5DBOpen (void);
-static void _cl5SetDefaultDBConfig ();
+static void _cl5SetDefaultDBConfig(void);
static void _cl5SetDBConfig (const CL5DBConfig *config);
-static int _cl5CheckDBVersion ();
+static int _cl5CheckDBVersion(void);
static int _cl5ReadDBVersion (const char *dir, char *clVersion, int buflen);
-static int _cl5WriteDBVersion ();
-static void _cl5Close ();
+static int _cl5WriteDBVersion(void);
+static void _cl5Close(void);
static int _cl5Delete (const char *dir, PRBool rmDir);
-static void _cl5DBClose ();
+static void _cl5DBClose(void);
/* thread management */
-static int _cl5DispatchDBThreads ();
-static int _cl5AddThread ();
-static void _cl5RemoveThread ();
+static int _cl5DispatchDBThreads(void);
+static int _cl5AddThread(void);
+static void _cl5RemoveThread(void);
/* functions that work with individual changelog files */
static int _cl5NewDBFile (const char *replName, const char *replGen, CL5DBFile** dbFile);
@@ -314,11 +314,11 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum
static int _cl5CheckMissingCSN (const CSN *minCsn, const RUV *supplierRUV, CL5DBFile *file);
/* changelog trimming */
-static int _cl5TrimInit ();
-static void _cl5TrimCleanup ();
+static int _cl5TrimInit(void);
+static void _cl5TrimCleanup(void);
static int _cl5TrimMain (void *param);
-static void _cl5DoTrimming ();
-static void _cl5CompactDBs();
+static void _cl5DoTrimming(void);
+static void _cl5CompactDBs(void);
static void _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid);
static int _cl5PurgeGetFirstEntry (Object *obj, CL5Entry *entry, void **iterator, DB_TXN *txnid, int rid, DBT *key);
static int _cl5PurgeGetNextEntry (CL5Entry *entry, void *iterator, DBT *key);
@@ -349,8 +349,8 @@ static int _cl5FileEndsWith(const char *filename, const char *ext);
static PRLock *cl5_diskfull_lock = NULL;
static int cl5_diskfull_flag = 0;
-static void cl5_set_diskfull();
-static void cl5_set_no_diskfull();
+static void cl5_set_diskfull(void);
+static void cl5_set_no_diskfull(void);
/***** Module APIs *****/
@@ -361,7 +361,7 @@ static void cl5_set_no_diskfull();
Return: CL5_SUCCESS if function is successful;
CL5_SYSTEM_ERROR error if NSPR call fails.
*/
-int cl5Init ()
+int cl5Init(void)
{
s_cl5Desc.stLock = slapi_new_rwlock();
if (s_cl5Desc.stLock == NULL)
@@ -2369,7 +2369,7 @@ cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry)
}
/* thread management functions */
-static int _cl5DispatchDBThreads ()
+static int _cl5DispatchDBThreads(void)
{
PRThread *pth = NULL;
@@ -2387,7 +2387,7 @@ static int _cl5DispatchDBThreads ()
return CL5_SUCCESS;
}
-static int _cl5AddThread ()
+static int _cl5AddThread(void)
{
/* lock the state lock so that nobody can change the state
while backup is in progress
@@ -2412,7 +2412,7 @@ static int _cl5AddThread ()
return CL5_SUCCESS;
}
-static void _cl5RemoveThread ()
+static void _cl5RemoveThread(void)
{
PR_ASSERT (s_cl5Desc.threadCount > 0);
PR_AtomicDecrement (&s_cl5Desc.threadCount);
@@ -2991,7 +2991,7 @@ static int _cl5UpgradeMinor(char *fromVersion, char *toVersion)
return rc;
}
-static int _cl5CheckDBVersion ()
+static int _cl5CheckDBVersion(void)
{
char clVersion [VERSION_SIZE + 1];
char dbVersion [VERSION_SIZE + 1];
@@ -3142,7 +3142,7 @@ static int _cl5ReadDBVersion (const char *dir, char *clVersion, int buflen)
return CL5_SUCCESS;
}
-static int _cl5WriteDBVersion ()
+static int _cl5WriteDBVersion(void)
{
int rc;
PRFileDesc *file;
@@ -3190,7 +3190,7 @@ static int _cl5WriteDBVersion ()
}
/* must be called under the state lock */
-static void _cl5Close ()
+static void _cl5Close(void)
{
PRIntervalTime interval;
@@ -3237,7 +3237,7 @@ static void _cl5Close ()
}
}
-static void _cl5DBClose ()
+static void _cl5DBClose(void)
{
if (NULL != s_cl5Desc.dbFiles)
{
@@ -3365,7 +3365,7 @@ static int _cl5Delete (const char *clDir, int rmDir)
return CL5_SUCCESS;
}
-static void _cl5SetDefaultDBConfig ()
+static void _cl5SetDefaultDBConfig(void)
{
s_cl5Desc.dbConfig.maxConcurrentWrites= CL5_DEFAULT_CONFIG_MAX_CONCURRENT_WRITES;
s_cl5Desc.dbConfig.fileMode = FILE_CREATE_MODE;
@@ -3380,7 +3380,7 @@ static void _cl5SetDBConfig (const CL5DBConfig *config)
}
/* Trimming helper functions */
-static int _cl5TrimInit ()
+static int _cl5TrimInit(void)
{
/* just create the lock while we are singlethreaded */
s_cl5Desc.dbTrim.lock = PR_NewLock();
@@ -3398,7 +3398,7 @@ static int _cl5TrimInit ()
}
}
-static void _cl5TrimCleanup ()
+static void _cl5TrimCleanup(void)
{
if (s_cl5Desc.dbTrim.lock)
PR_DestroyLock (s_cl5Desc.dbTrim.lock);
@@ -3421,7 +3421,7 @@ static int _cl5TrimMain (void *param)
{
/* time to trim */
timePrev = timeNow;
- _cl5DoTrimming (0 /* there's no cleaned rid */);
+ _cl5DoTrimming();
}
if ((s_cl5Desc.dbTrim.compactInterval > 0) &&
(timeNow - timeCompactPrev >= s_cl5Desc.dbTrim.compactInterval))
@@ -3461,7 +3461,7 @@ static int _cl5TrimMain (void *param)
* change sent to the consumer in the changelog and will fail because the
* change was removed.
*/
-static void _cl5DoTrimming ()
+static void _cl5DoTrimming(void)
{
Object *obj;
long numToTrim;
@@ -3528,7 +3528,7 @@ static void _cl5DoPurging (Replica *replica)
/* clear free page files to reduce changelog */
static void
-_cl5CompactDBs()
+_cl5CompactDBs(void)
{
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4400
int rc;
@@ -6674,7 +6674,7 @@ cl5_is_diskfull()
}
static void
-cl5_set_diskfull()
+cl5_set_diskfull(void)
{
PR_Lock(cl5_diskfull_lock);
cl5_diskfull_flag = 1;
@@ -6682,7 +6682,7 @@ cl5_set_diskfull()
}
static void
-cl5_set_no_diskfull()
+cl5_set_no_diskfull(void)
{
PR_Lock(cl5_diskfull_lock);
cl5_diskfull_flag = 0;
diff --git a/ldap/servers/plugins/replication/cl5_api.h b/ldap/servers/plugins/replication/cl5_api.h
index 1a1c2f5..2e23dfd 100644
--- a/ldap/servers/plugins/replication/cl5_api.h
+++ b/ldap/servers/plugins/replication/cl5_api.h
@@ -136,7 +136,7 @@ enum
CL5_BAD_DATA if invalid directory is passed;
CL5_SYSTEM error if NSPR call fails.
*/
-int cl5Init ();
+int cl5Init(void);
/* Name: cl5Cleanup
Description: performs cleanup of the changelog module. Must be called by a single
@@ -144,7 +144,7 @@ int cl5Init ();
Parameters: none
Return: none
*/
-void cl5Cleanup ();
+void cl5Cleanup(void);
/* Name: cl5Open
Description: opens changelog ; must be called after changelog is
@@ -170,7 +170,7 @@ int cl5Open (const char *dir, const CL5DBConfig *config);
CL5_BAD_STATE if db is not in the open state;
CL5_SYSTEM_ERROR if NSPR call fails
*/
-int cl5Close ();
+int cl5Close(void);
/* Name: cl5Delete
Description: removes changelog
@@ -238,7 +238,7 @@ int cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas);
Return: changelog state
*/
-int cl5GetState ();
+int cl5GetState(void);
/* Name: cl5ConfigTrimming
Description: sets changelog trimming parameters
@@ -398,7 +398,7 @@ void cl5DeleteOnClose (PRBool rm);
Return: copy of the directory; caller needs to free the string
*/
-char *cl5GetDir ();
+char *cl5GetDir(void);
/* Name: cl5Exist
Description: checks if a changelog exists in the specified directory
@@ -440,8 +440,8 @@ PRBool cl5HelperEntry (const char *csnstr, CSN *csn);
CSN** cl5BuildCSNList (const RUV *consRuv, const RUV *supRuv);
void cl5DestroyCSNList (CSN*** csns);
-int cl5_is_diskfull();
-int cl5_diskspace_is_available();
+int cl5_is_diskfull(void);
+int cl5_diskspace_is_available(void);
/* Name: cl5DbDirIsEmpty
Description: See if the given cldb directory is empty or doesn't yet exist.
@@ -457,14 +457,14 @@ int cl5DbDirIsEmpty(const char *dir);
Parameters: none
Return: TRUE
*/
-int cl5WriteRUV();
+int cl5WriteRUV(void);
/* Name: cl5DeleteRUV
Description: Read and delete RUVs from changelog db's. Called after backup.
Parameters: none
Return: TRUE
*/
-int cl5DeleteRUV();
+int cl5DeleteRUV(void);
void cl5CleanRUV(ReplicaId rid);
void cl5NotifyCleanup(int rid);
void trigger_cl_purging(Replica *replica);
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c
index 74f0fec..a7544a6 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -144,11 +144,11 @@ static int clcache_skip_change ( CLC_Buffer *buf );
static int clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag );
static int clcache_open_cursor ( DB_TXN *txn, CLC_Buffer *buf, DBC **cursor );
static int clcache_cursor_get ( DBC *cursor, CLC_Buffer *buf, int flag );
-static struct csn_seq_ctrl_block *clcache_new_cscb ();
+static struct csn_seq_ctrl_block *clcache_new_cscb(void);
static void clcache_free_cscb ( struct csn_seq_ctrl_block ** cscb );
static CLC_Buffer *clcache_new_buffer ( ReplicaId consumer_rid );
static void clcache_delete_buffer ( CLC_Buffer **buf );
-static CLC_Busy_List *clcache_new_busy_list ();
+static CLC_Busy_List *clcache_new_busy_list(void);
static void clcache_delete_busy_list ( CLC_Busy_List **bl );
static int clcache_enqueue_busy_list( DB *db, CLC_Buffer *buf );
static void csn_dup_or_init_by_csn ( CSN **csn1, CSN *csn2 );
@@ -886,7 +886,7 @@ clcache_skip_change ( CLC_Buffer *buf )
}
static struct csn_seq_ctrl_block *
-clcache_new_cscb ()
+clcache_new_cscb(void)
{
struct csn_seq_ctrl_block *cscb;
@@ -978,7 +978,7 @@ clcache_delete_buffer ( CLC_Buffer **buf )
}
static CLC_Busy_List *
-clcache_new_busy_list ()
+clcache_new_busy_list(void)
{
CLC_Busy_List *bl;
int welldone = 0;
diff --git a/ldap/servers/plugins/replication/cl5_clcache.h b/ldap/servers/plugins/replication/cl5_clcache.h
index 75b2817..4a029bb 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.h
+++ b/ldap/servers/plugins/replication/cl5_clcache.h
@@ -21,11 +21,11 @@
typedef struct clc_buffer CLC_Buffer;
int clcache_init ( DB_ENV **dbenv );
-void clcache_set_config ();
+void clcache_set_config(void);
int clcache_get_buffer ( CLC_Buffer **buf, DB *db, ReplicaId consumer_rid, const RUV *consumer_ruv, const RUV *local_ruv );
int clcache_load_buffer ( CLC_Buffer *buf, CSN **anchorCSN );
void clcache_return_buffer ( CLC_Buffer **buf );
int clcache_get_next_change ( CLC_Buffer *buf, void **key, size_t *keylen, void **data, size_t *datalen, CSN **csn );
-void clcache_destroy ();
+void clcache_destroy(void);
#endif
diff --git a/ldap/servers/plugins/replication/csnpl.h b/ldap/servers/plugins/replication/csnpl.h
index 32e3ff7..3f6132d 100644
--- a/ldap/servers/plugins/replication/csnpl.h
+++ b/ldap/servers/plugins/replication/csnpl.h
@@ -20,7 +20,7 @@
typedef struct csnpl CSNPL;
-CSNPL* csnplNew ();
+CSNPL* csnplNew(void);
void csnplFree (CSNPL **csnpl);
int csnplInsert (CSNPL *csnpl, const CSN *csn);
int csnplRemove (CSNPL *csnpl, const CSN *csn);
diff --git a/ldap/servers/plugins/replication/legacy_consumer.c b/ldap/servers/plugins/replication/legacy_consumer.c
index a1819b7..8670df1 100644
--- a/ldap/servers/plugins/replication/legacy_consumer.c
+++ b/ldap/servers/plugins/replication/legacy_consumer.c
@@ -49,7 +49,7 @@ static int legacy_consumer_config_modify (Slapi_PBlock *pb, Slapi_Entry* e, Slap
static int legacy_consumer_config_delete (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg);
static int legacy_consumer_extract_config(Slapi_Entry* entry, char *returntext);
-static int legacy_consumer_read_config ();
+static int legacy_consumer_read_config(void);
static void legacy_consumer_encode_pw (Slapi_Entry *e);
static void set_legacy_purl (Slapi_PBlock *pb, const char *purl);
static int get_legacy_referral (Slapi_Entry *e, char **referral, char **state);
@@ -428,7 +428,7 @@ legacy_consumer_extract_config(Slapi_Entry* entry, char *returntext)
static int
-legacy_consumer_read_config ()
+legacy_consumer_read_config(void)
{
int rc = LDAP_SUCCESS;
int scope= LDAP_SCOPE_BASE;
diff --git a/ldap/servers/plugins/replication/llist.h b/ldap/servers/plugins/replication/llist.h
index 923df3e..c09b1d4 100644
--- a/ldap/servers/plugins/replication/llist.h
+++ b/ldap/servers/plugins/replication/llist.h
@@ -17,7 +17,7 @@
#define LLIST_H
typedef struct llist LList;
-LList* llistNew ();
+LList* llistNew(void);
void llistDestroy (LList **list, FNFree fnFree);
void* llistGetFirst(LList *list, void **iterator);
void* llistGetNext (LList *list, void **iterator);
diff --git a/ldap/servers/plugins/replication/repl.h b/ldap/servers/plugins/replication/repl.h
index 69667c6..2d476f9 100644
--- a/ldap/servers/plugins/replication/repl.h
+++ b/ldap/servers/plugins/replication/repl.h
@@ -164,7 +164,7 @@ typedef struct repl {
/* Functions */
/* repl_rootdse.c */
-int repl_rootdse_init();
+int repl_rootdse_init(void);
/* In repl.c */
Slapi_Entry *get_changerecord(const chglog4Info *cl4, changeNumber cnum, int *err);
@@ -173,7 +173,7 @@ changeNumber replog_get_lastchangenum(const chglog4Info *cl4, int *err);
void changelog_housekeeping(time_t cur_time );
/* In repl_config.c */
-int repl_config_init ();
+int repl_config_init(void);
/* Legacy Plugin Functions */
@@ -233,11 +233,19 @@ extern char *filter_objectclass;
extern char *type_cn;
extern char *type_objectclass;
-/* JCMREPL - IFP should be defined centrally */
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+/* JCMREPL - IFP should be defined centrally */
#ifndef _IFP
#define _IFP
-typedef int (*IFP)();
+typedef int (*IFP)(); /* takes undefined arguments */
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic pop
#endif
/* In cl4.c */
@@ -268,8 +276,8 @@ void ldapi_initialize_changenumbers(chglog4Info *cl4, changeNumber first, change
/* #define REPL_PROTOCOL_71_TOTALUPDATE 4 */
/* In repl_globals.c */
-int decrement_repl_active_threads();
-int increment_repl_active_threads();
+int decrement_repl_active_threads(void);
+int increment_repl_active_threads(void);
/* operation extensions */
@@ -285,8 +293,8 @@ typedef enum
} ext_type;
/* general extension functions - repl_ext.c */
-void repl_sup_init_ext (); /* initializes registrations - must be called first */
-void repl_con_init_ext (); /* initializes registrations - must be called first */
+void repl_sup_init_ext(void); /* initializes registrations - must be called first */
+void repl_con_init_ext(void); /* initializes registrations - must be called first */
int repl_sup_register_ext (ext_type type); /* registers an extension of the specified type */
int repl_con_register_ext (ext_type type); /* registers an extension of the specified type */
void* repl_sup_get_ext (ext_type type, void *object); /* retireves the extension from the object */
@@ -352,7 +360,7 @@ void multimaster_mtnode_extension_destructor (void* ext,void *object,void *pare
/* In repl_init.c */
-int get_legacy_stop();
+int get_legacy_stop(void);
/* In repl_entry.c */
void repl_entry_init(int argc, char** argv);
@@ -370,8 +378,8 @@ int legacy_postop( Slapi_PBlock *pb, const char* caller, int operation_type);
#endif
void profile_log(char *file,int line);
-void profile_open();
-void profile_close();
+void profile_open(void);
+void profile_close(void);
/* in repl_controls.c */
void add_repl_control_mods( Slapi_PBlock *pb, Slapi_Mods *smods );
@@ -388,7 +396,7 @@ int modrdn2reple( Slapi_Entry *e, char *newrdn, int deloldrdn, LDAPMod **ldm );
void process_legacy_cf(Slapi_PBlock *pb);
int legacy_consumer_is_replicationdn(const char *dn);
int legacy_consumer_is_replicationpw(struct berval *creds);
-int legacy_consumer_config_init();
+int legacy_consumer_config_init(void);
/* function that gets called when a backend state is changed */
void legacy_consumer_be_state_change (void *handle, char *be_name,
diff --git a/ldap/servers/plugins/replication/repl5.h b/ldap/servers/plugins/replication/repl5.h
index 13a38fd..219fc87 100644
--- a/ldap/servers/plugins/replication/repl5.h
+++ b/ldap/servers/plugins/replication/repl5.h
@@ -229,9 +229,9 @@ int multimaster_be_betxnpostop_modify (Slapi_PBlock *pb);
/* In repl5_init.c */
extern int repl5_is_betxn;
-char* get_thread_private_agmtname ();
+char* get_thread_private_agmtname(void);
void set_thread_private_agmtname (const char *agmtname);
-void* get_thread_private_cache ();
+void* get_thread_private_cache(void);
void set_thread_private_cache (void *buf);
char* get_repl_session_id (Slapi_PBlock *pb, char *id, CSN **opcsn);
@@ -274,9 +274,9 @@ void replsupplier_notify(Repl_Supplier *rs, PRUint32 eventmask);
PRUint32 replsupplier_get_status(Repl_Supplier *rs);
/* In repl5_plugins.c */
-int multimaster_set_local_purl();
-const char *multimaster_get_local_purl();
-PRBool multimaster_started();
+int multimaster_set_local_purl(void);
+const char *multimaster_get_local_purl(void);
+PRBool multimaster_started(void);
/* In repl5_schedule.c */
typedef struct schedule Schedule;
@@ -395,8 +395,8 @@ int agmt_maxcsn_to_smod (Replica *r, Slapi_Mod *smod);
int agmt_set_WaitForAsyncResults(Repl_Agmt *ra, const Slapi_Entry *e);
/* In repl5_agmtlist.c */
-int agmtlist_config_init();
-void agmtlist_shutdown();
+int agmtlist_config_init(void);
+void agmtlist_shutdown(void);
void agmtlist_notify_all(Slapi_PBlock *pb);
Object* agmtlist_get_first_agreement_for_replica (Replica *r);
Object* agmtlist_get_next_agreement_for_replica (Replica *r, Object *prev);
@@ -571,8 +571,8 @@ Object *replica_get_replica_from_dn (const Slapi_DN *dn);
int replica_update_ruv(Replica *replica, const CSN *csn, const char *replica_purl);
Object *replica_get_replica_for_op (Slapi_PBlock *pb);
/* the functions below manipulate replica hash */
-int replica_init_name_hash ();
-void replica_destroy_name_hash ();
+int replica_init_name_hash(void);
+void replica_destroy_name_hash(void);
int replica_add_by_name (const char *name, Object *replica);
int replica_delete_by_name (const char *name);
Object* replica_get_by_name (const char *name);
@@ -588,8 +588,8 @@ void replica_enumerate_replicas (FNEnumReplica fn, void *arg);
int replica_reload_ruv (Replica *r);
int replica_check_for_data_reload (Replica *r, void *arg);
/* the functions below manipulate replica dn hash */
-int replica_init_dn_hash ();
-void replica_destroy_dn_hash ();
+int replica_init_dn_hash(void);
+void replica_destroy_dn_hash(void);
int replica_add_by_dn (const char *dn);
int replica_delete_by_dn (const char *dn);
int replica_is_being_configured (const char *dn);
@@ -652,15 +652,15 @@ CSN* replica_generate_next_csn ( Slapi_PBlock *pb, const CSN *basecsn );
int replica_get_attr ( Slapi_PBlock *pb, const char *type, void *value );
/* mapping tree extensions manipulation */
-void multimaster_mtnode_extension_init ();
-void multimaster_mtnode_extension_destroy ();
-void multimaster_mtnode_construct_replicas ();
+void multimaster_mtnode_extension_init(void);
+void multimaster_mtnode_extension_destroy(void);
+void multimaster_mtnode_construct_replicas(void);
void multimaster_be_state_change (void *handle, char *be_name, int old_be_state, int new_be_state);
/* In repl5_replica_config.c */
-int replica_config_init();
-void replica_config_destroy ();
+int replica_config_init(void);
+void replica_config_destroy(void);
int get_replica_type(Replica *r);
int replica_execute_cleanruv_task_ext(Object *r, ReplicaId rid);
void add_cleaned_rid(ReplicaId rid, Replica *r, char *maxcsn, char *forcing);
@@ -668,8 +668,8 @@ int is_cleaned_rid(ReplicaId rid);
int replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
int *returncode, char *returntext, void *arg);
void replica_cleanallruv_thread_ext(void *arg);
-void stop_ruv_cleaning();
-int task_aborted();
+void stop_ruv_cleaning(void);
+int task_aborted(void);
void replica_abort_task_thread(void *arg);
void remove_cleaned_rid(ReplicaId rid);
int process_repl_agmts(Replica *replica, int *agmt_info, char *oid, Slapi_Task *task, struct berval *payload, int op);
@@ -701,7 +701,7 @@ typedef struct _cleanruv_data
} cleanruv_data;
/* replutil.c */
-LDAPControl* create_managedsait_control ();
+LDAPControl* create_managedsait_control(void);
LDAPControl* create_backend_control(Slapi_DN *sdn);
void repl_set_mtn_state_and_referrals(const Slapi_DN *sdn, const char *mtn_state,
const RUV *ruv, char **ruv_referrals,
@@ -739,7 +739,7 @@ ReplicaId agmt_get_consumerRID(Repl_Agmt *ra);
/* For replica release tuning */
int agmt_get_WaitForAsyncResults(Repl_Agmt *ra);
-PRBool ldif_dump_is_running();
+PRBool ldif_dump_is_running(void);
void windows_init_agreement_from_entry(Repl_Agmt *ra, Slapi_Entry *e);
int windows_handle_modify_agreement(Repl_Agmt *ra, const char *type, Slapi_Entry *e);
@@ -749,7 +749,7 @@ void windows_conn_delete(Repl_Connection *conn);
void windows_update_done(Repl_Agmt *ra, int is_total);
/* repl_session_plugin.c */
-void repl_session_plugin_init();
+void repl_session_plugin_init(void);
void repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra);
int repl_session_plugin_call_pre_acquire_cb(const Repl_Agmt *ra, int is_total,
char **data_guid, struct berval **data);
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index d1de6c5..5676462 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -203,7 +203,7 @@ repl5_inc_op_free(repl5_inc_operation *op)
slapi_ch_free((void**)&op);
}
-static repl5_inc_operation *repl5_inc_operation_new()
+static repl5_inc_operation *repl5_inc_operation_new(void)
{
repl5_inc_operation *ret = NULL;
ret = (repl5_inc_operation *) slapi_ch_calloc(1,sizeof(repl5_inc_operation));
diff --git a/ldap/servers/plugins/replication/repl5_init.c b/ldap/servers/plugins/replication/repl5_init.c
index 0304ed5..fd21901 100644
--- a/ldap/servers/plugins/replication/repl5_init.c
+++ b/ldap/servers/plugins/replication/repl5_init.c
@@ -610,7 +610,7 @@ check_for_ldif_dump(Slapi_PBlock *pb)
* returns 0 if success
*/
static int
-create_repl_schema_policy()
+create_repl_schema_policy(void)
{
/* DN part of this entry_string: no need to be optimized. */
char entry_string[1024];
diff --git a/ldap/servers/plugins/replication/repl5_prot_private.h b/ldap/servers/plugins/replication/repl5_prot_private.h
index de098bf..7d4b648 100644
--- a/ldap/servers/plugins/replication/repl5_prot_private.h
+++ b/ldap/servers/plugins/replication/repl5_prot_private.h
@@ -48,12 +48,12 @@ typedef struct private_repl_protocol
int repl90consumer; /* Flag to tell us if this is a 9.0-style consumer we're talking to */
} Private_Repl_Protocol;
-extern Private_Repl_Protocol *Repl_5_Inc_Protocol_new();
-extern Private_Repl_Protocol *Repl_5_Tot_Protocol_new();
+extern Private_Repl_Protocol *Repl_5_Inc_Protocol_new(Repl_Protocol *rp);
+extern Private_Repl_Protocol *Repl_5_Tot_Protocol_new(Repl_Protocol *rp);
extern int repl5_tot_last_rcv_msgid(Repl_Connection *conn);
extern int repl5_tot_flowcontrol_detection(Repl_Connection *conn, int increment);
-extern Private_Repl_Protocol *Windows_Inc_Protocol_new();
-extern Private_Repl_Protocol *Windows_Tot_Protocol_new();
+extern Private_Repl_Protocol *Windows_Inc_Protocol_new(Repl_Protocol *rp);
+extern Private_Repl_Protocol *Windows_Tot_Protocol_new(Repl_Protocol *rp);
#define PROTOCOL_TERMINATION_NORMAL 301
#define PROTOCOL_TERMINATION_ABNORMAL 302
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index a201d42..25adacd 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -68,8 +68,8 @@ static int replica_cleanallruv_send_abort_extop(Repl_Agmt *ra, Slapi_Task *task,
static int replica_cleanallruv_check_maxcsn(Repl_Agmt *agmt, char *basedn, char *rid_text, char *maxcsn, Slapi_Task *task);
static int replica_cleanallruv_replica_alive(Repl_Agmt *agmt);
static int replica_cleanallruv_check_ruv(char *repl_root, Repl_Agmt *ra, char *rid_text, Slapi_Task *task, char *force);
-static int get_cleanruv_task_count();
-static int get_abort_cleanruv_task_count();
+static int get_cleanruv_task_count(void);
+static int get_abort_cleanruv_task_count(void);
static int replica_cleanup_task (Object *r, const char *task_name, char *returntext, int apply_mods);
static int replica_task_done(Replica *replica);
static void delete_cleaned_rid_config(cleanruv_data *data);
@@ -3540,7 +3540,7 @@ replica_cleanallruv_check_ruv(char *repl_root, Repl_Agmt *agmt, char *rid_text,
}
static int
-get_cleanruv_task_count()
+get_cleanruv_task_count(void)
{
int i, count = 0;
@@ -3556,7 +3556,7 @@ get_cleanruv_task_count()
}
static int
-get_abort_cleanruv_task_count()
+get_abort_cleanruv_task_count(void)
{
int i, count = 0;
diff --git a/ldap/servers/plugins/replication/repl_init.c b/ldap/servers/plugins/replication/repl_init.c
index ed5f575..53dbb45 100644
--- a/ldap/servers/plugins/replication/repl_init.c
+++ b/ldap/servers/plugins/replication/repl_init.c
@@ -168,7 +168,7 @@ legacy_entry_init( Slapi_PBlock *pb )
* Create the entry at the top of the replication configuration subtree.
*/
static int
-create_config_top()
+create_config_top(void)
{
/* DN part of this entry_string: no need to be optimized. */
char *entry_string = slapi_ch_strdup("dn: cn=replication,cn=config\nobjectclass: top\nobjectclass: extensibleobject\ncn: replication\n");
diff --git a/ldap/servers/plugins/replication/repl_shared.h b/ldap/servers/plugins/replication/repl_shared.h
index 70a3b0d..fac3e7b 100644
--- a/ldap/servers/plugins/replication/repl_shared.h
+++ b/ldap/servers/plugins/replication/repl_shared.h
@@ -93,10 +93,10 @@ extern char *windows_repl_plugin_name;
extern char *repl_plugin_name_cl;
/* repl_monitor.c */
-int repl_monitor_init();
+int repl_monitor_init(void);
/* In replutil.c */
-char ** get_cleattrs();
+char ** get_cleattrs(void);
unsigned long strntoul( char *from, size_t len, int base );
void freepmods( LDAPMod **pmods );
char *copy_berval (struct berval* from);
diff --git a/ldap/servers/plugins/replication/replutil.c b/ldap/servers/plugins/replication/replutil.c
index 300193c..88e6721 100644
--- a/ldap/servers/plugins/replication/replutil.c
+++ b/ldap/servers/plugins/replication/replutil.c
@@ -893,7 +893,7 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
/* if using global password policy, chain the bind request so that the
master can update and replicate the password policy op attrs */
if (op_type == SLAPI_OPERATION_BIND) {
- extern int config_get_pw_is_global_policy();
+ extern int config_get_pw_is_global_policy(void);
if (!config_get_pw_is_global_policy()) {
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
diff --git a/ldap/servers/plugins/replication/windowsrepl.h b/ldap/servers/plugins/replication/windowsrepl.h
index 66f4804..f90e96f 100644
--- a/ldap/servers/plugins/replication/windowsrepl.h
+++ b/ldap/servers/plugins/replication/windowsrepl.h
@@ -19,7 +19,7 @@ typedef struct subtreepair {
Slapi_DN *DSsubtree;
} subtreePair;
-Dirsync_Private* windows_private_new();
+Dirsync_Private* windows_private_new(void);
void windows_private_set_windows_subtree (const Repl_Agmt *ra,Slapi_DN* sdn );
const Slapi_DN* windows_private_get_windows_subtree (const Repl_Agmt *ra);
void windows_private_set_directory_subtree (const Repl_Agmt *ra,Slapi_DN* sdn );
diff --git a/ldap/servers/plugins/rever/rever.h b/ldap/servers/plugins/rever/rever.h
index 731c553..bda92b2 100644
--- a/ldap/servers/plugins/rever/rever.h
+++ b/ldap/servers/plugins/rever/rever.h
@@ -32,7 +32,7 @@ int rever_cmp( char *userpwd, char *dbpwd );
char *rever_enc( char *pwd );
char *rever_dec( char *pwd );
int rever_init( Slapi_PBlock *pb );
-void init_pbe_plugin();
+void init_pbe_plugin(void);
int encode(char *inPlain, char **outCipher, int mech);
int decode(char *inCipher, char **outPlain, int mech, char *algid);
diff --git a/ldap/servers/plugins/roles/roles_cache.c b/ldap/servers/plugins/roles/roles_cache.c
index 147d113..e5b3ff2 100644
--- a/ldap/servers/plugins/roles/roles_cache.c
+++ b/ldap/servers/plugins/roles/roles_cache.c
@@ -158,7 +158,7 @@ static void berval_set_string(struct berval *bv, const char* string);
static void roles_cache_role_def_delete(roles_cache_def *role_def);
static void roles_cache_role_def_free(roles_cache_def *role_def);
static void roles_cache_role_object_free(role_object *this_role);
-static void roles_cache_role_object_nested_free(role_object_nested *this_role);
+static int roles_cache_role_object_nested_free(role_object_nested *this_role);
static int roles_cache_dump( caddr_t data, caddr_t arg );
static int roles_cache_add_entry_cb(Slapi_Entry* e, void *callback_data);
static void roles_cache_result_cb( int rc, void *callback_data);
@@ -601,10 +601,8 @@ static int roles_cache_update(roles_cache_def *suffix_to_update)
if ( (operation == SLAPI_OPERATION_MODIFY) ||
(operation == SLAPI_OPERATION_DELETE) )
{
- /* delete it */
- int dummy;
- to_delete = (role_object *)avl_delete(&(suffix_to_update->avl_tree), dn, roles_cache_find_node, &dummy);
+ to_delete = (role_object *)avl_delete(&(suffix_to_update->avl_tree), dn, roles_cache_find_node);
roles_cache_role_object_free(to_delete);
to_delete = NULL;
if ( slapi_is_loglevel_set(SLAPI_LOG_PLUGIN) )
@@ -2162,14 +2160,14 @@ static void roles_cache_role_object_free(role_object *this_role)
/* roles_cache_role_object_nested_free
------------------------------------
*/
-static void roles_cache_role_object_nested_free(role_object_nested *this_role)
+static int roles_cache_role_object_nested_free(role_object_nested *this_role)
{
slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_nested_free\n");
if ( this_role == NULL )
{
- return;
+ return 0;
}
slapi_sdn_free(&this_role->dn);
@@ -2179,6 +2177,8 @@ static void roles_cache_role_object_nested_free(role_object_nested *this_role)
slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_object_nested_free\n");
+
+ return 0;
}
static int roles_cache_dump( caddr_t data, caddr_t arg )
diff --git a/ldap/servers/plugins/roles/roles_cache.h b/ldap/servers/plugins/roles/roles_cache.h
index 2dab5f7..6e62794 100644
--- a/ldap/servers/plugins/roles/roles_cache.h
+++ b/ldap/servers/plugins/roles/roles_cache.h
@@ -42,8 +42,8 @@
#define SLAPI_ROLE_DEFINITION_ALREADY_EXIST -5
/* From roles_cache.c */
-int roles_cache_init();
-void roles_cache_stop();
+int roles_cache_init(void);
+void roles_cache_stop(void);
void roles_cache_change_notify(Slapi_PBlock *pb);
int roles_cache_listroles(Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out);
int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out);
@@ -58,6 +58,6 @@ int roles_sp_compare_value(vattr_sp_handle *handle, vattr_context *c, Slapi_Entr
int roles_sp_list_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_context *type_context,int flags);
-void * roles_get_plugin_identity();
+void * roles_get_plugin_identity(void);
#endif /* _ROLES_CACHE_H */
diff --git a/ldap/servers/plugins/roles/roles_plugin.c b/ldap/servers/plugins/roles/roles_plugin.c
index d5c7985..b9f8b7c 100644
--- a/ldap/servers/plugins/roles/roles_plugin.c
+++ b/ldap/servers/plugins/roles/roles_plugin.c
@@ -314,7 +314,7 @@ int roles_sp_list_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_c
}
/* What do we do on shutdown ? */
-int roles_sp_cleanup()
+int roles_sp_cleanup(void)
{
return 0;
}
diff --git a/ldap/servers/plugins/rootdn_access/rootdn_access.c b/ldap/servers/plugins/rootdn_access/rootdn_access.c
index a0f5ec2..ddcad50 100644
--- a/ldap/servers/plugins/rootdn_access/rootdn_access.c
+++ b/ldap/servers/plugins/rootdn_access/rootdn_access.c
@@ -86,7 +86,7 @@ rootdn_set_plugin_id(void *pluginID)
}
void *
-rootdn_get_plugin_id()
+rootdn_get_plugin_id(void)
{
return _PluginID;
}
@@ -98,7 +98,7 @@ rootdn_set_plugin_dn(char *pluginDN)
}
char *
-rootdn_get_plugin_dn()
+rootdn_get_plugin_dn(void)
{
return _PluginDN;
}
@@ -182,7 +182,7 @@ rootdn_start(Slapi_PBlock *pb)
}
static void
-rootdn_free()
+rootdn_free(void)
{
slapi_ch_free_string(&daysAllowed);
daysAllowed = NULL;
diff --git a/ldap/servers/plugins/sync/sync.h b/ldap/servers/plugins/sync/sync.h
index ff0e65b..7251f17 100644
--- a/ldap/servers/plugins/sync/sync.h
+++ b/ldap/servers/plugins/sync/sync.h
@@ -101,13 +101,13 @@ void sync_send_modified_entries (Slapi_PBlock *pb, Sync_UpdateNode *upd, int chg
int sync_persist_initialize (int argc, char **argv);
PRThread *sync_persist_add (Slapi_PBlock *pb);
int sync_persist_startup (PRThread *tid, Sync_Cookie *session_cookie);
-int sync_persist_terminate_all ();
+int sync_persist_terminate_all(void);
int sync_persist_terminate (PRThread *tid);
Slapi_PBlock *sync_pblock_copy(Slapi_PBlock *src);
/* prototype for functions not in slapi-plugin.h */
-Slapi_ComponentId *plugin_get_default_component_id();
+Slapi_ComponentId *plugin_get_default_component_id(void);
/*
diff --git a/ldap/servers/plugins/sync/sync_persist.c b/ldap/servers/plugins/sync/sync_persist.c
index e3335c7..2f3397c 100644
--- a/ldap/servers/plugins/sync/sync_persist.c
+++ b/ldap/servers/plugins/sync/sync_persist.c
@@ -28,10 +28,10 @@ static int plugin_closing = 0;
static PRUint64 thread_count = 0;
static int sync_add_request( SyncRequest *req );
static void sync_remove_request( SyncRequest *req );
-static SyncRequest *sync_request_alloc();
+static SyncRequest *sync_request_alloc(void);
void sync_queue_change( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype );
static void sync_send_results( void *arg );
-static void sync_request_wakeup_all();
+static void sync_request_wakeup_all(void);
static void sync_node_free( SyncQueueNode **node );
static int sync_acquire_connection (Slapi_Connection *conn);
@@ -383,7 +383,7 @@ sync_persist_terminate_all ()
* Allocate and initialize an empty Sync node.
*/
static SyncRequest *
-sync_request_alloc()
+sync_request_alloc(void)
{
SyncRequest *req;
@@ -466,7 +466,7 @@ sync_remove_request( SyncRequest *req )
}
static void
-sync_request_wakeup_all()
+sync_request_wakeup_all(void)
{
if ( SYNC_IS_INITIALIZED()) {
PR_Lock( sync_request_list->sync_req_cvarlock );
diff --git a/ldap/servers/plugins/syntaxes/bin.c b/ldap/servers/plugins/syntaxes/bin.c
index 36f6026..66dca47 100644
--- a/ldap/servers/plugins/syntaxes/bin.c
+++ b/ldap/servers/plugins/syntaxes/bin.c
@@ -173,7 +173,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/bitstring.c b/ldap/servers/plugins/syntaxes/bitstring.c
index be066fb..a399e8d 100644
--- a/ldap/servers/plugins/syntaxes/bitstring.c
+++ b/ldap/servers/plugins/syntaxes/bitstring.c
@@ -94,7 +94,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/ces.c b/ldap/servers/plugins/syntaxes/ces.c
index 6e86905..6ce19ca 100644
--- a/ldap/servers/plugins/syntaxes/ces.c
+++ b/ldap/servers/plugins/syntaxes/ces.c
@@ -292,7 +292,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/cis.c b/ldap/servers/plugins/syntaxes/cis.c
index 07e6318..a2cc456 100644
--- a/ldap/servers/plugins/syntaxes/cis.c
+++ b/ldap/servers/plugins/syntaxes/cis.c
@@ -673,7 +673,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/dn.c b/ldap/servers/plugins/syntaxes/dn.c
index 1c43633..12387c7 100644
--- a/ldap/servers/plugins/syntaxes/dn.c
+++ b/ldap/servers/plugins/syntaxes/dn.c
@@ -100,7 +100,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/int.c b/ldap/servers/plugins/syntaxes/int.c
index bbd7dfe..a0ac682 100644
--- a/ldap/servers/plugins/syntaxes/int.c
+++ b/ldap/servers/plugins/syntaxes/int.c
@@ -152,7 +152,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/nameoptuid.c b/ldap/servers/plugins/syntaxes/nameoptuid.c
index 605603d..b31d506 100644
--- a/ldap/servers/plugins/syntaxes/nameoptuid.c
+++ b/ldap/servers/plugins/syntaxes/nameoptuid.c
@@ -99,7 +99,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/numericstring.c b/ldap/servers/plugins/syntaxes/numericstring.c
index c4853d6..2c3beaf 100644
--- a/ldap/servers/plugins/syntaxes/numericstring.c
+++ b/ldap/servers/plugins/syntaxes/numericstring.c
@@ -157,7 +157,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/tel.c b/ldap/servers/plugins/syntaxes/tel.c
index 7e3087b..6a5d92f 100644
--- a/ldap/servers/plugins/syntaxes/tel.c
+++ b/ldap/servers/plugins/syntaxes/tel.c
@@ -141,7 +141,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
}
static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
{
return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
}
diff --git a/ldap/servers/plugins/syntaxes/validate_task.c b/ldap/servers/plugins/syntaxes/validate_task.c
index 43385eb..4eb3c1e 100644
--- a/ldap/servers/plugins/syntaxes/validate_task.c
+++ b/ldap/servers/plugins/syntaxes/validate_task.c
@@ -48,7 +48,7 @@ static int syntax_validate_task_callback(Slapi_Entry *e, void *callback_data);
static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
const char *default_val);
static void syntax_validate_set_plugin_id(void * plugin_id);
-static void *syntax_validate_get_plugin_id();
+static void *syntax_validate_get_plugin_id(void);
/*
@@ -286,7 +286,7 @@ syntax_validate_set_plugin_id(void * plugin_id)
}
static void *
-syntax_validate_get_plugin_id()
+syntax_validate_get_plugin_id(void)
{
return _PluginID;
}
diff --git a/ldap/servers/plugins/usn/usn.c b/ldap/servers/plugins/usn/usn.c
index 17f66e1..9b866ed 100644
--- a/ldap/servers/plugins/usn/usn.c
+++ b/ldap/servers/plugins/usn/usn.c
@@ -631,7 +631,7 @@ usn_set_identity(void *identity)
}
void *
-usn_get_identity()
+usn_get_identity(void)
{
return _usn_identity;
}
diff --git a/ldap/servers/plugins/usn/usn.h b/ldap/servers/plugins/usn/usn.h
index f7a710f..2b19d79 100644
--- a/ldap/servers/plugins/usn/usn.h
+++ b/ldap/servers/plugins/usn/usn.h
@@ -21,9 +21,9 @@
/* usn.c */
void usn_set_identity(void *identity);
-void *usn_get_identity();
+void *usn_get_identity(void);
/* usn_cleanup.c */
int usn_cleanup_start(Slapi_PBlock *pb);
-int usn_cleanup_close();
+int usn_cleanup_close(void);
diff --git a/ldap/servers/plugins/usn/usn_cleanup.c b/ldap/servers/plugins/usn/usn_cleanup.c
index 383cead..024c1c9 100644
--- a/ldap/servers/plugins/usn/usn_cleanup.c
+++ b/ldap/servers/plugins/usn/usn_cleanup.c
@@ -32,7 +32,7 @@ usn_cleanup_start(Slapi_PBlock *pb)
}
int
-usn_cleanup_close()
+usn_cleanup_close(void)
{
int rc = slapi_plugin_task_unregister_handler("USN tombstone cleanup task",
usn_cleanup_add);
diff --git a/ldap/servers/plugins/views/views.c b/ldap/servers/plugins/views/views.c
index 8f38e50..8c2b89f 100644
--- a/ldap/servers/plugins/views/views.c
+++ b/ldap/servers/plugins/views/views.c
@@ -91,10 +91,10 @@ static Slapi_Counter *op_counter = NULL;
int views_init( Slapi_PBlock *pb );
static int views_start( Slapi_PBlock *pb );
static int views_close( Slapi_PBlock *pb );
-static int views_cache_create();
+static int views_cache_create(void);
static void views_update_views_cache( Slapi_Entry *e, char *dn, int modtype, Slapi_PBlock *pb, void *caller_data );
static int views_cache_build_view_list(viewEntry **pViews);
-static int views_cache_index();
+static int views_cache_index(void);
static int views_dn_views_cb (Slapi_Entry* e, void *callback_data);
static int views_cache_add_dn_views(char *dn, viewEntry **pViews);
static void views_cache_add_ll_entry(void** attrval, void *theVal);
@@ -110,7 +110,7 @@ static int view_search_rewrite_callback(Slapi_PBlock *pb);
static void views_cache_backend_state_change(void *handle, char *be_name, int old_be_state, int new_be_state);
static void views_cache_act_on_change_thread(void *arg);
static viewEntry *views_cache_find_view(char *view);
-static void views_cache_free();
+static void views_cache_free(void);
/* our api broker published api */
static void *api[3];
@@ -136,7 +136,7 @@ void view_set_plugin_identity(void * identity)
view_plugin_identity=identity;
}
-void * view_get_plugin_identity()
+void * view_get_plugin_identity(void)
{
return view_plugin_identity;
}
@@ -179,17 +179,17 @@ int views_init( Slapi_PBlock *pb )
return ret;
}
-void views_read_lock()
+void views_read_lock(void)
{
slapi_rwlock_rdlock(g_views_cache_lock);
}
-void views_write_lock()
+void views_write_lock(void)
{
slapi_rwlock_wrlock(g_views_cache_lock);
}
-void views_unlock()
+void views_unlock(void)
{
slapi_rwlock_unlock(g_views_cache_lock);
}
@@ -379,7 +379,7 @@ static int views_close( Slapi_PBlock *pb )
return SLAPI_PLUGIN_SUCCESS;
}
-static void views_cache_free()
+static void views_cache_free(void)
{
viewEntry *head = theCache.pCacheViews;
viewEntry *current;
@@ -421,7 +421,7 @@ static void views_cache_free()
---------------------
Walks the views in the DIT and populates the cache.
*/
-static int views_cache_create()
+static int views_cache_create(void)
{
int ret = SLAPI_PLUGIN_FAILURE;
@@ -538,7 +538,7 @@ int views_cache_dn_compare(const void *e1, const void *e2)
* ----------------
* indexes the cache for fast look up of views
*/
-static int views_cache_index()
+static int views_cache_index(void)
{
int ret = SLAPI_PLUGIN_FAILURE;
int i;
diff --git a/ldap/servers/slapd/agtmmap.h b/ldap/servers/slapd/agtmmap.h
index fc1d644..43c6f14 100644
--- a/ldap/servers/slapd/agtmmap.h
+++ b/ldap/servers/slapd/agtmmap.h
@@ -39,8 +39,6 @@ extern "C" {
#define NUM_SNMP_INT_TBL_ROWS 5
#define SNMP_FIELD_LENGTH 100
-extern int errno;
-
#if !defined(_MAX_PATH)
#define _MAX_PATH 256
#endif
diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c
index aec6d21..25078fe 100644
--- a/ldap/servers/slapd/attrsyntax.c
+++ b/ldap/servers/slapd/attrsyntax.c
@@ -68,7 +68,7 @@ static void attr_syntax_insert_tmp( struct asyntaxinfo *asip );
static void attr_syntax_remove( struct asyntaxinfo *asip );
#ifdef ATTR_LDAP_DEBUG
-static void attr_syntax_print();
+static void attr_syntax_print(void);
#endif
static int attr_syntax_init(void);
@@ -206,7 +206,7 @@ attr_syntax_free( struct asyntaxinfo *a )
}
static struct asyntaxinfo *
-attr_syntax_new()
+attr_syntax_new(void)
{
return (struct asyntaxinfo *)slapi_ch_calloc(1, sizeof(struct asyntaxinfo));
}
@@ -1243,7 +1243,7 @@ attr_syntax_printnode(PLHashEntry *he, PRIntn i, void *arg)
}
void
-attr_syntax_print()
+attr_syntax_print(void)
{
printf( "*** attr_syntax_print ***\n" );
PL_HashTableEnumerateEntries(name2asi, attr_syntax_printnode, 0);
diff --git a/ldap/servers/slapd/auth.c b/ldap/servers/slapd/auth.c
index 138b713..18cb7f9 100644
--- a/ldap/servers/slapd/auth.c
+++ b/ldap/servers/slapd/auth.c
@@ -24,8 +24,8 @@ char* client_auth_config_file = NULL;
/* forward declarations */
-static void generate_id();
-static Slapi_ComponentId * auth_get_component_id();
+static void generate_id(void);
+static Slapi_ComponentId * auth_get_component_id(void);
#define internal_ld NULL
@@ -312,14 +312,14 @@ client_auth_init ()
static Slapi_ComponentId * auth_component_id=NULL;
-static void generate_id()
+static void generate_id(void)
{
if (auth_component_id == NULL ) {
auth_component_id=generate_componentid (NULL /* Not a plugin */ , COMPONENT_CERT_AUTH);
}
}
-static Slapi_ComponentId * auth_get_component_id() {
+static Slapi_ComponentId * auth_get_component_id(void) {
return auth_component_id;
}
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c
index c84196a..33287d4 100644
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
@@ -198,10 +198,10 @@ static PRLock *sync_txn_log_flush = NULL;
static PRCondVar *sync_txn_log_flush_done = NULL;
static PRCondVar *sync_txn_log_do_flush = NULL;
static int dblayer_db_remove_ex(dblayer_private_env *env, char const path[], char const dbName[], PRBool use_lock);
-static void dblayer_init_pvt_txn();
+static void dblayer_init_pvt_txn(void);
static void dblayer_push_pvt_txn(back_txn *txn);
-static back_txn *dblayer_get_pvt_txn();
-static void dblayer_pop_pvt_txn();
+static back_txn *dblayer_get_pvt_txn(void);
+static void dblayer_pop_pvt_txn(void);
static int dblayer_post_restore = 0;
@@ -620,7 +620,7 @@ static int dblayer_ioinfo_large(const char *path, int fd, u_int32_t *mbytesp,
/* Helper function to tell if a file exists */
/* On Solaris, if you use stat() on a file >4Gbytes, it fails with EOVERFLOW,
causing us to think that the file does not exist when it in fact does */
-static int dblayer_exists_large(char *path, int *isdirp)
+static int dblayer_exists_large(const char *path, int *isdirp)
{
struct stat64 sb;
@@ -657,11 +657,11 @@ static int dblayer_override_libdb_functions(DB_ENV *pEnv, dblayer_private *priv)
db_env_set_func_open((int (*)(const char *, int, ...))dblayer_open_large);
#endif /* !irix */
db_env_set_func_ioinfo(dblayer_ioinfo_large);
- db_env_set_func_exists((int (*)())dblayer_exists_large);
+ db_env_set_func_exists(dblayer_exists_large);
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4300
- db_env_set_func_seek((int (*)())dblayer_seek43_large);
+ db_env_set_func_seek((int (*)(int, off_t, int))dblayer_seek43_large);
#else
- db_env_set_func_seek((int (*)())dblayer_seek24_large);
+ db_env_set_func_seek((int (*)(int, off_t, int))dblayer_seek24_large);
#endif
LDAPDebug(LDAP_DEBUG_TRACE, "Enabled 64-bit files\n", 0, 0, 0);
@@ -7596,7 +7596,7 @@ dblayer_cleanup_txn_stack(void *arg)
}
static void
-dblayer_init_pvt_txn()
+dblayer_init_pvt_txn(void)
{
PR_NewThreadPrivateIndex(&thread_private_txn_stack, dblayer_cleanup_txn_stack);
}
@@ -7617,7 +7617,7 @@ dblayer_push_pvt_txn(back_txn *txn)
}
static back_txn *
-dblayer_get_pvt_txn()
+dblayer_get_pvt_txn(void)
{
back_txn *txn = NULL;
dblayer_txn_stack *txn_stack = PR_GetThreadPrivate(thread_private_txn_stack);
@@ -7628,7 +7628,7 @@ dblayer_get_pvt_txn()
}
static void
-dblayer_pop_pvt_txn()
+dblayer_pop_pvt_txn(void)
{
dblayer_txn_stack *elem = NULL;
dblayer_txn_stack *txn_stack = PR_GetThreadPrivate(thread_private_txn_stack);
diff --git a/ldap/servers/slapd/back-ldbm/idl.c b/ldap/servers/slapd/back-ldbm/idl.c
index f999e9a..ada7879 100644
--- a/ldap/servers/slapd/back-ldbm/idl.c
+++ b/ldap/servers/slapd/back-ldbm/idl.c
@@ -42,7 +42,7 @@ void idl_old_set_tune(int val)
idl_tune = val;
}
-int idl_old_get_tune() {
+int idl_old_get_tune(void) {
return idl_tune;
}
diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c b/ldap/servers/slapd/back-ldbm/idl_new.c
index ab87b04..e05f577 100644
--- a/ldap/servers/slapd/back-ldbm/idl_new.c
+++ b/ldap/servers/slapd/back-ldbm/idl_new.c
@@ -69,7 +69,7 @@ void idl_new_set_tune(int val)
idl_tune = val;
}
-int idl_new_get_tune() {
+int idl_new_get_tune(void) {
return idl_tune;
}
diff --git a/ldap/servers/slapd/back-ldbm/idl_shim.c b/ldap/servers/slapd/back-ldbm/idl_shim.c
index 3e30d29..d95ca77 100644
--- a/ldap/servers/slapd/back-ldbm/idl_shim.c
+++ b/ldap/servers/slapd/back-ldbm/idl_shim.c
@@ -19,7 +19,7 @@ static int idl_new = 0; /* non-zero if we're doing new IDL style */
void idl_old_set_tune(int val);
-int idl_old_get_tune();
+int idl_old_get_tune(void);
int idl_old_init_private(backend *be, struct attrinfo *a);
int idl_old_release_private(struct attrinfo *a);
size_t idl_old_get_allidslimit(struct attrinfo *a);
@@ -30,7 +30,7 @@ int idl_old_store_block( backend *be,DB *db,DBT *key,IDList *idl,DB_TXN *txn,str
void idl_new_set_tune(int val);
-int idl_new_get_tune();
+int idl_new_get_tune(void);
int idl_new_init_private(backend *be, struct attrinfo *a);
int idl_new_release_private(struct attrinfo *a);
size_t idl_new_get_allidslimit(struct attrinfo *a, int allidslimit);
@@ -59,7 +59,7 @@ void idl_set_tune(int val)
}
}
-int idl_get_tune()
+int idl_get_tune(void)
{
if (idl_new) {
return idl_new_get_tune();
diff --git a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
index 1647163..6a63e9b 100644
--- a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
+++ b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
@@ -19,7 +19,7 @@
/*
* attr.c
*/
-struct attrinfo * attrinfo_new();
+struct attrinfo * attrinfo_new(void);
void attrinfo_delete(struct attrinfo **pp);
void ainfo_get( backend *be, char *type, struct attrinfo **at );
void attr_masks( backend *be, char *type, int *indexmask,
@@ -28,7 +28,7 @@ void attr_masks_ex( backend *be, char *type, int *indexmask,
int *syntaxmask, struct attrinfo **at );
int attr_index_config( backend *be, char *fname, int lineno,
Slapi_Entry *e, int init, int none );
-int ldbm_compute_init();
+int ldbm_compute_init(void);
void attrinfo_deletetree(ldbm_instance *inst);
void attr_create_empty(backend *be,char *type,struct attrinfo **ai);
@@ -268,9 +268,9 @@ ID idl_iterator_dereference_decrement(idl_iterator *i, const IDList *idl);
size_t idl_sizeof(IDList *idl);
int idl_store_block(backend *be,DB *db,DBT *key,IDList *idl,DB_TXN *txn,struct attrinfo *a);
void idl_set_tune(int val);
-int idl_get_tune();
+int idl_get_tune(void);
size_t idl_get_allidslimit(struct attrinfo *a, int allidslimit);
-int idl_get_idl_new();
+int idl_get_idl_new(void);
int idl_new_compare_dups(
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 3200
DB *db,
@@ -333,7 +333,7 @@ int import_subcount_mother_count(import_subcount_stuff *mothers,ID parent_id);
void import_subcount_stuff_init(import_subcount_stuff *stuff);
void import_subcount_stuff_term(import_subcount_stuff *stuff);
void import_configure_index_buffer_size(size_t size);
-size_t import_get_index_buffer_size();
+size_t import_get_index_buffer_size(void);
int ldbm_back_fetch_incl_excl(Slapi_PBlock *pb, char ***include,
char ***exclude);
void ldbm_back_free_incl_excl(char **include, char **exclude);
@@ -404,7 +404,7 @@ void get_both_ids( struct ldbminfo *li, ID *nextid, ID *nextid2index );
* backentry.c
*/
struct backentry *backentry_init( Slapi_Entry *e );
-struct backentry *backentry_alloc();
+struct backentry *backentry_alloc(void);
void backentry_free( struct backentry **bep );
struct backentry *backentry_dup( struct backentry * );
void backentry_clear_entry( struct backentry * );
@@ -499,7 +499,7 @@ int ldbm_back_entry_release( Slapi_PBlock *pb, void *backend_info_ptr );
void ldbm_back_search_results_release( void **search_results );
int ldbm_back_init( Slapi_PBlock *pb );
void ldbm_back_prev_search_results( Slapi_PBlock *pb );
-int ldbm_back_isinitialized();
+int ldbm_back_isinitialized(void);
/*
* monitor.c
@@ -535,10 +535,10 @@ struct vlv_response
int vlv_init(ldbm_instance *inst);
void vlv_close(ldbm_instance *inst);
int vlv_remove_callbacks(ldbm_instance *inst);
-const Slapi_Entry **vlv_get_search_entries();
+const Slapi_Entry **vlv_get_search_entries(void);
struct vlvIndex* vlv_find_searchname(const char * name, backend *be);
struct vlvIndex* vlv_find_indexname(const char * name, backend *be);
-char *vlv_getindexnames();
+char *vlv_getindexnames(backend *be);
int vlv_search_build_candidate_list(Slapi_PBlock *pb, const Slapi_DN *base, int *rc, const sort_spec* sort_control,
const struct vlv_request *vlv_request_control, IDList** candidates, struct vlv_response *vlv_response_control);
int vlv_update_index(struct vlvIndex* p, back_txn *txn, struct ldbminfo *li, Slapi_PBlock *pb, struct backentry* oldEntry, struct backentry* newEntry);
@@ -570,7 +570,7 @@ int indexfile_primary_modifyall(backend *be, LDAPMod **mods_to_perform,char **in
* bedse.c
*/
#if 0
-int bedse_init();
+int bedse_init(void);
int bedse_search(Slapi_PBlock *pb);
struct dse_callback *bedse_register_callback(int operation, const Slapi_DN *base, int scope, const char *filter, int (*fn)(Slapi_PBlock *,Slapi_Entry *,Slapi_Entry *,int*,char*,void *), void *fn_arg);
void bedse_remove_callback(int operation, const Slapi_DN *base, int scope, const char *filter, int (*fn)(Slapi_PBlock *,Slapi_Entry *,Slapi_Entry *,int*,char*,void *));
@@ -694,9 +694,9 @@ int ldbm_set_last_usn(Slapi_Backend *be);
* ldbm_entryrdn.c
*/
void entryrdn_set_switch(int val);
-int entryrdn_get_switch();
+int entryrdn_get_switch(void);
void entryrdn_set_noancestorid(int val);
-int entryrdn_get_noancestorid();
+int entryrdn_get_noancestorid(void);
int entryrdn_compare_dups(DB *db, const DBT *a, const DBT *b);
int entryrdn_index_entry(backend *be, struct backentry *e, int flags, back_txn *txn);
int entryrdn_index_read(backend *be, const Slapi_DN *sdn, ID *id, back_txn *txn);
diff --git a/ldap/servers/slapd/back-ldbm/sort.c b/ldap/servers/slapd/back-ldbm/sort.c
index 46f2dbd..3cd587b 100644
--- a/ldap/servers/slapd/back-ldbm/sort.c
+++ b/ldap/servers/slapd/back-ldbm/sort.c
@@ -42,7 +42,7 @@ static void sort_spec_thing_free(sort_spec_thing *s)
slapi_ch_free( (void**)&s);
}
-static sort_spec_thing *sort_spec_thing_allocate()
+static sort_spec_thing *sort_spec_thing_allocate(void)
{
return (sort_spec_thing *) slapi_ch_calloc(1,sizeof (sort_spec_thing));
}
diff --git a/ldap/servers/slapd/back-ldbm/vlv_key.h b/ldap/servers/slapd/back-ldbm/vlv_key.h
index 3e14550..09d902e 100644
--- a/ldap/servers/slapd/back-ldbm/vlv_key.h
+++ b/ldap/servers/slapd/back-ldbm/vlv_key.h
@@ -23,7 +23,7 @@ struct vlv_key
DBT key;
};
-struct vlv_key *vlv_key_new();
+struct vlv_key *vlv_key_new(void);
void vlv_key_delete(struct vlv_key **p);
void vlv_key_addattr(struct vlv_key *p,struct berval *val);
diff --git a/ldap/servers/slapd/back-ldbm/vlv_srch.h b/ldap/servers/slapd/back-ldbm/vlv_srch.h
index 7aef730..d1eba08 100644
--- a/ldap/servers/slapd/back-ldbm/vlv_srch.h
+++ b/ldap/servers/slapd/back-ldbm/vlv_srch.h
@@ -103,7 +103,7 @@ struct vlvIndex
struct vlvIndex* vlv_next;
};
-struct vlvSearch* vlvSearch_new();
+struct vlvSearch* vlvSearch_new(void);
void vlvSearch_init(struct vlvSearch*, Slapi_PBlock *pb, const Slapi_Entry *e, ldbm_instance *inst);
void vlvSearch_reinit(struct vlvSearch* p, const struct backentry *base);
void vlvSearch_delete(struct vlvSearch** ppvs);
@@ -123,7 +123,7 @@ int vlvSearch_isVlvSearchEntry(Slapi_Entry *e);
void vlvSearch_addIndex(struct vlvSearch *pSearch, struct vlvIndex *pIndex);
-struct vlvIndex* vlvIndex_new();
+struct vlvIndex* vlvIndex_new(void);
void vlvIndex_init(struct vlvIndex* p, backend *be, struct vlvSearch* pSearch, const Slapi_Entry *e);
void vlvIndex_delete(struct vlvIndex** ppvs);
PRUint32 vlvIndex_get_indexlength(struct vlvIndex* p, DB *db, back_txn *txn);
diff --git a/ldap/servers/slapd/ch_malloc.c b/ldap/servers/slapd/ch_malloc.c
index 10870df..2e2756c 100644
--- a/ldap/servers/slapd/ch_malloc.c
+++ b/ldap/servers/slapd/ch_malloc.c
@@ -49,7 +49,7 @@ static const char* const oom_advice =
"Can't recover; calling exit(1).\n";
static void
-create_counters()
+create_counters(void)
{
PR_CREATE_COUNTER(slapi_ch_counter_malloc,"slapi_ch","malloc","");
PR_CREATE_COUNTER(slapi_ch_counter_calloc,"slapi_ch","calloc","");
diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index 718ba9e..de27d81 100644
--- a/ldap/servers/slapd/connection.c
+++ b/ldap/servers/slapd/connection.c
@@ -74,7 +74,7 @@ static PRInt32 op_shutdown= 0; /* if non-zero, server is shutting down */
#define LDAP_SOCKET_IO_BUFFER_SIZE 512 /* Size of the buffer we give to the I/O system for reads */
static struct Slapi_work_q *
-create_work_q()
+create_work_q(void)
{
struct Slapi_work_q *work_q = (struct Slapi_work_q *)PR_StackPop(work_q_stack);
if (!work_q) {
diff --git a/ldap/servers/slapd/csngen.c b/ldap/servers/slapd/csngen.c
index 29fcd84..9d2a6ca 100644
--- a/ldap/servers/slapd/csngen.c
+++ b/ldap/servers/slapd/csngen.c
@@ -95,7 +95,7 @@ static int _csngen_adjust_local_time (CSNGen *gen, time_t cur_time);
*/
static int _csngen_start_test_threads (CSNGen *gen);
-static void _csngen_stop_test_threads ();
+static void _csngen_stop_test_threads(void);
static void _csngen_gen_tester_main (void *data);
static void _csngen_local_tester_main (void *data);
static void _csngen_remote_tester_main (void *data);
@@ -290,7 +290,7 @@ int csngen_adjust_time(CSNGen *gen, const CSN* csn)
time_t remote_time, remote_offset, cur_time;
PRUint16 remote_seqnum;
int rc;
- extern int config_get_ignore_time_skew();
+ extern int config_get_ignore_time_skew(void);
int ignore_time_skew = config_get_ignore_time_skew();
if (gen == NULL || csn == NULL)
@@ -500,7 +500,7 @@ void csngen_test ()
DS_Sleep(PR_SecondsToInterval(TEST_TIME));
}
- _csngen_stop_test_threads(gen);
+ _csngen_stop_test_threads();
csngen_dump_state (gen);
slapi_log_error(SLAPI_LOG_FATAL, NULL, "csn generator test is complete...");
}
@@ -617,7 +617,7 @@ _csngen_cmp_callbacks (const void *el1, const void *el2)
static int
_csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
{
- extern int config_get_ignore_time_skew();
+ extern int config_get_ignore_time_skew(void);
int ignore_time_skew = config_get_ignore_time_skew();
time_t time_diff = cur_time - gen->state.sampled_time;
@@ -779,7 +779,7 @@ _csngen_start_test_threads(CSNGen *gen)
return 0;
}
-static void _csngen_stop_test_threads ()
+static void _csngen_stop_test_threads(void)
{
s_must_exit = 1;
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 23c30c3..a3d55e0 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -79,7 +79,7 @@ static int readsignalpipe = SLAPD_INVALID_SOCKET;
static PRThread *disk_thread_p = NULL;
static PRCondVar *diskmon_cvar = NULL;
static PRLock *diskmon_mutex = NULL;
-void disk_monitoring_stop();
+void disk_monitoring_stop(void);
typedef struct listener_info {
#ifdef ENABLE_NUNC_STANS
@@ -102,7 +102,7 @@ static int enable_nunc_stans = 0; /* if nunc-stans is set to enabled, set to 1 i
#define SLAPD_POLL_LISTEN_READY(xxflagsxx) (xxflagsxx & PR_POLL_READ)
-static int get_configured_connection_table_size();
+static int get_configured_connection_table_size(void);
#ifdef RESOLVER_NEEDS_LOW_FILE_DESCRIPTORS
static void get_loopback_by_addr( void );
#endif
@@ -125,7 +125,7 @@ static void* catch_signals();
static int createsignalpipe( void );
static char *
-get_pid_file()
+get_pid_file(void)
{
return(pid_file);
}
@@ -161,8 +161,8 @@ static void ns_handle_new_connection(struct ns_job_t *job);
static void handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll);
static int clear_signal(struct POLL_STRUCT *fds);
static void unfurl_banners(Connection_Table *ct,daemon_ports_t *ports, PRFileDesc **n_tcps, PRFileDesc **s_tcps, PRFileDesc **i_unix);
-static int write_pid_file();
-static int init_shutdown_detect();
+static int write_pid_file(void);
+static int init_shutdown_detect(void);
/*
* NSPR has different implementations for PRMonitor, depending
@@ -758,7 +758,7 @@ handle_listeners(Connection_Table *ct)
* these attributes and convert them to AES if they are DES encoded.
*/
static void
-convert_pbe_des_to_aes()
+convert_pbe_des_to_aes(void)
{
Slapi_PBlock *pb = NULL;
Slapi_Entry **entries = NULL;
@@ -1314,7 +1314,7 @@ void slapd_daemon( daemon_ports_t *ports )
be_flushall();
op_thread_cleanup();
housekeeping_stop(); /* Run this after op_thread_cleanup() logged sth */
- disk_monitoring_stop(disk_thread_p);
+ disk_monitoring_stop();
threads = g_get_active_threadcnt();
if ( threads > 0 ) {
@@ -2660,7 +2660,7 @@ ns_handle_new_connection(struct ns_job_t *job)
}
#endif
-static int init_shutdown_detect()
+static int init_shutdown_detect(void)
{
/* First of all, we must reset the signal mask to get rid of any blockages
* the process may have inherited from its parent (such as the console), which
@@ -2794,7 +2794,7 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports, PRFileDesc **n_tcps,
/* On UNIX, we create a file with our PID in it */
static int
-write_pid_file()
+write_pid_file(void)
{
FILE *fp = NULL;
/*
@@ -3243,7 +3243,7 @@ catch_signals()
#endif /* HPUX */
static int
-get_configured_connection_table_size()
+get_configured_connection_table_size(void)
{
int size = config_get_conntablesize();
int maxdesc = config_get_maxdescriptors();
@@ -3421,7 +3421,7 @@ get_loopback_by_addr( void )
#endif /* RESOLVER_NEEDS_LOW_FILE_DESCRIPTORS */
void
-disk_monitoring_stop()
+disk_monitoring_stop(void)
{
if ( disk_thread_p ) {
PR_Lock( diskmon_mutex );
diff --git a/ldap/servers/slapd/detach.c b/ldap/servers/slapd/detach.c
index 2f5667f..102ce33 100644
--- a/ldap/servers/slapd/detach.c
+++ b/ldap/servers/slapd/detach.c
@@ -45,7 +45,7 @@
#endif /* USE_SYSCONF */
static int
-set_workingdir()
+set_workingdir(void)
{
int rc = 0;
char *workingdir = config_get_workingdir();
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
index 5f795cc..445c3c2 100644
--- a/ldap/servers/slapd/dn.c
+++ b/ldap/servers/slapd/dn.c
@@ -72,8 +72,8 @@ static int ndn_cache_lookup(char *dn, size_t dn_len, char **result, char **udn,
static void ndn_cache_update_lru(struct ndn_cache_lru **node);
static void ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len);
static void ndn_cache_delete(char *dn);
-static void ndn_cache_flush();
-static void ndn_cache_free();
+static void ndn_cache_flush(void);
+static void ndn_cache_free(void);
static int ndn_started = 0;
static PRLock *lru_lock = NULL;
static Slapi_RWLock *ndn_cache_lock = NULL;
@@ -1820,7 +1820,7 @@ PR_DEFINE_COUNTER(slapi_sdn_counter_udn_deleted);
PR_DEFINE_COUNTER(slapi_sdn_counter_udn_exist);
static void
-sdn_create_counters()
+sdn_create_counters(void)
{
PR_CREATE_COUNTER(slapi_sdn_counter_created,"Slapi_DN","created","");
PR_CREATE_COUNTER(slapi_sdn_counter_deleted,"Slapi_DN","deleted","");
@@ -1843,7 +1843,7 @@ sdn_create_counters()
#define FLAG_UDN 3
Slapi_DN *
-slapi_sdn_new()
+slapi_sdn_new(void)
{
Slapi_DN *sdn= (Slapi_DN *)slapi_ch_malloc(sizeof(Slapi_DN));
slapi_sdn_init(sdn);
@@ -3024,7 +3024,7 @@ ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len)
* cache is full, remove the least used dn's. lru_lock/ndn_cache write lock are already taken
*/
static void
-ndn_cache_flush()
+ndn_cache_flush(void)
{
struct ndn_cache_lru *node, *next, *flush_node;
int i;
@@ -3048,7 +3048,7 @@ ndn_cache_flush()
}
static void
-ndn_cache_free()
+ndn_cache_free(void)
{
struct ndn_cache_lru *node, *next, *flush_node;
diff --git a/ldap/servers/slapd/dse.c b/ldap/servers/slapd/dse.c
index 68ce751..3541e1c 100644
--- a/ldap/servers/slapd/dse.c
+++ b/ldap/servers/slapd/dse.c
@@ -114,7 +114,7 @@ static int dse_permission_to_write(struct dse* pdse, int loglevel);
static int dse_write_file_nolock(struct dse* pdse);
static int dse_apply_nolock(struct dse* pdse, IFP fp, caddr_t arg);
static int dse_replace_entry( struct dse* pdse, Slapi_Entry *e, int write_file, int use_lock );
-static dse_search_set* dse_search_set_new ();
+static dse_search_set* dse_search_set_new(void);
static void dse_search_set_delete (dse_search_set *ss);
static void dse_search_set_clean (dse_search_set *ss);
static void dse_free_entry (void **data);
@@ -2722,7 +2722,7 @@ dse_unset_dont_ever_write_dse_files()
}
static dse_search_set*
-dse_search_set_new ()
+dse_search_set_new(void)
{
dse_search_set *ss;
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index d38f970..0abfde8 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -668,13 +668,14 @@ entry_attrs_new(entry_attrs **pea)
/*
* Delete an attribute type tree node.
*/
-static void
+static int
attr_type_node_free( caddr_t data )
{
entry_attr_data *ea = (entry_attr_data *)data;
if ( NULL != ea && ea->ead_allocated ) {
slapi_ch_free( (void **)&ea );
}
+ return 0;
}
diff --git a/ldap/servers/slapd/eventq.c b/ldap/servers/slapd/eventq.c
index 477f5de..c425c1f 100644
--- a/ldap/servers/slapd/eventq.c
+++ b/ldap/servers/slapd/eventq.c
@@ -274,7 +274,7 @@ eq_dequeue(time_t now)
* by calling the function repeatedly.
*/
static void
-eq_call_all()
+eq_call_all(void)
{
slapi_eq_context *p;
diff --git a/ldap/servers/slapd/factory.c b/ldap/servers/slapd/factory.c
index 285a1f6..7237f0c 100644
--- a/ldap/servers/slapd/factory.c
+++ b/ldap/servers/slapd/factory.c
@@ -206,7 +206,7 @@ static struct factory_type* factory_type_store[MAX_TYPES];
static int number_of_types= 0;
static void
-factory_type_store_init()
+factory_type_store_init(void)
{
int i= 0;
factory_type_store_lock= PR_NewLock(); /* JCM - Should really free this at shutdown */
diff --git a/ldap/servers/slapd/fe.h b/ldap/servers/slapd/fe.h
index 56038d2..4368cc6 100644
--- a/ldap/servers/slapd/fe.h
+++ b/ldap/servers/slapd/fe.h
@@ -42,23 +42,23 @@ extern char *configfile;
* auth.c
*
*/
-void client_auth_init();
+void client_auth_init(void);
void handle_handshake_done (PRFileDesc *prfd, void* clientData);
int handle_bad_certificate (void* clientData, PRFileDesc *prfd);
/*
* connection.c
*/
-void op_thread_cleanup();
+void op_thread_cleanup(void);
/* do this after all worker threads have terminated */
-void connection_post_shutdown_cleanup();
+void connection_post_shutdown_cleanup(void);
/*
* connection.c
*/
void connection_abandon_operations( Connection *conn );
int connection_activity( Connection *conn, int maxthreads );
-void init_op_threads();
+void init_op_threads(void);
int connection_new_private(Connection *conn);
void connection_remove_operation( Connection *conn, Operation *op );
void connection_remove_operation_ext( Slapi_PBlock *pb, Connection *conn, Operation *op );
@@ -114,16 +114,16 @@ int connection_table_iterate_active_connections(Connection_Table *ct, void* arg,
/*
* daemon.c
*/
-int signal_listner();
+int signal_listner(void);
int daemon_pre_setuid_init(daemon_ports_t *ports);
void slapd_daemon( daemon_ports_t *ports );
-void daemon_register_connection();
+void daemon_register_connection(void);
int slapd_listenhost2addr( const char *listenhost, PRNetAddr ***addr );
int daemon_register_reslimits( void );
-PRFileDesc * get_ssl_listener_fd();
+PRFileDesc * get_ssl_listener_fd(void);
int configure_pr_socket( PRFileDesc **pr_socket, int secure, int local );
void configure_ns_socket( int * ns );
-void ns_enable_listeners();
+void ns_enable_listeners(void);
/*
* sasl_io.c
@@ -154,9 +154,9 @@ int sasl_map_config_add(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
int sasl_map_config_delete(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg);
int sasl_map_config_modify(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg);
int sasl_map_domap(sasl_map_data **map, char *sasl_user, char *sasl_realm, char **ldap_search_base, char **ldap_search_filter);
-int sasl_map_init();
-int sasl_map_done();
-void sasl_map_read_lock();
-void sasl_map_read_unlock();
+int sasl_map_init(void);
+int sasl_map_done(void);
+void sasl_map_read_lock(void);
+void sasl_map_read_unlock(void);
#endif
diff --git a/ldap/servers/slapd/fedse.c b/ldap/servers/slapd/fedse.c
index 67b9609..4db50e7 100644
--- a/ldap/servers/slapd/fedse.c
+++ b/ldap/servers/slapd/fedse.c
@@ -43,8 +43,8 @@
#include "fe.h"
#include <pwd.h>
-extern char ** getSupportedCiphers();
-extern char ** getEnabledCiphers();
+extern char ** getSupportedCiphers(void);
+extern char ** getEnabledCiphers(void);
extern int getSSLVersionInfo(int *ssl2, int *ssl3, int *tls1);
extern int getSSLVersionRange(char **min, char **max);
@@ -1588,7 +1588,7 @@ init_dse_file(const char *configdir, Slapi_DN *config)
return rc;
}
-void add_internal_entries()
+void add_internal_entries(void)
{
/* add the internal only entries */
int i;
@@ -1629,7 +1629,7 @@ egg_decode( char *s )
}
static
-void add_easter_egg_entry()
+void add_easter_egg_entry(void)
{
Slapi_Entry* e= NULL;
char *src;
diff --git a/ldap/servers/slapd/filter.c b/ldap/servers/slapd/filter.c
index 9336a79..03636ba 100644
--- a/ldap/servers/slapd/filter.c
+++ b/ldap/servers/slapd/filter.c
@@ -24,7 +24,8 @@ static int
get_filter_list( Connection *conn, BerElement *ber,
struct slapi_filter **f, char **fstr, int maxdepth, int curdepth,
int *subentry_dont_rewrite, int *has_tombstone_filter, int *has_ruv_filter);
-static int get_substring_filter();
+static int
+get_substring_filter(Connection *conn, BerElement *ber, struct slapi_filter *f, char **fstr);
static int get_extensible_filter( BerElement *ber, mr_filter_t* );
static int get_filter_internal( Connection *conn, BerElement *ber,
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index 9963c09..fe8dc28 100644
--- a/ldap/servers/slapd/filterentry.c
+++ b/ldap/servers/slapd/filterentry.c
@@ -19,11 +19,24 @@
#include <sys/socket.h>
#include "slap.h"
-static int test_filter_list();
-static int test_extensible_filter();
+static int test_filter_list(Slapi_PBlock *pb, Slapi_Entry *e,
+ struct slapi_filter *flist, int ftype,
+ int verify_access, int only_check_access,
+ int *access_check_done);
+static int test_extensible_filter(Slapi_PBlock *callers_pb, Slapi_Entry *e,
+ mr_filter_t *mrf, int verify_access,
+ int only_check_access,
+ int *access_check_done);
+
+static int vattr_test_filter_list_and(Slapi_PBlock *pb, Slapi_Entry *e,
+ struct slapi_filter *flist, int ftype,
+ int verify_access, int only_check_access,
+ int *access_check_done);
+static int vattr_test_filter_list_or(Slapi_PBlock *pb, Slapi_Entry *e,
+ struct slapi_filter *flist, int ftype,
+ int verify_access, int only_check_access,
+ int *access_check_done);
-static int vattr_test_filter_list_and();
-static int vattr_test_filter_list_or();
static int test_filter_access( Slapi_PBlock *pb, Slapi_Entry*e,
char * attr_type, struct berval *attr_val);
static int slapi_vattr_filter_test_ext_internal( Slapi_PBlock *pb, Slapi_Entry *e,
@@ -32,7 +45,7 @@ static int slapi_vattr_filter_test_ext_internal( Slapi_PBlock *pb, Slapi_Entry *
static char *opt_str = 0;
static int opt = 0;
-static int optimise_filter_acl_tests()
+static int optimise_filter_acl_tests(void)
{
if(!opt_str)
{
diff --git a/ldap/servers/slapd/generation.c b/ldap/servers/slapd/generation.c
index 6c1cc3b..bd1690b 100644
--- a/ldap/servers/slapd/generation.c
+++ b/ldap/servers/slapd/generation.c
@@ -21,7 +21,7 @@
* Create a new data version string.
*/
static const char *
-new_dataversion()
+new_dataversion(void)
{
struct tm t;
char* dataversion;
diff --git a/ldap/servers/slapd/getfilelist.c b/ldap/servers/slapd/getfilelist.c
index f544949..0884045 100644
--- a/ldap/servers/slapd/getfilelist.c
+++ b/ldap/servers/slapd/getfilelist.c
@@ -55,10 +55,11 @@ add_file_to_list(caddr_t data, caddr_t arg)
return -1;
}
-static void
+static int
free_string(caddr_t data)
{
slapi_ch_free((void **)&data);
+ return 0;
}
static int
diff --git a/ldap/servers/slapd/index_subsys.h b/ldap/servers/slapd/index_subsys.h
index 1a5fd56..8f9463f 100644
--- a/ldap/servers/slapd/index_subsys.h
+++ b/ldap/servers/slapd/index_subsys.h
@@ -20,7 +20,7 @@ typedef void IndexEntryList;
typedef unsigned int IndexEntryID;
typedef int (*index_search_callback)(Slapi_Filter *filter, IndexEntryList **results, void *user_data );
-typedef int (*index_validate_callback)();
+typedef int (*index_validate_callback)(void);
typedef struct __indexed_item
{
diff --git a/ldap/servers/slapd/index_subsystem.c b/ldap/servers/slapd/index_subsystem.c
index 93bf9d5..611bbcf 100644
--- a/ldap/servers/slapd/index_subsystem.c
+++ b/ldap/servers/slapd/index_subsystem.c
@@ -92,17 +92,17 @@ static int index_subsys_index_matches_associated(indexEntry *index, Slapi_Filter
#define INDEX_MATCH_COMPLEX 4
static int index_subsys_index_matches_filter(indexEntry *index, Slapi_Filter *f);
-static void index_subsys_read_lock()
+static void index_subsys_read_lock(void)
{
slapi_rwlock_rdlock(theCache->cache_lock);
}
-static void index_subsys_write_lock()
+static void index_subsys_write_lock(void)
{
slapi_rwlock_wrlock(theCache->cache_lock);
}
-static void index_subsys_unlock()
+static void index_subsys_unlock(void)
{
slapi_rwlock_unlock(theCache->cache_lock);
}
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 053dc3f..de94508 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -98,7 +98,7 @@ static char **mozldap_ldap_explode_dn( const char *dn, const int notypes );
static char **mozldap_ldap_explode_rdn( const char *rdn, const int notypes );
#ifdef HAVE_KRB5
-static void clear_krb5_ccache();
+static void clear_krb5_ccache(void);
#endif
#ifdef MEMPOOL_EXPERIMENTAL
@@ -2172,7 +2172,7 @@ cleanup:
}
static void
-clear_krb5_ccache()
+clear_krb5_ccache(void)
{
krb5_context ctx = NULL;
krb5_ccache cc = NULL;
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index faf521b..538a167 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -1234,7 +1234,7 @@ hashNocaseCompare(const void *v1, const void *v2)
static PLHashTable *confighash = 0;
static void
-init_config_get_and_set()
+init_config_get_and_set(void)
{
if (!confighash) {
int ii = 0;
@@ -1365,19 +1365,19 @@ strarray2bervalarray(const char **strarray)
static PRInt32 active_threads = 0;
void
-g_incr_active_threadcnt()
+g_incr_active_threadcnt(void)
{
PR_AtomicIncrement(&active_threads);
}
void
-g_decr_active_threadcnt()
+g_decr_active_threadcnt(void)
{
PR_AtomicDecrement(&active_threads);
}
int
-g_get_active_threadcnt()
+g_get_active_threadcnt(void)
{
return (int)active_threads;
}
@@ -1392,12 +1392,12 @@ void g_set_shutdown( int reason )
slapd_shutdown = reason;
}
-int g_get_shutdown()
+int g_get_shutdown(void)
{
return slapd_shutdown;
}
-int slapi_is_shutting_down()
+int slapi_is_shutting_down(void)
{
return slapd_shutdown;
}
@@ -1405,18 +1405,18 @@ int slapi_is_shutting_down()
static int cmd_shutdown;
-void c_set_shutdown()
+void c_set_shutdown(void)
{
cmd_shutdown = SLAPI_SHUTDOWN_SIGNAL;
}
-int c_get_shutdown()
+int c_get_shutdown(void)
{
return cmd_shutdown;
}
slapdFrontendConfig_t *
-getFrontendConfig()
+getFrontendConfig(void)
{
return &global_slapdFrontendConfig;
}
@@ -1428,7 +1428,7 @@ getFrontendConfig()
*/
void
-FrontendConfig_init () {
+FrontendConfig_init(void) {
slapdFrontendConfig_t *cfg = getFrontendConfig();
#if SLAPI_CFG_USE_RWLOCK == 1
@@ -1695,18 +1695,18 @@ FrontendConfig_init () {
}
int
-g_get_global_lastmod()
+g_get_global_lastmod(void)
{
return config_get_lastmod();
}
-int g_get_slapd_security_on(){
+int g_get_slapd_security_on(void){
return config_get_security();
}
static struct snmp_vars_t global_snmp_vars;
-struct snmp_vars_t * g_get_global_snmp_vars(){
+struct snmp_vars_t * g_get_global_snmp_vars(void){
return &global_snmp_vars;
}
@@ -3446,7 +3446,7 @@ config_set_dynamic_plugins( const char *attrname, char *value, char *errorbuf, i
}
int
-config_get_dynamic_plugins() {
+config_get_dynamic_plugins(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -3766,7 +3766,7 @@ config_set_rootpwstoragescheme( const char *attrname, char *value, char *errorbu
/*
* kexcoff: to replace default initialization in FrontendConfig_init()
*/
-int config_set_storagescheme() {
+int config_set_storagescheme(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
struct pw_scheme *new_scheme = NULL;
@@ -4766,7 +4766,7 @@ int config_get_slapi_counters()
}
char *
-config_get_workingdir() {
+config_get_workingdir(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4778,7 +4778,7 @@ config_get_workingdir() {
}
char *
-config_get_versionstring() {
+config_get_versionstring(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4799,7 +4799,7 @@ config_get_buildnum(void)
}
int
-config_get_secureport() {
+config_get_secureport(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4812,7 +4812,7 @@ config_get_secureport() {
int
-config_get_SSLclientAuth() {
+config_get_SSLclientAuth(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4825,7 +4825,7 @@ config_get_SSLclientAuth() {
int
-config_get_ssl_check_hostname()
+config_get_ssl_check_hostname(void)
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
return (int)slapdFrontendConfig->ssl_check_hostname;
@@ -4833,7 +4833,7 @@ config_get_ssl_check_hostname()
char *
-config_get_localhost() {
+config_get_localhost(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4846,7 +4846,7 @@ config_get_localhost() {
}
char *
-config_get_listenhost() {
+config_get_listenhost(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4858,7 +4858,7 @@ config_get_listenhost() {
}
char *
-config_get_securelistenhost() {
+config_get_securelistenhost(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4870,7 +4870,7 @@ config_get_securelistenhost() {
}
char *
-config_get_srvtab() {
+config_get_srvtab(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4882,7 +4882,7 @@ config_get_srvtab() {
}
int
-config_get_sizelimit() {
+config_get_sizelimit(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4894,7 +4894,7 @@ config_get_sizelimit() {
}
int
-config_get_pagedsizelimit() {
+config_get_pagedsizelimit(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4906,7 +4906,7 @@ config_get_pagedsizelimit() {
}
char *
-config_get_pw_admin_dn()
+config_get_pw_admin_dn(void)
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -4919,7 +4919,7 @@ config_get_pw_admin_dn()
}
char *
-config_get_pw_storagescheme() {
+config_get_pw_storagescheme(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal = 0;
@@ -4932,7 +4932,7 @@ config_get_pw_storagescheme() {
int
-config_get_pw_change() {
+config_get_pw_change(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4945,7 +4945,7 @@ config_get_pw_change() {
int
-config_get_pw_history() {
+config_get_pw_history(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4959,7 +4959,7 @@ config_get_pw_history() {
int
-config_get_pw_must_change() {
+config_get_pw_must_change(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4971,7 +4971,7 @@ config_get_pw_must_change() {
}
int
-config_get_allow_hashed_pw()
+config_get_allow_hashed_pw(void)
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4984,7 +4984,7 @@ config_get_allow_hashed_pw()
}
int
-config_get_pw_syntax() {
+config_get_pw_syntax(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -4998,7 +4998,7 @@ config_get_pw_syntax() {
int
-config_get_pw_minlength() {
+config_get_pw_minlength(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5010,7 +5010,7 @@ config_get_pw_minlength() {
}
int
-config_get_pw_mindigits() {
+config_get_pw_mindigits(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5022,7 +5022,7 @@ config_get_pw_mindigits() {
}
int
-config_get_pw_minalphas() {
+config_get_pw_minalphas(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5034,7 +5034,7 @@ config_get_pw_minalphas() {
}
int
-config_get_pw_minuppers() {
+config_get_pw_minuppers(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5046,7 +5046,7 @@ config_get_pw_minuppers() {
}
int
-config_get_pw_minlowers() {
+config_get_pw_minlowers(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5058,7 +5058,7 @@ config_get_pw_minlowers() {
}
int
-config_get_pw_minspecials() {
+config_get_pw_minspecials(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5070,7 +5070,7 @@ config_get_pw_minspecials() {
}
int
-config_get_pw_min8bit() {
+config_get_pw_min8bit(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5082,7 +5082,7 @@ config_get_pw_min8bit() {
}
int
-config_get_pw_maxrepeats() {
+config_get_pw_maxrepeats(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5094,7 +5094,7 @@ config_get_pw_maxrepeats() {
}
int
-config_get_pw_mincategories() {
+config_get_pw_mincategories(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5106,7 +5106,7 @@ config_get_pw_mincategories() {
}
int
-config_get_pw_mintokenlength() {
+config_get_pw_mintokenlength(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5118,7 +5118,7 @@ config_get_pw_mintokenlength() {
}
int
-config_get_pw_maxfailure() {
+config_get_pw_maxfailure(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5130,7 +5130,7 @@ config_get_pw_maxfailure() {
}
int
-config_get_pw_inhistory() {
+config_get_pw_inhistory(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5142,7 +5142,7 @@ config_get_pw_inhistory() {
}
long
-config_get_pw_lockduration() {
+config_get_pw_lockduration(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
long retVal;
@@ -5155,7 +5155,7 @@ config_get_pw_lockduration() {
}
long
-config_get_pw_resetfailurecount() {
+config_get_pw_resetfailurecount(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
long retVal;
@@ -5167,7 +5167,7 @@ config_get_pw_resetfailurecount() {
}
int
-config_get_pw_is_global_policy() {
+config_get_pw_is_global_policy(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5179,7 +5179,7 @@ config_get_pw_is_global_policy() {
}
int
-config_get_pw_is_legacy_policy() {
+config_get_pw_is_legacy_policy(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5191,7 +5191,7 @@ config_get_pw_is_legacy_policy() {
}
int
-config_get_pw_exp() {
+config_get_pw_exp(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5204,7 +5204,7 @@ config_get_pw_exp() {
int
-config_get_pw_unlock() {
+config_get_pw_unlock(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5228,7 +5228,7 @@ config_get_pw_lockout(){
}
int
-config_get_pw_gracelimit() {
+config_get_pw_gracelimit(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal=0;
@@ -5265,7 +5265,7 @@ config_get_enquote_sup_oc(){
}
int
-config_get_nagle() {
+config_get_nagle(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5276,7 +5276,7 @@ config_get_nagle() {
}
int
-config_get_accesscontrol() {
+config_get_accesscontrol(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5288,7 +5288,7 @@ config_get_accesscontrol() {
}
int
-config_get_return_exact_case() {
+config_get_return_exact_case(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5298,7 +5298,7 @@ config_get_return_exact_case() {
}
int
-config_get_result_tweak() {
+config_get_result_tweak(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5310,7 +5310,7 @@ config_get_result_tweak() {
}
int
-config_get_moddn_aci() {
+config_get_moddn_aci(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5322,7 +5322,7 @@ config_get_moddn_aci() {
}
int
-config_get_security() {
+config_get_security(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5334,7 +5334,7 @@ config_get_security() {
}
int
-slapi_config_get_readonly() {
+slapi_config_get_readonly(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5346,7 +5346,7 @@ slapi_config_get_readonly() {
}
int
-config_get_schemacheck() {
+config_get_schemacheck(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5358,7 +5358,7 @@ config_get_schemacheck() {
}
int
-config_get_schemamod() {
+config_get_schemamod(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5370,7 +5370,7 @@ config_get_schemamod() {
}
int
-config_get_syntaxcheck() {
+config_get_syntaxcheck(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5382,7 +5382,7 @@ config_get_syntaxcheck() {
}
int
-config_get_syntaxlogging() {
+config_get_syntaxlogging(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5394,7 +5394,7 @@ config_get_syntaxlogging() {
}
int
-config_get_dn_validate_strict() {
+config_get_dn_validate_strict(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5406,7 +5406,7 @@ config_get_dn_validate_strict() {
}
int
-config_get_ds4_compatible_schema() {
+config_get_ds4_compatible_schema(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5418,7 +5418,7 @@ config_get_ds4_compatible_schema() {
}
int
-config_get_schema_ignore_trailing_spaces() {
+config_get_schema_ignore_trailing_spaces(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5430,7 +5430,7 @@ config_get_schema_ignore_trailing_spaces() {
}
char *
-config_get_rootdn() {
+config_get_rootdn(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -5441,12 +5441,12 @@ config_get_rootdn() {
return retVal;
}
-char * slapi_get_rootdn() {
+char * slapi_get_rootdn(void) {
return config_get_rootdn();
}
char *
-config_get_rootpw() {
+config_get_rootpw(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -5459,7 +5459,7 @@ config_get_rootpw() {
char *
-config_get_rootpwstoragescheme() {
+config_get_rootpwstoragescheme(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -5471,7 +5471,7 @@ config_get_rootpwstoragescheme() {
}
char *
-config_get_localuser() {
+config_get_localuser(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -5486,7 +5486,7 @@ config_get_localuser() {
/* calls to psetFullCreate() and psetGetAttrSingleValue(). See ssl.c, */
/* where this function is still used to set the global variable */
char *
-config_get_encryptionalias() {
+config_get_encryptionalias(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -5498,7 +5498,7 @@ config_get_encryptionalias() {
}
int
-config_get_threadnumber() {
+config_get_threadnumber(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5524,7 +5524,7 @@ config_get_maxthreadsperconn(){
}
int
-config_get_maxdescriptors() {
+config_get_maxdescriptors(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal;
@@ -5588,7 +5588,7 @@ config_get_groupevalnestlevel(){
}
struct berval **
-config_get_defaultreferral() {
+config_get_defaultreferral(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
struct berval **refs;
int nReferrals = 0;
@@ -5704,7 +5704,7 @@ config_get_auditfaillog( ){
}
long long
-config_get_pw_maxage() {
+config_get_pw_maxage(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
long long retVal;
@@ -5728,7 +5728,7 @@ config_get_pw_minage(){
}
long long
-config_get_pw_warning() {
+config_get_pw_warning(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
long retVal;
@@ -6221,7 +6221,7 @@ config_get_return_orig_type_switch()
}
char *
-config_get_basedn() {
+config_get_basedn(void) {
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
@@ -6291,7 +6291,7 @@ config_set_configdir(const char *attrname, char *value, char *errorbuf, int appl
}
char *
-config_get_instancedir()
+config_get_instancedir(void)
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
char *retVal;
diff --git a/ldap/servers/slapd/localhost.c b/ldap/servers/slapd/localhost.c
index 7b4e903..b5df93f 100644
--- a/ldap/servers/slapd/localhost.c
+++ b/ldap/servers/slapd/localhost.c
@@ -43,7 +43,7 @@
#endif
static char*
-find_localhost_DNS()
+find_localhost_DNS(void)
{
/* This implementation could (and should) be entirely replaced by:
dns_ip2host ("127.0.0.1", 1); defined in ldapserver/lib/base/dns.c
@@ -186,7 +186,7 @@ get_localhost_DNS()
}
static void
-set_localhost_DN()
+set_localhost_DN(void)
{
char *localhost_DNS = config_get_localhost();
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
index 94757fd..dece857 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -77,10 +77,10 @@ static int log__open_errorlogfile(int logfile_type, int locked);
static int log__open_auditlogfile(int logfile_type, int locked);
static int log__open_auditfaillogfile(int logfile_type, int locked);
static int log__needrotation(LOGFD fp, int logtype);
-static int log__delete_access_logfile();
+static int log__delete_access_logfile(void);
static int log__delete_error_logfile(int locked);
-static int log__delete_audit_logfile();
-static int log__delete_auditfail_logfile();
+static int log__delete_audit_logfile(void);
+static int log__delete_auditfail_logfile(void);
static int log__access_rotationinfof(char *pathname);
static int log__error_rotationinfof(char *pathname);
static int log__audit_rotationinfof(char *pathname);
@@ -2832,7 +2832,7 @@ log_rotate:
******************************************************************************/
static int
-log__delete_access_logfile()
+log__delete_access_logfile(void)
{
struct logfileinfo *logp = NULL;
@@ -3765,7 +3765,7 @@ delete_logfile:
******************************************************************************/
static int
-log__delete_audit_logfile()
+log__delete_audit_logfile(void)
{
struct logfileinfo *logp = NULL;
struct logfileinfo *delete_logp = NULL;
@@ -3932,7 +3932,7 @@ delete_logfile:
******************************************************************************/
static int
-log__delete_auditfail_logfile()
+log__delete_auditfail_logfile(void)
{
struct logfileinfo *logp = NULL;
struct logfileinfo *delete_logp = NULL;
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 1349e1b..e9e5ab9 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -61,17 +61,17 @@ union semun {
#endif
/* Forward Declarations */
-static void register_objects();
+static void register_objects(void);
static void process_command_line(int argc, char **argv, char *myname, char **extraname);
-static int slapd_exemode_ldif2db();
+static int slapd_exemode_ldif2db(void);
static int slapd_exemode_db2ldif(int argc, char **argv);
-static int slapd_exemode_db2index();
-static int slapd_exemode_archive2db();
-static int slapd_exemode_db2archive();
-static int slapd_exemode_upgradedb();
-static int slapd_exemode_upgradednformat();
-static int slapd_exemode_dbverify();
-static int slapd_exemode_suffix2instance();
+static int slapd_exemode_db2index(void);
+static int slapd_exemode_archive2db(void);
+static int slapd_exemode_db2archive(void);
+static int slapd_exemode_upgradedb(void);
+static int slapd_exemode_upgradednformat(void);
+static int slapd_exemode_dbverify(void);
+static int slapd_exemode_suffix2instance(void);
static int slapd_debug_level_string2level( const char *s );
static void slapd_debug_level_log( int level );
static void slapd_debug_level_usage( void );
@@ -82,7 +82,7 @@ static void cmd_set_shutdown(int);
static int slapd_exemode = SLAPD_EXEMODE_UNKNOWN;
-static int init_cmd_shutdown_detect()
+static int init_cmd_shutdown_detect(void)
{
/* First of all, we must reset the signal mask to get rid of any blockages
@@ -221,7 +221,7 @@ chown_dir_files(char *name, struct passwd *pw, PRBool strip_fn, PRBool both)
*/
static void
-fix_ownership()
+fix_ownership(void)
{
struct passwd* pw=NULL;
@@ -543,7 +543,7 @@ static void slapd_print_version(int verbose)
/* On UNIX, we create a file with our PID in it */
static int
-write_start_pid_file()
+write_start_pid_file(void)
{
FILE *fp = NULL;
/*
@@ -1183,7 +1183,7 @@ signal2sigaction( int s, void *a )
#endif /* hpux */
static void
-register_objects()
+register_objects(void)
{
get_operation_object_type();
daemon_register_connection();
@@ -2004,7 +2004,7 @@ static struct slapdplugin *lookup_plugin_by_instance_name(const char *name)
}
static int
-slapd_exemode_ldif2db()
+slapd_exemode_ldif2db(void)
{
int return_value= 0;
Slapi_PBlock pb;
@@ -2325,7 +2325,7 @@ slapd_exemode_db2ldif(int argc, char** argv)
}
static int
-slapd_exemode_suffix2instance()
+slapd_exemode_suffix2instance(void)
{
int return_value = 0;
char **instances = NULL;
@@ -2355,7 +2355,7 @@ slapd_exemode_suffix2instance()
return (return_value);
}
-static int slapd_exemode_db2index()
+static int slapd_exemode_db2index(void)
{
int return_value= 0;
struct slapdplugin *plugin;
@@ -2448,7 +2448,7 @@ static int slapd_exemode_db2index()
static int
-slapd_exemode_db2archive()
+slapd_exemode_db2archive(void)
{
int return_value= 0;
Slapi_PBlock pb;
@@ -2502,7 +2502,7 @@ slapd_exemode_db2archive()
}
static int
-slapd_exemode_archive2db()
+slapd_exemode_archive2db(void)
{
int return_value= 0;
Slapi_PBlock pb;
@@ -2561,7 +2561,7 @@ slapd_exemode_archive2db()
* (604921) Support a database uprev process any time post-install
*/
static int
-slapd_exemode_upgradedb()
+slapd_exemode_upgradedb(void)
{
int return_value= 0;
Slapi_PBlock pb;
@@ -2631,7 +2631,7 @@ slapd_exemode_upgradedb()
/* Command to upgrade the old dn format to the new style */
static int
-slapd_exemode_upgradednformat()
+slapd_exemode_upgradednformat(void)
{
int rc = -1; /* error, by default */
Slapi_PBlock pb;
@@ -2708,7 +2708,7 @@ bail:
* function to perform DB verify
*/
static int
-slapd_exemode_dbverify()
+slapd_exemode_dbverify(void)
{
int return_value = 0;
Slapi_PBlock pb;
diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c
index df66f30..8d98275 100644
--- a/ldap/servers/slapd/mapping_tree.c
+++ b/ldap/servers/slapd/mapping_tree.c
@@ -109,9 +109,9 @@ static int extension_type = -1; /* type returned from the factory */
#define MAPPING_TREE_BASE_DN "cn=mapping tree,cn=config"
#define MAPPING_TREE_PARENT_ATTRIBUTE "nsslapd-parent-suffix"
-void mtn_wlock();
-void mtn_lock();
-void mtn_unlock();
+void mtn_wlock(void);
+void mtn_lock(void);
+void mtn_unlock(void);
static mapping_tree_node * mtn_get_mapping_tree_node_by_entry(
mapping_tree_node* node, const Slapi_DN *dn);
@@ -160,7 +160,7 @@ void slapi_register_backend_state_change(void * handle, slapi_backend_state_chan
}
/* To unregister all the state change callbacks registered on the mapping tree */
-int slapi_unregister_backend_state_change_all()
+int slapi_unregister_backend_state_change_all(void)
{
struct mtn_be_ch_list *cur_be_ch_plg;
while (mtn_plug_list)
@@ -3752,7 +3752,7 @@ slapi_mtn_be_set_readonly(Slapi_Backend *be, int readonly)
static int lock_count = 0;
#endif
-void mtn_wlock()
+void mtn_wlock(void)
{
slapi_rwlock_wrlock(myLock);
#ifdef DEBUG
@@ -3761,7 +3761,7 @@ void mtn_wlock()
#endif
}
-void mtn_lock()
+void mtn_lock(void)
{
slapi_rwlock_rdlock(myLock);
#ifdef DEBUG
@@ -3770,7 +3770,7 @@ void mtn_lock()
#endif
}
-void mtn_unlock()
+void mtn_unlock(void)
{
#ifdef DEBUG
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index 2c2081c..e1b0987 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -54,7 +54,7 @@ static void plugin_config_init (struct pluginconfig *config);
static void plugin_config_cleanup (struct pluginconfig *config);
static int plugin_config_set_action (int *action, char *value);
static struct pluginconfig* plugin_get_config (struct slapdplugin *plugin);
-static void default_plugin_init();
+static void default_plugin_init(void);
static void ptd_init (PluginTargetData *ptd);
static void ptd_cleanup (PluginTargetData *ptd);
static void ptd_add_subtree (PluginTargetData *ptd, Slapi_DN *subtree);
@@ -68,7 +68,7 @@ static PRBool plugin_is_global (const PluginTargetData *ptd);
static void plugin_set_default_access (struct pluginconfig *config);
static int plugin_delete_check_dependency(struct slapdplugin *plugin_entry, int flag, char *returntext);
static char *plugin_get_type_str( int type );
-static void plugin_cleanup_list();
+static void plugin_cleanup_list(void);
static int plugin_remove_plugins(struct slapdplugin *plugin_entry, char *plugin_type);
static void plugin_remove_from_shutdown(struct slapdplugin *plugin_entry);
static void plugin_free(struct slapdplugin *plugin);
@@ -1890,7 +1890,7 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int operation, c
*
*/
void
-plugin_dependency_closeall()
+plugin_dependency_closeall(void)
{
Slapi_PBlock pb;
int plugins_closed = 0;
@@ -3389,7 +3389,7 @@ plugin_remove_from_shutdown(struct slapdplugin *plugin_entry)
* Free the plugins that have been set to be removed.
*/
static void
-plugin_cleanup_list()
+plugin_cleanup_list(void)
{
struct slapdplugin *plugin = NULL;
entry_and_plugin_t *ep = dep_plugin_entries;
@@ -3993,7 +3993,7 @@ int plugin_build_operation_action_bitmap (int input_actions, const struct slapdp
}
const struct slapdplugin*
-plugin_get_server_plg()
+plugin_get_server_plg(void)
{
if(!global_server_plg_initialised)
{
@@ -4009,7 +4009,7 @@ plugin_get_server_plg()
return &global_server_plg;
}
-struct slapi_componentid * plugin_get_default_component_id() {
+struct slapi_componentid * plugin_get_default_component_id(void) {
if(!global_server_plg_id_initialised) {
global_server_id_plg.sci_plugin=plugin_get_server_plg();
@@ -4021,7 +4021,7 @@ struct slapi_componentid * plugin_get_default_component_id() {
}
static void
-default_plugin_init()
+default_plugin_init(void)
{
global_default_plg.plg_name = "old plugin";
plugin_config_init (&global_default_plg.plg_conf);
diff --git a/ldap/servers/slapd/plugin_mr.c b/ldap/servers/slapd/plugin_mr.c
index 0f9cb4d..a930c3c 100644
--- a/ldap/servers/slapd/plugin_mr.c
+++ b/ldap/servers/slapd/plugin_mr.c
@@ -48,7 +48,7 @@ static PRLock* global_mr_oids_lock = NULL;
static int default_mr_indexer_create(Slapi_PBlock* pb);
static void
-init_global_mr_lock()
+init_global_mr_lock(void)
{
if(global_mr_oids_lock==NULL)
{
@@ -57,7 +57,7 @@ init_global_mr_lock()
}
struct slapdplugin *
-slapi_get_global_mr_plugins()
+slapi_get_global_mr_plugins(void)
{
return get_plugin_list(PLUGIN_LIST_MATCHINGRULE);
}
diff --git a/ldap/servers/slapd/protect_db.c b/ldap/servers/slapd/protect_db.c
index 4579852..238f943 100644
--- a/ldap/servers/slapd/protect_db.c
+++ b/ldap/servers/slapd/protect_db.c
@@ -38,7 +38,7 @@
#include "slap.h"
static int
-grab_lockfile()
+grab_lockfile(void)
{
pid_t pid, owning_pid;
char lockfile[MAXPATHLEN];
@@ -124,7 +124,7 @@ grab_lockfile()
}
static void
-release_lockfile()
+release_lockfile(void)
{
char lockfile[MAXPATHLEN];
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
@@ -311,7 +311,7 @@ remove_and_update(char *dir_name)
* pids. It also removes the files for this process.
*/
void
-remove_slapd_process()
+remove_slapd_process(void)
{
char import_dir[MAXPATHLEN];
char export_dir[MAXPATHLEN];
@@ -495,7 +495,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
* returns 1 if slapd is running, 0 if not, -1 on error
*/
int
-is_slapd_running() {
+is_slapd_running(void) {
char server_dir[MAXPATHLEN];
slapdFrontendConfig_t *cfg = getFrontendConfig();
int running = 0;
diff --git a/ldap/servers/slapd/protect_db.h b/ldap/servers/slapd/protect_db.h
index 66adfb3..8dcdb01 100644
--- a/ldap/servers/slapd/protect_db.h
+++ b/ldap/servers/slapd/protect_db.h
@@ -15,7 +15,7 @@
int add_new_slapd_process(int exec_mode, int r_flag, int skip_flag);
/* int is_slapd_running(); */
-void remove_slapd_process();
+void remove_slapd_process(void);
/*
* These are the format strings used in the error messages in protect_db.c.
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 712642f..7ab8ca3 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -107,7 +107,7 @@ struct asyntaxinfo *attr_syntax_get_by_oid ( const char *oid, PRUint32 schema_fl
struct asyntaxinfo *attr_syntax_get_by_name ( const char *name, PRUint32 schema_flags );
struct asyntaxinfo *attr_syntax_get_by_name_with_default ( const char *name );
struct asyntaxinfo *attr_syntax_get_by_name_locking_optional ( const char *name, PRBool use_lock, PRUint32 schema_flags );
-struct asyntaxinfo *attr_syntax_get_global_at();
+struct asyntaxinfo *attr_syntax_get_global_at(void);
struct asyntaxinfo *attr_syntax_find(struct asyntaxinfo *at1, struct asyntaxinfo *at2);
void attr_syntax_swap_ht(void);
/*
@@ -184,10 +184,10 @@ void be_addsuffix(Slapi_Backend *be,const Slapi_DN *suffix);
Slapi_DN *be_getconfigdn(Slapi_Backend *be,Slapi_DN *dn);
Slapi_DN *be_getmonitordn(Slapi_Backend *be,Slapi_DN *dn);
int be_writeconfig (Slapi_Backend *be);
-void global_backend_lock_init();
-int global_backend_lock_requested();
-void global_backend_lock_lock();
-void global_backend_lock_unlock();
+void global_backend_lock_init(void);
+int global_backend_lock_requested(void);
+void global_backend_lock_lock(void);
+void global_backend_lock_unlock(void);
/*
* backend_manager.c
@@ -195,19 +195,19 @@ void global_backend_lock_unlock();
Slapi_Backend *be_new_internal(struct dse *pdse, const char *type, const char *name);
void be_replace_dse_internal(Slapi_Backend *be, struct dse *pdse);
int fedse_create_startOK(char *filename, char *startokfilename, const char *configdir);
-void be_cleanupall();
-void be_flushall();
+void be_cleanupall(void);
+void be_flushall(void);
int be_remove( Slapi_Backend *be );
void g_set_defsize(int val);
void g_set_deftime(int val);
Slapi_Backend *g_get_user_backend( int n );
-int g_get_defsize();
-int g_get_deftime();
+int g_get_defsize(void);
+int g_get_deftime(void);
void be_unbindall( Connection *conn, Operation *op);
-int be_nbackends_public();
-void g_incr_active_threadcnt();
-void g_decr_active_threadcnt();
-int g_get_active_threadcnt();
+int be_nbackends_public(void);
+void g_incr_active_threadcnt(void);
+void g_decr_active_threadcnt(void);
+int g_get_active_threadcnt(void);
/*
* bind.c
@@ -225,18 +225,18 @@ void do_compare( Slapi_PBlock *pb );
* computed.c
*/
int compute_attribute(char *type, Slapi_PBlock *pb,BerElement *ber,Slapi_Entry *e,int attrsonly,char *requested_type);
-int compute_init();
-int compute_terminate();
-void compute_plugins_started();
+int compute_init(void);
+int compute_terminate(void);
+void compute_plugins_started(void);
/*
* config.c
*/
int slapd_bootstrap_config(const char *configdir);
-int config_set_storagescheme();
+int config_set_storagescheme(void);
int get_netsite_root_path(char *pathname);
-int slapd_write_config ();
+int slapd_write_config(void);
int config_set_port( const char *attrname, char *port, char *errorbuf, int apply );
int config_set_secureport( const char *attrname, char *port, char *errorbuf, int apply );
int config_set_SSLclientAuth( const char *attrname, char *value, char *errorbuf, int apply );
@@ -403,125 +403,125 @@ int log_set_backend(const char *attrname, char *value, int logtype, char *errorb
#ifdef HAVE_CLOCK_GETTIME
int config_set_logging_hr_timestamps(const char *attrname, char *value, char *errorbuf, int apply);
-void log_enable_hr_timestamps();
-void log_disable_hr_timestamps();
+void log_enable_hr_timestamps(void);
+void log_disable_hr_timestamps(void);
#endif
-int config_get_SSLclientAuth();
-int config_get_ssl_check_hostname();
-char *config_get_SSL3ciphers();
-char *config_get_localhost();
-char *config_get_listenhost();
-char *config_get_securelistenhost();
-char *config_get_ldapi_filename();
-int config_get_ldapi_switch();
-int config_get_ldapi_bind_switch();
-char *config_get_ldapi_root_dn();
-int config_get_ldapi_map_entries();
-char *config_get_ldapi_uidnumber_type();
-char *config_get_ldapi_gidnumber_type();
-char *config_get_ldapi_search_base_dn();
+int config_get_SSLclientAuth(void);
+int config_get_ssl_check_hostname(void);
+char *config_get_SSL3ciphers(void);
+char *config_get_localhost(void);
+char *config_get_listenhost(void);
+char *config_get_securelistenhost(void);
+char *config_get_ldapi_filename(void);
+int config_get_ldapi_switch(void);
+int config_get_ldapi_bind_switch(void);
+char *config_get_ldapi_root_dn(void);
+int config_get_ldapi_map_entries(void);
+char *config_get_ldapi_uidnumber_type(void);
+char *config_get_ldapi_gidnumber_type(void);
+char *config_get_ldapi_search_base_dn(void);
#if defined(ENABLE_AUTO_DN_SUFFIX)
-char *config_get_ldapi_auto_dn_suffix();
+char *config_get_ldapi_auto_dn_suffix(void);
#endif
-char *config_get_anon_limits_dn();
-int config_get_slapi_counters();
-char *config_get_srvtab();
-int config_get_sizelimit();
-int config_get_pagedsizelimit();
-char *config_get_pw_storagescheme();
-int config_get_pw_change();
-int config_get_pw_history();
-int config_get_pw_must_change();
-int config_get_allow_hashed_pw();
-int config_get_pw_syntax();
-int config_get_pw_minlength();
-int config_get_pw_mindigits();
-int config_get_pw_minalphas();
-int config_get_pw_minuppers();
-int config_get_pw_minlowers();
-int config_get_pw_minspecials();
-int config_get_pw_min8bit();
-int config_get_pw_maxrepeats();
-int config_get_pw_mincategories();
-int config_get_pw_mintokenlength();
-int config_get_pw_maxfailure();
-int config_get_pw_inhistory();
-long config_get_pw_lockduration();
-long config_get_pw_resetfailurecount();
-int config_get_pw_exp();
-int config_get_pw_unlock();
-int config_get_pw_lockout();
-int config_get_pw_gracelimit();
-int config_get_pwpolicy_inherit_global();
-int config_get_lastmod();
-int config_get_nagle();
-int config_get_accesscontrol();
-int config_get_return_exact_case();
-int config_get_result_tweak();
-int config_get_moddn_aci();
-int config_get_security();
-int config_get_schemacheck();
-int config_get_syntaxcheck();
-int config_get_syntaxlogging();
-int config_get_dn_validate_strict();
-int config_get_ds4_compatible_schema();
-int config_get_schema_ignore_trailing_spaces();
-char *config_get_rootdn();
-char *config_get_rootpw();
-char *config_get_rootpwstoragescheme();
-char *config_get_localuser();
-char *config_get_workingdir();
-char *config_get_encryptionalias();
-int config_get_threadnumber();
-int config_get_maxthreadsperconn();
-int config_get_maxdescriptors();
-int config_get_reservedescriptors();
-int config_get_ioblocktimeout();
-int config_get_idletimeout();
-int config_get_max_filter_nest_level();
-int config_get_groupevalnestlevel();
-struct berval **config_get_defaultreferral();
-char *config_get_userat();
-int config_get_timelimit();
-char *config_get_pw_admin_dn();
-char* config_get_useroc();
-char *config_get_accesslog();
-char *config_get_errorlog();
-char *config_get_auditlog();
-char *config_get_auditfaillog();
-long long config_get_pw_maxage();
-long long config_get_pw_minage();
-long long config_get_pw_warning();
-int config_get_errorlog_level();
-int config_get_accesslog_level();
-int config_get_auditlog_logging_enabled();
-int config_get_auditfaillog_logging_enabled();
+char *config_get_anon_limits_dn(void);
+int config_get_slapi_counters(void);
+char *config_get_srvtab(void);
+int config_get_sizelimit(void);
+int config_get_pagedsizelimit(void);
+char *config_get_pw_storagescheme(void);
+int config_get_pw_change(void);
+int config_get_pw_history(void);
+int config_get_pw_must_change(void);
+int config_get_allow_hashed_pw(void);
+int config_get_pw_syntax(void);
+int config_get_pw_minlength(void);
+int config_get_pw_mindigits(void);
+int config_get_pw_minalphas(void);
+int config_get_pw_minuppers(void);
+int config_get_pw_minlowers(void);
+int config_get_pw_minspecials(void);
+int config_get_pw_min8bit(void);
+int config_get_pw_maxrepeats(void);
+int config_get_pw_mincategories(void);
+int config_get_pw_mintokenlength(void);
+int config_get_pw_maxfailure(void);
+int config_get_pw_inhistory(void);
+long config_get_pw_lockduration(void);
+long config_get_pw_resetfailurecount(void);
+int config_get_pw_exp(void);
+int config_get_pw_unlock(void);
+int config_get_pw_lockout(void);
+int config_get_pw_gracelimit(void);
+int config_get_pwpolicy_inherit_global(void);
+int config_get_lastmod(void);
+int config_get_nagle(void);
+int config_get_accesscontrol(void);
+int config_get_return_exact_case(void);
+int config_get_result_tweak(void);
+int config_get_moddn_aci(void);
+int config_get_security(void);
+int config_get_schemacheck(void);
+int config_get_syntaxcheck(void);
+int config_get_syntaxlogging(void);
+int config_get_dn_validate_strict(void);
+int config_get_ds4_compatible_schema(void);
+int config_get_schema_ignore_trailing_spaces(void);
+char *config_get_rootdn(void);
+char *config_get_rootpw(void);
+char *config_get_rootpwstoragescheme(void);
+char *config_get_localuser(void);
+char *config_get_workingdir(void);
+char *config_get_encryptionalias(void);
+int config_get_threadnumber(void);
+int config_get_maxthreadsperconn(void);
+int config_get_maxdescriptors(void);
+int config_get_reservedescriptors(void);
+int config_get_ioblocktimeout(void);
+int config_get_idletimeout(void);
+int config_get_max_filter_nest_level(void);
+int config_get_groupevalnestlevel(void);
+struct berval **config_get_defaultreferral(void);
+char *config_get_userat(void);
+int config_get_timelimit(void);
+char *config_get_pw_admin_dn(void);
+char* config_get_useroc(void);
+char *config_get_accesslog(void);
+char *config_get_errorlog(void);
+char *config_get_auditlog(void);
+char *config_get_auditfaillog(void);
+long long config_get_pw_maxage(void);
+long long config_get_pw_minage(void);
+long long config_get_pw_warning(void);
+int config_get_errorlog_level(void);
+int config_get_accesslog_level(void);
+int config_get_auditlog_logging_enabled(void);
+int config_get_auditfaillog_logging_enabled(void);
char *config_get_referral_mode(void);
int config_get_conntablesize(void);
int config_check_referral_mode(void);
-ber_len_t config_get_maxbersize();
-size_t config_get_maxsasliosize();
-char *config_get_versionstring();
+ber_len_t config_get_maxbersize(void);
+size_t config_get_maxsasliosize(void);
+char *config_get_versionstring(void);
char *config_get_buildnum(void);
-int config_get_enquote_sup_oc();
-char *config_get_basedn();
-char *config_get_configdir();
-char *config_get_schemadir();
-char *config_get_lockdir();
-char *config_get_tmpdir();
-char *config_get_certdir();
-char *config_get_ldifdir();
-char *config_get_bakdir();
-char *config_get_rundir();
-char *config_get_saslpath();
-char **config_get_errorlog_list();
-char **config_get_accesslog_list();
-char **config_get_auditlog_list();
-char **config_get_auditfaillog_list();
-int config_get_attrname_exceptions();
-int config_get_hash_filters();
-int config_get_rewrite_rfc1274();
+int config_get_enquote_sup_oc(void);
+char *config_get_basedn(void);
+char *config_get_configdir(void);
+char *config_get_schemadir(void);
+char *config_get_lockdir(void);
+char *config_get_tmpdir(void);
+char *config_get_certdir(void);
+char *config_get_ldifdir(void);
+char *config_get_bakdir(void);
+char *config_get_rundir(void);
+char *config_get_saslpath(void);
+char **config_get_errorlog_list(void);
+char **config_get_accesslog_list(void);
+char **config_get_auditlog_list(void);
+char **config_get_auditfaillog_list(void);
+int config_get_attrname_exceptions(void);
+int config_get_hash_filters(void);
+int config_get_rewrite_rfc1274(void);
int config_get_outbound_ldap_io_timeout(void);
int config_get_unauth_binds_switch(void);
int config_get_require_secure_binds(void);
@@ -530,14 +530,14 @@ int config_get_localssf(void);
int config_get_minssf(void);
int config_get_minssf_exclude_rootdse(void);
int config_get_validate_cert_switch(void);
-int config_get_csnlogging();
+int config_get_csnlogging(void);
#ifdef MEMPOOL_EXPERIMENTAL
-int config_get_mempool_switch();
-int config_get_mempool_maxfreelist();
-long config_get_system_page_size();
-int config_get_system_page_bits();
+int config_get_mempool_switch(void);
+int config_get_mempool_maxfreelist(void);
+long config_get_system_page_size(void);
+int config_get_system_page_bits(void);
#endif
-int config_get_force_sasl_external();
+int config_get_force_sasl_external(void);
int config_get_entryusn_global(void);
char *config_get_allowed_to_delete_attrs(void);
char *config_get_entryusn_import_init(void);
@@ -546,37 +546,37 @@ int config_allowed_to_delete_attrs(const char *attr_type);
void config_set_accesslog_enabled(int value);
void config_set_auditlog_enabled(int value);
void config_set_auditfaillog_enabled(int value);
-int config_get_accesslog_logging_enabled();
-int config_get_disk_monitoring();
-PRInt64 config_get_disk_threshold();
-int config_get_disk_grace_period();
-int config_get_disk_logging_critical();
-int config_get_ndn_cache_count();
-size_t config_get_ndn_cache_size();
-int config_get_ndn_cache_enabled();
-int config_get_return_orig_type_switch();
-char *config_get_allowed_sasl_mechs();
+int config_get_accesslog_logging_enabled(void);
+int config_get_disk_monitoring(void);
+PRInt64 config_get_disk_threshold(void);
+int config_get_disk_grace_period(void);
+int config_get_disk_logging_critical(void);
+int config_get_ndn_cache_count(void);
+size_t config_get_ndn_cache_size(void);
+int config_get_ndn_cache_enabled(void);
+int config_get_return_orig_type_switch(void);
+char *config_get_allowed_sasl_mechs(void);
int config_set_allowed_sasl_mechs(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_schemamod();
+int config_get_schemamod(void);
int config_set_ignore_vattrs(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_ignore_vattrs();
+int config_get_ignore_vattrs(void);
int config_set_sasl_mapping_fallback(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_sasl_mapping_fallback();
-int config_get_unhashed_pw_switch();
-int config_get_sasl_maxbufsize();
-int config_get_enable_turbo_mode();
+int config_get_sasl_mapping_fallback(void);
+int config_get_unhashed_pw_switch(void);
+int config_get_sasl_maxbufsize(void);
+int config_get_enable_turbo_mode(void);
int config_set_enable_turbo_mode(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_connection_buffer();
+int config_get_connection_buffer(void);
int config_set_connection_buffer(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_connection_nocanon();
-int config_get_plugin_logging();
+int config_get_connection_nocanon(void);
+int config_get_plugin_logging(void);
int config_set_connection_nocanon(const char *attrname, char *value, char *errorbuf, int apply);
int config_set_plugin_logging(const char *attrname, char *value, char *errorbuf, int apply);
int config_get_listen_backlog_size(void);
int config_set_dynamic_plugins(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_dynamic_plugins();
+int config_get_dynamic_plugins(void);
int config_set_cn_uses_dn_syntax_in_dns(const char *attrname, char *value, char *errorbuf, int apply);
-int config_get_cn_uses_dn_syntax_in_dns();
+int config_get_cn_uses_dn_syntax_in_dns(void);
#ifdef ENABLE_NUNC_STANS
int config_get_enable_nunc_stans(void);
int config_set_enable_nunc_stans(const char *attrname, char *value, char *errorbuf, int apply);
@@ -585,17 +585,17 @@ int config_set_extract_pem(const char *attrname, char *value, char *errorbuf, in
PLHashNumber hashNocaseString(const void *key);
PRIntn hashNocaseCompare(const void *v1, const void *v2);
-int config_get_ignore_time_skew();
-int config_get_global_backend_lock();
+int config_get_ignore_time_skew(void);
+int config_get_global_backend_lock(void);
#if defined(LINUX)
-int config_get_malloc_mxfast();
-int config_get_malloc_trim_threshold();
-int config_get_malloc_mmap_threshold();
+int config_get_malloc_mxfast(void);
+int config_get_malloc_trim_threshold(void);
+int config_get_malloc_mmap_threshold(void);
#endif
-int config_get_maxsimplepaged_per_conn();
-int config_get_extract_pem();
+int config_get_maxsimplepaged_per_conn(void);
+int config_get_extract_pem(void);
int is_abspath(const char *);
char* rel2abspath( char * );
@@ -692,8 +692,8 @@ char *filter_strcpy_special_ext( char *d, char *s, int flags );
* entry.c
*/
int is_rootdse( const char *dn );
-int get_entry_object_type();
-int entry_computed_attr_init();
+int get_entry_object_type(void);
+int entry_computed_attr_init(void);
void send_referrals_from_entry(Slapi_PBlock *pb, Slapi_Entry *referral);
/*
@@ -731,7 +731,7 @@ void dse_prev_search_results (void *pb);
* fedse.c
*/
-int setup_internal_backends();
+int setup_internal_backends(char *configdir);
/*
@@ -746,7 +746,7 @@ void do_extended( Slapi_PBlock *pb );
* house.c
*/
PRThread* housekeeping_start(time_t cur_time, void *arg);
-void housekeeping_stop();
+void housekeeping_stop(void);
/*
* lock.c
@@ -770,7 +770,7 @@ int slapd_log_audit(char *buffer, int buf_len, int sourcelog);
int slapd_log_audit_internal(char *buffer, int buf_len, int state);
int slapd_log_auditfail(char *buffer, int buf_len);
int slapd_log_auditfail_internal(char *buffer, int buf_len);
-void log_access_flush();
+void log_access_flush(void);
int access_log_openf( char *pathname, int locked);
@@ -780,10 +780,10 @@ int auditfail_log_openf( char *pathname, int locked);
void g_set_detached(int);
void g_log_init(int log_enabled);
-char *g_get_access_log();
-char *g_get_error_log();
-char *g_get_audit_log();
-char *g_get_auditfail_log();
+char *g_get_access_log(void);
+char *g_get_error_log(void);
+char *g_get_audit_log(void);
+char *g_get_auditfail_log(void);
void g_set_accesslog_level(int val);
int log_set_mode(const char *attrname, char *mode_str, int logtype, char *errorbuf, int apply);
@@ -814,7 +814,7 @@ int check_log_max_size(
void g_set_accesslog_level(int val);
-void log__delete_rotated_logs();
+void log__delete_rotated_logs(void);
/*
* util.c
@@ -862,8 +862,8 @@ Slapi_Operation *operation_new(int flags);
void operation_done( Slapi_Operation **op, Connection *conn );
void operation_free( Slapi_Operation **op, Connection *conn );
int slapi_op_abandoned( Slapi_PBlock *pb );
-void operation_out_of_disk_space();
-int get_operation_object_type();
+void operation_out_of_disk_space(void);
+int get_operation_object_type(void);
Slapi_DN* operation_get_target_spec (Slapi_Operation *op);
void operation_set_target_spec (Slapi_Operation *op, const Slapi_DN *target_spec);
void operation_set_target_spec_str (Slapi_Operation *op, const char *target_spec);
@@ -875,7 +875,7 @@ void operation_set_type(Slapi_Operation *op, unsigned long type);
/*
* plugin.c
*/
-void global_plugin_init();
+void global_plugin_init(void);
int plugin_call_plugins( Slapi_PBlock *, int );
int plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
slapi_plugin_init_fnptr initfunc, int add_to_dit, char *returntext);
@@ -884,7 +884,7 @@ int plugin_call_exop_plugins( Slapi_PBlock *pb, struct slapdplugin *p );
Slapi_Backend * plugin_extended_op_getbackend( Slapi_PBlock *pb, struct slapdplugin *p);
const char *plugin_extended_op_oid2string( const char *oid );
void plugin_closeall(int close_backends, int close_globals);
-void plugin_dependency_freeall();
+void plugin_dependency_freeall(void);
void plugin_startall(int argc, char **argv, char **plugin_list);
void plugin_get_plugin_dependencies(char *plugin_name, char ***names);
struct slapdplugin *get_plugin_list(int plugin_list_index);
@@ -911,14 +911,14 @@ void plugin_set_started(struct slapdplugin *p);
/*
* plugin_mr.c
*/
-struct slapdplugin *slapi_get_global_mr_plugins();
+struct slapdplugin *slapi_get_global_mr_plugins(void);
int plugin_mr_filter_create (mr_filter_t* f);
struct slapdplugin *plugin_mr_find( const char *nameoroid );
/*
* plugin_syntax.c
*/
-struct slapdplugin *slapi_get_global_syntax_plugins();
+struct slapdplugin *slapi_get_global_syntax_plugins(void);
int plugin_call_syntax_filter_ava( const Slapi_Attr *a, int ftype, struct ava *ava );
int plugin_call_syntax_filter_ava_sv( const Slapi_Attr *a, int ftype, struct ava *ava, Slapi_Value **retVal, int useDeletedValues );
int plugin_call_syntax_filter_sub( Slapi_PBlock *pb, Slapi_Attr *a, struct subfilt *fsub );
@@ -960,12 +960,12 @@ int add_shadow_ext_password_attrs(Slapi_PBlock *pb, Slapi_Entry **e);
int update_pw_retry ( Slapi_PBlock *pb );
void pw_apply_mods(const Slapi_DN *sdn, Slapi_Mods *mods);
void pw_set_componentID(struct slapi_componentid * cid);
-struct slapi_componentid * pw_get_componentID();
+struct slapi_componentid * pw_get_componentID(void);
/*
* referral.c
*/
-void referrals_free ();
+void referrals_free(void);
struct berval **ref_adjust( Slapi_PBlock *pb, struct berval **urls, const Slapi_DN *refcontainerdn, int is_reference );
/* GGOODREPL temporarily in slapi-plugin.h struct berval **get_data_source( char *dn, int orc, Ref_Array * ); */
@@ -982,11 +982,11 @@ void reslimit_cleanup( void );
* result.c
*/
void g_set_num_entries_sent( Slapi_Counter *counter );
-PRUint64 g_get_num_entries_sent();
+PRUint64 g_get_num_entries_sent(void);
void g_set_num_bytes_sent( Slapi_Counter *counter );
-PRUint64 g_get_num_bytes_sent();
+PRUint64 g_get_num_bytes_sent(void);
void g_set_default_referral( struct berval **ldap_url );
-struct berval **g_get_default_referral();
+struct berval **g_get_default_referral(void);
void disconnect_server( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error );
int send_ldap_search_entry( Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **ectrls,
char **attrs, int attrsonly );
@@ -1005,11 +1005,11 @@ int send_ldapv3_referral( Slapi_PBlock *pb, struct berval **urls );
int set_db_default_result_handlers(Slapi_PBlock *pb);
void disconnect_server_nomutex( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error );
void disconnect_server_nomutex_ext( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error, int schedule_closure_job );
-long g_get_current_conn_count();
-void g_increment_current_conn_count();
-void g_decrement_current_conn_count();
+long g_get_current_conn_count(void);
+void g_increment_current_conn_count(void);
+void g_decrement_current_conn_count(void);
void g_set_current_conn_count_mutex( PRLock *plock );
-PRLock *g_get_current_conn_count_mutex();
+PRLock *g_get_current_conn_count_mutex(void);
int encode_attr(Slapi_PBlock *pb,BerElement *ber,Slapi_Entry *e,Slapi_Attr *a,int attrsonly,char *type);
@@ -1025,11 +1025,11 @@ void oc_lock_read( void );
void oc_lock_write( void );
void oc_unlock( void );
/* Note: callers of g_get_global_oc_nolock() must hold a read or write lock */
-struct objclass* g_get_global_oc_nolock();
+struct objclass* g_get_global_oc_nolock(void);
/* Note: callers of g_set_global_oc_nolock() must hold a write lock */
void g_set_global_oc_nolock(struct objclass *newglobaloc);
/* Note: callers of g_get_global_schema_csn() must hold a read lock */
-const CSN *g_get_global_schema_csn();
+const CSN *g_get_global_schema_csn(void);
/* Note: callers of g_set_global_schema_csn() must hold a write lock. */
/* csn is consumed. */
void g_set_global_schema_csn(CSN *csn);
@@ -1062,10 +1062,10 @@ void do_search( Slapi_PBlock *pb );
* ssl.c
*/
int slapd_nss_init(int init_ssl, int config_available);
-int slapd_ssl_init();
+int slapd_ssl_init(void);
int slapd_ssl_init2(PRFileDesc **fd, int startTLS);
-int slapd_security_library_is_initialized();
-int slapd_ssl_listener_is_initialized();
+int slapd_security_library_is_initialized(void);
+int slapd_ssl_listener_is_initialized(void);
int slapd_SSL_client_auth (LDAP* ld);
SECKEYPrivateKey *slapd_get_unlocked_key_for_cert(CERTCertificate *cert, void *pin_arg);
@@ -1101,11 +1101,11 @@ PK11Context * slapd_pk11_createContextBySymKey(CK_MECHANISM_TYPE type,
SECStatus slapd_pk11_cipherOp(PK11Context *context, unsigned char * out, int *outlen,
int maxout, unsigned char *in, int inlen);
SECStatus slapd_pk11_finalize(PK11Context *context);
-PK11SlotInfo *slapd_pk11_getInternalKeySlot();
-PK11SlotInfo *slapd_pk11_getInternalSlot();
+PK11SlotInfo *slapd_pk11_getInternalKeySlot(void);
+PK11SlotInfo *slapd_pk11_getInternalSlot(void);
SECStatus slapd_pk11_authenticate(PK11SlotInfo *slot, PRBool loadCerts, void *wincx);
void slapd_pk11_setSlotPWValues(PK11SlotInfo *slot,int askpw, int timeout);
-PRBool slapd_pk11_isFIPS();
+PRBool slapd_pk11_isFIPS(void);
CERTCertificate *slapd_pk11_findCertFromNickname(char *nickname, void *wincx);
SECKEYPrivateKey *slapd_pk11_findKeyByAnyCert(CERTCertificate *cert, void *wincx);
PRBool slapd_pk11_fortezzaHasKEA(CERTCertificate *cert);
@@ -1138,18 +1138,18 @@ CK_MECHANISM_TYPE slapd_PK11_GetPBECryptoMechanism(SECAlgorithmID *algid, SECIte
*/
int start_tls( Slapi_PBlock *pb );
int start_tls_graceful_closure( Connection *conn, Slapi_PBlock *pb, int is_initiator );
-int start_tls_register_plugin();
+int start_tls_register_plugin(void);
int start_tls_init( Slapi_PBlock *pb );
/* passwd_extop.c */
-int passwd_modify_register_plugin();
+int passwd_modify_register_plugin(void);
/*
* slapi_str2filter.c
*/
struct slapi_filter *slapi_str2filter( char *str );
char *slapi_find_matching_paren( const char *str);
-struct slapi_filter *str2simple();
+struct slapi_filter *str2simple(char *str , int unescape_filter);
/*
@@ -1157,8 +1157,8 @@ struct slapi_filter *str2simple();
*/
char *get_timestring(time_t *t);
void free_timestring(char *timestr);
-time_t current_time();
-time_t poll_current_time();
+time_t current_time(void);
+time_t poll_current_time(void);
char* format_localTime (time_t from);
int format_localTime_log(time_t t, int initsize, char *buf, int *bufsize);
int format_localTime_hr_log(time_t t, long nsec, int initsize, char *buf, int *bufsize);
@@ -1199,15 +1199,15 @@ void bind_credentials_clear( Connection *conn, PRBool lock_conn,
* libglobs.c
*/
void g_set_shutdown( int reason );
-int g_get_shutdown();
-void c_set_shutdown();
-int c_get_shutdown();
-int g_get_global_lastmod();
+int g_get_shutdown(void);
+void c_set_shutdown(void);
+int c_get_shutdown(void);
+int g_get_global_lastmod(void);
/* Ref_Array *g_get_global_referrals(void); */
-struct snmp_vars_t * g_get_global_snmp_vars();
-void FrontendConfig_init();
-int g_get_slapd_security_on();
-char *config_get_versionstring();
+struct snmp_vars_t * g_get_global_snmp_vars(void);
+void FrontendConfig_init(void);
+int g_get_slapd_security_on(void);
+char *config_get_versionstring(void);
void libldap_init_debug_level(int *);
int get_entry_point( int, caddr_t* );
@@ -1226,10 +1226,10 @@ int modify_root_dse( Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *entryAfter,
/*
* psearch.c
*/
-void ps_init_psearch_system();
-void ps_stop_psearch_system();
+void ps_init_psearch_system(void);
+void ps_stop_psearch_system(void);
void ps_add( Slapi_PBlock *pb, ber_int_t changetypes, int send_entchg_controls );
-void ps_wakeup_all();
+void ps_wakeup_all(void);
void ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype,
ber_int_t chgnum );
int ps_parse_control_value( struct berval *psbvp, ber_int_t *changetypesp,
@@ -1238,7 +1238,7 @@ int ps_parse_control_value( struct berval *psbvp, ber_int_t *changetypesp,
/*
* globals.c
*/
-void set_entry_points();
+void set_entry_points(void);
/*
* defbackend.c
@@ -1254,12 +1254,12 @@ void do_disconnect_server( Connection *conn, PRUint64 opconnid, int opid );
/*
* secpwd.c
*/
-char* getPassword();
+char* getPassword(void);
/*
* match.c
*/
-struct matchingRuleList *g_get_global_mrl();
+struct matchingRuleList *g_get_global_mrl(void);
void g_set_global_mrl(struct matchingRuleList *newglobalmrl);
/*
@@ -1279,19 +1279,19 @@ void factory_destroy_extension(int type,void *object,void *parent,void **extensi
*/
void write_audit_log_entry( Slapi_PBlock *pb);
-void auditlog_hide_unhashed_pw();
-void auditlog_expose_unhashed_pw();
+void auditlog_hide_unhashed_pw(void);
+void auditlog_expose_unhashed_pw(void);
void write_auditfail_log_entry( Slapi_PBlock *pb);
-void auditfaillog_hide_unhashed_pw();
-void auditfaillog_expose_unhashed_pw();
+void auditfaillog_hide_unhashed_pw(void);
+void auditfaillog_expose_unhashed_pw(void);
/*
* eventq.c
*/
-void eq_init();
-void eq_start();
-void eq_stop();
+void eq_init(void);
+void eq_start(void);
+void eq_stop(void);
/*
* uniqueidgen.c
@@ -1313,12 +1313,12 @@ int uniqueIDGenInit (const char *configDir, const Slapi_DN *configDN, PRBool mtG
Parameters: none
Return: none
*/
-void uniqueIDGenCleanup ();
+void uniqueIDGenCleanup(void);
/*
* init.c
*/
-void slapd_init();
+void slapd_init(void);
/*
* plugin.c
@@ -1355,7 +1355,7 @@ char* plugin_get_dn (const struct slapdplugin *plugin);
PRBool plugin_allow_internal_op (Slapi_DN *target, struct slapdplugin *plugin);
/* build operation action bitmap based on plugin configuration and actions specified for the operation */
int plugin_build_operation_action_bitmap (int input_actions, const struct slapdplugin *plugin);
-const struct slapdplugin* plugin_get_server_plg ();
+const struct slapdplugin* plugin_get_server_plg(void);
/* opshared.c - functions shared between regular and internal operations */
void op_shared_search (Slapi_PBlock *pb, int send_result);
@@ -1402,8 +1402,8 @@ void subentry_create_filter(Slapi_Filter** filter);
/*
* vattr.c
*/
-void vattr_init();
-void vattr_cleanup();
+void vattr_init(void);
+void vattr_cleanup(void);
/*
* slapd_plhash.c - supplement to NSPR plhash
@@ -1415,9 +1415,9 @@ void *PL_HashTableLookup_const(
/*
* mapping_tree.c
*/
-int mapping_tree_init();
-void mapping_tree_free ();
-int mapping_tree_get_extension_type ();
+int mapping_tree_init(void);
+void mapping_tree_free(void);
+int mapping_tree_get_extension_type(void);
/*
* connection.c
diff --git a/ldap/servers/slapd/psearch.c b/ldap/servers/slapd/psearch.c
index 00f13be..e88bcb9 100644
--- a/ldap/servers/slapd/psearch.c
+++ b/ldap/servers/slapd/psearch.c
@@ -82,7 +82,7 @@ static PSearch_List *psearch_list = NULL;
/* Forward declarations */
static void ps_send_results( void *arg );
-static PSearch *psearch_alloc();
+static PSearch *psearch_alloc(void);
static void ps_add_ps( PSearch *ps );
static void ps_remove( PSearch *dps );
static void pe_ch_free( PSEQNode **pe );
@@ -430,7 +430,7 @@ ps_send_results( void *arg )
* Allocate and initialize an empty PSearch node.
*/
static PSearch *
-psearch_alloc()
+psearch_alloc(void)
{
PSearch *ps;
diff --git a/ldap/servers/slapd/resourcelimit.c b/ldap/servers/slapd/resourcelimit.c
index 7630f88..5b08cb8 100644
--- a/ldap/servers/slapd/resourcelimit.c
+++ b/ldap/servers/slapd/resourcelimit.c
@@ -152,7 +152,7 @@ static void reslimit_connext_destructor( void *extension, void *object,
void *parent );
static int reslimit_get_ext( Slapi_Connection *conn, const char *logname,
SLAPIResLimitConnData **rlcdpp );
-static char ** reslimit_get_registered_attributes();
+static char ** reslimit_get_registered_attributes(void);
/*
@@ -440,7 +440,7 @@ log_and_return:
/* return the list of registered attributes */
-static char ** reslimit_get_registered_attributes()
+static char ** reslimit_get_registered_attributes(void)
{
int i;
diff --git a/ldap/servers/slapd/sasl_map.c b/ldap/servers/slapd/sasl_map.c
index 87244e3..7cc07ca 100644
--- a/ldap/servers/slapd/sasl_map.c
+++ b/ldap/servers/slapd/sasl_map.c
@@ -33,14 +33,14 @@ static char * configDN = "cn=mapping,cn=sasl,cn=config";
static sasl_map_private *sasl_map_static_priv = NULL;
static
-sasl_map_private *sasl_map_get_global_priv()
+sasl_map_private *sasl_map_get_global_priv(void)
{
/* ASSERT(sasl_map_static_priv) */
return sasl_map_static_priv;
}
static
-sasl_map_private *sasl_map_new_private()
+sasl_map_private *sasl_map_new_private(void)
{
Slapi_RWLock *new_lock = slapi_new_rwlock();
sasl_map_private *new_priv = NULL;
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index 742987e..0914b97 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -65,7 +65,7 @@ void nssasl_free(void *ptr)
static Slapi_ComponentId *sasl_component_id = NULL;
-static void generate_component_id()
+static void generate_component_id(void)
{
if (NULL == sasl_component_id) {
sasl_component_id = generate_componentid(NULL /* Not a plugin */,
@@ -73,7 +73,7 @@ static void generate_component_id()
}
}
-static Slapi_ComponentId *sasl_get_component_id()
+static Slapi_ComponentId *sasl_get_component_id(void)
{
return sasl_component_id;
}
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index 7689aa9..32a2bd6 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -6103,14 +6103,14 @@ schema_expand_objectclasses_nolock( Slapi_Entry *e )
/* lock to protect both objectclass and schema_dse */
static void
-reload_schemafile_lock()
+reload_schemafile_lock(void)
{
oc_lock_write();
schema_dse_lock_write();
}
static void
-reload_schemafile_unlock()
+reload_schemafile_unlock(void)
{
schema_dse_unlock();
oc_unlock();
diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h
index b74f9bd..804bdea 100644
--- a/ldap/servers/slapd/slap.h
+++ b/ldap/servers/slapd/slap.h
@@ -169,7 +169,17 @@ typedef struct symbol_t {
typedef void (*VFP)(void *);
typedef void (*VFPP)(void **);
typedef void (*VFP0)(void);
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
typedef void (*VFPV)(); /* takes undefined arguments */
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic pop
+#endif
+
+
#define LDAPI_INTERNAL 1
#include "slapi-private.h"
#include "pw.h"
@@ -1883,7 +1893,7 @@ struct snmp_vars_t{
typedef void (*ps_wakeup_all_fn_ptr)( void );
typedef void (*ps_service_fn_ptr)(Slapi_Entry *, Slapi_Entry *, int, int );
-typedef char *(*get_config_dn_fn_ptr)();
+typedef char *(*get_config_dn_fn_ptr)(void);
typedef void (*get_disconnect_server_fn_ptr)(Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error );
typedef int (*modify_config_dse_fn_ptr)( Slapi_PBlock *pb );
typedef int (*slapd_ssl_init_fn_ptr)( void );
@@ -2490,7 +2500,7 @@ typedef struct _slapdFrontendConfig {
#define CONNECTION_BUFFER_ADAPT 2
-slapdFrontendConfig_t *getFrontendConfig();
+slapdFrontendConfig_t *getFrontendConfig(void);
int slapd_bind_local_user(Connection *conn);
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 7022e59..2dda7e3 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -6273,7 +6273,7 @@ int slapi_ldap_bind(
*
* \return the full path of PEM format CA Cert
*/
-const char * slapi_get_cacertfile();
+const char * slapi_get_cacertfile(void);
/**
* Set the full path of PEM format CA Cert
diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h
index 52d1c4a..50684da 100644
--- a/ldap/servers/slapd/slapi-private.h
+++ b/ldap/servers/slapd/slapi-private.h
@@ -151,7 +151,7 @@ typedef PRUint16 ReplicaId;
#define MAX_REPLICA_ID 65535
/* we will use this value for the replica ID of read only replicas */
#define READ_ONLY_REPLICA_ID MAX_REPLICA_ID
-CSN *csn_new();
+CSN *csn_new(void);
CSN *csn_new_by_string(const char *s);
void csn_init_by_csn(CSN *csn1,const CSN *csn2);
void csn_init_by_string(CSN *csn, const char *s);
@@ -170,7 +170,7 @@ int csn_compare(const CSN *csn1, const CSN *csn2);
int csn_compare_ext(const CSN *csn1, const CSN *csn2, unsigned int flags);
#define CSN_COMPARE_SKIP_SUBSEQ 0x1
time_t csn_time_difference(const CSN *csn1, const CSN *csn2);
-size_t csn_string_size();
+size_t csn_string_size(void);
char *csn_as_attr_option_string(CSNType t,const CSN *csn,char *ss);
const CSN *csn_max(const CSN *csn1,const CSN *csn2);
/* this function allows to expand a csn into a set of csns.
@@ -254,13 +254,13 @@ void csngen_unregister_callbacks(CSNGen *gen, void *cookie);
/* this functions is periodically called from daemon.c to
update time used by all generators */
-void csngen_update_time ();
+void csngen_update_time(void);
/* debugging function */
void csngen_dump_state (const CSNGen *gen);
/* this function tests csn generator */
-void csngen_test ();
+void csngen_test(void);
/*
* State storage management routines
@@ -364,9 +364,9 @@ Slapi_DN *slapi_sdn_init_normdn_ndn_passin(Slapi_DN *sdn, const char *dn);
Slapi_DN *slapi_sdn_init_normdn_passin(Slapi_DN *sdn, const char *dn);
char *slapi_dn_normalize_original( char *dn );
char *slapi_dn_normalize_case_original( char *dn );
-void ndn_cache_init();
-void ndn_cache_destroy();
-int ndn_cache_started();
+void ndn_cache_init(void);
+void ndn_cache_destroy(void);
+int ndn_cache_started(void);
void ndn_cache_get_stats(PRUint64 *hits, PRUint64 *tries, size_t *size, size_t *max_size, long *count);
#define NDN_DEFAULT_SIZE 20971520 /* 20mb - size of normalized dn cache */
@@ -446,7 +446,7 @@ typedef struct datalist DataList;
typedef int (*CMPFN) (const void *el1, const void *el2);
typedef void (*FREEFN) (void **);
-DataList* dl_new ();
+DataList* dl_new(void);
void dl_free (DataList **dl);
void dl_init (DataList *dl, int init_alloc);
void dl_cleanup (DataList *dl, FREEFN freefn);
@@ -496,8 +496,8 @@ int slapi_entry_vattrcache_findAndTest(const Slapi_Entry *e, const char *type,
int *rc);
int slapi_vattrcache_iscacheable( const char * type );
-void slapi_vattrcache_cache_all();
-void slapi_vattrcache_cache_none();
+void slapi_vattrcache_cache_all(void);
+void slapi_vattrcache_cache_none(void);
int vattr_test_filter( Slapi_PBlock *pb,
/* Entry we're interested in */ Slapi_Entry *e,
@@ -596,7 +596,7 @@ typedef struct slapi_operation_parameters
} p;
} slapi_operation_parameters;
-struct slapi_operation_parameters *operation_parameters_new();
+struct slapi_operation_parameters *operation_parameters_new(void);
struct slapi_operation_parameters *operation_parameters_dup(struct slapi_operation_parameters *sop);
void operation_parameters_done(struct slapi_operation_parameters *sop);
void operation_parameters_free(struct slapi_operation_parameters **sop);
@@ -613,10 +613,10 @@ const char *slapd_versatile_strerror( const PRErrorCode prerrno );
/*
* localhost.c
*/
-char* get_localhost_DNS();
+char* get_localhost_DNS(void);
/* Return the fully-qualified DNS name of this machine.
The caller should _not_ free this pointer. */
-char* get_localhost_DN();
+char* get_localhost_DN(void);
/*
* Reference-counted objects
@@ -672,7 +672,7 @@ mapping_tree_node *slapi_get_mapping_tree_node_by_dn(const Slapi_DN *dn);
char* slapi_get_mapping_tree_node_configdn(const Slapi_DN *root);
Slapi_DN* slapi_get_mapping_tree_node_configsdn(const Slapi_DN *root);
const Slapi_DN* slapi_get_mapping_tree_node_root(const mapping_tree_node *node);
-const char* slapi_get_mapping_tree_config_root ();
+const char* slapi_get_mapping_tree_config_root(void);
Slapi_Backend *slapi_mapping_tree_find_backend_for_sdn(Slapi_DN *sdn);
/* possible flags to check for */
#define SLAPI_MTN_LOCAL 0x1
@@ -717,7 +717,7 @@ struct slapi_componentid {
struct slapi_componentid *
generate_componentid ( struct slapdplugin * pp , char * name );
void release_componentid ( struct slapi_componentid * id );
-struct slapi_componentid * plugin_get_default_component_id();
+struct slapi_componentid * plugin_get_default_component_id(void);
/* interface for component mgmt */
/* Well-known components DNs */
@@ -735,7 +735,7 @@ struct slapi_componentid * plugin_get_default_component_id();
#define SLAPI_COMPONENT_NAME_LDAPSDK "LDAP sdk"
/* loads the policies related to the replication of the schema */
-int slapi_schema_load_repl_policies();
+int slapi_schema_load_repl_policies(void);
void slapi_schema_get_repl_entries(char **repl_schema_top, char ** repl_schema_supplier, char **repl_schema_consumer, char **default_supplier_policy, char **default_consumer_policy);
/* return the list of attr defined in the schema matching the attr flags */
char ** slapi_schema_list_attribute_names(unsigned long flag);
@@ -744,13 +744,13 @@ char ** slapi_schema_list_objectclass_attributes(const char *ocname_or_oid,
PRUint32 flags);
char * slapi_schema_get_superior_name(const char *ocname_or_oid);
-CSN *dup_global_schema_csn();
+CSN *dup_global_schema_csn(void);
/* misc function for the chaining backend */
#define CHAIN_ROOT_UPDATE_REJECT 0
#define CHAIN_ROOT_UPDATE_LOCAL 1
#define CHAIN_ROOT_UPDATE_REFERRAL 2
-char * slapi_get_rootdn(); /* return the directory manager dn in use */
+char * slapi_get_rootdn(void); /* return the directory manager dn in use */
/* plugin interface to bulk import */
/* This function initiates bulk import. The pblock must contain
@@ -801,8 +801,8 @@ int pw_rever_decode(char *cipher, char **plain, const char * attr_name);
/* config routines */
-int slapi_config_get_readonly();
-int slapi_config_get_unhashed_pw_switch();
+int slapi_config_get_readonly(void);
+int slapi_config_get_unhashed_pw_switch(void);
/*
* charray.c
@@ -1196,15 +1196,24 @@ char* get_localhost_DNS( void );
/* GGOODREPL get_data_source definition should move into repl DLL */
struct berval **get_data_source(Slapi_PBlock *pb, const Slapi_DN *sdn, int orc, void *cf_refs);
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
/* JCMREPL - IFP and CFP should be defined centrally */
#ifndef _IFP
#define _IFP
-typedef int (*IFP)();
+typedef int (*IFP)(); /* takes undefined arguments */
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic pop
#endif
#ifndef _CFP
#define _CFP
-typedef char*(*CFP)();
+typedef char*(*CFP)(void);
#endif
void bervalarray_add_berval_fast(struct berval ***vals, const struct berval *addval, int nvals, int *maxvals);
@@ -1285,10 +1294,10 @@ int slapi_plugin_call_postop_be_plugins(Slapi_PBlock *pb, int operation);
/* is_slapd_running()
* returns 1 if slapd is running, 0 if not, -1 on error
*/
-int is_slapd_running();
+int is_slapd_running(void);
/* schema.c */
-void schema_destroy_dse_lock();
+void schema_destroy_dse_lock(void);
/* attrsyntax.c */
int slapi_add_internal_attr_syntax( const char *name, const char *oid, const char *syntax, const char *mr_equality, unsigned long extraflags );
@@ -1305,7 +1314,7 @@ void modify_update_last_modified_attr(Slapi_PBlock *pb, Slapi_Mods *smods);
void add_internal_modifiersname(Slapi_PBlock *pb, Slapi_Entry *e);
/* ldaputil.c */
-char *ldaputil_get_saslpath();
+char *ldaputil_get_saslpath(void);
int slapi_client_uses_non_nss(LDAP *ld);
int slapi_client_uses_openssl(LDAP *ld);
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
index 39028cf..1111a0e 100644
--- a/ldap/servers/slapd/snmp_collator.c
+++ b/ldap/servers/slapd/snmp_collator.c
@@ -51,15 +51,15 @@ static char *make_ds_url(char *host, int port);
static void print_snmp_interaction_table();
#endif /* DEBUG_SNMP_INTERACTION */
static int search_interaction_table(char *dsURL, int *isnew);
-static void loadConfigStats();
+static void loadConfigStats(void);
static Slapi_Entry *getConfigEntry( Slapi_Entry **e );
static void freeConfigEntry( Slapi_Entry **e );
-static void snmp_update_ops_table();
-static void snmp_update_entries_table();
-static void snmp_update_interactions_table();
-static void snmp_update_cache_stats();
-static void snmp_collator_create_semaphore();
-static void snmp_collator_sem_wait();
+static void snmp_update_ops_table(void);
+static void snmp_update_entries_table(void);
+static void snmp_update_interactions_table(void);
+static void snmp_update_cache_stats(void);
+static void snmp_collator_create_semaphore(void);
+static void snmp_collator_sem_wait(void);
/* snmp stats stuff */
struct agt_stats_t *stats=NULL;
@@ -88,7 +88,7 @@ static sem_t *stats_sem = NULL;
************************************************************************************/
static int
-snmp_collator_init()
+snmp_collator_init(void)
{
int i;
@@ -449,7 +449,7 @@ int snmp_collator_stop()
* for semaphores, so we just use POSIX semaphores directly.
*/
static void
-snmp_collator_create_semaphore()
+snmp_collator_create_semaphore(void)
{
/* First just try to create the semaphore. This should usually just work. */
if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL, SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) {
@@ -488,7 +488,7 @@ snmp_collator_create_semaphore()
* semaphore is help by the sub-agent.
*/
static void
-snmp_collator_sem_wait()
+snmp_collator_sem_wait(void)
{
int i = 0;
int got_sem = 0;
@@ -565,7 +565,7 @@ snmp_collator_update(time_t start_time, void *arg)
* should be acquired before you call this.
*/
static void
-snmp_update_ops_table()
+snmp_update_ops_table(void)
{
stats->ops_stats.dsAnonymousBinds = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds);
stats->ops_stats.dsUnAuthBinds = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds);
@@ -604,7 +604,7 @@ snmp_update_ops_table()
* be acquired before you call this.
*/
static void
-snmp_update_entries_table()
+snmp_update_entries_table(void)
{
stats->entries_stats.dsMasterEntries = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsMasterEntries);
stats->entries_stats.dsCopyEntries = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCopyEntries);
@@ -620,7 +620,7 @@ snmp_update_entries_table()
* be acquired before you call this.
*/
static void
-snmp_update_interactions_table()
+snmp_update_interactions_table(void)
{
int i;
@@ -647,7 +647,7 @@ snmp_update_interactions_table()
* the SNMP monitor entry.
*/
static void
-snmp_update_cache_stats()
+snmp_update_cache_stats(void)
{
Slapi_Backend *be, *be_next;
char *cookie = NULL;
@@ -757,7 +757,7 @@ snmp_as_entry(Slapi_Entry *e)
* file. This should be done only when the semaphore is held.
*/
static void
-loadConfigStats() {
+loadConfigStats(void) {
Slapi_Entry *entry = NULL;
char *name = NULL;
char *desc = NULL;
diff --git a/ldap/servers/slapd/snmp_collator.h b/ldap/servers/slapd/snmp_collator.h
index 2d8c9be..b5a815d 100644
--- a/ldap/servers/slapd/snmp_collator.h
+++ b/ldap/servers/slapd/snmp_collator.h
@@ -29,7 +29,7 @@
*
******************************************************************************/
- int snmp_collator_start();
- int snmp_collator_stop();
+ int snmp_collator_start(void);
+ int snmp_collator_stop(void);
void set_snmp_interaction_row(char *host, int port, int error);
void snmp_collator_update(time_t, void *);
diff --git a/ldap/servers/slapd/ssl.c b/ldap/servers/slapd/ssl.c
index b176460..ca19983 100644
--- a/ldap/servers/slapd/ssl.c
+++ b/ldap/servers/slapd/ssl.c
@@ -159,7 +159,7 @@ typedef struct {
} cipherstruct;
static cipherstruct *_conf_ciphers = NULL;
-static void _conf_init_ciphers();
+static void _conf_init_ciphers(void);
/*
* This lookup table is for supporting the old cipher name.
* Once swtiching to the NSS cipherSuiteName is done,
@@ -291,7 +291,7 @@ slapd_SSL_warn(char *fmt, ...)
}
char **
-getSupportedCiphers()
+getSupportedCiphers(void)
{
SSLCipherSuiteInfo info;
char *sep = "::";
@@ -348,7 +348,7 @@ get_allow_weak_dh_param(Slapi_Entry *e)
char **
-getEnabledCiphers()
+getEnabledCiphers(void)
{
SSLCipherSuiteInfo info;
char *sep = "::";
@@ -533,7 +533,7 @@ getSSLVersionRangeOL(int *min, int *max)
#endif /* USE_OPENLDAP */
static void
-_conf_init_ciphers()
+_conf_init_ciphers(void)
{
int x;
SECStatus rc;
@@ -641,7 +641,7 @@ charray2str(char **ary, const char *delim)
}
void
-_conf_dumpciphers()
+_conf_dumpciphers(void)
{
int x;
PRBool enabled;
@@ -1283,7 +1283,7 @@ slapd_nss_init(int init_ssl, int config_available)
}
static int
-svrcore_setup()
+svrcore_setup(void)
{
PRErrorCode errorCode;
int rv = 0;
diff --git a/ldap/servers/slapd/str2filter.c b/ldap/servers/slapd/str2filter.c
index 1a4a6ec..8117796 100644
--- a/ldap/servers/slapd/str2filter.c
+++ b/ldap/servers/slapd/str2filter.c
@@ -19,8 +19,10 @@
#include <sys/socket.h>
#include "slap.h"
-static struct slapi_filter *str2list();
-static int str2subvals();
+static struct slapi_filter *
+str2list(char *str, unsigned long ftype);
+static int
+str2subvals(char *val, struct slapi_filter *f, int unescape_filter);
struct slapi_filter *
slapi_str2filter( char *str )
diff --git a/ldap/servers/slapd/tools/ldclt/ldcltU.c b/ldap/servers/slapd/tools/ldclt/ldcltU.c
index 018989c..1054e24 100644
--- a/ldap/servers/slapd/tools/ldclt/ldcltU.c
+++ b/ldap/servers/slapd/tools/ldclt/ldcltU.c
@@ -116,7 +116,7 @@
* -W Wait between two operations. Default 0 seconds.
* -Z certfile. Turn on SSL and use certfile as the certificate DB
*/
-void usage ()
+void usage(void)
{
(void) printf ("\n");
(void) printf ("usage: ldclt [-qQvV] [-E <max errors>]\n");
diff --git a/ldap/servers/slapd/tools/pwenc.c b/ldap/servers/slapd/tools/pwenc.c
index f92136c..08328eb 100644
--- a/ldap/servers/slapd/tools/pwenc.c
+++ b/ldap/servers/slapd/tools/pwenc.c
@@ -45,8 +45,7 @@ static int slapd_config(const char *configdir, const char *configfile);
static int entry_has_attr_and_value(Slapi_Entry *e, const char *attrname, char *value);
static void
-usage( name )
-char *name;
+usage(char *name)
{
fprintf( stderr, "usage: %s -D config-dir [-H] [-s scheme | -c comparepwd ] password...\n", name );
exit( 1 );
@@ -123,9 +122,7 @@ init_config(char *configdir)
int
-main( argc, argv )
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int i, rc;
char *enc, *cmp, *name;
diff --git a/ldap/servers/slapd/tools/rsearch/infadd.c b/ldap/servers/slapd/tools/rsearch/infadd.c
index 49a0315..201b681 100644
--- a/ldap/servers/slapd/tools/rsearch/infadd.c
+++ b/ldap/servers/slapd/tools/rsearch/infadd.c
@@ -59,7 +59,7 @@ unsigned long firstUID = 0;
NameTable *given_names = NULL, *family_names = NULL;
-void usage()
+void usage(void)
{
fprintf(stdout,
"Usage: infadd -s suffix -u bindDN -w password [options]\n"
diff --git a/ldap/servers/slapd/tools/rsearch/nametable.h b/ldap/servers/slapd/tools/rsearch/nametable.h
index 1a1cae0..71103f0 100644
--- a/ldap/servers/slapd/tools/rsearch/nametable.h
+++ b/ldap/servers/slapd/tools/rsearch/nametable.h
@@ -36,6 +36,6 @@ char *nt_get(NameTable *nt, int entry);
char **nt_get_all(NameTable *nt );
char *nt_getrand(NameTable *nt);
int PR_GetLine(PRFileDesc *fd, char *s, unsigned int n);
-int get_large_random_number();
+int get_large_random_number(void);
#endif
diff --git a/ldap/servers/slapd/tools/rsearch/rsearch.c b/ldap/servers/slapd/tools/rsearch/rsearch.c
index 6166024..1a08443 100644
--- a/ldap/servers/slapd/tools/rsearch/rsearch.c
+++ b/ldap/servers/slapd/tools/rsearch/rsearch.c
@@ -39,7 +39,7 @@
#define DEFAULT_THREADS 1
#define DEFAULT_INTERVAL 10000
-void usage()
+void usage(void)
{
printf("\nUsage: rsearch -D binddn -w bindpw -s suffix -f filter [options]\n"
"-\\? -- print Usage (this message)\n"
@@ -85,7 +85,7 @@ void usage()
exit(1);
}
-void usage_B()
+void usage_B(void)
{
printf("\nFormat of the file for the '-B <file>' option:\n"
"(Assuming each passwd is identical to its corresponding UID.)\n"
@@ -103,7 +103,7 @@ void usage_B()
"\n");
}
-void usage_A()
+void usage_A(void)
{
printf("\nNote: -A and -a are mutually exclusive options\n");
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index c3c0551..0a37862 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -1464,7 +1464,7 @@ slapi_is_special_rdn(const char *rdn, int flag)
}
int
-slapi_uniqueIDRdnSize()
+slapi_uniqueIDRdnSize(void)
{
if (!util_uniqueidlen) {
util_uniqueidlen = SLAPI_ATTR_UNIQUEID_LENGTH + slapi_uniqueIDSize() + 1/*=*/;
@@ -1478,7 +1478,7 @@ slapi_uniqueIDRdnSize()
*
* \return size_t bytes available
*/
-static size_t util_getvirtualmemsize()
+static size_t util_getvirtualmemsize(void)
{
struct rlimit rl;
/* the maximum size of a process's total available memory, in bytes */
diff --git a/ldap/servers/slapd/uuid.c b/ldap/servers/slapd/uuid.c
index 7e2596c..11b9729 100644
--- a/ldap/servers/slapd/uuid.c
+++ b/ldap/servers/slapd/uuid.c
@@ -74,15 +74,15 @@ static int read_state_from_entry (const Slapi_DN *configDN);
/* writes state to persistent store: file or dit */
static int write_state(PRBool newState);
/* writes state to a file */
-static int write_state_to_file();
+static int write_state_to_file(void);
/* writes state to dit */
static int write_state_to_entry(PRBool newState);
/* add state entry to the dit */
-static int add_state_entry ();
+static int add_state_entry(void);
/* modify state entry in the dit */
-static int modify_state_entry ();
+static int modify_state_entry(void);
/* generates timestamp for the next uuid - single threaded */
-static uuid_time_t update_time();
+static uuid_time_t update_time(void);
/* generates timestamp for the next uuid - multithreaded threaded */
static int update_time_mt(uuid_time_t *timestamp, unsigned16 *clock_seq);
/* retrieves or generates nodeid */
@@ -194,7 +194,7 @@ int uuid_init (const char *configDir, const Slapi_DN *configDN, PRBool mtGen)
}
/* uuid_cleanup -- saves state, destroys generator data */
-void uuid_cleanup ()
+void uuid_cleanup(void)
{
if (_state.initialized)
{
@@ -578,7 +578,7 @@ static int write_state (PRBool newState)
/* write_state_to_file -- stores state to state file
*/
-static int write_state_to_file()
+static int write_state_to_file(void)
{
int rt;
@@ -616,7 +616,7 @@ static int write_state_to_entry(PRBool newState) {
}
/* add_state_entry -- add state entry to the dit */
-static int add_state_entry ()
+static int add_state_entry(void)
{
struct berval *vals[2];
struct berval val;
@@ -673,7 +673,7 @@ static int add_state_entry ()
}
/* modify_state_entry -- modify state entry in the dit */
-static int modify_state_entry ()
+static int modify_state_entry(void)
{
int res;
Slapi_Mods mods;
@@ -718,7 +718,7 @@ static int modify_state_entry ()
/* update_time -- updates time portion of the generators state
for singlethreaded generation
*/
-static uuid_time_t update_time()
+static uuid_time_t update_time(void)
{
uuid_time_t time_now;
diff --git a/ldap/servers/slapd/uuid.h b/ldap/servers/slapd/uuid.h
index a109d95..c269833 100644
--- a/ldap/servers/slapd/uuid.h
+++ b/ldap/servers/slapd/uuid.h
@@ -91,7 +91,7 @@ enum
int uuid_init (const char *configDir, const Slapi_DN *configDN, PRBool mtGen);
/* uuid_cleanup -- cleanup of uuid layer */
-void uuid_cleanup ();
+void uuid_cleanup(void);
/* uuid_create -- generate a UUID */
int uuid_create(guid_t *uuid);
diff --git a/ldap/servers/slapd/vattr.c b/ldap/servers/slapd/vattr.c
index e707be2..577a8e7 100644
--- a/ldap/servers/slapd/vattr.c
+++ b/ldap/servers/slapd/vattr.c
@@ -78,12 +78,12 @@ struct _vattr_context {
typedef vattr_sp_handle vattr_sp_handle_list;
/* Local prototypes */
-static int vattr_map_create();
-static void vattr_map_destroy();
+static int vattr_map_create(void);
+static void vattr_map_destroy(void);
int vattr_map_sp_insert(char *type_to_add, vattr_sp_handle *sp, void *hint);
vattr_sp_handle_list *vattr_map_sp_getlist(char *type_to_find);
vattr_sp_handle_list *vattr_map_namespace_sp_getlist(Slapi_DN *dn, const char *type_to_find);
-vattr_sp_handle_list *vattr_map_sp_get_complete_list();
+vattr_sp_handle_list *vattr_map_sp_get_complete_list(void);
vattr_sp_handle *vattr_map_sp_first(vattr_sp_handle_list *list,void **hint);
vattr_sp_handle *vattr_map_sp_next(vattr_sp_handle_list *list,void **hint);
vattr_sp_handle *vattr_list_sp_first(vattr_sp_handle_list *list);
@@ -1578,7 +1578,7 @@ int slapi_vattrspi_register_internal(vattr_sp_handle **h, vattr_get_fn_type get_
return 0;
}
-vattr_sp_handle_list *vattr_map_sp_get_complete_list()
+vattr_sp_handle_list *vattr_map_sp_get_complete_list(void)
{
return vattr_sp_list;
}
@@ -1813,7 +1813,7 @@ static PLHashNumber vattr_hash_fn(const void *type_name)
return result;
}
-static int vattr_map_create()
+static int vattr_map_create(void)
{
the_map = (vattr_map*)slapi_ch_calloc(1, sizeof(vattr_map));
if (NULL == the_map) {
@@ -1838,7 +1838,7 @@ static int vattr_map_create()
return 0;
}
-static void vattr_map_destroy()
+static void vattr_map_destroy(void)
{
if (the_map) {
if (the_map->hashtable) {
diff --git a/ldap/servers/snmp/ldap-agent.h b/ldap/servers/snmp/ldap-agent.h
index 9f921c0..e3634aa 100644
--- a/ldap/servers/snmp/ldap-agent.h
+++ b/ldap/servers/snmp/ldap-agent.h
@@ -94,7 +94,7 @@ typedef struct stats_table_context_s {
/*************************************************************
* Function Declarations
*/
- void exit_usage();
+ void exit_usage(void);
void load_config(char *);
void init_ldap_agent(void);
void initialize_stats_table(void);
diff --git a/ldap/servers/snmp/main.c b/ldap/servers/snmp/main.c
index ea5050b..94207f7 100644
--- a/ldap/servers/snmp/main.c
+++ b/ldap/servers/snmp/main.c
@@ -523,7 +523,7 @@ close_and_exit:
* Prints usage message and exits program.
*/
void
-exit_usage()
+exit_usage(void)
{
printf("Usage: ldap-agent [-D] configfile\n");
printf(" -D Enable debug logging\n");
diff --git a/lib/libsi18n/makstrdb.c b/lib/libsi18n/makstrdb.c
index b72a590..fb60bf5 100644
--- a/lib/libsi18n/makstrdb.c
+++ b/lib/libsi18n/makstrdb.c
@@ -204,7 +204,7 @@ done:
/*******************************************************************************/
-int main()
+int main(void)
{
#if 0
return XP_MakeStringDatabase();
7 years, 7 months
VERSION.sh
by Noriko Hosoi
VERSION.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 818c8a29a91f30ead329282ea5f29e2a3c7f1587
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Aug 26 18:47:00 2016 -0700
bump version to 1.1.44
diff --git a/VERSION.sh b/VERSION.sh
index cd76f32..497fa68 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -11,7 +11,7 @@ vendorurl=http://port389.org
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=1
-VERSION_MAINT=43
+VERSION_MAINT=44
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
7 years, 7 months
Changes to 'refs/tags/389-adminutil-1.1.23'
by Noriko Hosoi
Changes since the dawn of time:
Mark Reynolds (7):
Ticket 400 - BIND operation result not checked properly in adminutil
Ticket 497 - Console logins fail intermittenly
Ticket 47881 - crash during debug session in adminutil
Ticket 47850 - "nsslapd-allow-anonymous-access: rootdse" makes login as "admin"
Ticket 47929 - Adminutil - do not use SSL3 by default
Ticket 47929 - adminutil - future proof getSSLVersion
Ticket 48345 - bad check for NUL char in psetc.c
Nathan Kinder (15):
Fixed parsing of supported emulations in nsarch
Resolves: 213070
Related: 213070
Resolves: 246124
Resolves: 247192
Bug 697106 - (cov#10770) Need to call va_end() after calling va_start()
Bug 697110 - (cov#10757) Remove unused variable in psetRootModAttrList()
Bug 697116 - Need to check if admldapGetISIEDN() returns NULL
Bug 697106 - (cov#10770) Need to call va_end() after calling va_start()
Bug 697641 - Check return value of DER_UTCTimeToAscii()
Bug 697641 - Check if nodeName is NULL before dereferencing
Bug 697641 - Check if pset is NULL before dereferencing
Bug 697641 - Check if valBuf is NULL before dereferencing
Bug 697641 - Check list->name for NULL before dereferencing
Bug 697641 - Check if strchr() returns NULL before dereferencing
Noriko Hosoi (27):
[161407] Fixed the library path for the 64-bit build on Solaris.
libadminutil##.<ext> should not link SSL related ldapsdk libraries.
*** empty log message ***
[172166] Admin Util RPM
[172166] Admin Util build (64-bit)
[172166] Admin Util build (IPF)
[Bug 172166] Admin Util build (IPF)
[Bug 172166] Admin Util build (IPF)
[179394] HP-UX PA-RISC support
[179394] HP-UX IPF/PA-RISC support
upgraded LDAP C SDK: v5.16 -> v5.17
Replaced PL_Free with PR_Free.
[161099] admin passwd in clear text in adm.conf
[172166] Admin Util build (RPM)
[195258] Changes for the internal build
Removed the link arg to link with libCrun.so.1 since there is no C++ code
Resolves: #186280
Resolves: Bug 237356
Fixed a minor bug introduced in the revision 1.6.
Resolves: #191834
bump version to 1.1.16
bump version to 1.1.17
Ticket #47343 - 389-adminutil: Does not support aarch64 in f19 and rawhide
bump version to 1.1.21
Ticket #48152 - [adminutil] support NSS 3.18
bump version to 1.1.22
bump version to 1.1.23
Rich Megginson (64):
change binary directory naming convention to the same one we use with pre-built binary components; remove old crufty Fortezza stuff; general makefile cleanup
Bug(s) fixed: 171799
make PERL5 use perl from PATH on Linux
The correct naming convention for RHEL is
1) Fix moz objdir name for generic linux x86_64
Bug(s) fixed: 186280
Bug: 186280
use new ldapcsdk 6.0.0; upgrade other components
Reviewed by: nhosoi (Thanks!)
Bug(s) fixed: 213788
Bug: 213788
Resolves: bug 234420
Resolves: bug 239475
bump version to 1.1.1
bump version to 1.1.1
add support for -version-number when building shared libs; fix a couple of minor issues brought up in fedora package review
pkgconfig is a requires, not a build requires
final spec fix for fedora
Resolves: bug 235293
Resolves: bug 245208
Resolves: bug 245208
Resolves: bug 245396
bump version to 1.1.2
bump version to 1.1.3
Resolves: bug 250526
Resolves: bug 323381
bump version to 1.1.5
Resolves: bug 245248
bump version to 1.1.6
Resolves: bug 413531
Resolves: bug 454060
the correct function name is admldapSetDirectoryURL
bump version to 1.1.7
Resolves: bug 462411
compiler warning clean up
Resolves: bug 466137
fix compiler warning
bump version to 1.1.8
the 1.1.8 release
Rename adminutil to 389-adminutil
added .gitignore
use icu genrb from path if no icu_bin given or found
Bug 460168 - FedoraDS' adminutil requires non-existent "icu.pc" on non-RH/Fedora OS
remove adminutil.pc.in
bump version to 1.1.10
Bug 614690 - adminutil ICU RB generation can fail
Port adminutil to use openldap
allow building with mozldap again
bump version to 1.1.12
version 1.1.13 - add nss_inc to includes for libadminutil sources
bump version to 1.1.14
Ticket #161 - Review and address latest Coverity issues
Ticket #161 - Review and address latest Coverity issues
Ticket #281 - TLS not working with latest openldap
bump version to 1.1.15
fix mem leak in admldapBuildInfoSSL when there is no password
Ticket #47486 - compiler warnings in adminutil, admin, dsgw
add Eclipse generated files
bump version to 1.1.18
Ticket #47415 "Manage certificates" crashes admin server
fix compiler warnings - enhancements to test ticket 47415
bump version to 1.1.19
Ticket #47680 Upgraded 389-admin rpms and now I can't start dirsrv-admin
bump version to 1.1.20
foxworth (1):
Internal Red Hat CVS project for adminutil: core
7 years, 7 months
configure configure.ac
by Noriko Hosoi
configure | 20 ++++++++++----------
configure.ac | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 5e6518cbc2ec7e29c4472146fd63c2f88819a2f6
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Sep 2 13:21:18 2016 -0700
bump version to 1.1.23
diff --git a/configure b/configure
index a458a18..2ce20f2 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for 389-adminutil 1.1.22.
+# Generated by GNU Autoconf 2.69 for 389-adminutil 1.1.23.
#
# Report bugs to <http://bugzilla.redhat.com/>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='389-adminutil'
PACKAGE_TARNAME='389-adminutil'
-PACKAGE_VERSION='1.1.22'
-PACKAGE_STRING='389-adminutil 1.1.22'
+PACKAGE_VERSION='1.1.23'
+PACKAGE_STRING='389-adminutil 1.1.23'
PACKAGE_BUGREPORT='http://bugzilla.redhat.com/'
PACKAGE_URL=''
@@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then
# 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 389-adminutil 1.1.22 to adapt to many kinds of systems.
+\`configure' configures 389-adminutil 1.1.23 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1453,7 +1453,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of 389-adminutil 1.1.22:";;
+ short | recursive ) echo "Configuration of 389-adminutil 1.1.23:";;
esac
cat <<\_ACEOF
@@ -1590,7 +1590,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-389-adminutil configure 1.1.22
+389-adminutil configure 1.1.23
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2180,7 +2180,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by 389-adminutil $as_me 1.1.22, which was
+It was created by 389-adminutil $as_me 1.1.23, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3046,7 +3046,7 @@ fi
# Define the identity of the package.
PACKAGE='389-adminutil'
- VERSION='1.1.22'
+ VERSION='1.1.23'
cat >>confdefs.h <<_ACEOF
@@ -19204,7 +19204,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by 389-adminutil $as_me 1.1.22, which was
+This file was extended by 389-adminutil $as_me 1.1.23, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19261,7 +19261,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-389-adminutil config.status 1.1.22
+389-adminutil config.status 1.1.23
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 139fa76..a38e3fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([389-adminutil], [1.1.22], [http://bugzilla.redhat.com/])
+AC_INIT([389-adminutil], [1.1.23], [http://bugzilla.redhat.com/])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
7 years, 7 months
dirsrvtests/tests
by Simon Pichugin
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py | 340 ++++++++++
dirsrvtests/tests/tickets/ticket142_test.py | 307 ---------
2 files changed, 340 insertions(+), 307 deletions(-)
New commits:
commit 73d74f557e5dcc9939e8f4f0b4d928a06721a7a3
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Wed Aug 31 17:02:40 2016 +0200
Ticket 142 - Refactor and move CI test
Description: Move ticket142_test.py to pwdPolicy_inherit_global_test.py
to the password test suite. Refactor it and add one more test case.
Add test plan to an each test case.
https://fedorahosted.org/389/ticket/142
Reviewed by: mreynolds (Thanks!)
diff --git a/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py b/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py
new file mode 100644
index 0000000..27d96c8
--- /dev/null
+++ b/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py
@@ -0,0 +1,340 @@
+# --- BEGIN COPYRIGHT BLOCK ---
+# Copyright (C) 2016 Red Hat, Inc.
+# All rights reserved.
+#
+# License: GPL (version 3 or any later version).
+# See LICENSE for details.
+# --- END COPYRIGHT BLOCK ---
+#
+import os
+import sys
+import time
+import ldap
+import logging
+import pytest
+import shutil
+import subprocess
+from lib389 import DirSrv, Entry, tools
+from lib389 import DirSrvTools
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+
+log = logging.getLogger(__name__)
+
+installation_prefix = None
+
+CONFIG_DN = 'cn=config'
+OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
+PWP_CONTAINER = 'nsPwPolicyContainer'
+PWP_CONTAINER_DN = 'cn=' + PWP_CONTAINER + ',' + OU_PEOPLE
+PWP_ENTRY_DN = 'cn=nsPwPolicyEntry,' + OU_PEOPLE
+PWP_CONTAINER_PEOPLE = 'cn="%s",%s' % (PWP_ENTRY_DN, PWP_CONTAINER_DN)
+PWP_TEMPLATE_ENTRY_DN = 'cn=nsPwTemplateEntry,' + OU_PEOPLE
+ATTR_INHERIT_GLOBAL = 'nsslapd-pwpolicy-inherit-global'
+ATTR_CHECK_SYNTAX = 'passwordCheckSyntax'
+
+BN = 'uid=buser,' + DEFAULT_SUFFIX
+TEMP_USER = 'cn=test{}'
+TEMP_USER_DN = '%s,%s' % (TEMP_USER, OU_PEOPLE)
+
+
+
+class TopologyStandalone(object):
+ def __init__(self, standalone):
+ standalone.open()
+ self.standalone = standalone
+
+
+(a)pytest.fixture(scope="module")
+def topology(request):
+ """This fixture is used to standalone topology for the 'module'."""
+
+ global installation_prefix
+
+ if installation_prefix:
+ args_instance[SER_DEPLOYED_DIR] = installation_prefix
+
+ standalone = DirSrv(verbose=False)
+
+ # Args for the standalone instance
+ args_instance[SER_HOST] = HOST_STANDALONE
+ args_instance[SER_PORT] = PORT_STANDALONE
+ args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
+ args_standalone = args_instance.copy()
+ standalone.allocate(args_standalone)
+
+ # Get the status of the instance and restart it if it exists
+ instance_standalone = standalone.exists()
+
+ # Remove the instance
+ if instance_standalone:
+ standalone.delete()
+
+ # Create the instance
+ standalone.create()
+
+ # Used to retrieve configuration information (dbdir, confdir...)
+ standalone.open()
+
+ def fin():
+ standalone.delete()
+ request.addfinalizer(fin)
+
+ # Here we have standalone instance up and running
+ return TopologyStandalone(standalone)
+
+
+(a)pytest.fixture(scope="module")
+def test_user(topology, request):
+ """User for binding operation"""
+
+ log.info('Adding user {}'.format(BN))
+ try:
+ topology.standalone.add_s(Entry((BN,
+ {'objectclass': ['top',
+ 'person',
+ 'organizationalPerson',
+ 'inetOrgPerson'],
+ 'cn': 'bind user',
+ 'sn': 'bind user',
+ 'userPassword': PASSWORD})))
+ log.info('Adding an aci for the bind user')
+ BN_ACI = '(targetattr="*")(version 3.0; acl "pwp test"; allow (all) userdn="ldap:///%s";)' % BN
+ topology.standalone.modify_s(OU_PEOPLE, [(ldap.MOD_ADD, 'aci', BN_ACI)])
+
+ except ldap.LDAPError as e:
+ log.error('Failed to add user (%s): error (%s)' % (BN,
+ e.message['desc']))
+ raise e
+
+ def fin():
+ log.info('Deleting user {}'.format(BN))
+ topology.standalone.delete_s(BN)
+ topology.standalone.modify_s(OU_PEOPLE, [(ldap.MOD_DELETE, 'aci', BN_ACI)])
+ request.addfinalizer(fin)
+
+
+(a)pytest.fixture(scope="module")
+def password_policy(topology, test_user):
+ """Set global password policy.
+ Then, set fine-grained subtree level password policy
+ to ou=People with no password syntax.
+
+ Note: do not touch nsslapd-pwpolicy-inherit-global -- off by default
+ """
+
+ log.info('Enable fine-grained policy')
+ try:
+ topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE,
+ 'nsslapd-pwpolicy-local',
+ 'on')])
+ except ldap.LDAPError as e:
+ log.error('Failed to set fine-grained policy: error {}'.format(
+ e.message['desc']))
+ raise e
+
+ log.info('Create password policy for subtree {}'.format(OU_PEOPLE))
+ try:
+ subprocess.call(['ns-newpwpolicy.pl', '-D', DN_DM, '-w', PASSWORD,
+ '-p', str(PORT_STANDALONE), '-h', HOST_STANDALONE,
+ '-S', OU_PEOPLE, '-Z', SERVERID_STANDALONE])
+ except subprocess.CalledProcessError as e:
+ log.error('Failed to create pw policy policy for {}: error {}'.format(
+ OU_PEOPLE, e.message['desc']))
+ raise e
+
+ log.info('Add pwdpolicysubentry attribute to {}'.format(OU_PEOPLE))
+ try:
+ topology.standalone.modify_s(OU_PEOPLE, [(ldap.MOD_REPLACE,
+ 'pwdpolicysubentry',
+ PWP_CONTAINER_PEOPLE)])
+ except ldap.LDAPError as e:
+ log.error('Failed to pwdpolicysubentry pw policy '\
+ 'policy for {}: error {}'.format(OU_PEOPLE,
+ e.message['desc']))
+ raise e
+
+ log.info("Set the default settings for the policy container.")
+ topology.standalone.modify_s(PWP_CONTAINER_PEOPLE,
+ [(ldap.MOD_REPLACE, 'passwordMustChange', 'off'),
+ (ldap.MOD_REPLACE, 'passwordExp', 'off'),
+ (ldap.MOD_REPLACE, 'passwordMinAge', '0'),
+ (ldap.MOD_REPLACE, 'passwordChange', 'off'),
+ (ldap.MOD_REPLACE, 'passwordStorageScheme', 'ssha')])
+
+ check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'off')
+ check_attr_val(topology, CONFIG_DN, ATTR_CHECK_SYNTAX, 'off')
+
+
+def check_attr_val(topology, dn, attr, expected):
+ """Check that entry has the value"""
+
+ try:
+ centry = topology.standalone.search_s(dn, ldap.SCOPE_BASE, 'cn=*')
+ assert centry[0], 'Failed to get %s' % dn
+
+ val = centry[0].getValue(attr)
+ assert val == expected, 'Default value of %s is not %s, but %s' % (
+ attr, expected, val)
+
+ log.info('Default value of %s is %s' % (attr, expected))
+ except ldap.LDAPError as e:
+ log.fatal('Failed to search ' + dn + ': ' + e.message['desc'])
+ raise e
+
+
+(a)pytest.mark.parametrize('inherit_value,checksyntax_value',
+ [('off', 'off'), ('on', 'off'), ('off', 'on')])
+def test_entry_has_no_restrictions(topology, password_policy, test_user,
+ inherit_value, checksyntax_value):
+ """Make sure an entry added to ou=people
+ has no password syntax restrictions when:
+ - 'passwordCheckSyntax' is 'off' for 'nsslapd-pwpolicy-inherit-global'
+ equaled 'off' and 'on'
+ - 'passwordCheckSyntax' is 'on' for 'nsslapd-pwpolicy-inherit-global'
+ equaled 'off'
+
+ :Feature: Password policy
+
+ :Setup: Standalone instance, test user,
+ password policy entries for a subtree
+
+ :Steps: 1. Bind as test user
+ 2. Set 'nsslapd-pwpolicy-inherit-global' and
+ 'passwordCheckSyntax' accordingly:
+ a) 'off' and 'off'
+ b) 'on' and 'off'
+ c) 'off' and 'on'
+ 3. Try to add user with a short password
+
+ :Assert: No exception should occure
+ """
+
+ log.info('Set {} to {}'.format(ATTR_INHERIT_GLOBAL, inherit_value))
+ log.info('Set {} to {}'.format(ATTR_CHECK_SYNTAX, checksyntax_value))
+ topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE,
+ ATTR_INHERIT_GLOBAL, inherit_value)])
+ topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE,
+ ATTR_CHECK_SYNTAX, checksyntax_value)])
+
+ # Wait a second for cn=config to apply
+ time.sleep(1)
+ check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, inherit_value)
+ check_attr_val(topology, CONFIG_DN, ATTR_CHECK_SYNTAX, checksyntax_value)
+
+ log.info('Bind as test user')
+ topology.standalone.simple_bind_s(BN, PASSWORD)
+
+ log.info('Make sure an entry added to ou=people has '
+ 'no password syntax restrictions.')
+ try:
+ topology.standalone.add_s(Entry((TEMP_USER_DN.format('0'),
+ {'objectclass': ['top',
+ 'person',
+ 'organizationalPerson',
+ 'inetOrgPerson'],
+ 'cn': TEMP_USER.format('0'),
+ 'sn': TEMP_USER.format('0'),
+ 'userPassword': 'short'})))
+ except ldap.LDAPError as e:
+ log.fatal('Failed to add cn=test0 with userPassword: short: ' +
+ e.message['desc'])
+ raise e
+ finally:
+ log.info('Bind as DM user')
+ topology.standalone.simple_bind_s(DN_DM, PASSWORD)
+ log.info('Remove {}'.format(TEMP_USER_DN.format('0')))
+ try:
+ topology.standalone.delete_s(TEMP_USER_DN.format('0'))
+ except ldap.NO_SUCH_OBJECT as e:
+ log.fatal('There is no {}, it is a problem'.format(TEMP_USER_DN.format('0')))
+ raise e
+
+
+(a)pytest.mark.parametrize('container', [DN_CONFIG, PWP_CONTAINER_PEOPLE])
+def test_entry_has_restrictions(topology, password_policy, test_user, container):
+ """Set 'nsslapd-pwpolicy-inherit-global: on'
+ and 'passwordCheckSyntax: on'. Make sure that
+ syntax rules work, if set them at both: cn=config and
+ ou=people policy container.
+
+ :Feature: Password policy
+
+ :Setup: Standalone instance, test user,
+ password policy entries for a subtree
+
+ :Steps: 1. Bind as test user
+ 2. Switch 'nsslapd-pwpolicy-inherit-global: on'
+ 3. Switch 'passwordCheckSyntax: on'
+ 4. Set 'passwordMinLength: 9' to:
+ a) cn=config
+ b) ou=people policy container
+ 5. Try to add user with a short password (<9)
+ 6. Try to add user with a long password (>9)
+
+ :Assert: User should be rejected
+ """
+
+ log.info('Set {} to {}'.format(ATTR_INHERIT_GLOBAL, 'on'))
+ log.info('Set {} to {}'.format(ATTR_CHECK_SYNTAX, 'on'))
+ topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE,
+ ATTR_INHERIT_GLOBAL, 'on')])
+ topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE,
+ ATTR_CHECK_SYNTAX, 'on')])
+ topology.standalone.modify_s(container, [(ldap.MOD_REPLACE,
+ 'passwordMinLength' , '9')])
+
+ # Wait a second for cn=config to apply
+ time.sleep(1)
+ check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'on')
+ check_attr_val(topology, CONFIG_DN, ATTR_CHECK_SYNTAX, 'on')
+
+ log.info('Bind as test user')
+ topology.standalone.simple_bind_s(BN, PASSWORD)
+
+ log.info('Try to add user with a short password (<9)')
+ with pytest.raises(ldap.CONSTRAINT_VIOLATION):
+ topology.standalone.add_s(Entry((TEMP_USER_DN.format('0'),
+ {'objectclass': ['top',
+ 'person',
+ 'organizationalPerson',
+ 'inetOrgPerson'],
+ 'cn': TEMP_USER.format('0'),
+ 'sn': TEMP_USER.format('0'),
+ 'userPassword': 'short'})))
+
+ log.info('Try to add user with a long password (>9)')
+ try:
+ topology.standalone.add_s(Entry((TEMP_USER_DN.format('1'),
+ {'objectclass': ['top',
+ 'person',
+ 'organizationalPerson',
+ 'inetOrgPerson'],
+ 'cn': TEMP_USER.format('1'),
+ 'sn': TEMP_USER.format('1'),
+ 'userPassword': 'Reallylong1'})))
+ except ldap.LDAPError as e:
+ log.fatal('Failed to add cn=test1 with userPassword: short: '
+ + e.message['desc'])
+ raise e
+ finally:
+ log.info('Bind as DM user')
+ topology.standalone.simple_bind_s(DN_DM, PASSWORD)
+ log.info('Remove {}'.format(TEMP_USER_DN.format('0')))
+ try:
+ topology.standalone.delete_s(TEMP_USER_DN.format('0'))
+ except ldap.NO_SUCH_OBJECT as e:
+ log.info('There is no {}, it is okay'.format(TEMP_USER_DN.format('0')))
+ try:
+ topology.standalone.delete_s(TEMP_USER_DN.format('1'))
+ except ldap.NO_SUCH_OBJECT as e:
+ log.fatal('There is no {}, it is a problem'.format(TEMP_USER_DN.format('1')))
+ raise e
+
+
+if __name__ == '__main__':
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket142_test.py b/dirsrvtests/tests/tickets/ticket142_test.py
deleted file mode 100644
index 3c9cfce..0000000
--- a/dirsrvtests/tests/tickets/ticket142_test.py
+++ /dev/null
@@ -1,307 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2015 Red Hat, Inc.
-# All rights reserved.
-#
-# License: GPL (version 3 or any later version).
-# See LICENSE for details.
-# --- END COPYRIGHT BLOCK ---
-#
-import os
-import sys
-import time
-import ldap
-import logging
-import pytest
-import shutil
-from lib389 import DirSrv, Entry, tools
-from lib389 import DirSrvTools
-from lib389.tools import DirSrvTools
-from lib389._constants import *
-from lib389.properties import *
-
-log = logging.getLogger(__name__)
-
-installation_prefix = None
-
-CONFIG_DN = 'cn=config'
-OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
-PWP_CONTAINER = 'nsPwPolicyContainer'
-PWP_CONTAINER_DN = 'cn=' + PWP_CONTAINER + ',' + OU_PEOPLE
-PWP_ENTRY_DN = 'cn=nsPwPolicyEntry,' + OU_PEOPLE
-PWP_TEMPLATE_ENTRY_DN = 'cn=nsPwTemplateEntry,' + OU_PEOPLE
-ATTR_INHERIT_GLOBAL = 'nsslapd-pwpolicy-inherit-global'
-
-BN = 'uid=buser,' + DEFAULT_SUFFIX
-
-
-class TopologyStandalone(object):
- def __init__(self, standalone):
- standalone.open()
- self.standalone = standalone
-
-
-(a)pytest.fixture(scope="module")
-def topology(request):
- '''
- This fixture is used to standalone topology for the 'module'.
- '''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
- standalone = DirSrv(verbose=False)
-
- # Args for the standalone instance
- args_instance[SER_HOST] = HOST_STANDALONE
- args_instance[SER_PORT] = PORT_STANDALONE
- args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
- args_standalone = args_instance.copy()
- standalone.allocate(args_standalone)
-
- # Get the status of the instance and restart it if it exists
- instance_standalone = standalone.exists()
-
- # Remove the instance
- if instance_standalone:
- standalone.delete()
-
- # Create the instance
- standalone.create()
-
- # Used to retrieve configuration information (dbdir, confdir...)
- standalone.open()
-
- def fin():
- standalone.delete()
- request.addfinalizer(fin)
-
- # Here we have standalone instance up and running
- return TopologyStandalone(standalone)
-
-
-def _header(topology, label):
- topology.standalone.log.info("###############################################")
- topology.standalone.log.info("####### %s" % label)
- topology.standalone.log.info("###############################################")
-
-
-def check_attr_val(topology, dn, attr, expected):
- try:
- centry = topology.standalone.search_s(dn, ldap.SCOPE_BASE, 'cn=*')
- if centry:
- val = centry[0].getValue(attr)
- if val == expected:
- log.info('Default value of %s is %s' % (attr, expected))
- else:
- log.info('Default value of %s is not %s, but %s' % (attr, expected, val))
- assert False
- else:
- log.fatal('Failed to get %s' % dn)
- assert False
- except ldap.LDAPError as e:
- log.fatal('Failed to search ' + dn + ': ' + e.message['desc'])
- assert False
-
-
-def test_142_init(topology):
- """
- Set global password policy.
- Then, set fine-grained subtree level password policy to ou=People with no password syntax.
- Note: do not touch nsslapd-pwpolicy-inherit-global -- off by default
- Also, adding an ordinary bind user.
- """
- _header(topology, 'Testing Ticket 142 - Default password syntax settings do not work with fine-grained policies')
-
- log.info("Setting global password policy with password syntax.")
- topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-pwpolicy-local', 'on')])
-
- log.info("Setting fine-grained password policy.")
- topology.standalone.add_s(Entry((PWP_CONTAINER_DN, {
- 'objectclass': "top nsContainer".split()})))
- topology.standalone.add_s(Entry(('cn="%s",%s' % (PWP_ENTRY_DN, PWP_CONTAINER_DN), {
- 'objectclass': "top ldapsubentry passwordpolicy".split()})))
- topology.standalone.add_s(Entry(('cn="%s",%s' % (PWP_TEMPLATE_ENTRY_DN, PWP_CONTAINER_DN), {
- 'objectclass': "top ldapsubentry costemplate".split(),
- 'pwdpolicysubentry': 'cn="%s",%s' % (PWP_ENTRY_DN, PWP_CONTAINER_DN)})))
- topology.standalone.add_s(Entry(('cn=nsPwPolicy_CoS,%s' % OU_PEOPLE, {
- 'objectclass': "top ldapsubentry cosSuperDefinition cosPointerDefinition".split(),
- 'cosTemplateDn': 'cn="%s",%s' % (PWP_TEMPLATE_ENTRY_DN, PWP_CONTAINER_DN),
- 'cosAttribute': 'pwdpolicysubentry default operational-default'})))
-
- log.info(" with the default settings.")
- topology.standalone.modify_s('cn="%s",%s' % (PWP_ENTRY_DN, PWP_CONTAINER_DN),
- [(ldap.MOD_REPLACE, 'passwordMustChange', 'off'),
- (ldap.MOD_REPLACE, 'passwordExp', 'off'),
- (ldap.MOD_REPLACE, 'passwordMinAge', '0'),
- (ldap.MOD_REPLACE, 'passwordChange', 'off'),
- (ldap.MOD_REPLACE, 'passwordStorageScheme', 'ssha')])
-
- check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'off')
- check_attr_val(topology, CONFIG_DN, 'passwordCheckSyntax', 'off')
-
- log.info('Adding a bind user.')
- topology.standalone.add_s(Entry((BN,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'bind user',
- 'sn': 'bind user',
- 'userPassword': PASSWORD})))
-
- log.info('Adding an aci for the bind user.')
- topology.standalone.modify_s(OU_PEOPLE,
- [(ldap.MOD_ADD,
- 'aci',
- '(targetattr="*")(version 3.0; acl "pwp test"; allow (all) userdn="ldap:///%s";)' % BN)])
-
-
-def test_142_run_0(topology):
- """
- Make sure an entry added to ou=people has no password syntax restrictions.
- """
- _header(topology, 'Case 0 - Make sure an entry added to ou=people has no password syntax restrictions.')
-
- topology.standalone.simple_bind_s(BN, PASSWORD)
- try:
- topology.standalone.add_s(Entry(('cn=test0,%s' % OU_PEOPLE,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'test0',
- 'sn': 'test0',
- 'userPassword': 'short'})))
- except ldap.LDAPError as e:
- log.fatal('Failed to add cn=test0 with userPassword: short: ' + e.message['desc'])
- assert False
-
- log.info('PASSED')
-
-
-def test_142_run_1(topology):
- """
- Set 'nsslapd-pwpolicy-inherit-global: on'
- But passwordCheckSyntax is still off.
- Make sure an entry added to ou=people has the global password syntax restrictions.
- """
- _header(topology, 'Case 1 - Make sure an entry added to ou=people has no password syntax restrictions.')
-
- topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, ATTR_INHERIT_GLOBAL, 'on')])
- check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'on')
- check_attr_val(topology, CONFIG_DN, 'passwordCheckSyntax', 'off')
- topology.standalone.simple_bind_s(BN, PASSWORD)
- try:
- topology.standalone.add_s(Entry(('cn=test1,%s' % OU_PEOPLE,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'test1',
- 'sn': 'test1',
- 'userPassword': 'short'})))
- except ldap.LDAPError as e:
- log.fatal('Failed to add cn=test1 with userPassword: short: ' + e.message['desc'])
- assert False
-
- log.info('PASSED')
-
-
-def test_142_run_2(topology):
- """
- Set 'passwordCheckSyntax: on'
- Set 'passwordMinLength: 9' for testing
- Make sure an entry added to ou=people has the global password syntax restrictions.
- """
- _header(topology, 'Case 2 - Make sure an entry added to ou=people has the global password syntax restrictions.')
-
- topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(CONFIG_DN,
- [(ldap.MOD_REPLACE, 'passwordCheckSyntax', 'on'),
- (ldap.MOD_REPLACE, 'passwordMinLength', '9')])
- check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'on')
- check_attr_val(topology, CONFIG_DN, 'passwordCheckSyntax', 'on')
- topology.standalone.simple_bind_s(BN, PASSWORD)
- failed_as_expected = False
- try:
- topology.standalone.add_s(Entry(('cn=test2,%s' % OU_PEOPLE,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'test2',
- 'sn': 'test2',
- 'userPassword': 'Abcd2345'})))
- except ldap.LDAPError as e:
- log.info('Adding cn=test2 with "userPassword: Abcd2345" was expectedly rejected: ' + e.message['desc'])
- failed_as_expected = True
-
- if not failed_as_expected:
- log.fatal('Adding cn=test2 with "userPassword: Abcd2345" was unexpectedly successful despite of short password.')
- assert False
-
- try:
- topology.standalone.add_s(Entry(('cn=test2,%s' % OU_PEOPLE,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'test2',
- 'sn': 'test2',
- 'userPassword': 'Abcd23456'})))
- except ldap.LDAPError as e:
- log.fatal('Adding cn=test2 with "userPassword: Abcd23456" failed: ' + e.message['desc'])
- assert False
-
- log.info('PASSED')
-
-
-def test_142_run_3(topology):
- """
- Set 'passwordCheckSyntax: on'
- Set 'nsslapd-pwpolicy-inherit-global: off'
- Make sure an entry added to ou=people has no syntax restrictions.
- """
- _header(topology, 'Case 3 - Make sure an entry added to ou=people has no password syntax restrictions.')
-
- topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(CONFIG_DN,
- [(ldap.MOD_REPLACE, ATTR_INHERIT_GLOBAL, 'off')])
- check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'off')
- check_attr_val(topology, CONFIG_DN, 'passwordCheckSyntax', 'on')
- topology.standalone.simple_bind_s(BN, PASSWORD)
- try:
- topology.standalone.add_s(Entry(('cn=test3,%s' % OU_PEOPLE,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'test3',
- 'sn': 'test3',
- 'userPassword': 'Abcd3456'})))
- except ldap.LDAPError as e:
- log.fatal('Adding cn=test3 with "userPassword: Abcd3456" failed: ' + e.message['desc'])
- assert False
-
- log.info('PASSED')
-
-
-def test_142_run_4(topology):
- """
- Set 'passwordCheckSyntax: on'
- Set 'nsslapd-pwpolicy-inherit-global: on'
- Set password syntax to fine-grained password policy to check it overrides the global settings.
- """
- _header(topology, 'Case 4 - Make sure an entry added to ou=people follows the fine-grained password syntax restrictions.')
-
- topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(CONFIG_DN,
- [(ldap.MOD_REPLACE, ATTR_INHERIT_GLOBAL, 'on')])
- check_attr_val(topology, CONFIG_DN, ATTR_INHERIT_GLOBAL, 'on')
- check_attr_val(topology, CONFIG_DN, 'passwordCheckSyntax', 'on')
- topology.standalone.modify_s('cn="%s",%s' % (PWP_ENTRY_DN, PWP_CONTAINER_DN),
- [(ldap.MOD_REPLACE, 'passwordMinLength', '5'),
- (ldap.MOD_REPLACE, 'passwordMinCategories', '2')])
- try:
- topology.standalone.add_s(Entry(('cn=test4,%s' % OU_PEOPLE,
- {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
- 'cn': 'test4',
- 'sn': 'test4',
- 'userPassword': 'Abcd4'})))
- except ldap.LDAPError as e:
- log.fatal('Adding cn=test4 with "userPassword: Abcd4" failed: ' + e.message['desc'])
- assert False
-
- log.info('PASSED')
-
-
-if __name__ == '__main__':
- # Run isolated
- # -s for DEBUG mode
- CURRENT_FILE = os.path.realpath(__file__)
- pytest.main("-s %s" % CURRENT_FILE)
7 years, 7 months
ldap/servers
by Mark Reynolds
ldap/servers/plugins/replication/repl5_replica_config.c | 46 +++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
New commits:
commit a2d97e09d7a02d4b9d4d97d0916c2de9909ed6e5
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Sep 2 11:46:30 2016 -0400
Ticket 48278 - cleanAllRUV should remove keep-alive entry
Description: The cleanAllRUV task will now delete the keep alive entry
at the end of the task.
https://fedorahosted.org/389/ticket/48278
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 7da8970..a201d42 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -82,6 +82,7 @@ static void preset_cleaned_rid(ReplicaId rid);
static multimaster_mtnode_extension * _replica_config_get_mtnode_ext (const Slapi_Entry *e);
static void replica_cleanall_ruv_destructor(Slapi_Task *task);
static void replica_cleanall_ruv_abort_destructor(Slapi_Task *task);
+static void remove_keep_alive_entry(Slapi_Task *task, ReplicaId rid, const char *repl_root);
/*
* Note: internal add/modify/delete operations should not be run while
@@ -1980,9 +1981,17 @@ done:
* If the replicas are cleaned, release the rid
*/
if(!aborted && !slapi_is_shutting_down()){
+ /*
+ * Success - the rid has been cleaned!
+ *
+ * Delete the cleaned rid config.
+ * Make sure all the replicas have been "pre_cleaned"
+ * Remove the keep alive entry if present
+ * Remove the rid from the internal clean list
+ */
delete_cleaned_rid_config(data);
- /* make sure all the replicas have been "pre_cleaned" before finishing */
check_replicas_are_done_cleaning(data);
+ remove_keep_alive_entry(data->task, data->rid, data->repl_root);
cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Successfully cleaned rid(%d).", data->rid);
remove_cleaned_rid(data->rid);
} else {
@@ -2017,6 +2026,41 @@ done:
slapi_ch_free((void **)&data);
}
+/*
+ * Remove the "Keep-Alive" replication entry.
+ */
+static void
+remove_keep_alive_entry(Slapi_Task *task, ReplicaId rid, const char *repl_root)
+{
+ Slapi_PBlock *delete_pb = NULL;
+ char *keep_alive_dn = NULL;
+ int rc = 0;
+
+ /* Construct the repl keep alive dn from the rid and replication suffix */
+ keep_alive_dn = PR_smprintf("cn=repl keep alive %d,%s", (int)rid, repl_root);
+
+ delete_pb = slapi_pblock_new();
+ slapi_delete_internal_set_pb(delete_pb, keep_alive_dn ,NULL, NULL,
+ repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0);
+ slapi_delete_internal_pb(delete_pb);
+ slapi_pblock_get(delete_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
+ if (rc == LDAP_NO_SUCH_OBJECT) {
+ /* No problem, it's not always there */
+ cleanruv_log(task, rid, CLEANALLRUV_ID, "No Keep-Alive entry to remove (%s)",
+ keep_alive_dn);
+ } else if (rc != LDAP_SUCCESS){
+ /* Failed to delete the entry */
+ cleanruv_log(task, rid, CLEANALLRUV_ID, "Failed to delete Keep-Alive entry (%s) "
+ "Error (%d) This entry will need to be manually removed",
+ keep_alive_dn, rc);
+ } else {
+ /* Success */
+ cleanruv_log(task, rid, CLEANALLRUV_ID, "Removed Keep-Alive entry (%s)", keep_alive_dn);
+ }
+ slapi_pblock_destroy(delete_pb);
+ slapi_ch_free_string(&keep_alive_dn);
+}
+
static void
replica_cleanall_ruv_destructor(Slapi_Task *task)
{
7 years, 7 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/dn2entry.c | 17 ++-
ldap/servers/slapd/back-ldbm/findentry.c | 139 +++++++++++++++++++------
ldap/servers/slapd/back-ldbm/ldbm_add.c | 21 ++-
ldap/servers/slapd/back-ldbm/ldbm_bind.c | 11 +
ldap/servers/slapd/back-ldbm/ldbm_compare.c | 2
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 9 +
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 5
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 17 +--
ldap/servers/slapd/back-ldbm/ldbm_search.c | 2
ldap/servers/slapd/back-ldbm/misc.c | 2
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 14 +-
ldap/servers/slapd/back-ldbm/vlv_srch.c | 2
ldap/servers/slapd/bind.c | 120 ++++++++++-----------
ldap/servers/slapd/defbackend.c | 82 ++++++++++++++
ldap/servers/slapd/result.c | 16 ++
ldap/servers/slapd/saslbind.c | 4
16 files changed, 324 insertions(+), 139 deletions(-)
New commits:
commit 8078a9e5d067e85dbf1817f5620ecd50cde3f5c2
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Sep 1 16:02:53 2016 -0700
Subject: [PATCH] Bug 1358559 - CVE-2016-4992 389-ds-base: Information disclosure via repeated use of LDAP ADD operation, etc.
0. Backported the Bug-1347760 patches from the master branch to 1.2.11.
1. Description: If a bind user has no rights, it should not disclose
any information including the existence of the entry.
Fix description:
1) ALREADY_EXISTS in add -- If to be added entry is found existing
in ldbm_back_add, it checks the ACI and if there is no rights,
it returns INSUFFICIENT_ACCESS instead of ALREADY_EXISTS.
2) NO_SUCH_OBJECT in other update operations -- If the target entry
is found not existing, it checks the ancestor entry's access
rights in find_entry. If it is not allowed to access the subtree,
it returns INSUFFICIENT_ACCESS instead of NO_SUC_OBJECT. Plus,
it supresses the "Matched" ancestor message.
3) NO_SUCH_OBJECT in search -- If a bind entry has no rights to read
a subtree, it returns no search results with SUCCESS. It should
be applied to the no existing subtree if the bind entry has no
rights to the super tree.
4) If bind fails because of the non-existence of the bind user or
the parent nodes, the bind returns LDAP_INVALID_CREDENTIALS to
the client with no other information.
The detailed cause is logged in the access log as follows:
RESULT err=49 .. etime=0 - No such suffix (<given suffix>)
RESULT err=49 .. etime=0 - Invalid credentials
RESULT err=49 .. etime=0 - No such entry
Reviewed by lkrispen(a)redhat.com, mreynolds(a)redhat.com, and tbordaz(a)redhat.com.
2. Description:
1. When an account is inactivated, the error UNWILLING_TO_PERFORM with
the inactivated message should be returned only when the bind is
successful.
2. When SASL bind fails, instead of returning the cause of the failure
directly to the client, but logging it in the access log.
Reviewed by wibrown(a)redhat.com (Thank you, William!)
3. Description: do not overwrite rc used to decide if bind was successful.
When the bind is through ldapi/autobind, an entry does not exist to be
checked with slapi_check_account_lock. In that case, a variable rc is
not supposed to be modified which confuses the following code path.
Reviewed by nhosoi(a)redhat.com.
https://bugzilla.redhat.com/show_bug.cgi?id=1358559
diff --git a/ldap/servers/slapd/back-ldbm/dn2entry.c b/ldap/servers/slapd/back-ldbm/dn2entry.c
index 3cf37b6..c7c3ec2 100644
--- a/ldap/servers/slapd/back-ldbm/dn2entry.c
+++ b/ldap/servers/slapd/back-ldbm/dn2entry.c
@@ -180,14 +180,15 @@ struct backentry *
dn2ancestor(
Slapi_Backend *be,
const Slapi_DN *sdn,
- Slapi_DN *ancestordn,
+ Slapi_DN *ancestordn,
back_txn *txn,
- int *err
+ int *err,
+ int allow_suffix
)
{
- struct backentry *e = NULL;
+ struct backentry *e = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dn2ancestor \"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug( LDAP_DEBUG_TRACE, "=> dn2ancestor \"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
/* first, check to see if the given sdn is empty or a root suffix of the
given backend - if so, it has no parent */
@@ -219,7 +220,13 @@ dn2ancestor(
*/
/* stop when we get to "", or a backend suffix point */
- while (!e && !slapi_sdn_isempty(&ancestorndn) && !slapi_be_issuffix( be, &ancestorndn )) {
+ while (!e && !slapi_sdn_isempty(&ancestorndn)) {
+ if (!allow_suffix) {
+ /* Original behavior. */
+ if (slapi_be_issuffix(be, &ancestorndn)) {
+ break;
+ }
+ }
/* find the entry - it uses the ndn, so no further conversion is necessary */
e= dn2entry(be,&ancestorndn,txn,err);
if (!e) {
diff --git a/ldap/servers/slapd/back-ldbm/findentry.c b/ldap/servers/slapd/back-ldbm/findentry.c
index 7174c08..a667ff8 100644
--- a/ldap/servers/slapd/back-ldbm/findentry.c
+++ b/ldap/servers/slapd/back-ldbm/findentry.c
@@ -45,8 +45,8 @@
#include "back-ldbm.h"
-static struct backentry *find_entry_internal_dn(Slapi_PBlock *pb, backend *be, const Slapi_DN *sdn, int lock, back_txn *txn, int flags);
-static struct backentry * find_entry_internal(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, int lock, back_txn *txn, int flags);
+static struct backentry *find_entry_internal_dn(Slapi_PBlock *pb, backend *be, const Slapi_DN *sdn, int lock, back_txn *txn, int flags, int *rc);
+static struct backentry * find_entry_internal(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, int lock, back_txn *txn, int flags, int *rc);
/* The flags take these values */
#define FE_TOMBSTONE_INCLUDED TOMBSTONE_INCLUDED /* :1 defined in back-ldbm.h */
#define FE_REALLY_INTERNAL 0x2
@@ -56,7 +56,7 @@ check_entry_for_referral(Slapi_PBlock *pb, Slapi_Entry *entry, char *matched, co
{
int rc=0, i=0, numValues=0;
Slapi_Attr *attr;
- Slapi_Value *val=NULL;
+ Slapi_Value *val=NULL;
struct berval **refscopy=NULL;
struct berval **url=NULL;
@@ -109,12 +109,13 @@ out:
static struct backentry *
find_entry_internal_dn(
- Slapi_PBlock *pb,
+ Slapi_PBlock *pb,
backend *be,
const Slapi_DN *sdn,
int lock,
- back_txn *txn,
- int flags
+ back_txn *txn,
+ int flags,
+ int *rc /* return code */
)
{
struct backentry *e;
@@ -122,9 +123,14 @@ find_entry_internal_dn(
int err;
ldbm_instance *inst = (ldbm_instance *) be->be_instance_info;
size_t tries = 0;
+ int isroot = 0;
+ int op_type;
+ char *errbuf = NULL;
/* get the managedsait ldap message control */
- slapi_pblock_get( pb, SLAPI_MANAGEDSAIT, &managedsait );
+ slapi_pblock_get(pb, SLAPI_MANAGEDSAIT, &managedsait);
+ slapi_pblock_get(pb, SLAPI_REQUESTOR_ISROOT, &isroot);
+ slapi_pblock_get(pb, SLAPI_OPERATION_TYPE, &op_type);
while ( (tries < LDBM_CACHE_RETRY_COUNT) &&
(e = dn2entry_ext( be, sdn, txn, flags & TOMBSTONE_INCLUDED, &err ))
@@ -142,6 +148,9 @@ find_entry_internal_dn(
if(check_entry_for_referral(pb, e->ep_entry, NULL, "find_entry_internal_dn"))
{
CACHE_RETURN( &inst->inst_cache, &e );
+ if (rc) { /* if check_entry_for_referral returns non-zero, result is sent. */
+ *rc = FE_RC_SENT_RESULT;
+ }
return( NULL );
}
}
@@ -180,27 +189,89 @@ find_entry_internal_dn(
struct backentry *me;
Slapi_DN ancestorsdn;
slapi_sdn_init(&ancestorsdn);
- me= dn2ancestor(pb->pb_backend,sdn,&ancestorsdn,txn,&err);
+ me = dn2ancestor(pb->pb_backend, sdn, &ancestorsdn, txn, &err, 1 /* allow_suffix */);
if ( !managedsait && me != NULL ) {
/* if the entry is a referral send the referral */
if(check_entry_for_referral(pb, me->ep_entry, (char*)slapi_sdn_get_dn(&ancestorsdn), "find_entry_internal_dn"))
{
CACHE_RETURN( &inst->inst_cache, &me );
slapi_sdn_done(&ancestorsdn);
+ if (rc) { /* if check_entry_for_referral returns non-zero, result is sent. */
+ *rc = FE_RC_SENT_RESULT;
+ }
return( NULL );
}
/* else fall through to no such object */
}
/* entry not found */
- slapi_send_ldap_result( pb, ( 0 == err || DB_NOTFOUND == err ) ?
- LDAP_NO_SUCH_OBJECT : ( LDAP_INVALID_DN_SYNTAX == err ) ?
- LDAP_INVALID_DN_SYNTAX : LDAP_OPERATIONS_ERROR,
- (char*)slapi_sdn_get_dn(&ancestorsdn), NULL, 0, NULL );
+ if ((0 == err) || (DB_NOTFOUND == err)) {
+ if (me && !isroot) {
+ /* If not root, you may not want to reveal it. */
+ int acl_type = -1;
+ int return_err = LDAP_NO_SUCH_OBJECT;
+ err = LDAP_SUCCESS;
+ switch (op_type) {
+ case SLAPI_OPERATION_ADD:
+ acl_type = SLAPI_ACL_ADD;
+ return_err = LDAP_INSUFFICIENT_ACCESS;
+ break;
+ case SLAPI_OPERATION_DELETE:
+ acl_type = SLAPI_ACL_DELETE;
+ return_err = LDAP_INSUFFICIENT_ACCESS;
+ break;
+ case SLAPI_OPERATION_MODDN:
+ acl_type = SLAPI_ACL_WRITE;
+ return_err = LDAP_INSUFFICIENT_ACCESS;
+ break;
+ case SLAPI_OPERATION_MODIFY:
+ acl_type = SLAPI_ACL_WRITE;
+ return_err = LDAP_INSUFFICIENT_ACCESS;
+ break;
+ case SLAPI_OPERATION_SEARCH:
+ case SLAPI_OPERATION_COMPARE:
+ return_err = LDAP_SUCCESS;
+ acl_type = SLAPI_ACL_READ;
+ break;
+ case SLAPI_OPERATION_BIND:
+ acl_type = -1; /* skip acl check. acl is not set up for bind. */
+ return_err = LDAP_INVALID_CREDENTIALS;
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "No such entry");
+ break;
+ }
+ if (acl_type > 0) {
+ err = plugin_call_acl_plugin(pb, me->ep_entry, NULL, NULL, acl_type,
+ ACLPLUGIN_ACCESS_DEFAULT, &errbuf);
+ }
+ if (((acl_type > 0) && err) || (op_type == SLAPI_OPERATION_BIND)) {
+ /*
+ * Operations to be checked && ACL returns disallow.
+ * Not to disclose the info about the entry's existence,
+ * do not return the "matched" DN.
+ * Plus, the bind case returns LDAP_INAPPROPRIATE_AUTH.
+ */
+ slapi_send_ldap_result(pb, return_err, NULL, NULL, 0, NULL);
+ } else {
+ slapi_send_ldap_result(pb, LDAP_NO_SUCH_OBJECT,
+ (char*)slapi_sdn_get_dn(&ancestorsdn), NULL, 0, NULL);
+ }
+ } else {
+ slapi_send_ldap_result( pb, LDAP_NO_SUCH_OBJECT,
+ (char*)slapi_sdn_get_dn(&ancestorsdn), NULL, 0, NULL);
+ }
+ } else {
+ slapi_send_ldap_result( pb, ( LDAP_INVALID_DN_SYNTAX == err ) ?
+ LDAP_INVALID_DN_SYNTAX : LDAP_OPERATIONS_ERROR,
+ (char*)slapi_sdn_get_dn(&ancestorsdn), NULL, 0, NULL );
+ }
+ if (rc) {
+ *rc = FE_RC_SENT_RESULT;
+ }
slapi_sdn_done(&ancestorsdn);
CACHE_RETURN( &inst->inst_cache, &me );
}
+ slapi_ch_free_string(&errbuf);
LDAPDebug( LDAP_DEBUG_TRACE, "<= find_entry_internal_dn not found (%s)\n",
slapi_sdn_get_dn(sdn), 0, 0 );
return( NULL );
@@ -212,11 +283,11 @@ find_entry_internal_dn(
*/
static struct backentry *
find_entry_internal_uniqueid(
- Slapi_PBlock *pb,
+ Slapi_PBlock *pb,
backend *be,
- const char *uniqueid,
+ const char *uniqueid,
int lock,
- back_txn *txn
+ back_txn *txn
)
{
ldbm_instance *inst = (ldbm_instance *) be->be_instance_info;
@@ -272,8 +343,9 @@ find_entry_internal(
Slapi_Backend *be,
const entry_address *addr,
int lock,
- back_txn *txn,
- int flags
+ back_txn *txn,
+ int flags,
+ int *rc
)
{
/* check if we should search based on uniqueid or dn */
@@ -290,11 +362,9 @@ find_entry_internal(
LDAPDebug( LDAP_DEBUG_TRACE, "=> find_entry_internal (dn=%s) lock %d\n",
slapi_sdn_get_dn(addr->sdn), lock, 0 );
if (addr->sdn) {
- entry = find_entry_internal_dn (pb, be, addr->sdn,
- lock, txn, flags);
+ entry = find_entry_internal_dn (pb, be, addr->sdn, lock, txn, flags, rc);
} else {
- LDAPDebug0Args( LDAP_DEBUG_ANY,
- "find_entry_internal: Null target dn\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, "find_entry_internal: Null target dn\n" );
}
LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= find_entry_internal\n" );
@@ -307,10 +377,11 @@ find_entry(
Slapi_PBlock *pb,
Slapi_Backend *be,
const entry_address *addr,
- back_txn *txn
+ back_txn *txn,
+ int *rc
)
{
- return( find_entry_internal( pb, be, addr, 0/*!lock*/, txn, 0/*flags*/ ) );
+ return(find_entry_internal(pb, be, addr, 0/*!lock*/, txn, 0/*flags*/, rc));
}
struct backentry *
@@ -318,10 +389,11 @@ find_entry2modify(
Slapi_PBlock *pb,
Slapi_Backend *be,
const entry_address *addr,
- back_txn *txn
+ back_txn *txn,
+ int *rc
)
{
- return( find_entry_internal( pb, be, addr, 1/*lock*/, txn, 0/*flags*/ ) );
+ return(find_entry_internal(pb, be, addr, 1/*lock*/, txn, 0/*flags*/, rc));
}
/* New routines which do not do any referral stuff.
@@ -333,10 +405,11 @@ find_entry_only(
Slapi_PBlock *pb,
Slapi_Backend *be,
const entry_address *addr,
- back_txn *txn
+ back_txn *txn,
+ int *rc
)
{
- return( find_entry_internal( pb, be, addr, 0/*!lock*/, txn, FE_REALLY_INTERNAL ) );
+ return(find_entry_internal(pb, be, addr, 0/*!lock*/, txn, FE_REALLY_INTERNAL, rc));
}
struct backentry *
@@ -344,10 +417,11 @@ find_entry2modify_only(
Slapi_PBlock *pb,
Slapi_Backend *be,
const entry_address *addr,
- back_txn *txn
+ back_txn *txn,
+ int *rc
)
{
- return( find_entry_internal( pb, be, addr, 1/*lock*/, txn, FE_REALLY_INTERNAL ) );
+ return(find_entry_internal(pb, be, addr, 1/*lock*/, txn, 0 /* to check aci, disable INTERNAL */, rc));
}
struct backentry *
@@ -356,10 +430,9 @@ find_entry2modify_only_ext(
Slapi_Backend *be,
const entry_address *addr,
int flags,
- back_txn *txn
-
+ back_txn *txn,
+ int *rc
)
{
- return( find_entry_internal( pb, be, addr, 1/*lock*/, txn,
- FE_REALLY_INTERNAL | flags ));
+ return(find_entry_internal(pb, be, addr, 1/*lock*/, txn, FE_REALLY_INTERNAL | flags, rc));
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index 3397c0f..d48b299 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -118,6 +118,7 @@ ldbm_back_add( Slapi_PBlock *pb )
int parent_switched = 0;
int noabort = 1;
const char *dn = NULL;
+ int result_sent = 0;
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &e );
@@ -302,7 +303,7 @@ ldbm_back_add( Slapi_PBlock *pb )
addr.sdn = &parentsdn;
addr.udn = NULL;
addr.uniqueid = operation->o_params.p.p_add.parentuniqueid;
- parententry = find_entry2modify_only(pb,be,&addr,&txn);
+ parententry = find_entry2modify_only(pb, be, &addr, &txn, &result_sent);
if (parententry && parententry->ep_entry) {
if (!operation->o_params.p.p_add.parentuniqueid){
/* Set the parentuniqueid now */
@@ -356,6 +357,14 @@ ldbm_back_add( Slapi_PBlock *pb )
/* The entry already exists */
ldap_result_code = LDAP_ALREADY_EXISTS;
}
+ if ((LDAP_ALREADY_EXISTS == ldap_result_code) && !isroot && !is_replicated_operation) {
+ int myrc = plugin_call_acl_plugin(pb, e, NULL, NULL, SLAPI_ACL_ADD,
+ ACLPLUGIN_ACCESS_DEFAULT, &errbuf);
+ if (myrc) {
+ ldap_result_code = myrc;
+ ldap_result_message = errbuf;
+ }
+ }
goto error_return;
}
else
@@ -372,7 +381,7 @@ ldbm_back_add( Slapi_PBlock *pb )
Slapi_DN ancestorsdn;
struct backentry *ancestorentry;
slapi_sdn_init(&ancestorsdn);
- ancestorentry= dn2ancestor(pb->pb_backend,sdn,&ancestorsdn,&txn,&err);
+ ancestorentry = dn2ancestor(pb->pb_backend, sdn, &ancestorsdn, &txn, &err, 0);
slapi_sdn_done(&ancestorsdn);
if ( ancestorentry != NULL )
{
@@ -419,7 +428,7 @@ ldbm_back_add( Slapi_PBlock *pb )
addr.udn = NULL;
addr.sdn = NULL;
addr.uniqueid = (char *)slapi_entry_get_uniqueid(e); /* jcm - cast away const */
- tombstoneentry = find_entry2modify( pb, be, &addr, &txn );
+ tombstoneentry = find_entry2modify(pb, be, &addr, &txn, &result_sent);
if ( tombstoneentry==NULL )
{
ldap_result_code= -1;
@@ -617,7 +626,7 @@ ldbm_back_add( Slapi_PBlock *pb )
"It might be a conflict entry.\n", slapi_sdn_get_dn(&parentsdn));
slapi_sdn_init(&ancestorsdn);
- ancestorentry = dn2ancestor(be, &parentsdn, &ancestorsdn, &txn, &err );
+ ancestorentry = dn2ancestor(be, &parentsdn, &ancestorsdn, &txn, &err, 1);
CACHE_RETURN( &inst->inst_cache, &ancestorentry );
ldap_result_code= LDAP_NO_SUCH_OBJECT;
@@ -1258,7 +1267,9 @@ common_return:
}
if(ldap_result_code!=-1)
{
- slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL );
+ if (!result_sent) {
+ slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL );
+ }
}
backentry_free(&originalentry);
backentry_free(&tmpentry);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_bind.c b/ldap/servers/slapd/back-ldbm/ldbm_bind.c
index 24c0b4f..00a2021 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_bind.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_bind.c
@@ -211,6 +211,7 @@ ldbm_back_bind( Slapi_PBlock *pb )
Slapi_Value **bvals;
entry_address *addr;
back_txn txn = {NULL};
+ int result_sent = 0;
/* get parameters */
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
@@ -236,7 +237,11 @@ ldbm_back_bind( Slapi_PBlock *pb )
* find the target entry. find_entry() takes care of referrals
* and sending errors if the entry does not exist.
*/
- if (( e = find_entry( pb, be, addr, &txn )) == NULL ) {
+ if ((e = find_entry( pb, be, addr, &txn, &result_sent)) == NULL) {
+ /* In the failure case, the result is supposed to be sent in the backend. */
+ if (!result_sent) {
+ slapi_send_ldap_result(pb, LDAP_INAPPROPRIATE_AUTH, NULL, NULL, 0, NULL);
+ }
return( SLAPI_BIND_FAIL );
}
@@ -265,8 +270,8 @@ ldbm_back_bind( Slapi_PBlock *pb )
break;
}
#endif
- slapi_send_ldap_result( pb, LDAP_INVALID_CREDENTIALS, NULL,
- NULL, 0, NULL );
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "Invalid credentials");
+ slapi_send_ldap_result( pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL );
CACHE_RETURN( &inst->inst_cache, &e );
value_done(&cv);
return( SLAPI_BIND_FAIL );
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_compare.c b/ldap/servers/slapd/back-ldbm/ldbm_compare.c
index e9761ec..1849fc4 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_compare.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_compare.c
@@ -78,7 +78,7 @@ ldbm_back_compare( Slapi_PBlock *pb )
/* get the namespace dn */
namespace_dn = (Slapi_DN*)slapi_be_getsuffix(be, 0);
- if ( (e = find_entry( pb, be, addr, &txn )) == NULL ) {
+ if ((e = find_entry(pb, be, addr, &txn, NULL)) == NULL) {
return( -1 ); /* error result sent by find_entry() */
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index 5a6fbb5..4bd7bf6 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -100,6 +100,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
int free_delete_existing_entry = 0;
ID ep_id = 0;
ID tomb_ep_id = 0;
+ int result_sent = 0;
slapi_pblock_get( pb, SLAPI_BACKEND, &be);
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
@@ -188,7 +189,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
* deleted. That is, the entry 'e' found with "addr" is a tomb-
* stone. If it is the case, we need to back off.
*/
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL )
+ if ((e = find_entry2modify(pb, be, addr, &txn, &result_sent)) == NULL)
{
ldap_result_code= LDAP_NO_SUCH_OBJECT;
/* retval is -1 */
@@ -398,7 +399,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
parent_addr.uniqueid = NULL;
}
parent_addr.sdn = &parentsdn;
- parent = find_entry2modify_only_ext(pb, be, &parent_addr, TOMBSTONE_INCLUDED, &txn);
+ parent = find_entry2modify_only_ext(pb, be, &parent_addr, TOMBSTONE_INCLUDED, &txn, &result_sent);
}
if (parent) {
int isglue;
@@ -1324,7 +1325,9 @@ common_return:
diskfull_return:
if(ldap_result_code!=-1)
{
- slapi_send_ldap_result( pb, ldap_result_code, NULL, ldap_result_message, 0, NULL );
+ if (!result_sent) {
+ slapi_send_ldap_result( pb, ldap_result_code, NULL, ldap_result_message, 0, NULL );
+ }
}
modify_term(&parent_modify_c, be);
if(dblock_acquired)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index d657dd0..122597e 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -388,6 +388,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
int opreturn = 0;
int mod_count = 0;
int ec_locked = 0;
+ int result_sent = 0;
slapi_pblock_get( pb, SLAPI_BACKEND, &be);
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
@@ -447,7 +448,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
}
/* find and lock the entry we are about to modify */
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
+ if ( (e = find_entry2modify( pb, be, addr, &txn, &result_sent )) == NULL ) {
ldap_result_code= -1;
goto error_return; /* error result sent by find_entry2modify() */
}
@@ -890,7 +891,7 @@ common_return:
{
dblayer_unlock_backend(be);
}
- if(ldap_result_code!=-1)
+ if ((ldap_result_code!=-1) && !result_sent)
{
slapi_send_ldap_result( pb, ldap_result_code, NULL, ldap_result_message, 0, NULL );
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 8e52e0e..58ca714 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -120,6 +120,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
char *newrdn = NULL;
int opreturn = 0;
int free_modrdn_existing_entry = 0;
+ int result_sent = 0;
/* sdn & parentsdn need to be initialized before "goto *_return" */
slapi_sdn_init(&dn_newdn);
@@ -352,7 +353,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
/* find and lock the entry we are about to modify */
/* JCMREPL - Argh, what happens about the stinking referrals? */
slapi_pblock_get (pb, SLAPI_TARGET_ADDRESS, &old_addr);
- e = find_entry2modify( pb, be, old_addr, &txn );
+ e = find_entry2modify( pb, be, old_addr, &txn, &result_sent );
if ( e == NULL )
{
ldap_result_code= -1;
@@ -389,7 +390,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
} else {
oldparent_addr.uniqueid = NULL;
}
- parententry = find_entry2modify_only( pb, be, &oldparent_addr, &txn );
+ parententry = find_entry2modify_only( pb, be, &oldparent_addr, &txn, &result_sent );
modify_init(&parent_modify_context,parententry);
/* Fetch and lock the new parent of the entry that is moving */
@@ -399,7 +400,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (is_resurect_operation) {
newsuperior_addr->uniqueid = slapi_entry_attr_get_charptr(e->ep_entry, SLAPI_ATTR_VALUE_PARENT_UNIQUEID);
}
- newparententry = find_entry2modify_only( pb, be, newsuperior_addr, &txn );
+ newparententry = find_entry2modify_only( pb, be, newsuperior_addr, &txn, &result_sent );
slapi_ch_free_string(&newsuperior_addr->uniqueid);
modify_init(&newparent_modify_context,newparententry);
}
@@ -460,7 +461,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
Slapi_DN ancestorsdn;
struct backentry *ancestorentry;
slapi_sdn_init(&ancestorsdn);
- ancestorentry= dn2ancestor(be,&dn_newdn,&ancestorsdn,&txn,&err);
+ ancestorentry = dn2ancestor(be, &dn_newdn, &ancestorsdn, &txn, &err, 0);
CACHE_RETURN( &inst->inst_cache, &ancestorentry );
ldap_result_matcheddn= slapi_ch_strdup((char *) slapi_sdn_get_dn(&ancestorsdn));
ldap_result_code= LDAP_NO_SUCH_OBJECT;
@@ -1419,10 +1420,10 @@ common_return:
modify_term(&ruv_c, be);
}
- if (ldap_result_code!=-1)
- {
- slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn,
- ldap_result_message, 0,NULL );
+ if ((ldap_result_code!=-1) && !result_sent)
+ {
+ slapi_send_ldap_result(pb, ldap_result_code, ldap_result_matcheddn,
+ ldap_result_message, 0, NULL);
}
slapi_mods_done(&smods_operation_wsi);
slapi_mods_done(&smods_generated);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index a9a05ac..952b987 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -603,7 +603,7 @@ ldbm_back_search( Slapi_PBlock *pb )
}
else
{
- if ( ( e = find_entry( pb, be, addr, &txn )) == NULL )
+ if ((e = find_entry(pb, be, addr, &txn, NULL)) == NULL)
{
/* error or referral sent by find_entry */
return ldbm_back_search_cleanup(pb, li, sort_control,
diff --git a/ldap/servers/slapd/back-ldbm/misc.c b/ldap/servers/slapd/back-ldbm/misc.c
index 7a90742..11e97bc 100644
--- a/ldap/servers/slapd/back-ldbm/misc.c
+++ b/ldap/servers/slapd/back-ldbm/misc.c
@@ -433,7 +433,7 @@ ldbm_txn_ruv_modify_context( Slapi_PBlock *pb, modify_context *mc )
/* Note: if we find the bentry, it will stay locked until someone calls
* modify_term on the mc we'll be associating the bentry with */
- bentry = find_entry2modify_only( pb, be, &bentry_addr, &txn );
+ bentry = find_entry2modify_only(pb, be, &bentry_addr, &txn, NULL);
if (NULL == bentry) {
/* Uh oh, we couldn't find and lock the RUV entry! */
diff --git a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
index 688f293..eeeb7eb 100644
--- a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
+++ b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
@@ -190,7 +190,7 @@ int ldbm_back_ctrl_info(Slapi_Backend *be, int cmd, void *info);
struct backentry *dn2entry(Slapi_Backend *be, const Slapi_DN *sdn, back_txn *txn, int *err);
struct backentry *dn2entry_ext(Slapi_Backend *be, const Slapi_DN *sdn, back_txn *txn, int flags, int *err);
struct backentry *dn2entry_or_ancestor(Slapi_Backend *be, const Slapi_DN *sdn, Slapi_DN *ancestor, back_txn *txn, int *err);
-struct backentry *dn2ancestor(Slapi_Backend *be,const Slapi_DN *sdn,Slapi_DN *ancestordn,back_txn *txn,int *err);
+struct backentry *dn2ancestor(Slapi_Backend *be,const Slapi_DN *sdn,Slapi_DN *ancestordn,back_txn *txn,int *err, int allow_suffix);
int get_copy_of_entry(Slapi_PBlock *pb, const entry_address *addr, back_txn *txn, int plock_parameter, int must_exist);
int get_copy_of_entry_ext(Slapi_PBlock *pb, ID id, const entry_address *addr, back_txn *txn, int plock_parameter, int must_exist);
void done_with_pblock_entry(Slapi_PBlock *pb, int plock_parameter);
@@ -210,11 +210,13 @@ IDList * filter_candidates_ext( Slapi_PBlock *pb, backend *be, const char *base,
/*
* findentry.c
*/
-struct backentry * find_entry2modify( Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn );
-struct backentry * find_entry( Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn );
-struct backentry * find_entry2modify_only( Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn);
-struct backentry * find_entry2modify_only_ext( Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, int flags, back_txn *txn);
-struct backentry * find_entry_only( Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn);
+/* Return code */
+#define FE_RC_SENT_RESULT 1
+struct backentry *find_entry2modify(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn, int *rc);
+struct backentry *find_entry(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn, int *rc);
+struct backentry *find_entry2modify_only(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn, int *rc);
+struct backentry *find_entry2modify_only_ext(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, int flags, back_txn *txn, int *rc);
+struct backentry *find_entry_only(Slapi_PBlock *pb, Slapi_Backend *be, const entry_address *addr, back_txn *txn, int *rc);
int check_entry_for_referral(Slapi_PBlock *pb, Slapi_Entry *entry, char *matched, const char *callingfn);
/*
diff --git a/ldap/servers/slapd/back-ldbm/vlv_srch.c b/ldap/servers/slapd/back-ldbm/vlv_srch.c
index d7e28c1..8edf295 100644
--- a/ldap/servers/slapd/back-ldbm/vlv_srch.c
+++ b/ldap/servers/slapd/back-ldbm/vlv_srch.c
@@ -191,7 +191,7 @@ vlvSearch_init(struct vlvSearch* p, Slapi_PBlock *pb, const Slapi_Entry *e, ldbm
addr.sdn = p->vlv_base;
addr.uniqueid = NULL;
- e = find_entry( pb, inst->inst_be, &addr, &txn );
+ e = find_entry(pb, inst->inst_be, &addr, &txn, NULL);
/* Check to see if the entry is absent. If it is, mark this search
* as not initialized */
if (NULL == e) {
diff --git a/ldap/servers/slapd/bind.c b/ldap/servers/slapd/bind.c
index bc8040f..eb6ee83 100644
--- a/ldap/servers/slapd/bind.c
+++ b/ldap/servers/slapd/bind.c
@@ -470,8 +470,8 @@ do_bind( Slapi_PBlock *pb )
* to an LDAP DN, fail and return an invalidCredentials error.
*/
if ( NULL == pb->pb_conn->c_external_dn ) {
- send_ldap_result( pb, LDAP_INVALID_CREDENTIALS, NULL,
- "client certificate mapping failed", 0, NULL );
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "Client certificate mapping failed");
+ send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, "", 0, NULL);
/* call postop plugins */
plugin_call_plugins( pb, SLAPI_PLUGIN_POST_BIND_FN );
goto free_and_return;
@@ -588,33 +588,32 @@ do_bind( Slapi_PBlock *pb )
/* Check if simple binds are allowed over an insecure channel. We only check
* this for authenticated binds. */
} else if (config_get_require_secure_binds() == 1) {
- Connection *conn = NULL;
- int sasl_ssf = 0;
- int local_ssf = 0;
-
- /* Allow simple binds only for SSL/TLS established connections
- * or connections using SASL privacy layers */
- conn = pb->pb_conn;
- if ( slapi_pblock_get(pb, SLAPI_CONN_SASL_SSF, &sasl_ssf) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "do_bind",
- "Could not get SASL SSF from connection\n" );
- sasl_ssf = 0;
- }
+ Connection *conn = NULL;
+ int sasl_ssf = 0;
+ int local_ssf = 0;
+
+ /* Allow simple binds only for SSL/TLS established connections
+ * or connections using SASL privacy layers */
+ conn = pb->pb_conn;
+ if ( slapi_pblock_get(pb, SLAPI_CONN_SASL_SSF, &sasl_ssf) != 0) {
+ slapi_log_error( SLAPI_LOG_PLUGIN, "do_bind",
+ "Could not get SASL SSF from connection\n" );
+ sasl_ssf = 0;
+ }
- if ( slapi_pblock_get(pb, SLAPI_CONN_LOCAL_SSF, &local_ssf) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "do_bind",
- "Could not get local SSF from connection\n" );
- local_ssf = 0;
- }
+ if ( slapi_pblock_get(pb, SLAPI_CONN_LOCAL_SSF, &local_ssf) != 0) {
+ slapi_log_error( SLAPI_LOG_PLUGIN, "do_bind",
+ "Could not get local SSF from connection\n" );
+ local_ssf = 0;
+ }
- if (((conn->c_flags & CONN_FLAG_SSL) != CONN_FLAG_SSL) &&
- (sasl_ssf <= 1) && (local_ssf <= 1)) {
- send_ldap_result(pb, LDAP_CONFIDENTIALITY_REQUIRED, NULL,
- "Operation requires a secure connection",
- 0, NULL);
- slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors);
- goto free_and_return;
- }
+ if (((conn->c_flags & CONN_FLAG_SSL) != CONN_FLAG_SSL) &&
+ (sasl_ssf <= 1) && (local_ssf <= 1)) {
+ send_ldap_result(pb, LDAP_CONFIDENTIALITY_REQUIRED, NULL,
+ "Operation requires a secure connection", 0, NULL);
+ slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors);
+ goto free_and_return;
+ }
}
break;
default:
@@ -659,6 +658,7 @@ do_bind( Slapi_PBlock *pb )
/*
* right dn, wrong passwd - reject with invalid credentials
*/
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "Invalid credentials");
send_ldap_result( pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL );
/* increment BindSecurityErrorcount */
slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors);
@@ -681,6 +681,7 @@ do_bind( Slapi_PBlock *pb )
/* call postop plugins */
plugin_call_plugins( pb, SLAPI_PLUGIN_POST_BIND_FN );
} else {
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "Pre-bind plug-in failed");
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, "", 0, NULL);
}
goto free_and_return;
@@ -713,31 +714,11 @@ do_bind( Slapi_PBlock *pb )
if ( plugin_call_plugins( pb, SLAPI_PLUGIN_PRE_BIND_FN )
== 0 ) {
rc = 0;
-
- /*
- * Is this account locked ?
- * could be locked through the account inactivation
- * or by the password policy
- *
- * rc=0: account not locked
- * rc=1: account locked, can not bind, result has been sent
- * rc!=0 and rc!=1: error. Result was not sent, lets be_bind
- * deal with it.
- *
- */
-
- /* get the entry now, so that we can give it to slapi_check_account_lock and reslimit_update_from_dn */
- if (! slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA)) {
- bind_target_entry = get_entry(pb, slapi_sdn_get_ndn(sdn));
- rc = slapi_check_account_lock ( pb, bind_target_entry, pw_response_requested, 1, 1);
- }
-
slapi_pblock_set( pb, SLAPI_PLUGIN, be->be_database );
set_db_default_result_handlers(pb);
- if ( (rc != 1) &&
- (auto_bind ||
- (((rc = (*be->be_bind)( pb )) == SLAPI_BIND_SUCCESS) ||
- (rc == SLAPI_BIND_ANONYMOUS))) ) {
+ if (auto_bind ||
+ (((rc = (*be->be_bind)( pb )) == SLAPI_BIND_SUCCESS) ||
+ (rc == SLAPI_BIND_ANONYMOUS))) {
long t;
char* authtype = NULL;
/* rc is SLAPI_BIND_SUCCESS or SLAPI_BIND_ANONYMOUS */
@@ -770,6 +751,28 @@ do_bind( Slapi_PBlock *pb )
if ( rc == SLAPI_BIND_SUCCESS ) {
int myrc = 0;
+ /*
+ * Is this account locked ?
+ * could be locked through the account inactivation
+ * or by the password policy
+ *
+ * rc=0: account not locked
+ * rc=1: account locked, can not bind, result has been sent
+ * rc!=0 and rc!=1: error. Result was not sent, lets be_bind
+ * deal with it.
+ *
+ */
+
+ /* get the entry now, so that we can give it to slapi_check_account_lock and reslimit_update_from_dn */
+ if (! slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA)) {
+ bind_target_entry = get_entry(pb, slapi_sdn_get_ndn(sdn));
+ myrc = slapi_check_account_lock ( pb, bind_target_entry, pw_response_requested, 1, 1);
+ if (1 == myrc) { /* account is locked */
+ rc = myrc;
+ goto account_locked;
+ }
+ myrc = 0;
+ }
if (!auto_bind) {
/*
* There could be a race that bind_target_entry was not added
@@ -780,14 +783,9 @@ do_bind( Slapi_PBlock *pb )
if (!slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA) &&
!bind_target_entry) {
bind_target_entry = get_entry(pb, slapi_sdn_get_ndn(sdn));
- if (bind_target_entry) {
- myrc = slapi_check_account_lock(pb, bind_target_entry,
- pw_response_requested, 1, 1);
- if (1 == myrc) { /* account is locked */
- goto account_locked;
- }
- } else {
- send_ldap_result(pb, LDAP_NO_SUCH_OBJECT, NULL, "", 0, NULL);
+ if (!bind_target_entry) {
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "No such entry");
+ send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, "", 0, NULL);
goto free_and_return;
}
}
@@ -847,8 +845,7 @@ account_locked:
* the front end.
*/
if ( rc == SLAPI_BIND_SUCCESS || rc == SLAPI_BIND_ANONYMOUS) {
- send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL,
- 0, NULL );
+ send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
}
slapi_pblock_set( pb, SLAPI_PLUGIN_OPRETURN, &rc );
@@ -871,8 +868,7 @@ free_and_return:;
slapi_sdn_free(&sdn);
slapi_ch_free_string( &saslmech );
slapi_ch_free( (void **)&cred.bv_val );
- if ( bind_target_entry != NULL )
- slapi_entry_free(bind_target_entry);
+ slapi_entry_free(bind_target_entry);
}
diff --git a/ldap/servers/slapd/defbackend.c b/ldap/servers/slapd/defbackend.c
index dd948d0..13d5919 100644
--- a/ldap/servers/slapd/defbackend.c
+++ b/ldap/servers/slapd/defbackend.c
@@ -200,6 +200,51 @@ defbackend_abandon( Slapi_PBlock *pb )
}
+#define DEFBE_NO_SUCH_SUFFIX "No such suffix"
+/*
+ * Generate a "No such suffix" return text
+ * Example:
+ * cn=X,dc=bogus,dc=com ==> "No such suffix (dc=bogus,dc=com)"
+ * if the last rdn starts with "dc=", print all last dc= rdn's.
+ * cn=X,cn=bogus ==> "No such suffix (cn=bogus)"
+ * otherwise, print the very last rdn.
+ * cn=X,z=bogus ==> "No such suffix (x=bogus)"
+ * it is true even if it is an invalid rdn.
+ * cn=X,bogus ==> "No such suffix (bogus)"
+ * another example of invalid rdn.
+ */
+static void
+_defbackend_gen_returntext(char *buffer, size_t buflen, char **dns)
+{
+ int dnidx;
+ int sidx;
+ struct suffix_repeat {
+ char *suffix;
+ int size;
+ } candidates[] = {
+ {"dc=", 3}, /* dc could be repeated. otherwise the last rdn is used. */
+ {NULL, 0}
+ };
+ PR_snprintf(buffer, buflen, "%s (", DEFBE_NO_SUCH_SUFFIX);
+ for (dnidx = 0; dns[dnidx]; dnidx++) ; /* finding the last */
+ dnidx--; /* last rdn */
+ for (sidx = 0; candidates[sidx].suffix; sidx++) {
+ if (!PL_strncasecmp(dns[dnidx], candidates[sidx].suffix, candidates[sidx].size)) {
+ while (!PL_strncasecmp(dns[--dnidx], candidates[sidx].suffix, candidates[sidx].size)) ;
+ PL_strcat(buffer, dns[++dnidx]); /* the first "dn=", e.g. */
+ for (++dnidx; dns[dnidx]; dnidx++) {
+ PL_strcat(buffer, ",");
+ PL_strcat(buffer, dns[dnidx]);
+ }
+ PL_strcat(buffer, ")");
+ return; /* finished the task */
+ }
+ }
+ PL_strcat(buffer, dns[dnidx]);
+ PL_strcat(buffer, ")");
+ return;
+}
+
static int
defbackend_bind( Slapi_PBlock *pb )
{
@@ -216,11 +261,40 @@ defbackend_bind( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method );
slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &cred );
if ( method == LDAP_AUTH_SIMPLE && cred->bv_len == 0 ) {
- slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds);
- rc = SLAPI_BIND_ANONYMOUS;
+ slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds);
+ rc = SLAPI_BIND_ANONYMOUS;
} else {
- send_nobackend_ldap_result( pb );
- rc = SLAPI_BIND_FAIL;
+ Slapi_DN *sdn = NULL;
+ char *suffix = NULL;
+ char **dns = NULL;
+
+ if (pb->pb_op) {
+ sdn = operation_get_target_spec(pb->pb_op);
+ if (sdn) {
+ dns = slapi_ldap_explode_dn(slapi_sdn_get_dn(sdn), 0);
+ if (dns) {
+ size_t dnlen = slapi_sdn_get_ndn_len(sdn);
+ size_t len = dnlen + sizeof(DEFBE_NO_SUCH_SUFFIX) + 4;
+ suffix = slapi_ch_malloc(len);
+ if (dnlen) {
+ _defbackend_gen_returntext(suffix, len, dns);
+ } else {
+ PR_snprintf(suffix, len, "%s", DEFBE_NO_SUCH_SUFFIX);
+ }
+ }
+ }
+ }
+ if (suffix) {
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, suffix);
+ } else {
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, DEFBE_NO_SUCH_SUFFIX);
+ }
+ send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, "", 0, NULL);
+ if (dns) {
+ slapi_ldap_value_free(dns);
+ }
+ slapi_ch_free_string(&suffix);
+ rc = SLAPI_BIND_FAIL;
}
return( rc );
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index 6ed6c55..c385368 100644
--- a/ldap/servers/slapd/result.c
+++ b/ldap/servers/slapd/result.c
@@ -1815,14 +1815,26 @@ log_result( Slapi_PBlock *pb, Operation *op, int err, ber_tag_t tag,
} else {
if ( !internal_op )
{
+ char *pbtxt = NULL;
+ char *ext_str = NULL;
+ slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &pbtxt);
+ if (pbtxt) {
+ ext_str = slapi_ch_smprintf(" - %s", pbtxt);
+ } else {
+ ext_str = "";
+ }
slapi_log_access( LDAP_DEBUG_STATS,
"conn=%" NSPRIu64 " op=%d RESULT err=%d"
- " tag=%" BERTAG_T " nentries=%d etime=%s%s%s\n",
+ " tag=%" BERTAG_T " nentries=%d etime=%s%s%s%s\n",
op->o_connid,
op->o_opid,
err, tag, nentries,
etime,
- notes_str, csn_str );
+ notes_str, csn_str, ext_str );
+ if (pbtxt) {
+ /* if !pbtxt ==> ext_str == "". Don't free ext_str. */
+ slapi_ch_free_string(&ext_str);
+ }
}
else
{
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index c1e5f2b..5ef098e 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -1049,8 +1049,8 @@ void ids_sasl_check_bind(Slapi_PBlock *pb)
errstr = sasl_errdetail(sasl_conn);
PR_ExitMonitor(pb->pb_conn->c_mutex); /* BIG LOCK */
- send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL,
- (char*)errstr, 0, NULL);
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, (void *)errstr);
+ send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL);
break;
}
7 years, 7 months
Branch '389-ds-base-1.3.5' - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/auditlog.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit fc1310e352e124d66d58d0a3e86d45c5573cbfb2
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Sep 1 11:34:53 2016 -0700
Ticket #48969 - nsslapd-auditfaillog always has an explicit path
Description: commit ef2c3c4cc6f966935dbe367dd0d882ae81de3cc4
introduced a RESOURCE_LEAK.
auditlog.c:180: leaked_storage: Variable "audit_config" going
out of scope leaks the storage it points to.
Reviewed by nhosoi (one line commit rule)
(cherry picked from commit 95d820901e7264490bae02b8ca943d09a344d7ac)
(cherry picked from commit b0fc82233a5ea929c5fad835f9e825a8f0b97968)
diff --git a/ldap/servers/slapd/auditlog.c b/ldap/servers/slapd/auditlog.c
index 85d136c..74d1b46 100644
--- a/ldap/servers/slapd/auditlog.c
+++ b/ldap/servers/slapd/auditlog.c
@@ -177,6 +177,7 @@ write_auditfail_log_entry( Slapi_PBlock *pb )
write_audit_file(SLAPD_AUDITFAIL_LOG, operation_get_type(op), dn, change, flag, curtime, pbrc, SLAPD_AUDITFAIL_LOG);
}
slapi_ch_free_string(&auditfail_config);
+ slapi_ch_free_string(&audit_config);
}
7 years, 7 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/auditlog.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit b0fc82233a5ea929c5fad835f9e825a8f0b97968
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Sep 1 11:34:53 2016 -0700
Ticket #48969 - nsslapd-auditfaillog always has an explicit path
Description: commit ef2c3c4cc6f966935dbe367dd0d882ae81de3cc4
introduced a RESOURCE_LEAK.
auditlog.c:180: leaked_storage: Variable "audit_config" going
out of scope leaks the storage it points to.
Reviewed by nhosoi (one line commit rule)
(cherry picked from commit 95d820901e7264490bae02b8ca943d09a344d7ac)
diff --git a/ldap/servers/slapd/auditlog.c b/ldap/servers/slapd/auditlog.c
index 85d136c..74d1b46 100644
--- a/ldap/servers/slapd/auditlog.c
+++ b/ldap/servers/slapd/auditlog.c
@@ -177,6 +177,7 @@ write_auditfail_log_entry( Slapi_PBlock *pb )
write_audit_file(SLAPD_AUDITFAIL_LOG, operation_get_type(op), dn, change, flag, curtime, pbrc, SLAPD_AUDITFAIL_LOG);
}
slapi_ch_free_string(&auditfail_config);
+ slapi_ch_free_string(&audit_config);
}
7 years, 7 months