Description
JNA requires a temporary directory which is not mounted noexec
, but JNA also uses libffi
which itself requires a temporary directory that isn't mounted noexec
. If none of the usual suspects work, libffi
will fall back to $HOME
which will often work, but in general might also not permit executables (or even exist).
We override the temporary directory that JNA uses by setting the java.io.tmpdir
system property to ES_TMPDIR
. I believe we should do the same thing for libffi
, by setting the LIBFFI_TMPDIR
environment variable. We should also document that this can be overridden much as we do for the jna.tmpdir
system property (which trumps java.io.tmpdir
if set).
Fixing this would, I believe, also fix #73309.