Commit Graph
52900 Commits
Author SHA1 Message Date
Yu Watanabe 38d3bcde5d sd-netlink: support more rtnl attributes 2021-08-31 21:12:20 +09:00
Yu Watanabe c46bce8b5d basic/linux: add more bridge headers 2021-08-31 21:12:20 +09:00
Yu Watanabe 6771b85d98 network/netdev: append IFLA_INFO_DATA attribute only when it is necessary 2021-08-31 21:12:20 +09:00
Peter Hutterer 08111c7841 tmpfiles.d: remove .Test-unix, it's obsolete
See libxtrans commit 0794b1b712a90b40e2b019c9edc6f96874493c52. The code
to generate this socket was removed 5 years ago and even before it was
conditional on #define TEST_t. There is no reference to that #define in
either the X server nor libX11's git history, or in any of the current
libX*.

Let's assume this is well and truly obsolete.
2021-08-31 10:57:37 +02:00
Luca Boccassi 1f08acf406 Merge pull request #20257 from bluca/seqno
Use new diskseq block device property
2021-08-31 09:06:33 +01:00
Yu Watanabe e658a37326 Merge pull request #20567 from yuwata/socket-additional-cmsg-buffer
socket-util: add additional cmsg buffer for 64bit timeval or timespec
2021-08-31 13:54:18 +09:00
Kristian Klausen b00651cf43 gpt-auto-generator: Use volatile-root by default and automatic logic as fallback
Previously volatile-root was only checked if "/" wasn't backed by a
block device, but the block device isn't necessarily original root block
device (ex: if the rootfs is copied to a ext4 fs backed by zram in the
initramfs), so we always want volatile-root checked.

So shuffle the code around so volatile-root is checked first and
fallback to the automatic logic.

Fix #20557
2021-08-31 13:52:52 +09:00
Yu Watanabe fb6ba2521c Merge pull request #20583 from poettering/pk-no-tty
some polkit agent tweaks
2021-08-31 13:45:04 +09:00
Thomas Mühlbacher fee1863c83 man: Don't leak memory in path-documents example
The `sd_path_lookup(3)` man page states that the returned string shall be
`free(3)`'d but then doesn't do so in the example code.

Also add basic error handling as well.
2021-08-31 13:44:49 +09:00
Yu Watanabe 827d1ba730 core: fix typo: they -> the 2021-08-30 22:25:54 +09:00
Lennart Poettering aecc04f180 hwdb: remove double empty line in --help text 2021-08-30 22:25:04 +09:00
Lennart Poettering 0bcf167900 exec-util: handle gracefully if we want to fork an agent but have no controlling tty
Fixes: #20576
2021-08-30 13:37:06 +02:00
Lennart Poettering 966f3a246c run/mount/systemctl: don't fork off PolicyKit/ask-pw agent when in --user mode
When we are in --user mode there's no point in doing PolicyKit/ask-pw
because both of these systems are only used by system-level services.
Let's disable the two agents for that automaticlly hence.

Prompted by: #20576
2021-08-30 13:37:06 +02:00
Yu Watanabe 37df6d9b8d timesync: check cmsg length 2021-08-30 19:56:44 +09:00
Yu Watanabe 9365e296fe socket-util: introduce CMSG_SPACE_TIMEVAL/TIMESPEC macro to support additional 64bit timeval or timespec
Fixes #20482 and #20564.
2021-08-30 19:56:41 +09:00
jlempen 93d2e0b6b0 Add matrix for the Chuwi SurBook Mini (CWI540) 2021-08-30 12:16:52 +02:00
José Expósito c5e9aeca0a hwdb: add a generic rule for trackpoints (#20543)
Check for "TrackPoint" in the device name and add the
ID_INPUT_POINTINGSTICK property.

In reference to libinput issue:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/651
2021-08-30 18:30:42 +10:00
Yu Watanabe 4917c15af7 Merge pull request #20057 from yuwata/sd-netlink-genl-cleanups
sd-netlink: cleanups for generic netlink
2021-08-29 22:37:31 +09:00
Yu Watanabe 98be429243 sd-netlink: make type_system_get_*() and friends return value directly 2021-08-29 18:10:47 +09:00
Yu Watanabe e1578f608b sd-netlink: introduce sd_genl_add_match()
By using this, we can listen multicast messages for generic netlink.
2021-08-29 18:10:47 +09:00
Yu Watanabe 3f60e4488c sd-netlink: split sd_netlink_add_match() into two parts
This also makes netlink_slot_disconnect() correctly unref multicast
groups.
2021-08-29 18:10:47 +09:00
Yu Watanabe ef90beb1c5 sd-netlink: introduce sd_genl_message_get_command() 2021-08-29 18:10:47 +09:00
Yu Watanabe 44f1072a9d sd-netlink: determine header size of genl message by using CTRL_ATTR_HDRSIZE attribute
Fortunately, all genl families we currently use do not require additional
header size.
2021-08-29 18:10:47 +09:00
Yu Watanabe 52313394ba sd-netlink: read protocol version of each genl family 2021-08-29 18:10:47 +09:00
Yu Watanabe 56fdc16da8 sd-netlink: drop sd_genl_family_t and introduce GenericNetlinkFamily
Kernel manages each genl family by its name, e.g. "nlctrl" or WG_GENL_NAME,
and its ID (used for nlmsg_type) is determined dynamically when the
corresponding module is loaded.

This commit makes sd-netlink follow the same way; now, sd_genl_family_t
is dropped, and sd_genl_message_new() takes a genl family name. Each
genl family is resolved when it is used first time, and its information
is stored in GenericNetlinkFamily.
2021-08-29 18:10:43 +09:00
Yu Watanabe 1cedca05e4 sd-netlink: split message_new() into two parts and introduces message_new_full() 2021-08-29 18:01:26 +09:00
Yu Watanabe 699c3708df sd-netlink: introduce several macros to define type system 2021-08-29 18:01:26 +09:00
Yu Watanabe e6dd298935 sd-netlink: drop redundant string table lookup functions to handle type system union 2021-08-29 18:01:26 +09:00
Yu Watanabe fae9ee25a4 sd-netlink: split type system for nfnl
This makes the root type system for nfnl indexed by subsystem, and
itroduces a next level type system for each subsystem. The second
level type systems are indexed by message types correspond to each
subsystem.
2021-08-29 18:01:26 +09:00
Yu Watanabe 07acd0d90b sd-netlink: drop 'flags' argument from sd_nfnl_nft_message_new_table() 2021-08-29 18:01:26 +09:00
Yu Watanabe c08ab4a013 sd-netlink: wrap long function declarations 2021-08-29 18:01:26 +09:00
Yu Watanabe 9a9c8f3fcc sd-netlink: add several missing attributes 2021-08-29 18:01:26 +09:00
Yu Watanabe 1370925bc7 basic: copy genetlink.h to repository 2021-08-29 18:01:26 +09:00
Yu Watanabe aee6309b97 sd-netlink: introduce basic_type_system
Preparation for later commits.
2021-08-29 18:01:26 +09:00
Yu Watanabe d757e6bdf0 sd-netlink: unify two spurious type system root for genl 2021-08-29 18:01:26 +09:00
Yu Watanabe 9270ec60bc sd-netlink: drop genl type system indexed by command
All type systems of currently supported genl families do not depend on
commands. Hence, at least tentatively, let's drop the tables.

Note that type system for genl ethtool depends on commands. Let's
reintroduce a mechanism to support the deps when we support ethtool on
netlink.
2021-08-29 18:01:26 +09:00
Yu Watanabe e6d58c2f71 sd-netlink: rename several type systems for generic netlink 2021-08-29 18:01:26 +09:00
Yu Watanabe 021273b782 sd-netlink: split netlink-types.[ch] into small files
Also renames several files.
2021-08-29 18:01:22 +09:00
Yu Watanabe b5beb9b0f5 sd-netlink: make several type systems static 2021-08-29 17:18:11 +09:00
Yu Watanabe 0dac2688a4 sd-netlink: move type systems 2021-08-29 17:18:11 +09:00
Yu Watanabe b019c545e9 sd-netlink: introduce two helper functions for type system union 2021-08-29 17:18:11 +09:00
Yu Watanabe ea073c8fce sd-netlink: rename functions 2021-08-29 17:18:04 +09:00
Yu Watanabe 49eb0a6889 sd-netlink: make type_get_type_system{,_union}() return value directly 2021-08-29 17:14:07 +09:00
Yu Watanabe c737abd31b sd-netlink: make message_seal() accept already sealed messages
The function can be idempotent. It is not necessary to refuse already
sealed messages.
2021-08-29 17:14:07 +09:00
Yu Watanabe 409856d328 sd-netlink: rename variables, arguments, and functions
Most changes are 'rtnl' -> 'nl' where the function is not only for rtnl.
2021-08-29 17:14:03 +09:00
Yu Watanabe 0c45a60f8e test: add usual log messages in test-netlink 2021-08-29 17:11:40 +09:00
Yu Watanabe 9d7fbec1e5 sd-netlink: drop unused type 2021-08-29 17:11:40 +09:00
Lennart Poettering 9c53de8bc5 update TODO 2021-08-28 07:15:12 +02:00
Daan De Meyer 6e5485617e core: Add information on which condition failed to the job done message
When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message.

To avoid having to dynamically generate a format string, we special case the
formatting of condition failed messages.
2021-08-28 06:46:37 +02:00
Lennart Poettering d52cc0a531 core: Unit's condition_result field is a boolean
Let's only assign boolean values to a boolean variable.

Unit's condition_result is not of type ConditionResult, slightly
confusingly. Let's hence not assign one of ConditionResult's values to
it, but simple booleans.

This effectively doesn't make a difference, since CONDITION_ERROR is
true when cast to bool. But it's still ugly to rely on that. And
confusing.
2021-08-27 21:46:10 +01:00