Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lukas However
OpenLDAP
Commits
d026e2c9
Commit
d026e2c9
authored
Sep 26, 2004
by
Pierangelo Masarati
Browse files
preformat "conn=%lu op=%lu"
parent
761f2879
Changes
17
Hide whitespace changes
Inline
Side-by-side
servers/slapd/add.c
View file @
d026e2c9
...
...
@@ -146,8 +146,8 @@ do_add( Operation *op, SlapReply *rs )
goto
done
;
}
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
ADD dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
e
->
e_name
.
bv_val
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
ADD dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
e
->
e_name
.
bv_val
,
0
,
0
,
0
);
if
(
e
->
e_nname
.
bv_len
==
0
)
{
/* protocolError may be a more appropriate error */
...
...
servers/slapd/back-dnssrv/bind.c
View file @
d026e2c9
...
...
@@ -43,9 +43,9 @@ dnssrv_back_bind(
op
->
oq_bind
.
rb_cred
.
bv_val
!=
NULL
&&
op
->
oq_bind
.
rb_cred
.
bv_len
)
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
DNSSRV BIND dn=
\"
%s
\"
provided passwd
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
==
NULL
?
""
:
op
->
o_req_dn
.
bv_val
,
0
,
0
);
"
%s
DNSSRV BIND dn=
\"
%s
\"
provided passwd
\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
==
NULL
?
""
:
op
->
o_req_dn
.
bv_val
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: BIND dn=
\"
%s
\"
provided cleartext password
\n
"
,
...
...
servers/slapd/back-dnssrv/referral.c
View file @
d026e2c9
...
...
@@ -99,9 +99,9 @@ dnssrv_back_referrals(
}
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
DNSSRV p=%d dn=
\"
%s
\"
url=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_protocol
,
op
->
o_req_dn
.
bv_val
,
urls
[
0
].
bv_val
);
"
%s
DNSSRV p=%d dn=
\"
%s
\"
url=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_protocol
,
op
->
o_req_dn
.
bv_val
,
urls
[
0
].
bv_val
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: dn=
\"
%s
\"
-> url=
\"
%s
\"\n
"
,
op
->
o_req_dn
.
bv_val
,
urls
[
0
].
bv_val
,
0
);
...
...
servers/slapd/back-dnssrv/search.c
View file @
d026e2c9
...
...
@@ -103,9 +103,9 @@ dnssrv_back_search(
}
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
DNSSRV p=%d dn=
\"
%s
\"
url=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_protocol
,
op
->
o_req_dn
.
bv_len
?
op
->
o_req_dn
.
bv_val
:
""
,
urls
[
0
].
bv_val
);
"
%s
DNSSRV p=%d dn=
\"
%s
\"
url=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_protocol
,
op
->
o_req_dn
.
bv_len
?
op
->
o_req_dn
.
bv_val
:
""
,
urls
[
0
].
bv_val
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: ManageDSAit scope=%d dn=
\"
%s
\"
-> url=
\"
%s
\"\n
"
,
...
...
servers/slapd/bind.c
View file @
d026e2c9
...
...
@@ -59,25 +59,26 @@ do_bind(
if
(
op
->
o_conn
->
c_sasl_bind_in_progress
)
{
be
=
op
->
o_conn
->
c_authz_backend
;
}
if
(
op
->
o_conn
->
c_dn
.
bv_len
)
{
if
(
!
BER_BVISEMPTY
(
&
op
->
o_conn
->
c_dn
)
)
{
/* log authorization identity demotion */
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
BIND anonymous mech=implicit ssf=0
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
0
,
0
,
0
);
"
%s
BIND anonymous mech=implicit ssf=0
\n
"
,
op
->
o_
log_prefix
,
0
,
0
,
0
,
0
);
}
connection2anonymous
(
op
->
o_conn
);
if
(
op
->
o_conn
->
c_sasl_bind_in_progress
)
{
op
->
o_conn
->
c_authz_backend
=
be
;
}
ldap_pvt_thread_mutex_unlock
(
&
op
->
o_conn
->
c_mutex
);
if
(
op
->
o_dn
.
bv_val
!=
NULL
)
{
free
(
op
->
o_dn
.
bv_val
);
op
->
o_dn
.
bv_val
=
ch_strdup
(
""
);
if
(
!
BER_BVISNULL
(
&
op
->
o_dn
)
)
{
/* NOTE: temporarily wasting few bytes
* (until bind is completed), but saving
* a couple of ch_free() and ch_strdup("") */
op
->
o_dn
.
bv_val
[
0
]
=
'\0'
;
op
->
o_dn
.
bv_len
=
0
;
}
if
(
op
->
o_ndn
.
bv_val
!=
NULL
)
{
free
(
op
->
o_ndn
.
bv_val
);
op
->
o_ndn
.
bv_val
=
ch_strdup
(
""
);
if
(
!
BER_BVISNULL
(
&
op
->
o_ndn
)
)
{
op
->
o_ndn
.
bv_val
[
0
]
=
'\0'
;
op
->
o_ndn
.
bv_len
=
0
;
}
...
...
@@ -171,9 +172,9 @@ do_bind(
(
unsigned
long
)
op
->
orb_method
);
}
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
BIND dn=
\"
%s
\"
method=%ld
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
(
unsigned
long
)
op
->
orb_method
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
BIND dn=
\"
%s
\"
method=%ld
\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
(
unsigned
long
)
op
->
orb_method
,
0
,
0
);
if
(
version
<
LDAP_VERSION_MIN
||
version
>
LDAP_VERSION_MAX
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_bind: unknown version=%ld
\n
"
,
...
...
@@ -212,11 +213,11 @@ cleanup:
op
->
o_conn
->
c_sasl_bindop
=
NULL
;
if
(
op
->
o_req_dn
.
bv_val
!=
NULL
)
{
if
(
!
BER_BVISNULL
(
&
op
->
o_req_dn
)
)
{
slap_sl_free
(
op
->
o_req_dn
.
bv_val
,
op
->
o_tmpmemctx
);
BER_BVZERO
(
&
op
->
o_req_dn
);
}
if
(
op
->
o_req_ndn
.
bv_val
!=
NULL
)
{
if
(
!
BER_BVISNULL
(
&
op
->
o_req_ndn
)
)
{
slap_sl_free
(
op
->
o_req_ndn
.
bv_val
,
op
->
o_tmpmemctx
);
BER_BVZERO
(
&
op
->
o_req_ndn
);
}
...
...
@@ -250,7 +251,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
goto
cleanup
;
}
if
(
mech
.
bv_len
==
0
)
{
if
(
BER_BVISNULL
(
&
mech
)
||
BER_BVISEMPTY
(
&
mech
)
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_bind: no sasl mechanism provided
\n
"
,
0
,
0
,
0
);
...
...
@@ -281,7 +282,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
ldap_pvt_thread_mutex_lock
(
&
op
->
o_conn
->
c_mutex
);
if
(
rs
->
sr_err
==
LDAP_SUCCESS
)
{
ber_dupbv
(
&
op
->
o_conn
->
c_dn
,
&
op
->
orb_edn
);
if
(
op
->
orb_edn
.
bv_len
!=
0
)
{
if
(
!
BER_BVISEMPTY
(
&
op
->
orb_edn
)
)
{
/* edn is always normalized already */
ber_dupbv
(
&
op
->
o_conn
->
c_ndn
,
&
op
->
o_conn
->
c_dn
);
}
...
...
@@ -296,7 +297,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
op
->
o_conn
->
c_ssf
=
op
->
orb_ssf
;
}
if
(
op
->
o_conn
->
c_dn
.
bv_len
!=
0
)
{
if
(
!
BER_BVISEMPTY
(
&
op
->
o_conn
->
c_dn
)
)
{
ber_len_t
max
=
sockbuf_max_incoming_auth
;
ber_sockbuf_ctrl
(
op
->
o_conn
->
c_sb
,
LBER_SB_OPT_SET_MAX_INCOMING
,
&
max
);
...
...
@@ -304,22 +305,22 @@ fe_op_bind( Operation *op, SlapReply *rs )
/* log authorization identity */
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
BIND dn=
\"
%s
\"
mech=%s ssf=%d
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_conn
->
c_dn
.
bv_val
?
op
->
o_conn
->
c_dn
.
bv_val
:
"<empty>"
,
op
->
o_conn
->
c_authmech
.
bv_val
,
op
->
orb_ssf
);
"
%s
BIND dn=
\"
%s
\"
mech=%s ssf=%d
\n
"
,
op
->
o_
log_prefix
,
BER_BVISNULL
(
&
op
->
o_conn
->
c_dn
)
?
"<empty>"
:
op
->
o_conn
->
c_dn
.
bv_val
,
op
->
o_conn
->
c_authmech
.
bv_val
,
op
->
orb_ssf
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"do_bind: SASL/%s bind: dn=
\"
%s
\"
ssf=%d
\n
"
,
op
->
o_conn
->
c_authmech
.
bv_val
,
op
->
o_conn
->
c_dn
.
bv_val
?
op
->
o_conn
->
c_dn
.
bv_val
:
"<empty>"
,
BER_BVISNULL
(
&
op
->
o_conn
->
c_dn
)
?
"<empty>"
:
op
->
o_conn
->
c_dn
.
bv_val
,
op
->
orb_ssf
);
}
else
if
(
rs
->
sr_err
==
LDAP_SASL_BIND_IN_PROGRESS
)
{
op
->
o_conn
->
c_sasl_bind_in_progress
=
1
;
}
else
{
if
(
op
->
o_conn
->
c_sasl_bind_mech
.
bv_val
)
{
if
(
!
BER_BVISNULL
(
&
op
->
o_conn
->
c_sasl_bind_mech
)
)
{
free
(
op
->
o_conn
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
op
->
o_conn
->
c_sasl_bind_mech
);
}
...
...
@@ -355,8 +356,8 @@ fe_op_bind( Operation *op, SlapReply *rs )
/* Not SASL, cancel any in-progress bind */
ldap_pvt_thread_mutex_lock
(
&
op
->
o_conn
->
c_mutex
);
if
(
op
->
o_conn
->
c_sasl_bind_mech
.
bv_val
!=
NULL
)
{
free
(
op
->
o_conn
->
c_sasl_bind_mech
.
bv_val
);
if
(
!
BER_BVISNULL
(
&
op
->
o_conn
->
c_sasl_bind_mech
)
)
{
free
(
op
->
o_conn
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
op
->
o_conn
->
c_sasl_bind_mech
);
}
op
->
o_conn
->
c_sasl_bind_in_progress
=
0
;
...
...
@@ -366,18 +367,18 @@ fe_op_bind( Operation *op, SlapReply *rs )
}
if
(
op
->
orb_method
==
LDAP_AUTH_SIMPLE
)
{
ber_str2bv
(
"SIMPLE"
,
sizeof
(
"SIMPLE"
)
-
1
,
0
,
&
mech
);
BER_BVSTR
(
&
mech
,
"SIMPLE"
);
/* accept "anonymous" binds */
if
(
op
->
orb_cred
.
bv_len
==
0
||
op
->
o_req_ndn
.
bv_len
==
0
)
{
if
(
BER_BVISEMPTY
(
&
op
->
orb_cred
)
||
BER_BVISEMPTY
(
&
op
->
o_req_ndn
)
)
{
rs
->
sr_err
=
LDAP_SUCCESS
;
if
(
op
->
orb_cred
.
bv_len
&&
if
(
!
BER_BVISEMPTY
(
&
op
->
orb_cred
)
&&
!
(
global_allows
&
SLAP_ALLOW_BIND_ANON_CRED
))
{
/* cred is not empty, disallow */
rs
->
sr_err
=
LDAP_INVALID_CREDENTIALS
;
}
else
if
(
op
->
o_req_ndn
.
bv_len
&&
}
else
if
(
!
BER_BVISEMPTY
(
&
op
->
o_req_ndn
)
&&
!
(
global_allows
&
SLAP_ALLOW_BIND_ANON_DN
))
{
/* DN is not empty, disallow */
...
...
@@ -429,7 +430,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
op
->
o_protocol
,
0
,
0
);
goto
cleanup
;
}
ber_str2bv
(
"KRBV4"
,
sizeof
(
"KRBV4"
)
-
1
,
0
,
&
mech
);
BER_BVSTR
(
&
mech
,
"KRBV4"
);
}
else
if
(
op
->
orb_method
==
LDAP_AUTH_KRBV42
)
{
rs
->
sr_err
=
LDAP_AUTH_METHOD_NOT_SUPPORTED
;
...
...
@@ -531,18 +532,18 @@ fe_op_bind( Operation *op, SlapReply *rs )
BER_BVZERO
(
&
op
->
o_req_dn
);
op
->
o_tmpfree
(
op
->
o_req_ndn
.
bv_val
,
op
->
o_tmpmemctx
);
BER_BVZERO
(
&
op
->
o_req_ndn
);
if
(
op
->
o_conn
->
c_dn
.
bv_len
!=
0
)
{
if
(
!
BER_BVISEMPTY
(
&
op
->
o_conn
->
c_dn
)
)
{
ber_len_t
max
=
sockbuf_max_incoming_auth
;
ber_sockbuf_ctrl
(
op
->
o_conn
->
c_sb
,
LBER_SB_OPT_SET_MAX_INCOMING
,
&
max
);
}
/* log authorization identity */
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
BIND dn=
\"
%s
\"
mech=%s (SLAPI) ssf=0
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_conn
->
c_dn
.
bv_val
?
op
->
o_conn
->
c_dn
.
bv_val
:
"<empty>"
,
mech
.
bv_val
,
0
);
"
%s
BIND dn=
\"
%s
\"
mech=%s (SLAPI) ssf=0
\n
"
,
op
->
o_
log_prefix
,
BER_BVISNULL
(
&
op
->
o_conn
->
c_dn
)
?
"<empty>"
:
op
->
o_conn
->
c_dn
.
bv_val
,
mech
.
bv_val
,
0
,
0
);
ldap_pvt_thread_mutex_unlock
(
&
op
->
o_conn
->
c_mutex
);
}
goto
cleanup
;
...
...
@@ -562,7 +563,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
}
/* be_bind returns regular/global edn */
if
(
op
->
orb_edn
.
bv_len
)
{
if
(
!
BER_BVISEMPTY
(
&
op
->
orb_edn
)
)
{
op
->
o_conn
->
c_dn
=
op
->
orb_edn
;
}
else
{
ber_dupbv
(
&
op
->
o_conn
->
c_dn
,
&
op
->
o_req_dn
);
...
...
@@ -570,7 +571,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
ber_dupbv
(
&
op
->
o_conn
->
c_ndn
,
&
op
->
o_req_ndn
);
if
(
op
->
o_conn
->
c_dn
.
bv_len
!=
0
)
{
if
(
!
BER_BVISEMPTY
(
&
op
->
o_conn
->
c_dn
)
)
{
ber_len_t
max
=
sockbuf_max_incoming_auth
;
ber_sockbuf_ctrl
(
op
->
o_conn
->
c_sb
,
LBER_SB_OPT_SET_MAX_INCOMING
,
&
max
);
...
...
@@ -578,9 +579,9 @@ fe_op_bind( Operation *op, SlapReply *rs )
/* log authorization identity */
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
BIND dn=
\"
%s
\"
mech=%s ssf=0
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_conn
->
c_dn
.
bv_val
,
mech
.
bv_val
,
0
);
"
%s
BIND dn=
\"
%s
\"
mech=%s ssf=0
\n
"
,
op
->
o_
log_prefix
,
op
->
o_conn
->
c_dn
.
bv_val
,
mech
.
bv_val
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"do_bind: v%d bind:
\"
%s
\"
to
\"
%s
\"\n
"
,
...
...
@@ -591,7 +592,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
/* send this here to avoid a race condition */
send_ldap_result
(
op
,
rs
);
}
else
if
(
op
->
orb_edn
.
bv_val
!=
NULL
)
{
}
else
if
(
!
BER_BVISNULL
(
&
op
->
orb_edn
)
)
{
free
(
op
->
orb_edn
.
bv_val
);
}
...
...
servers/slapd/compare.c
View file @
d026e2c9
...
...
@@ -140,9 +140,9 @@ fe_op_compare( Operation *op, SlapReply *rs )
ava
.
aa_desc
->
ad_cname
.
bv_val
,
ava
.
aa_value
.
bv_val
);
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
CMP dn=
\"
%s
\"
attr=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
0
);
"
%s
CMP dn=
\"
%s
\"
attr=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
0
,
0
);
if
(
backend_check_restrictions
(
op
,
rs
,
NULL
)
!=
LDAP_SUCCESS
)
{
send_ldap_result
(
op
,
rs
);
...
...
@@ -161,9 +161,9 @@ fe_op_compare( Operation *op, SlapReply *rs )
ava
.
aa_desc
->
ad_cname
.
bv_val
,
ava
.
aa_value
.
bv_val
);
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
CMP dn=
\"
%s
\"
attr=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
0
);
"
%s
CMP dn=
\"
%s
\"
attr=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
0
,
0
);
if
(
backend_check_restrictions
(
op
,
rs
,
NULL
)
!=
LDAP_SUCCESS
)
{
send_ldap_result
(
op
,
rs
);
...
...
@@ -230,9 +230,9 @@ fe_op_compare( Operation *op, SlapReply *rs )
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
ava
.
aa_value
.
bv_val
);
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
CMP dn=
\"
%s
\"
attr=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
CMP dn=
\"
%s
\"
attr=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
ava
.
aa_desc
->
ad_cname
.
bv_val
,
0
,
0
);
#if defined( LDAP_SLAPI )
#define pb op->o_pb
...
...
servers/slapd/connection.c
View file @
d026e2c9
...
...
@@ -1597,6 +1597,19 @@ connection_resched( Connection *conn )
return
0
;
}
static
void
connection_init_log_prefix
(
Operation
*
op
)
{
if
(
op
->
o_connid
==
(
unsigned
long
)(
-
1
)
)
{
snprintf
(
op
->
o_log_prefix
,
sizeof
(
op
->
o_log_prefix
),
"conn=-1 op=%lu"
,
op
->
o_opid
);
}
else
{
snprintf
(
op
->
o_log_prefix
,
sizeof
(
op
->
o_log_prefix
),
"conn=%lu op=%lu"
,
op
->
o_connid
,
op
->
o_opid
);
}
}
static
int
connection_op_activate
(
Operation
*
op
)
{
int
status
;
...
...
@@ -1625,6 +1638,7 @@ static int connection_op_activate( Operation *op )
}
op
->
o_connid
=
op
->
o_conn
->
c_connid
;
connection_init_log_prefix
(
op
);
LDAP_STAILQ_INSERT_TAIL
(
&
op
->
o_conn
->
c_ops
,
op
,
o_next
);
...
...
@@ -1701,6 +1715,7 @@ connection_fake_init(
op
->
o_conn
=
conn
;
op
->
o_connid
=
op
->
o_conn
->
c_connid
;
connection_init_log_prefix
(
op
);
op
->
o_time
=
slap_get_time
();
}
...
...
servers/slapd/controls.c
View file @
d026e2c9
...
...
@@ -749,8 +749,8 @@ static int parseProxyAuthz (
op
->
o_dn
.
bv_val
=
NULL
;
op
->
o_ndn
=
dn
;
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
PROXYAUTHZ dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
dn
.
bv_val
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
PROXYAUTHZ dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
dn
.
bv_val
,
0
,
0
,
0
);
/*
* NOTE: since slap_sasl_getdn() returns a normalized dn,
...
...
servers/slapd/delete.c
View file @
d026e2c9
...
...
@@ -88,8 +88,8 @@ do_delete(
goto
cleanup
;
}
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
DEL dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
DEL dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
0
,
0
,
0
);
op
->
o_bd
=
frontendDB
;
rs
->
sr_err
=
frontendDB
->
be_delete
(
op
,
rs
);
...
...
servers/slapd/limits.c
View file @
d026e2c9
...
...
@@ -74,9 +74,9 @@ limits_get(
assert
(
op
);
assert
(
limit
);
Debug
(
LDAP_DEBUG_TRACE
,
"==> limits_get:
conn=%lu op=%lu
dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
BER_BVISNULL
(
ndn
)
?
"[anonymous]"
:
ndn
->
bv_val
);
Debug
(
LDAP_DEBUG_TRACE
,
"==> limits_get:
%s
dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
BER_BVISNULL
(
ndn
)
?
"[anonymous]"
:
ndn
->
bv_val
,
0
);
/*
* default values
*/
...
...
servers/slapd/modify.c
View file @
d026e2c9
...
...
@@ -259,20 +259,20 @@ fe_op_modify( Operation *op, SlapReply *rs )
char
abuf
[
BUFSIZ
/
2
],
*
ptr
=
abuf
;
int
len
=
0
;
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
MOD dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
MOD dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
0
,
0
,
0
);
for
(
tmp
=
modlist
;
tmp
!=
NULL
;
tmp
=
tmp
->
sml_next
)
{
if
(
len
+
1
+
tmp
->
sml_type
.
bv_len
>
sizeof
(
abuf
))
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
MOD attr=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
abuf
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
MOD attr=%s
\n
"
,
op
->
o_
log_prefix
,
abuf
,
0
,
0
,
0
);
len
=
0
;
len
=
0
;
ptr
=
abuf
;
if
(
1
+
tmp
->
sml_type
.
bv_len
>
sizeof
(
abuf
))
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
MOD attr=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
tmp
->
sml_type
.
bv_val
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
MOD attr=%s
\n
"
,
op
->
o_
log_prefix
,
tmp
->
sml_type
.
bv_val
,
0
,
0
,
0
);
continue
;
}
}
...
...
@@ -284,8 +284,8 @@ fe_op_modify( Operation *op, SlapReply *rs )
len
+=
tmp
->
sml_type
.
bv_len
;
}
if
(
len
)
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
MOD attr=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
abuf
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
MOD attr=%s
\n
"
,
op
->
o_
log_prefix
,
abuf
,
0
,
0
,
0
);
}
}
#endif
/* LDAP_DEBUG */
...
...
servers/slapd/modrdn.c
View file @
d026e2c9
...
...
@@ -219,8 +219,8 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
goto
cleanup
;
}
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
MODRDN dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
MODRDN dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
0
,
0
,
0
);
manageDSAit
=
get_manageDSAit
(
op
);
...
...
servers/slapd/result.c
View file @
d026e2c9
...
...
@@ -522,9 +522,9 @@ send_ldap_disconnect( Operation *op, SlapReply *rs )
if
(
send_ldap_response
(
op
,
rs
)
==
SLAP_CB_CONTINUE
)
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
DISCONNECT tag=%lu err=%d text=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
rs
->
sr_tag
,
rs
->
sr_err
,
rs
->
sr_text
?
rs
->
sr_text
:
""
);
"
%s
DISCONNECT tag=%lu err=%d text=%s
\n
"
,
op
->
o_
log_prefix
,
rs
->
sr_tag
,
rs
->
sr_err
,
rs
->
sr_text
?
rs
->
sr_text
:
""
,
0
);
}
}
...
...
@@ -540,8 +540,8 @@ slap_send_ldap_result( Operation *op, SlapReply *rs )
assert
(
!
LDAP_API_ERROR
(
rs
->
sr_err
));
Debug
(
LDAP_DEBUG_TRACE
,
"send_ldap_result:
conn=%lu op=%lu
p=%d
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_protocol
);
"send_ldap_result:
%s
p=%d
\n
"
,
op
->
o_
log_prefix
,
op
->
o_protocol
,
0
);
Debug
(
LDAP_DEBUG_ARGS
,
"send_ldap_result: err=%d matched=
\"
%s
\"
text=
\"
%s
\"\n
"
,
...
...
@@ -607,14 +607,14 @@ slap_send_ldap_result( Operation *op, SlapReply *rs )
rs
->
sr_err
,
rs
->
sr_nentries
);
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
SEARCH RESULT tag=%lu err=%s text=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
rs
->
sr_tag
,
nbuf
,
rs
->
sr_text
?
rs
->
sr_text
:
""
);
"
%s
SEARCH RESULT tag=%lu err=%s text=%s
\n
"
,
op
->
o_
log_prefix
,
rs
->
sr_tag
,
nbuf
,
rs
->
sr_text
?
rs
->
sr_text
:
""
,
0
);
}
else
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
RESULT tag=%lu err=%d text=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
rs
->
sr_tag
,
rs
->
sr_err
,
rs
->
sr_text
?
rs
->
sr_text
:
""
);
"
%s
RESULT tag=%lu err=%d text=%s
\n
"
,
op
->
o_
log_prefix
,
rs
->
sr_tag
,
rs
->
sr_err
,
rs
->
sr_text
?
rs
->
sr_text
:
""
,
0
);
}
}
...
...
@@ -1182,8 +1182,8 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
ldap_pvt_thread_mutex_unlock
(
&
slap_counters
.
sc_sent_mutex
);
}
Statslog
(
LDAP_DEBUG_STATS2
,
"
conn=%lu op=%lu
ENTRY dn=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
rs
->
sr_entry
->
e_dn
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS2
,
"
%s
ENTRY dn=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
rs
->
sr_entry
->
e_dn
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"<= send_search_entry: conn %lu exit.
\n
"
,
op
->
o_connid
,
0
,
0
);
...
...
@@ -1373,8 +1373,9 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
}
#endif
Statslog
(
LDAP_DEBUG_STATS2
,
"conn=%lu op=%lu REF dn=
\"
%s
\"\n
"
,
op
->
o_connid
,
op
->
o_opid
,
rs
->
sr_entry
?
rs
->
sr_entry
->
e_dn
:
"(null)"
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS2
,
"%s REF dn=
\"
%s
\"\n
"
,
op
->
o_log_prefix
,
rs
->
sr_entry
?
rs
->
sr_entry
->
e_dn
:
"(null)"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"<= send_search_reference
\n
"
,
0
,
0
,
0
);
...
...
servers/slapd/search.c
View file @
d026e2c9
...
...
@@ -189,9 +189,9 @@ do_search(
sprintf
(
abuf
,
"scope=%d deref=%d"
,
op
->
ors_scope
,
op
->
ors_deref
);
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
SRCH base=
\"
%s
\"
%s filter=
\"
%s
\"\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
op
->
o_req_dn
.
bv_val
,
abuf
,
op
->
ors_filterstr
.
bv_val
);
"
%s
SRCH base=
\"
%s
\"
%s filter=
\"
%s
\"\n
"
,
op
->
o_
log_prefix
,
op
->
o_req_dn
.
bv_val
,
abuf
,
op
->
ors_filterstr
.
bv_val
,
0
);
for
(
i
=
0
;
i
<
siz
;
i
++
)
{
alen
=
op
->
ors_attrs
[
i
].
an_name
.
bv_len
;
...
...
@@ -199,8 +199,8 @@ do_search(
alen
=
sizeof
(
abuf
)
-
1
;
}
if
(
len
&&
(
len
+
1
+
alen
>=
sizeof
(
abuf
)))
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
SRCH attr=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
abuf
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
SRCH attr=%s
\n
"
,
op
->
o_
log_prefix
,
abuf
,
0
,
0
,
0
);
len
=
0
;
ptr
=
abuf
;
}
...
...
@@ -213,8 +213,8 @@ do_search(
*
ptr
=
'\0'
;
}
if
(
len
)
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
SRCH attr=%s
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
abuf
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
SRCH attr=%s
\n
"
,
op
->
o_
log_prefix
,
abuf
,
0
,
0
,
0
);
}
}
...
...
servers/slapd/slap.h
View file @
d026e2c9
...
...
@@ -2055,6 +2055,7 @@ typedef struct slap_gacl {
typedef
struct
slap_op
{
unsigned
long
o_opid
;
/* id of this operation */
unsigned
long
o_connid
;
/* id of conn initiating this op */
char
o_log_prefix
[
sizeof
(
"conn=18446744073709551615 op=18446744073709551615"
)];
struct
slap_conn
*
o_conn
;
/* connection spawning this op */
BackendDB
*
o_bd
;
/* backend DB processing this op */
...
...
servers/slapd/starttls.c
View file @
d026e2c9
...
...
@@ -59,8 +59,8 @@ starttls_extop ( Operation *op, SlapReply *rs )
(
op
->
o_conn
->
c_dn
.
bv_len
!=
0
)
)
{
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
AUTHZ anonymous mech=starttls ssf=0
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
0
,
0
,
0
);
"
%s
AUTHZ anonymous mech=starttls ssf=0
\n
"
,
op
->
o_
log_prefix
,
0
,
0
,
0
,
0
);
/* force to anonymous */
connection2anonymous
(
op
->
o_conn
);
...
...
servers/slapd/unbind.c
View file @
d026e2c9
...
...
@@ -44,8 +44,8 @@ do_unbind( Operation *op, SlapReply *rs )
* UnBindRequest ::= NULL
*/
Statslog
(
LDAP_DEBUG_STATS
,
"
conn=%lu op=%lu
UNBIND
\n
"
,
op
->
o_
connid
,
op
->
o_opid
,
0
,
0
,
0
);
Statslog
(
LDAP_DEBUG_STATS
,
"
%s
UNBIND
\n
"
,
op
->
o_
log_prefix
,
0
,
0
,
0
,
0
);
/* pass the unbind to all backends */
backend_unbind
(
op
,
rs
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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