Can someone test the current patch with documents with external insets to see if all works OK?
Attached also a testcase showing the bad behaviour before the patch. Should we do something equivalent for converters? I don't know if playing with the file name to be converted you can also execute arbitrary code. Tried a bit and didn't work... but it would be nicer/safer to use execvp anyways? Alfredo
? lyx-new ? lyx-old ? frontends/qt2/QContentPane.C-new ? frontends/qt2/QContentPane.h-new ? frontends/qt2/QWorkArea.C-new Index: insets/insetexternal.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetexternal.C,v retrieving revision 1.53 diff -u -p -u -r1.53 insetexternal.C --- insets/insetexternal.C 27 Nov 2002 10:30:25 -0000 1.53 +++ insets/insetexternal.C 5 Feb 2004 16:04:14 -0000 @@ -30,7 +30,7 @@ #include "support/filetools.h" #include "support/lstrings.h" #include "support/path.h" -#include "support/systemcall.h" +#include "support/forkedcall.h" #include "support/FileInfo.h" #include <cstdio> @@ -221,12 +221,12 @@ void InsetExternal::executeCommand(strin Buffer const * buffer) const { Path p(buffer->filePath()); - Systemcall one; + Forkedcall one; if (lyxerr.debugging()) { lyxerr << "Executing '" << s << "' in '" << buffer->filePath() << '\'' << endl; } - one.startscript(Systemcall::Wait, s); + one.startscript(Forkedcall::Wait, s); }
testcase.lyx
Description: application/lyx