Access *b;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
int rc;
- char *text;
+ const char *text;
static AttributeDescription *member = NULL;
static AttributeDescription *aci = NULL;
#endif
int slap_str2ad(
const char *str,
AttributeDescription **ad,
- char **text )
+ const char **text )
{
struct berval bv;
bv.bv_val = (char *) str;
int slap_bv2ad(
struct berval *bv,
AttributeDescription **ad,
- char **text )
+ const char **text )
{
int rtn = LDAP_UNDEFINED_TYPE;
int i;
int i;
for( i=0; attrs[i] != NULL; i++ ) {
AttributeDescription *ad = NULL;
- char *text;
+ const char *text;
int rc;
rc = slap_str2ad( attrs[i], &ad, &text );
static int slap_mods2entry(
Modifications *mods,
Entry **e,
- char **text );
+ const char **text );
#else
static int add_created_attrs(Operation *op, Entry *e);
#endif
LDAPModList **modtail = &modlist;
Modifications *mods = NULL;
#endif
- char *text;
+ const char *text;
int rc = LDAP_SUCCESS;
Debug( LDAP_DEBUG_TRACE, "do_add\n", 0, 0, 0 );
static int slap_mods2entry(
Modifications *mods,
Entry **e,
- char **text )
+ const char **text )
{
Attribute **tail = &(*e)->e_attrs;
assert( *tail == NULL );
static int
attr_index_name_cmp(
- char *type,
+ const char *type,
struct aindexrec *air
)
{
BerElement *ber,
AttributeAssertion **ava,
unsigned usage,
- char **text
+ const char **text
)
{
int rc;
get_ava(
BerElement *ber,
Ava *ava,
- char **text
+ const char **text
)
{
if ( ber_scanf( ber, "{ao}", &ava->ava_type, &ava->ava_value )
Operation *op,
char *dn,
int method,
- char *mech,
struct berval *cred,
char** edn
)
extern int bdb2_back_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int bdb2_back_unbind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op ));
extern int bdb2_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
extern int bdb2_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn,
+ Ava *ava ));
extern int bdb2_back_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Modifications *ml ));
+ const char *dn, const char *ndn,
+ Modifications *ml ));
extern int bdb2_back_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char*newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int bdb2_back_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int bdb2_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
extern int bdb2_back_abandon LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, int msgid ));
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
int method,
- char *mech,
struct berval *cred,
char **edn
)
{
- Debug( LDAP_DEBUG_TRACE, "DNSSRV: bind %s (%d/%s)\n",
+ Debug( LDAP_DEBUG_TRACE, "DNSSRV: bind %s (%d)\n",
dn == NULL ? "" : dn,
- method,
- mech == NULL ? "none" : mech );
+ method, NULL );
if( method == LDAP_AUTH_SIMPLE && cred != NULL && cred->bv_len ) {
Statslog( LDAP_DEBUG_STATS,
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeAssertion *ava
#else
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn
+ const char *dn,
+ const char *ndn
)
{
return dnssrv_back_request( be, conn, op, dn, ndn );
extern int dnssrv_back_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int dnssrv_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
#ifdef SLAPD_SCHEMA_NOT_COMPAT
extern int dnssrv_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, AttributeAssertion *ava ));
+ const char *dn, const char *ndn, AttributeAssertion *ava ));
#else
extern int dnssrv_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn, Ava *ava ));
#endif
extern int dnssrv_back_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Modifications *ml ));
+ const char *dn, const char *ndn,
+ Modifications *ml ));
extern int dnssrv_back_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char*newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int dnssrv_back_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int dnssrv_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
LDAP_END_DECL
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
Modifications *ml
)
{
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *newrdn,
+ const char *dn,
+ const char *ndn,
+ const char *newrdn,
int deleteoldrdn,
- char *newSuperior
+ const char *newSuperior
)
{
return dnssrv_back_request( be, conn, op, dn, ndn );
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
int scope,
int deref,
int size,
int time,
Filter *filter,
- char *filterstr,
+ const char *filterstr,
char **attrs,
int attrsonly
)
char *dn,
char *ndn,
int method,
- char *mech,
struct berval *cred,
char **edn
)
extern int ldap_back_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int ldap_back_conn_destroy LDAP_P(( BackendDB *bd,
Connection *conn ));
extern int ldap_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base, char *nbase,
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
extern int ldap_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn, Ava *ava ));
extern int ldap_back_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Modifications *ml ));
+ const char *dn, const char *ndn, Modifications *ml ));
extern int ldap_back_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char*newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int ldap_back_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int ldap_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
extern int ldap_back_abandon LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, int msgid ));
Entry *p = NULL;
int rootlock = 0;
int rc;
- char *text;
+ const char *text;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
static AttributeDescription *children = NULL;
#else
static char* get_alias_dn(
Entry *e,
int *err,
- char **errmsg );
+ const char **errmsg );
static char* new_superior(
- char *dn,
- char *oldSup,
- char *newSup );
+ const char *dn,
+ const char *oldSup,
+ const char *newSup );
static int dnlist_subordinate(
char** dnlist,
- char *dn );
+ const char *dn );
Entry *deref_internal_r(
Backend* be,
Entry* alias,
- char* dn,
+ const char* dn_in,
int* err,
Entry** matched,
- char** text )
+ const char** text )
{
+ char *dn;
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
Entry *entry;
Entry *sup;
*text = NULL;
if( alias == NULL ) {
- dn = ch_strdup( dn );
+ dn = ch_strdup( dn_in );
entry = dn2entry_r( be, dn, &sup );
} else {
static char* get_alias_dn(
Entry *e,
int *err,
- char **errmsg )
+ const char **errmsg )
{
Attribute *a;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
}
char* new_superior(
- char *dn,
- char *oldSup,
- char *newSup )
+ const char *dn,
+ const char *oldSup,
+ const char *newSup )
{
char *newDN;
size_t dnlen, olen, nlen;
static int dnlist_subordinate(
char** dnlist,
- char *dn )
+ const char *dn )
{
int i;
assert( dnlist );
void
attr_mask(
struct ldbminfo *li,
- char *type,
+ const char *type,
int *indexmask )
{
AttrInfo *a;
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
int method,
- char *mech,
struct berval *cred,
char** edn
)
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeAssertion *ava
#else
DBCache *
ldbm_cache_open(
Backend *be,
- char *name,
- char *suffix,
+ const char *name,
+ const char *suffix,
int flags
)
{
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn
+ const char *dn,
+ const char *ndn
)
{
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
Backend *be,
Connection *conn,
Operation *op,
- char *reqoid,
+ const char *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
LDAPControl *** rspctrls,
- char** text,
+ const char** text,
struct berval *** refs
)
{
return (exop_table[i].extended)(
be, conn, op,
reqoid, reqdata,
- rspoid, rspdata, rspctrls, text, refs );
+ rspoid, rspdata, rspctrls,
+ text, refs );
}
}
extern int ldbm_back_db_destroy LDAP_P(( BackendDB *bd ));
extern int ldbm_back_db_config LDAP_P(( BackendDB *bd,
- const char *fname, int lineno, int argc, char **argv ));
+ const char *fname, int lineno,
+ int argc, char **argv ));
extern int ldbm_back_extended LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *reqoid,
+ const char *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
LDAPControl *** rspctrls,
- char **text,
+ const char **text,
struct berval *** refs ));
extern int ldbm_back_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int ldbm_back_unbind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op ));
extern int ldbm_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
#ifdef SLAPD_SCHEMA_NOT_COMPAT
extern int ldbm_back_compare LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, AttributeAssertion *ava ));
+ const char *dn, const char *ndn,
+ AttributeAssertion *ava ));
#else
extern int ldbm_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn,
+ Ava *ava ));
#endif
extern int ldbm_back_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Modifications *ml ));
+ const char *dn, const char *ndn, Modifications *ml ));
extern int ldbm_back_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char* newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char* newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int ldbm_back_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int ldbm_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
extern int ldbm_back_abandon LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, ber_int_t msgid ));
#ifdef SLAPD_SCHEMA_NOT_COMPAT
extern int ldbm_back_group LDAP_P(( BackendDB *bd,
- Entry *target, const char* gr_ndn, const char* op_ndn,
+ Entry *target,
+ const char* gr_ndn, const char* op_ndn,
const char* objectclassValue,
AttributeDescription* group_at));
#else
extern int ldbm_back_group LDAP_P(( BackendDB *bd,
- Entry *target, const char* gr_ndn, const char* op_ndn,
- const char* objectclassValue, const char* group_at));
+ Entry *target,
+ const char* gr_ndn, const char* op_ndn,
+ const char* objectclassValue,
+ const char* group_at));
#endif
AttributeDescription* desc,
struct berval **bv, ID id, int op ));
#else
-extern int ldbm_tool_index_attr LDAP_P(( BackendDB *be, char* type ));
-extern int ldbm_tool_index_change LDAP_P(( BackendDB *be, char* type,
+extern int ldbm_tool_index_attr LDAP_P(( BackendDB *be,
+ char* type ));
+extern int ldbm_tool_index_change LDAP_P(( BackendDB *be,
+ char* type,
struct berval **bv, ID id, int op ));
#endif
extern int ldbm_tool_sync LDAP_P(( BackendDB *be ));
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
+ const char *dn,
Modifications *modlist,
Entry *e
)
{
int rc, err;
- char *text;
+ const char *text;
Modification *mod;
Modifications *ml;
Attribute *save_attrs;
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
Modifications *modlist
)
{
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *newrdn,
+ const char *dn,
+ const char *ndn,
+ const char *newrdn,
int deleteoldrdn,
- char *newSuperior
+ const char *newSuperior
)
{
#ifdef SLAPD_SCHEMA_NOT_COMPAT
new_parent_dn = p_dn; /* New Parent unless newSuperior given */
- if ( (np_dn = newSuperior) != NULL) {
+ if ( newSuperior != NULL ) {
Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: new parent requested...\n",
- 0, 0, 0 );
+ "ldbm_back_modrdn: new parent \"%s\" requested...\n",
+ newSuperior, 0, 0 );
+ np_dn = ch_strdup( newSuperior );
np_ndn = ch_strdup( np_dn );
(void) dn_normalize( np_ndn );
Backend *be,
Connection *conn,
Operation *op,
- char *reqoid,
+ const char *reqoid,
struct berval *reqdata,
- char **rspoid,
+ char **rspoid,
struct berval **rspdata,
- LDAPControl *** rspctrls,
- char** text,
+ LDAPControl *** rspctrls,
+ const char **text,
struct berval *** refs
)
{
Entry *deref_internal_r LDAP_P((
Backend *be,
Entry *e,
- char *dn,
+ const char *dn,
int *err,
Entry **matched,
- char **text ));
+ const char **text ));
#define deref_entry_r( be, e, err, matched, text ) \
deref_internal_r( be, e, NULL, err, matched, text )
* attr.c
*/
-void attr_mask LDAP_P(( struct ldbminfo *li, char *type, int *indexmask ));
+void attr_mask LDAP_P(( struct ldbminfo *li, const char *type, int *indexmask ));
void attr_index_config LDAP_P(( struct ldbminfo *li,
const char *fname, int lineno,
int argc, char **argv, int init ));
*/
DBCache * ldbm_cache_open LDAP_P(( Backend *be,
- char *name, char *suffix, int flags ));
+ const char *name, const char *suffix, int flags ));
void ldbm_cache_close LDAP_P(( Backend *be, DBCache *db ));
void ldbm_cache_really_close LDAP_P(( Backend *be, DBCache *db ));
void ldbm_cache_flush_all LDAP_P(( Backend *be ));
char *type, int indextype, char *val ));
/* Possible operations supported (op) by index_change_values() */
int index_change_values LDAP_P(( Backend *be,
- char *type,
- struct berval **vals,
- ID id,
- unsigned int op ));
+ char *type, struct berval **vals,
+ ID id, unsigned int op ));
/*
* passwd.c
*/
extern int ldbm_back_exop_passwd LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *reqoid,
+ const char *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
LDAPControl ***rspctrls,
- char **text,
+ const char **text,
struct berval *** refs ));
/* returns LDAP error code indicating error OR SLAPD_ABANDON */
int ldbm_modify_internal LDAP_P((Backend *be,
Connection *conn, Operation *op,
- char *dn, Modifications *mods, Entry *e ));
+ const char *dn, Modifications *mods, Entry *e ));
#ifdef HAVE_CYRUS_SASL
/*
Backend *be,
Connection *conn,
Operation *op,
- char *base,
- char *nbase,
+ const char *base,
+ const char *nbase,
int scope,
int deref,
int slimit,
int tlimit,
Filter *filter,
- char *filterstr,
+ const char *filterstr,
char **attrs,
int attrsonly
)
{
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
int rc, err;
- char *text;
+ const char *text;
time_t stoptime;
ID_BLOCK *candidates;
ID id, cursor;
if ( deref & LDAP_DEREF_SEARCHING && is_entry_alias( e ) ) {
Entry *matched;
int err;
- char *text;
+ const char *text;
e = deref_entry_r( be, e, &err, &matched, &text );
}
#endif
- result = send_search_entry(be,
- conn,
- op,
- e,
- attrs,
- attrsonly,
- NULL);
+ result = send_search_entry(be, conn, op,
+ e, attrs, attrsonly, NULL);
#ifdef BROKEN_NUM_SUBORDINATES
if (idl)
extern int passwd_back_initialize LDAP_P(( BackendInfo *bi ));
extern int passwd_back_search LDAP_P(( BackendDB *be,
- Connection *c, Operation *o, char *base,
- char *nbase, int scope, int deref, int slimit, int tlimit,
- Filter *f, char *filterstr, char **attrs, int attrsonly));
+ Connection *c, Operation *o,
+ const char *base, const char *nbase,
+ int scope, int deref, int slimit, int tlimit,
+ Filter *f, const char *filterstr,
+ char **attrs, int attrsonly));
extern int passwd_back_db_config LDAP_P((BackendDB *bd,
const char *fname, int lineno, int argc, char **argv ));
Backend *be,
Connection *conn,
Operation *op,
- char *base,
- char *nbase,
+ const char *base,
+ const char *nbase,
int scope,
int deref,
int slimit,
int tlimit,
Filter *filter,
- char *filterstr,
+ const char *filterstr,
char **attrs,
int attrsonly
)
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
int method,
- char *mech,
struct berval *cred,
char** edn
)
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
Ava *ava
)
{
PerlBackend *perl_back = (PerlBackend *)be->be_private;
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "not yet implemented", NULL, NULL );
+ NULL, "not supported", NULL, NULL );
#ifdef notdef
ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn
+ const char *dn,
+ const char *ndn
)
{
int len;
extern int perl_back_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int perl_back_unbind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op ));
extern int perl_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
extern int perl_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn,
+ Ava *ava ));
extern int perl_back_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Modifications *ml ));
+ const char *dn, const char *ndn,
+ Modifications *ml ));
extern int perl_back_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char*newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int perl_back_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int perl_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
LDAP_END_DECL
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
LDAPModList *modlist
)
{
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *newrdn,
+ const char *dn,
+ const char *ndn,
+ const char *newrdn,
int deleteoldrdn,
- char *newSuperior
+ const char *newSuperior
)
{
int len;
Backend *be,
Connection *conn,
Operation *op,
- char *base,
- char *nbase,
+ const char *base,
+ const char *nbase,
int scope,
int deref,
int sizelimit,
int timelimit,
Filter *filter,
- char *filterstr,
+ const char *filterstr,
char **attrs,
int attrsonly
)
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
int method,
- char *mech,
struct berval *cred,
char **edn
)
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
Ava *ava
)
{
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn
+ const char *dn,
+ const char *ndn
)
{
struct shellinfo *si = (struct shellinfo *) be->be_private;
extern int shell_back_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int shell_back_unbind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op ));
extern int shell_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
extern int shell_back_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn,
+ Ava *ava ));
extern int shell_back_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Modifications *ml ));
+ const char *dn, const char *ndn,
+ Modifications *ml ));
extern int shell_back_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char*newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int shell_back_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int shell_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
extern int shell_back_abandon LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, int msgid ));
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
+ const char *dn,
+ const char *ndn,
LDAPModList *ml
)
{
Backend *be,
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *newrdn,
+ const char *dn,
+ const char *ndn,
+ const char *newrdn,
int deleteoldrdn,
- char *newSuperior
+ const char *newSuperior
)
{
struct shellinfo *si = (struct shellinfo *) be->be_private;
Backend *be,
Connection *conn,
Operation *op,
- char *base,
- char *nbase,
+ const char *base,
+ const char *nbase,
int scope,
int deref,
int size,
int time,
Filter *filter,
- char *filterstr,
+ const char *filterstr,
char **attrs,
int attrsonly
)
#include "sql-wrap.h"
int backsql_bind(Backend *be,Connection *conn,Operation *op,
- char *dn,char *ndn,int method,char *mech,struct berval *cred,char** edn)
+ char *dn,char *ndn,int method,struct berval *cred,char** edn)
{
Debug(LDAP_DEBUG_TRACE,"==>backsql_bind()\n",0,0,0);
//for now, just return OK, allowing to test modify operations
return 0;
}
-#endif /* SLAPD_SQL */
\ No newline at end of file
+#endif /* SLAPD_SQL */
extern int backsql_bind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, int method, char* mech,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
extern int backsql_unbind LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op ));
extern int backsql_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, char *filterstr, char **attrs, int attrsonly ));
+ Connection *conn, Operation *op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter *filter, const char *filterstr,
+ char **attrs, int attrsonly ));
extern int backsql_compare LDAP_P((BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, Ava *ava ));
+ const char *dn, const char *ndn,
+ Ava *ava ));
extern int backsql_modify LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, LDAPModList *ml ));
+ const char *dn, const char *ndn,
+ LDAPModList *ml ));
extern int backsql_modrdn LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op,
- char *dn, char *ndn, char*newrdn, int deleteoldrdn,
- char *newSuperior ));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior ));
extern int backsql_add LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, Entry *e ));
extern int backsql_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, char *dn, char *ndn ));
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn ));
extern int backsql_abandon LDAP_P(( BackendDB *bd,
Connection *conn, Operation *op, int msgid ));
extern int tcl_back_bind LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op,
- char *dn, char *ndn, int method, char *mech,
+ const char *dn, const char *ndn, int method,
struct berval * cred, char **edn));
extern int tcl_back_unbind LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op));
extern int tcl_back_search LDAP_P ((BackendDB * bd,
- Connection * conn, Operation * op, char *base,
- char *nbase, int scope, int deref, int sizelimit, int timelimit,
- Filter * filter, char *filterstr, char **attrs, int attrsonly));
+ Connection * conn, Operation * op,
+ const char *base, const char *nbase,
+ int scope, int deref, int sizelimit, int timelimit,
+ Filter * filter, const char *filterstr,
+ char **attrs, int attrsonly));
extern int tcl_back_compare LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op,
- char *dn, char *ndn, Ava * ava));
+ const char *dn, const char *ndn,
+ Ava * ava));
extern int tcl_back_modify LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op,
- char *dn, char *ndn, Modifications * ml));
+ const char *dn, const char *ndn,
+ Modifications * ml));
extern int tcl_back_modrdn LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op,
- char *dn, char *ndn, char *newrdn, int deleteoldrdn,
- char *newSuperior));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior));
extern int tcl_back_add LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op, Entry * e));
extern int tcl_back_delete LDAP_P ((BackendDB * bd,
- Connection * conn, Operation * op, char *dn, char *ndn));
+ Connection * conn, Operation * op,
+ const char *dn, const char *ndn));
extern int tcl_back_abandon LDAP_P ((BackendDB * bd,
Connection * conn, Operation * op, int msgid));
Backend *be,
Connection *conn,
Operation *op,
- char **text )
+ const char **text )
{
LDAPControl **ctrls;
ctrls = op->o_ctrls;
char *ndn;
ber_tag_t tag;
int rc = LDAP_SUCCESS;
- char *text;
+ const char *text;
struct berval cred;
Backend *be;
ndn = suffix_alias( be, ndn );
ret = (*be->be_bind)( be, conn, op, dn, ndn,
- method, mech, &cred, &edn );
+ method, &cred, &edn );
if ( ret == 0 ) {
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
}
-char *
-charray2str( char **a )
-{
- char *s;
- int i;
- size_t cur, len = 0;
-
- if( a == NULL ) return NULL;
-
- for( i=0 ; a[i] != NULL ; i++ ) {
- len += strlen( a[i] );
- }
-
- if( len == 0 ) return NULL;
-
- s = ch_malloc( len + 1 );
-
- cur = 0;
- for( i=0 ; a[i] != NULL ; i++ ) {
- len = strlen( a[i] );
- strncpy( &s[cur], a[i], len );
- cur += len;
- }
- s[len] = '\0';
- return s;
-}
-
-
char **
str2charray( const char *str_in, const char *brkstr )
{
#endif
Backend *be;
int rc = LDAP_SUCCESS;
- char *text = NULL;
+ const char *text = NULL;
desc.bv_val = NULL;
value.bv_val = NULL;
int
config_info(
- Entry **entry, char **text )
+ Entry **entry, const char **text )
{
Entry *e;
char buf[BUFSIZ];
/* don't listen on this port anymore */
slapd_clr_read( ber_pvt_sb_get_desc( c->c_sb ), 1 );
- /* shutdown I/O -- not yet implemented */
-
/* abandon active operations */
connection_abandon( c );
static int sockinit(void);
static int sockdestroy(void);
-int slapd_daemon_init( char *urls )
+int slapd_daemon_init( const char *urls )
{
int i, rc;
char **u;
Operation *op
)
{
- char *dn, *ndn = NULL, *text;
+ char *dn, *ndn = NULL;
+ const char *text;
Backend *be;
int rc;
char * dn_rdn(
Backend *be,
- char *dn )
+ const char *dn_in )
{
- char *s;
+ char *dn, *s;
int inquote;
- if( dn == NULL ) {
+ if( dn_in == NULL ) {
return NULL;
}
- while(*dn && ASCII_SPACE(*dn)) {
+ while(*dn_in && ASCII_SPACE(*dn_in)) {
dn++;
}
- if( *dn == '\0' ) {
+ if( *dn_in == '\0' ) {
return( NULL );
}
- if ( be != NULL && be_issuffix( be, dn ) ) {
+ if ( be != NULL && be_issuffix( be, dn_in ) ) {
return( NULL );
}
- dn = ch_strdup( dn );
+ dn = ch_strdup( dn_in );
inquote = 0;
int
dn_issuffix(
- char *dn,
- char *suffix
+ const char *dn,
+ const char *suffix
)
{
int dnlen, suffixlen;
*/
static char *
-get_next_substring( char * s, char d )
+get_next_substring( const char * s, char d )
{
char *str, *r;
* memory. The returned string will be null-terminated.
*/
-char * rdn_attr_type( char * s )
+char * rdn_attr_type( const char * s )
{
return get_next_substring( s, '=' );
*/
char *
-rdn_attr_value( char * rdn )
+rdn_attr_value( const char * rdn )
{
- char *str;
+ const char *str;
if ( (str = strchr( rdn, '=' )) != NULL ) {
struct berval *vals[2];
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *ad;
- char *text;
+ const char *text;
#else
int nvals = 0;
int maxvals = 0;
ber_tag_t tag;
ber_len_t len;
extop_list_t *ext;
- char *text;
+ const char *text;
struct berval **refs;
char *rspoid;
struct berval *rspdata;
BerElement *ber,
Filter **f,
char **fstr,
- char **text );
+ const char **text );
+
static int get_substring_filter(
Connection *conn,
BerElement *ber,
Filter *f,
char **fstr,
- char **text );
+ const char **text );
int
get_filter(
BerElement *ber,
Filter **filt,
char **fstr,
- char **text )
+ const char **text )
{
ber_tag_t tag;
ber_len_t len;
}
static int
-get_filter_list( Connection *conn, BerElement *ber, Filter **f, char **fstr, char **text )
+get_filter_list( Connection *conn, BerElement *ber,
+ Filter **f, char **fstr,
+ const char **text )
{
Filter **new;
int err;
BerElement *ber,
Filter *f,
char **fstr,
- char **text
+ const char **text
)
{
ber_tag_t tag;
struct berval *value;
char *last;
struct berval type;
-#ifndef SLAPD_SCHEMA_NOT_COMPAT
- int syntax;
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
struct berval *nvalue;
+#else
+ int syntax;
#endif
*text = "error decoding filter";
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT;
tag = ber_next_element( ber, &len, last ) )
{
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
unsigned usage;
+#endif
rc = ber_scanf( ber, "O", &value );
if ( rc == LBER_ERROR ) {
ldap_pvt_thread_mutex_t entry2str_mutex;
ldap_pvt_thread_mutex_t replog_mutex;
-static char* slap_name = NULL;
+static const char* slap_name = NULL;
int slapMode = SLAP_UNDEFINED_MODE;
static ldap_pvt_thread_mutex_t currenttime_mutex;
int
-slap_init( int mode, char *name )
+slap_init( int mode, const char *name )
{
int rc;
Modifications *mods = NULL;
Backend *be;
int rc;
- char *text;
+ const char *text;
Debug( LDAP_DEBUG_TRACE, "do_modify\n", 0, 0, 0 );
{
int update = be->be_update_ndn != NULL;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
- char *text;
+ const char *text;
rc = slap_modlist2mods( modlist, update, &mods, &text );
if( rc != LDAP_SUCCESS ) {
LDAPModList *ml,
int update,
Modifications **mods,
- char **text )
+ const char **text )
{
int rc;
Modifications **modtail = mods;
int slap_mods_opattrs(
Operation *op,
Modifications **modtail,
- char **text )
+ const char **text )
{
struct berval name, timestamp;
time_t now = slap_get_time();
Backend *newSuperior_be = NULL;
ber_len_t length;
int rc;
- char *text;
+ const char *text;
Debug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 );
int
monitor_info(
Entry **entry,
- char **text )
+ const char **text )
{
Entry *e;
char buf[BUFSIZ];
NULL
};
-#endif
/*
return at->sat_no_user_mod;
#endif
}
+#endif
struct oindexrec {
int passwd_extop(
SLAP_EXTOP_CALLBACK_FN ext_callback,
Connection *conn, Operation *op,
- char *reqoid,
+ const char *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
LDAPControl ***rspctrls,
- char **text,
+ const char **text,
struct berval ***refs )
{
int rc;
struct berval **id,
struct berval **oldpass,
struct berval **newpass,
- char **text )
+ const char **text )
{
int rc = LDAP_SUCCESS;
ber_tag_t tag;
LIBSLAPD_F (int) slap_str2ad LDAP_P((
const char *,
AttributeDescription **ad,
- char **text ));
+ const char **text ));
LIBSLAPD_F (int) slap_bv2ad LDAP_P((
struct berval *bv,
AttributeDescription **ad,
- char **text ));
+ const char **text ));
LIBSLAPD_F (AttributeDescription *) ad_dup LDAP_P((
AttributeDescription *desc ));
BerElement *ber,
AttributeAssertion **ava,
unsigned usage,
- char **text ));
+ const char **text ));
LIBSLAPD_F (void) ava_free LDAP_P((
AttributeAssertion *ava,
int freeit ));
LIBSLAPD_F (int) get_ava LDAP_P((
BerElement *ber,
Ava *ava,
- char **text ));
+ const char **text ));
LIBSLAPD_F (void) ava_free LDAP_P(( Ava *ava, int freeit ));
#endif
Backend *be,
Connection *conn,
Operation *op,
- char **text ));
+ const char **text ));
LIBSLAPD_F (int) backend_connection_init LDAP_P((Connection *conn));
LIBSLAPD_F (int) backend_connection_destroy LDAP_P((Connection *conn));
LIBSLAPD_F (int) charray_inlist LDAP_P(( char **a, const char *s ));
LIBSLAPD_F (char **) charray_dup LDAP_P(( char **a ));
LIBSLAPD_F (char **) str2charray LDAP_P(( const char *str, const char *brkstr ));
-LIBSLAPD_F (char *) charray2str LDAP_P(( char **a ));
/*
* controls.c
LIBSLAPD_F (char *) dn_normalize LDAP_P(( char *dn ));
LIBSLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn ));
LIBSLAPD_F (char **) dn_subtree LDAP_P(( Backend *be, const char *dn ));
-LIBSLAPD_F (char *) dn_rdn LDAP_P(( Backend *be, char *dn ));
-LIBSLAPD_F (int) dn_issuffix LDAP_P(( char *dn, char *suffix ));
+LIBSLAPD_F (char *) dn_rdn LDAP_P(( Backend *be, const char *dn ));
+LIBSLAPD_F (int) dn_issuffix LDAP_P(( const char *dn, const char *suffix ));
LIBSLAPD_F (int) rdn_validate LDAP_P(( const char* str ));
-LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( char * rdn ));
-LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( char * rdn ));
+LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( const char * rdn ));
+LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( const char * rdn ));
LIBSLAPD_F (void) build_new_dn LDAP_P(( char ** new_dn,
const char *e_dn,
typedef int (*SLAP_EXTOP_MAIN_FN) LDAP_P((
SLAP_EXTOP_CALLBACK_FN,
Connection *conn, Operation *op,
- char * reqoid,
+ const char * reqoid,
struct berval * reqdata,
char ** rspoid,
struct berval ** rspdata,
LDAPControl *** rspctrls,
- char ** text,
+ const char ** text,
struct berval *** refs ));
typedef int (*SLAP_EXTOP_GETOID_FN) LDAP_P((
BerElement *ber,
Filter **filt,
char **fstr,
- char **text ));
+ const char **text ));
LIBSLAPD_F (void) filter_free LDAP_P(( Filter *f ));
LIBSLAPD_F (void) filter_print LDAP_P(( Filter *f ));
* filterentry.c
*/
-LIBSLAPD_F (int) test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e, Filter *f ));
+LIBSLAPD_F (int) test_filter LDAP_P((
+ Backend *be, Connection *conn, Operation *op, Entry *e, Filter *f ));
/*
* lock.c
LDAPModList *ml,
int update,
Modifications **mods,
- char **text );
+ const char **text );
LIBSLAPD_F( int ) slap_mods_opattrs(
Operation *op,
Modifications **modlist,
- char **text );
+ const char **text );
#endif
/*
LIBSLAPD_F (char *) supportedControls[];
LIBSLAPD_F (int) monitor_info LDAP_P((
- Entry **entry, char **text ));
+ Entry **entry, const char **text ));
/*
* operation.c
Connection *conn, Operation *op,
ber_int_t err, const char *matched,
const char *text, struct berval **refs,
- char *rspoid, struct berval *rspdata,
+ const char *rspoid, struct berval *rspdata,
LDAPControl **ctrls ));
LIBSLAPD_F (void) send_ldap_partial LDAP_P((
Connection *conn, Operation *op,
- char *rspoid, struct berval *rspdata,
+ const char *rspoid, struct berval *rspdata,
LDAPControl **ctrls ));
LIBSLAPD_F (void) send_search_result LDAP_P((
LIBSLAPD_F (int) sasl_destroy(void);
LIBSLAPD_F (int) sasl_errldap LDAP_P(( int ));
LIBSLAPD_F (int) sasl_bind LDAP_P((
- Connection *, Operation *,
- char *, char *, char *, struct berval *, char **));
-
+ Connection *conn, Operation *op,
+ const char *dn, const char *ndn,
+ const char *mech, struct berval *cred,
+ char **edn ));
/* oc.c */
LIBSLAPD_F (int) oc_schema_info( Entry *e );
* schema.c
*/
+#ifndef SLAPD_SCHEMA_NOT_COMPAT
LIBSLAPD_F (int) oc_check_op_attr LDAP_P(( const char *type ));
LIBSLAPD_F (int) oc_check_op_usermod_attr LDAP_P(( const char *type ));
LIBSLAPD_F (int) oc_check_op_no_usermod_attr LDAP_P(( const char *type ));
+#endif
LIBSLAPD_F (ObjectClass *) oc_find LDAP_P((const char *ocname));
LIBSLAPD_F (int) oc_add LDAP_P((LDAP_OBJECT_CLASS *oc, const char **err));
slap_mr_indexer_func *indexer,
slap_mr_filter_func *filter ));
-LIBSLAPD_F (int) schema_info LDAP_P(( Entry **entry, char **text ));
+LIBSLAPD_F (int) schema_info LDAP_P(( Entry **entry, const char **text ));
#ifdef SLAPD_SCHEMA_NOT_COMPAT
LIBSLAPD_F (int) is_entry_objectclass LDAP_P((
*/
LIBSLAPD_F (int) entry_schema_check LDAP_P((
Entry *e, Attribute *attrs,
- char** text ));
+ const char** text ));
/*
LIBSLAPD_F (int) starttls_extop LDAP_P((
SLAP_EXTOP_CALLBACK_FN,
Connection *conn, Operation *op,
- char * reqoid,
+ const char * reqoid,
struct berval * reqdata,
char ** rspoid,
struct berval ** rspdata,
LDAPControl ***rspctrls,
- char ** text,
+ const char ** text,
struct berval *** refs ));
unsigned usage,
struct berval *in,
struct berval **out,
- char ** text ));
+ const char ** text ));
LIBSLAPD_F (int) value_match LDAP_P((
AttributeDescription *ad,
MatchingRule *mr,
struct berval *v1,
struct berval *v2,
- char ** text ));
+ const char ** text ));
LIBSLAPD_F (int) value_find LDAP_P((
AttributeDescription *ad,
MatchingRule *mr,
struct berval **values,
struct berval *value,
- char ** text ));
+ const char ** text ));
#else
LIBSLAPD_F (int) value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals, int naddvals, int *maxvals ));
LIBSLAPD_F (void) value_normalize LDAP_P(( char *s, int syntax ));
LIBSLAPD_F (int) passwd_extop LDAP_P((
SLAP_EXTOP_CALLBACK_FN,
Connection *conn, Operation *op,
- char * reqoid,
+ const char * reqoid,
struct berval * reqdata,
char ** rspoid,
struct berval ** rspdata,
LDAPControl *** rspctrls,
- char ** text,
+ const char ** text,
struct berval *** refs ));
LIBSLAPD_F (int) slap_passwd_check(
struct berval **id,
struct berval **oldpass,
struct berval **newpass,
- char **text );
+ const char **text );
/*
* kerberos.c
LIBSLAPD_F (AccessControl *) global_acl;
-LIBSLAPD_F (int) slap_init LDAP_P((int mode, char* name));
+LIBSLAPD_F (int) slap_init LDAP_P((int mode, const char* name));
LIBSLAPD_F (int) slap_startup LDAP_P(( Backend *be ));
LIBSLAPD_F (int) slap_shutdown LDAP_P(( Backend *be ));
LIBSLAPD_F (int) slap_destroy LDAP_P((void));
struct sockaddr_in;
-LIBSLAPD_F (int) slapd_daemon_init( char *urls );
+LIBSLAPD_F (int) slapd_daemon_init( const char *urls );
LIBSLAPD_F (int) slapd_daemon_destroy(void);
LIBSLAPD_F (int) slapd_daemon(void);
LIBSLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig));
LIBSLAPD_F (int) config_info LDAP_P((
- Entry **e, char **text ));
+ Entry **e, const char **text ));
LIBSLAPD_F (int) root_dse_info LDAP_P((
- Entry **e, char **text ));
+ Entry **e, const char **text ));
LIBSLAPD_F (int) do_abandon LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_add LDAP_P((Connection *conn, Operation *op));
const char *matched,
const char *text,
struct berval **refs,
- char *rspoid,
+ const char *rspoid,
struct berval *rspdata,
LDAPControl **ctrls
)
#include "slap.h"
int
-root_dse_info( Entry **entry, char **text )
+root_dse_info( Entry **entry, const char **text )
{
char buf[BUFSIZ];
Entry *e;
int sasl_bind(
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *mech,
+ const char *dn,
+ const char *ndn,
+ const char *mech,
struct berval *cred,
char **edn )
{
int sasl_bind(
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *mech,
+ const char *dn,
+ const char *ndn,
+ const char *mech,
struct berval *cred,
char **edn )
{
#if defined( SLAPD_SCHEMA_DN )
int
-schema_info( Entry **entry, char **text )
+schema_info( Entry **entry, const char **text )
{
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;
attr_merge( e, ad_objectClass, vals );
{
- int rc;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
+ int rc;
AttributeDescription *desc = NULL;
#else
char *desc;
int
entry_schema_check(
- Entry *e, Attribute *oldattrs, char** text )
+ Entry *e, Attribute *oldattrs, const char** text )
{
Attribute *a, *aoc;
ObjectClass *oc;
#endif
#ifdef SLAPD_SCHEMA_NOT_COMPAT
+ /*
+ * All operational attributions are allowed by schema rules.
+ */
if( is_at_operational(at) ) {
return LDAP_SUCCESS;
}
for( i=0; ad_map[i].ssam_name; i++ ) {
int rc;
- char *text;
+ const char *text;
AttributeDescription ** adp = (AttributeDescription **)
&(((char *) &slap_schema)[ad_map[i].ssam_offset]);
char **attrs = NULL;
Backend *be;
int rc;
- char *text;
+ const char *text;
Debug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
Backend *be,
struct slap_conn *conn,
struct slap_op *op,
- char *reqoid,
+ const char *reqoid,
struct berval * reqdata,
char **rspoid,
struct berval ** rspdata,
LDAPControl *** rspctrls,
- char ** text,
+ const char ** text,
struct berval *** refs ));
struct slap_backend_info {
/* LDAP Operations Handling Routines */
int (*bi_op_bind) LDAP_P(( BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *dn, char *ndn, int method, char* mechanism,
+ const char *dn, const char *ndn, int method,
struct berval *cred, char** edn ));
int (*bi_op_unbind) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o ));
int (*bi_op_search) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *base, char *nbase, int scope, int deref,
+ const char *base, const char *nbase,
+ int scope, int deref,
int slimit, int tlimit,
- Filter *f, char *filterstr, char **attrs,
- int attrsonly));
+ Filter *f, const char *filterstr,
+ char **attrs, int attrsonly));
#ifdef SLAPD_SCHEMA_NOT_COMPAT
int (*bi_op_compare)LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *dn, char *ndn, AttributeAssertion *ava));
+ const char *dn, const char *ndn,
+ AttributeAssertion *ava));
#else
int (*bi_op_compare)LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *dn, char *ndn, Ava *ava));
+ const char *dn, const char *ndn,
+ Ava *ava));
#endif
int (*bi_op_modify) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *dn, char *ndn, Modifications *m));
+ const char *dn, const char *ndn, Modifications *m));
int (*bi_op_modrdn) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *dn, char *ndn, char *newrdn, int deleteoldrdn,
- char *newSuperior));
+ const char *dn, const char *ndn,
+ const char *newrdn, int deleteoldrdn,
+ const char *newSuperior));
int (*bi_op_add) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
Entry *e));
int (*bi_op_delete) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- char *dn, char *ndn));
+ const char *dn, const char *ndn));
int (*bi_op_abandon) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
ber_int_t msgid));
int (*bi_tool_index_attr) LDAP_P(( BackendDB *be,
char* type ));
int (*bi_tool_index_change) LDAP_P(( BackendDB *be,
- char* type, struct berval **bv, ID id, int op ));
+ char* type,
+ struct berval **bv, ID id, int op ));
#endif
int (*bi_tool_sync) LDAP_P(( BackendDB *be ));
SLAP_EXTOP_CALLBACK_FN cb,
Connection *conn,
Operation *op,
- char * reqoid,
+ const char * reqoid,
struct berval * reqdata,
char ** rspoid,
struct berval ** rspdata,
LDAPControl ***rspctrls,
- char ** text,
+ const char ** text,
struct berval *** refs )
{
void *ctx;
char *value, savechar;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
int rc;
- char *text;
+ const char *text;
#endif
Debug( LDAP_DEBUG_FILTER, "str2simple \"%s\"\n", str, 0, 0 );
const char *matched,
const char *text,
struct berval **refs,
- char *rspoid,
+ const char *rspoid,
struct berval *rspdata,
LDAPControl **ctrls
)
int sasl_bind(
Connection *conn,
Operation *op,
- char *dn,
- char *ndn,
- char *mech,
+ const char *dn,
+ const char *ndn,
+ const char *mech,
struct berval *cred,
char **edn)
{
if( !noschemacheck ) {
/* check schema */
- char *text;
+ const char *text;
if ( entry_schema_check( e, NULL, &text ) != LDAP_SUCCESS ) {
fprintf( stderr, "%s: dn=\"%s\" (line=%d): %s\n",
progname, e->e_dn, lineno, text );
char *type;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *desc;
- char *text;
+ const char *text;
#else
char *desc;
#endif
unsigned usage,
struct berval *in,
struct berval **out,
- char **text )
+ const char **text )
{
int rc;
MatchingRule *mr;
MatchingRule *mr,
struct berval *v1, /* (unnormalized) stored value */
struct berval *v2, /* (normalized) asserted value */
- char ** text )
+ const char ** text )
{
/* not yet implemented */
return 0;
MatchingRule *mr,
struct berval **vals,
struct berval *val,
- char ** text )
+ const char ** text )
#else
int
value_find(