summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luatex.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-10-13 07:32:21 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-10-13 07:32:21 +0000
commit05e05c9035b826378da10058ef59a39a893da0e4 (patch)
tree1df889055b6223e62dc749533149a18faf04a101 /Build/source/texk/web2c/luatexdir/luatex.c
parent114598d40feee6dd9c5de45b0cc7cedefbdedd00 (diff)
LuaTeX: More sync with texmfmp.[ch]
git-svn-id: svn://tug.org/texlive/trunk@35366 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luatex.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c
index 9d02f40a686..c803b5bb319 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.c
+++ b/Build/source/texk/web2c/luatexdir/luatex.c
@@ -395,7 +395,7 @@ int shell_cmd_is_allowed(const char *cmd, char **safecmd, char **cmdname)
1 if shell escapes are not restricted, hence any command is allowed.
2 if shell escapes are restricted and CMD is allowed. */
-int runsystem(char *cmd)
+int runsystem(const char *cmd)
{
int allow = 0;
char *safecmd = NULL;
@@ -406,12 +406,10 @@ int runsystem(char *cmd)
}
/* If restrictedshell == 0, any command is allowed. */
- if (restrictedshell == 0) {
+ if (restrictedshell == 0)
allow = 1;
- } else {
- const char *thecmd = cmd;
- allow = shell_cmd_is_allowed(thecmd, &safecmd, &cmdname);
- }
+ else
+ allow = shell_cmd_is_allowed(cmd, &safecmd, &cmdname);
if (allow == 1)
(void) system(cmd);