Commit Graph
31705 Commits
Author SHA1 Message Date
Matthias Klumpp 8f20232fcb localed: Run locale-gen if available to generate missing locale
This change improves integration with distributions using locale-gen to
generate missing locale on-demand, like Debian-based distributions
(Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux.
We only ever enable new locales for generation, and never disable them.
Furthermore, we only generate UTF-8 locale.

This feature is only used if explicitly enabled at compile-time, and
will also be inert at runtime if the locale-gen binary is missing.
2021-01-12 23:15:12 +01:00
Matthias Klumpp bd47b0dac4 Add helper for case-independent string equality checks 2021-01-12 22:53:53 +01:00
Yu Watanabe 537ae584c8 network: reconfigure interface when wifi iftype is updated
Follow-up for a66a402da4.

Fixes #18059.
2021-01-13 06:42:02 +09:00
Lennart Poettering c33e405f20 import: mangle untarred OS images after pull-tar, too
We do this for import-tar and import-fs, we should do it for pull-tar,
too.

Fixes: #17563
2021-01-12 22:03:38 +01:00
Yu Watanabe 09db85080a Merge pull request #18216 from yuwata/dhcp-user-class-length
dhcp: length of each user class field must be positive
2021-01-13 05:43:10 +09:00
Yu Watanabe 048be097d2 Merge pull request #18157 from ssahani/vlan-qos
network: Allow to configure VLan egress qos maps
2021-01-13 05:42:53 +09:00
Yu Watanabe 7c5869530c Merge pull request #17628 from ssahani/network-gso
udev: Add support to configure Generic Segment Offload
2021-01-13 05:42:23 +09:00
Franck Bui b3d6eb0165 journal: send journald logs to kmsg again
This was broken by commit bc694c06e6.
2021-01-12 20:36:02 +01:00
Arian van Putten 089cd8b34b nspawn: make rootfs relative to oci bundle path
This is inline with the OCI runtime spec:

On POSIX platforms, path is either an absolute path or a relative path
to the bundle. For example, with a bundle at /to/bundle and a root
filesystem at /to/bundle/rootfs, the path value can be either
/to/bundle/rootfs or rootfs. The value SHOULD be the conventional
rootfs.
(https://github.com/opencontainers/runtime-spec/blob/master/config.md)
2021-01-12 18:29:19 +01:00
Yu Watanabe df49792e01 timedate: actually reset system time with new timezone
Fix a bug introduced by 56b0ef2fc2.

Closes CID#1436943.
2021-01-13 00:59:33 +09:00
Karel Zak 4fcc033b54 udev-builtin-blkid: add support for --hint offsets
The next libblkid v2.37 is going to support session offsets for
multi-session CD/DVDs. This feature is implemented by "hint offsets".

These offsets are optional and prober specific (e.g., iso, udf, ...).
For this purpose, the library provides a new function
blkid_probe_set_hint(), and blkid(8) provides a new command-line
option --hint <name>=<offset>. For CD/DVD, the offset name is
"session_offset".

The difference between classic --offset and the new --hint is that
--offset is very restrictive and defines the probing area and the rest
of the device is invisible to the library. The new --hint works
like a suggestion, it provides a hint where the user assumes the
filesystem, but the rest of the device is still readable for the
library (for example, to get some additional superblock information
etc.).

If the --hint is without a value then it defaults to zero.

The option --hint implementation in udev-builtin-blkid.c is backwardly
compatible. If compiled against old libblkid, then the option is used in
the same way as --offset.

Addresses: https://github.com/karelzak/util-linux/issues/1161
Addresses: https://github.com/systemd/systemd/pull/17424
2021-01-13 00:58:43 +09:00
Yu Watanabe 6fda02e150 network: merge config_parse_dhcp_user_class() and _vendor_class() 2021-01-13 00:07:48 +09:00
Yu Watanabe 019951ec97 dhcp6: refuse zero length vendor class
Also, fixes the maximum length of the vendor class to UINT16_MAX.
Moreover, a memory leak in sd_dhcp6_client_set_request_vendor_class().
2021-01-13 00:07:33 +09:00
Yu Watanabe 361eb4125d dhcp6: add an assert() 2021-01-13 00:00:56 +09:00
Yu Watanabe 8b6ea477a7 dhcp: do not assign value twice 2021-01-13 00:00:56 +09:00
Yu Watanabe 5a99444e4f dhcp6: refuse zero length dhcp user class
This also fixes a memory leak when
sd_dhcp6_client_set_request_user_class() is called multiple times.
2021-01-13 00:00:56 +09:00
Yu Watanabe b79951fa32 network: refuse zero length dhcp user class 2021-01-13 00:00:56 +09:00
Yu Watanabe e4336c0a5d dhcp: length of each user class field must be positive
This also fixes an memory leak when sd_dhcp_client_set_user_class()
is called multiple times.
2021-01-13 00:00:56 +09:00
Susant Sahani 1e270127de link: Add support to configure Generic Segment Offload 2021-01-12 15:19:23 +01:00
Susant Sahani ea07086285 network: Allow to configure VLan egress qos maps 2021-01-12 14:31:03 +01:00
Susant Sahani 0d9b8913e2 network: Allow to configure VLan egress qos maps 2021-01-12 14:30:56 +01:00
Susant Sahani c97cad60d1 sd-netlink: add support to configure Generic Segment Offload 2021-01-12 13:35:31 +01:00
Yu Watanabe 8f13ef254b sd-bus: fix memleak
Closes CID#1437780.
2021-01-12 20:46:47 +09:00
Yu Watanabe ecb3e9fba3 boot: at least one of os_name_pretty or os_name exists in this block
Closes CID#1438933.
2021-01-12 20:43:06 +09:00
Yu Watanabe 0375cb546f Merge pull request #18209 from poettering/virt-fix
three minor fixes to virt.c
2021-01-12 14:24:37 +09:00
Yu Watanabe 1536b7b2d0 network: introduce new UseAddress= setting in [DHCPv6] section
If it is disabled, then the addresses provided by the DHCPv6 server will
be ignored.

Closes #18203.
2021-01-12 14:19:03 +09:00
Yu Watanabe e2645ca619 Merge pull request #18204 from yuwata/wifi-util-fix-18059
wifi-util: do not ignore wifi iftype when the interface does not have SSID
2021-01-12 14:18:24 +09:00
Iago López Galeiras abcd208840 exit-status: fix mappings comment
It didn't reflect the current status.
2021-01-11 21:48:07 +01:00
Lennart Poettering 79efcd0235 virt: fix path mentioned in log message 2021-01-11 21:10:55 +01:00
Lennart Poettering b7ec9e719b virt: debug log on unexpected error conditions
Let's make this more debuggable by logging if we look for something and
get any error other than ENOENT back.
2021-01-11 21:10:51 +01:00
Lennart Poettering a7e508f899 virt: merge three variable declarations 2021-01-11 21:10:24 +01:00
Yu Watanabe a66a402da4 wifi-util: do not ignore wifi iftype when SSID is not set
Previously, if an interface does not have SSID, e.g. run in mesh-point
type, then the wifi iftype obtained by the netlink call was ignored.

Fixes #18059.
2021-01-12 01:12:37 +09:00
Yu Watanabe a533007815 wifi-util: cleanup header inclusion 2021-01-12 01:11:50 +09:00
Evgeny Vereshchagin 5e1ca544be Merge pull request #18195 from bluca/bpf_init
bpf: do not use structured initialization for bpf_attr
2021-01-11 17:39:47 +03:00
Susant Sahani 810f29140a sd-netlink: Add VLan QOS map properties 2021-01-11 10:26:22 +01:00
Susant Sahani ba423af6b5 sd-netlink: Add Generic Segment Offload attributes 2021-01-11 10:10:12 +01:00
Yu Watanabe 2e385c48b4 linux: move nl80211.h to basic/linux
As sd-netlink uses the header.
2021-01-11 13:31:38 +09:00
Yu Watanabe 59538b6418 udev: drop doubled blank line 2021-01-11 13:29:39 +09:00
Luca Boccassi 9ca600e2bf bpf: do not use structured initialization for bpf_attr
It looks like zero'ing the struct is not enough, and with some level
of optimizations there is still non-zero padding left over.
Switch to member-by-member initialization. Also convert all remaining
bpf_attr variables in other files.
2021-01-10 21:16:38 +00:00
Luca Boccassi 90f989861e dissect: fix root hash signature autodiscovery
The root hash signature is auto discovered only if the root hash was specified
manually. Ensure that an auto discovered root hash is also enough.
2021-01-10 21:57:38 +01:00
Luka Kudra a95e930685 network: register callback for dhcp server (#18146)
Setting dhcp_server_callback is needed in order to get an event when dhcp
leases change.

The callback was introduced by 38ee31a6e4,
but never used.
2021-01-10 14:36:07 +09:00
Lennart Poettering 1ea9580d8f Merge pull request #18183 from poettering/arg-json-rework
--json= argument rework in various tools
2021-01-09 21:52:56 +01:00
Lennart Poettering 84319c5c07 test-xattr-util: don't insist that /usr supports xattrs
(apparently overlayfs has issues with xattrs, hence don't require that
/usr supports xattrs)
2021-01-09 21:31:25 +01:00
Lennart Poettering 923d37c64a busctl: port busctl to JSON_FORMAT_OFF too
This is a bit more complex, since busctl's JSON code predates json.c and
was only minimally updated sofar.
2021-01-09 17:36:28 +01:00
Lennart Poettering 6a01ea4a2f json: port various tools to the new JSON_FORMAT_OFF flag
These are the obvious cases.
2021-01-09 17:36:24 +01:00
Lennart Poettering b95a05d014 json: add generic cmdline parser for --json= switch 2021-01-09 17:36:11 +01:00
Lennart Poettering 10d7126365 json: add new json format flag for disabling JSON output
This adds a new flag JSON_FORMAT_OFF that is a marker for "no JSON
output please!".

Of course, this flag sounds pointless in a JSON implementation, however
this is useful in code that can generate JSON output, but also more
human friendly output (for example our table formatters).

With this in place various tools that so far maintained one boolean
field "arg_json" that controlled whether JSON output was requested at
all and another field "arg_json_format_flags" for selecing the precise
json output flags may merge them into one, simplifying code a bit.
2021-01-09 17:35:58 +01:00
Luca Boccassi 28abf5ad34 bpf: zero bpf_attr before initialization
When building with Clang and using structured initialization, the
bpf_attr union is not zero-padded, so the kernel misdetects it as
an unsupported extension.
zero it until Clang's behaviour matches GCC. Do not skip the test
on Github Actions anymore.
2021-01-09 17:35:38 +01:00
Lennart Poettering 02dcf21571 machine-image: pick up crtime of directory images, too 2021-01-09 15:56:03 +01:00
Lennart Poettering c21087014e machine-image: use structured initialization 2021-01-09 15:48:33 +01:00