Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
dab0793d
Commit
dab0793d
authored
May 27, 2000
by
Kurt Zeilenga
Browse files
Working test001 and test002.
parent
b7604301
Changes
3
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-ldbm/search.c
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
);
}
servers/slapd/schema/core.schema
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 )
...
...
servers/slapd/schemaparse.c
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
);
}
...
...
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