Commit Graph
37600 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 835f79fddd Merge pull request #22656 from keszybz/portablectl-method2
portable: add return parameter to GetImageMetadataWithExtensions
2022-03-08 13:26:33 +01:00
Ludwig Nussel ee3d33c415 logind: use mfree instead of freep 2022-03-07 19:43:18 +00:00
Bastien Nocera d48bf01636 memory-id: Work-around incorrect "Number of slots"
In some BIOSes, the "Number of slots or sockets available for Memory
Devices in this array" is incorrectly set to the number of memory array
that's populated.

Work-around this problem by outputting the number of sockets after
having parsed them so that consumers of this data can carry on expecting
an accurate number in this property.

This fixes the number of memory slots advertised for the HP Z600.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1686
2022-03-07 15:33:26 +00:00
Zbigniew Jędrzejewski-SzmekandLuca Boccassi 087a799f64 portable: add return parameter to GetImageMetadataWithExtensions
The complaint was that the output array was used for two kinds of data, and the
input flag decided whether this extra data should be included. The flag is
removed, and instead the old method is changed to include the data always as
a separate parameter.

This breaks backward compatibility, but  the old method is effectively broken
and does not appear to be used yet, at least in open source code, by
searching on codesearch.debian.net and github.com.

Fixes #22404.

Co-authored-by: Luca Boccassi <bluca@debian.org>
2022-03-07 14:49:54 +00:00
Zbigniew Jędrzejewski-Szmek 90e3f3581d portable: inline one variable declaration 2022-03-07 14:32:01 +01:00
Zbigniew Jędrzejewski-Szmek 573e33de07 portablectl: reorder if branches to match previous conditional in the same function
One is a ternary op, the other an normal conditional, but they should still use
the same order of branches.
2022-03-07 14:31:48 +01:00
Yu Watanabe a17e54783a tree-wide: fix typo 2022-03-07 15:32:22 +09:00
Zbigniew Jędrzejewski-Szmek b4e7d7555e man: describe capability checks on the bus
A description of SD_BUS_VTABLE_CAPABILITY is added, and the discussion
on SD_BUS_VTABLE_UNPRIVILEGED in expanded. I think it would be nice
to add longer description of how access is checked (maybe in sd-bus(3)),
but I'm leaving that for later. I think the text that was added here
describes everything, even if tersely.

Fixes #21882.
2022-03-04 15:43:18 +01:00
David Tardon 203ea2c8f1 devnode-acl: use _cleanup_ to free acl_t 2022-03-04 11:51:48 +01:00
Alfonso Sánchez-Beato 178d598b5f sd-stub: do not print warning if filesystem is not supported
Do not print a warning in case we try to load the file system protocol for an
unsupported file system, just return EFI_SUCCESS instead.
2022-03-03 23:14:45 +00:00
Zbigniew Jędrzejewski-Szmek f05a288135 Merge pull request #22644 from keszybz/meson-no-split
Use normal lists in meson instead of splitting on whitespace
2022-03-03 23:10:14 +01:00
Tobias Stoeckmann 1a823cdeb9 core: check size before mmap
The data type off_t can be 64 on 32 bit systems if they have large
file support. Since mmap expects a size_t with 32 bits as second
argument truncation could occur. At worst these huge files could
lead to mmaps smaller than the previous check for small files.

This in turn shouldn't have a lot of impact because mmap allocates
at page size boundaries. This also made the PAGE_ALIGN call in
open_mmap unneeded. In fact it was neither in sync with other mmap
calls nor with its own munmap counterpart in error path.

If such large files are encountered, which is very unlikely in these
code paths, treat them with the same error as if they are too small.
2022-03-03 22:48:43 +01:00
Lennart Poettering 94ce42bcb6 killall: show PID of processes killed in final killing spree
Let's show the PID of killed processes in all cases, to make debugging
easier.

See: https://lists.freedesktop.org/archives/systemd-devel/2022-March/047504.html
2022-03-03 22:45:47 +01:00
Zbigniew Jędrzejewski-Szmek 2f492a739c meson: move files' closing brace to separate line 2022-03-03 12:14:13 +01:00
Luca Boccassi 3a0692e3a8 Merge pull request #22522 from lnussel/fix_logind_restart
logind: load scheduled shutdown on restart
2022-03-02 17:58:53 +00:00
Zbigniew Jędrzejewski-Szmek b9acb5074e meson: use files() for libudevd_core_sources too
I'm not sure why a plain-text list was used in this case.
2022-03-02 14:52:50 +01:00
Zbigniew Jędrzejewski-Szmek f1b98127ff meson: do not use split() in file lists
The approach to use '''…'''.split() instead of a list of strings was initially
used when converting from automake because it allowed identical blocks of lines
to be used for both, making the conversion easier.

But over the years we have been using normal lists more and more, especially
when there were just a few filenames listed. This converts the rest.

No functional change.
2022-03-02 14:49:32 +01:00
Daan De Meyer ee48779e05 shared: Add more dlopen() tests
Add dlopen_dw(), dlopen_elf() and dlopen_pcre2() to the dlopen test.
To enable adding dlopen_pcre2(), we move pcre2-dlopen.h/c from
src/journal to src/shared.
2022-03-01 21:07:17 +00:00
Ludwig Nussel 00886e06e8 systemctl: use action_table for scheduling shutdown
The fall-through to reboot doesn't seem to make sense. It won't happen
in the current code. Filtering the actions on client side is not needed
either as the server will refuse unsupported operations anyway.
2022-02-28 11:29:45 +01:00
Ludwig Nussel aa6123e85e logind: load scheduled shutdown on restart
Make sure logind doesn't forget about a scheduled shutdown, even if it
gets restarted eg due to a package update.
2022-02-28 11:29:45 +01:00
Ludwig Nussel 9fa9c66dbd logind: fix handle_action_valid() 2022-02-28 10:31:10 +01:00
Yu Watanabe 3d24b0ddd8 network: netdev: drop unused creation type NETDEV_CREATE_AFTER_CONFIGURED 2022-02-27 09:36:48 +09:00
Yu Watanabe 0c91c7a241 network: l2tp: change create type to independent
L2TP tunnel does not have underlying interface. Let's change its type to
independent.
2022-02-27 09:36:48 +09:00
Yu Watanabe 8b49ee2dcd network: l2tp: make Local= optionally take interface name 2022-02-27 09:36:48 +09:00
Yu Watanabe 8b7615f9b9 network: introduce {manager,link}_address_is_reachable() 2022-02-27 09:36:48 +09:00
Yu Watanabe c45cbc2394 network: merge gateway_is_ready() and link_address_is_reachable()
As link_address_is_reachable() is used only by gateway_is_ready().
2022-02-27 09:36:48 +09:00
Yu Watanabe 77e9be1ee4 network: address: introduce manager_get_address()
And make manager_has_address() return true only when the link which has
the address is ready.
2022-02-27 09:36:48 +09:00
Yu Watanabe 04386f56b5 Merge pull request #22626 from yuwata/network-assorted-cleanups
network: assorted cleanups
2022-02-26 23:57:08 +09:00
Yu Watanabe 7098414877 network: adjust assertions 2022-02-26 15:01:50 +09:00
Yu Watanabe 97b2bc3506 network: netdev: drop NETDEV_CREATE_MASTER
As there is no deference between NETDEV_CREATE_MASTER and
NETDEV_CREATE_INDEPENDENT.
2022-02-26 15:01:50 +09:00
Yu Watanabe eae0d010f7 network: netdev: use netdev_is_stacked() at one more place 2022-02-26 15:01:50 +09:00
Yu Watanabe 490c00a369 network: netdev: make link_get_local_address() refuse non-ready links and addresses 2022-02-26 14:59:56 +09:00
Yu Watanabe 8c14846e87 network: traffic control: drop detailed log messages
This also renames `req` -> `m`.

Follow-up for a79a8d16d5 and #22014.
2022-02-26 14:58:01 +09:00
Yu Watanabe 3a67b8bb0d network: traffic control: drop meta from QDisc and TClass
Since #22248, it is not necessary to manage QDisc and TClass in same Set
or Hashmap. Let's manage them independently.
2022-02-26 14:58:01 +09:00
Yu Watanabe b93ce59e51 network: drop unused flag and counter 2022-02-26 05:49:52 +09:00
Yu Watanabe b4d6ae63ba network: split netdev_create() into two 2022-02-26 05:49:52 +09:00
Yu Watanabe 9aa2585e2f network: assign corresponding NetDev object to Link 2022-02-26 05:49:52 +09:00
Yu Watanabe c2b19b8f70 network/netdev: drop unused argument 2022-02-26 05:49:52 +09:00
Yu Watanabe fef805b9fa network/netdev: do not assign value on failure 2022-02-26 05:49:52 +09:00
Yu Watanabe 745f0620ed network: dhcp-server: add two more log messages 2022-02-25 11:01:51 +09:00
Yu Watanabe 2971e2adf1 network: bridge mdb: add missing assertion 2022-02-25 11:01:50 +09:00
Yu Watanabe e1e4cd1eed network: move more functions
No functional change. Preparation for later commits.
2022-02-25 11:01:50 +09:00
Yu Watanabe 8bed7c55bf network: move functions
No functional change. Preparation for later commits.
2022-02-25 11:01:50 +09:00
Yu Watanabe d3aff22f19 network: address: drop unnecessary call of address_get()
As here `req->address` and the result `existing` are always equivalent.
2022-02-25 11:01:50 +09:00
Yu Watanabe a79a8d16d5 network: drop detailed log messages
This also renames netlink message `req` -> `m` for preparation of later
commits.

Follow-ups for #22014.
2022-02-25 11:01:50 +09:00
Yu Watanabe cae162a79c network: make link_down() independent of link_up_or_down()
And rename it to link_down_now() to emphasize it does not use request
queue.
2022-02-25 11:01:50 +09:00
Luca Boccassi 6b3211c15e Merge pull request #22611 from yuwata/network-activation-policy-stacked-netdevs
network: make activation policy also work for stacked netdevs
2022-02-24 22:57:35 +00:00
Yu Watanabe 369ac19243 network: add NextServer= and Filename= setting to [DHCPServer] section
Closes #4403.
2022-02-25 02:45:47 +09:00
Yu Watanabe d5e5cd5c34 sd-dhcp-server: add support to send next server and filename option for PXE boot systems 2022-02-25 02:32:58 +09:00
Yu Watanabe 047b9991a4 network: create stacked netdevs after the underlying link is activated
Otherwise, the activation policy for the netdevs are ignored.

Fixes #22593.
2022-02-24 08:37:26 +09:00