Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-01-30 | openrc-run: avoid malloc inside sig-handler | NRK | |
same rational as 459783bb Bug: https://github.com/OpenRC/openrc/issues/589 | |||
2023-01-29 | value: missing includes from IWYU | Sam James | |
2023-01-29 | swclock: missing includes from IWYU | Sam James | |
2023-01-29 | supervise-daemon: missing includes from IWYU | Sam James | |
2023-01-29 | start-stop-daemon: missing includes from IWYU | Sam James | |
2023-01-29 | shell_var: missing includes from IWYU | Sam James | |
2023-01-29 | shared: missing includes from IWYU | Sam James | |
2023-01-29 | service: missing includes from IWYU | Sam James | |
2023-01-29 | seedrng: missing includes from IWYU | Sam James | |
2023-01-29 | rc-update: missing includes from IWYU | Sam James | |
2023-01-29 | rc-status: missing includes from IWYU | Sam James | |
2023-01-29 | rc-service: missing includes from IWYU | Sam James | |
2023-01-29 | rc-depend: missing includes from IWYU | Sam James | |
2023-01-29 | rc-abort: missing includes from IWYU | Sam James | |
2023-01-29 | openrc-shutdown: missing includes from IWYU | Sam James | |
2023-01-29 | openrc-run: missing includes from IWYU | Sam James | |
2023-01-29 | openrc: missing includes from IWYU | Sam James | |
2023-01-29 | openrc-init: missing includes from IWYU | Sam James | |
2023-01-29 | mountinfo: missing includes from IWYU | Sam James | |
2023-01-29 | mark_service: missing includes from IWYU | Sam James | |
2023-01-29 | librc: missing includes from IWYU | Sam James | |
2023-01-29 | libeinfo: missing includes from IWYU | Sam James | |
2023-01-29 | kill_all: missing includes from IWYU | Sam James | |
2023-01-29 | is_older_than: missing includes from IWYU | Sam James | |
2023-01-29 | is_newer_than: missing includes from IWYU | Sam James | |
2023-01-29 | fstabinfo: missing includes from IWYU | Sam James | |
2023-01-29 | einfo: missing includes from IWYU | Sam James | |
2023-01-29 | checkpath: missing includes from IWYU | Sam James | |
2023-01-28 | src: shared: schedules: add missing includes to header | Sam James | |
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway). | |||
2023-01-28 | src: shared: plugin: add missing includes to header | Sam James | |
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway). | |||
2023-01-28 | src: shared: misc: add missing includes to header | Sam James | |
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway). | |||
2023-01-28 | src: shared: helpers: add missing includes to header | Sam James | |
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway). | |||
2023-01-28 | openrc: rc-logger: add missing includes to header | Sam James | |
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway). | |||
2023-01-28 | swclock: fix codeql warning and upgrade to futimens | NRK | |
this was reported by codeql's scan as a TOCTOU bug. while that's true in theory, i don't believe it would've had any practical effect. a better justification for this change might be the fact that it upgrades from `utime` (which is depreciated by POSIX [0]) to `futimens`. [0]: https://www.man7.org/linux/man-pages/man3/utime.3p.html#FUTURE_DIRECTIONS | |||
2023-01-28 | openrc: avoid unnecessary malloc inside sig-handler | NRK | |
malloc (called by xasprintf) is not async-signal-safe. beside, the string here is constant, so there's no need to malloc it all. eerrorx isn't async-signal-safe either (due to calling fprintf and exit) but consequence of them are _typically_ not as grave as calling malloc while it's internal state is inconsistent. Bug: https://github.com/OpenRC/openrc/issues/589 | |||
2023-01-25 | openrc-shutdown: mark handler as noreturn, use _unused macro | Sam James | |
2023-01-25 | openrc: mark handle_bad_signal as noreturn | Sam James | |
For -Wmissing-noreturn. | |||
2023-01-25 | supervise-daemon: mark various functions as noreturn | Sam James | |
For -Wmissing-noreturn. | |||
2023-01-25 | openrc-shutdown: mark stop_shutdown as noreturn, fix typo/indentation | Sam James | |
For -Wmissing-noreturn. | |||
2023-01-25 | shared: move _noreturn definition into helpers.h | Sam James | |
2023-01-25 | libeinfo: fix -Wunused-but-set-variable | Sam James | |
2023-01-25 | librc: fix 'init' memory leak | Sam James | |
From scan-build w/ clang-16.0.0_pre20230107: ``` ../src/librc/librc.c:759:14: warning: Potential leak of memory pointed to by 'init' [unix.Malloc] return false; ^~~~~ ``` | |||
2023-01-25 | openrc-run: drop strlen dead store | Sam James | |
2023-01-25 | openrc-shutdown: fix need_warning dead store | Sam James | |
It's already initialised to false at the start and it's clear when reading what the flow is. While at it, fix some indentation and adjust whitespace to make more readable. | |||
2023-01-25 | openrc-run: fix -Wunused-but-set-variable | Sam James | |
2023-01-25 | openrc: fix double-assignment to dir | Sam James | |
This one is a bit odd, it didn't get fixed in e273b4e08ee0ebc1a001d60e2a5b65a9553a8a8a, and goes all the way back to cb9da6a262b60255cd037f20b4cde3ab2c8a1e6a. | |||
2023-01-25 | openrc, openrc-run: Fix -Wstrict-prototypes | Sam James | |
These become fine with C23 because () starts to mean (void) then, but for previous language versions, it's deprecated, and it causes an annoying warning when building with Clang by default. Plus, GCC lacks specific flags to trigger what C23 *does* ban, so a lot of people are going around building with -Wstrict-prototypes, so let's just fix this to be consistent with the rest of the codebase anyway to fend off false positive reports. | |||
2023-01-24 | update cirrus ci to latest FreeBSD images | William Hubbs | |
2023-01-21 | add CoC based on the Contributor Covenant project | Mike Frysinger | |
2023-01-20 | start-stop-daemon, supervise-daemon: use closefrom()/close_range() | Matt Whitlock | |
On systems with a very large RLIMIT_NOFILE, calling close() in a loop from 3 to getdtablesize() effects an enormous number of system calls. There are better alternatives. Both BSD and Linux have the closefrom() system call that closes all file descriptors with indices not less than a specified minimum. Have start-stop-daemon call closefrom() on systems where it's implemented, falling back to the old loop elsewhere. Likewise, calling fcntl(i, F_SETFD, FD_CLOEXEC) in a loop from 3 to getdtablesize() raises a similar performance concern. Linux 5.11 and onward has a close_range() system call with a CLOSE_RANGE_CLOEXEC flag that sets the FD_CLOEXEC flag on all file descriptors in a specified range. Have supervise-daemon utilize this feature on systems where it's implemented, falling back to the old loop elsewhere. |