]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agoNEWS: note about future implicit PrivateUsers= in user units 26354/head
Luca Boccassi [Wed, 8 Feb 2023 13:38:38 +0000 (13:38 +0000)] 
NEWS: note about future implicit PrivateUsers= in user units

2 years agoNEWS: copy future incompatible changes notice from 252
Luca Boccassi [Wed, 8 Feb 2023 13:38:15 +0000 (13:38 +0000)] 
NEWS: copy future incompatible changes notice from 252

These are in the future, so it's good to re-emphasize on every release until they
actually happen

2 years agohwdb: Add HP Envy x360 Convertible 15-cn0xxx to existing entry
Fabian Gurtner [Thu, 2 Feb 2023 09:28:23 +0000 (10:28 +0100)] 
hwdb: Add HP Envy x360 Convertible 15-cn0xxx to existing entry

2 years agocore: imply DeviceAllow=/dev/tpmrm0 with LoadCredentialEncrypted
Luca Boccassi [Wed, 8 Feb 2023 00:25:00 +0000 (00:25 +0000)] 
core: imply DeviceAllow=/dev/tpmrm0 with LoadCredentialEncrypted

If the device access policy is restricted, add implicitly access to the TPM
if at least one encrypted credential needs to be loaded.

Fixes https://github.com/systemd/systemd/issues/26042

2 years agocryptenroll: do not implicitly verify with default tpm policy signature
Luca Boccassi [Wed, 8 Feb 2023 02:10:28 +0000 (02:10 +0000)] 
cryptenroll: do not implicitly verify with default tpm policy signature

If it was not requested to use a tpm2 signature file when enrolling, do
not fallback to the default /run/systemd/tpm2-pcr-signature.json as it
likely will be unrelated if it exists.

Fixes https://github.com/systemd/systemd/issues/25435

2 years agounit: always return 1 in log_kill
msizanoen1 [Tue, 7 Feb 2023 13:17:21 +0000 (20:17 +0700)] 
unit: always return 1 in log_kill

This ensures that cg_kill_items returns the correct value to let the
manager know that a process was killed.

2 years agoMerge pull request #26328 from yuwata/udev-worker-set-process-name
Zbigniew Jędrzejewski-Szmek [Wed, 8 Feb 2023 07:57:05 +0000 (08:57 +0100)] 
Merge pull request #26328 from yuwata/udev-worker-set-process-name

udev: set worker process name

2 years agojournal: minor modernizations
Lennart Poettering [Tue, 7 Feb 2023 10:06:31 +0000 (11:06 +0100)] 
journal: minor modernizations

2 years agoMerge pull request #26337 from poettering/journal-display-ts
Luca Boccassi [Tue, 7 Feb 2023 19:36:27 +0000 (19:36 +0000)] 
Merge pull request #26337 from poettering/journal-display-ts

logs-show: rename "ts" paramater/variable to "display_ts"

2 years agoMerge pull request #26336 from poettering/journal-etoomanyrefs
Luca Boccassi [Tue, 7 Feb 2023 19:35:56 +0000 (19:35 +0000)] 
Merge pull request #26336 from poettering/journal-etoomanyrefs

journal: print nicer log message when limit of open journal files during display is hit

2 years agoMerge pull request #26335 from keszybz/dns-not-found
Luca Boccassi [Tue, 7 Feb 2023 19:33:07 +0000 (19:33 +0000)] 
Merge pull request #26335 from keszybz/dns-not-found

resolve: adjust message for NXDOMAIN lookup result

2 years agoFix Positivo-vaio VJPW12F11X key toggle touchpad
drosdeck [Tue, 7 Feb 2023 12:14:59 +0000 (09:14 -0300)] 
Fix Positivo-vaio VJPW12F11X key toggle touchpad

2 years agoMerge pull request #26338 from jamacku/fix-labeling
Zbigniew Jędrzejewski-Szmek [Tue, 7 Feb 2023 15:27:06 +0000 (16:27 +0100)] 
Merge pull request #26338 from jamacku/fix-labeling

ci: Fix automatic removing of labels when PR is closed

2 years agoci: remove `if: github.event.issue.pull_request` from `labeler.yml` 26338/head
Jan Macku [Tue, 7 Feb 2023 14:40:47 +0000 (15:40 +0100)] 
ci: remove `if: github.event.issue.pull_request` from `labeler.yml`

`github.event.issue.pull_request` is an object, not a boolean.
This is the root cause of why the step that is supposed to remove labels
is always skipped. Having this condition in place is not necessary since
the workflow is run on the `pull_request_target` event.

2 years agologs-show: rename "ts" paramater/variable to "display_ts" 26337/head
Lennart Poettering [Tue, 7 Feb 2023 10:20:24 +0000 (11:20 +0100)] 
logs-show: rename "ts" paramater/variable to "display_ts"

When displaying log data we deal with two kind of timestamps: the one we
use for display (typically the source timestamp if available), and the
one we use internally (typically the reception timestamp of journald).

The user-facing output modes generally use the display timestamp, the
ones intended for further processing (i.e. json + export outputs) do
not, and directly query the timestamps of the entry, ignoring the
source. This gets a bit confusing, since it's not always clear why we
use which timestamp where. Let's address that by renaming the generic
"ts" parameter/variable to "display_ts" to emphasize that the stored
timestamp are "corrected" timestamps for display only.

No real code change, just some renaming.

2 years agoci: fix missing quotes in `labeler.yml`
Jan Macku [Tue, 7 Feb 2023 14:39:37 +0000 (15:39 +0100)] 
ci: fix missing quotes in `labeler.yml`

2 years agoupdate TODO 26336/head
Lennart Poettering [Tue, 7 Feb 2023 14:11:52 +0000 (15:11 +0100)] 
update TODO

2 years agojournal: print a useful error message if we hit the journal file open limit
Lennart Poettering [Tue, 7 Feb 2023 14:03:45 +0000 (15:03 +0100)] 
journal: print a useful error message if we hit the journal file open limit

See: #20921

2 years agoresolve: adjust message for NXDOMAIN lookup result 26335/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 Feb 2023 13:43:48 +0000 (14:43 +0100)] 
resolve: adjust message for NXDOMAIN lookup result

Previously, we reported:
  nx.example.org: resolve call failed: 'nx.example.org' not found
But the call did succeed, and in fact all communication with the upstream
servers was successful, and we got an authoritative negative answer.
So instead of saying that the call fail, just say that the host doesn't exist:
  nx.example.org: Name 'nx.example.org' not found

I wanted to keep the prefix of "<name>: ", to keep the output uniform. But
it'd look a bit strange to say "<name>: <name> not found", so I added "Name "
to make the output more readable. (Another option would be to not display
the error string received from resolved, but that seems risky: even if right
now resolved uses just one message format, it could start doing something else
in the future, so it's better to display the error as received.)

Fixes #26233.

2 years agoresolve: define normal macros for BUS_ERROR_DNS error codes
Zbigniew Jędrzejewski-Szmek [Tue, 7 Feb 2023 13:38:28 +0000 (14:38 +0100)] 
resolve: define normal macros for BUS_ERROR_DNS error codes

This result is identical after cpp is done, so we don't save anything
by not having the usual macros. And with the usual macros it's easier to
grep and code-crossreferencing works better.

2 years agotree-wide: set FORK_RLIMIT_NOFILE_SAFE flag 26328/head
Yu Watanabe [Tue, 7 Feb 2023 05:33:06 +0000 (14:33 +0900)] 
tree-wide: set FORK_RLIMIT_NOFILE_SAFE flag

No functional changes, just refactoring.

2 years agoudevd: configure a child process name for worker processes
Yu Watanabe [Tue, 7 Feb 2023 05:16:11 +0000 (14:16 +0900)] 
udevd: configure a child process name for worker processes

This effectively reverts commit ff86c92e3043f71fc801cf687600a480ee8f6778,
and re-apply 49f3ee7e74c714f55aab395c080b1099fc17f7fd.

The change was dropped due to the process name was not correctly logged,
but the issue was fixed by dd15e4cb57129b915e01495e113696bfe0b70214.
Let's set the child process name again.

2 years agoMerge pull request #26324 from yuwata/argv-util-update-short-name
Yu Watanabe [Tue, 7 Feb 2023 03:08:07 +0000 (12:08 +0900)] 
Merge pull request #26324 from yuwata/argv-util-update-short-name

argv-util: also update short invocation name

2 years agoMerge pull request #26322 from keszybz/log-errno-fix
Yu Watanabe [Tue, 7 Feb 2023 03:07:45 +0000 (12:07 +0900)] 
Merge pull request #26322 from keszybz/log-errno-fix

Log errno fix

2 years agoMerge pull request #26321 from keszybz/flex-arrays
Yu Watanabe [Tue, 7 Feb 2023 03:07:21 +0000 (12:07 +0900)] 
Merge pull request #26321 from keszybz/flex-arrays

Enable new compiler diagnostics for invalid array accesses

2 years agoMerge pull request #26320 from keszybz/operator-whitespace
Yu Watanabe [Tue, 7 Feb 2023 03:06:49 +0000 (12:06 +0900)] 
Merge pull request #26320 from keszybz/operator-whitespace

Drop whitespace after shell redirection operators

2 years agoNEWS: fix typo
Topi Miettinen [Mon, 6 Feb 2023 20:29:50 +0000 (20:29 +0000)] 
NEWS: fix typo

2 years agoupdate TODO
Lennart Poettering [Mon, 6 Feb 2023 10:53:05 +0000 (11:53 +0100)] 
update TODO

2 years agoargv-util: also update program_invocation_short_name 26324/head
Yu Watanabe [Fri, 3 Feb 2023 09:29:36 +0000 (18:29 +0900)] 
argv-util: also update program_invocation_short_name

Our logging uses program_invocation_short_name. Without this patch,
logs from forked client may become broken; spuriously truncated or
the short invocation name is not completely shown in the log.

2 years agotest: use notice log level to make easily filter out logs from PID1
Yu Watanabe [Mon, 6 Feb 2023 13:49:35 +0000 (22:49 +0900)] 
test: use notice log level to make easily filter out logs from PID1

2 years agomeson: enable -Wzero-length-bounds 26321/head
Zbigniew Jędrzejewski-Szmek [Mon, 6 Feb 2023 08:46:55 +0000 (09:46 +0100)] 
meson: enable -Wzero-length-bounds

This will warn if fake flexible arrays are re-introduced. I'm not using
-Werror=… because we may still get warnings when compiling against old kernel
headers. We can crank this up to error later.

2 years agomeson: enable -Warray-bounds and -fstrict-flex-arrays
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 19:44:19 +0000 (20:44 +0100)] 
meson: enable -Warray-bounds and -fstrict-flex-arrays

-fstrict-flex-arrays means that the compiler doesn't have to assume that any
trailing array is a flex array. I.e. unless the array is declared without a
specified size, only indices in the declared range are valid.

-Warray-bounds turns on the warnings about out-of-bounds array accesses.
-Warray-bounds=2 does some more warnings, with higher false positive rate. But
it doesn't seem to yield any false positives in our codebase, so enable it.

clang supports -Warray-bounds, but not -Warray-bounds=2.
gcc supports both.
gcc-13 supports -fstrict-flex-arrays.

See https://people.kernel.org/kees/bounded-flexible-arrays-in-c for a long
discussion of use in the kernel.

2 years agoshared/json: avoid use of fake flex array
Zbigniew Jędrzejewski-Szmek [Mon, 6 Feb 2023 11:03:09 +0000 (12:03 +0100)] 
shared/json: avoid use of fake flex array

2 years agosd-journal: avoid use of fake flex arrays
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 20:15:52 +0000 (21:15 +0100)] 
sd-journal: avoid use of fake flex arrays

I tried to use DECLARE_FLEX_ARRAY like the kernel does, but it does not work
for anonymous structs (they cannot be declared inline), so an open-coded
version is used.

2 years agorepart: silence bogus gcc warning 26322/head
Zbigniew Jędrzejewski-Szmek [Mon, 6 Feb 2023 09:08:44 +0000 (10:08 +0100)] 
repart: silence bogus gcc warning

[2/3] Compiling C object systemd-repart.p/src_partition_repart.c.o
../src/partition/repart.c: In function ‘context_open_copy_block_paths’:
../src/partition/repart.c:5194:41: warning: ‘devno’ may be used uninitialized [-Wmaybe-uninitialized]
 5194 |                         source_fd = r = device_open_from_devnum(S_IFBLK, devno, O_RDONLY|O_CLOEXEC|O_NONBLOCK, &opened);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/partition/repart.c:5188:31: note: ‘devno’ was declared here
 5188 |                         dev_t devno;
      |                               ^~~~~

This is with gcc-13.0.1-0.2.fc38.x86_64, -O2. I'm pretty sure the code
is correct. I also tried adding some asserts where errno is used for the return
value, but that didn't help. I think resolve_copy_blocks_auto() is just too long
for gcc to understand.

2 years agorepart: fix invalid errno in log
Zbigniew Jędrzejewski-Szmek [Mon, 6 Feb 2023 09:00:50 +0000 (10:00 +0100)] 
repart: fix invalid errno in log

2 years agoshared/linux: fix fake flexible array in struct autofs_dev_ioctl
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 19:22:08 +0000 (20:22 +0100)] 
shared/linux: fix fake flexible array in struct autofs_dev_ioctl

The kernel still hasn't fixed this in kernel-headers-6.2.0-0.rc6.git0.1.fc38.x86_64.

2 years agosd-network: stop using fake flexible array
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 19:17:21 +0000 (20:17 +0100)] 
sd-network: stop using fake flexible array

2 years agoshared/linux: update kernel headers
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 19:11:56 +0000 (20:11 +0100)] 
shared/linux: update kernel headers

The kernel was updated to not use fake flex arrays with zero size.
Updating should allow -fstrict-flex-arrays to be used.

Headers pulled from kernel-headers-6.2.0-0.rc6.git0.1.fc38.x86_64.

Note that this is not a straighforward copy: our files have local modifications
(listed in README) that need to be preserved.

2 years agodocs/CODING_STYLE: add sentence about redirection operators 26320/head
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 21:04:45 +0000 (22:04 +0100)] 
docs/CODING_STYLE: add sentence about redirection operators

2 years agotools: replace multi-line echo by <<EOF
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 21:02:15 +0000 (22:02 +0100)] 
tools: replace multi-line echo by <<EOF

2 years agotest: drop whitespace after shell redirection operators
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 20:41:24 +0000 (21:41 +0100)] 
test: drop whitespace after shell redirection operators

(The one case that is left unchanged is '< <(subcommand)'.)

This way, the style with no gap was already dominant. This way, the reader
immediately knows that ' < ' is a comparison operator and ' << ' is a shift.

In a few cases, replace custom EOF replacement by just EOF. There is no point
in using someting like "_EOL" unless "EOF" appears in the text.

2 years agoNEWS: adjust commas, avoid double negative
Zbigniew Jędrzejewski-Szmek [Sun, 5 Feb 2023 20:20:15 +0000 (21:20 +0100)] 
NEWS: adjust commas, avoid double negative

Also adjust text wrapping in a few spots.

2 years agoAdd hwdb sensor entry for Lenovo IdeaPad Duet 3 10IGL5 (82AT).
Darrell Kavanagh [Sun, 5 Feb 2023 20:57:12 +0000 (20:57 +0000)] 
Add hwdb sensor entry for Lenovo IdeaPad Duet 3 10IGL5 (82AT).

2 years agohwdb: ieee1394-unit-function: add MOTU 896 mk3 Hybrid
Takashi Sakamoto [Mon, 6 Feb 2023 00:59:02 +0000 (09:59 +0900)] 
hwdb: ieee1394-unit-function: add MOTU 896 mk3 Hybrid

This commit adds hwdb entry for MOTU 896 mk3 Hybrid.

Reference: https://lore.kernel.org/alsa-devel/63DF98FE.2060604@gmx.de/

2 years agoci: Fix Development Freeze Automation
Jan Macku [Fri, 3 Feb 2023 09:25:51 +0000 (10:25 +0100)] 
ci: Fix Development Freeze Automation

Due to the limitation of `GITHUB_TOKEN` when running workflows from forks,
it's required to split the `development_freeze` workflow in two.

* First workflow will run on the `pull_request` trigger and save the PR
number in the artifact. This workflow is running with read-only permissions
on `GITHUB_TOKEN`.
* Second workflow will get triggered on `workflow_run`. It will be run
directly in the `systemd/systemd` context and can get permission to be
able to create comments on PR.

GITHUB_TOKEN limitations:

* https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

GitHub Security Labs Article - How to correctly and safely overcome GITHUB_TOKEN limitations:

* https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

2 years agoman: correct path for systemd-pcrphase
Simon Brand [Fri, 3 Feb 2023 02:52:31 +0000 (02:52 +0000)] 
man: correct path for systemd-pcrphase

2 years agoNEWS: fix typo
Yu Watanabe [Thu, 2 Feb 2023 17:07:17 +0000 (02:07 +0900)] 
NEWS: fix typo

2 years agoupdate NEWS v253-rc2
Lennart Poettering [Thu, 2 Feb 2023 16:44:03 +0000 (17:44 +0100)] 
update NEWS

2 years agoMerge pull request #26302 from bluca/rc2
Luca Boccassi [Thu, 2 Feb 2023 16:30:13 +0000 (16:30 +0000)] 
Merge pull request #26302 from bluca/rc2

Update hwdb for rc2

2 years agoNEWS: fix typo
Luca Boccassi [Thu, 2 Feb 2023 14:51:02 +0000 (14:51 +0000)] 
NEWS: fix typo

2 years agoNEWS: various fixes
Lennart Poettering [Thu, 2 Feb 2023 14:45:09 +0000 (15:45 +0100)] 
NEWS: various fixes

2 years agoNEWS: update date 26302/head
Luca Boccassi [Thu, 2 Feb 2023 14:20:40 +0000 (14:20 +0000)] 
NEWS: update date

2 years agoNEWS: update contributors list
Luca Boccassi [Thu, 2 Feb 2023 14:16:51 +0000 (14:16 +0000)] 
NEWS: update contributors list

2 years agohwdb: update autosuspend db
Luca Boccassi [Thu, 2 Feb 2023 14:19:45 +0000 (14:19 +0000)] 
hwdb: update autosuspend db

2 years agohwdb: update
Luca Boccassi [Thu, 2 Feb 2023 14:18:56 +0000 (14:18 +0000)] 
hwdb: update

2 years agoNEWS: update for v253-rc2
Luca Boccassi [Thu, 2 Feb 2023 12:25:18 +0000 (12:25 +0000)] 
NEWS: update for v253-rc2

2 years agoNEWS: fix typo
Yu Watanabe [Thu, 2 Feb 2023 11:00:37 +0000 (20:00 +0900)] 
NEWS: fix typo

2 years agoMerge pull request #26292 from yuwata/locale-fix-enoent-handling
Zbigniew Jędrzejewski-Szmek [Thu, 2 Feb 2023 10:01:56 +0000 (11:01 +0100)] 
Merge pull request #26292 from yuwata/locale-fix-enoent-handling

locale: fix ENOENT handling for vconsole.conf or xorg.conf

2 years agotest-time-util: skip test for TIMESTAMP_DATE if the timestamp is too old
Yu Watanabe [Wed, 1 Feb 2023 19:36:29 +0000 (04:36 +0900)] 
test-time-util: skip test for TIMESTAMP_DATE if the timestamp is too old

Follow-up for 64f3419ec1f56a93b6dd48137ca40c945fc06c59.

If the input timestamp is too old (say, 1min since 1970-01-01), then
parse_timestamp() may fail on a timezone with positive shift e.g.
JST (UTC+9). Moreover, even if parse_timestamp() succeeds, its result
'y' and 'usec_sub_unsigned(x, 2 * USEC_PER_DAY)' are both zero, and
the assertion will be triggered.

Fixes #26172.

2 years agoudev: make get_virtfn_info() provide physical PCI device
Yu Watanabe [Wed, 1 Feb 2023 14:39:43 +0000 (23:39 +0900)] 
udev: make get_virtfn_info() provide physical PCI device

Fixes a bug introduced by 78463c6c4fdcb703bc0dc694c3ea77df3c5624e0.

Fixes #25545.

2 years agoMerge pull request #26180 from ddstreet/tpm2_cleanup
Luca Boccassi [Wed, 1 Feb 2023 23:40:52 +0000 (23:40 +0000)] 
Merge pull request #26180 from ddstreet/tpm2_cleanup

Add struct tpm2_handle and use _cleanup_ instead of goto

2 years agoMerge pull request #26269 from keszybz/sysusers-empty-etc-and-improved-messages
Luca Boccassi [Wed, 1 Feb 2023 23:14:59 +0000 (23:14 +0000)] 
Merge pull request #26269 from keszybz/sysusers-empty-etc-and-improved-messages

sysusers: improve messages and autocreate /etc

2 years agoman: add page for systemd-ac-power
Luca Boccassi [Wed, 1 Feb 2023 19:29:11 +0000 (19:29 +0000)] 
man: add page for systemd-ac-power

It is now a supported executable, so add manpage.

Fixes https://github.com/systemd/systemd/issues/26289

2 years agoMerge pull request #26287 from medhefgo/mkosi-auto-enroll
Luca Boccassi [Wed, 1 Feb 2023 21:51:04 +0000 (21:51 +0000)] 
Merge pull request #26287 from medhefgo/mkosi-auto-enroll

ci: Test with secure boot enabled under mkosi

2 years agoMerge pull request #26285 from yuwata/test-lvextend
Frantisek Sumsal [Wed, 1 Feb 2023 20:59:04 +0000 (20:59 +0000)] 
Merge pull request #26285 from yuwata/test-lvextend

test: add a testcase for lvextend

2 years agodocs: tweak rsync flags for moving existing home dir to systemd-homed
wouter bolsterlee [Wed, 1 Feb 2023 20:15:22 +0000 (21:15 +0100)] 
docs: tweak rsync flags for moving existing home dir to systemd-homed

The documentation on moving an existing homedir into a systemd-homed managed
one suggests using rsync(1) with a bunch of flags to preserve as much metadata
as possible: permissions, xattrs, timestamps, etc. The previously suggested
flags were:

    rsync -aHAXv --remove-source-files …

… which does include mtimes, but not ctimes and atimes, because -a does not
include those:

    --archive, -a            archive mode is -rlptgoD (no -A,-X,-U,-N,-H)

This change adds the -N and -U flags to preserve even more file timestamps,
turning the command into:

    rsync -aHANUXv --remove-source-files …

The new flags are:

    --crtimes, -N            preserve create times (newness)
    --atimes, -U             preserve access (use) times

2 years agolocale: drop context_clear_x11() 26292/head
Yu Watanabe [Wed, 1 Feb 2023 18:17:53 +0000 (03:17 +0900)] 
locale: drop context_clear_x11()

It is used at only place, and mostly trivial.
No functional change, just refactoring.

2 years agolocale: fix ENOENT handling for vconsole.conf or xorg.conf
Yu Watanabe [Wed, 1 Feb 2023 18:17:06 +0000 (03:17 +0900)] 
locale: fix ENOENT handling for vconsole.conf or xorg.conf

2 years agotpm2: add Tpm2Handle with automatic cleanup 26180/head
Dan Streetman [Tue, 24 Jan 2023 15:19:03 +0000 (10:19 -0500)] 
tpm2: add Tpm2Handle with automatic cleanup

This allows using _cleanup_ with the handles, which then allows removing the
use of goto in all functions that use the handles.

2 years agotpm2: use Tpm2Context* instead of ESYS_CONTEXT*
Dan Streetman [Tue, 6 Dec 2022 18:07:34 +0000 (13:07 -0500)] 
tpm2: use Tpm2Context* instead of ESYS_CONTEXT*

This is needed for later patches that use Tpm2Handle, which requires access
to the Tpm2Context.

2 years agotpm2: use ref counter for Tpm2Context
Dan Streetman [Tue, 24 Jan 2023 00:52:56 +0000 (19:52 -0500)] 
tpm2: use ref counter for Tpm2Context

This will be used by Tpm2Handle instances, which is added in later patches.

The refcounting allows the context to be retained until all Tpm2Handles have
been cleaned up, and the initial ref is released, before cleaning the context.

2 years agotpm2: rename struct tpm2_context to Tpm2Context
Dan Streetman [Tue, 24 Jan 2023 00:52:56 +0000 (19:52 -0500)] 
tpm2: rename struct tpm2_context to Tpm2Context

This aligns with systemd coding guidelines for struct naming

2 years agotpm2: rename tpm2 alg id<->string functions
Dan Streetman [Fri, 9 Dec 2022 22:20:24 +0000 (17:20 -0500)] 
tpm2: rename tpm2 alg id<->string functions

The 'pcr_bank' functions operate on hash algs, and are not specific to the PCR
banks, while the 'primary_alg' functions operate on asymmetric algs, and are
not specific to primary keys.

2 years agoMerge pull request #26219 from yuwata/localed-follow-ups
Zbigniew Jędrzejewski-Szmek [Wed, 1 Feb 2023 16:18:35 +0000 (17:18 +0100)] 
Merge pull request #26219 from yuwata/localed-follow-ups

locale: check conversion before polkit

2 years agoci: Test with secure boot enabled under mkosi 26287/head
Jan Janssen [Tue, 31 Jan 2023 17:53:28 +0000 (18:53 +0100)] 
ci: Test with secure boot enabled under mkosi

This gives us some nice test coverage for secure boot enrolling and the
stub secure boot workound. The authenticated EFI variables are already
created by mkosi, all we need to do is request secure boot to be used.

2 years agoMerge pull request #26286 from keszybz/two-doc-updates
Zbigniew Jędrzejewski-Szmek [Wed, 1 Feb 2023 16:03:46 +0000 (17:03 +0100)] 
Merge pull request #26286 from keszybz/two-doc-updates

Two doc updates

2 years agogit: Ignore mkosi secure boot keys
Jan Janssen [Wed, 1 Feb 2023 14:27:45 +0000 (15:27 +0100)] 
git: Ignore mkosi secure boot keys

2 years agoboot: Add if-safe mode for secure boot enrollment
Jan Janssen [Wed, 1 Feb 2023 14:23:25 +0000 (15:23 +0100)] 
boot: Add if-safe mode for secure boot enrollment

2 years agoman: Use sbsigntools for secure boot key generation example
Jan Janssen [Wed, 1 Feb 2023 13:43:59 +0000 (14:43 +0100)] 
man: Use sbsigntools for secure boot key generation example

This way, people do not need efitools installed to generate these as
sbsigntools has everything needed to produce signed EFI variables.

2 years agotest: add a testcase for lvextend 26285/head
Yu Watanabe [Wed, 1 Feb 2023 12:25:40 +0000 (21:25 +0900)] 
test: add a testcase for lvextend

For RHBZ#2158628 (https://bugzilla.redhat.com/show_bug.cgi?id=2158628)

2 years agoman: strengthen language about generator output 26286/head
Zbigniew Jędrzejewski-Szmek [Wed, 1 Feb 2023 14:34:38 +0000 (15:34 +0100)] 
man: strengthen language about generator output

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2165433.

2 years agoNEWS: extend entry for systemd-journald-audit.socket
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jan 2023 15:33:42 +0000 (16:33 +0100)] 
NEWS: extend entry for systemd-journald-audit.socket

I knew about the change but forgot to update the packaging scriptlets…
Let's add this to make it easier for other distros to notice.

2 years agotest-journal-flush: minor modernizations
Lennart Poettering [Mon, 30 Jan 2023 17:39:20 +0000 (18:39 +0100)] 
test-journal-flush: minor modernizations

let's automatically destroy test dirs, instead of manually.

2 years agoid128: introduce ERRNO_IS_MACHINE_ID_UNSET() helper macro
Lennart Poettering [Wed, 1 Feb 2023 11:08:25 +0000 (12:08 +0100)] 
id128: introduce ERRNO_IS_MACHINE_ID_UNSET() helper macro

2 years agotest: make helper_check_device_units() log unit name
Yu Watanabe [Wed, 1 Feb 2023 14:03:54 +0000 (23:03 +0900)] 
test: make helper_check_device_units() log unit name

2 years agopid1: fix segv triggered by status query (#26279)
Robin Humble [Wed, 1 Feb 2023 12:36:48 +0000 (23:36 +1100)] 
pid1: fix segv triggered by status query (#26279)

If any query makes it to the end of install_info_follow() then I think symlink_target is set to NULL.
If that is followed by -EXDEV from unit_file_load_or_readlink(), then that causes basename(NULL)
which segfaults pid 1.

This is triggered by eg. "systemctl status crond" in RHEL9 if

/etc/systemd/system/crond.service
  -> /ram/etc/systemd/system/crond.service
  -> /usr/lib/systemd/system/.crond.service.blah.blah
  -> /usr/lib/systemd/system/crond.service

2 years agocore: split system/user job timeouts and make them configurable
Zbigniew Jędrzejewski-Szmek [Tue, 26 Jan 2021 19:23:12 +0000 (20:23 +0100)] 
core: split system/user job timeouts and make them configurable

Config options are -Ddefault-timeout-sec= and -Ddefault-user-timeout-sec=.
Existing -Dupdate-helper-user-timeout= is renamed to -Dupdate-helper-user-timeout-sec=
for consistency. All three options take an integer value in seconds. The
renaming and type-change of the option is a small compat break, but it's just
at compile time and result in a clear error message. I also doubt that anyone was
actually using the option.

This commit separates the user manager timeouts, but keeps them unchanged at 90 s.
The timeout for the user manager is set to 4/3*user-timeout, which means that it
is still 120 s.

Fedora wants to experiment with lower timeouts, but doing this via a patch would
be annoying and more work than necessary. Let's make this easy to configure.

2 years agotest-sysusers: check that sysusers creates /etc when missing 26269/head
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jan 2023 15:41:16 +0000 (16:41 +0100)] 
test-sysusers: check that sysusers creates /etc when missing

2 years agobasic/user-util: create /etc from take_etc_passwd_lock
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jan 2023 15:24:50 +0000 (16:24 +0100)] 
basic/user-util: create /etc from take_etc_passwd_lock

This allows sysusers to operate with --root that is an empty directory.
It may be useful to, for example, populate the user database before installing
anything else.

firstboot was already doing this, so drop the duplicated call there.

2 years agobasic/user-util: convert prefix_roota→path_join and use _cleanup_ more
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jan 2023 15:17:12 +0000 (16:17 +0100)] 
basic/user-util: convert prefix_roota→path_join and use _cleanup_ more

2 years agobasic: reword some comments
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jan 2023 15:16:55 +0000 (16:16 +0100)] 
basic: reword some comments

Without commas, the sentences can be hard to parse.

2 years agosysusers: when comparing items, log debug the difference
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jan 2023 14:10:03 +0000 (15:10 +0100)] 
sysusers: when comparing items, log debug the difference

2 years agosysusers: add helper to create new Item
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jan 2023 13:16:48 +0000 (14:16 +0100)] 
sysusers: add helper to create new Item

2 years agobuild(deps): bump systemd/mkosi
dependabot[bot] [Wed, 1 Feb 2023 09:01:53 +0000 (09:01 +0000)] 
build(deps): bump systemd/mkosi

Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from f36983f552a197faf9e36361cc68a297e68bee73 to 500f93a36cc3d5bf1d06848a0a8870bf1424625f.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/f36983f552a197faf9e36361cc68a297e68bee73...500f93a36cc3d5bf1d06848a0a8870bf1424625f)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump actions/github-script from 6.3.3 to 6.4.0
dependabot[bot] [Wed, 1 Feb 2023 09:01:43 +0000 (09:01 +0000)] 
build(deps): bump actions/github-script from 6.3.3 to 6.4.0

Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/d556feaca394842dc55e4734bf3bb9f685482fa0...98814c53be79b1d30f795b907e553d8679345975)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump redhat-plumbers-in-action/advanced-issue-labeler
dependabot[bot] [Wed, 1 Feb 2023 09:01:40 +0000 (09:01 +0000)] 
build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler

Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 2.0.1 to 2.0.4.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/compare/88209aef583c66312529c515d41ea6a710a4baba...25a1e41826424cdf577c71b58c852df4347f13b8)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #26236 from medhefgo/meson-fixes
Zbigniew Jędrzejewski-Szmek [Wed, 1 Feb 2023 09:05:36 +0000 (10:05 +0100)] 
Merge pull request #26236 from medhefgo/meson-fixes

meson: Fixes

2 years agojournald: some minor modernizations
Lennart Poettering [Tue, 31 Jan 2023 15:21:54 +0000 (16:21 +0100)] 
journald: some minor modernizations

2 years agojournal: generate a clean message when we try to write to a journal file from a diffe...
Lennart Poettering [Tue, 31 Jan 2023 12:40:23 +0000 (13:40 +0100)] 
journal: generate a clean message when we try to write to a journal file from a different host