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
openldap
OpenLDAP
Commits
12e11c9b
Commit
12e11c9b
authored
Aug 18, 2020
by
Howard Chu
Committed by
Quanah Gibson-Mount
Aug 18, 2020
Browse files
ITS
#9121
slapo-dynlist, -memberof: define memberOf if needed
Ignore if it's defined already. Make it no-user-mod.
parent
9d2f1530
Pipeline
#711
passed with stage
in 28 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/dynlist.c
View file @
12e11c9b
...
...
@@ -37,6 +37,7 @@
#include "lutil.h"
static
AttributeDescription
*
ad_dgIdentity
,
*
ad_dgAuthz
;
static
AttributeDescription
*
ad_memberOf
;
typedef
struct
dynlist_map_t
{
AttributeDescription
*
dlm_member_ad
;
...
...
@@ -2626,8 +2627,29 @@ static
int
dynlist_initialize
(
void
)
{
const
char
*
text
;
int
rc
=
0
;
/* See if we need to define memberOf opattr */
rc
=
slap_str2ad
(
"memberOf"
,
&
ad_memberOf
,
&
text
);
if
(
rc
)
{
rc
=
register_at
(
"( 1.2.840.113556.1.2.102 "
"NAME 'memberOf' "
"DESC 'Group that the entry belongs to' "
"SYNTAX '1.3.6.1.4.1.1466.115.121.1.12' "
"EQUALITY distinguishedNameMatch "
/* added */
"USAGE dSAOperation "
/* added; questioned */
"NO-USER-MODIFICATION "
/* added */
"X-ORIGIN 'iPlanet Delegated Administrator' )"
,
&
ad_memberOf
,
0
);
if
(
rc
)
{
Debug
(
LDAP_DEBUG_ANY
,
"dynlist_initialize: register_at (memberOf) failed
\n
"
);
return
rc
;
}
}
dynlist
.
on_bi
.
bi_type
=
"dynlist"
;
#ifdef TAKEOVER_DYNGROUP
...
...
servers/slapd/overlays/memberof.c
View file @
12e11c9b
...
...
@@ -2155,7 +2155,7 @@ static struct {
"SYNTAX '1.3.6.1.4.1.1466.115.121.1.12' "
"EQUALITY distinguishedNameMatch "
/* added */
"USAGE dSAOperation "
/* added; questioned */
/*
"NO-USER-MODIFICATION "
*/
/* add
?
*/
"NO-USER-MODIFICATION "
/* add
ed
*/
"X-ORIGIN 'iPlanet Delegated Administrator' )"
,
&
ad_memberOf
},
{
NULL
}
...
...
@@ -2170,8 +2170,8 @@ memberof_initialize( void )
int
code
,
i
;
for
(
i
=
0
;
as
[
i
].
desc
!=
NULL
;
i
++
)
{
code
=
register_at
(
as
[
i
].
desc
,
as
[
i
].
adp
,
0
);
if
(
code
)
{
code
=
register_at
(
as
[
i
].
desc
,
as
[
i
].
adp
,
1
);
if
(
code
&&
code
!=
SLAP_SCHERR_ATTR_DUP
)
{
Debug
(
LDAP_DEBUG_ANY
,
"memberof_initialize: register_at #%d failed
\n
"
,
i
);
...
...
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