| 404 | #else |
| 405 | |
| 406 | static bool diag_posix_file_valid(int descriptor) { |
| 407 | struct stat state; |
| 408 | return descriptor >= 0 && fstat(descriptor, &state) == 0 && S_ISREG(state.st_mode) && |
| 409 | state.st_uid == geteuid() && state.st_nlink == 1 && (state.st_mode & 07777) == 0600 && |
| 410 | cbm_macos_extended_acl_fd_is_empty(descriptor); |
| 411 | } |
| 412 | |
| 413 | static bool diag_write_file(const char *base_name, const char *data, size_t length, bool append) { |
| 414 | int flags = O_WRONLY | O_CLOEXEC | O_NOFOLLOW | O_NONBLOCK; |
no test coverage detected