| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
repart: Implement $BOOT support
|
| |
| |
| |
| |
| |
| |
| | |
The macro didn't properly parenthesize a caller-controlled argument.
For example: `STRV_FOREACH_PAIR(a, b, something ?: something_else)`
would expand to `typeof(*something ?: something_else)`, which would
cause compile failures
|
|\ \
| | |
| | | |
network: log when no matching .network file found
|
| |/ |
|
|/
|
|
|
|
|
| |
This mirrors the behavior of `systemd-firstboot` and allows bootup
messages to settle down before user input is actually processed.
See: https://github.com/systemd/systemd/issues/34448
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tries to get rid of most manual sigprocmask() changes, in favour
of:
1. The SD_EVENT_SIGNAL_PROCMASK flag to sd_event_add_signal()
2. The sd_event_set_signal_exit() call for handling SIGTERM/SIGINT
3. Move masking of SIGWINCH into ptyfwd, out of nspawn/vmspawn/run
And while we are at it get rid of a bunch of event source fields whose
lifetime is bound to the sd_event object they belong to anyway, and make
use of the "floating" event source feature of sd-event instead.
|
|
|
|
|
|
|
|
| |
This way we don't have to pull in net/if.h into format-util.h.
This is supposed to address https://github.com/systemd/systemd/pull/32212#discussion_r1755639881
No actual code changes, just a .c/.h file split-up.
|
|
|
|
| |
Fix minor post merge comments
|
|\
| |
| | |
More visibility into systemd-networkd sysctls
|
| |
| |
| |
| |
| | |
Pass to all the sysctl_* functions a hashmap which can be used to
optionally save the value written in the sysctl.
|
|/ |
|
|\
| |
| | |
core/manager: do not re-init Manager.lookup_paths when manager_reload(), minor assorted cleanups
|
| | |
|
| |
| |
| |
| | |
Follow-up for 07862c9fc2becdc4bbe112b023591d2ab2dd032b
|
| |
| |
| |
| |
| | |
Now, we have copy of vm_sockets.h, hence these definitions are not
necessary anymore.
|
| |
| |
| |
| | |
Now we have ipv6.h, hence the definition is not necessary anymore.
|
| | |
|
| |
| |
| |
| | |
Hopefully, no effective change.
|
|/
|
|
| |
Follow-up for 14f594b995bbaea85456a4c26e5c07446a4c446e
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We generally use utmpx instead of utmp (both are actually identical on
Linux, but utmpx is POSIX, while utmp is not). Let's fix one left-over
case.
UT_NAMESIZE does not exist in utmpx world, it has no direct counterpart,
hence let's just sizeof_field() to determine the size of the actual
field. (which comes to the same result of course: 32).
|
|\
| |
| | |
handle gmtime_r() errors more robustly
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We typically want to deal in usec_t, hence let's change the prototype
accordingly, and do proper range checks. Also, make sure are not
confused by negative times.
Do something similar for mktime_or_timegm().
This is a more comprehensive alternative to #34065
Replaces: #34065
|
|/
|
|
|
| |
This is needed to ensure LOCK_{EX,SH} are defined in certain
environments, including uclibc-ng and musl libc.
|
|\
| |
| | |
Rework COW <=> NOCOW copying behavior
|
| |
| |
| |
| | |
Let's make sure we only reopen O_PATH file descriptors.
|
| |
| |
| |
| | |
Also, unify MSG_TRUNC handling all across the codebase.
|
| | |
|
|/ |
|
|
|
|
|
| |
Potentially, utf8_escape_invalid() called by
log_syntax_invalid_utf8_internal() may update errno.
|
|
|
|
|
| |
This provides generic error message for failures in conf parsers.
Currently this is not used, but will be used later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These operations might require slow I/O, and thus might block PID1's main
loop for an undeterminated amount of time. Instead of performing them
inline, fork a worker process and stash away the D-Bus message, and reply
once we get a SIGCHILD indicating they have completed. That way we don't
break compatibility and callers can continue to rely on the fact that when
they get the method reply the operation either succeeded or failed.
To keep backward compatibility, unlike reload control processes, these
are ran inside init.scope and not the target cgroup. Unlike ExecReload,
this is under our control and is not defined by the unit. This is necessary
because previously the operation also wasn't ran from the target cgroup,
so suddenly forking a copy-on-write copy of pid1 into the target cgroup
will make memory usage spike, and if there is a MemoryMax= or MemoryHigh=
set and the cgroup is already close to the limit, it will cause an OOM
kill, where previously it would have worked fine.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow-up for 7ac58157ca67ab001307f1fd72e0cc7c0c4e846a
With the mentioned commit, iff E2BIG we'd retry pidfd_spawn()
with POSIX_SPAWN_SETCGROUP disabled. However, the same strategy
should actually apply to EOPNOTSUPP/ENOSYS/EPERM too -
they can mean two things here: no clone3() or no CLONE_PIDFD.
Therefore, let's first try clone() + CLONE_PIDFD, and fall further back
to plain clone() (posix_spawn()) only as last resort. Plus, record
the fact so that we don't unnecessarily retry every single time
if CLONE_PIDFD is the one that's unavailable.
|
|
|
|
| |
We might skip CLONE_INTO_CGROUP wholly if not supported.
|
|
|
|
|
|
|
| |
The kernel patch was reverted so let's try again to open pidfds
for kernel threads.
This reverts commit ead48ec35c863650944352a3455f26ce3b393058.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some kernels (specifically, 5.4) even though the clone3 syscall is
supported, setting CLONE_INTO_CGROUP is not. The error message returned
in this case is E2BIG.
If posix_spawn_wrapper encounters this error, it does not retry, and
cannot spawn any programs in said kernels.
This commit adds a check for the E2BIG error and retries pidfd_spawn()
without the POSIX_SPAWN_SETCGROUP flag.
If we encounter an E2BIG error, and the pidfd_spawn() succeeds after
removing the POSIX_SPAWN_SETCGROUP flag, then we cache the result so
that we do not retry every time.
Originally, this issue was reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077204.
Signed-off-by: Kornilios Kourtis <kornilios@gmail.com>
|
|\
| |
| | |
fixes around isatty() handling
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
let's instead generate ENOTTY on our own. This is more correct with out
coding style (since we generally do not propagate errors via errno), and
also addresses #34039 as side effect. (#34039 really needs to be fixed
in musl though, too, this is just a work-around as side-effect).
Fixes: #34039
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
glibc returs EIO on ttys that are hung up. That's not really correct,
POSIX seems to disagree.
Work around this in our code, and turn this into a clean "1", since a
hung up tty doesn't stop being a tty just because it is hung up.
Background: https://github.com/systemd/systemd/pull/34039
|
|/
|
|
|
|
|
|
| |
The kernel parses FRA_SUPPRESS_PREFIXLEN as uint32_t, but internally
handled as signed integer and negative values as unset. Let's explicitly
specify the size of the variable.
No functional change, just refactoring.
|
|\
| |
| | |
edit-util: catch and warn about edits outside of markers
|
| | |
|
|\ \
| |/
|/| |
core/unit: two trivial cleanups
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow-up for 6d2984d21bf2a8f71d379ef6bc13a761bb2e2756
The current semantics of "filtered" in unit_is_filtered()
are actually the contrary of ListUnitsFiltered(). Let's
make things consistent, i.e. return true when the unit
shall be included.
|