Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
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
Christopher Ng
OpenLDAP
Commits
9d6c0aa0
Commit
9d6c0aa0
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Allow replace with no values
dn: cn=foo changetype: modify replace: bar -
parent
5c5be8a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clients/tools/ldapmodify.c
+1
-0
1 addition, 0 deletions
clients/tools/ldapmodify.c
servers/slapd/modify.c
+11
-3
11 additions, 3 deletions
servers/slapd/modify.c
with
12 additions
and
3 deletions
clients/tools/ldapmodify.c
+
1
−
0
View file @
9d6c0aa0
...
...
@@ -463,6 +463,7 @@ process_ldif_rec( char *rbuf, int count )
goto
end_line
;
}
else
if
(
strcasecmp
(
type
,
T_MODOPREPLACESTR
)
==
0
)
{
modop
=
LDAP_MOD_REPLACE
;
addmodifyop
(
&
pmods
,
modop
,
value
,
NULL
,
0
);
goto
end_line
;
}
else
if
(
strcasecmp
(
type
,
T_MODOPDELETESTR
)
==
0
)
{
modop
=
LDAP_MOD_DELETE
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/modify.c
+
11
−
3
View file @
9d6c0aa0
...
...
@@ -124,6 +124,9 @@ do_modify(
(
*
modtail
)
->
ml_op
!=
LDAP_MOD_DELETE
&&
(
*
modtail
)
->
ml_op
!=
LDAP_MOD_REPLACE
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: invalid modify operation (%ld)
\n
"
,
(
long
)
(
*
modtail
)
->
ml_op
,
0
,
0
);
send_ldap_result
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
NULL
,
"unrecognized modify operation"
,
NULL
,
NULL
);
free
(
ndn
);
...
...
@@ -131,11 +134,16 @@ do_modify(
return
LDAP_PROTOCOL_ERROR
;
}
if
(
(
*
modtail
)
->
ml_bvalues
==
NULL
&&
(
*
modtail
)
->
ml_op
!=
LDAP_MOD_DELETE
)
if
(
(
*
modtail
)
->
ml_bvalues
==
NULL
&&
(
(
*
modtail
)
->
ml_op
!=
LDAP_MOD_REPLACE
&&
(
*
modtail
)
->
ml_op
!=
LDAP_MOD_DELETE
)
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: invalid modify operation (%ld) without values
\n
"
,
(
long
)
(
*
modtail
)
->
ml_op
,
0
,
0
);
send_ldap_result
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
NULL
,
"unrecognized modify operation"
,
NULL
,
NULL
);
NULL
,
"unrecognized modify operation without values"
,
NULL
,
NULL
);
free
(
ndn
);
modlist_free
(
modlist
);
return
LDAP_PROTOCOL_ERROR
;
...
...
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