From: Kurt Zeilenga Date: Fri, 20 Aug 1999 19:29:43 +0000 (+0000) Subject: more const'ification X-Git-Tag: TWEB_OL_BASE~139 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8ac21b67a113dc53c41b142a3e4a1f13563f78c6;p=openldap more const'ification --- diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 2aadf7056c..bfdbc3c4ed 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -321,7 +321,7 @@ attr_syntax_config( save = argv[lasti]; argv[lasti] = NULL; - at->at_names = charray_dup( argv ); + at->at_names = charray_dup( (const char **) argv ); argv[lasti] = save; code = at_add( at, &err ); diff --git a/servers/slapd/back-bdb2/config.c b/servers/slapd/back-bdb2/config.c index 2f7fcd340c..a451a4a4d4 100644 --- a/servers/slapd/back-bdb2/config.c +++ b/servers/slapd/back-bdb2/config.c @@ -13,7 +13,7 @@ static int bdb2i_back_config_internal( BackendInfo *bi, - char *fname, + const char *fname, int lineno, int argc, char **argv @@ -64,7 +64,7 @@ bdb2i_back_config_internal( int bdb2_back_config( BackendInfo *bi, - char *fname, + const char *fname, int lineno, int argc, char **argv @@ -85,7 +85,7 @@ bdb2_back_config( static int bdb2i_back_db_config_internal( BackendDB *be, - char *fname, + const char *fname, int lineno, int argc, char **argv diff --git a/servers/slapd/back-bdb2/external.h b/servers/slapd/back-bdb2/external.h index f280b28311..1aaed3d04d 100644 --- a/servers/slapd/back-bdb2/external.h +++ b/servers/slapd/back-bdb2/external.h @@ -9,7 +9,7 @@ extern int bdb2_back_close LDAP_P(( BackendInfo *bi )); extern int bdb2_back_destroy LDAP_P(( BackendInfo *bi )); extern int bdb2_back_config LDAP_P(( BackendInfo *bt, - char *fname, int lineno, int argc, char **argv )); + const char *fname, int lineno, int argc, char **argv )); extern int bdb2_back_db_init LDAP_P(( BackendDB *bd )); extern int bdb2_back_db_open LDAP_P(( BackendDB *bd )); diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index 8a7f1c4bdb..5927ff80fb 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -34,7 +34,7 @@ int ldap_back_db_config( BackendDB *be, - char *fname, + const char *fname, int lineno, int argc, char **argv diff --git a/servers/slapd/back-ldap/external.h b/servers/slapd/back-ldap/external.h index 8d90ee4d00..9ee32f96f3 100644 --- a/servers/slapd/back-ldap/external.h +++ b/servers/slapd/back-ldap/external.h @@ -12,7 +12,7 @@ extern int ldap_back_db_init LDAP_P(( BackendDB *bd )); extern int ldap_back_db_destroy LDAP_P(( BackendDB *bd )); extern int ldap_back_db_config LDAP_P(( BackendDB *bd, - char *fname, int lineno, int argc, char **argv )); + const char *fname, int lineno, int argc, char **argv )); extern int ldap_back_bind LDAP_P(( BackendDB *bd, Connection *conn, Operation *op, diff --git a/servers/slapd/back-passwd/config.c b/servers/slapd/back-passwd/config.c index 7f6cb41169..04ef9f1b75 100644 --- a/servers/slapd/back-passwd/config.c +++ b/servers/slapd/back-passwd/config.c @@ -14,7 +14,7 @@ int passwd_back_db_config( BackendDB *be, - char *fname, + const char *fname, int lineno, int argc, char **argv diff --git a/servers/slapd/back-passwd/external.h b/servers/slapd/back-passwd/external.h index ff34de26cf..924e7a2ef8 100644 --- a/servers/slapd/back-passwd/external.h +++ b/servers/slapd/back-passwd/external.h @@ -11,7 +11,7 @@ extern int passwd_back_search LDAP_P(( BackendDB *be, Filter *f, char *filterstr, char **attrs, int attrsonly)); extern int passwd_back_db_config LDAP_P((BackendDB *bd, - char *fname, int lineno, int argc, char **argv )); + const char *fname, int lineno, int argc, char **argv )); LDAP_END_DECL diff --git a/servers/slapd/back-perl/config.c b/servers/slapd/back-perl/config.c index 83067e5c24..e10cb05bf6 100644 --- a/servers/slapd/back-perl/config.c +++ b/servers/slapd/back-perl/config.c @@ -30,7 +30,7 @@ int perl_back_db_config( BackendDB *be, - char *fname, + const char *fname, int lineno, int argc, char **argv diff --git a/servers/slapd/back-perl/external.h b/servers/slapd/back-perl/external.h index bd01911dc5..4d0201220c 100644 --- a/servers/slapd/back-perl/external.h +++ b/servers/slapd/back-perl/external.h @@ -12,7 +12,7 @@ extern int perl_back_db_init LDAP_P(( BackendDB *bd )); extern int perl_back_db_destroy LDAP_P(( BackendDB *bd )); extern int perl_back_db_config LDAP_P(( BackendDB *bd, - char *fname, int lineno, int argc, char **argv )); + const char *fname, int lineno, int argc, char **argv )); extern int perl_back_bind LDAP_P(( BackendDB *bd, Connection *conn, Operation *op, diff --git a/servers/slapd/back-shell/config.c b/servers/slapd/back-shell/config.c index a308ba1a97..d7442b1d8e 100644 --- a/servers/slapd/back-shell/config.c +++ b/servers/slapd/back-shell/config.c @@ -13,7 +13,7 @@ int shell_back_db_config( BackendDB *be, - char *fname, + const char *fname, int lineno, int argc, char **argv @@ -35,7 +35,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_bind = charray_dup( &argv[1] ); + si->si_bind = charray_dup( (const char**) &argv[1] ); /* command + args to exec for unbinds */ } else if ( strcasecmp( argv[0], "unbind" ) == 0 ) { @@ -45,7 +45,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_unbind = charray_dup( &argv[1] ); + si->si_unbind = charray_dup( (const char**) &argv[1] ); /* command + args to exec for searches */ } else if ( strcasecmp( argv[0], "search" ) == 0 ) { @@ -55,7 +55,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_search = charray_dup( &argv[1] ); + si->si_search = charray_dup( (const char**) &argv[1] ); /* command + args to exec for compares */ } else if ( strcasecmp( argv[0], "compare" ) == 0 ) { @@ -65,7 +65,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_compare = charray_dup( &argv[1] ); + si->si_compare = charray_dup( (const char**) &argv[1] ); /* command + args to exec for modifies */ } else if ( strcasecmp( argv[0], "modify" ) == 0 ) { @@ -75,7 +75,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_modify = charray_dup( &argv[1] ); + si->si_modify = charray_dup( (const char**) &argv[1] ); /* command + args to exec for modrdn */ } else if ( strcasecmp( argv[0], "modrdn" ) == 0 ) { @@ -85,7 +85,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_modrdn = charray_dup( &argv[1] ); + si->si_modrdn = charray_dup( (const char**) &argv[1] ); /* command + args to exec for add */ } else if ( strcasecmp( argv[0], "add" ) == 0 ) { @@ -95,7 +95,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_add = charray_dup( &argv[1] ); + si->si_add = charray_dup( (const char**) &argv[1] ); /* command + args to exec for delete */ } else if ( strcasecmp( argv[0], "delete" ) == 0 ) { @@ -105,7 +105,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_delete = charray_dup( &argv[1] ); + si->si_delete = charray_dup( (const char**) &argv[1] ); /* command + args to exec for abandon */ } else if ( strcasecmp( argv[0], "abandon" ) == 0 ) { @@ -115,7 +115,7 @@ shell_back_db_config( fname, lineno ); return( 1 ); } - si->si_abandon = charray_dup( &argv[1] ); + si->si_abandon = charray_dup( (const char**) &argv[1] ); /* anything else */ } else { diff --git a/servers/slapd/back-shell/external.h b/servers/slapd/back-shell/external.h index 3455ff8680..f2f523a11e 100644 --- a/servers/slapd/back-shell/external.h +++ b/servers/slapd/back-shell/external.h @@ -12,7 +12,7 @@ extern int shell_back_db_init LDAP_P(( BackendDB *bd )); extern int shell_back_db_destroy LDAP_P(( BackendDB *bd )); extern int shell_back_db_config LDAP_P(( BackendDB *bd, - char *fname, int lineno, int argc, char **argv )); + const char *fname, int lineno, int argc, char **argv )); extern int shell_back_bind LDAP_P(( BackendDB *bd, Connection *conn, Operation *op, diff --git a/servers/slapd/back-tcl/external.h b/servers/slapd/back-tcl/external.h index c27f0e4740..da7886a081 100644 --- a/servers/slapd/back-tcl/external.h +++ b/servers/slapd/back-tcl/external.h @@ -1,4 +1,4 @@ -/* $Id: external.h,v 1.6 1999/03/05 02:42:17 gomez Exp $ */ +/* $Id: external.h,v 1.7 1999/06/29 01:29:27 kdz Exp $ */ #ifndef _TCL_EXTERNAL_H #define _TCL_EXTERNAL_H @@ -16,7 +16,7 @@ extern int tcl_back_db_close LDAP_P ((BackendDB * bd)); extern int tcl_back_db_destroy LDAP_P ((BackendDB * bd)); extern int tcl_back_db_config LDAP_P ((BackendDB * bd, - char *fname, int lineno, int argc, char **argv)); + const char *fname, int lineno, int argc, char **argv)); extern int tcl_back_bind LDAP_P ((BackendDB * bd, Connection * conn, Operation * op, diff --git a/servers/slapd/back-tcl/tcl_config.c b/servers/slapd/back-tcl/tcl_config.c index ba32b9a3ba..96441907ad 100644 --- a/servers/slapd/back-tcl/tcl_config.c +++ b/servers/slapd/back-tcl/tcl_config.c @@ -1,6 +1,6 @@ /* config.c - tcl backend configuration file routine * - * $Id: tcl_config.c,v 1.5 1999/02/19 06:55:20 bcollins Exp $ + * $Id: tcl_config.c,v 1.6 1999/02/23 02:51:33 bcollins Exp $ * * Copyright 1999, Ben Collins , All rights reserved. * @@ -22,7 +22,7 @@ struct i_info *global_i; int tcl_back_db_config ( BackendDB * bd, - char *fname, + const char *fname, int lineno, int argc, char **argv diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 44a570982e..fe20446761 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -416,7 +416,7 @@ int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax, * user.c */ #if defined(HAVE_PWD_H) && defined(HAVE_GRP_H) -void slap_init_user LDAP_P(( const char *username, const char *groupname )); +void slap_init_user LDAP_P(( char *username, char *groupname )); #endif /*