1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
Commit Graph

59654 Commits

Author SHA1 Message Date
Jan Janssen
230f78206a boot: Accept Ctrl+Del for deleting words 2022-09-07 12:55:55 +02:00
Jan Janssen
d17d0e6770 boot: Correctly handle shift keys 2022-09-07 12:55:55 +02:00
Jan Janssen
0cf5f816f2 boot: Refuse GPT with invalid entry size
SizeOfPartitionEntry must be a multiple of 128 * 2^n.
2022-09-07 12:55:49 +02:00
Jan Janssen
71c628d426 boot: Fix device path unaligned access 2022-09-07 12:51:16 +02:00
Jan Janssen
515581d66a boot: Use mempcpy 2022-09-07 12:51:16 +02:00
Jan Janssen
aa23f91ed6 boot: Add mempcpy 2022-09-07 12:51:10 +02:00
Lennart Poettering
2c3794f422 README: we don't use crypto API in kernel anymore
This effectively reverts 9c7f7d86f8.

We dropped kernel crypto API use with
1fc8d0c9dd, hence catch up in README.
2022-09-07 11:04:34 +01:00
Lennart Poettering
c87abcfa5c README: make section title less confusing
This is about glibc NSS, not about the TLS implementation library NSS.
2022-09-07 11:30:23 +02:00
Lennart Poettering
659215cf14 README: drop some spurious empty lines, we otherwise don't place after section titles 2022-09-07 11:29:14 +02:00
Lennart Poettering
470d392aed
Merge pull request #24592 from poettering/coding-style-more2
more coding style documentation additions
2022-09-07 11:27:12 +02:00
Lennart Poettering
036b9e7fed README: use right emoji UTF-8 sequences for stop/warning sign 2022-09-07 10:49:49 +02:00
Lennart Poettering
e8a587dca2 docs: Some CODING_STYLE additions 2022-09-07 10:05:46 +02:00
Yu Watanabe
10719a6ff8 loop-util: fix leak of file descriptor on failure 2022-09-07 07:52:32 +09:00
Luca Boccassi
844768c78b
Merge pull request #15833 from AsamK/busctl_introspect_method_signature
busctl: Add introspect support for methods with same name but different signature
2022-09-06 22:21:39 +01:00
Lennart Poettering
4213dd2398 README: clarify baseline situation a bit (add emojis!) 2022-09-06 18:02:58 +01:00
Sebastian Scheibner
f2f7785d7a busctl: Add introspect support for methods with same name but different signature
D-Bus interfaces can have multiple methods with the same name, as long
as they have different arguments (signature). Currently busctl can call
those methods but when introspecting the interface it just displays
"Duplicate method"

This PR fixes the behavior, by also adding the signature to the hash for
the members set.

Before this patch:

$ busctl introspect org.asamk.Signal /org/asamk/Signal
Invalid introspection data: duplicate method 'sendMessage' on interface 'org.asamk.Signal'.

After this patch:

$ busctl introspect org.asamk.Signal /org/asamk/Signal
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.asamk.Signal                    interface -         -            -
.sendMessage                        method    as        x            -
.sendMessage                        method    s         x            -

Calling the methods already works as expected, as the user must specify
the signature explicitely:
busctl --user call org.asamk.Signal /org/asamk/Signal org.asamk.Signal sendMessage "as" 2 foo bar
busctl --user call org.asamk.Signal /org/asamk/Signal org.asamk.Signal sendMessage "s" foo

$ busctl --xml introspect org.asamk.Signal /org/asamk/Signal
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/asamk/Signal">
 <interface name="org.asamk.Signal">
  <method name="sendMessage" >
   <arg type="as" direction="in"/>
   <arg type="x" direction="out"/>
  </method>
  <method name="sendMessage" >
   <arg type="s" direction="in"/>
   <arg type="x" direction="out"/>
  </method>
 <interface name="org.freedesktop.DBus.Introspectable">
  <method name="Introspect">
   <arg type="s" direction="out"/>
  </method>
 </interface>
 <interface name="org.freedesktop.DBus.Peer">
  <method name="Ping">
  </method>
 </interface>
</node>
2022-09-06 18:00:36 +02:00
Sebastian Scheibner
bdff06de06 busctl: Fix warning about invaild introspection data
The set_put function returns 0 if the element is already in the set and
not EEXIST, like e.g. hashmap does.
2022-09-06 18:00:33 +02:00
Frantisek Sumsal
90782fde46 test: don't fail if we don't need any external nss libs
On certain systems the `install_libnss()` function might end up with an
empty list of libraries to install, which triggers an assertion in
`image_install()`:

```
I: Install libnss
..//test-functions: line 2721: 1: parameter null or not set
make: *** [Makefile:4: setup] Error 1
```

E.g.:
```
# LD_DEBUG=files getent passwd 2>&1 >/dev/null | sed -n '/calling init: .*libnss_/ {s!^.* /!/!; p}'
/lib64/libnss_sss.so.2
/lib64/libnss_systemd.so.2
# dnf -y remove sssd-client systemd-libs
# LD_DEBUG=files getent passwd 2>&1 >/dev/null | sed -n '/calling init: .*libnss_/ {s!^.* /!/!; p}'
<no output>
```

Let's handle this case gracefully.
2022-09-07 00:21:26 +09:00
Jan Macku
3a8352cbf3 ci(issue-labeler): Add missing policy for coredump label 2022-09-06 14:59:00 +00:00
Lennart Poettering
4acbe1f6cc
Merge pull request #24425 from poettering/shutdown-lazily
shutdown: lazily umount all API vfs
2022-09-06 16:40:32 +02:00
Yu Watanabe
802e7f7234
Merge pull request #24520 from yuwata/udevadm-wait-listen-kernel-uevents
udevadm-wait: also listen kernel uevents
2022-09-06 08:33:27 +09:00
Frantisek Sumsal
5c08efee03 test: kill plymouthd after initrd transition if it's still running
Until now using the INTERACTIVE_DEBUG=yes stuff together with sanitizers
was almost impossible, since the console kept eating up our inputs or
not responding at all. After a painful day of debugging I noticed that
if we use a shell script in the initrd -> root transition, we might end up
with a plymouthd still running, which kept screwing with the tty.

E.g. with initrd -> wrapper -> systemd transition, where the `wrapper`
is a simple script:

```
exec -- /usr/lib/systemd/systemd "$@"
```

we'd end up with a stray plymouthd process after the bootup:

```
 1     0     440       2  20   0      0     0 worker I    ?          0:00 [kworker/5:2-ata_sff]
 1     0     453       2  20   0      0     0 worker I    ?          0:00 [kworker/9:2-rcu_gp]
 5     0     456       1  20   0   7252  1960 do_epo S    ?          0:00 @usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
```

After killing it, the tty works finally as expected.
2022-09-06 08:33:02 +09:00
Yu Watanabe
e063db12c3 udevadm-wait: shorten code a bit 2022-09-06 06:09:55 +09:00
Yu Watanabe
f6bb2e5189 udevadm-wait: wait for two periodic timer triggered before exit 2022-09-06 06:09:55 +09:00
Yu Watanabe
9d7c7de9bd udevadm-wait: also listen kernel uevent stream if --initialized=no
Suggested at https://github.com/systemd/systemd/pull/24471#discussion_r959703103.
2022-09-06 06:09:42 +09:00
Maccraft123
bad57012af hwdb: Add accel orientation quirk for the Aya Neo Air 2022-09-05 21:48:25 +02:00
Kai Lueke
e374439f4b Use original filename for extension name check
The loading of an extension image from a symlink "NAME.raw" to
"NAME-VERSION.raw" failed because the release file name check worked
with the backing file of the loop device which already resolves the
symlink and thus the found name "NAME-VERSION" mismatched "NAME".
Pass the original filename and use it instead of the backing file
when available. This fixes the loading of "NAME.raw" extensions which
are a symlink to "NAME-VERSION.raw" as, e.g., may be the case when
systemd-sysupdate manages multiple versions.

Fixes https://github.com/systemd/systemd/issues/24293
2022-09-06 03:53:03 +09:00
Yu Watanabe
6f2cea06bf
Merge pull request #24467 from qdeslandes/nspawn_rootidmap
nspawn: add rootidmap as --bind option
2022-09-06 03:45:53 +09:00
Yu Watanabe
559bf6b351
Merge pull request #24568 from poettering/atou16-atou-rework
parse-util: simplify safe_atou8() + safe_atou16()
2022-09-06 03:38:41 +09:00
Yu Watanabe
0cf2dcf154 udev/rules,hwdb: filter out mostly meaningless default strings
The filter is generated based on the following results:
---
git clone git@github.com:linuxhw/DMI.git
cd DMI
git grep -h -A2 '^System Information$' | grep 'Manufacturer' | sort | uniq -c | sort -nr | less
git grep -h -A2 '^System Information$' | grep 'Product Name' | sort | uniq -c | sort -nr | less
---

Closes #24446.
2022-09-06 03:38:09 +09:00
Frantisek Sumsal
d5c8e5ac1b
Merge pull request #24566 from mrc0mmand/TEST-75-fix
test: mark knot.conf tmpfiles config as optional
2022-09-05 17:48:24 +00:00
Zbigniew Jędrzejewski-Szmek
7b20dfc1df
Merge pull request #24567 from poettering/homed-wait-timeout
homed: don't wait for workers without time limit
2022-09-05 18:30:26 +02:00
Quentin Deslandes
2b2777eda9 nspawn: add support for rootidmap bind option
rootidmap bind option will map the root user from the container to the
owner of the mounted directory on the filesystem. This will ensure files
and directories created by the root user in the container will be owned
by the directory owner on the filesystem. All other user will remain
unmapped.
2022-09-05 17:23:28 +01:00
Lennart Poettering
11a1ac5978 parse-util: make safe_atou8() just a wrapper around safe_atou8_full()
As in the previous commit: it's just a wrapper around the same
strtoul(), hence let's just share some more code.
2022-09-05 18:17:18 +02:00
Lennart Poettering
c74101200c parse-util: make safe_atou16_full() just a wrapper around safe_atou_full()
Both are fancy wrappers around strtoul() anyway, not more, hence let's
just make them a wrapper around each other, too, to simplify things a
lot.
2022-09-05 18:17:18 +02:00
Frantisek Sumsal
615fc2c3ce test: zone-set requires TTL for the first record in the rrset
I'm not sure why this worked previously.
2022-09-05 17:42:52 +02:00
Frantisek Sumsal
e4050ff41e test: mark knot.conf tmpfiles config as optional
Since it got removed in the recent knot release.

See: a6971a4025
2022-09-05 17:27:48 +02:00
Lennart Poettering
6019fa1c87
Merge pull request #24404 from thatguystone/socket-jobs
job: Don't discard propagated restart jobs when unit is activating
2022-09-05 17:20:50 +02:00
Quentin Deslandes
1aa18710af nspawn: rename RemountIdmapFlags enum to RemountIdmapping
This enum should be used to define various idmapping modes for bind
mounts which might be incompatible. Changing its name and the values
name to reflect that.
2022-09-05 15:49:26 +01:00
Daan De Meyer
11749b6108 repart: Add support for setting a partition's UUID to zero
This is useful when we need to fill in the UUID later, such as when
using verity partitions.
2022-09-05 23:19:41 +09:00
Lennart Poettering
d3d2dd5e4f units: prolong the stop timeout for homed
Let's give IO/resizing/… more time then usual.

Fixes: #22901
2022-09-05 15:22:53 +02:00
Lennart Poettering
f8f621821a homed: don't wait indefinitely for workers on exit
Let's put some time-limit on it.

Fixes: #22901
2022-09-05 15:20:48 +02:00
Daan De Meyer
b8c0f58c19
Merge pull request #24561 from yuwata/loop-util-follow-ups
loop-util: several follow ups for recent changes
2022-09-05 11:21:29 +02:00
Yu Watanabe
e42270b6a6 loop-util: lock_fd must be closed before calling LOOP_CLR_FD
Follow-up for 7f52206a2b.

C.f. 87862cc2b4.
2022-09-05 04:31:47 +09:00
Yu Watanabe
9bf8600774 loop-util: drop unnecessary initializations 2022-09-05 04:31:29 +09:00
Yu Watanabe
1996ad2854 loop-util: use loop_device_open_full() when whole block device is passed to loop_device_make()
This also fixes a leak of lock_fd, which introduced by
7f52206a2b, when fd is for a block device,
and size or offset is non-zero.

Fixes another issue in #24147.
2022-09-05 03:50:05 +09:00
Yu Watanabe
a8d8a61980 loop-util: introduce loop_device_open_full() 2022-09-05 03:29:06 +09:00
Yu Watanabe
9b5626d67a loop-util: fix LoopDevice.devno assigned by loop_device_open() 2022-09-05 03:29:06 +09:00
Yu Watanabe
ffcb33241e loop-util: also set LoopDevice.diskseq when created with loop_device_open() 2022-09-05 03:29:06 +09:00
Yu Watanabe
b6ca2b281e mount-util: fix error code
If multiple service is starting simultaneously with a shared image,
then one of the service may fail to create a mount node:

systemd[695]: Bind-mounting /usr/lib/os-release on /run/systemd/unit-root/run/host/os-release (MS_BIND|MS_REC "")...
systemd[696]: Bind-mounting /usr/lib/os-release on /run/systemd/unit-root/run/host/os-release (MS_BIND|MS_REC "")...
systemd[695]: Failed to mount /usr/lib/os-release (type n/a) on /run/systemd/unit-root/run/host/os-release (MS_BIND|MS_REC ""): No such file or directory
systemd[696]: Failed to mount /usr/lib/os-release (type n/a) on /run/systemd/unit-root/run/host/os-release (MS_BIND|MS_REC ""): No such file or directory
systemd[695]: Bind-mounting /usr/lib/os-release on /run/systemd/unit-root/run/host/os-release (MS_BIND|MS_REC "")...
systemd[696]: Failed to create destination mount point node '/run/systemd/unit-root/run/host/os-release': Operation not permitted
systemd[695]: Successfully mounted /usr/lib/os-release to /run/systemd/unit-root/run/host/os-release

The function apply_one_mount() in src/core/namespace.c gracefully
handles -EEXIST from make_mount_point_inode_from_path(), but it erroneously
returned -EPERM previously. This fixes the issue.

Fixes one of the issues in #24147, especially reported at
https://github.com/systemd/systemd/issues/24147#issuecomment-1236194671.
2022-09-05 03:28:47 +09:00