Lennart Poettering
a94aa2b9c1
dissect: print more useful error messages for two more error cases
2021-10-07 23:07:32 +02:00
Daan De Meyer
d888ef68d1
coredump: Add --all option
...
This option has coredumpctl look at all journals instead of only the
local ones. This allows coredumpctl to show information about remote
coredumps if the coredumps are made available in /var/lib/systemd/coredump
and the corresponding journals are made available in /var/log/journal.
This is already possible using the --directory option but --all makes it
more user friendly since users don't have to enter the journal directory
anymore as long as it's available under /var/log/journal.
2021-10-07 22:13:12 +02:00
Lennart Poettering
7cfe9ec983
Merge pull request #20910 from poettering/nftw-no-more
...
basic: add recurse_dir() function as modern replacement for nftw()
2021-10-07 22:12:41 +02:00
Luca Boccassi
2eacd9a7b6
network: assert on dereferenced pointer
...
CID#1462762
2021-10-07 22:12:19 +02:00
Yu Watanabe
6830c3a553
Merge pull request #20778 from yuwata/network-ipv6-token
...
network: rework IPv6 address generation mode
2021-10-07 23:24:00 +09:00
Lennart Poettering
17175882d7
homed: typo fix
2021-10-07 15:43:27 +02:00
Lennart Poettering
aea0fe53ae
mount-setup: port from nftw() to recurse_dir()
2021-10-07 11:59:23 +02:00
Lennart Poettering
fef4fe1a84
kbd-util: port from nftw() to recurse_dir()
2021-10-07 11:59:23 +02:00
Lennart Poettering
8e5aba7aca
cgroup-util: port from nftw() to recurse_dir()
2021-10-07 11:59:23 +02:00
Lennart Poettering
79a72b1bf8
kmod-setup: port from nftw() to recurse_dir()
2021-10-07 11:58:26 +02:00
Lennart Poettering
ced9fde1be
tests: add test for recurse_dir()
2021-10-07 11:58:26 +02:00
Lennart Poettering
b5a07e524e
basic: add new recurse_dir() tool as replacement for nftw()
...
libc nftw() shows its age a bit, let's replace it with a more moden
infra that is built around openat(), O_PATH, statx(). This makes the
interface less prone to races and cleans up the API a bit adding
substantially more functionality.
2021-10-07 11:58:26 +02:00
Lennart Poettering
edcd27dcaf
tree-wide: remove a few unnecessary inclusions of ftw.h
2021-10-07 11:58:26 +02:00
Lennart Poettering
823d72c7f7
fileio: add shortcut for xopendirat() when called in opendir() compatible mode
2021-10-07 11:58:26 +02:00
Lennart Poettering
21d46382e0
dirent-util: split out new function stat_mode_to_dirent_type()
...
This contains the mapping between mode_t inode type flags and dirent's
d_type. Splitting this out allows us to use the mapping elsewhere later.
2021-10-07 11:58:26 +02:00
Lennart Poettering
87843de48b
cgls: enable cgroupid/xattr output by default (but make it configurable)
2021-10-07 11:50:47 +02:00
Lennart Poettering
5a5a5d2914
cgroups-show: optionally show cgroup xattrs + cgroup id in cgroup tree output
2021-10-07 11:50:42 +02:00
Lennart Poettering
aa13d38417
cgroups-show: use path_join() when concatenating cgroup paths
2021-10-07 11:50:02 +02:00
Lennart Poettering
40d4320dea
cgroups-show: validate specified hostname before including it in fs path
...
let's make sure the specified hostname is really valid before we build
an fs path from it. Just as a safety future, so that people can't trick
us with hostnames including "/../" or so.
2021-10-07 11:49:57 +02:00
Lennart Poettering
a5edf95ec2
cgroup-util: add reusable union type for cgroupfs file_handle structs
...
That way we can easily call name_to_handle_at() on cgroupfs2 elsewhere.
2021-10-07 11:49:44 +02:00
Lennart Poettering
c53e07e249
xattr-util: merge various getxattr()/listxattr() helpers into getxattr_at_malloc() + listxattr_at_malloc()
...
Unfortunately fgetxattr() and flistxattr() don't work via O_PATH fds.
Let's thus add fallbacks to go via /proc/self/fd/ in these cases.
Also, let's merge all the various flavours we have here into singular
implementations that can do everything we need:
1. malloc() loop handling
2. by fd, by path, or combination (i.e. a proper openat() like API)
3. work on O_PATH
2021-10-07 11:49:22 +02:00
Luca Boccassi
0cf250022c
Merge pull request #20926 from yuwata/udev-net-wol-sopass
...
udev/net: introduce WakeOnLanPassword=
2021-10-06 23:36:05 +01:00
Daan De Meyer
414bd2e786
coredump: Don't log an error if D-Bus isn't running
...
coredumpctl could be used in a chroot where D-Bus isn't running. If
that's the case, we shouldn't consider it an error if we can't connect
to the D-Bus daemon so let's reduce the severity of the error we log
when we can't connect to D-Bus because the socket doesn't exist.
2021-10-07 02:23:11 +09:00
Yu Watanabe
d489317f59
Merge pull request #20935 from unusual-thoughts/fix-empty-argv
...
Fix #20933
2021-10-07 01:53:51 +09:00
Yu Watanabe
d3867133f0
udev/net: introduce WakeOnLanPassword=
...
Closes #20913 .
2021-10-07 01:50:37 +09:00
Yu Watanabe
34a3a0c480
network: make generate_eui64_address() static
2021-10-07 01:24:50 +09:00
Yu Watanabe
e609cd0694
network: introduce Token= setting in [IPv6Prefix]
...
Closes #20149 .
2021-10-07 01:24:50 +09:00
Yu Watanabe
f5960e0ab5
network: extend Token= setting in [DHCPv6PrefixDelegation]
...
Now the setting supports the same syntax as the one in the [IPv6AcceptRA]
section.
2021-10-07 01:24:12 +09:00
Yu Watanabe
140bf8dacc
network: introduce Token=eui64
...
So, now user can explicitly request EUI-64 algorithm to generate addresses.
2021-10-07 01:16:36 +09:00
Yu Watanabe
a73628e647
network: rename IPv6Token= in [Network] -> Token= in [IPv6AcceptRA]
...
The token is only used by received prefixes through RA.
2021-10-07 01:16:36 +09:00
Yu Watanabe
868bd1aa1c
network: address-genereation: introduce generate_addresses()
...
Preparation for later commits. This does not change functionality.
2021-10-07 01:16:29 +09:00
Yu Watanabe
d207581fc5
network: address-generation: use in6_addr_hash_ops_free
...
Also, downgrade error level, and caller logs the error.
2021-10-07 01:14:51 +09:00
Yu Watanabe
3bac5fe6c9
network: address-generation: modernize config_parse_address_generation_type()
...
- drop unused _NONE type,
- rename IPv6Token::prefix -> IPv6Token::address,
- clear unused part of IPv6Token::address,
- use Set, instead of OrderedSet.
2021-10-07 01:14:51 +09:00
Yu Watanabe
ffb834cb87
network: address-generation: mask prefix with prefixlen for safety
2021-10-07 01:14:51 +09:00
Yu Watanabe
98692ff3b8
network: address-generation: always start DAD counter from zero
...
The token is stored in Network, and the .network file may be applied to
multiple links.
2021-10-07 01:14:51 +09:00
Yu Watanabe
ac77e0b315
network: address-generation: always use the first 64 bits of the prefix
...
Hopefully, the prefix length is usually 64.
Previously, if the prefix length is smaller than 64, the result address
was undefined.
2021-10-07 01:14:51 +09:00
Yu Watanabe
151b8ea304
network: ndisc: ignore autonomous prefix with prefix length larger than 64
2021-10-07 01:14:47 +09:00
Yu Watanabe
fcd7ad52d7
network: radv: ignore Assign= if prefixlen is larger than 64
2021-10-07 01:09:09 +09:00
Yu Watanabe
00f1261d39
network: make generate_ipv6_eui_64_address() take prefix
...
Also, rename the function.
2021-10-07 01:03:06 +09:00
Yu Watanabe
397c5418f0
network: fix prefixlen for reserved subnet anycast address
...
Then, the prefixlen is not a multiplier of 8, we need to use
in6_addr_prefix_covers().
This also constify the reserved addresses, and rename macros.
2021-10-07 01:03:06 +09:00
Yu Watanabe
f09a474760
network: move address generation methods to network-address-generation.[ch]
2021-10-07 01:03:06 +09:00
Yu Watanabe
e174b43fe4
in-addr-util: introduce in{4,6}_addr_prefix_covers()
2021-10-07 01:03:06 +09:00
Yu Watanabe
6df860f3a0
in-addr-util: do not shift 8 or more for uint8_t
...
See ISO/IEC 9899:TC3 § 6.5.7.3.
2021-10-07 01:03:06 +09:00
Yu Watanabe
333f7d8920
in-addr-util: introduce in{4,6}_addr_mask()
2021-10-07 01:03:06 +09:00
Yu Watanabe
f1cb8933c3
in-addr-util: introduce in6_addr_hash_ops_free
2021-10-07 01:03:06 +09:00
Yu Watanabe
0943b3b7a4
network: radv: reorder functions
...
In other files, we usually (but not always) place functions in the following order:
- network_adjust_xxx(), which applies default or updates settings
specified in .network files,
- link_xxx_enabled(), which checks if the functionality is enabled,
- xxx_new() and xxx_free(), allocator and deallocator for sections,
- functions which apply/update/remove configs
- validators of section,
- conf parsers.
This does not change each function, but just changes the order.
2021-10-07 01:02:59 +09:00
Lennart Poettering
9a1ddc8dee
Merge pull request #18145 from kinvolk/iaguis/lsm-bpf
...
Add RestrictFileSystems= property using LSM BPF
2021-10-06 16:23:27 +02:00
Lennart Poettering
8b4f88d136
user-record: disable two pbkdf fields that don't apply for pkbdf2
...
Fixes : #20830
2021-10-06 16:21:09 +02:00
Yu Watanabe
9bd3ecdd8d
ethtool-util: make ethtool_set_wol() take password
2021-10-06 21:57:14 +09:00
Yu Watanabe
20274ab86a
ethtool-util: do not try to enable unsupported WoL options
2021-10-06 21:44:02 +09:00