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
e01031b3
Commit
e01031b3
authored
Jul 15, 2003
by
Luke Howard
Browse files
Set AttributeDescription in slapi_acl_check_mods()
parent
53b7e6fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/slapi/slapi_utils.c
View file @
e01031b3
...
...
@@ -3144,9 +3144,8 @@ int slapi_acl_check_mods(Slapi_PBlock *pb, Slapi_Entry *e, LDAPMod **mods, char
{
#ifdef LDAP_SLAPI
Operation
*
op
;
int
ret
;
Modifications
*
ml
;
Modifications
*
next
;
int
rc
=
LDAP_SUCCESS
;
Modifications
*
ml
,
*
mp
;
if
(
slapi_pblock_get
(
pb
,
SLAPI_OPERATION
,
(
void
*
)
&
op
)
!=
0
)
{
return
LDAP_PARAM_ERROR
;
...
...
@@ -3157,18 +3156,27 @@ int slapi_acl_check_mods(Slapi_PBlock *pb, Slapi_Entry *e, LDAPMod **mods, char
return
LDAP_OTHER
;
}
ret
=
acl_check_modlist
(
op
,
e
,
ml
);
for
(
mp
=
ml
;
mp
!=
NULL
;
mp
=
mp
->
sml_next
)
{
rc
=
slap_bv2ad
(
&
mp
->
sml_type
,
&
mp
->
sml_desc
,
(
const
char
**
)
errbuf
);
if
(
rc
!=
LDAP_SUCCESS
)
{
break
;
}
}
if
(
rc
==
LDAP_SUCCESS
)
{
rc
=
acl_check_modlist
(
op
,
e
,
ml
)
?
LDAP_SUCCESS
:
LDAP_INSUFFICIENT_ACCESS
;
}
/* Careful when freeing the modlist because it has pointers into the mods array. */
for
(
;
ml
!=
NULL
;
ml
=
next
)
{
next
=
ml
->
sml_next
;
for
(
;
ml
!=
NULL
;
ml
=
mp
)
{
mp
=
ml
->
sml_next
;
/* just free the containing array */
slapi_ch_free
(
(
void
**
)
&
ml
->
sml_bvalues
);
slapi_ch_free
(
(
void
**
)
&
ml
);
}
return
r
et
?
LDAP_SUCCESS
:
LDAP_INSUFFICIENT_ACCESS
;
return
r
c
;
#else
return
LDAP_UNWILLING_TO_PERFORM
;
#endif
...
...
@@ -3274,7 +3282,7 @@ Modifications *slapi_x_ldapmods2modifications (LDAPMod **mods)
}
if
(
i
==
0
)
{
mod
->
sml_bvalues
=
NULL
;
mod
->
sml_bvalues
=
NULL
;
}
else
{
mod
->
sml_bvalues
=
(
BerVarray
)
ch_malloc
(
(
i
+
1
)
*
sizeof
(
struct
berval
)
);
...
...
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