Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
286928e8
Commit
286928e8
authored
Dec 11, 2002
by
Kurt Zeilenga
Browse files
NameAndOptionalUID fix
parent
f01275a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/controls.c
View file @
286928e8
...
...
@@ -144,10 +144,13 @@ int get_ctrls(
}
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
ENTRY
,
"get_ctrls: conn %lu
\n
"
,
conn
->
c_connid
,
0
,
0
);
LDAP_LOG
(
OPERATION
,
ENTRY
,
"get_ctrls: conn %lu
\n
"
,
conn
->
c_connid
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls
\n
"
,
0
,
0
,
0
);
#endif
if
(
op
->
o_protocol
<
LDAP_VERSION3
)
{
rc
=
SLAPD_DISCONNECT
;
errmsg
=
"controls require LDAPv3"
;
...
...
@@ -220,11 +223,29 @@ int get_ctrls(
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: get oid failed.
\n
"
,
0
,
0
,
0
);
#endif
ldap_controls_free
(
op
->
o_ctrls
);
op
->
o_ctrls
=
NULL
;
rc
=
SLAPD_DISCONNECT
;
errmsg
=
"decoding controls error"
;
goto
return_results
;
}
else
if
(
c
->
ldctl_oid
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
INFO
,
"get_ctrls: conn %lu got emtpy OID.
\n
"
,
conn
->
c_connid
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"get_ctrls: conn %lu got emtpy OID.
\n
"
,
conn
->
c_connid
,
0
,
0
);
#endif
ldap_controls_free
(
op
->
o_ctrls
);
op
->
o_ctrls
=
NULL
;
rc
=
LDAP_PROTOCOL_ERROR
;
errmsg
=
"OID field is empty"
;
goto
return_results
;
}
tag
=
ber_peek_tag
(
ber
,
&
len
);
...
...
@@ -260,13 +281,12 @@ int get_ctrls(
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
INFO
,
"get_ctrls: conn %lu: "
"%s (%scritical): get value failed.
\n
"
,
conn
->
c_connid
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
conn
->
c_connid
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: conn %lu: "
"%s (%scritical): get value failed.
\n
"
,
conn
->
c_connid
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
conn
->
c_connid
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
);
#endif
ldap_controls_free
(
op
->
o_ctrls
);
...
...
@@ -280,13 +300,11 @@ int get_ctrls(
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
INFO
,
"get_ctrls: conn %lu oid=
\"
%s
\"
(%scritical)
\n
"
,
conn
->
c_connid
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
c
->
ldctl_iscritical
?
""
:
"non"
);
conn
->
c_connid
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: oid=
\"
%s
\"
(%scritical)
\n
"
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
c
->
ldctl_iscritical
?
""
:
"non"
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: oid=
\"
%s
\"
(%scritical)
\n
"
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
,
0
);
#endif
sc
=
find_ctrl
(
c
->
ldctl_oid
);
...
...
servers/slapd/schema_init.c
View file @
286928e8
...
...
@@ -414,11 +414,7 @@ nameUIDNormalize(
}
}
#ifdef USE_DN_NORMALIZE
rc
=
dnNormalize2
(
NULL
,
&
out
,
normalized
);
#else
rc
=
dnPretty2
(
NULL
,
&
out
,
normalized
);
#endif
if
(
rc
!=
LDAP_SUCCESS
)
{
free
(
out
.
bv_val
);
...
...
@@ -3580,7 +3576,6 @@ integerBitOrMatch(
#ifdef HAVE_TLS
#include
<openssl/x509.h>
#include
<openssl/err.h>
char
digit
[]
=
"0123456789"
;
/*
* Next function returns a string representation of a ASN1_INTEGER.
...
...
@@ -3592,6 +3587,7 @@ asn1_integer2str(ASN1_INTEGER *a, struct berval *bv)
{
char
buf
[
256
];
char
*
p
;
static
char
digit
[]
=
"0123456789"
;
/* We work backwards, make it fill from the end of buf */
p
=
buf
+
sizeof
(
buf
)
-
1
;
...
...
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