Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Christopher Ng
OpenLDAP
Commits
dab0793d
Commit
dab0793d
authored
24 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Working test001 and test002.
parent
b7604301
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
servers/slapd/back-ldbm/search.c
+14
-11
14 additions, 11 deletions
servers/slapd/back-ldbm/search.c
servers/slapd/schema/core.schema
+1
-1
1 addition, 1 deletion
servers/slapd/schema/core.schema
servers/slapd/schemaparse.c
+13
-13
13 additions, 13 deletions
servers/slapd/schemaparse.c
with
28 additions
and
25 deletions
servers/slapd/back-ldbm/search.c
+
14
−
11
View file @
dab0793d
...
...
@@ -138,6 +138,7 @@ ldbm_back_search(
/* need normalized dn below */
realbase
=
ch_strdup
(
e
->
e_ndn
);
cache_return_entry_r
(
&
li
->
li_cache
,
e
);
if
(
candidates
==
NULL
)
{
...
...
@@ -400,15 +401,20 @@ search_candidates(
)
{
ID_BLOCK
*
candidates
;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
candidates
=
filter_candidates
(
be
,
filter
);
#else
Filter
rf
,
rf_or
,
af
,
af_or
,
lf
,
lf_and
;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
struct
berval
rf_or_bv
,
af_or_bv
;
static
AttributeDescription
*
objectClass
=
NULL
;
AttributeDescription
*
ad_objectClass
=
slap_schema
.
si_ad_objectClass
;
#endif
Debug
(
LDAP_DEBUG_TRACE
,
"search_candidates: base=
\"
%s
\"
s=%d d=%d
\n
"
,
e
->
e_ndn
,
scope
,
deref
);
#endif
#ifndef SLAPD_SCHEMA_NOT_COMPAT
if
(
!
manageDSAit
)
{
/* match referrals */
rf
.
f_next
=
NULL
;
...
...
@@ -416,10 +422,8 @@ search_candidates(
rf
.
f_or
=
&
rf_or
;
rf
.
f_or
->
f_choice
=
LDAP_FILTER_EQUALITY
;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
rf
.
f_or
->
f_av_desc
=
objectClass
;
rf
.
f_or
->
f_av_value
=
&
rf_or_bv
;
rf
.
f_or
->
f_av_value
->
bv_val
=
ch_strdup
(
"REFERRAL"
);
rf
.
f_or
->
f_av_value
->
bv_len
=
sizeof
(
"REFERRAL"
)
-
1
;
rf
.
f_or
->
f_av_desc
=
ad_objectClass
;
rf
.
f_or
->
f_av_value
=
ber_bvstrdup
(
"REFERRAL"
);
#else
rf
.
f_or
->
f_avtype
=
ch_strdup
(
"objectclass"
);
rf
.
f_or
->
f_avvalue
.
bv_val
=
ch_strdup
(
"REFERRAL"
);
...
...
@@ -439,9 +443,7 @@ search_candidates(
af
.
f_or
->
f_choice
=
LDAP_FILTER_EQUALITY
;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
af
.
f_or
->
f_av_desc
=
objectClass
;
af
.
f_or
->
f_av_value
=
&
af_or_bv
;
af
.
f_or
->
f_av_value
->
bv_val
=
ch_strdup
(
"ALIAS"
);
af
.
f_or
->
f_av_value
->
bv_len
=
sizeof
(
"ALIAS"
)
-
1
;
af
.
f_or
->
f_av_value
=
ber_bvstrdup
(
"ALIAS"
);
#else
af
.
f_or
->
f_avtype
=
ch_strdup
(
"objectclass"
);
af
.
f_or
->
f_avvalue
.
bv_val
=
ch_strdup
(
"ALIAS"
);
...
...
@@ -477,7 +479,7 @@ search_candidates(
/* free dynamically allocated bits */
if
(
af
.
f_or
!=
NULL
)
{
#ifdef SLAPD_SCHEMA_NOT_COMPAT
free
(
af
.
f_or
->
f_av_value
->
bv_val
);
ber_bv
free
(
af
.
f_or
->
f_av_value
);
#else
free
(
af
.
f_or
->
f_avtype
);
free
(
af
.
f_or
->
f_avvalue
.
bv_val
);
...
...
@@ -486,12 +488,13 @@ search_candidates(
if
(
rf
.
f_or
!=
NULL
)
{
#ifdef SLAPD_SCHEMA_NOT_COMPAT
free
(
rf
.
f_or
->
f_av_value
->
bv_val
);
ber_bv
free
(
rf
.
f_or
->
f_av_value
);
#else
free
(
rf
.
f_or
->
f_avtype
);
free
(
rf
.
f_or
->
f_avvalue
.
bv_val
);
#endif
}
#endif
return
(
candidates
);
}
This diff is collapsed.
Click to expand it.
servers/slapd/schema/core.schema
+
1
−
1
View file @
dab0793d
...
...
@@ -292,7 +292,7 @@ attributetype ( 2.5.4.40 NAME 'crossCertificatePair'
# 2.5.4.41 is 'name', moved above since other attribute types derive from it
attributetype ( 2.5.4.42 NAME 'givenName' SUP name )
attributetype ( 2.5.4.42 NAME
(
'givenName'
'gn' )
SUP name )
attributetype ( 2.5.4.43 NAME 'initials' SUP name )
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/schemaparse.c
+
13
−
13
View file @
dab0793d
...
...
@@ -27,15 +27,15 @@ static void at_usage(void) LDAP_GCCATTR((noreturn));
static
char
*
const
err2text
[]
=
{
""
,
"Out of memory"
,
"Object
c
lass not found"
,
"Attribute
t
ype not found"
,
"Duplicate object
c
lass"
,
"Duplicate attribute
t
ype"
,
"Duplicate
s
yntax"
,
"Duplicate matching
r
ule"
,
"Object
C
lass not found"
,
"Attribute
T
ype not found"
,
"Duplicate object
C
lass"
,
"Duplicate attribute
T
ype"
,
"Duplicate
ldapS
yntax"
,
"Duplicate matching
R
ule"
,
"OID or name required"
,
"S
yntax
or
sup
erior required"
,
"Matching
r
ule not found"
,
"S
YNTAX
or
SUP
erior required"
,
"Matching
R
ule not found"
,
"Syntax not found"
,
"Syntax required"
};
...
...
@@ -123,7 +123,7 @@ parse_oc_old(
for
(
namep
=
oc
->
oc_at_oids_must
;
*
namep
;
namep
++
)
{
code
=
at_fake_if_needed
(
*
namep
);
if
(
code
)
{
fprintf
(
stderr
,
"%s: line %d: %s
%s
\n
"
,
fprintf
(
stderr
,
"%s: line %d: %s
:
\"
%s
\"
\n
"
,
fname
,
lineno
,
scherr2str
(
code
),
*
namep
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -133,7 +133,7 @@ parse_oc_old(
for
(
namep
=
oc
->
oc_at_oids_may
;
*
namep
;
namep
++
)
{
code
=
at_fake_if_needed
(
*
namep
);
if
(
code
)
{
fprintf
(
stderr
,
"%s: line %d: %s
%s
\n
"
,
fprintf
(
stderr
,
"%s: line %d: %s
:
\"
%s
\"
\n
"
,
fname
,
lineno
,
scherr2str
(
code
),
*
namep
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -142,7 +142,7 @@ parse_oc_old(
code
=
oc_add
(
oc
,
&
err
);
if
(
code
)
{
fprintf
(
stderr
,
"%s: line %d: %s
%s
\n
"
,
fprintf
(
stderr
,
"%s: line %d: %s
:
\"
%s
\"
\n
"
,
fname
,
lineno
,
scherr2str
(
code
),
err
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -298,7 +298,7 @@ parse_oc(
/* oc->oc_oid == NULL will be an error someday */
code
=
oc_add
(
oc
,
&
err
);
if
(
code
)
{
fprintf
(
stderr
,
"%s: line %d: %s
%s
\n
"
,
fprintf
(
stderr
,
"%s: line %d: %s
:
\"
%s
\"
\n
"
,
fname
,
lineno
,
scherr2str
(
code
),
err
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -428,7 +428,7 @@ parse_at(
}
code
=
at_add
(
at
,
&
err
);
if
(
code
)
{
fprintf
(
stderr
,
"%s: line %d: %s
%s
\n
"
,
fprintf
(
stderr
,
"%s: line %d: %s
:
\"
%s
\"
\n
"
,
fname
,
lineno
,
scherr2str
(
code
),
err
);
exit
(
EXIT_FAILURE
);
}
...
...
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