Commit Graph
36053 Commits
Author SHA1 Message Date
Yu Watanabe ba86989fcd udev: drop redundant chase_symlinks()
`sd_device_new_from_syspath()` internally calls chase_symlinks().
2021-08-31 21:18:49 +09:00
Yu Watanabe 4154524d47 udev: fix potential memleak 2021-08-31 21:18:49 +09:00
Yu Watanabe 416e84192a sd-netlink: introduce sd_netlink_message_get_max_attribute() 2021-08-31 21:18:34 +09:00
Yu Watanabe e0df8e9993 sd-netlink: specify appropriate netlink attribute type 2021-08-31 21:12:20 +09:00
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
Lennart Poettering 67f9bf897c homed: remove misplaced assert() 2021-08-31 10:51:50 +02:00
Lennart Poettering 9191142ddf homed: add missing SYNTHETIC_ERRNO() 2021-08-31 10:51:50 +02:00
Lennart Poettering e070b9eac9 homed: fix log message referring to fsck, when we actually mean mount 2021-08-31 10:51:50 +02:00
Lennart Poettering 279e060e25 homed: make sure to use right asssesors for GID + access mode
Don't reach directly into the UserRecord struct, but use the right
assessors, so that the "unspecified" case is covered.
2021-08-31 10:51:50 +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
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
Vito Caputo 921fcd5d9e sd-journal: verify field object hashes
journal_file_verify() doesn't actually verify field object hashes
against their contents, despite journald storing a hash with the
payload.  This commit adds that verification.
2021-08-29 22:26:54 -07:00
Vito Caputo d18e868ec0 sd-journal: move payload hashing to helper function
Preparatory commit for adding field object hash verification to
journal_file_verify() / `journalctl --verify`
2021-08-29 22:15:39 -07: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