os_temp_dir() used $TMPDIR or "/tmp" without checking either. On Termux
/tmp usually does not exist (or SELinux denies it) unless TMPDIR points at
$PREFIX/tmp, so plugin and MCP temp files failed and shell children that
need a temp file (heredocs) broke.
* os_temp_dir() picks, once, the first of $TMPDIR, $PREFIX/tmp, /tmp,
/var/tmp and ~/.cache/cst-agent/tmp where a file can really be
created; if none works it keeps the old answer
* os_temp_dir_export() at startup writes the choice back to TMPDIR, so
shell children and the sandbox's writable temp dir agree
* tests/test_tmpdir.c covers the fallbacks in fresh forks
15 lines
458 B
C
15 lines
458 B
C
#ifndef CST_VERSION_H
|
|
#define CST_VERSION_H
|
|
|
|
#define CST_VERSION_MAJOR 0
|
|
#define CST_VERSION_MINOR 6
|
|
#define CST_VERSION_PATCH 1
|
|
|
|
#define CST_VERSION_STR_(x) #x
|
|
#define CST_VERSION_STR(x) CST_VERSION_STR_(x)
|
|
#define CST_VERSION \
|
|
CST_VERSION_STR(CST_VERSION_MAJOR) \
|
|
"." CST_VERSION_STR(CST_VERSION_MINOR) "." CST_VERSION_STR(CST_VERSION_PATCH)
|
|
|
|
#endif
|