Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
726d603a
Commit
726d603a
authored
Jul 17, 1999
by
Kurt Zeilenga
Browse files
ldap_modify: delete of last attribute value should delete attribute (ITS#229)
parent
54689c93
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb2/modify.c
View file @
726d603a
...
...
@@ -355,6 +355,17 @@ bdb2i_delete_values(
a
->
a_vals
[
k
-
1
]
=
a
->
a_vals
[
k
];
}
a
->
a_vals
[
k
-
1
]
=
NULL
;
/* delete the entire attribute, if no values remain */
if
(
a
->
a_vals
[
0
]
==
NULL
)
{
Debug
(
LDAP_DEBUG_ARGS
,
"removing entire attribute %s
\n
"
,
mod
->
mod_type
,
0
,
0
);
if
(
attr_delete
(
&
e
->
e_attrs
,
mod
->
mod_type
)
)
{
return
LDAP_NO_SUCH_ATTRIBUTE
;
}
}
break
;
}
...
...
servers/slapd/back-ldbm/modify.c
View file @
726d603a
...
...
@@ -367,6 +367,17 @@ delete_values(
a
->
a_vals
[
k
-
1
]
=
a
->
a_vals
[
k
];
}
a
->
a_vals
[
k
-
1
]
=
NULL
;
/* delete the entire attribute, if no values remain */
if
(
a
->
a_vals
[
0
]
==
NULL
)
{
Debug
(
LDAP_DEBUG_ARGS
,
"removing entire attribute %s
\n
"
,
mod
->
mod_type
,
0
,
0
);
if
(
attr_delete
(
&
e
->
e_attrs
,
mod
->
mod_type
)
)
{
return
LDAP_NO_SUCH_ATTRIBUTE
;
}
}
break
;
}
...
...
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