Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Dragoș Haiduc
OpenLDAP
Commits
e3b93c75
Commit
e3b93c75
authored
23 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Import str2ad error text bug
parent
c0de0686
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/modify.c
+13
-2
13 additions, 2 deletions
servers/slapd/modify.c
with
13 additions
and
2 deletions
servers/slapd/modify.c
+
13
−
2
View file @
e3b93c75
...
@@ -70,6 +70,7 @@ do_modify(
...
@@ -70,6 +70,7 @@ do_modify(
if
(
ber_scanf
(
op
->
o_ber
,
"{a"
/*}*/
,
&
dn
)
==
LBER_ERROR
)
{
if
(
ber_scanf
(
op
->
o_ber
,
"{a"
/*}*/
,
&
dn
)
==
LBER_ERROR
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: ber_scanf failed
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: ber_scanf failed
\n
"
,
0
,
0
,
0
);
send_ldap_disconnect
(
conn
,
op
,
send_ldap_disconnect
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
"decoding error"
);
LDAP_PROTOCOL_ERROR
,
"decoding error"
);
return
SLAPD_DISCONNECT
;
return
SLAPD_DISCONNECT
;
...
@@ -77,6 +78,7 @@ do_modify(
...
@@ -77,6 +78,7 @@ do_modify(
Debug
(
LDAP_DEBUG_ARGS
,
"do_modify: dn (%s)
\n
"
,
dn
,
0
,
0
);
Debug
(
LDAP_DEBUG_ARGS
,
"do_modify: dn (%s)
\n
"
,
dn
,
0
,
0
);
/* collect modifications & save for later */
/* collect modifications & save for later */
for
(
tag
=
ber_first_element
(
op
->
o_ber
,
&
len
,
&
last
);
for
(
tag
=
ber_first_element
(
op
->
o_ber
,
&
len
,
&
last
);
...
@@ -103,6 +105,7 @@ do_modify(
...
@@ -103,6 +105,7 @@ do_modify(
Debug
(
LDAP_DEBUG_ANY
,
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: modify/add operation (%ld) requires values
\n
"
,
"do_modify: modify/add operation (%ld) requires values
\n
"
,
(
long
)
mop
,
0
,
0
);
(
long
)
mop
,
0
,
0
);
send_ldap_result
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
send_ldap_result
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
NULL
,
"modify/add operation requires values"
,
NULL
,
"modify/add operation requires values"
,
NULL
,
NULL
);
NULL
,
NULL
);
...
@@ -120,6 +123,7 @@ do_modify(
...
@@ -120,6 +123,7 @@ do_modify(
Debug
(
LDAP_DEBUG_ANY
,
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: invalid modify operation (%ld)
\n
"
,
"do_modify: invalid modify operation (%ld)
\n
"
,
(
long
)
mop
,
0
,
0
);
(
long
)
mop
,
0
,
0
);
send_ldap_result
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
send_ldap_result
(
conn
,
op
,
LDAP_PROTOCOL_ERROR
,
NULL
,
"unrecognized modify operation"
,
NULL
,
NULL
);
NULL
,
"unrecognized modify operation"
,
NULL
,
NULL
);
rc
=
LDAP_PROTOCOL_ERROR
;
rc
=
LDAP_PROTOCOL_ERROR
;
...
@@ -134,6 +138,7 @@ do_modify(
...
@@ -134,6 +138,7 @@ do_modify(
if
(
(
rc
=
get_ctrls
(
conn
,
op
,
1
))
!=
LDAP_SUCCESS
)
{
if
(
(
rc
=
get_ctrls
(
conn
,
op
,
1
))
!=
LDAP_SUCCESS
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: get_ctrls failed
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: get_ctrls failed
\n
"
,
0
,
0
,
0
);
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -141,6 +146,7 @@ do_modify(
...
@@ -141,6 +146,7 @@ do_modify(
if
(
dn_normalize
(
ndn
)
==
NULL
)
{
if
(
dn_normalize
(
ndn
)
==
NULL
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: invalid dn (%s)
\n
"
,
dn
,
0
,
0
);
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: invalid dn (%s)
\n
"
,
dn
,
0
,
0
);
send_ldap_result
(
conn
,
op
,
rc
=
LDAP_INVALID_DN_SYNTAX
,
NULL
,
send_ldap_result
(
conn
,
op
,
rc
=
LDAP_INVALID_DN_SYNTAX
,
NULL
,
"invalid DN"
,
NULL
,
NULL
);
"invalid DN"
,
NULL
,
NULL
);
goto
cleanup
;
goto
cleanup
;
...
@@ -148,6 +154,7 @@ do_modify(
...
@@ -148,6 +154,7 @@ do_modify(
if
(
ndn
==
'\0'
)
{
if
(
ndn
==
'\0'
)
{
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: root dse!
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_ANY
,
"do_modify: root dse!
\n
"
,
0
,
0
,
0
);
send_ldap_result
(
conn
,
op
,
rc
=
LDAP_UNWILLING_TO_PERFORM
,
send_ldap_result
(
conn
,
op
,
rc
=
LDAP_UNWILLING_TO_PERFORM
,
NULL
,
"modify upon the root DSE not supported"
,
NULL
,
NULL
);
NULL
,
"modify upon the root DSE not supported"
,
NULL
,
NULL
);
goto
cleanup
;
goto
cleanup
;
...
@@ -155,11 +162,13 @@ do_modify(
...
@@ -155,11 +162,13 @@ do_modify(
#ifdef LDAP_DEBUG
#ifdef LDAP_DEBUG
Debug
(
LDAP_DEBUG_ARGS
,
"modifications:
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_ARGS
,
"modifications:
\n
"
,
0
,
0
,
0
);
for
(
tmp
=
modlist
;
tmp
!=
NULL
;
tmp
=
tmp
->
ml_next
)
{
for
(
tmp
=
modlist
;
tmp
!=
NULL
;
tmp
=
tmp
->
ml_next
)
{
Debug
(
LDAP_DEBUG_ARGS
,
"
\t
%s: %s
\n
"
,
Debug
(
LDAP_DEBUG_ARGS
,
"
\t
%s: %s
\n
"
,
tmp
->
ml_op
==
LDAP_MOD_ADD
tmp
->
ml_op
==
LDAP_MOD_ADD
?
"add"
:
(
tmp
->
ml_op
==
LDAP_MOD_DELETE
?
"add"
:
(
tmp
->
ml_op
==
LDAP_MOD_DELETE
?
"delete"
:
"replace"
),
tmp
->
ml_type
,
0
);
?
"delete"
:
"replace"
),
tmp
->
ml_type
,
0
);
}
}
#endif
#endif
...
@@ -288,7 +297,8 @@ int slap_modlist2mods(
...
@@ -288,7 +297,8 @@ int slap_modlist2mods(
int
update
,
int
update
,
Modifications
**
mods
,
Modifications
**
mods
,
const
char
**
text
,
const
char
**
text
,
char
*
textbuf
,
size_t
textlen
)
char
*
textbuf
,
size_t
textlen
)
{
{
int
rc
;
int
rc
;
Modifications
**
modtail
=
mods
;
Modifications
**
modtail
=
mods
;
...
@@ -308,7 +318,8 @@ int slap_modlist2mods(
...
@@ -308,7 +318,8 @@ int slap_modlist2mods(
if
(
rc
!=
LDAP_SUCCESS
)
{
if
(
rc
!=
LDAP_SUCCESS
)
{
slap_mods_free
(
mod
);
slap_mods_free
(
mod
);
snprintf
(
textbuf
,
textlen
,
"%s: %s"
,
ml
->
ml_type
,
text
);
snprintf
(
textbuf
,
textlen
,
"%s: %s"
,
ml
->
ml_type
,
*
text
);
*
text
=
textbuf
;
*
text
=
textbuf
;
return
rc
;
return
rc
;
}
}
...
...
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