summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-21 13:17:24 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-21 13:17:24 +0000
commit9f969702ad3564f95eb20fe25950981bc7028851 (patch)
treedca7d6f8d55b1771fd66b3c0bd8f698ee25d7b05 /crawl-ref/source/libutil.h
parent6e7c6ae56792add3f8d701eca7d144d96ed19458 (diff)
downloadcrawl-ref-9f969702ad3564f95eb20fe25950981bc7028851.tar.gz
crawl-ref-9f969702ad3564f95eb20fe25950981bc7028851.zip
Override loadfile and dofile in the Lua user-script interpreter so they have to
use datafile_path, and cannot use shell metacharacters (not that it matters) and ../ paths. Multiple loading is not prevented; we could probably add another function that does that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1614 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libutil.h')
-rw-r--r--crawl-ref/source/libutil.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h
index 4eed5ab7a7..b359bfb304 100644
--- a/crawl-ref/source/libutil.h
+++ b/crawl-ref/source/libutil.h
@@ -26,6 +26,8 @@ bool ends_with(const std::string &s, const std::string &suffix);
std::string pluralise(const std::string &name,
const char *no_of[] = NULL);
+bool shell_safe(const char *file);
+
/**
* Returns 1 + the index of the first suffix that matches the given string,
* 0 if no suffixes match.