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
31a0c4a9
Commit
31a0c4a9
authored
May 25, 1999
by
Howard Chu
Browse files
For ITS#158: keep mixed-case backend suffix in addition to upcased suffix.
parent
08814442
Changes
3
Hide whitespace changes
Inline
Side-by-side
servers/slapd/backend.c
View file @
31a0c4a9
...
...
@@ -366,16 +366,16 @@ select_backend( char * dn )
dnlen
=
strlen
(
dn
);
for
(
i
=
0
;
i
<
nbackends
;
i
++
)
{
for
(
j
=
0
;
backends
[
i
].
be_suffix
!=
NULL
&&
backends
[
i
].
be_suffix
[
j
]
!=
NULL
;
j
++
)
for
(
j
=
0
;
backends
[
i
].
be_
n
suffix
!=
NULL
&&
backends
[
i
].
be_
n
suffix
[
j
]
!=
NULL
;
j
++
)
{
len
=
strlen
(
backends
[
i
].
be_suffix
[
j
]
);
len
=
strlen
(
backends
[
i
].
be_
n
suffix
[
j
]
);
if
(
len
>
dnlen
)
{
continue
;
}
if
(
strcmp
(
backends
[
i
].
be_suffix
[
j
],
if
(
strcmp
(
backends
[
i
].
be_
n
suffix
[
j
],
dn
+
(
dnlen
-
len
)
)
==
0
)
{
return
(
&
backends
[
i
]
);
}
...
...
@@ -427,8 +427,8 @@ be_issuffix(
{
int
i
;
for
(
i
=
0
;
be
->
be_suffix
!=
NULL
&&
be
->
be_suffix
[
i
]
!=
NULL
;
i
++
)
{
if
(
strcmp
(
be
->
be_suffix
[
i
],
suffix
)
==
0
)
{
for
(
i
=
0
;
be
->
be_
n
suffix
!=
NULL
&&
be
->
be_
n
suffix
[
i
]
!=
NULL
;
i
++
)
{
if
(
strcmp
(
be
->
be_
n
suffix
[
i
],
suffix
)
==
0
)
{
return
(
1
);
}
}
...
...
servers/slapd/config.c
View file @
31a0c4a9
...
...
@@ -179,8 +179,10 @@ read_config( char *fname )
fname
,
lineno
,
0
);
}
else
{
char
*
dn
=
ch_strdup
(
cargv
[
1
]
);
(
void
)
dn_normalize
_case
(
dn
);
(
void
)
dn_normalize
(
dn
);
charray_add
(
&
be
->
be_suffix
,
dn
);
(
void
)
dn_upcase
(
dn
);
charray_add
(
&
be
->
be_nsuffix
,
dn
);
free
(
dn
);
}
...
...
servers/slapd/slap.h
View file @
31a0c4a9
...
...
@@ -255,6 +255,7 @@ struct backend_db {
/* these should be renamed from be_ to bd_ */
char
**
be_suffix
;
/* the DN suffixes of data in this backend */
char
**
be_nsuffix
;
/* the normalized DN suffixes in this backend */
char
**
be_suffixAlias
;
/* the DN suffix aliases of data in this backend */
char
*
be_root_dn
;
/* the magic "root" dn for this db */
char
*
be_root_ndn
;
/* the magic "root" normalized dn for this db */
...
...
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