projects
/
project
/
rpcd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
plugin: use RTLD_LOCAL instead of RTLD_GLOBAL when loading library
[project/rpcd.git]
/
plugin.c
diff --git
a/plugin.c
b/plugin.c
index
b75241a
..
532fa15
100644
(file)
--- a/
plugin.c
+++ b/
plugin.c
@@
-324,7
+324,9
@@
rpc_plugin_parse_exec(const char *name, int fd)
if (!obj_type)
return NULL;
if (!obj_type)
return NULL;
- asprintf((char **)&obj_type->name, "luci-rpc-plugin-%s", name);
+ if (asprintf((char **)&obj_type->name, "luci-rpc-plugin-%s", name) < 0)
+ return NULL;
+
obj_type->methods = methods;
obj_type->n_methods = n_method;
obj_type->methods = methods;
obj_type->n_methods = n_method;
@@
-410,7
+412,7
@@
rpc_plugin_register_library(struct ubus_context *ctx, const char *path)
struct rpc_plugin *p;
void *dlh;
struct rpc_plugin *p;
void *dlh;
- dlh = dlopen(path, RTLD_LAZY | RTLD_
GLOB
AL);
+ dlh = dlopen(path, RTLD_LAZY | RTLD_
LOC
AL);
if (!dlh)
return UBUS_STATUS_UNKNOWN_ERROR;
if (!dlh)
return UBUS_STATUS_UNKNOWN_ERROR;