From 432fbabde898361d3d176334fcee3e1a7953946a Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Wed, 29 Apr 2009 21:06:10 +0100 Subject: [PATCH] imcplugin: Clarify workaround for handling files that don't exist --- imcplugin/hello.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/imcplugin/hello.html b/imcplugin/hello.html index 250c639a..168be309 100644 --- a/imcplugin/hello.html +++ b/imcplugin/hello.html @@ -19,9 +19,25 @@ function receive(message) { } } +/* imcplugin currently does not respond if we ask for a file that doesn't + exist. As a temporary workaround, we whitelist allowed files. */ +files = [ + "/lib/libc.so.6", + "/lib/libdl.so.2", + "/lib/libutil.so.1", + "/lib/libm.so.6", + "../glibc/hellow-dyn", + ]; +function have_file(filename) { + for(var i = 0; i < files.length; i++) + if(filename == files[i]) + return true; + return false; +} + function open(filename) { dump("open: " + filename + "\n"); - if(filename.substring(0, 9) == "/lib/tls/") { + if(!have_file(filename)) { proc.send("", []); } else { -- 2.11.4.GIT