Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Lowden
OpenLDAP
Commits
275f3be3
Commit
275f3be3
authored
23 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Misc. DN fixes and cleanups, namely don't muck with AVA_BINARY values
Also, pass empty_bv when bv_val is NULL.
parent
b2d948f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
INSTALL
+1
-2
1 addition, 2 deletions
INSTALL
Makefile.in
+1
-0
1 addition, 0 deletions
Makefile.in
libraries/libldap/getdn.c
+9
-13
9 additions, 13 deletions
libraries/libldap/getdn.c
servers/slapd/dn.c
+11
-2
11 additions, 2 deletions
servers/slapd/dn.c
with
22 additions
and
17 deletions
INSTALL
+
1
−
2
View file @
275f3be3
...
...
@@ -31,8 +31,7 @@ Making and Installing the OpenLDAP Distribution
% ./configure --help
to list available configuration options. A description of these
options is provided in the 'CONFIGURE OPTIONS' section below.
to list available configuration options.
The configure script uses environmental variables for determining
compiler/linker options including:
...
...
This diff is collapsed.
Click to expand it.
Makefile.in
+
1
−
0
View file @
275f3be3
...
...
@@ -29,5 +29,6 @@ veryclean-local: FORCE
distclean
:
veryclean FORCE
check
:
test
test
:
FORCE
cd
tests
;
make
test
This diff is collapsed.
Click to expand it.
libraries/libldap/getdn.c
+
9
−
13
View file @
275f3be3
...
...
@@ -2864,7 +2864,6 @@ int ldap_dn2bv( LDAPDN *dn, struct berval *bv, unsigned flags )
int
(
*
sv2s
)
(
struct
berval
*
v
,
char
*
s
,
unsigned
f
,
ber_len_t
*
l
);
assert
(
bv
);
bv
->
bv_len
=
0
;
bv
->
bv_val
=
NULL
;
...
...
@@ -2883,13 +2882,13 @@ int ldap_dn2bv( LDAPDN *dn, struct berval *bv, unsigned flags )
case
LDAP_DN_FORMAT_LDAPV3
:
sv2l
=
strval2strlen
;
sv2s
=
strval2str
;
goto
got_funcs
;
if
(
0
)
{
case
LDAP_DN_FORMAT_LDAPV2
:
sv2l
=
strval2IA5strlen
;
sv2s
=
strval2IA5str
;
got_funcs:
sv2l
=
strval2IA5strlen
;
sv2s
=
strval2IA5str
;
}
for
(
iRDN
=
0
,
len
=
0
;
dn
[
0
][
iRDN
];
iRDN
++
)
{
ber_len_t
rdnl
;
LDAPRDN
*
rdn
=
dn
[
0
][
iRDN
];
...
...
@@ -2932,7 +2931,6 @@ got_funcs:
break
;
case
LDAP_DN_FORMAT_UFN
:
{
/*
* FIXME: quoting from RFC 1781:
*
...
...
@@ -3047,11 +3045,10 @@ got_funcs:
#endif
/* DC_IN_UFN */
rc
=
LDAP_SUCCESS
;
break
;
}
case
LDAP_DN_FORMAT_DCE
:
}
break
;
case
LDAP_DN_FORMAT_DCE
:
for
(
iRDN
=
0
,
len
=
0
;
dn
[
0
][
iRDN
];
iRDN
++
)
{
ber_len_t
rdnl
;
LDAPRDN
*
rdn
=
dn
[
0
][
iRDN
];
...
...
@@ -3090,7 +3087,6 @@ got_funcs:
break
;
case
LDAP_DN_FORMAT_AD_CANONICAL
:
{
/*
* Sort of UFN for DCE DNs: a slash ('/') separated
* global->local DN with no types; strictly speaking,
...
...
@@ -3172,8 +3168,7 @@ got_funcs:
bv
->
bv_val
[
bv
->
bv_len
]
=
'\0'
;
rc
=
LDAP_SUCCESS
;
break
;
}
}
break
;
default:
return
LDAP_PARAM_ERROR
;
...
...
@@ -3181,6 +3176,7 @@ got_funcs:
Debug
(
LDAP_DEBUG_TRACE
,
"<= ldap_dn2bv(%s,%u)=%d
\n
"
,
bv
->
bv_val
,
flags
,
rc
);
return_results:
;
return
(
rc
);
}
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/dn.c
+
11
−
2
View file @
275f3be3
...
...
@@ -258,7 +258,12 @@ LDAPDN_rewrite( LDAPDN *dn, unsigned flags )
*/
ava
->
la_attr
=
ad
->
ad_cname
;
if
(
flags
&
SLAP_LDAPDN_PRETTY
)
{
if
(
ava
->
la_flags
&
LDAP_AVA_BINARY
)
{
/* AVA is binary encoded, don't muck with it */
transf
=
NULL
;
mr
=
NULL
;
}
else
if
(
flags
&
SLAP_LDAPDN_PRETTY
)
{
transf
=
ad
->
ad_type
->
sat_syntax
->
ssyn_pretty
;
mr
=
NULL
;
}
else
{
...
...
@@ -269,9 +274,13 @@ LDAPDN_rewrite( LDAPDN *dn, unsigned flags )
if
(
transf
)
{
/*
* transform value by normalize/pretty function
* if value is empty, use empty_bv
*/
rc
=
(
*
transf
)(
ad
->
ad_type
->
sat_syntax
,
&
ava
->
la_value
,
&
bv
);
ava
->
la_value
.
bv_len
?
&
ava
->
la_value
:
(
struct
berval
*
)
&
slap_empty_bv
,
&
bv
);
if
(
rc
!=
LDAP_SUCCESS
)
{
return
LDAP_INVALID_SYNTAX
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment