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
88737d90
Commit
88737d90
authored
19 years ago
by
Luke Howard
Browse files
Options
Downloads
Patches
Plain Diff
more cleanups
parent
f302b9ee
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/slapi/TODO
+1
-1
1 addition, 1 deletion
servers/slapd/slapi/TODO
servers/slapd/slapi/plugin.c
+13
-21
13 additions, 21 deletions
servers/slapd/slapi/plugin.c
with
14 additions
and
22 deletions
servers/slapd/slapi/TODO
+
1
−
1
View file @
88737d90
...
...
@@ -10,7 +10,7 @@
- This is a very tough task: try to implement a sandbox to execute
plugins in, trap deadly signals and possibly disable unsafe plugins
without crashing slapd (fork from inside thread? trap signals
and longjump to next plugin execution? Brrr).
and longjump to next plugin execution? Brrr).
---
$OpenLDAP$
This diff is collapsed.
Click to expand it.
servers/slapd/slapi/plugin.c
+
13
−
21
View file @
88737d90
...
...
@@ -70,9 +70,9 @@ plugin_pblock_new(
Slapi_PluginDesc
*
pPluginDesc
=
NULL
;
lt_dlhandle
hdLoadHandle
;
int
rc
;
char
**
av2
=
NULL
,
**
ppPluginArgv
;
char
*
path
=
argv
[
2
];
char
*
initfunc
=
argv
[
3
];
char
**
av2
=
NULL
,
**
ppPluginArgv
;
char
*
path
=
argv
[
2
];
char
*
initfunc
=
argv
[
3
];
pPlugin
=
slapi_pblock_new
();
if
(
pPlugin
==
NULL
)
{
...
...
@@ -146,9 +146,9 @@ slapi_int_register_plugin(
Backend
*
be
,
Slapi_PBlock
*
pPB
)
{
Slapi_PBlock
*
pTmpPB
;
Slapi_PBlock
*
pSavePB
;
int
rc
=
LDAP_SUCCESS
;
Slapi_PBlock
*
pTmpPB
;
Slapi_PBlock
*
pSavePB
;
int
rc
=
LDAP_SUCCESS
;
assert
(
be
!=
NULL
);
...
...
@@ -273,14 +273,12 @@ createExtendedOp()
{
ExtendedOp
*
ret
;
ret
=
(
ExtendedOp
*
)
ch_malloc
(
sizeof
(
ExtendedOp
));
if
(
ret
!=
NULL
)
{
ret
->
ext_oid
.
bv_val
=
NULL
;
ret
->
ext_oid
.
bv_len
=
0
;
ret
->
ext_func
=
NULL
;
ret
->
ext_be
=
NULL
;
ret
->
ext_next
=
NULL
;
}
ret
=
(
ExtendedOp
*
)
slapi_ch_malloc
(
sizeof
(
ExtendedOp
));
ret
->
ext_oid
.
bv_val
=
NULL
;
ret
->
ext_oid
.
bv_len
=
0
;
ret
->
ext_func
=
NULL
;
ret
->
ext_be
=
NULL
;
ret
->
ext_next
=
NULL
;
return
ret
;
}
...
...
@@ -600,12 +598,6 @@ slapi_int_call_plugins(
}
for
(
pGetPlugin
=
tmpPlugin
;
*
pGetPlugin
!=
NULL
;
pGetPlugin
++
)
{
/*
* FIXME: we should provide here a sort of sandbox,
* to protect from plugin faults; e.g. trap signals
* and longjump here, marking the plugin as unsafe for
* later executions ...
*/
rc
=
(
*
pGetPlugin
)(
pPB
);
/*
...
...
@@ -757,7 +749,7 @@ slapi_int_initialize(void)
return
-
1
;
}
slapi_log_file
=
ch_strdup
(
LDAP_RUNDIR
LDAP_DIRSEP
"errors"
);
slapi_log_file
=
slapi_
ch_strdup
(
LDAP_RUNDIR
LDAP_DIRSEP
"errors"
);
if
(
slapi_log_file
==
NULL
)
{
return
-
1
;
}
...
...
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