1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-08 21:17:47 +03:00
Commit Graph

54919 Commits

Author SHA1 Message Date
Luca Boccassi
3d170ca580
Merge pull request #21573 from keszybz/one-more-table-sort
One more table sort and man page updates
2021-11-30 14:52:08 +00:00
Luca Boccassi
45f822ceb3 docs: clarify ELF note usage in COREDUMP_PACKAGE_METADATA 2021-11-30 14:42:43 +00:00
Yu Watanabe
b3d06b9226 libsystemd: ignore both EINTR and EAGAIN 2021-11-30 23:06:43 +09:00
Yu Watanabe
8add30a03c tree-wide: use ERRNO_IS_TRANSIENT() 2021-11-30 23:06:43 +09:00
Yu Watanabe
7aad83580f errno-util: introduce ERRNO_IS_TRANSIENT() 2021-11-30 23:06:43 +09:00
Yu Watanabe
16edfadc67 ask-password: fix error handling
ERRNO_IS_NOT_SUPPORTED() also matches positive values.
Fortunately, lookup_key() does not return positive values.
2021-11-30 23:05:24 +09:00
Yu Watanabe
97e80ee4a8 sd-dhcp6-client: fix error handling 2021-11-30 22:37:21 +09:00
Yu Watanabe
b224530f5f
Merge pull request #21559 from jcg190701/main
fix ConditionDirectoryNotEmpty when it comes to a Non-directory file
2021-11-30 22:34:21 +09:00
Zbigniew Jędrzejewski-Szmek
5143e657d2 basic/architecture: sort and reindent one more table
No idea why I didn't do this one in the previous round.
2021-11-30 13:54:29 +01:00
Zbigniew Jędrzejewski-Szmek
77e289abb4 man: fix typo
Follow-up for c896eb7ad6.
2021-11-30 13:54:27 +01:00
Zbigniew Jędrzejewski-Szmek
17cd1f627b man: add missing plural and reorder sentence
We shouldn't explain what a value does before listing valid values…

Follow-up for 4f1ac4a38d.
2021-11-30 13:52:32 +01:00
Luca Boccassi
bedd92b956 docs: clarify JSON terms in COREDUMP_PACKAGE_METADATA 2021-11-30 12:36:16 +00:00
Yu Watanabe
a6f44d610c tree-wide: fix typo 2021-11-30 12:30:07 +00:00
Luca Boccassi
dc063e0978
Merge pull request #21568 from yuwata/network-fix-json-format
network: fix json format
2021-11-30 09:13:03 +00:00
jiangchuangang
7c4c9948d0 fix ConditionPathIsReadWrite when path does not exist. 2021-11-30 16:47:54 +08:00
Yu Watanabe
718f0a74ab man: fix copy-and-paste mistake 2021-11-30 09:29:51 +01:00
jiangchuangang
193105f2d0 fix ConditionDirectoryNotEmpty when it comes to a Non-directory file 2021-11-30 09:16:15 +08:00
Yu Watanabe
94f0bd624b test-network: add more basic tests for network json formats 2021-11-30 10:03:51 +09:00
Yu Watanabe
d27e9b0f83 network: json: add missing initialization
Fixes CID#1466513.
2021-11-30 10:03:51 +09:00
Yu Watanabe
b89931ba28 json: make JSON_BUILD_PAIR_IN_ADDR_NON_NULL or friends handle NULL gracefully
Fixes #21567.
2021-11-30 10:03:51 +09:00
Amir Omidi
a41699c90b
systemctl: display how long a systemd service will run (#21494) 2021-11-30 09:24:18 +09:00
Zbigniew Jędrzejewski-Szmek
8e560cd090
Merge pull request #21532 from yuwata/network-json-more
network: add more json entries
2021-11-29 21:26:56 +01:00
Zbigniew Jędrzejewski-Szmek
08e70b4a21
Merge pull request #21541 from bluca/analyze_security_profile
analyze: add --profile switch to security verb
2021-11-29 21:23:34 +01:00
Jan Janssen
0289441e09 sd-boot: Fix assert failure in random-seed.c
Fixes: #21556
2021-11-30 03:10:03 +09:00
Michal Sekletar
c29e6a9530 unit: add jobs that were skipped because of ratelimit back to run_queue
Assumption in edc027b was that job we first skipped because of active
ratelimit is still in run_queue. Hence we trigger the queue and dispatch
it in the next iteration. Actually we remove jobs from run_queue in
job_run_and_invalidate() before we call unit_start(). Hence if we want
to attempt to run the job again in the future we need to add it back
to run_queue.

Fixes #21458
2021-11-30 03:06:35 +09:00
Nacho Barrientos
081f44859a Byte order to host before using the lifetime
I've seen this in `NetworkManager-1.34.0-0.3.el8.x86_64` (latest in CentOS
Stream 8 at the time of writing this message) which does not use the latest
Systemd but probably the code base is the same (see
51f93e00a2).

Before the patch:

```
libsystemd: eth0: DHCPv6 client: T1 expires in 34y 3w 6d 45min 31s
libsystemd: eth0: DHCPv6 client: T2 expires in 54y 5month 3w 3d 23h 20min 35s
```

After the patch:

```
libsystemd: eth0: DHCPv6 client: T1 expires in 3d 7h 58min 3s
libsystemd: eth0: DHCPv6 client: T2 expires in 5d 2h 26min 50s
```

same box (x86_64 system) and same DHCPv6 server.

This regression has likely been introduced by 8a8955507a.
2021-11-30 03:05:02 +09:00
Marco Scardovi
55dad038b2 Add missing greater than/less than tab on some HP
Some HP keyboards (like https://h30434.www3.hp.com/t5/image/serverpage/image-id/203235i01AD626584587DA1?v=v2) have <> between AltGr and left arrow. This add the fix and make it working again
2021-11-29 16:26:27 +00:00
Zbigniew Jędrzejewski-Szmek
8fb444011e
Merge pull request #21534 from yuwata/udev-accept-longer-hw-address
udev/net: accept longer HW address
2021-11-29 14:00:52 +01:00
Zbigniew Jędrzejewski-Szmek
4b658ff651
Merge pull request #21531 from keszybz/log2-tables
Optimize log2 tables
2021-11-29 13:58:49 +01:00
Zbigniew Jędrzejewski-Szmek
1e135e9780
Merge pull request #21537 from medhefgo/boot-sbat
meson: Default to sbat-distro=auto
2021-11-29 11:30:25 +01:00
Luca Boccassi
c0775eb787 coredump: fix parsing metadata without access to executable
This was broken in a subtle way: we'd get an ELF ref, but not the right one,
so no metadata note would be found.
Change the parsing function to return 1 when it finds something, so that
we can return early only when that happens.
2021-11-29 11:25:48 +01:00
Zbigniew Jędrzejewski-Szmek
48c67fdfb1 meson: upgrade warning about bad init values to an error
We never expect to get this warning, it is most likely to occur if
somebody messes up enumeration values.
2021-11-29 11:16:23 +01:00
Zbigniew Jędrzejewski-Szmek
8a7da94082 networkd: replace a table with log2 fields by a list 2021-11-29 11:16:15 +01:00
Zbigniew Jędrzejewski-Szmek
0580badc15 networkd: align table 2021-11-29 11:16:07 +01:00
Zbigniew Jędrzejewski-Szmek
19aa7eeb6c networkd: replace a table with log2 fields by a list 2021-11-29 11:15:58 +01:00
Zbigniew Jędrzejewski-Szmek
7396e01484 networkd: replace a table with log2 fields by a list 2021-11-29 11:15:50 +01:00
Zbigniew Jędrzejewski-Szmek
67b65e1104 networkd: replace a table with log2 fields by a list
The code looks a bit more complicated, but the compiler generates a simpler and
more compact text.

An additional advantage is that if any of the fields were repeating or not
power-of-two, the compiler would warn about an overridden entry in the table.
2021-11-29 11:15:31 +01:00
Zbigniew Jędrzejewski-Szmek
f4ada1b42f basic/util: add macro variants of log2 functions
The macro variants can be used in static initializers.

The same guard against calling __builtin_clz(0) is added as for
__builtin_clzll(0), since that's undefined behaviour too. Our code
wouldn't call it, but this avoids a potential pitfall with the macro.
All variants map 0→0. Otherwise we'd often have to handle 0 specially
in callers.

__builtin_clz takes unsigned as the argument, so there's no LOG2I macro.
2021-11-29 11:12:52 +01:00
Topi Miettinen
ddf127cda4 pam_systemd: Check also abstract socket for X11
It seems that `pam_systemd` was the only thing left that wanted to use sockets
in file system path `/tmp/.X11-unix/X*`. X11 apps actually prefer using the
abstract socket version.

This allows running Xserver with `-nolisten tcp -nolisten unix`, which makes
the server only listen to an abstract socket.

Also in my setup, Xserver is running as a separate system service instead of
starting from display manager service, and now `PrivateTmp=yes` can be used for
both. The file system of the display manager service is inherited by user apps
and now their `/tmp` will be separate from `/tmp` of PID1 namespace as well as
`/tmp` of Xserver.
2021-11-28 18:24:39 +00:00
Jan Janssen
52ccce6ac5 meson: Rename compile_args to efi_cfalgs
compile_args sounds like it could be used for other targets besides
efi binaries. This also keeps the name in line with efi_ldflags.
2021-11-28 16:22:15 +01:00
Jan Janssen
252b6b1bfd meson: Default to sbat-distro=auto
Any recent shim will refuse starting an image that does not have an sbat section
and will do so with a generic "Security Violation" message. And it is very easy
to forget passing -Dsbat-distro=auto to meson when creating a fresh build dir.

Adding sbat info when shim is not used or secure boot is disabled does not hurt
anyone, so default to auto. This still ensures to not add auto-detected info in
case we are cross building.
2021-11-28 16:20:54 +01:00
Luca Boccassi
64a05587ce
Merge pull request #21549 from yuwata/network-netdev-mac-address-none
network: netdev: make MACAddress= take 'none'
2021-11-28 12:36:35 +00:00
Jan Janssen
5a45a6bbb6 test-parse-util: Add SI-suffix parse_size tests 2021-11-28 11:48:34 +01:00
Jan Janssen
d19bff65ee test-namespace: Convert to TEST macro 2021-11-28 11:48:34 +01:00
Jan Janssen
353b980204 test-barrier: Convert to TEST macro 2021-11-28 11:48:34 +01:00
Jan Janssen
26e555cbba test: Convert to TEST/TEST_RET macros
Note that test-cgroup-mask, test-cgroup-unit-default and test-unit-name will now
report being skipped instead of reporting success if not run under systemd.
2021-11-28 11:46:26 +01:00
Jan Janssen
0578dfe3eb test: Add sd_booted condition test to TEST macro
Note that this will only report test skips if they use TEST_RET macro.
Regular TEST macros can still be skipped, but this will not be reported
back to main();
2021-11-28 11:42:28 +01:00
Jan Janssen
4c0acc0761 test: Add TEST_RET macro
This declares a test function whose return code will be passed from
main(). The first test that does not return EXIT_SUCCESS wins.
2021-11-28 11:40:45 +01:00
Yu Watanabe
5b8bdd20c6 network/netdev: generate persistent MAC address for batadv and bridge
This mostly reverts 489f01f806 and
deb2cfa4c6.

As now MACAddress=none is supported. So, users can still disable MAC
address assignment.
2021-11-28 12:04:55 +09:00
Yu Watanabe
aaa5ca57ae network/netdev: make MACAddress= take 'none' to suppress generating persistent hardware address
This is mostly equivalent to .link file's MACAddressPolicy=none.
2021-11-28 12:04:55 +09:00