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
Dimitar Stoychev
OpenLDAP
Commits
b793be6a
Commit
b793be6a
authored
22 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
slapi cleanup
parent
446f4031
No related branches found
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/extended.c
+57
-25
57 additions, 25 deletions
servers/slapd/extended.c
with
57 additions
and
25 deletions
servers/slapd/extended.c
+
57
−
25
View file @
b793be6a
...
...
@@ -110,9 +110,9 @@ do_extended(
Slapi_PBlock
*
pb
=
op
->
o_pb
;
SLAPI_FUNC
funcAddr
=
NULL
;
int
extop_rc
;
int
msg_sent
=
FALSE
;
char
*
result_msg
=
""
;
#endif
/* defined(LDAP_SLAPI) */
int
msg_sent
=
FALSE
;
char
*
result_msg
=
""
;
#endif
/* defined(LDAP_SLAPI) */
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
ENTRY
,
"do_extended: conn %d
\n
"
,
conn
->
c_connid
,
0
,
0
);
...
...
@@ -253,36 +253,68 @@ do_extended(
goto
done
;
/* end of OpenLDAP extended operation */
}
else
{
/* start of Netscape extended operation */
if
(
(
rc
=
slapi_pblock_set
(
pb
,
SLAPI_EXT_OP_REQ_OID
,(
void
*
)
reqoid
.
bv_val
)
)
==
0
&&
(
rc
=
slapi_pblock_set
(
pb
,
SLAPI_EXT_OP_REQ_VALUE
,(
void
*
)
&
reqdata
)
)
==
0
&&
(
rc
=
slapi_pblock_set
(
pb
,
SLAPI_CONNECTION
,(
void
*
)
conn
)
)
==
0
&&
(
rc
=
slapi_pblock_set
(
pb
,
SLAPI_OPERATION
,
(
void
*
)
op
)
)
==
0
)
{
extop_rc
=
(
*
funcAddr
)(
pb
);
if
(
extop_rc
==
SLAPI_PLUGIN_EXTENDED_SENT_RESULT
)
{
msg_sent
=
TRUE
;
}
else
if
(
extop_rc
==
SLAPI_PLUGIN_EXTENDED_NOT_HANDLED
)
{
rc
=
LDAP_PROTOCOL_ERROR
;
result_msg
=
UNSUPPORTED_EXTENDEDOP
;
}
else
{
if
(
(
rc
=
slapi_pblock_get
(
pb
,
SLAPI_EXT_OP_RET_OID
,
&
rspoid
)
)
==
0
&&
(
rc
=
slapi_pblock_get
(
pb
,
SLAPI_EXT_OP_RET_VALUE
,
&
rspdata
)
)
==
0
)
{
send_ldap_extended
(
conn
,
op
,
extop_rc
,
NULL
,
text
,
refs
,
rspoid
,
rspdata
,
rspctrls
);
msg_sent
=
TRUE
;
}
else
{
rc
=
LDAP_OPERATIONS_ERROR
;
}
}
}
else
{
rc
=
slapi_pblock_set
(
pb
,
SLAPI_EXT_OP_REQ_OID
,
(
void
*
)
reqoid
.
bv_val
);
if
(
rc
!=
LDAP_SUCCESS
)
{
rc
=
LDAP_OPERATIONS_ERROR
;
goto
done
;
}
rc
=
slapi_pblock_set
(
pb
,
SLAPI_EXT_OP_REQ_VALUE
,
(
void
*
)
&
reqdata
);
if
(
rc
!=
LDAP_SUCCESS
)
{
rc
=
LDAP_OPERATIONS_ERROR
;
goto
done
;
}
rc
=
slapi_pblock_set
(
pb
,
SLAPI_CONNECTION
,
(
void
*
)
conn
);
if
(
rc
!=
LDAP_SUCCESS
)
{
rc
=
LDAP_OPERATIONS_ERROR
;
goto
done
;
}
rc
=
slapi_pblock_set
(
pb
,
SLAPI_OPERATION
,
(
void
*
)
op
);
if
(
rc
!=
LDAP_SUCCESS
)
{
rc
=
LDAP_OPERATIONS_ERROR
;
goto
done
;
}
extop_rc
=
(
*
funcAddr
)(
pb
);
if
(
extop_rc
==
SLAPI_PLUGIN_EXTENDED_SENT_RESULT
)
{
msg_sent
=
TRUE
;
}
else
if
(
extop_rc
==
SLAPI_PLUGIN_EXTENDED_NOT_HANDLED
)
{
rc
=
LDAP_PROTOCOL_ERROR
;
result_msg
=
UNSUPPORTED_EXTENDEDOP
;
}
else
{
rc
=
slapi_pblock_get
(
pb
,
SLAPI_EXT_OP_RET_OID
,
&
rspoid
);
if
(
rc
!=
LDAP_SUCCESS
)
{
goto
done2
;
}
rc
=
slapi_pblock_get
(
pb
,
SLAPI_EXT_OP_RET_VALUE
,
&
rspdata
);
if
(
rc
!=
LDAP_SUCCESS
)
{
goto
done2
;
}
send_ldap_extended
(
conn
,
op
,
extop_rc
,
NULL
,
text
,
refs
,
rspoid
,
rspdata
,
rspctrls
);
msg_sent
=
TRUE
;
}
done2:
;
if
(
rc
!=
LDAP_SUCCESS
&&
msg_sent
==
FALSE
)
{
send_ldap_result
(
conn
,
op
,
rc
,
NULL
,
result_msg
,
NULL
,
NULL
);
send_ldap_result
(
conn
,
op
,
rc
,
NULL
,
result_msg
,
NULL
,
NULL
);
}
if
(
rspoid
!=
NULL
)
{
free
(
rspoid
);
}
if
(
rspdata
!=
NULL
)
{
ber_bvfree
(
rspdata
);
}
...
...
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