| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This helps in avoiding compiling errors on musl. Definition of
IFF_LOOPBACK is the reason for including linux/if_arp.h, this however
could be obtained from net/if.h glibc header equally and makes it
portable as well.
|
|
|
|
|
| |
Given this is just auxiliary info, let's make it a tiny bit less visible
then the main part of the path.
|
|
|
|
|
|
|
| |
Images might be built without any kernel module, and without
installing depmod as it is not needed. Skip it.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023607
|
|\
| |
| | |
test: replace tmpfs with vfat when testing --owner=
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 7d4f00c88c65532bf66d20b3ec498b5bfaa621d2.
fstype_can_uid_gid() is about fixating all files to the specified
uid/gid. tmpfs does not qualify. The uid/gid parameter there is simply
about the default uid/gid for the root inode of the tmpfs, it allows
setting uids/gid arbirarily for all inodes after that.
This distinction matters: for file systems this function returns true
for we can use this in place of uidmapped mounts. But for tmpfs this is
not going to work, given inodes on that fs can end up having arbitrary
uid/gid.
See: https://github.com/systemd/systemd/pull/25284#issue-1438427144
|
| |
| |
| |
| |
| | |
If the systemd.machine_id command line option is already set, do not override
it.
|
|\ \
| |/
|/| |
Trivial cleanups
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When compiling with -D utmp=false the compilation fails with:
../../git/systemd/src/test/test-utmp.c: In function ‘test_dump_run_utmp’:
../../git/systemd/src/test/test-utmp.c:21:9: error: cleanup argument not a function
21 | _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
| ^~~~~~~~
../../git/systemd/src/test/test-utmp.c:23:17: error: implicit declaration of function ‘utxent_start’ [-Werror=implicit-function-declaration]
23 | utmpx = utxent_start();
| ^~~~~~~~~~~~
any many other errors
Add a conditional to compile test-utmp.c only if ENABLE_UTMP is true.
|
|\ \
| |/
|/| |
test: add coverage for systemd-mount
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As tmpfs(5) says, both uid= and gid= are supported since kernel 2.5.7 and
the mount utility seems to agree:
```
# stat -c "%U:%G" mnt
root:root
# mount -o uid=testuser,gid=testuser -t tmpfs tmpfs mnt
# stat -c "%U:%G" mnt
testuser:testuser
```
However, systemd-mount currently complains:
```
# systemd-mount --owner testuser -t tmpfs tmpfs mnt
File system type tmpfs is not known to support uid=/gid=, refusing.
```
|
|\ \
| | |
| | | |
dissect: fix fsck invocation
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since f7725647bb41c3398a867f139efe526efe8aa1b3 when dissecting a disk
image we operate with fds to the device nodes in question wherever we
can. This includes when we fork off fsck, where we pass a /proc/self/fd/
path as argument. This only works if we keep that fd open however and
disable O_CLOEXEC on the fd. Hence do so, and fix fsck this way.
(Without this, all fsck will fail, since the fd path is invalid)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
remaining fds
Often the fds that shall stay around in the child shall be passed
to a process over execve(), hence add an option to explicitly disable
O_CLOEXEC on them in the child.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
in the array
let's handle gracefully if fds in the specified array are already
invalidated (i.e. negative). This is handy when putting together arrays
on the fly.
|
|\ \ \
| | | |
| | | | |
sysusers: cross-check user and group names too
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds an additional name check when cross-matching new group
entries against existing users, which allows coalescing entries
matching both ID and name.
It provides a small idempotence enhancement when creating groups
in cases where matching user entries are in place. By fine-tuning
the conflict detection logic, this avoids picking up new random
IDs and correctly prefers configuration values instead.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
flock(2) works with file descriptors opened with O_RDONLY.
This affects SELinux systems where access to block devices is quite
restricted to avoid bypasses on filesystem objects.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Pass getuid() instead of literal `0` as auid, since user session
managers also issue audit messages on SELinux denials.
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not unconditionally add a new systemd.machine_id command line option, first
check if it already exists with the expected value.
Fixes #25203
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Otherwise, if the link is not managed by systemd-networkd, mDNS cannot
be enabled without calling `resolvectl` explicitly.
Fixes #25252.
|
|\ \ \
| |_|/
|/| | |
reboot-util: several cleanups
|
| | |
| | |
| | |
| | | |
Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
|
| | |
| | |
| | |
| | | |
Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
|
| |/
| |
| |
| |
| |
| | |
Except for 'threads'.
Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
\#0 __strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:295
No locals.
\#1 0x0000557444eb172b in process_locale () at ../src/firstboot/firstboot.c:342
etc_localeconf = 0x7ffd40217b80 "/root/root/etc/locale.conf"
locales = {0x0, 0x0, 0x0}
i = 0
r = <optimized out>
__PRETTY_FUNCTION__ = "process_locale"
__func__ = "process_locale"
\#2 0x0000557444eaff93 in run (argv=0x7ffd40217d98, argc=3) at ../src/firstboot/firstboot.c:1401
loop_device = 0x0
unlink_dir = 0x0
r = <optimized out>
loop_device = <optimized out>
unlink_dir = <optimized out>
r = <optimized out>
__func__ = <optimized out>
__PRETTY_FUNCTION__ = <optimized out>
enabled = <optimized out>
_error = <optimized out>
_level = <optimized out>
_e = <optimized out>
_level = <optimized out>
_e = <optimized out>
\#3 main (argc=3, argv=0x7ffd40217d98) at ../src/firstboot/firstboot.c:1432
r = <optimized out>
__PRETTY_FUNCTION__ = "main"
Fixes https://github.com/systemd/systemd/issues/25249
|
|
|
|
|
|
| |
In the Xen case, it's the hypervisor which manages kexec. We thus
have to ask it whether a kernel is loaded, instead of relying on
/sys/kernel/kexec_loaded.
|
| |
|
|
|
|
|
|
|
|
| |
Many long-running services will reload configuration and therefore
credentials on reload. Therefore its useful if a service reload will
also update credentials.
Tested in https://github.com/numtide/systemd-vaultd/pull/12
|
|\
| |
| | |
wait-online: support alternative interface names
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
No functional changes, just refactoring and preparation for later
commits.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Using fsopen()/fsconfig(), we can check if hidepid/subset are supported to
avoid the noisy logs from the kernel if they aren't supported. This works
on centos/redhat 8 as well since they've backported fsopen()/fsconfig().
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of succeeding when either the firmware reports a TPM device
or we find a TPM device, let's check that the firmware reports a TPM
device and the TPM subsystem is enabled in the kernel.
To check whether the subsystem enabled, we check if the relevant
subdirectory in /sys exists at all.
|
| |
| |
| |
| |
| |
| |
| | |
Previously, interfaces are partially reconfigured in a spurious way.
Let's use the same way as `networkctl reconfigure`.
Hopefully fixes #14987 and #24997.
|
| |
| |
| |
| |
| | |
../src/basic/coverage.h:15:48: warning: function '_coverage__exit' could
be declared with attribute 'noreturn' [-Wmissing-noreturn]
|
|/ |
|
|\
| |
| | |
network: reconfigure interface when renamed
|
| |
| |
| |
| |
| |
| |
| |
| | |
When at least one of the name, MAC address, udev properties, and so on
for an interface is updated, try to find a matching .network file, and
reconfigure if a new .network file is assigned.
Fixes #24975.
|
| |
| |
| |
| |
| |
| |
| |
| | |
No functional changes, just refactoring and preparation for later
commits.
Note, `link->dev` should always exist when link state is initialized or
later.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We have already allowed to reconfigure failed interface manually, but
not allowed to do automatically, e.g. on carrier gain.
This makes that failed interfaces also reconfigured automatically.
Note, the condition is inversed to shorten the condition.
|
| |
| |
| |
| |
| | |
The function `link_reconfigure_impl()` has the same condition at the
beginning.
|
| |
| |
| |
| |
| |
| |
| | |
Otherwise, the slave interface may go down, especially when the master
is bond.
Fixes #25067.
|
| | |
|