mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +03:00
r23065: revert local includes to prevent security problems (at least
temporarily...)
rafal
(This used to be commit 0ecb8fd81e)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
615fea1c5c
commit
5088c8add2
@@ -124,23 +124,6 @@ static int ejs_libinclude(int eid, int argc, char **argv)
|
|||||||
char *path, *emsg;
|
char *path, *emsg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* First, try to include file from current working directory.
|
|
||||||
This allows local includes which is handy sometimes. */
|
|
||||||
path = talloc_asprintf(mprMemCtx(), "%s", script);
|
|
||||||
if (path == NULL) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exist(path)) {
|
|
||||||
ret = ejsEvalFile(eid, path, &result, &emsg);
|
|
||||||
talloc_free(path);
|
|
||||||
if (ret < 0) {
|
|
||||||
ejsSetErrorMsg(eid, "%s: %s", script, emsg);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* use specfied path to search for requested file */
|
/* use specfied path to search for requested file */
|
||||||
for (j=0;js_include[j];j++) {
|
for (j=0;js_include[j];j++) {
|
||||||
path = talloc_asprintf(mprMemCtx(), "%s/%s", js_include[j], script);
|
path = talloc_asprintf(mprMemCtx(), "%s/%s", js_include[j], script);
|
||||||
|
|||||||
Reference in New Issue
Block a user