]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
22 months agoMerge pull request #23088 from yuwata/udev-event-blocker
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 15:08:45 +0000 (17:08 +0200)] 
Merge pull request #23088 from yuwata/udev-event-blocker

udev: cleanups for event blocker

22 months agoMerge pull request #23865 from keszybz/drop-memcpy-call
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 14:59:32 +0000 (16:59 +0200)] 
Merge pull request #23865 from keszybz/drop-memcpy-call

sd-id128: avoid an unnecessary function call in inline helper

22 months agotest: copy libgcc_s.so.1 to TPM2 test image on Debian-like systems
Nick Rosbrook [Tue, 28 Jun 2022 20:48:21 +0000 (16:48 -0400)] 
test: copy libgcc_s.so.1 to TPM2 test image on Debian-like systems

On Ubuntu, cryptsetup does not link against libgcc_s.so.1 which leads to
the following test failure in TEST-70-TPM2:

 systemd[1]: Starting testsuite-70.service...
 systemd[329]: testsuite-70.service: Executing: /usr/lib/systemd/tests/testdata/units/testsuite-70.sh
 testsuite-70.sh[329]: + export SYSTEMD_LOG_LEVEL=debug
 testsuite-70.sh[329]: + SYSTEMD_LOG_LEVEL=debug
 testsuite-70.sh[329]: + img=/var/tmp/test.img
 testsuite-70.sh[329]: + dd if=/dev/zero of=/var/tmp/test.img bs=1024k count=20 status=none
 testsuite-70.sh[329]: + echo -n passphrase
 testsuite-70.sh[329]: + cryptsetup luksFormat -q --use-urandom /var/tmp/test.img /tmp/passphrase
 testsuite-70.sh[333]: libgcc_s.so.1 must be installed for pthread_exit to work
 testsuite-70.sh[329]: /usr/lib/systemd/tests/testdata/units/testsuite-70.sh:
     line 12: 333 Aborted (core dumped) cryptsetup luksFormat -q --use-urandom $img /tmp/passphrase

To fix this, manually install libgcc_s.so.1 to the test image if running
on Debian-like systems.

22 months agoMerge pull request #23835 from yuwata/nspawn-private-users-identity
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 10:58:06 +0000 (12:58 +0200)] 
Merge pull request #23835 from yuwata/nspawn-private-users-identity

nspawn: follow-ups for --private-users=identity

22 months agohomework: silence gcc warning 23865/head
Zbigniew Jędrzejewski-Szmek [Fri, 1 Jul 2022 13:44:39 +0000 (15:44 +0200)] 
homework: silence gcc warning

gcc was warning that found_fs_uuid was used unitialized. The issue stemmed from
the call to open(), where gcc seemingly didn't know that errno must be negative.
When that is set, we can drop some unnecessary initializations without warnings.

22 months agodebug-generator: shorten code a bit
Yu Watanabe [Fri, 1 Jul 2022 22:32:16 +0000 (07:32 +0900)] 
debug-generator: shorten code a bit

22 months agoMerge pull request #23883 from yuwata/pid1-do-not-filter-out-systemd-unit
Yu Watanabe [Sat, 2 Jul 2022 00:42:09 +0000 (09:42 +0900)] 
Merge pull request #23883 from yuwata/pid1-do-not-filter-out-systemd-unit

core: do not filter out systemd.unit= from kernel command line

22 months agotest: add a simple test for daemon-reexec 23883/head
Frantisek Sumsal [Fri, 1 Jul 2022 20:21:52 +0000 (05:21 +0900)] 
test: add a simple test for daemon-reexec

22 months agocore: do not filter out systemd.unit= and run-level specifier from kernel command...
Yu Watanabe [Fri, 1 Jul 2022 19:18:41 +0000 (04:18 +0900)] 
core: do not filter out systemd.unit= and run-level specifier from kernel command line

Fixes a bug introduced by 846f1da465beda990c1c01346311393f485df467.

The commit 846f1da465beda990c1c01346311393f485df467 made systemd.unit=
filtered out from the command line. That causes debug-generator does not
work as expected on daemon-reexecute, and we cannot call `systemctl
daemon-reexecute` in our test suite running on nspawn.

Fixes issue reported in https://github.com/systemd/systemd/pull/23851#issuecomment-1170992052.

22 months agounit: prioritize module devices
Yu Watanabe [Fri, 1 Jul 2022 07:25:16 +0000 (16:25 +0900)] 
unit: prioritize module devices

Also, prioritize tty and network devices.

Follow-up for 2336bde96420475ccb054326f27290fa0228f27d

Fixes #23850.

22 months agosd-journal: silence bogus gcc warning
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jun 2022 12:32:49 +0000 (14:32 +0200)] 
sd-journal: silence bogus gcc warning

In function 'sd_id128_equal',
    inlined from 'journal_file_verify' at ../src/libsystemd/sd-journal/journal-verify.c:1047:29:
../src/systemd/sd-id128.h:119:43: error: 'entry_boot_id.qwords[0]' may be used uninitialized [-Werror=maybe-uninitialized]
  119 |         return a.qwords[0] == b.qwords[0] && a.qwords[1] == b.qwords[1];
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libsystemd/sd-journal/journal-verify.c: In function 'journal_file_verify':
../src/libsystemd/sd-journal/journal-verify.c:823:20: note: 'entry_boot_id.qwords[0]' was declared here
  823 |         sd_id128_t entry_boot_id;
      |                    ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

entry_boot_id is only used when entry_monotonic_set has been set, and that's
only done in one place where entry_boot_id is also initalized.

22 months agobuild(deps): bump meson from 0.62.0 to 0.62.2 in /.github/workflows
dependabot[bot] [Fri, 1 Jul 2022 09:08:56 +0000 (09:08 +0000)] 
build(deps): bump meson from 0.62.0 to 0.62.2 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 0.62.0 to 0.62.2.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.62.0...0.62.2)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
22 months agobuild(deps): bump github/codeql-action from 2.1.6 to 2.1.15
dependabot[bot] [Fri, 1 Jul 2022 09:08:13 +0000 (09:08 +0000)] 
build(deps): bump github/codeql-action from 2.1.6 to 2.1.15

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.6 to 2.1.15.
- [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/28eead240834b314f7def40f6fcba65d100d99b1...3f62b754e23e0dd60f91b744033e1dc1654c0ec6)

---
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>
22 months agojournalctl: fix to show user slice
Yu Watanabe [Fri, 1 Jul 2022 06:12:22 +0000 (15:12 +0900)] 
journalctl: fix to show user slice

Fixes #23867.

22 months agounits: add IgnoreOnIsolate=yes to systemd-journald too
Zbigniew Jędrzejewski-Szmek [Wed, 29 Jun 2022 11:14:37 +0000 (13:14 +0200)] 
units: add IgnoreOnIsolate=yes to systemd-journald too

We already had it on the socket units, so it's possible that
systemd-journald.service would be stopped and then restarted when trafic hits
the sockets when something logs. Let's not try to stop it. It is supposed to
run until the end and be eventually killed in the final killing spree.

This might (or not) help with #23287.

22 months agoMerge pull request #23868 from keszybz/lib-resplit-2
Yu Watanabe [Fri, 1 Jul 2022 04:13:42 +0000 (13:13 +0900)] 
Merge pull request #23868 from keszybz/lib-resplit-2

Export sd-netlink and clean up exported interfaces a bit

22 months agologind: log wall messages to the journal
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jun 2022 10:13:49 +0000 (12:13 +0200)] 
logind: log wall messages to the journal

Currently kde installs a fake utmp session to listen for this. This provides an
alternative mechanism as discussed in #23574.

Example with 'shutdown 6 -r' and shutdown -c':
    PRIORITY=6
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    ...
    CODE_FILE=src/login/logind-utmp.c
    CODE_LINE=90
    CODE_FUNC=warn_wall
    MESSAGE_ID=9e7066279dc8403da79ce4b1a69064b2
    OPERATOR=root
    MESSAGE=The system will reboot at Thu 2022-06-30 12:16:43 CEST!
    ACTION=reboot

    PRIORITY=5
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    ...
    OPERATOR=root
    CODE_FILE=src/login/logind-dbus.c
    CODE_LINE=2407
    CODE_FUNC=method_cancel_scheduled_shutdown
    MESSAGE=System shutdown has been cancelled
    MESSAGE_ID=249f6fb9e6e2428c96f3f0875681ffa3
    ACTION=reboot

22 months agodocs/ARCHITECTURE: mention src/fundamental/ and add more details 23868/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 Jun 2022 13:14:44 +0000 (15:14 +0200)] 
docs/ARCHITECTURE: mention src/fundamental/ and add more details

22 months agobasic/socket-util: rename fd_inc_rcvbuf → fd_increase_rxbuf
Zbigniew Jędrzejewski-Szmek [Tue, 28 Jun 2022 13:17:35 +0000 (15:17 +0200)] 
basic/socket-util: rename fd_inc_rcvbuf → fd_increase_rxbuf

See previous commit for justification.

22 months agosd-netlink: rename sd_netlink_inc_rcvbuf → sd_netlink_increase_rxbuf
Zbigniew Jędrzejewski-Szmek [Wed, 22 Jun 2022 08:47:28 +0000 (10:47 +0200)] 
sd-netlink: rename sd_netlink_inc_rcvbuf → sd_netlink_increase_rxbuf

We have RxBufferSize= and TxBufferSize= in .link files. Let's use the same
abbreviation here. OTOH, "inc" could be short for "increment" or "increase",
let's avoid that.

22 months agosd-bus: indentation
Zbigniew Jędrzejewski-Szmek [Fri, 17 Jun 2022 13:14:31 +0000 (15:14 +0200)] 
sd-bus: indentation

22 months agosd-bus: use assert_return() in public function sd_bus_message_dump
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jun 2022 08:25:08 +0000 (10:25 +0200)] 
sd-bus: use assert_return() in public function sd_bus_message_dump

Also, document that NULL is allowed.

22 months agosd-event: let sd_event_source_set_enabled accept NULL
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jun 2022 12:40:30 +0000 (14:40 +0200)] 
sd-event: let sd_event_source_set_enabled accept NULL

Same story as before: disabling a non-existent event source shouldn't
need to be guarded by an if. I retained the wrapper so that that we don't
have to say SD_EVENT_OFF in the many places where this is called.

22 months agosd-event: allow sd_event_source_is_enabled() to return false for NULL
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jun 2022 12:37:21 +0000 (14:37 +0200)] 
sd-event: allow sd_event_source_is_enabled() to return false for NULL

This is a natural use case, and instead of defining a wrapper to do this
for us, let's just make this part of the API. Calling with NULL was not
allowed, so this is not a breaking change to the interface.

(After sd_event_source_is_enabled was originally added, we introduced
sd_event_source_disable_unref() and other similar functions which accept
NULL. So not accepting NULL here is likely to confuse people. Let's just
make the API usable with minimal fuss.)

22 months agosd-netlink: allow sd_netlink_message_read() to be used for union types
Zbigniew Jędrzejewski-Szmek [Thu, 23 Jun 2022 10:56:34 +0000 (12:56 +0200)] 
sd-netlink: allow sd_netlink_message_read() to be used for union types

Before, sd_netlink_message_read() expected to fill a buffer completely,
and would return -EIO if the attribute being read was shorter than the
buffer. This means that the function can be used to "peek" into attributes
(by specifying a short buffer to just read part of the attribute), but
cannot be used to read something into a union without knowing beforehand
which specific field in the union is being filled. That latter operation
seems more useful (messages are short, so we don't really need to do partial
reads), so let's allow reads that don't fill the output buffer completely.

22 months agoman: document sd_bus_message_read_strv_extend()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 09:17:33 +0000 (11:17 +0200)] 
man: document sd_bus_message_read_strv_extend()

22 months agosd-bus: export sd_bus_message_read_strv_extend()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 09:17:17 +0000 (11:17 +0200)] 
sd-bus: export sd_bus_message_read_strv_extend()

The same story as before: it's a useful helper, other uses of the library
are likely to find it useful.

22 months agoman: document sd_id128_string_equal()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 09:02:54 +0000 (11:02 +0200)] 
man: document sd_id128_string_equal()

22 months agoman: rework the text in sd-id128
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 08:38:14 +0000 (10:38 +0200)] 
man: rework the text in sd-id128

In places the text was overly formal, e.g. "an 128-bit ID" was repeated, even
though it is clear from the context that we're talking about this type of ID.
OTOH, in other places the text was informal, e.g. "You can use …".
Also, "you may use f() to frob" → "f() frobs". The text without all the
flourishes is easier to read.

sd_id128_in_set_sentinel() was described only in passing when taking about
sd_id128_in_set(), now it gets is own brief paragraph.

The synopsis was missing.

22 months agosd-id128: rename and export sd_id128_string_equal()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 08:22:46 +0000 (10:22 +0200)] 
sd-id128: rename and export sd_id128_string_equal()

We find this function useful in our code, so no reason not to export it.
I changed the order of last two words in the name to match the arguments.
(With "equal_string" I expected sd_id128_t first, string second, but in
actual use, the second argument is usually a long constant so it's nice
to keep this order of arguments.)

22 months agoman: document sd_bus_error_setfv()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 08:11:22 +0000 (10:11 +0200)] 
man: document sd_bus_error_setfv()

The description for sd_bus_error_set_errnof/sd_bus_error_set_errnofv are
adjusted to use the same pattern.

22 months agomeson: update man-generation rules for sd_hwdb_new_from_path
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 08:10:30 +0000 (10:10 +0200)] 
meson: update man-generation rules for sd_hwdb_new_from_path

Forgotten in 60f0ba75569312825ff14680d05a4b4f95842951.

22 months agosd-bus: export sd_bus_error_setfv()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 08:02:15 +0000 (10:02 +0200)] 
sd-bus: export sd_bus_error_setfv()

The usual: if we find that function useful, other users of the library
will too. In particular, the v-variants are necessary to build pass-thru
wrappers.

22 months agosd-bus: drop unused prototype
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jun 2022 08:00:22 +0000 (10:00 +0200)] 
sd-bus: drop unused prototype

Function was exported in 07a0d22f9ec5a0cac2385b73dc08b12a811cead8,
but apparently we forgot to remove the old declaration.

22 months agolibsystemd: drop unexported sd-utf8
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 20:09:49 +0000 (22:09 +0200)] 
libsystemd: drop unexported sd-utf8

It had two symbols which were not actually exported because they were not
listed in libsystemd.sym. They were also entirely unused in our codebase.
I don't think it makes much sense to export just those two functions, and
it doesn't make to build a string processing library in systemd either.

History of the file shows that it was created in
faaa5728d956b7f0d24f27f3341d0b9fff30af00 'utf8: export utf8 validation functions as part of sd-bus'
and hasn't gone even one non-trivial change since then ;)

22 months agolibsystemd: export sd-netlink
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 19:51:50 +0000 (21:51 +0200)] 
libsystemd: export sd-netlink

It was added originally in 65f568bbeb9b8c70200e44c19a797df3a0bfd485. The API is
has stabilized pretty much, and generally follows the usual style for
libsystemd.  We've held it as a public-but-private library for almost 10 years,
let's export it.

sd_netlink_sendv() and sd_nfnl_nft_*() are excluded.

libsystemd.so seems to grow by 12k.

22 months agotest-lib*-sym: print symbols names in addition to addresses
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 19:42:51 +0000 (21:42 +0200)] 
test-lib*-sym: print symbols names in addition to addresses

This makes it easier to see what the test is doing.

I converted the code to use f-strings. They are already used in other scripts
necessary for build, so IIUC this is OK.

22 months agosd-daemon: remove sd_ prefix from static function
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 18:32:29 +0000 (20:32 +0200)] 
sd-daemon: remove sd_ prefix from static function

22 months agosd-netlink: remove sd_ prefix from static function
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 18:13:49 +0000 (20:13 +0200)] 
sd-netlink: remove sd_ prefix from static function

22 months agoTurn mempool_enabled() into a weak symbol
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 14:52:57 +0000 (16:52 +0200)] 
Turn mempool_enabled() into a weak symbol

Before we had the following scheme:
mempool_enabled() would check mempool_use_allowed, and
libsystemd-shared would be linked with a .c file that provides mempool_use_allowed=true,
while other things would linked with a different .c file with mempool_use_allowed=false.

In the new scheme, mempool_enabled() itself is a weak symbol. If it's
not found, we assume false. So it only needs to be provided for libsystemd-shared,
where it can return false or true.

test-set-disable-mempool is libshared, so it gets the symbol. But then we
actually disable the mempool via envvar. mempool_enable() is called to check
its return value directly.

22 months agosd-id128: avoid an unnecessary function call in inline helper
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jun 2022 18:51:41 +0000 (20:51 +0200)] 
sd-id128: avoid an unnecessary function call in inline helper

When optimizing, the compiler will most likely replace the call to memcmp(),
but at -O0, the code that is emitted builds the call preamble and does the
call. Let's use the same pattern as with sd_id128_is_null() and
sd_id128_is_allf() and avoid the call.

22 months agojournal: Fix missing parenthesis
Daan De Meyer [Wed, 29 Jun 2022 10:13:21 +0000 (12:13 +0200)] 
journal: Fix missing parenthesis

22 months agovirt: fix detection of Parallels virtualization
Yu Watanabe [Tue, 28 Jun 2022 21:17:44 +0000 (06:17 +0900)] 
virt: fix detection of Parallels virtualization

If Parallels virtualization is detected from DMI, then trust that over CPUID.

Fixes issue caused by 28b1a3eac252d471de4fbb6f317353af30d68878.

Fixes #23856.

22 months agoMerge pull request #23836 from yuwata/journal-file-check-object-header
Daan De Meyer [Wed, 29 Jun 2022 10:12:26 +0000 (12:12 +0200)] 
Merge pull request #23836 from yuwata/journal-file-check-object-header

sd-journal: check object header before verifying object data

22 months agosd-journal: data object may be invalid after data_object_in_hash_table() 23836/head
Yu Watanabe [Tue, 28 Jun 2022 19:52:54 +0000 (04:52 +0900)] 
sd-journal: data object may be invalid after data_object_in_hash_table()

Fixes a bug introduced by 578cd1855b73d2710ae14a8d77c4fac1d8ea7f48.

The function `data_object_in_hash_table()` calls
`journal_file_move_to_object()` with `OBJECT_DATA`. Hence,
previously obtained pointer to a data object may be now invalid.

Fixes #23794.

22 months agosd-journal: also check object header before verifying object data
Yu Watanabe [Mon, 27 Jun 2022 02:37:10 +0000 (11:37 +0900)] 
sd-journal: also check object header before verifying object data

Otherwise, the check by journal_file_check_object() may be meaning less
when the header is broken.

22 months agosd-journal: drop unused argument from journal_file_check_object()
Yu Watanabe [Mon, 27 Jun 2022 02:53:43 +0000 (11:53 +0900)] 
sd-journal: drop unused argument from journal_file_check_object()

And rename the function.

22 months agosd-journal: shorten code a bit
Yu Watanabe [Mon, 27 Jun 2022 02:28:36 +0000 (11:28 +0900)] 
sd-journal: shorten code a bit

22 months agosd-journal: align table
Yu Watanabe [Mon, 27 Jun 2022 02:21:27 +0000 (11:21 +0900)] 
sd-journal: align table

22 months agoMerge pull request #23821 from dtardon/ascii-logging
Yu Watanabe [Tue, 28 Jun 2022 18:36:35 +0000 (03:36 +0900)] 
Merge pull request #23821 from dtardon/ascii-logging

Allow ASCII fallback for Unicode characters in logs

22 months agoMerge pull request #23849 from mbiebl/more-https
Yu Watanabe [Tue, 28 Jun 2022 18:22:51 +0000 (03:22 +0900)] 
Merge pull request #23849 from mbiebl/more-https

Use https for freedesktop.org

22 months agoMerge pull request #23827 from yuwata/sd-event-process-buffered-inotify-data
Zbigniew Jędrzejewski-Szmek [Tue, 28 Jun 2022 16:25:14 +0000 (18:25 +0200)] 
Merge pull request #23827 from yuwata/sd-event-process-buffered-inotify-data

sd-event: process buffered inotify data

22 months agoUse https for gnu.org 23849/head
Michael Biebl [Tue, 28 Jun 2022 14:07:35 +0000 (16:07 +0200)] 
Use https for gnu.org

22 months agoUse https for man7.org
Michael Biebl [Tue, 28 Jun 2022 14:05:31 +0000 (16:05 +0200)] 
Use https for man7.org

22 months agoUse https for freedesktop.org
Michael Biebl [Tue, 28 Jun 2022 10:00:47 +0000 (12:00 +0200)] 
Use https for freedesktop.org

grep -l -r http:// | xargs sed -E -i s'#http://(.*).freedesktop.org#https://\1.freedesktop.org#'

22 months agoMerge pull request #23181 from thesamesam/parisc-seccomp
Yu Watanabe [Tue, 28 Jun 2022 11:01:01 +0000 (20:01 +0900)] 
Merge pull request #23181 from thesamesam/parisc-seccomp

Add seccomp support for PARISC (HPPA)

22 months agotree-wide: allow ASCII fallback for … in logs 23821/head
David Tardon [Fri, 24 Jun 2022 07:59:44 +0000 (09:59 +0200)] 
tree-wide: allow ASCII fallback for … in logs

22 months agotree-wide: allow ASCII fallback for → in logs
David Tardon [Fri, 24 Jun 2022 07:13:42 +0000 (09:13 +0200)] 
tree-wide: allow ASCII fallback for → in logs

22 months agogpt: add PARISC UUIDs 23181/head
Sam James [Tue, 28 Jun 2022 03:25:38 +0000 (04:25 +0100)] 
gpt: add PARISC UUIDs

Not doing PARISC64 for now as no userland exists for it yet.

22 months agoseccomp: add PARISC (HPPA support)
Sam James [Sun, 24 Apr 2022 01:55:41 +0000 (02:55 +0100)] 
seccomp: add PARISC (HPPA support)

We have to skip the W^X protections as we need executable
memory on PARISC for now. Kernel work is in progress (started
w/ 5.18).

Closes: https://github.com/systemd/systemd/issues/23180
22 months agobasic/missing-syscalls: add PARISC (HPPA support)
Sam James [Sun, 24 Apr 2022 01:55:11 +0000 (02:55 +0100)] 
basic/missing-syscalls: add PARISC (HPPA support)

Bug: https://github.com/systemd/systemd/issues/23180

22 months agogithub: add more components to RFE issue template
Jan Macku [Mon, 27 Jun 2022 16:57:02 +0000 (18:57 +0200)] 
github: add more components to RFE issue template

Follow-up to: #23838

22 months agotest: add another test for inotify event source 23827/head
Yu Watanabe [Mon, 27 Jun 2022 15:03:51 +0000 (00:03 +0900)] 
test: add another test for inotify event source

The test case is for issue #23826.

22 months agosd-event: make sd_event_prepare() return positive when buffered inotify data exists
Yu Watanabe [Sat, 25 Jun 2022 21:42:22 +0000 (06:42 +0900)] 
sd-event: make sd_event_prepare() return positive when buffered inotify data exists

Previously, even if there is buffered inotify data, sd_event_prepare()
did not process the data when there is no pending event source.

Fixes #23826.

22 months agosd-event: use LIST_IS_EMPTY()
Yu Watanabe [Sat, 25 Jun 2022 21:41:33 +0000 (06:41 +0900)] 
sd-event: use LIST_IS_EMPTY()

22 months agopo: add a false positive to POTFILES.skip
Piotr Drąg [Sun, 12 Jun 2022 12:48:04 +0000 (14:48 +0200)] 
po: add a false positive to POTFILES.skip

Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect this file as containing translations. Avoid this
behavior by putting the file in POTFILES.skip.

22 months agonetwork: grouping elements in network_free()
Yu Watanabe [Tue, 14 Jun 2022 06:44:42 +0000 (15:44 +0900)] 
network: grouping elements in network_free()

22 months agoMerge pull request #23842 from medhefgo/boot-std
Yu Watanabe [Mon, 27 Jun 2022 13:32:31 +0000 (22:32 +0900)] 
Merge pull request #23842 from medhefgo/boot-std

boot: Use standard types

22 months agotest-sd-hwdb: adjust the test to actually do anything
Zbigniew Jędrzejewski-Szmek [Thu, 23 Jun 2022 14:21:18 +0000 (16:21 +0200)] 
test-sd-hwdb: adjust the test to actually do anything

Without the terminating colon we wouldn't match anything, so the loop over
properties was skipped.

22 months agoboot: Use stdbool 23842/head
Jan Janssen [Mon, 27 Jun 2022 09:04:57 +0000 (11:04 +0200)] 
boot: Use stdbool

The way the UEFI spec defines BOOLEAN is fully compatible to stdbool, so
it is perfectly safe to switch to it. Although any other values than 0/1
are undefined by the spec, we could theoretically have cases where a
sloppy firmware hands us a bad BOOLEAN (since gnu-efi/edk2 declare it
as uint8_t). So any uses where we pass a pointer to BOOLEAN are left
untouched.

22 months agoboot: Use char
Jan Janssen [Mon, 27 Jun 2022 08:42:31 +0000 (10:42 +0200)] 
boot: Use char

This also switches to _cleanup_free_. Otherwise no code changes.

22 months agoboot: Use char16_t
Jan Janssen [Fri, 24 Jun 2022 09:37:15 +0000 (11:37 +0200)] 
boot: Use char16_t

This also switches to _cleanup_free_. Otherwise no code changes.

22 months agoboot: Use stdint types
Jan Janssen [Fri, 24 Jun 2022 09:25:36 +0000 (11:25 +0200)] 
boot: Use stdint types

22 months agoboot: Remove use of EFI_ERROR
Jan Janssen [Fri, 24 Jun 2022 09:00:43 +0000 (11:00 +0200)] 
boot: Remove use of EFI_ERROR

The macro is ugly and annoying to use and provides no real benefit. The
only reason to use it would be to allow warnings to go through. But any
EFI APIs we call do not return warning status codes or we do not check
the return value anyway. The only other case would be BS->StartImage,
where we already treat anything other than EFI_SUCCESS as an error
anyway.

This also helps the compiler and code analyzers to better reason about
the code. In particular, this can help reduce use of uninitialized
variable warnings.

22 months agoboot: Rename remaining EFI_STATUS vars to err for consistency
Jan Janssen [Fri, 24 Jun 2022 08:49:19 +0000 (10:49 +0200)] 
boot: Rename remaining EFI_STATUS vars to err for consistency

22 months agofundamental: Remove types-fundamental.h
Jan Janssen [Fri, 24 Jun 2022 08:45:52 +0000 (10:45 +0200)] 
fundamental: Remove types-fundamental.h

This removes the fundamental typedefs in favor of just using standard C
types. These are all used internally anyway and also do not do anything
special to warrant any redefinition to EFI types.

Even for BOOLEAN we can safely use stdbool. The defition from the EFI
specification is fully compatible, including making any other values
than 0/1 as undefined.

The exception is sd_char as those need to be char16_t. The typedef is
moved to string-util-fundamental.h instead.

22 months agogithub: add more components to issue template
Yu Watanabe [Mon, 27 Jun 2022 04:19:24 +0000 (13:19 +0900)] 
github: add more components to issue template

22 months agomeson: show default nspawn locale in summary
Yu Watanabe [Mon, 27 Jun 2022 03:46:57 +0000 (12:46 +0900)] 
meson: show default nspawn locale in summary

Follow-up for a22f5186761a437d8845397bbbfeaf9a7d590ec2.

22 months agoemacs: ignore .dir-locals-2.el (personal customization) versioning
Jacek Migacz [Sun, 26 Jun 2022 14:22:25 +0000 (16:22 +0200)] 
emacs: ignore .dir-locals-2.el (personal customization) versioning

22 months agonspawn: support PrivateUsers=identity 23835/head
Yu Watanabe [Mon, 27 Jun 2022 01:31:53 +0000 (10:31 +0900)] 
nspawn: support PrivateUsers=identity

Follow-up for 33eac552ab22af58b303342b1fa912900fa42820.

Fixes #23825.

22 months agonspawn: update help message for user namespacing
Yu Watanabe [Mon, 27 Jun 2022 01:29:13 +0000 (10:29 +0900)] 
nspawn: update help message for user namespacing

Follow-up for 33eac552ab22af58b303342b1fa912900fa42820.

22 months agohwdb: Add Lenovo ThinkPad C13 Yoga
Akihiko Odaki [Fri, 10 Jun 2022 22:58:52 +0000 (07:58 +0900)] 
hwdb: Add Lenovo ThinkPad C13 Yoga

22 months agoMerge pull request #23834 from mrc0mmand/dfuzzer-in-a-container
Evgeny Vereshchagin [Sun, 26 Jun 2022 22:55:36 +0000 (01:55 +0300)] 
Merge pull request #23834 from mrc0mmand/dfuzzer-in-a-container

A couple of tweaks to allow running TEST-21-DFUZZER in a container

22 months agotest: drop unnecessary `|| :` 23834/head
Frantisek Sumsal [Sun, 26 Jun 2022 19:00:43 +0000 (21:00 +0200)] 
test: drop unnecessary `|| :`

since we use `set +e` in the cleanup handler.

22 months agotest: run TEST-21 in nspawn only if $TEST_PREFER_NSPAWN is set
Frantisek Sumsal [Sun, 26 Jun 2022 18:57:31 +0000 (20:57 +0200)] 
test: run TEST-21 in nspawn only if $TEST_PREFER_NSPAWN is set

so we can run it under nspawn in CIs which don't support nested KVM, but
avoid running it twice (both under nspawn and qemu) in CIs which support
both methods.

22 months agotest: make TEST-21-DFUZZER work in containers
Frantisek Sumsal [Sun, 26 Jun 2022 18:52:12 +0000 (20:52 +0200)] 
test: make TEST-21-DFUZZER work in containers

by avoiding fuzzing networkd and timesyncd when running in a container.

22 months agosha256: Use stdbool and uintptr_t
Jan Janssen [Fri, 24 Jun 2022 08:04:30 +0000 (10:04 +0200)] 
sha256: Use stdbool and uintptr_t

This also syncs the copyright blurb with current glibc sources. The
written by line does not appear in upstream, so it should be okay to
remove.

22 months agomkosi: Pull in fix that solves action mirror issue
Daan De Meyer [Fri, 24 Jun 2022 12:36:31 +0000 (14:36 +0200)] 
mkosi: Pull in fix that solves action mirror issue

22 months agoudev: allow to execute longer command line
Yu Watanabe [Fri, 24 Jun 2022 04:49:15 +0000 (13:49 +0900)] 
udev: allow to execute longer command line

Fixes #23607.

22 months agoci: set top-level permissions as well
Evgeny Vereshchagin [Thu, 23 Jun 2022 14:09:36 +0000 (14:09 +0000)] 
ci: set top-level permissions as well

It should turn on the "restricted" mode by default regardless of
whether the global setting is on or not. New jobs in this action
should have to overwrite it explicitly to gain write access in any
way.

It should also make the action consistent with the other actions
writing various stuff like 'labeler' and 'codeql'.

22 months agoci: remove links to "codeless contribution" actions
Evgeny Vereshchagin [Thu, 23 Jun 2022 08:55:28 +0000 (08:55 +0000)] 
ci: remove links to "codeless contribution" actions

They refer to actions with script injections running with full
access to repositories.

22 months agoboot: Fix calls to ResetSystem
Jan Janssen [Thu, 23 Jun 2022 12:48:13 +0000 (14:48 +0200)] 
boot: Fix calls to ResetSystem

gnu-efi falsely declares a return type for ResetSystem when it should be
void. The spec also says that it never returns, so just assert.

22 months agologind: simplify code
Zbigniew Jędrzejewski-Szmek [Thu, 23 Jun 2022 07:56:33 +0000 (09:56 +0200)] 
logind: simplify code

Follow-up for 4885d7490b23e08d8444e5a68927ce9ce8727e5a.

22 months agogithub: Issue forms - fix GA `SHA1` ref
Jan Macku [Thu, 23 Jun 2022 14:37:50 +0000 (16:37 +0200)] 
github: Issue forms - fix GA `SHA1` ref

Fix `SHA1` reference for github action `stefanbuck/github-issue-parser` to
point to correct commit.

Follow-up to: #23811

22 months agogithub: Issue forms templates follow-up
Jan Macku [Thu, 23 Jun 2022 12:16:43 +0000 (14:16 +0200)] 
github: Issue forms templates follow-up

- Use `SHA1` for actions versioning
- Fix typo: `github-issue-praser` -> `github-issue-parser`
- Define exact permissions

Follow-up to: #23693

22 months agoMerge pull request #23802 from yuwata/core-watchdog-follow-ups
Zbigniew Jędrzejewski-Szmek [Thu, 23 Jun 2022 07:59:24 +0000 (09:59 +0200)] 
Merge pull request #23802 from yuwata/core-watchdog-follow-ups

core: cleanups for watchdog

22 months agogithub: Update issue templates to issue forms
Jan Macku [Fri, 10 Jun 2022 05:30:42 +0000 (07:30 +0200)] 
github: Update issue templates to issue forms

Issue forms templates allow us to add automation in place.
This patch replaces old markdown issue templates with new issue forms.
It also adds workflow to automatically mark issues by component label
based on reported data.

This change could help with initial triaging of issues.

23 months agologind-session-dbus: allow to set display name via dbus
David Tardon [Fri, 10 Jun 2022 13:07:01 +0000 (15:07 +0200)] 
logind-session-dbus: allow to set display name via dbus

Currently, the only way to set display name of a graphical session is to
pass it to CreateSession(). But modern display managers like gdm start
the display server as part of the user session, which means that the
display name isn't known yet when the session is being created. Hence,
let's make it possible to set it later.

23 months agobootspec: Add PE file name to log messages
Jan Janssen [Sun, 19 Jun 2022 13:35:47 +0000 (15:35 +0200)] 
bootspec: Add PE file name to log messages

Fixes: #23783
23 months agoMerge pull request #23774 from yuwata/netlabel-nftset-follow-ups
Yu Watanabe [Wed, 22 Jun 2022 16:33:19 +0000 (01:33 +0900)] 
Merge pull request #23774 from yuwata/netlabel-nftset-follow-ups

network, core: revert NFTSet and NetLabel features