Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
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
openldap
OpenLDAP
Commits
afdae427
Commit
afdae427
authored
18 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
don't run useless (and likely to fail) checks, if possible
parent
e172835b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-bdb/add.c
+38
-35
38 additions, 35 deletions
servers/slapd/back-bdb/add.c
with
38 additions
and
35 deletions
servers/slapd/back-bdb/add.c
+
38
−
35
View file @
afdae427
...
...
@@ -237,44 +237,47 @@ retry: /* transaction retry */
goto
return_results
;;
}
if
(
is_entry_subentry
(
p
)
)
{
/* parent is a subentry, don't allow add */
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": parent is subentry
\n
"
,
0
,
0
,
0
);
rs
->
sr_err
=
LDAP_OBJECT_CLASS_VIOLATION
;
rs
->
sr_text
=
"parent is a subentry"
;
goto
return_results
;;
}
if
(
is_entry_alias
(
p
)
)
{
/* parent is an alias, don't allow add */
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": parent is alias
\n
"
,
0
,
0
,
0
);
rs
->
sr_err
=
LDAP_ALIAS_PROBLEM
;
rs
->
sr_text
=
"parent is an alias"
;
goto
return_results
;;
}
if
(
p
!=
(
Entry
*
)
&
slap_entry_root
)
{
if
(
is_entry_subentry
(
p
)
)
{
/* parent is a subentry, don't allow add */
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": parent is subentry
\n
"
,
0
,
0
,
0
);
rs
->
sr_err
=
LDAP_OBJECT_CLASS_VIOLATION
;
rs
->
sr_text
=
"parent is a subentry"
;
goto
return_results
;;
}
if
(
is_entry_referral
(
p
)
)
{
/* parent is a referral, don't allow add */
rs
->
sr_matched
=
ber_strdup_x
(
p
->
e_name
.
bv_val
,
op
->
o_tmpmemctx
);
rs
->
sr_ref
=
get_entry_referrals
(
op
,
p
);
bdb_unlocked_cache_return_entry_r
(
&
bdb
->
bi_cache
,
p
);
p
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": parent is referral
\n
"
,
0
,
0
,
0
);
if
(
is_entry_alias
(
p
)
)
{
/* parent is an alias, don't allow add */
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": parent is alias
\n
"
,
0
,
0
,
0
);
rs
->
sr_err
=
LDAP_ALIAS_PROBLEM
;
rs
->
sr_text
=
"parent is an alias"
;
goto
return_results
;;
}
rs
->
sr_err
=
LDAP_REFERRAL
;
rs
->
sr_flags
=
REP_MATCHED_MUSTBEFREED
|
REP_REF_MUSTBEFREED
;
goto
return_results
;
}
if
(
is_entry_referral
(
p
)
)
{
/* parent is a referral, don't allow add */
rs
->
sr_matched
=
ber_strdup_x
(
p
->
e_name
.
bv_val
,
op
->
o_tmpmemctx
);
rs
->
sr_ref
=
get_entry_referrals
(
op
,
p
);
bdb_unlocked_cache_return_entry_r
(
&
bdb
->
bi_cache
,
p
);
p
=
NULL
;
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": parent is referral
\n
"
,
0
,
0
,
0
);
if
(
subentry
)
{
/* FIXME: */
/* parent must be an administrative point of the required kind */
rs
->
sr_err
=
LDAP_REFERRAL
;
rs
->
sr_flags
=
REP_MATCHED_MUSTBEFREED
|
REP_REF_MUSTBEFREED
;
goto
return_results
;
}
if
(
subentry
)
{
/* FIXME: */
/* parent must be an administrative point of the required kind */
}
}
/* free parent and reader lock */
...
...
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