]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r23065: revert local includes to prevent security problems (at least
authorRafal Szczesniak <mimir@samba.org>
Tue, 22 May 2007 06:34:14 +0000 (06:34 +0000)
committerRafal Szczesniak <mimir@samba.org>
Tue, 22 May 2007 06:34:14 +0000 (06:34 +0000)
temporarily...)

rafal

source/scripting/ejs/smbcalls.c

index 9a4a9f962400e81921af5b94422bdbda69fe61aa..04c534bdf5b410aaff464a644c2f13729d7d213e 100644 (file)
@@ -124,23 +124,6 @@ static int ejs_libinclude(int eid, int argc, char **argv)
                char *path, *emsg;
                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 */
                for (j=0;js_include[j];j++) {
                        path = talloc_asprintf(mprMemCtx(), "%s/%s", js_include[j], script);