Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
3f9e8eee
Commit
3f9e8eee
authored
Nov 11, 2009
by
Howard Chu
Browse files
ITS
#6373
more for subentry creation
parent
9ad558b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/syncprov.c
View file @
3f9e8eee
...
...
@@ -1400,8 +1400,8 @@ syncprov_checkpoint( Operation *op, SlapReply *rs, slap_overinst *on )
opm
.
o_no_schema_check
=
1
;
opm
.
o_bd
->
be_modify
(
&
opm
,
&
rsm
);
/* Should only happen with SYNC_USE_SUBENTRY */
if
(
rsm
.
sr_err
==
LDAP_NO_SUCH_OBJECT
)
{
if
(
rsm
.
sr_err
==
LDAP_NO_SUCH_OBJECT
&&
SLAP_SYNC_SUBENTRY
(
opm
.
o_bd
)
)
{
const
char
*
text
;
char
txtbuf
[
SLAP_TEXT_BUFLEN
];
size_t
textlen
=
sizeof
txtbuf
;
...
...
servers/slapd/slapadd.c
View file @
3f9e8eee
...
...
@@ -438,10 +438,32 @@ slapadd( int argc, char **argv )
}
if
(
rc
==
EXIT_SUCCESS
&&
update_ctxcsn
&&
!
dryrun
&&
sid
!=
SLAP_SYNC_SID_MAX
+
1
)
{
ctxcsn_id
=
be
->
be_dn2id_get
(
be
,
be
->
be_nsuffix
);
struct
berval
ctxdn
;
if
(
SLAP_SYNC_SUBENTRY
(
be
))
{
build_new_dn
(
&
ctxdn
,
&
be
->
be_nsuffix
[
0
],
(
struct
berval
*
)
&
slap_ldapsync_cn_bv
,
NULL
);
}
else
{
ctxdn
=
be
->
be_nsuffix
[
0
];
}
ctxcsn_id
=
be
->
be_dn2id_get
(
be
,
&
ctxdn
);
if
(
ctxcsn_id
==
NOID
)
{
fprintf
(
stderr
,
"%s: context entry is missing
\n
"
,
progname
);
rc
=
EXIT_FAILURE
;
if
(
SLAP_SYNC_SUBENTRY
(
be
))
{
ctxcsn_e
=
slap_create_context_csn_entry
(
be
,
NULL
);
for
(
sid
=
0
;
sid
<=
SLAP_SYNC_SID_MAX
;
sid
++
)
{
if
(
maxcsn
[
sid
].
bv_len
)
{
attr_merge_one
(
ctxcsn_e
,
slap_schema
.
si_ad_contextCSN
,
&
maxcsn
[
sid
],
NULL
);
}
}
ctxcsn_id
=
be
->
be_entry_put
(
be
,
ctxcsn_e
,
&
bvtext
);
if
(
ctxcsn_id
==
NOID
)
{
fprintf
(
stderr
,
"%s: couldn't create context entry
\n
"
,
progname
);
rc
=
EXIT_FAILURE
;
}
}
else
{
fprintf
(
stderr
,
"%s: context entry is missing
\n
"
,
progname
);
rc
=
EXIT_FAILURE
;
}
}
else
{
ctxcsn_e
=
be
->
be_entry_get
(
be
,
ctxcsn_id
);
if
(
ctxcsn_e
!=
NULL
)
{
...
...
servers/slapd/syncrepl.c
View file @
3f9e8eee
...
...
@@ -3062,8 +3062,8 @@ syncrepl_updateCookie(
op
->
orm_no_opattrs
=
1
;
rc
=
op
->
o_bd
->
be_modify
(
op
,
&
rs_modify
);
/* Should only happen when SYNC_USE_SUBENTRY */
if
(
rs_modify
.
sr_err
==
LDAP_NO_SUCH_OBJECT
)
{
if
(
rs_modify
.
sr_err
==
LDAP_NO_SUCH_OBJECT
&&
SLAP_SYNC_SUBENTRY
(
op
->
o_bd
)
)
{
const
char
*
text
;
char
txtbuf
[
SLAP_TEXT_BUFLEN
];
size_t
textlen
=
sizeof
txtbuf
;
...
...
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