Disables the execution of shell scripts or lua code when parsing the
spec file. Replaces the script output with static text
"UNEXPANDEDSHELLSCRIPT" or "UNEXPANDEDLUASCRIPT".
Change-Id: I7d43785715c4b518040463ae70bddd46734e824e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
int rc = 0;
int c;
+ rpmlog(RPMLOG_INFO, _("Refusing to run shell code: %s\n"), cmd);
+ mbAppendStr(mb, "UNEXPANDEDSHELLSCRIPT");
+#if 0
rc = expandThis(mb, cmd, clen, &buf);
if (rc)
goto exit;
exit:
_free(buf);
+#endif
return rc;
}
INITSTATE(_lua, lua);
lua_State *L = lua->L;
int ret = 0;
+#define LUA_OUTPUT "UNEXPANDEDLUASCRIPT"
+ rpmlog(RPMLOG_INFO, _("Refusing to run lua code: %s\n"), script);
+ lua->printbuf->buf = xcalloc(1, sizeof(LUA_OUTPUT));
+ strcpy(lua->printbuf->buf, LUA_OUTPUT);
+#if 0
if (name == NULL)
name = "<lua>";
if (luaL_loadbuffer(L, script, strlen(script), name) != 0) {
lua_pop(L, 1);
ret = -1;
}
+#endif
return ret;
}