1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
Commit Graph

62521 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
f41e4b82a4 shared/json: avoid use of fake flex array 2023-02-06 12:09:55 +01:00
Zbigniew Jędrzejewski-Szmek
da8587b24e 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.
2023-02-06 12:04:16 +01:00
Zbigniew Jędrzejewski-Szmek
03f5e501b6 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.
2023-02-06 10:24:57 +01:00
Zbigniew Jędrzejewski-Szmek
375ffdba43 repart: fix invalid errno in log 2023-02-06 10:24:56 +01:00
Zbigniew Jędrzejewski-Szmek
c8b960af14 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.
2023-02-06 10:19:52 +01:00
Zbigniew Jędrzejewski-Szmek
d42add3c17 sd-network: stop using fake flexible array 2023-02-06 10:19:52 +01:00
Zbigniew Jędrzejewski-Szmek
99d4dfd184 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.
2023-02-06 10:19:08 +01:00
Zbigniew Jędrzejewski-Szmek
1e8f5f79e1 docs/CODING_STYLE: add sentence about redirection operators 2023-02-06 09:19:04 +01:00
Zbigniew Jędrzejewski-Szmek
397c27097b tools: replace multi-line echo by <<EOF 2023-02-06 09:19:04 +01:00
Zbigniew Jędrzejewski-Szmek
7a17e41dcf 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.
2023-02-06 09:19:04 +01:00
Zbigniew Jędrzejewski-Szmek
ecf4be2952 NEWS: adjust commas, avoid double negative
Also adjust text wrapping in a few spots.
2023-02-06 09:07:42 +01:00
Darrell Kavanagh
6823b5bb99 Add hwdb sensor entry for Lenovo IdeaPad Duet 3 10IGL5 (82AT). 2023-02-06 11:54:33 +09:00
Takashi Sakamoto
e478f8c04c 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/
2023-02-06 11:53:25 +09:00
Jan Macku
4dab1eb952 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/
2023-02-03 14:03:39 +00:00
Simon Brand
45ab6f2a37 man: correct path for systemd-pcrphase 2023-02-03 12:51:57 +09:00
Yu Watanabe
bbcce4f8d7 NEWS: fix typo 2023-02-03 02:07:17 +09:00
Lennart Poettering
f9fdbd54ea update NEWS 2023-02-02 17:44:10 +01:00
Luca Boccassi
12850a7f2e
Merge pull request #26302 from bluca/rc2
Update hwdb for rc2
2023-02-02 16:30:13 +00:00
Luca Boccassi
75438b2a13 NEWS: fix typo 2023-02-02 14:51:02 +00:00
Lennart Poettering
1ee3720e76 NEWS: various fixes 2023-02-02 15:45:09 +01:00
Luca Boccassi
25952542b7 NEWS: update date 2023-02-02 14:20:53 +00:00
Luca Boccassi
aff998ae5e NEWS: update contributors list 2023-02-02 14:20:53 +00:00
Luca Boccassi
93f9b9cc6d hwdb: update autosuspend db 2023-02-02 14:20:53 +00:00
Luca Boccassi
48fce8bc10 hwdb: update 2023-02-02 14:20:53 +00:00
Luca Boccassi
b67ea78f23 NEWS: update for v253-rc2 2023-02-02 12:25:18 +00:00
Yu Watanabe
4a20ad15e0 NEWS: fix typo 2023-02-02 20:00:37 +09:00
Zbigniew Jędrzejewski-Szmek
b7a8a33a03
Merge pull request #26292 from yuwata/locale-fix-enoent-handling
locale: fix ENOENT handling for vconsole.conf or xorg.conf
2023-02-02 11:01:56 +01:00
Yu Watanabe
ff6db56a01 test-time-util: skip test for TIMESTAMP_DATE if the timestamp is too old
Follow-up for 64f3419ec1.

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.
2023-02-02 10:59:59 +01:00
Yu Watanabe
cf74e2e16f udev: make get_virtfn_info() provide physical PCI device
Fixes a bug introduced by 78463c6c4f.

Fixes #25545.
2023-02-01 23:41:48 +00:00
Luca Boccassi
5b5aaf9a91
Merge pull request #26180 from ddstreet/tpm2_cleanup
Add struct tpm2_handle and use _cleanup_ instead of goto
2023-02-01 23:40:52 +00:00
Luca Boccassi
9a101c5d4c
Merge pull request #26269 from keszybz/sysusers-empty-etc-and-improved-messages
sysusers: improve messages and autocreate /etc
2023-02-01 23:14:59 +00:00
Luca Boccassi
8310229a04 man: add page for systemd-ac-power
It is now a supported executable, so add manpage.

Fixes https://github.com/systemd/systemd/issues/26289
2023-02-01 21:56:28 +00:00
Luca Boccassi
e5cf396181
Merge pull request #26287 from medhefgo/mkosi-auto-enroll
ci: Test with secure boot enabled under mkosi
2023-02-01 21:51:04 +00:00
Frantisek Sumsal
cc3826155d
Merge pull request #26285 from yuwata/test-lvextend
test: add a testcase for lvextend
2023-02-01 20:59:04 +00:00
wouter bolsterlee
3d3e51eff2 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
2023-02-01 20:47:56 +00:00
Yu Watanabe
c4abc55890 locale: drop context_clear_x11()
It is used at only place, and mostly trivial.
No functional change, just refactoring.
2023-02-02 03:59:21 +09:00
Yu Watanabe
181ba13b23 locale: fix ENOENT handling for vconsole.conf or xorg.conf 2023-02-02 03:59:21 +09:00
Dan Streetman
16e16b8c7b 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.
2023-02-01 12:52:08 -05:00
Dan Streetman
23e9ccc24a tpm2: use Tpm2Context* instead of ESYS_CONTEXT*
This is needed for later patches that use Tpm2Handle, which requires access
to the Tpm2Context.
2023-02-01 12:51:17 -05:00
Dan Streetman
68d084cee5 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.
2023-02-01 12:51:17 -05:00
Dan Streetman
bd860983a6 tpm2: rename struct tpm2_context to Tpm2Context
This aligns with systemd coding guidelines for struct naming
2023-02-01 12:51:17 -05:00
Dan Streetman
7bfe0a48d9 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.
2023-02-01 18:13:48 +01:00
Zbigniew Jędrzejewski-Szmek
92fc007902
Merge pull request #26219 from yuwata/localed-follow-ups
locale: check conversion before polkit
2023-02-01 17:18:35 +01:00
Jan Janssen
2de6cc18f9 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.
2023-02-01 17:16:03 +01:00
Zbigniew Jędrzejewski-Szmek
70c0d11f41
Merge pull request #26286 from keszybz/two-doc-updates
Two doc updates
2023-02-01 17:03:46 +01:00
Jan Janssen
c2aed1d16c git: Ignore mkosi secure boot keys 2023-02-01 16:52:28 +01:00
Jan Janssen
1e8e7f4463 boot: Add if-safe mode for secure boot enrollment 2023-02-01 16:52:28 +01:00
Jan Janssen
6ba14371c7 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.
2023-02-01 16:52:28 +01:00
Yu Watanabe
d60e348261 test: add a testcase for lvextend
For RHBZ#2158628 (https://bugzilla.redhat.com/show_bug.cgi?id=2158628)
2023-02-02 00:40:57 +09:00
Zbigniew Jędrzejewski-Szmek
2bd88a2944 man: strengthen language about generator output
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2165433.
2023-02-01 15:34:38 +01:00