Files
systemd/docs
Daan De Meyer 4b95bda8c1 clang-tidy: flag direct open(), openat() and creat() calls
The tree opens files via the xopenat() family, which sets O_CLOEXEC on
its own and refuses to create files through dangling symlinks. Nothing
stops new code from calling open() directly though. The repart manifest
code added such a call after the migration. Let's add open(), openat()
and creat() to the custom functions of bugprone-unsafe-functions so that
clang-tidy reports direct calls.

The functions that implement xopenat() and fd_reopen() call the syscalls
directly, and so do the seccomp tests and the O_EMPTYPATH probe in
test-fd-util.c. We suppress the check in those places.

openat2() isn't on the list. override/fcntl.h defines openat2 as a macro
for openat2_shim(), and the check ignores calls that come from a macro
expansion. An entry for openat2() wouldn't report anything.
2026-11-03 16:30:36 +01:00
..
2026-01-31 01:11:11 +09:00
2026-04-14 17:32:37 +01:00
2025-11-12 23:01:35 +00:00
2026-01-31 01:11:11 +09:00
2026-03-24 17:55:26 +01:00
2026-01-31 01:11:11 +09:00
2026-01-31 01:11:11 +09:00
2026-01-31 01:11:11 +09:00
2026-01-31 01:11:11 +09:00
2025-05-14 18:06:04 +02:00
2026-01-31 01:11:11 +09:00
2026-10-05 09:35:58 +02:00
2026-01-31 01:11:11 +09:00
2026-01-31 01:11:11 +09:00
2026-01-31 01:11:11 +09:00
2024-03-15 04:04:01 +09:00
2026-09-22 18:46:41 +02:00