1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

54808 Commits

Author SHA1 Message Date
Xiaotian Wu
0444a6e4be gpt: update the gpt test case for LoongArch 2021-11-30 23:34:29 +08:00
Wu Xiaotian
5c0968a2d1 architecture: Add support for the LoongArch architecture 2021-11-30 23:34:20 +08:00
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
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
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
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
Yu Watanabe
5dcc5b1a11 network/netdev: move config_parse_netdev_kind() at the end 2021-11-28 12:04:55 +09:00
Topi Miettinen
788e720181 namespace: allow ProcSubset=pid with some ProtectKernel options
In case `/proc` is successfully mounted with pid tree subset only due to
`ProcSubset=pid`, the protective mounts for `ProtectKernelTunables=yes` and
`ProtectKernelLogs=yes` to non-pid `/proc` paths are failing because the paths
don't exist. But the pid only option may have failed gracefully (for example
because of ancient kernel), so let's try the mounts but it's not fatal if they
don't succeed.
2021-11-27 17:36:51 +00:00
Luca Boccassi
cab35e9672
Merge pull request #21535 from yuwata/network-netdev-verify-mac
network/netdev: verify MAC address
2021-11-27 13:48:56 +00:00
Yu Watanabe
70b0652697 network: route: route->link may be NULL
Fixes #21544.
2021-11-27 13:48:02 +00:00
Alyssa Ross
f000edf9ea docs: fix descriptions in discoverable partitions
00db9a114e ("docs: generate table from header using a script") got the
descriptions for the partition types mixed up.  After that change, the
spec claimed, for example, that the /usr partition should contain
"dm-verity integrity hash data for the matching root partition", and
that the /usr verity partition should be of type "Any native, optionally
in LUKS".  This made the spec an extremely confusing read before I
figured out what must have happened!

I've gone through the table as it existed prior to 00db9a114e, and moved
the descriptions around in the script that generates the table until
they matched up with what they used to be.  Then I regenerated the
table from the fixed script.
2021-11-27 13:46:35 +00:00
Yu Watanabe
f5caacec1c
Merge pull request #21533 from yuwata/network-trivial-follow-ups
network: trivial follow-ups
2021-11-27 06:42:19 +09:00
Yu Watanabe
e76d491c87
Merge pull request #21530 from keszybz/strv-cleanup
Modernize style and drop strv_free_free
2021-11-27 06:41:56 +09:00
Yu Watanabe
007899f43e network/netdev: verify specified MAC address
Drop multicast bit and set local bit of the specified MAC address.

This also makes failure in generating persistent MAC address
non-critical.
2021-11-27 06:39:04 +09:00
Yu Watanabe
5e20e1e3e3 network/netdev: use "struct hw_addr_data" to store MAC address 2021-11-27 06:39:04 +09:00
Yu Watanabe
9f0cf80dd0 network/netdev: introduce .iftype to netdev vtable
And disable .generate_mac flag for non-ether interfaces.
2021-11-27 06:38:26 +09:00
Yu Watanabe
a67e0507c3 network: veth: use SYNTHETIC_ERRNO() macro or use real error cause 2021-11-27 06:37:58 +09:00