1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00
Commit Graph

58877 Commits

Author SHA1 Message Date
matoro
5ba4295bea basic: replace __sync intrinsics with __atomic
Commented reasoning on why it's safe to replace
__sync_bool_compare_and_swap with __atomic_compare_exchange_n in each
location even though the latter has an additional side effect.

__sync_synchronize should be equivalent to __atomic_thread_fence with
__ATOMIC_SEQ_CST memory ordering.
2022-07-14 17:34:15 -04:00
matoro
9ddb63f5cf fundamental: replace __sync with __atomic in ONCE macro
For this one, we can actually just use __atomic_exchange_n since we
don't need the "compare" part of __atomic_compare_exchange_n.
2022-07-14 17:34:15 -04:00
matoro
8a75ba0a7f process-util: replace __sync intrinsics to __atomic
This one is rather tricky, but changing the initialization of
current_val should give this the same effect.  Based on ffmpeg's change
here: https://ffmpeg.org/pipermail/ffmpeg-devel/2014-October/164556.html

Quoting from them:
> The second reason is __atomic_compare_exchange_n(), and how it differs from
> __sync_val_compare_and_swap().
> While the latter returns *ptr as it was before the operation, the former
> doesn't and instead copies *ptr to oldval if the result of the
> comparison is false. This means that returning oldval will match the old behavoir
> without having to change the wrapper.
> A disassemble example from libavutil/buffer.o however hints that the
> __atomic function may be slower because of it writting oldval.
2022-07-14 17:34:10 -04:00
Yu Watanabe
dfeb5a076a
Merge pull request #24016 from poettering/sysctl-cred-extra
sysctl: also process sysctl requests via the "sysctl.extra" credential
2022-07-15 04:20:35 +09:00
asavah
c3d8a7e21c smack: fix build failure with -Dsmack=false 2022-07-15 04:19:36 +09:00
Yu Watanabe
72c747e6d1 test-network: add a test case for IPv4LLStartAddress= 2022-07-15 04:01:56 +09:00
Yu Watanabe
d3efcd2def network: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress=
Follow-up for #23927.
2022-07-15 03:37:09 +09:00
Yu Watanabe
c1dd250f18
Merge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-address
network: Feature IPv4 link-local start address
2022-07-15 03:21:26 +09:00
Yu Watanabe
e3979a6256
Merge pull request #23999 from msekletar/revert-background-session-no-user-instance
Revert of recent changes in handling of background sessions
2022-07-15 03:18:08 +09:00
Zbigniew Jędrzejewski-Szmek
78f8ce6d90 environment-d-generator: use DEFINE_MAIN_FUNCTION() 2022-07-14 19:25:15 +02:00
Zbigniew Jędrzejewski-Szmek
9cfc294fe0 man: fix formatting of "BARRIER=1"
Whitespace inside of the <varname> field was propagated to the displayed form,
causing strange indentation.
2022-07-14 19:25:15 +02:00
Zbigniew Jędrzejewski-Szmek
8f41e6b636 core: wrap long comments and capitalize sentences 2022-07-14 19:25:15 +02:00
Lennart Poettering
93cbc9ca12 base-filesystem: pick more conservative access mode for /root/
Let's not allow anyone to look into /root/ if we create it via the
base-filesystem logic. i.e. change 0755 → 0750 as default access mode
for /root/, in case we create it if it happens to be missing.
2022-07-14 18:18:34 +02:00
Lennart Poettering
6ecc6c4536
Merge pull request #24008 from poettering/tmpfiles-is-dir-fix
tmpfiles: fix wrong is_dir_fd() call
2022-07-14 18:16:07 +02:00
undef
e9a28b8ccd growfs: Expand FS even if underlying block expansion fails
This allows growfs to expand the filesystem even when the underlying
block device cannot be expanded. This has been useful for example on
LUKS devices that have already been expanded using systemd-repart.

This works around the following error:
```
root@mobian:/home/mobian# /usr/lib/systemd/systemd-growfs /
crypt_resize() of /dev/block/179:2 failed: Operation not permitted
```
2022-07-14 18:13:23 +02:00
Lennart Poettering
0541980587
Merge pull request #24015 from poettering/growfs-fd-tweaks
growfs fd handling tweaks
2022-07-14 18:09:18 +02:00
Lennart Poettering
3840b14781 man: drop misplaced ',' 2022-07-14 18:04:01 +02:00
Lennart Poettering
39f0d1d2e7 sysctl: also process sysctl requests via the "sysctl.extra" credential 2022-07-14 18:02:58 +02:00
Lennart Poettering
bbe29ca29b update TODO 2022-07-14 17:11:43 +02:00
Zbigniew Jędrzejewski-Szmek
b33c2757d8 kernel-install: add helper for logging 2022-07-14 22:20:49 +09:00
Lennart Poettering
1ab8cd794c import-ceds: use the right error variables at four places 2022-07-14 21:52:11 +09:00
Lennart Poettering
0fde330d66 update TODO 2022-07-14 14:45:56 +02:00
Lennart Poettering
1aad75efdf update TODO 2022-07-14 14:41:43 +02:00
Andre Kalb
1df6201882 man/network: ServerAddress= drop "literal" from IP address ranges 2022-07-14 14:35:42 +02:00
Andre Kalb
59c272316c sd-ipv4ll/networkd: Try to select an IPv4 link-local start address 2022-07-14 14:35:42 +02:00
undef
d26c0f7243 growfs: don't actually resize on dry-run
This causes systemd-growfs to exit before resizing the partition when
`--dry-run` is passed. Resizing during a dry run of a change breaks the
users expectations.
2022-07-14 21:23:11 +09:00
Lennart Poettering
8c77652334 update TODO 2022-07-14 14:04:36 +02:00
Yu Watanabe
b9e4ec500e network: refuse to configure address or route with 0 valid lifetime
Fixes #23625.
2022-07-14 21:00:05 +09:00
Yu Watanabe
5235d73960 network: fix infinite lifetime handling 2022-07-14 20:56:41 +09:00
Yu Watanabe
def4741bd7 network: use sd_event_now() 2022-07-14 20:55:24 +09:00
Luca Boccassi
f1298cd6a8
Merge pull request #24002 from yuwata/network-hw-addr
network: fix hardware address handling
2022-07-14 11:22:55 +01:00
Lennart Poettering
a39cc90d2b growfs: don't reopen fds unnecessarily
Instead, just open the mount fd once, and then operate on fds only.
2022-07-14 11:34:18 +02:00
Lennart Poettering
12810f3abb growfs: ensure that we operate on a block device before issuing a block ioctl
Similar to the previous commit: let's add extra safety so that we don't
issue ioctls on the wrong type of inode.
2022-07-14 11:31:50 +02:00
Lennart Poettering
2e7dd6682b growfs: insist we open a directory when opening fs mount point
This is a simple safety check, since we shouldn't invoke ioctls on fds
without being reasonably sure they are of the right type since ioctls
are overloaded, and we might be tricked hence to execute an operation on
an fd which means something different than what we expect.
2022-07-14 11:30:27 +02:00
Michal Sekletar
513cf7da85 Revert "logind: don't start user@UID.service instance for background sessions"
This reverts commit e73bf3425c.
2022-07-14 11:07:17 +02:00
Michal Sekletar
527e0e8188 Revert "tests: add test for handling of background sessions"
This reverts commit bf40417c7c.
2022-07-14 11:07:13 +02:00
Michal Sekletar
8da70b9d30 Revert "NEWS: mention change in default behavior of background sessions"
This reverts commit 1611606fd9.
2022-07-14 11:01:09 +02:00
Lennart Poettering
f95db4d6fa update TODO 2022-07-14 10:24:08 +02:00
Lennart Poettering
92631578ff tmpfiles: check the directory we were supposed to create, not its parent
This current code checks the wrong directory. This was broken in
4c39d899ff which converted the previous
code incorrectly.
2022-07-14 10:12:37 +02:00
Lennart Poettering
a586dc791c stat-util: replace is_dir() + is_dir_fd() by single is_dir_full() call
This new call can execute both of the old operations, but also do
generic fstatat() like behaviour.
2022-07-14 10:11:50 +02:00
Yu Watanabe
3f0dbb0f0c sd-bus: do not pass NULL when received message with invalid type
Fixes #24003.
2022-07-14 10:08:27 +02:00
Yu Watanabe
68870a46b3 sd-dhcp6-client: fix off-by-one error in parsing dhcp6 options
This fixes error in parsing message when the rapid commit option is
located at the end of the message.

Fixes an issure reported in #24002.
2022-07-14 10:49:18 +09:00
Yu Watanabe
d81b5a191e sd-dhcp6-client: allow NULL option value when length is zero 2022-07-14 10:49:14 +09:00
Yu Watanabe
50309ff785 sd-dhcp6-client: add more debugging logs on parsing message 2022-07-14 09:31:04 +09:00
Yu Watanabe
a5a8714187
Merge pull request #23882 from dtardon/logind-set-display-test
Add tests for org.freedesktop.login1.Session SetType and SetDisplay
2022-07-14 07:35:23 +09:00
Andre Kalb
34b63c9e45 network: Add support to select an IPv4 link-local start address 2022-07-13 23:57:18 +02:00
Yu Watanabe
3be64aa462 network: do not set invalid MAC address for non-ethernet interface 2022-07-14 06:52:07 +09:00
Yu Watanabe
56bb67180a network: NDisc does not require MAC address
This effectively revert ba4c7184b3.

Fixes #23546.
2022-07-14 06:52:07 +09:00
Yu Watanabe
7e2f684e1f network: dhcp4: disable DHCPv4 client on interfaces with non-supported types
Replaces f42d41cc5f.
2022-07-14 06:52:07 +09:00
Yu Watanabe
8f4f630731 Revert "network: configure DHCP clients after MAC address is assigned"
This reverts commit f42d41cc5f.

DHCPv6 client does not require MAC address.
DHCPv4 client will be handled in a different way in a later commit.

Partially fixes #23546.
2022-07-14 06:51:59 +09:00