Runtime IPC validates the complete Windows directory ancestry, so an MSYS2 * TEMP rooted under C:/msys64/tmp is intentionally unsuitable even when the * leaf made by cbm_mkdtemp() has a private DACL. Keep these security-sensitive * fixtures under LocalAppData on Windows; preserve the ordinary temporary-root * behavior on POSIX. */
| 181 | * fixtures under LocalAppData on Windows; preserve the ordinary temporary-root |
| 182 | * behavior on POSIX. */ |
| 183 | static inline const char *th_secure_runtime_base(void) { |
| 184 | #ifdef _WIN32 |
| 185 | return cbm_app_local_dir(); |
| 186 | #else |
| 187 | return cbm_tmpdir(); |
| 188 | #endif |
| 189 | } |
| 190 | |
| 191 | static inline bool th_secure_runtime_parent_new(char *out, size_t out_cap, const char *tag) { |
| 192 | if (!out || out_cap == 0 || !tag || !tag[0]) { |
no test coverage detected