]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoMerge pull request #21639 from yuwata/network-dhcp6pd-use-dhcp6_pd_prefix_acquired
Luca Boccassi [Tue, 7 Dec 2021 00:14:04 +0000 (00:14 +0000)] 
Merge pull request #21639 from yuwata/network-dhcp6pd-use-dhcp6_pd_prefix_acquired

network: dhcp6pd: use dhcp6 pd prefix acquired() and drop dhcp6_pd_distribute_prefix()

3 years agoMerge pull request #21196 from yuwata/process-util-nulstr
Yu Watanabe [Mon, 6 Dec 2021 23:29:34 +0000 (08:29 +0900)] 
Merge pull request #21196 from yuwata/process-util-nulstr

process-util: handle double NUL as the end of command line

3 years agoTEST-10: don't attempt to write a byte to the socket
Franck Bui [Wed, 17 Nov 2021 07:13:04 +0000 (08:13 +0100)] 
TEST-10: don't attempt to write a byte to the socket

Writing a byte to test10.socket is actually the root cause of issue #19154:
depending on the timing, it's possible that PID1 closes the socket before socat
(or nc, it doesn't matter which tool is actually used) tries to write that one
byte to the socket. In this case writing to the socket returns EPIPE, which
causes socat to exit(1) and subsequently make the test fail.

Since we're only interested in connecting to the socket and triggering the rate
limit of the socket, this patch removes the parts that write the single byte to
the socket, which should remove the race for good.

Since it shouldn't matter whether the test uses socat or nc, let's switch back
to nc and hence remove the sole user of socat. The exit status of nc is however
ignored because some versions might choke when the socket is closed
unexpectedly.

3 years agobuild(deps): bump github/codeql-action from 1.0.24 to 1.0.25
dependabot[bot] [Mon, 6 Dec 2021 21:17:32 +0000 (21:17 +0000)] 
build(deps): bump github/codeql-action from 1.0.24 to 1.0.25

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.24 to 1.0.25.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e095058bfa09de8070f94e98f5dc059531bc6235...546b30f35ae5a3db0e0be1843008c2224f71c3b0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agocore: use correct level for CPU time log message
Christian Göttsche [Mon, 6 Dec 2021 15:57:42 +0000 (16:57 +0100)] 
core: use correct level for CPU time log message

raise_level() takes the info condition as second argument and the notice
one as third. For the consumed CPU time these conditions are swapped.

Fixes: 37109b856aeb ("pid1: use LOG_DEBUG/INFO/NOTICE for unit resource consumption message")
3 years agoMerge pull request #21372 from DaanDeMeyer/journal-truncate
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 19:52:19 +0000 (20:52 +0100)] 
Merge pull request #21372 from DaanDeMeyer/journal-truncate

journal-file: truncate archived journals

3 years agoMerge pull request #21638 from yuwata/network-dhcp6pd-prefix-lost
Yu Watanabe [Mon, 6 Dec 2021 17:54:10 +0000 (02:54 +0900)] 
Merge pull request #21638 from yuwata/network-dhcp6pd-prefix-lost

network: dhcp6pd: fix prefix lost handling

3 years agofix DirectoryNotEmpty when it comes to a Non-directory file
yangmingtai [Mon, 6 Dec 2021 09:06:13 +0000 (17:06 +0800)] 
fix DirectoryNotEmpty when it comes to a Non-directory file

3 years agoNEWS: add more entries for v250
Luca Boccassi [Mon, 6 Dec 2021 15:58:38 +0000 (15:58 +0000)] 
NEWS: add more entries for v250

3 years agoNEWS: add more entries for v250
Luca Boccassi [Mon, 6 Dec 2021 15:29:11 +0000 (15:29 +0000)] 
NEWS: add more entries for v250

3 years agoprocess-util: handle double NUL as the end of command line 21196/head
Yu Watanabe [Mon, 1 Nov 2021 00:01:40 +0000 (09:01 +0900)] 
process-util: handle double NUL as the end of command line

Fixes #21186.

3 years agoprocess-util: rename function arguments for storing results
Yu Watanabe [Sun, 31 Oct 2021 23:50:08 +0000 (08:50 +0900)] 
process-util: rename function arguments for storing results

3 years agoMerge pull request #21620 from yuwata/udev-path-id
Yu Watanabe [Mon, 6 Dec 2021 14:15:43 +0000 (23:15 +0900)] 
Merge pull request #21620 from yuwata/udev-path-id

udev/path_id: fix skip_subsystem()

3 years agojournal: punch holes in unused parts of entry arrays when archiving 21372/head
Daan De Meyer [Tue, 16 Nov 2021 23:54:16 +0000 (23:54 +0000)] 
journal: punch holes in unused parts of entry arrays when archiving

Entry arrays grow exponentially, so when archiving a journal file is
archived, it's very likely that the final entry array objects in each
entry array chain aren't fully used. Let's punch holes in the unused
parts so the filesystem can reclaim this unused space and use it for
something else.

3 years agojournal: truncate archived journals
Daan De Meyer [Tue, 16 Nov 2021 23:45:58 +0000 (23:45 +0000)] 
journal: truncate archived journals

Journal files have space allocated in 8MiB-aligned increments. This
can add up to substantial wasted space as many archived journals
accumulate without using all the allocated space. Let's truncate
journal files to their actually used size when archiving them to
reclaim this unused space.

As the mmap cache is not thread-safe, we can't call
journal_file_move_to_object() from the offline thread. Instead,
we use journal_file_read_object() which doesn't rely on the mmap
cache.

3 years agojournal: Add journal_file_read_object()
Daan De Meyer [Mon, 29 Nov 2021 09:24:44 +0000 (10:24 +0100)] 
journal: Add journal_file_read_object()

3 years agoMerge pull request #21633 from yuwata/network-route-null-destination
Yu Watanabe [Mon, 6 Dec 2021 13:27:37 +0000 (22:27 +0900)] 
Merge pull request #21633 from yuwata/network-route-null-destination

network: route: fix null destination handling

3 years agoMerge pull request #21634 from yuwata/dhcp-header-cleanups
Yu Watanabe [Mon, 6 Dec 2021 13:26:58 +0000 (22:26 +0900)] 
Merge pull request #21634 from yuwata/dhcp-header-cleanups

dhcp: trivial header cleanups

3 years agonetwork: dhcp6pd: make dhcp6_pd_assign_prefixes() used also by dhcp6_pd_prefix_acquired() 21639/head
Yu Watanabe [Sat, 4 Dec 2021 20:16:40 +0000 (05:16 +0900)] 
network: dhcp6pd: make dhcp6_pd_assign_prefixes() used also by dhcp6_pd_prefix_acquired()

3 years agonetwork: dhcp6pd: first check prefixes, then calculate lifetime
Yu Watanabe [Sat, 4 Dec 2021 20:15:57 +0000 (05:15 +0900)] 
network: dhcp6pd: first check prefixes, then calculate lifetime

3 years agonetwork: dhcp6pd: shorten code a bit
Yu Watanabe [Sat, 4 Dec 2021 20:15:12 +0000 (05:15 +0900)] 
network: dhcp6pd: shorten code a bit

3 years agonetwork: dhcp6pd: skip to assign prefixes to a downstream link if it is not ready
Yu Watanabe [Sat, 4 Dec 2021 20:14:22 +0000 (05:14 +0900)] 
network: dhcp6pd: skip to assign prefixes to a downstream link if it is not ready

3 years agonetwork: dhcp6pd: move dhcp6_pd_assign_prefixes()
Yu Watanabe [Sat, 4 Dec 2021 18:57:35 +0000 (03:57 +0900)] 
network: dhcp6pd: move dhcp6_pd_assign_prefixes()

Preparation for the later commits.

3 years agonetwork: dhcp6pd: also allow to only assign prefix route for delegated prefix to...
Yu Watanabe [Sat, 4 Dec 2021 18:40:15 +0000 (03:40 +0900)] 
network: dhcp6pd: also allow to only assign prefix route for delegated prefix to upstream interface

3 years agonetwork: dhcp6pd: drop unreachable routes when lease lost 21638/head
Yu Watanabe [Sat, 4 Dec 2021 20:03:09 +0000 (05:03 +0900)] 
network: dhcp6pd: drop unreachable routes when lease lost

3 years agonetwork: route: make route_cancel_request() take Link*
Yu Watanabe [Sat, 4 Dec 2021 20:01:30 +0000 (05:01 +0900)] 
network: route: make route_cancel_request() take Link*

As the Route object may be managed by Manager.

3 years agonetwork: dhcp6pd: also drop prefix assigned to upstream interface
Yu Watanabe [Sat, 4 Dec 2021 18:37:52 +0000 (03:37 +0900)] 
network: dhcp6pd: also drop prefix assigned to upstream interface

But do not drop prefixes from downstream which request another uplink.

3 years agoMerge pull request #21632 from yuwata/network-dhcp6pd-fix-typo-and-split
Yu Watanabe [Mon, 6 Dec 2021 12:24:47 +0000 (21:24 +0900)] 
Merge pull request #21632 from yuwata/network-dhcp6pd-fix-typo-and-split

network: dhcp6pd: fix typo and split file

3 years agoMerge pull request #21630 from yuwata/test-network-cleanups
Yu Watanabe [Mon, 6 Dec 2021 12:24:26 +0000 (21:24 +0900)] 
Merge pull request #21630 from yuwata/test-network-cleanups

test-network: trivial cleanups

3 years agonetwork: eui64 address is supported only ethernet or infiniband
Yu Watanabe [Mon, 6 Dec 2021 00:33:14 +0000 (09:33 +0900)] 
network: eui64 address is supported only ethernet or infiniband

So, this makes prefixstable mode will be used for other interface types.

3 years agoMerge pull request #21454 from bluca/inspect_elf
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 11:45:25 +0000 (12:45 +0100)] 
Merge pull request #21454 from bluca/inspect_elf

analyze: add inspect-elf verb to parse package metadata

3 years agoman: fix description of sd_uid_get_sessions
Pavel Březina [Thu, 2 Dec 2021 12:07:07 +0000 (13:07 +0100)] 
man: fix description of sd_uid_get_sessions

3 years agojournal: don't remove the flushed flag when journald is stopped
Franck Bui [Wed, 1 Dec 2021 07:51:48 +0000 (08:51 +0100)] 
journal: don't remove the flushed flag when journald is stopped

Due to the fact that systemd-journal-flush.service has
"Requires=systemd-journald.service", this service is stopped too when journald
is requested to do so.

However stopping systemd-journal-flush.service implies that journald
relinquishes /var hence implicitly switching back to the volatile storage
mode and removing /run/systemd/journal/flushed.

If journald is started afterwards, it will run in volatile storage mode
regardless of the value of 'Storage=' as it believes now that /var is not yet
ready (because the flushed flag is missing).

Because this flag is mainly an indication for journald that the initialization
of /var/log/journal (during the boot process) has been done,
systemd-journal-flush.service shouldn't be tied to the state of journald itself
but to the state of /var/log/journal, hence to the state of the system.

3 years agosystemctl: support JSON output for "show-environment"
Joris Hartog [Wed, 1 Dec 2021 14:06:29 +0000 (15:06 +0100)] 
systemctl: support JSON output for "show-environment"

This commit adds a function which converts a bus message containing the
environment variables to a JSON object and uses this function to support
JSON formatted output for the "systemctl show-environment" command.

Fixes #21348

3 years agoMerge pull request #21621 from mrc0mmand/lgtm-false-positive
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 10:31:38 +0000 (11:31 +0100)] 
Merge pull request #21621 from mrc0mmand/lgtm-false-positive

lgtm: ignore certain cleanup functions

3 years agohwdb: Allow console users access to rfkill
Bastien Nocera [Thu, 2 Dec 2021 12:15:44 +0000 (13:15 +0100)] 
hwdb: Allow console users access to rfkill

This rule has been shipped in Fedora's gnome-bluetooth package for 10
years and is used by the gnome-settings-daemon rfkill plugin (used by
gnome-bluetooth, gnome-shell, and gnome-control-center) to monitor
and change software rfkill switch settings.

3 years agosd_bus_get_timeout: fix timeout value doc
Urs Ritzmann [Fri, 3 Dec 2021 14:47:18 +0000 (15:47 +0100)] 
sd_bus_get_timeout: fix timeout value doc

The documentation of sd_bus_get_timeout wrongfully states that the returned time-value is relative. In fact, it is an absolute value which is based of CLOCK_MONOTONIC. This change corrects that documentation.

3 years agotest-network: start dhcpd after address is assigned 21630/head
Yu Watanabe [Mon, 6 Dec 2021 00:04:52 +0000 (09:04 +0900)] 
test-network: start dhcpd after address is assigned

3 years agotest-network: make start_isc_dhcpd() take IP version
Yu Watanabe [Mon, 6 Dec 2021 00:02:37 +0000 (09:02 +0900)] 
test-network: make start_isc_dhcpd() take IP version

3 years agonetwork: split networkd-dhcp6.c 21632/head
Yu Watanabe [Sat, 4 Dec 2021 18:12:46 +0000 (03:12 +0900)] 
network: split networkd-dhcp6.c

This moves DHCPv6 prefix delegation related functions to
networkd-dhcp-prefix-delegation.c.

3 years agonetwork: dhcp6pd: fix copy-and-paste error
Yu Watanabe [Sat, 4 Dec 2021 22:30:24 +0000 (07:30 +0900)] 
network: dhcp6pd: fix copy-and-paste error

3 years agonetwork: route: handle null address with non-zero prefixlen correctly 21633/head
Yu Watanabe [Sun, 5 Dec 2021 15:29:39 +0000 (00:29 +0900)] 
network: route: handle null address with non-zero prefixlen correctly

Previously, even if a link has a route to e.g. ::/96, default gateway
via ::1.2.3.4 cannot be configured.

3 years agonetwork: route: logs null address with non-zero prefixlen correctly
Yu Watanabe [Sun, 5 Dec 2021 15:27:43 +0000 (00:27 +0900)] 
network: route: logs null address with non-zero prefixlen correctly

3 years agodhcp: fix indentation and alignment 21634/head
Yu Watanabe [Fri, 3 Dec 2021 06:38:16 +0000 (15:38 +0900)] 
dhcp: fix indentation and alignment

3 years agodhcp6: drop unnecessary space
Yu Watanabe [Fri, 3 Dec 2021 06:37:14 +0000 (15:37 +0900)] 
dhcp6: drop unnecessary space

3 years agoMerge pull request #21623 from nabijaczleweli/ekstrahuje
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 10:10:40 +0000 (11:10 +0100)] 
Merge pull request #21623 from nabijaczleweli/ekstrahuje

man/kernel-install clarifications

3 years agoMerge pull request #21629 from yuwata/man-netdev-update
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 09:23:04 +0000 (10:23 +0100)] 
Merge pull request #21629 from yuwata/man-netdev-update

man: netdev: several cleanups

3 years agoman: netdev: merge and reword Egress/IngressQOSMAps= 21629/head
Yu Watanabe [Mon, 6 Dec 2021 08:59:35 +0000 (17:59 +0900)] 
man: netdev: merge and reword Egress/IngressQOSMAps=

3 years agoMerge pull request #21628 from yuwata/man-network-dnssec
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 07:54:43 +0000 (08:54 +0100)] 
Merge pull request #21628 from yuwata/man-network-dnssec

man: network: fix default values for DNSSEC= and DNSOverTLS=

3 years agoman: netdev: use … to specify range
Yu Watanabe [Mon, 6 Dec 2021 07:53:35 +0000 (16:53 +0900)] 
man: netdev: use … to specify range

3 years agoman: netdev: use <varname> tag
Yu Watanabe [Mon, 6 Dec 2021 07:51:57 +0000 (16:51 +0900)] 
man: netdev: use <varname> tag

3 years agoman: network: fix default values for DNSSEC= and DNSOverTLS= 21628/head
Yu Watanabe [Mon, 6 Dec 2021 07:29:46 +0000 (16:29 +0900)] 
man: network: fix default values for DNSSEC= and DNSOverTLS=

3 years agoman: network: rebreak lines
Yu Watanabe [Mon, 6 Dec 2021 07:28:10 +0000 (16:28 +0900)] 
man: network: rebreak lines

3 years agomeson: remove openssl dependency from repart
Luca Boccassi [Sun, 5 Dec 2021 13:42:38 +0000 (13:42 +0000)] 
meson: remove openssl dependency from repart

No longer needed since ade99252e2cdd9eeff78566789008996d27e4dc0

3 years agoudev/path-id: comment why USB host number is dropped from the PATH_ID 21620/head
Yu Watanabe [Mon, 6 Dec 2021 07:05:35 +0000 (16:05 +0900)] 
udev/path-id: comment why USB host number is dropped from the PATH_ID

Closes #21617.

The comment is borrowed from https://github.com/systemd/systemd/pull/21620#discussion_r762521508.

3 years agoudev/path_id: fix skip_subsystem()
Yu Watanabe [Sat, 4 Dec 2021 16:58:01 +0000 (01:58 +0900)] 
udev/path_id: fix skip_subsystem()

This partially reverts d340bdd1bd435e9f5524f4246feaf38511b2ff45.

The function previously drops multiple except for the last parents
which matches the specified subsystem.
But the commit d340bdd1bd435e9f5524f4246feaf38511b2ff45 drops all
parents.

E.g. input is pci-pci-pci-usb-usb-usb, then
Before d340bdd: pci-pci-pci-usb
After d340bdd: pci-pci-pci

3 years agotree-wide: check for NULLs in more places
Frantisek Sumsal [Sat, 4 Dec 2021 11:11:31 +0000 (12:11 +0100)] 
tree-wide: check for NULLs in more places

Fixes issues pointed out by the `cpp/inconsistent-null-check` LGTM
query.

3 years agolgtm: detect more possible problematic scenarios 21621/head
Frantisek Sumsal [Sun, 5 Dec 2021 15:11:35 +0000 (16:11 +0100)] 
lgtm: detect more possible problematic scenarios

1) don't ignore stack-allocated variables, since they may hide
   heap-allocated stuff (compound types)
2) check if there's a return between the variable declaration and its
   initialization; if so, treat the variable as uninitialized
3) introduction of 2) increased the query runtime exponentially, so
   introduce some optimizations to bring it back to some reasonable
   values

3 years agokernel-install: fix MACHINE_ID extraction behaviour description 21623/head
наб [Sun, 5 Dec 2021 15:55:47 +0000 (16:55 +0100)] 
kernel-install: fix MACHINE_ID extraction behaviour description

3 years agokernel-install: note the default $PRETTY_NAME if os-release wasn't found and that...
наб [Tue, 16 Mar 2021 16:46:33 +0000 (17:46 +0100)] 
kernel-install: note the default $PRETTY_NAME if os-release wasn't found and that only 90-loaderentry uses it

3 years agokernel-install: note that 90-loaderentry will also use /usr/lib/k/cmdline
наб [Tue, 16 Mar 2021 16:39:56 +0000 (17:39 +0100)] 
kernel-install: note that 90-loaderentry will also use /usr/lib/k/cmdline

3 years agolgtm: ignore certain cleanup functions
Frantisek Sumsal [Sun, 5 Dec 2021 09:25:28 +0000 (10:25 +0100)] 
lgtm: ignore certain cleanup functions

as they don't do any illegal stuff even when used with an uninitialized
variable.

3 years agoNEWS: add more entries for v250
Luca Boccassi [Sun, 5 Dec 2021 14:10:09 +0000 (14:10 +0000)] 
NEWS: add more entries for v250

3 years agoMerge pull request #21563 from yuwata/network-IPoIB-support
Yu Watanabe [Sat, 4 Dec 2021 20:24:01 +0000 (05:24 +0900)] 
Merge pull request #21563 from yuwata/network-IPoIB-support

network: IPoIB support

3 years agosd-netlink: fix implicit cast to boolean 21563/head
Yu Watanabe [Sat, 4 Dec 2021 06:27:53 +0000 (15:27 +0900)] 
sd-netlink: fix implicit cast to boolean

3 years agonetwork: set MTU after IPoIB configs are applied
Yu Watanabe [Mon, 8 Nov 2021 03:19:56 +0000 (12:19 +0900)] 
network: set MTU after IPoIB configs are applied

MTU is updated when IB mode is changed.

3 years agonetwork: add support to configure IPoIB interfaces
Yu Watanabe [Mon, 8 Nov 2021 00:41:51 +0000 (09:41 +0900)] 
network: add support to configure IPoIB interfaces

4 years agonetwork/netdev: add support to create IPoIB subinterface
Yu Watanabe [Sun, 7 Nov 2021 21:34:43 +0000 (06:34 +0900)] 
network/netdev: add support to create IPoIB subinterface

4 years agosd-netlink: add support for IPoIB
Yu Watanabe [Sun, 7 Nov 2021 21:43:17 +0000 (06:43 +0900)] 
sd-netlink: add support for IPoIB

4 years agonetwork/netdev: generate persistent MAC address when creating netdev interface
Yu Watanabe [Tue, 9 Nov 2021 06:51:58 +0000 (15:51 +0900)] 
network/netdev: generate persistent MAC address when creating netdev interface

Preparation for later commits.

4 years agoci: consider `cryptolib` in the group identifier
Frantisek Sumsal [Fri, 3 Dec 2021 16:07:34 +0000 (17:07 +0100)] 
ci: consider `cryptolib` in the group identifier

otherwise we end up with more than one job with the same identifier in
one run, causing some of them to get cancelled unexpectedly.

A quick follow-up to 85bd394df57fe45c2873605e2c1d1d79e83e853d.

4 years agoMerge pull request #21607 from mrc0mmand/ci-install-libbpf
Luca Boccassi [Fri, 3 Dec 2021 18:37:33 +0000 (18:37 +0000)] 
Merge pull request #21607 from mrc0mmand/ci-install-libbpf

ci: run build test with BPF-related stuff as well

4 years agoMerge pull request #21582 from mrc0mmand/lgtm-uninitialized
Luca Boccassi [Fri, 3 Dec 2021 18:25:19 +0000 (18:25 +0000)] 
Merge pull request #21582 from mrc0mmand/lgtm-uninitialized

lgtm: enable more queries

4 years agoci: install libbpf 21607/head
Frantisek Sumsal [Fri, 3 Dec 2021 15:30:56 +0000 (16:30 +0100)] 
ci: install libbpf

4 years agoanalyze: fix build with -Db_ndebug=true
Frantisek Sumsal [Fri, 3 Dec 2021 06:37:32 +0000 (07:37 +0100)] 
analyze: fix build with -Db_ndebug=true

4 years agomeson: support versioned llvm binaries in BPF detection
Frantisek Sumsal [Thu, 2 Dec 2021 20:49:02 +0000 (21:49 +0100)] 
meson: support versioned llvm binaries in BPF detection

4 years agoBump the max number of inodes for /dev to 128k
Franck Bui [Fri, 3 Dec 2021 10:23:36 +0000 (11:23 +0100)] 
Bump the max number of inodes for /dev to 128k

Follow-up for 7d85383edbab73274dc81cc888d884bb01070bc2.

Apparently the previous limit set on the max number of inodes for /dev was too
small as a system with 4096 LUNs attached can consume up to 95k inodes for
symlinks:

  # /bin/df -i
  Filesystem                 Inodes  IUsed    IFree IUse% Mounted on
  devtmpfs                 49274377  95075 49179302    1% /dev

Hence this patch bumps the limit from 64k to 128k although the new limit is
still pretty arbitrary (that said, not sure if it really makes sense to put
such absolute limit number).

4 years agoMerge pull request #21170 from keszybz/delibgcryptify
Zbigniew Jędrzejewski-Szmek [Fri, 3 Dec 2021 12:44:53 +0000 (13:44 +0100)] 
Merge pull request #21170 from keszybz/delibgcryptify

Allow systemd-resolved and systemd-importd to use libgcrypt or libopenssl

4 years agocryptenroll: fix wrong error messages
Gibeom Gwon [Fri, 3 Dec 2021 06:10:50 +0000 (15:10 +0900)] 
cryptenroll: fix wrong error messages

PKCS#11 -> FIDO2 in cryptenroll-fido2.c

4 years agoMerge pull request #21599 from loongarch64/dev-syscalls
Zbigniew Jędrzejewski-Szmek [Fri, 3 Dec 2021 07:11:31 +0000 (08:11 +0100)] 
Merge pull request #21599 from loongarch64/dev-syscalls

Add LoongArch 64bit syscalls

4 years agomeson: correctly display enabled features
Frantisek Sumsal [Thu, 2 Dec 2021 17:42:31 +0000 (18:42 +0100)] 
meson: correctly display enabled features

In 9cf75222f20 the conf.get() statements for `bpf-framework` and
`valgrind` were dropped, which causes the respective features to always
show as disabled (since they don't follow the "standard" naming scheme
with HAVE_/ENABLE_ prefixes).

4 years agolgtm: enable more (and potentially useful) queries 21582/head
Frantisek Sumsal [Tue, 30 Nov 2021 22:40:28 +0000 (23:40 +0100)] 
lgtm: enable more (and potentially useful) queries

Not all available queries on LGTM are enabled by default, but some of
the excluded ones might come in handy, hence let's enable them
explicitly.

4 years agolgtm: don't treat the custom note as a list of tags
Frantisek Sumsal [Thu, 2 Dec 2021 15:55:17 +0000 (16:55 +0100)] 
lgtm: don't treat the custom note as a list of tags

Just a cosmetic change.

4 years agolgtm: detect uninitialized variables using the __cleanup__ attribute
Frantisek Sumsal [Wed, 1 Dec 2021 20:31:43 +0000 (21:31 +0100)] 
lgtm: detect uninitialized variables using the __cleanup__ attribute

This is a slightly modified version of the original
`cpp/uninitialized-local` CodeQL query which focuses only on variables
using the cleanup macros. Since this has proven to cause issues in the
past, let's panic on every uninitialized variable using any of the
cleanup macros (as long as they're written using the __cleanup__
attribute).

Some test results from a test I used when writing the query:

```
 #define _cleanup_foo_ __attribute__((__cleanup__(foo)))
 #define _cleanup_(x) __attribute__((__cleanup__(x)))

 static inline void freep(void *p) {
         *(void**)p = mfree(*(void**) p);
 }

 #define _cleanup_free_ _cleanup_(freep)

 static inline void foo(char **p) {
     if (*p)
         *p = free(*p);
 }

 int main(void) {
     __attribute__((__cleanup__(foo))) char *a;
     char *b;
     _cleanup_foo_ char *c;
     char **d;
     _cleanup_free_ char *e;
     int r;

     r = fun(&e);
     if (r < 0)
         return 1;

     puts(a);
     puts(b);
     puts(c);
     puts(*d);
     puts(e);

     return 0;
 }
```

```
+| test.c:23:14:23:14 | e | The variable $@ may not be initialized here, but has a cleanup handler. | test.c:20:26:20:26 | e | e |
+| test.c:27:10:27:10 | a | The variable $@ may not be initialized here, but has a cleanup handler. | test.c:16:45:16:45 | a | a |
+| test.c:29:10:29:10 | c | The variable $@ may not be initialized here, but has a cleanup handler. | test.c:18:25:18:25 | c | c |
```

4 years agocore: support user manager with Condition[Memory/CPU/IO]Pressure
Luca Boccassi [Wed, 1 Dec 2021 14:16:24 +0000 (14:16 +0000)] 
core: support user manager with Condition[Memory/CPU/IO]Pressure

Get the cgroup root path from the current PID, so that when
ran by the user manager we can get to the right path.
Eg: foo.slice:10% will check under:

/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/foo.slice/cpu.pressure

Follow-up for 81513b382b24a7f3602987f71042d075ca27d1a5

4 years agomeson: disallow the combination of cryptolib=openssl and dns-over-tls=gnutls 21170/head
Zbigniew Jędrzejewski-Szmek [Thu, 2 Dec 2021 10:29:45 +0000 (11:29 +0100)] 
meson: disallow the combination of cryptolib=openssl and dns-over-tls=gnutls

It could work, but it doesn't make much sense. If we already have openssl as
the cryptolib that provides the necessary support, let's not bring in another
library. Disallowing this simplifies things and reduces our support matrix.

4 years agoci: expand the test framework to cover openssl
Zbigniew Jędrzejewski-Szmek [Wed, 1 Dec 2021 11:50:01 +0000 (12:50 +0100)] 
ci: expand the test framework to cover openssl

4 years agoMerge pull request #21584 from yuwata/network-wireguard-cleanups
Yu Watanabe [Thu, 2 Dec 2021 06:53:57 +0000 (15:53 +0900)] 
Merge pull request #21584 from yuwata/network-wireguard-cleanups

network: cleanups for wireguard

4 years agoRevert "network: address: drop deprecated temporary address"
Yu Watanabe [Thu, 2 Dec 2021 00:53:49 +0000 (09:53 +0900)] 
Revert "network: address: drop deprecated temporary address"

This reverts commit 528da64a0c734bd45e953b5c57d82e2a727435ef.

The commit is a bad way to fix #19838, and introduces #21593.

Fixes #21593.

4 years agonetwork/wireguard: search valid address of the endpoint from all struct addrinfo... 21584/head
Yu Watanabe [Mon, 29 Nov 2021 15:20:03 +0000 (00:20 +0900)] 
network/wireguard: search valid address of the endpoint from all struct addrinfo entries

4 years agonetwork/wireguard: cleanups for resolving endpoints
Yu Watanabe [Mon, 29 Nov 2021 12:21:21 +0000 (21:21 +0900)] 
network/wireguard: cleanups for resolving endpoints

This makes
- drop peers_with_unresolved_endpoint and peers_with_failed_endpoint,
- drop destroy handler for sd_resolve_query, and manage each query by peer,
- add random fluctuation to the timeout for retry handler,
- retry timer event source is now managed by peer,
- use sd_event_source_disable_unref().

4 years agonetwork/wireguard: do not resolve Endpoint= if an IP address is specified
Yu Watanabe [Mon, 29 Nov 2021 13:07:29 +0000 (22:07 +0900)] 
network/wireguard: do not resolve Endpoint= if an IP address is specified

Also verify the domain name and port.

4 years agoparse-util: refuse leading white space in port number
Yu Watanabe [Wed, 1 Dec 2021 23:31:55 +0000 (08:31 +0900)] 
parse-util: refuse leading white space in port number

When parse_ip_port() is directly used in a conf parser, then that's
fine, as the rvalue is already truncated.

When parse_ip_port() is used when e.g. parsing IP address with port,
then we should really refuse white space after colon.

4 years agoMerge pull request #21585 from yuwata/network-radv-uplink-interface-auto-with-dhcp6-pd
Yu Watanabe [Wed, 1 Dec 2021 23:16:23 +0000 (08:16 +0900)] 
Merge pull request #21585 from yuwata/network-radv-uplink-interface-auto-with-dhcp6-pd

network: cleanups for uplink interface handling for RADV and DHCP6-PD

4 years agoMerge pull request #21583 from bluca/bpf_assert
Yu Watanabe [Wed, 1 Dec 2021 22:47:17 +0000 (07:47 +0900)] 
Merge pull request #21583 from bluca/bpf_assert

cgroup: don't emit BPF firewall warning when manager is in test mode

4 years agoMerge pull request #21591 from yuwata/core-bpf-firewall-unsupported-reason
Luca Boccassi [Wed, 1 Dec 2021 21:20:30 +0000 (21:20 +0000)] 
Merge pull request #21591 from yuwata/core-bpf-firewall-unsupported-reason

core/bpf-firewall: make bpf_firewall_supported() always set unsupport…

4 years agoelf-util: do not ignore prctl() errors
Luca Boccassi [Wed, 1 Dec 2021 01:04:54 +0000 (01:04 +0000)] 
elf-util: do not ignore prctl() errors

We want to avoid loops, so fail and return if we can't disable
core dumping

CID#1467004

4 years agosyscalls: run ninja update-syscall-tables 21599/head
Xiaotian Wu [Wed, 1 Dec 2021 15:53:17 +0000 (23:53 +0800)] 
syscalls: run ninja update-syscall-tables

4 years agotree-wide: fix typo
Yu Watanabe [Wed, 1 Dec 2021 15:07:21 +0000 (00:07 +0900)] 
tree-wide: fix typo

4 years agosyscalls: add LoongArch 64bit syscalls
Xiaotian Wu [Tue, 8 Dec 2020 12:02:13 +0000 (20:02 +0800)] 
syscalls: add LoongArch 64bit syscalls