| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
static-destruct: support clearing array on exit
|
| | |
|
| |
| |
| |
| | |
No functional changes, preparation for later commits.
|
| |
| |
| |
| | |
Should not change any behavior, preparation for later commits.
|
| |
| |
| |
| |
| | |
Prompted by #27595.
Follow-ups for 6723c28f36ea566faf61d3610012cd89f95ee4a0.
|
|/
|
|
|
|
|
|
|
|
| |
>=musl-1.2.4 doesn't define dirent64 and its LFS friends as its "native"
functions are already LFS-aware.
Check for dirent64 in meson.build and only assert if it exists.
Bug: https://bugs.gentoo.org/905900
Closes: https://github.com/systemd/systemd/pull/25809
|
| |
|
|
|
|
|
|
|
|
| |
The previous error code -ERANGE is slightly ambiguous, and use more
specific one. This also drops unnecessary error handlings.
Follow-up for 754d8b9c330150fdb3767491e24975f7dfe2a203 and
e652663a043cb80936bb12ad5c87766fc5150c24.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a container manager does not follow the guidance in
https://systemd.io/CONTAINER_INTERFACE/ regarding audit capabilities,
then the current check may not be sufficient to determine that audit
will function properly. In particular, when calling bind() on the audit
fd, we will get EPERM if running in a user-namespaced container.
Expand the check to make an AUDIT_GET_FEATURE request on the audit fd to
test if it is working. If this fails with ECONNREFUSED, we know it is
because the kernel does not support the use of audit outside of the
initial user namespace.
Note that the approach of this patch was suggested here:
https://github.com/systemd/systemd/pull/19443#issuecomment-829566659
Fixes: #6519
|
| |
|
|
|
|
|
| |
It's a simple wrapper for safe_atoi() that returns error if the parsed
fd is < 0 .
|
|
|
|
|
|
| |
Follow-up for b640e274a7c363a2b6394c9dce5671d9404d2e2a.
Addresses https://github.com/systemd/systemd/commit/b640e274a7c363a2b6394c9dce5671d9404d2e2a#r110996661.
|
|\
| |
| | |
copy: follow ups for reflink()
|
| | |
|
|\ \
| |/
|/| |
More automatic cleanup
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The kernel has had filesystem independent reflink ioctls for a
while now, let's try to use them and fall back to the btrfs specific
ones if they're not supported.
|
| |
| |
| |
| |
| |
| | |
Let's clean up validation/escaping of cgroup names. i.e. split out code
that tests if name needs escaping. Return proper error codes, and extend
test a bit.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We translate 'all' to UNIT64_MAX, which has a lot more 'f's. Use the
helper macro, since a decimal uint64_t will always be >> than a hex
representation.
root@image:~# systemd-run -t --property CoredumpFilter=all ls /tmp
Running as unit: run-u13.service
Press ^] three times within 1s to disconnect TTY.
*** stack smashing detected ***: terminated
[137256.320511] systemd[1]: run-u13.service: Main process exited, code=dumped, status=6/ABRT
[137256.320850] systemd[1]: run-u13.service: Failed with result 'core-dump'.
|
|\ \
| | |
| | |
| | |
| | | |
aafeijoo-suse/systemd-network-generator-initrd-fix
network-generator: do not parse kernel command line more than once
|
| | | |
|
|\ \ \
| | | |
| | | | |
sd: avoid closing sd-bus in a fork, store module-global id for sd-bus/sd-session/sd-journal
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These need to be redefined in every module that we need to guard, so add
a macro
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
invoked with '/'
|
|\ \ \ \
| |/ / /
|/| | | |
add ASSERT_FD() similar to ASSERT_PTR(), but for fds
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Rework serialization of command lines in pid1 and make run not expand variables
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
__builtin_popcount() is a bit of a mouthful, so let's provide a helper.
Using _Generic has the advantage that if a type other then the ones on
the list is given, compilation will fail. This is nice, because if by any
change we pass a wider type, it is rejected immediately instead of being
truncated.
log.h is also needed. It is included transitively, but let's include it
directly.
macro.h is *not* needed.
|
| |/ /
|/| |
| | |
| | |
| | | |
That way the function becomes useful for validating pids formatted as
strings.
|
|\ \ \
| | | |
| | | | |
tree-wide: code spelling fixes
|
| | | |
| | | |
| | | |
| | | | |
As reported by Fossies.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Normal users do not have permissions to access /proc/1/root, so
'systemd-detect-virt -r' fails, but the output, even at debug level
is cryptic:
$ SYSTEMD_LOG_LEVEL=debug build/systemd-detect-virt -r
Failed to check for chroot() environment: Permission denied
Let's make this a bit easier to figure out:
$ SYSTEMD_LOG_LEVEL=debug build/systemd-detect-virt -r
Cannot stat /proc/1/root: Permission denied
Failed to check for chroot() environment: Permission denied
I looked over other users of files_same(), and I think in general the message
at debug level is OK for them too.
|
|\ \ \ \
| | | | |
| | | | | |
kmod-setup: Add early loading for virtio_console
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is the function version of STARTSWITH_SET(). We also move
STARTSWITH_SET() to string-util.h as it fits more there than in
strv.h and reimplement it using startswith_strv().
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Let's avoid confusing developers and users when log messages suddenly
stop getting logged to kmsg because of ratelimiting by logging an
additional message if we start ratelimiting log messages to kmsg.
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
This allows us to disable kmsg ratelimiting in the integration tests
and mkosi for easier debugging.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
An overflow here (i.e. the counter reaching 2^32 within a ratelimit time
window) is not so unlikely. Let's handle this somewhat sanely
and simply stop counting, while remaining in the "limit is hit" state until
the time window has passed.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The function path_prefix_root_cwd() was introduced for prefixing the
result from chaseat() with root, but
- it is named slightly generic,
- the logic is different from what chase() does.
This makes the name more explanative and specific for the result of the
chaseat(), and make the logic consistent with chase().
Fixes https://github.com/systemd/systemd/pull/27199#issuecomment-1511387731.
Follow-up for #27199.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now, dir_fd_is_root() is heavily used in chaseat(), which is used at
various places. If the kernel is too old and /proc is not mounted, then
there is no way to get the mount ID of a directory. In that case, let's
silently skip the mount ID check.
Fixes https://github.com/systemd/systemd/pull/27299#issuecomment-1511403680.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
As the path may be outside of the specified dir_fd.
|