During the Lua HAProxy initialisation, C functions using Lua calls
can throws an error. This error was not catched. This patch fix
this behaviour.
/* Initialise lua. */
luaL_openlibs(gL.T);
+ /* Set safe environment for the initialisation. */
+ if (!SET_SAFE_LJMP(gL.T)) {
+ fprintf(stderr, "Lua init: critical error.\n");
+ exit(1);
+ }
+
/*
*
* Create "core" object.
/* Initialize SSL server. */
ssl_sock_prepare_srv_ctx(&socket_ssl, &socket_proxy);
#endif
+
+ RESET_SAFE_LJMP(gL.T);
}