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
Nadezhda Ivanova
OpenLDAP
Commits
09cec1f1
Commit
09cec1f1
authored
Feb 15, 2019
by
Ondřej Kuzník
Browse files
ITS#8731 Apply doc/devel/variadic_debug/03-libldap_Debug.cocci
parent
e1e643ea
Changes
32
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/abandon.c
View file @
09cec1f1
...
...
@@ -68,7 +68,7 @@ ldap_abandon_ext(
{
int
rc
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_abandon_ext %d
\n
"
,
msgid
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_abandon_ext %d
\n
"
,
msgid
);
/* check client controls */
LDAP_MUTEX_LOCK
(
&
ld
->
ld_req_mutex
);
...
...
@@ -98,7 +98,7 @@ ldap_abandon_ext(
int
ldap_abandon
(
LDAP
*
ld
,
int
msgid
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_abandon %d
\n
"
,
msgid
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_abandon %d
\n
"
,
msgid
);
return
ldap_abandon_ext
(
ld
,
msgid
,
NULL
,
NULL
)
==
LDAP_SUCCESS
?
0
:
-
1
;
}
...
...
@@ -130,8 +130,8 @@ do_abandon(
Sockbuf
*
sb
;
LDAPRequest
*
lr
;
Debug
(
LDAP_DEBUG_TRACE
,
"do_abandon origid %d, msgid %d
\n
"
,
origid
,
msgid
,
0
);
Debug
2
(
LDAP_DEBUG_TRACE
,
"do_abandon origid %d, msgid %d
\n
"
,
origid
,
msgid
);
/* find the request that we are abandoning */
start_again:
;
...
...
libraries/libldap/add.c
View file @
09cec1f1
...
...
@@ -210,7 +210,7 @@ ldap_add_ext(
int
rc
;
ber_int_t
id
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_add_ext
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_add_ext
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
assert
(
dn
!=
NULL
);
...
...
libraries/libldap/bind.c
View file @
09cec1f1
...
...
@@ -65,7 +65,7 @@
int
ldap_bind
(
LDAP
*
ld
,
LDAP_CONST
char
*
dn
,
LDAP_CONST
char
*
passwd
,
int
authmethod
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_bind
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_bind
\n
"
);
switch
(
authmethod
)
{
case
LDAP_AUTH_SIMPLE
:
...
...
@@ -106,7 +106,7 @@ ldap_bind_s(
LDAP_CONST
char
*
passwd
,
int
authmethod
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_bind_s
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_bind_s
\n
"
);
switch
(
authmethod
)
{
case
LDAP_AUTH_SIMPLE
:
...
...
libraries/libldap/compare.c
View file @
09cec1f1
...
...
@@ -106,7 +106,7 @@ ldap_compare_ext(
BerElement
*
ber
;
ber_int_t
id
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_compare
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_compare
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
libraries/libldap/cyrus.c
View file @
09cec1f1
...
...
@@ -88,10 +88,10 @@ int ldap_int_sasl_init( void )
sprintf
(
version
,
"%u.%d.%d"
,
(
unsigned
)
rc
>>
24
,
(
rc
>>
16
)
&
0xff
,
rc
&
0xffff
);
Debug
(
LDAP_DEBUG_ANY
,
Debug
1
(
LDAP_DEBUG_ANY
,
"ldap_int_sasl_init: SASL library version mismatch:"
" expected "
SASL_VERSION_STRING
","
" got %s
\n
"
,
version
,
0
,
0
);
" got %s
\n
"
,
version
);
return
-
1
;
}
}
...
...
@@ -338,8 +338,8 @@ ldap_int_sasl_open(
return
ld
->
ld_errno
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_open: host=%s
\n
"
,
host
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_open: host=%s
\n
"
,
host
);
lc
->
lconn_sasl_authctx
=
ctx
;
...
...
@@ -390,8 +390,8 @@ ldap_int_sasl_bind(
int
saslrc
,
rc
;
unsigned
credlen
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_bind: %s
\n
"
,
mechs
?
mechs
:
"<null>"
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_bind: %s
\n
"
,
mechs
?
mechs
:
"<null>"
);
/* do a quick !LDAPv3 check... ldap_sasl_bind will do the rest. */
if
(
ld
->
ld_version
<
LDAP_VERSION3
)
{
...
...
@@ -569,9 +569,9 @@ ldap_int_sasl_bind(
if
(
rc
!=
LDAP_SUCCESS
&&
rc
!=
LDAP_SASL_BIND_IN_PROGRESS
)
{
if
(
scred
)
{
/* and server provided us with data? */
Debug
(
LDAP_DEBUG_TRACE
,
Debug
2
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_bind: rc=%d len=%ld
\n
"
,
rc
,
scred
?
(
long
)
scred
->
bv_len
:
-
1L
,
0
);
rc
,
scred
?
(
long
)
scred
->
bv_len
:
-
1L
);
ber_bvfree
(
scred
);
scred
=
NULL
;
}
...
...
@@ -588,9 +588,8 @@ ldap_int_sasl_bind(
do
{
if
(
!
scred
)
{
/* no data! */
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_bind: no data in step!
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"ldap_int_sasl_bind: no data in step!
\n
"
);
}
saslrc
=
sasl_client_step
(
ctx
,
...
...
@@ -600,8 +599,8 @@ ldap_int_sasl_bind(
(
SASL_CONST
char
**
)
&
ccred
.
bv_val
,
&
credlen
);
Debug
(
LDAP_DEBUG_TRACE
,
"sasl_client_step: %d
\n
"
,
saslrc
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"sasl_client_step: %d
\n
"
,
saslrc
);
if
(
saslrc
==
SASL_INTERACT
)
{
int
res
;
...
...
libraries/libldap/delete.c
View file @
09cec1f1
...
...
@@ -96,7 +96,7 @@ ldap_delete_ext(
BerElement
*
ber
;
ber_int_t
id
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_delete_ext
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_delete_ext
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -160,7 +160,7 @@ ldap_delete( LDAP *ld, LDAP_CONST char *dn )
* DelRequest ::= DistinguishedName,
*/
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_delete
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_delete
\n
"
);
return
ldap_delete_ext
(
ld
,
dn
,
NULL
,
NULL
,
&
msgid
)
==
LDAP_SUCCESS
?
msgid
:
-
1
;
...
...
libraries/libldap/error.c
View file @
09cec1f1
...
...
@@ -33,7 +33,7 @@ ldap_err2string( int err )
{
char
*
m
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_err2string
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_err2string
\n
"
);
switch
(
err
)
{
# define C(code, message) case code: m = message; break
...
...
@@ -249,7 +249,7 @@ ldap_parse_result(
ber_tag_t
tag
;
BerElement
*
ber
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_parse_result
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_parse_result
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
libraries/libldap/extended.c
View file @
09cec1f1
...
...
@@ -105,7 +105,7 @@ ldap_extended_operation(
BerElement
*
ber
;
ber_int_t
id
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_extended_operation
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_extended_operation
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -143,7 +143,7 @@ ldap_extended_operation_s(
int
msgid
;
LDAPMessage
*
res
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_extended_operation_s
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_extended_operation_s
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -194,7 +194,7 @@ ldap_parse_extended_result (
assert
(
LDAP_VALID
(
ld
)
);
assert
(
res
!=
NULL
);
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_parse_extended_result
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_parse_extended_result
\n
"
);
if
(
ld
->
ld_version
<
LDAP_VERSION3
)
{
ld
->
ld_errno
=
LDAP_NOT_SUPPORTED
;
...
...
@@ -318,7 +318,7 @@ ldap_parse_intermediate (
assert
(
LDAP_VALID
(
ld
)
);
assert
(
res
!=
NULL
);
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_parse_intermediate
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_parse_intermediate
\n
"
);
if
(
ld
->
ld_version
<
LDAP_VERSION3
)
{
ld
->
ld_errno
=
LDAP_NOT_SUPPORTED
;
...
...
libraries/libldap/filter.c
View file @
09cec1f1
...
...
@@ -362,7 +362,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
* Note: tags in a CHOICE are always explicit
*/
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter:
\"
%s
\"\n
"
,
str_in
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"put_filter:
\"
%s
\"\n
"
,
str_in
);
freeme
=
LDAP_STRDUP
(
str_in
);
if
(
freeme
==
NULL
)
return
LDAP_NO_MEMORY
;
...
...
@@ -380,8 +380,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
switch
(
*
str
)
{
case
'&'
:
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter: AND
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_filter: AND
\n
"
);
str
=
put_complex_filter
(
ber
,
str
,
LDAP_FILTER_AND
,
0
);
...
...
@@ -394,8 +393,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
break
;
case
'|'
:
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter: OR
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_filter: OR
\n
"
);
str
=
put_complex_filter
(
ber
,
str
,
LDAP_FILTER_OR
,
0
);
...
...
@@ -408,8 +406,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
break
;
case
'!'
:
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter: NOT
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_filter: NOT
\n
"
);
str
=
put_complex_filter
(
ber
,
str
,
LDAP_FILTER_NOT
,
0
);
...
...
@@ -426,8 +423,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
goto
done
;
default:
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter: simple
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_filter: simple
\n
"
);
balance
=
1
;
escape
=
0
;
...
...
@@ -472,8 +468,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
break
;
case
/*'('*/
')'
:
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter: end
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_filter: end
\n
"
);
if
(
ber_printf
(
ber
,
/*"["*/
"]"
)
==
-
1
)
{
rc
=
-
1
;
goto
done
;
...
...
@@ -487,8 +482,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
break
;
default:
/* assume it's a simple type=value filter */
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter: default
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_filter: default
\n
"
);
next
=
strchr
(
str
,
'\0'
);
if
(
put_simple_filter
(
ber
,
str
)
==
-
1
)
{
rc
=
-
1
;
...
...
@@ -518,8 +512,8 @@ put_filter_list( BerElement *ber, char *str, ber_tag_t tag )
char
*
next
=
NULL
;
char
save
;
Debug
(
LDAP_DEBUG_TRACE
,
"put_filter_list
\"
%s
\"\n
"
,
str
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"put_filter_list
\"
%s
\"\n
"
,
str
);
while
(
*
str
)
{
while
(
*
str
&&
LDAP_SPACE
(
(
unsigned
char
)
*
str
)
)
{
...
...
@@ -558,8 +552,8 @@ put_simple_filter(
ber_tag_t
ftype
;
int
rc
=
-
1
;
Debug
(
LDAP_DEBUG_TRACE
,
"put_simple_filter:
\"
%s
\"\n
"
,
str
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"put_simple_filter:
\"
%s
\"\n
"
,
str
);
str
=
LDAP_STRDUP
(
str
);
if
(
str
==
NULL
)
return
-
1
;
...
...
@@ -724,8 +718,8 @@ put_substring_filter( BerElement *ber, char *type, char *val, char *nextstar )
int
gotstar
=
0
;
ber_tag_t
ftype
=
LDAP_FILTER_SUBSTRINGS
;
Debug
(
LDAP_DEBUG_TRACE
,
"put_substring_filter
\"
%s=%s
\"\n
"
,
type
,
val
,
0
);
Debug
2
(
LDAP_DEBUG_TRACE
,
"put_substring_filter
\"
%s=%s
\"\n
"
,
type
,
val
);
if
(
ber_printf
(
ber
,
"t{s{"
/*"}}"*/
,
ftype
,
type
)
==
-
1
)
{
return
-
1
;
...
...
@@ -810,7 +804,7 @@ put_vrFilter( BerElement *ber, const char *str_in )
* (Source: RFC 3876)
*/
Debug
(
LDAP_DEBUG_TRACE
,
"put_vrFilter:
\"
%s
\"\n
"
,
str_in
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"put_vrFilter:
\"
%s
\"\n
"
,
str_in
);
freeme
=
LDAP_STRDUP
(
str_in
);
if
(
freeme
==
NULL
)
return
LDAP_NO_MEMORY
;
...
...
@@ -850,8 +844,7 @@ put_vrFilter( BerElement *ber, const char *str_in )
default:
Debug
(
LDAP_DEBUG_TRACE
,
"put_vrFilter: simple
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_vrFilter: simple
\n
"
);
balance
=
1
;
escape
=
0
;
...
...
@@ -896,8 +889,7 @@ put_vrFilter( BerElement *ber, const char *str_in )
break
;
case
/*'('*/
')'
:
Debug
(
LDAP_DEBUG_TRACE
,
"put_vrFilter: end
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_vrFilter: end
\n
"
);
if
(
ber_printf
(
ber
,
/*"["*/
"]"
)
==
-
1
)
{
rc
=
-
1
;
goto
done
;
...
...
@@ -911,8 +903,7 @@ put_vrFilter( BerElement *ber, const char *str_in )
break
;
default:
/* assume it's a simple type=value filter */
Debug
(
LDAP_DEBUG_TRACE
,
"put_vrFilter: default
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"put_vrFilter: default
\n
"
);
next
=
strchr
(
str
,
'\0'
);
if
(
put_simple_vrFilter
(
ber
,
str
)
==
-
1
)
{
rc
=
-
1
;
...
...
@@ -954,8 +945,8 @@ put_vrFilter_list( BerElement *ber, char *str )
char
*
next
=
NULL
;
char
save
;
Debug
(
LDAP_DEBUG_TRACE
,
"put_vrFilter_list
\"
%s
\"\n
"
,
str
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"put_vrFilter_list
\"
%s
\"\n
"
,
str
);
while
(
*
str
)
{
while
(
*
str
&&
LDAP_SPACE
(
(
unsigned
char
)
*
str
)
)
{
...
...
@@ -988,8 +979,8 @@ put_simple_vrFilter(
ber_tag_t
ftype
;
int
rc
=
-
1
;
Debug
(
LDAP_DEBUG_TRACE
,
"put_simple_vrFilter:
\"
%s
\"\n
"
,
str
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"put_simple_vrFilter:
\"
%s
\"\n
"
,
str
);
str
=
LDAP_STRDUP
(
str
);
if
(
str
==
NULL
)
return
-
1
;
...
...
libraries/libldap/getattr.c
View file @
09cec1f1
...
...
@@ -36,7 +36,7 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **berout )
char
*
attr
;
BerElement
*
ber
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_first_attribute
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_first_attribute
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -98,7 +98,7 @@ ldap_next_attribute( LDAP *ld, LDAPMessage *entry, BerElement *ber )
ber_tag_t
tag
;
char
*
attr
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_next_attribute
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_next_attribute
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -131,7 +131,7 @@ ldap_get_attribute_ber( LDAP *ld, LDAPMessage *entry, BerElement *ber,
ber_tag_t
tag
;
int
rc
=
LDAP_SUCCESS
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_get_attribute_ber
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_get_attribute_ber
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
libraries/libldap/getdn.c
View file @
09cec1f1
...
...
@@ -90,7 +90,7 @@ ldap_get_dn( LDAP *ld, LDAPMessage *entry )
char
*
dn
;
BerElement
tmp
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_get_dn
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_get_dn
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -113,7 +113,7 @@ ldap_get_dn_ber( LDAP *ld, LDAPMessage *entry, BerElement **berout,
ber_len_t
len
=
0
;
int
rc
=
LDAP_SUCCESS
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_get_dn_ber
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_get_dn_ber
\n
"
);
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
...
...
@@ -160,7 +160,7 @@ ldap_dn2ufn( LDAP_CONST char *dn )
{
char
*
out
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_dn2ufn
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_dn2ufn
\n
"
);
(
void
)
ldap_dn_normalize
(
dn
,
LDAP_DN_FORMAT_LDAP
,
&
out
,
LDAP_DN_FORMAT_UFN
);
...
...
@@ -179,7 +179,7 @@ ldap_explode_dn( LDAP_CONST char *dn, int notypes )
int
iRDN
;
unsigned
flag
=
notypes
?
LDAP_DN_FORMAT_UFN
:
LDAP_DN_FORMAT_LDAPV3
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_explode_dn
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_explode_dn
\n
"
);
if
(
ldap_str2dn
(
dn
,
&
tmpDN
,
LDAP_DN_FORMAT_LDAP
)
!=
LDAP_SUCCESS
)
{
...
...
@@ -219,7 +219,7 @@ ldap_explode_rdn( LDAP_CONST char *rdn, int notypes )
const
char
*
p
;
int
iAVA
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_explode_rdn
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_explode_rdn
\n
"
);
/*
* we only parse the first rdn
...
...
@@ -300,7 +300,7 @@ ldap_dn2dcedn( LDAP_CONST char *dn )
{
char
*
out
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_dn2dcedn
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_dn2dcedn
\n
"
);
(
void
)
ldap_dn_normalize
(
dn
,
LDAP_DN_FORMAT_LDAP
,
&
out
,
LDAP_DN_FORMAT_DCE
);
...
...
@@ -313,7 +313,7 @@ ldap_dcedn2dn( LDAP_CONST char *dce )
{
char
*
out
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_dcedn2dn
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_dcedn2dn
\n
"
);
(
void
)
ldap_dn_normalize
(
dce
,
LDAP_DN_FORMAT_DCE
,
&
out
,
LDAP_DN_FORMAT_LDAPV3
);
...
...
@@ -325,7 +325,7 @@ ldap_dn2ad_canonical( LDAP_CONST char *dn )
{
char
*
out
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_dn2ad_canonical
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_dn2ad_canonical
\n
"
);
(
void
)
ldap_dn_normalize
(
dn
,
LDAP_DN_FORMAT_LDAP
,
&
out
,
LDAP_DN_FORMAT_AD_CANONICAL
);
...
...
@@ -356,7 +356,7 @@ ldap_dn_normalize( LDAP_CONST char *dnin,
int
rc
;
LDAPDN
tmpDN
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_dn_normalize
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_dn_normalize
\n
"
);
assert
(
dnout
!=
NULL
);
...
...
@@ -708,7 +708,7 @@ ldap_bv2dn_x( struct berval *bvin, LDAPDN *dn, unsigned flags, void *ctx )
str
=
bv
->
bv_val
;
end
=
str
+
bv
->
bv_len
;
Debug
(
LDAP_DEBUG_ARGS
,
"=> ldap_bv2dn(%s,%u)
\n
"
,
str
,
flags
,
0
);
Debug
2
(
LDAP_DEBUG_ARGS
,
"=> ldap_bv2dn(%s,%u)
\n
"
,
str
,
flags
);
*
dn
=
NULL
;
...
...
@@ -890,7 +890,7 @@ return_result:;
LDAP_FREEX
(
tmpDN
,
ctx
);
}
Debug
(
LDAP_DEBUG_ARGS
,
"<= ldap_bv2dn(%s)=%d %s
\n
"
,
str
,
rc
,
Debug
3
(
LDAP_DEBUG_ARGS
,
"<= ldap_bv2dn(%s)=%d %s
\n
"
,
str
,
rc
,
rc
?
ldap_err2string
(
rc
)
:
""
);
*
dn
=
newDN
;
...
...
@@ -2987,7 +2987,7 @@ int ldap_dn2bv_x( LDAPDN dn, struct berval *bv, unsigned flags, void *ctx )
bv
->
bv_len
=
0
;
bv
->
bv_val
=
NULL
;
Debug
(
LDAP_DEBUG_ARGS
,
"=> ldap_dn2bv(%u)
\n
"
,
flags
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_ARGS
,
"=> ldap_dn2bv(%u)
\n
"
,
flags
);
/*
* a null dn means an empty dn string
...
...
@@ -3296,7 +3296,7 @@ int ldap_dn2bv_x( LDAPDN dn, struct berval *bv, unsigned flags, void *ctx )
return
LDAP_PARAM_ERROR
;
}
Debug
(
LDAP_DEBUG_ARGS
,
"<= ldap_dn2bv(%s)=%d %s
\n
"
,
Debug
3
(
LDAP_DEBUG_ARGS
,
"<= ldap_dn2bv(%s)=%d %s
\n
"
,
bv
->
bv_val
,
rc
,
rc
?
ldap_err2string
(
rc
)
:
""
);
return_results:
;
...
...
libraries/libldap/getvalues.c
View file @
09cec1f1
...
...
@@ -42,7 +42,7 @@ ldap_get_values( LDAP *ld, LDAPMessage *entry, LDAP_CONST char *target )
assert
(
entry
!=
NULL
);
assert
(
target
!=
NULL
);
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_get_values
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_get_values
\n
"
);
ber
=
*
entry
->
lm_ber
;
...
...
@@ -99,7 +99,7 @@ ldap_get_values_len( LDAP *ld, LDAPMessage *entry, LDAP_CONST char *target )
assert
(
entry
!=
NULL
);
assert
(
target
!=
NULL
);
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_get_values_len
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_get_values_len
\n
"
);
ber
=
*
entry
->
lm_ber
;
...
...
libraries/libldap/gssapi.c
View file @
09cec1f1
...
...
@@ -352,9 +352,8 @@ map_gsserr2ldap(
{
char
msg
[
256
];
Debug
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
gsserrstr
(
msg
,
sizeof
(
msg
),
mech
,
gss_rc
,
minor_status
),
NULL
,
NULL
);
Debug1
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
gsserrstr
(
msg
,
sizeof
(
msg
),
mech
,
gss_rc
,
minor_status
)
);
if
(
gss_rc
==
GSS_S_COMPLETE
)
{
ld
->
ld_errno
=
LDAP_SUCCESS
;
...
...
@@ -396,7 +395,7 @@ ldap_gssapi_get_rootdse_infos (
char
*
dnsHostName
=
NULL
;
int
rc
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_gssapi_get_rootdse_infos
\n
"
,
0
,
0
,
0
);
Debug
0
(
LDAP_DEBUG_TRACE
,
"ldap_gssapi_get_rootdse_infos
\n
"
);
rc
=
ldap_search_s
(
ld
,
""
,
LDAP_SCOPE_BASE
,
NULL
,
attrs
,
0
,
&
res
);
...
...
@@ -563,8 +562,8 @@ guess_service_principal(
return
ld
->
ld_errno
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"principal for host[%s]: '%s'
\n
"
,
host
,
svc_principal
,
0
);
Debug
2
(
LDAP_DEBUG_TRACE
,
"principal for host[%s]: '%s'
\n
"
,
host
,
svc_principal
);
input_name
.
value
=
svc_principal
;
input_name
.
length
=
(
size_t
)
ret
;
...
...
libraries/libldap/init.c
View file @
09cec1f1
...
...
@@ -251,9 +251,9 @@ ldap_int_conf_option(
}
if
(
attrs
[
i
].
type
==
ATTR_NONE
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_pvt_tls_config: "
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_pvt_tls_config: "
"unknown option '%s'"
,
cmd
,
0
,
0
);
cmd
);
return
1
;
}
...
...
@@ -301,7 +301,7 @@ static void openldap_ldap_init_w_conf(
return
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_init: trying %s
\n
"
,
file
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_init: trying %s
\n
"
,
file
);
fp
=
fopen
(
file
,
"r"
);
if
(
fp
==
NULL
)
{
...
...
@@ -309,7 +309,7 @@ static void openldap_ldap_init_w_conf(
return
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_init: using %s
\n
"
,
file
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_init: using %s
\n
"
,
file
);
while
((
start
=
fgets
(
linebuf
,
sizeof
(
linebuf
),
fp
))
!=
NULL
)
{
/* skip lines starting with '#' */
...
...
@@ -371,12 +371,11 @@ static void openldap_ldap_init_w_userconf(const char *file)
home
=
getenv
(
"HOME"
);
if
(
home
!=
NULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_init: HOME env is %s
\n
"
,
home
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_init: HOME env is %s
\n
"
,
home
);
path
=
LDAP_MALLOC
(
strlen
(
home
)
+
strlen
(
file
)
+
sizeof
(
LDAP_DIRSEP
"."
));
}
else
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_init: HOME env is NULL
\n
"
,
0
,
0
,
0
);
Debug0
(
LDAP_DEBUG_TRACE
,
"ldap_init: HOME env is NULL
\n
"
);
}
if
(
home
!=
NULL
&&
path
!=
NULL
)
{
...
...
@@ -749,26 +748,26 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
char
*
altfile
=
getenv
(
LDAP_ENV_PREFIX
"CONF"
);
if
(
altfile
!=
NULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_init: %s env is %s
\n
"
,
LDAP_ENV_PREFIX
"CONF"
,
altfile
,
0
);
Debug
2
(
LDAP_DEBUG_TRACE
,
"ldap_init: %s env is %s
\n
"
,
LDAP_ENV_PREFIX
"CONF"
,
altfile
);
openldap_ldap_init_w_sysconf
(
altfile
);
}
else
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_init: %s env is NULL
\n
"
,
LDAP_ENV_PREFIX
"CONF"
,
0
,
0
);
Debug
1
(
LDAP_DEBUG_TRACE
,
"ldap_init: %s env is NULL
\n
"
,