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
1086ffb4
Commit
1086ffb4
authored
Aug 29, 2002
by
Kurt Zeilenga
Browse files
Round one of subclass indexing for objectClass and structualObjectClasss.
add soc_cname to ObjectClass structure
parent
b9cd3616
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
servers/slapd/oc.c
View file @
1086ffb4
...
...
@@ -434,6 +434,13 @@ oc_add(
soc
=
(
ObjectClass
*
)
ch_calloc
(
1
,
sizeof
(
ObjectClass
)
);
AC_MEMCPY
(
&
soc
->
soc_oclass
,
oc
,
sizeof
(
LDAPObjectClass
)
);
if
(
oc
->
oc_names
!=
NULL
)
{
soc
->
soc_cname
.
bv_val
=
soc
->
soc_names
[
0
];
}
else
{
soc
->
soc_cname
.
bv_val
=
soc
->
soc_oid
;
}
soc
->
soc_cname
.
bv_len
=
strlen
(
soc
->
soc_cname
.
bv_val
);
if
(
soc
->
soc_sup_oids
==
NULL
&&
soc
->
soc_kind
==
LDAP_SCHEMA_STRUCTURAL
)
{
...
...
servers/slapd/proto-slap.h
View file @
1086ffb4
...
...
@@ -893,6 +893,24 @@ LDAP_SLAPD_V( int ) schema_init_done;
LDAP_SLAPD_F
(
int
)
slap_schema_init
LDAP_P
((
void
));
LDAP_SLAPD_F
(
void
)
schema_destroy
LDAP_P
((
void
));
LDAP_SLAPD_F
(
int
)
octetStringIndexer
(
slap_mask_t
use
,
slap_mask_t
flags
,
Syntax
*
syntax
,
MatchingRule
*
mr
,
struct
berval
*
prefix
,
BerVarray
values
,
BerVarray
*
keysp
);
LDAP_SLAPD_F
(
int
)
octetStringFilter
(
slap_mask_t
use
,
slap_mask_t
flags
,
Syntax
*
syntax
,
MatchingRule
*
mr
,
struct
berval
*
prefix
,
void
*
assertValue
,
BerVarray
*
keysp
);
/*
* schema_prep.c
*/
...
...
servers/slapd/schema_init.c
View file @
1086ffb4
...
...
@@ -37,7 +37,7 @@
/* recycled matching routines */
#define bitStringMatch octetStringMatch
#define numericStringMatch caseIgnoreIA5Match
#define objectIdentifierMatch
caseIgnoreIA5
Match
#define objectIdentifierMatch
octetString
Match
#define telephoneNumberMatch caseIgnoreIA5Match
#define telephoneNumberSubstringsMatch caseIgnoreIA5SubstringsMatch
#define generalizedTimeMatch caseIgnoreIA5Match
...
...
@@ -138,7 +138,7 @@ octetStringMatch(
}
/* Index generation function */
static
int
octetStringIndexer
(
int
octetStringIndexer
(
slap_mask_t
use
,
slap_mask_t
flags
,
Syntax
*
syntax
,
...
...
@@ -186,6 +186,7 @@ static int octetStringIndexer(
}
keys
[
i
].
bv_val
=
NULL
;
keys
[
i
].
bv_len
=
0
;
*
keysp
=
keys
;
...
...
@@ -193,7 +194,7 @@ static int octetStringIndexer(
}
/* Index generation function */
static
int
octetStringFilter
(
int
octetStringFilter
(
slap_mask_t
use
,
slap_mask_t
flags
,
Syntax
*
syntax
,
...
...
@@ -231,6 +232,7 @@ static int octetStringFilter(
ber_dupbv
(
keys
,
&
digest
);
keys
[
1
].
bv_val
=
NULL
;
keys
[
1
].
bv_len
=
0
;
*
keysp
=
keys
;
...
...
servers/slapd/schema_prep.c
View file @
1086ffb4
This diff is collapsed.
Click to expand it.
servers/slapd/slap.h
View file @
1086ffb4
...
...
@@ -505,7 +505,8 @@ typedef int (ObjectClassSchemaCheckFN)(
char
*
textbuf
,
size_t
textlen
);
typedef
struct
slap_object_class
{
LDAPObjectClass
soc_oclass
;
LDAPObjectClass
soc_oclass
;
struct
berval
soc_cname
;
struct
slap_object_class
**
soc_sups
;
AttributeType
**
soc_required
;
AttributeType
**
soc_allowed
;
...
...
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