Author: mimir
Date: 2007-05-22 06:34:14 +0000 (Tue, 22 May 2007)
New Revision: 23065

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23065

Log:
revert local includes to prevent security problems (at least
temporarily...)


rafal


Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c  2007-05-22 05:22:18 UTC 
(rev 23064)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c  2007-05-22 06:34:14 UTC 
(rev 23065)
@@ -124,23 +124,6 @@
                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);

Reply via email to