Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lukas However
OpenLDAP
Commits
23efa07a
Commit
23efa07a
authored
Aug 24, 2002
by
Kurt Zeilenga
Browse files
use ldap_charray_*() instead of charray_*()
parent
c67781d0
Changes
14
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/attr.c
View file @
23efa07a
...
...
@@ -67,7 +67,7 @@ bdb_attr_index_config(
char
**
attrs
;
char
**
indexes
=
NULL
;
attrs
=
str2charray
(
argv
[
0
],
","
);
attrs
=
ldap_
str2charray
(
argv
[
0
],
","
);
if
(
attrs
==
NULL
)
{
fprintf
(
stderr
,
"%s: line %d: "
...
...
@@ -77,7 +77,7 @@ bdb_attr_index_config(
}
if
(
argc
>
1
)
{
indexes
=
str2charray
(
argv
[
1
],
","
);
indexes
=
ldap_
str2charray
(
argv
[
1
],
","
);
if
(
indexes
==
NULL
)
{
fprintf
(
stderr
,
"%s: line %d: "
...
...
@@ -205,8 +205,8 @@ bdb_attr_index_config(
}
}
charray_free
(
attrs
);
if
(
indexes
!=
NULL
)
charray_free
(
indexes
);
ldap_
charray_free
(
attrs
);
if
(
indexes
!=
NULL
)
ldap_
charray_free
(
indexes
);
return
LDAP_SUCCESS
;
}
...
...
servers/slapd/back-bdb/dn2id.c
View file @
23efa07a
...
...
@@ -744,7 +744,7 @@ int bdb_build_tree(
rdns
=
ldap_explode_dn
(
be
->
be_nsuffix
[
0
].
bv_val
,
0
);
for
(
i
=
0
;
rdns
[
i
];
i
++
);
bdb
->
bi_nrdns
=
i
;
charray_free
(
rdns
);
ldap_
charray_free
(
rdns
);
DBTzero
(
&
key
);
DBTzero
(
&
data
);
...
...
@@ -938,7 +938,7 @@ bdb_dn2id_matched(
for
(
i
=
0
;
rdns
[
i
];
i
++
);
i
-=
bdb
->
bi_nrdns
;
if
(
i
<
0
)
{
charray_free
(
rdns
);
ldap_
charray_free
(
rdns
);
return
-
1
;
}
n
=
p
;
...
...
@@ -951,7 +951,7 @@ bdb_dn2id_matched(
p
=
n
;
}
ldap_pvt_thread_rdwr_runlock
(
&
bdb
->
bi_tree_rdwr
);
charray_free
(
rdns
);
ldap_
charray_free
(
rdns
);
if
(
n
)
{
*
id
=
n
->
i_id
;
...
...
servers/slapd/back-dnssrv/referral.c
View file @
23efa07a
...
...
@@ -65,7 +65,7 @@ dnssrv_back_referrals(
goto
done
;
}
hosts
=
str2charray
(
hostlist
,
" "
);
hosts
=
ldap_
str2charray
(
hostlist
,
" "
);
if
(
hosts
==
NULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: str2charrary error
\n
"
,
0
,
0
,
0
);
...
...
@@ -103,7 +103,7 @@ dnssrv_back_referrals(
done:
if
(
domain
!=
NULL
)
ch_free
(
domain
);
if
(
hostlist
!=
NULL
)
ch_free
(
hostlist
);
if
(
hosts
!=
NULL
)
charray_free
(
hosts
);
if
(
hosts
!=
NULL
)
ldap_
charray_free
(
hosts
);
ber_bvarray_free
(
urls
);
return
rc
;
}
servers/slapd/back-dnssrv/search.c
View file @
23efa07a
...
...
@@ -63,7 +63,7 @@ dnssrv_back_search(
goto
done
;
}
hosts
=
str2charray
(
hostlist
,
" "
);
hosts
=
ldap_
str2charray
(
hostlist
,
" "
);
if
(
hosts
==
NULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: str2charrary error
\n
"
,
0
,
0
,
0
);
...
...
@@ -225,7 +225,7 @@ dnssrv_back_search(
done:
if
(
domain
!=
NULL
)
ch_free
(
domain
);
if
(
hostlist
!=
NULL
)
ch_free
(
hostlist
);
if
(
hosts
!=
NULL
)
charray_free
(
hosts
);
if
(
hosts
!=
NULL
)
ldap_
charray_free
(
hosts
);
if
(
urls
!=
NULL
)
ber_bvarray_free
(
urls
);
return
0
;
}
servers/slapd/back-ldbm/attr.c
View file @
23efa07a
...
...
@@ -67,7 +67,7 @@ attr_index_config(
char
**
attrs
;
char
**
indexes
=
NULL
;
attrs
=
str2charray
(
argv
[
0
],
","
);
attrs
=
ldap_
str2charray
(
argv
[
0
],
","
);
if
(
attrs
==
NULL
)
{
fprintf
(
stderr
,
"%s: line %d: "
...
...
@@ -77,7 +77,7 @@ attr_index_config(
}
if
(
argc
>
1
)
{
indexes
=
str2charray
(
argv
[
1
],
","
);
indexes
=
ldap_
str2charray
(
argv
[
1
],
","
);
if
(
indexes
==
NULL
)
{
fprintf
(
stderr
,
"%s: line %d: "
...
...
@@ -206,8 +206,8 @@ attr_index_config(
}
}
charray_free
(
attrs
);
if
(
indexes
!=
NULL
)
charray_free
(
indexes
);
ldap_
charray_free
(
attrs
);
if
(
indexes
!=
NULL
)
ldap_
charray_free
(
indexes
);
return
LDAP_SUCCESS
;
}
...
...
servers/slapd/back-shell/shell.h
View file @
23efa07a
...
...
@@ -32,7 +32,7 @@ extern void make_surrogate_parent LDAP_P(( void ));
#else
/* !SHELL_SURROGATE_PARENT */
typedef
char
**
Cmd_info
;
#define MAKE_CMD_INFO(args) charray_dup( args )
#define MAKE_CMD_INFO(args)
ldap_
charray_dup( args )
#define IS_NULLCMD(cmd) ((cmd) == NULL)
#endif
/* SHELL_SURROGATE_PARENT */
...
...
servers/slapd/backend.c
View file @
23efa07a
...
...
@@ -748,7 +748,7 @@ backend_check_controls(
for
(
;
*
ctrls
!=
NULL
;
ctrls
++
)
{
if
(
(
*
ctrls
)
->
ldctl_iscritical
&&
!
charray_inlist
(
be
->
be_controls
,
(
*
ctrls
)
->
ldctl_oid
)
)
!
ldap_
charray_inlist
(
be
->
be_controls
,
(
*
ctrls
)
->
ldctl_oid
)
)
{
*
text
=
"control unavailable in context"
;
return
LDAP_UNAVAILABLE_CRITICAL_EXTENSION
;
...
...
servers/slapd/daemon.c
View file @
23efa07a
...
...
@@ -95,7 +95,7 @@ static SLPHandle slapd_hslp = 0;
void
slapd_slp_init
(
const
char
*
urls
)
{
int
i
;
slapd_srvurls
=
str2charray
(
urls
,
" "
);
slapd_srvurls
=
ldap_
str2charray
(
urls
,
" "
);
if
(
slapd_srvurls
==
NULL
)
return
;
...
...
@@ -134,7 +134,7 @@ void slapd_slp_init( const char* urls ) {
void
slapd_slp_deinit
()
{
if
(
slapd_srvurls
==
NULL
)
return
;
charray_free
(
slapd_srvurls
);
ldap_
charray_free
(
slapd_srvurls
);
slapd_srvurls
=
NULL
;
/* close the SLP handle */
...
...
@@ -927,7 +927,7 @@ int slapd_daemon_init( const char *urls )
urls
=
"ldap:///"
;
}
u
=
str2charray
(
urls
,
" "
);
u
=
ldap_
str2charray
(
urls
,
" "
);
if
(
u
==
NULL
||
u
[
0
]
==
NULL
)
{
#ifdef NEW_LOGGING
...
...
@@ -958,7 +958,7 @@ int slapd_daemon_init( const char *urls )
Debug
(
LDAP_DEBUG_ANY
,
"daemon_init: no listeners to open (%s)
\n
"
,
urls
,
0
,
0
);
#endif
charray_free
(
u
);
ldap_
charray_free
(
u
);
return
-
1
;
}
...
...
@@ -973,7 +973,7 @@ int slapd_daemon_init( const char *urls )
for
(
n
=
0
,
j
=
0
;
u
[
n
];
n
++
)
{
if
(
slap_open_listener
(
u
[
n
],
&
i
,
&
j
)
)
{
charray_free
(
u
);
ldap_
charray_free
(
u
);
return
-
1
;
}
}
...
...
@@ -992,7 +992,7 @@ int slapd_daemon_init( const char *urls )
slapd_slp_reg
();
#endif
charray_free
(
u
);
ldap_
charray_free
(
u
);
ldap_pvt_thread_mutex_init
(
&
slap_daemon
.
sd_mutex
);
return
!
i
;
}
...
...
servers/slapd/libslapd.dsp
View file @
23efa07a
...
...
@@ -176,10 +176,6 @@ SOURCE=.\ch_malloc.c
# End Source File
# Begin Source File
SOURCE=.\charray.c
# End Source File
# Begin Source File
SOURCE=.\compare.c
# End Source File
# Begin Source File
...
...
servers/slapd/oidm.c
View file @
23efa07a
...
...
@@ -65,7 +65,7 @@ oidm_destroy()
for
(
om
=
om_list
;
om
;
om
=
n
)
{
n
=
om
->
som_next
;
charray_free
(
om
->
som_names
);
ldap_
charray_free
(
om
->
som_names
);
free
(
om
->
som_oid
.
bv_val
);
free
(
om
);
}
...
...
@@ -101,7 +101,7 @@ usage: fprintf( stderr, "\tObjectIdentifier <name> <oid>\n");
om
=
(
OidMacro
*
)
ch_malloc
(
sizeof
(
OidMacro
)
);
om
->
som_names
=
NULL
;
charray_add
(
&
om
->
som_names
,
argv
[
1
]
);
ldap_
charray_add
(
&
om
->
som_names
,
argv
[
1
]
);
om
->
som_oid
.
bv_val
=
oidm_find
(
argv
[
2
]
);
if
(
!
om
->
som_oid
.
bv_val
)
{
...
...
servers/slapd/proto-slap.h
View file @
23efa07a
...
...
@@ -7,6 +7,7 @@
#define PROTO_SLAP_H
#include
<ldap_cdefs.h>
#include
"ldap_pvt.h"
LDAP_BEGIN_DECL
...
...
@@ -257,19 +258,6 @@ LDAP_SLAPD_F (void) ch_free LDAP_P(( void * ));
#endif
#endif
/*
* charray.c
*/
LDAP_SLAPD_F
(
void
)
charray_add
LDAP_P
((
char
***
a
,
const
char
*
s
));
LDAP_SLAPD_F
(
void
)
charray_add_n
LDAP_P
((
char
***
a
,
const
char
*
s
,
int
l
));
LDAP_SLAPD_F
(
void
)
charray_merge
LDAP_P
((
char
***
a
,
char
**
s
));
LDAP_SLAPD_F
(
void
)
charray_free
LDAP_P
((
char
**
array
));
LDAP_SLAPD_F
(
int
)
charray_inlist
LDAP_P
((
char
**
a
,
const
char
*
s
));
LDAP_SLAPD_F
(
char
**
)
charray_dup
LDAP_P
((
char
**
a
));
LDAP_SLAPD_F
(
char
**
)
str2charray
LDAP_P
((
const
char
*
str
,
const
char
*
brkstr
));
LDAP_SLAPD_F
(
int
)
charray_strcmp
LDAP_P
((
const
char
**
a1
,
const
char
**
a2
));
LDAP_SLAPD_F
(
int
)
charray_strcasecmp
LDAP_P
((
const
char
**
a1
,
const
char
**
a2
));
/*
* controls.c
*/
...
...
servers/slapd/root_dse.c
View file @
23efa07a
...
...
@@ -143,7 +143,7 @@ root_dse_info(
vals
[
0
].
bv_len
=
strlen
(
vals
[
0
].
bv_val
);
attr_merge
(
e
,
ad_supportedSASLMechanisms
,
vals
);
}
charray_free
(
supportedSASLMechanisms
);
ldap_
charray_free
(
supportedSASLMechanisms
);
}
if
(
default_referral
!=
NULL
)
{
...
...
servers/slapd/sasl.c
View file @
23efa07a
...
...
@@ -1371,7 +1371,7 @@ char ** slap_sasl_mechs( Connection *conn )
return
NULL
;
}
mechs
=
str2charray
(
mechstr
,
","
);
mechs
=
ldap_
str2charray
(
mechstr
,
","
);
#if SASL_VERSION_MAJOR < 2
ch_free
(
mechstr
);
...
...
servers/slapd/tools/slapadd.c
View file @
23efa07a
...
...
@@ -16,6 +16,7 @@
#include
<lber.h>
#include
<ldif.h>
#include
<lutil.h>
#include
"slapcommon.h"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment