]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
22 months agomkosi: Changes to allow booting with sanitizers in mkosi
Daan De Meyer [Fri, 15 Jul 2022 00:26:52 +0000 (02:26 +0200)] 
mkosi: Changes to allow booting with sanitizers in mkosi

- Extra memory because ASAN needs it
- The environment variables to make the sanitizers more useful
- LD_PRELOAD because the ASAN DSO needs to be the first in the list
- The sanitizer library packages
- Disable syscall filters because they interfere with ASAN
- Disable systemd-hwdb-update because it's super slow when systemd-hwdb
  is built with sanitizers
- Take the value for meson's b_sanitize option from the SANITIZERS
  environment variable

22 months agomkosi: Update Ubuntu config to 22.04
Daan De Meyer [Sun, 17 Jul 2022 21:52:23 +0000 (23:52 +0200)] 
mkosi: Update Ubuntu config to 22.04

22 months agomkosi: Fix build script indentation
Daan De Meyer [Sat, 16 Jul 2022 08:15:29 +0000 (10:15 +0200)] 
mkosi: Fix build script indentation

22 months agomkosi: Enable meson developer mode
Daan De Meyer [Fri, 15 Jul 2022 12:59:03 +0000 (14:59 +0200)] 
mkosi: Enable meson developer mode

22 months agomkosi: Don't try to install systemd-boot in non-efi images
Daan De Meyer [Fri, 15 Jul 2022 00:33:07 +0000 (02:33 +0200)] 
mkosi: Don't try to install systemd-boot in non-efi images

When using mkosi's direct linux boot support, there's no EFI
system partition so don't try to install systemd-boot in that case.

22 months agomkosi: Install xxd in images
Daan De Meyer [Fri, 15 Jul 2022 00:30:01 +0000 (02:30 +0200)] 
mkosi: Install xxd in images

Came in handy while working on
https://github.com/systemd/systemd/pull/24024 so let's install it
in the image by default.

22 months agosystemctl: include upheld units in dependencies
David Tardon [Sat, 16 Jul 2022 11:23:46 +0000 (13:23 +0200)] 
systemctl: include upheld units in dependencies

Fixes: #22706
23 months agoman: fix grammatical error in --cursor-file description
Vito Caputo [Sat, 16 Jul 2022 01:53:43 +0000 (18:53 -0700)] 
man: fix grammatical error in --cursor-file description

Just a minor cleanup to fix unparseable wording

23 months agocore: drop a stray %m specifier from a warning message
Frantisek Sumsal [Fri, 15 Jul 2022 19:19:42 +0000 (21:19 +0200)] 
core: drop a stray %m specifier from a warning message

since in this specific case (r == 0) `errno` is irrelevant and most likely
set to zero, leading up to a confusing message:

```
[  120.595085] H systemd[1]: session-5.scope: No PIDs left to attach to the scope's control group, refusing: Success
[  120.595144] H systemd[1]: session-5.scope: Failed with result 'resources'.
```

23 months agoMerge pull request #24018 from keszybz/generator-cleanups
Yu Watanabe [Fri, 15 Jul 2022 20:11:49 +0000 (05:11 +0900)] 
Merge pull request #24018 from keszybz/generator-cleanups

Make generators easier to test, fix various corner issues

23 months agoMerge pull request #24035 from yuwata/sd-event-cleanup
Yu Watanabe [Fri, 15 Jul 2022 20:11:00 +0000 (05:11 +0900)] 
Merge pull request #24035 from yuwata/sd-event-cleanup

sd-event: tiny cleanups

23 months agocoredump: Try to write journald coredump metadata to the journal
Daan De Meyer [Wed, 13 Jul 2022 12:46:33 +0000 (14:46 +0200)] 
coredump: Try to write journald coredump metadata to the journal

Currently, if journald coredumps, the coredump is written to
/var/lib/systemd/coredump but the coredump metadata is not written
to  the journal meaning we can't find out about the coredump's
existence via the journal. This means that coredumpctl can't be
used to work with journald coredumps, as well as any other tools
that rely on journald to know about coredumps.

To solve the issue, let's have systemd-coredump try to write
systemd-journald coredump metadata to the journal. We have to be
careful though, since if journald coredumps, there's no active
reader on the receive end of the journal socket, so we have to make
sure we don't deadlock trying to write to the socket. To avoid the
deadlock, we put the socket in nonblocking mode before trying to
write to it.

23 months agosysusers: allow defining additional sysusers lines via credentials
Lennart Poettering [Wed, 13 Jul 2022 09:06:04 +0000 (11:06 +0200)] 
sysusers: allow defining additional sysusers lines via credentials

23 months agoman: fix typo in systemd.network documentation in IPv6RoutePrefix section (#24030)
lastkrick [Fri, 15 Jul 2022 15:45:56 +0000 (18:45 +0300)] 
man: fix typo in systemd.network documentation in IPv6RoutePrefix section (#24030)

23 months agosd-event: introduce PROTECT_EVENT() macro 24035/head
Yu Watanabe [Fri, 15 Jul 2022 15:42:39 +0000 (00:42 +0900)] 
sd-event: introduce PROTECT_EVENT() macro

23 months agosd-event: drop redundant code
Yu Watanabe [Fri, 15 Jul 2022 15:38:30 +0000 (00:38 +0900)] 
sd-event: drop redundant code

The function `source_io_unregister()` will be anyway called in
`source_disconnect()`.

23 months agofstab-generator: do not skip /sysroot prefix if the mount point is missing 24018/head
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jul 2022 15:33:13 +0000 (17:33 +0200)] 
fstab-generator: do not skip /sysroot prefix if the mount point is missing

When chase_symlinks() is called on something on a doesn't exist, it immediately
returns an error. But we were relying on it to prepend "/sysroot/". If it
fails, we need to do that ourselves.

For example, with /sysroot/etc/fstab containing a line for /foo, if /sysroot/foo
doesn't exist, we'd generate a mount point for /foo.

23 months agofsck,sulogin: fix cargo-culted comment
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jul 2022 14:46:24 +0000 (16:46 +0200)] 
fsck,sulogin: fix cargo-culted comment

23 months agofstab-generator: rename 'post' variable
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jul 2022 14:16:25 +0000 (16:16 +0200)] 
fstab-generator: rename 'post' variable

Originally (6b1dc2bd3cdb3bd932b0692be636ddd2879edb92) we had 'pre' and 'post'
to refer to remote-fs-pre.target and remote-fs.target or local-fs-pre.target
and local-fs.target. But 'pre' is long gone, and 'post' by itself doesn't
make much sense. Rename it for clarity.

23 months agofstab-generator: tweak comments
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jul 2022 12:35:37 +0000 (14:35 +0200)] 
fstab-generator: tweak comments

23 months agofstab-generator: allow overriding path to /sysroot/etc/fstab too
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jul 2022 11:29:06 +0000 (13:29 +0200)] 
fstab-generator: allow overriding path to /sysroot/etc/fstab too

This adds $SYSTEMD_SYSROOT_FSTAB analoguous to $SYSTEMD_FSTAB.

23 months agofstab-generator: properly report the source of data
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jul 2022 10:46:18 +0000 (12:46 +0200)] 
fstab-generator: properly report the source of data

Mount information can come from /etc/fstab, /sysroot/etc/fstab, and
/proc/cmdline. Even when we had the path to the right source handy, we would
often write something inaccurate. In particular, in the initrd, we would
generally write "/etc/fstab" instead of "/sysroot/etc/fstab" for no good
reason.

23 months agofstab-generator: use path_equal() to detect alternate spellings of /usr
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:58:15 +0000 (18:58 +0200)] 
fstab-generator: use path_equal() to detect alternate spellings of /usr

In the initrd we would treat e.g. "/usr/" as different from "/usr", which
doesn't seem right.

23 months agogenerators: only redirect logging when invoked by systemd
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:43:05 +0000 (18:43 +0200)] 
generators: only redirect logging when invoked by systemd

We would always print output to the kmsg or journal, but that is only needed
and useful when invoked by systemd. So let's skip redirection unless we are
invoked by systemd. Otherwise, let's log normally. This makes test invocations
easier, and also helps when the generator is invoked by mistake. If redirection
is necessary, the generator can be invoked with SYSTEMD_LOG_TARGET=… even
during tests.

23 months agobasic/log: split out invoked_by_systemd() utility function
Zbigniew Jędrzejewski-Szmek [Fri, 15 Jul 2022 09:38:01 +0000 (11:38 +0200)] 
basic/log: split out invoked_by_systemd() utility function

23 months agocore: drop ambient capabilities in user manager
Łukasz Stelmach [Tue, 12 Jul 2022 11:57:32 +0000 (13:57 +0200)] 
core: drop ambient capabilities in user manager

Ambient capabilities should not be passed implicitly to user
services. Dropping them does not affect the permitted and effective sets
which are important for the manager itself to operate.

23 months agoimport: fix format strings
Lennart Poettering [Fri, 15 Jul 2022 13:24:24 +0000 (15:24 +0200)] 
import: fix format strings

23 months agoMerge pull request #24011 from poettering/condition-cred
Lennart Poettering [Fri, 15 Jul 2022 13:03:49 +0000 (15:03 +0200)] 
Merge pull request #24011 from poettering/condition-cred

pid1: add new condition type "ConditionCredential=" for checking for credentials passed into the system

23 months agocgroups-agent: connect stdin/stdout/stderr to /dev/null
Lennart Poettering [Fri, 15 Jul 2022 09:02:40 +0000 (11:02 +0200)] 
cgroups-agent: connect stdin/stdout/stderr to /dev/null

Inspired by https://github.com/systemd/systemd/pull/24024 this is
another user mode helper, where this might be an issue. hence let's
rather be safe than sorry, and also connect stdin/stdout/stderr
explicitly with /dev/null.

23 months agoMerge pull request #24010 from poettering/tmpfiles-base64-data
Lennart Poettering [Fri, 15 Jul 2022 12:50:56 +0000 (14:50 +0200)] 
Merge pull request #24010 from poettering/tmpfiles-base64-data

tmpfiles: optionally allow configuring file contents for f/w lines to be encoded in base64

23 months agogenerators: accept one or three args, do not write to /tmp
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:19:04 +0000 (18:19 +0200)] 
generators: accept one or three args, do not write to /tmp

Since the general generator logic was established in the rewrite in
07719a21b6425d378b36bb8d7f47ad5ec5296d28, generators would always write to /tmp
by default. I think this not a good default at all, because generators write a
bunch of files and would create a mess in /tmp. And for debugging, one
generally needs to remove all the files in the output directory, because
generators will complain in the output paths are already present. Thus the
approach of disabling console logging and writing many files to /tmp when
invoked with no arguments is not nice, so let's disallow operation with no
args.

But when debugging, one generally does not care about the separate output dirs
(most generators use only one). Thus the general pattern I use is something
like:
  rm -rf /tmp/x && mkdir /tmp/x && build/some-generator /tmp/{x,x,x}
This commit allows only one directory to be specified and simplifies this to:
  rm -rf /tmp/x && mkdir /tmp/x && build/some-generator /tmp/x

23 months agobless-boot-generator: use DEFINE_MAIN_GENERATOR_FUNCTION()
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:35:42 +0000 (18:35 +0200)] 
bless-boot-generator: use DEFINE_MAIN_GENERATOR_FUNCTION()

DEFINE_MAIN_GENERATOR_FUNCTION() always sets dest*, so there should be no
change in behaviour.

23 months agohibernate-resume-generator: use DEFINE_MAIN_GENERATOR_FUNCTION()
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:29:36 +0000 (18:29 +0200)] 
hibernate-resume-generator: use DEFINE_MAIN_GENERATOR_FUNCTION()

DEFINE_MAIN_GENERATOR_FUNCTION() always sets dest*, so there should be no
change in behaviour.

23 months agotmpfiles: minor shortening of code 24010/head
Lennart Poettering [Tue, 12 Jul 2022 21:53:11 +0000 (23:53 +0200)] 
tmpfiles: minor shortening of code

23 months agotmpfiles: optionally, decode string to write to files with base64
Lennart Poettering [Tue, 12 Jul 2022 21:51:15 +0000 (23:51 +0200)] 
tmpfiles: optionally, decode string to write to files with base64

This is useful to use "f" or "w" to write arbitrary binary files to
disk, or files with newlines and similar (for example to provision SSH
host keys and similar).

23 months agoupdate TODO
Lennart Poettering [Fri, 15 Jul 2022 09:46:01 +0000 (11:46 +0200)] 
update TODO

23 months agocoredump: Connect stdout/stderr to /dev/null before doing anything
Daan De Meyer [Thu, 14 Jul 2022 23:49:25 +0000 (01:49 +0200)] 
coredump: Connect stdout/stderr to /dev/null before doing anything

When invoked as the coredump handler by the kernel, systemd-coredump's
stdout and stderr streams are closed. This is dangerous as this means
the fd's can get reallocated, leading to hard to debug errors such as
log messages ending up being appended to a compressed coredump file.

To avoid such issues in the future, let's bind stdout/stderr to
/dev/null so the file descriptors can't get used for anything else.

23 months agoman: fix copy/paste typo 24011/head
Lennart Poettering [Fri, 15 Jul 2022 08:53:23 +0000 (10:53 +0200)] 
man: fix copy/paste typo

23 months agofuzz: add ConditionCredential= to fuzz files, and sort their sections
Lennart Poettering [Thu, 14 Jul 2022 08:41:15 +0000 (10:41 +0200)] 
fuzz: add ConditionCredential= to fuzz files, and sort their sections

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 08:34:54 +0000 (10:34 +0200)] 
update TODO

23 months agopid1: add mechanism for conditionalizing units/network/netdev/link based on credentia...
Lennart Poettering [Wed, 13 Jul 2022 08:38:53 +0000 (10:38 +0200)] 
pid1: add mechanism for conditionalizing units/network/netdev/link based on credentials passed in

This is useful when provisioning systems via nspawn/qemu and running
specific services only if specific data is passed into the system.

23 months agoMerge pull request #24005 from poettering/smbios-creds
Lennart Poettering [Fri, 15 Jul 2022 06:50:28 +0000 (08:50 +0200)] 
Merge pull request #24005 from poettering/smbios-creds

pid1: import credentials also from SMBIOS data

23 months agoupdate TODO 24005/head
Lennart Poettering [Thu, 14 Jul 2022 07:49:49 +0000 (09:49 +0200)] 
update TODO

23 months agopid1: import creds from SMBIOS too, not just qemu's fw_cfg
Lennart Poettering [Wed, 13 Jul 2022 16:26:44 +0000 (18:26 +0200)] 
pid1: import creds from SMBIOS too, not just qemu's fw_cfg

This imports credentials also via SMBIOS' "OEM vendor string" section,
similar to the existing import logic from fw_cfg.

Functionality-wise this is very similar to the existing fw_cfg logic,
both of which are easily settable on the qemu command line.

Pros and cons of each:

SMBIOS OEM vendor strings:
   - pro: fast, because memory mapped
   - pro: somewhat VMM independent, at least in theory
   - pro: qemu upstream sees this as the future
   - pro: no additional kernel module needed
   - con: strings only, thus binary data is base64 encoded

fw_cfg:
   - pro: has been supported for longer in qemu
   - pro: supports binary data
   - con: slow, because IO port based
   - con: only qemu
   - con: requires qemu_fw_cfg.ko kernel module
   - con: qemu upstream sees this as legacy

23 months agoMerge pull request #24021 from poettering/man-rlimit-comments
Yu Watanabe [Thu, 14 Jul 2022 23:28:53 +0000 (08:28 +0900)] 
Merge pull request #24021 from poettering/man-rlimit-comments

man: elaborate on the usefulness (and not-so-usefulness) of various process resource limits

23 months agoAdd systemd-hwdb to bug/RFE templates
Daan De Meyer [Thu, 14 Jul 2022 22:29:25 +0000 (00:29 +0200)] 
Add systemd-hwdb to bug/RFE templates

23 months agoMerge pull request #24019 from yuwata/network-ipv4ll
Yu Watanabe [Thu, 14 Jul 2022 22:59:13 +0000 (07:59 +0900)] 
Merge pull request #24019 from yuwata/network-ipv4ll

network: refuse 169.254.0.0/24 and 169.254.255.0/24

23 months agoudev: add flag to allow disabling blkid probing
Darsey Litzenberger [Mon, 11 Jul 2022 04:47:45 +0000 (21:47 -0700)] 
udev: add flag to allow disabling blkid probing

This can be useful for users of slow block devices.

For example, the persistent-storage rules are needed for USB floppy
drives be recognized by udisks2, but the extra blkid calls cause
thrashing for 25+ seconds after every disk change.

With this change, a user wishing to avoid the extra blkid invocation(s)
could create /etc/udev/rules.d/55-floppy-noprobe.rules as follows:

    # Don't probe PC floppy drives
    SUBSYSTEM=="block", KERNEL=="fd*", \
        ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"

    # Don't probe USB floppy drives
    SUBSYSTEM=="block", SUBSYSTEMS=="usb", \
        ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", \
        ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"

I didn't exclude floppies by default in this change, because floppy
devices are also emulated by some BIOSes/hypervisors in some cases, and
I don't know how many systems would fail to boot if /dev/disk/by-uuid/*
became unavailable for 'floppy disks' on those systems.

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 22:15:59 +0000 (00:15 +0200)] 
update TODO

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 22:02:22 +0000 (00:02 +0200)] 
update TODO

23 months agoupdate TODO 24021/head
Lennart Poettering [Thu, 14 Jul 2022 21:58:51 +0000 (23:58 +0200)] 
update TODO

23 months agoman: explain why various resource limits don't make sense and should not be used.
Lennart Poettering [Thu, 14 Jul 2022 16:50:52 +0000 (18:50 +0200)] 
man: explain why various resource limits don't make sense and should not be used.

23 months agoMerge pull request #24016 from poettering/sysctl-cred-extra
Yu Watanabe [Thu, 14 Jul 2022 19:20:35 +0000 (04:20 +0900)] 
Merge pull request #24016 from poettering/sysctl-cred-extra

sysctl: also process sysctl requests via the "sysctl.extra" credential

23 months agosmack: fix build failure with -Dsmack=false
asavah [Thu, 14 Jul 2022 16:33:42 +0000 (19:33 +0300)] 
smack: fix build failure with -Dsmack=false

23 months agotest-network: add a test case for IPv4LLStartAddress= 24019/head
Yu Watanabe [Thu, 14 Jul 2022 19:01:56 +0000 (04:01 +0900)] 
test-network: add a test case for IPv4LLStartAddress=

23 months agonetwork: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress=
Yu Watanabe [Thu, 14 Jul 2022 18:36:30 +0000 (03:36 +0900)] 
network: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress=

Follow-up for #23927.

23 months agoMerge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-address
Yu Watanabe [Thu, 14 Jul 2022 18:21:26 +0000 (03:21 +0900)] 
Merge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-address

network: Feature IPv4 link-local start address

23 months agoMerge pull request #23999 from msekletar/revert-background-session-no-user-instance
Yu Watanabe [Thu, 14 Jul 2022 18:18:08 +0000 (03:18 +0900)] 
Merge pull request #23999 from msekletar/revert-background-session-no-user-instance

Revert of recent changes in handling of background sessions

23 months agoenvironment-d-generator: use DEFINE_MAIN_FUNCTION()
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:07:24 +0000 (18:07 +0200)] 
environment-d-generator: use DEFINE_MAIN_FUNCTION()

23 months agoman: fix formatting of "BARRIER=1"
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 13:02:39 +0000 (15:02 +0200)] 
man: fix formatting of "BARRIER=1"

Whitespace inside of the <varname> field was propagated to the displayed form,
causing strange indentation.

23 months agocore: wrap long comments and capitalize sentences
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 12:49:42 +0000 (14:49 +0200)] 
core: wrap long comments and capitalize sentences

23 months agobase-filesystem: pick more conservative access mode for /root/
Lennart Poettering [Wed, 13 Jul 2022 21:47:31 +0000 (23:47 +0200)] 
base-filesystem: pick more conservative access mode for /root/

Let's not allow anyone to look into /root/ if we create it via the
base-filesystem logic. i.e. change 0755 → 0750 as default access mode
for /root/, in case we create it if it happens to be missing.

23 months agoMerge pull request #24008 from poettering/tmpfiles-is-dir-fix
Lennart Poettering [Thu, 14 Jul 2022 16:16:07 +0000 (18:16 +0200)] 
Merge pull request #24008 from poettering/tmpfiles-is-dir-fix

tmpfiles: fix wrong is_dir_fd() call

23 months agogrowfs: Expand FS even if underlying block expansion fails
undef [Thu, 14 Jul 2022 09:03:28 +0000 (09:03 +0000)] 
growfs: Expand FS even if underlying block expansion fails

This allows growfs to expand the filesystem even when the underlying
block device cannot be expanded. This has been useful for example on
LUKS devices that have already been expanded using systemd-repart.

This works around the following error:
```
root@mobian:/home/mobian# /usr/lib/systemd/systemd-growfs /
crypt_resize() of /dev/block/179:2 failed: Operation not permitted
```

23 months agoMerge pull request #24015 from poettering/growfs-fd-tweaks
Lennart Poettering [Thu, 14 Jul 2022 16:09:18 +0000 (18:09 +0200)] 
Merge pull request #24015 from poettering/growfs-fd-tweaks

growfs fd handling tweaks

23 months agoman: drop misplaced ',' 24016/head
Lennart Poettering [Thu, 14 Jul 2022 16:04:01 +0000 (18:04 +0200)] 
man: drop misplaced ','

23 months agosysctl: also process sysctl requests via the "sysctl.extra" credential
Lennart Poettering [Thu, 14 Jul 2022 11:41:37 +0000 (13:41 +0200)] 
sysctl: also process sysctl requests via the "sysctl.extra" credential

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 14:14:11 +0000 (16:14 +0200)] 
update TODO

23 months agokernel-install: add helper for logging
Zbigniew Jędrzejewski-Szmek [Wed, 6 Jul 2022 14:50:24 +0000 (16:50 +0200)] 
kernel-install: add helper for logging

23 months agoimport-ceds: use the right error variables at four places
Lennart Poettering [Wed, 13 Jul 2022 16:02:36 +0000 (18:02 +0200)] 
import-ceds: use the right error variables at four places

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 12:45:56 +0000 (14:45 +0200)] 
update TODO

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 12:41:43 +0000 (14:41 +0200)] 
update TODO

23 months agoman/network: ServerAddress= drop "literal" from IP address ranges 23927/head
Andre Kalb [Wed, 13 Jul 2022 21:56:50 +0000 (23:56 +0200)] 
man/network: ServerAddress= drop "literal" from IP address ranges

23 months agosd-ipv4ll/networkd: Try to select an IPv4 link-local start address
Andre Kalb [Thu, 30 Jun 2022 08:27:27 +0000 (10:27 +0200)] 
sd-ipv4ll/networkd: Try to select an IPv4 link-local start address

23 months agogrowfs: don't actually resize on dry-run
undef [Thu, 14 Jul 2022 05:53:15 +0000 (05:53 +0000)] 
growfs: don't actually resize on dry-run

This causes systemd-growfs to exit before resizing the partition when
`--dry-run` is passed. Resizing during a dry run of a change breaks the
users expectations.

23 months agoupdate TODO
Lennart Poettering [Thu, 14 Jul 2022 12:04:36 +0000 (14:04 +0200)] 
update TODO

23 months agoMerge pull request #24002 from yuwata/network-hw-addr
Luca Boccassi [Thu, 14 Jul 2022 10:22:55 +0000 (11:22 +0100)] 
Merge pull request #24002 from yuwata/network-hw-addr

network: fix hardware address handling

23 months agogrowfs: don't reopen fds unnecessarily 24015/head
Lennart Poettering [Thu, 14 Jul 2022 09:34:18 +0000 (11:34 +0200)] 
growfs: don't reopen fds unnecessarily

Instead, just open the mount fd once, and then operate on fds only.

23 months agogrowfs: ensure that we operate on a block device before issuing a block ioctl
Lennart Poettering [Thu, 14 Jul 2022 09:31:50 +0000 (11:31 +0200)] 
growfs: ensure that we operate on a block device before issuing a block ioctl

Similar to the previous commit: let's add extra safety so that we don't
issue ioctls on the wrong type of inode.

23 months agogrowfs: insist we open a directory when opening fs mount point
Lennart Poettering [Thu, 14 Jul 2022 09:30:27 +0000 (11:30 +0200)] 
growfs: insist we open a directory when opening fs mount point

This is a simple safety check, since we shouldn't invoke ioctls on fds
without being reasonably sure they are of the right type since ioctls
are overloaded, and we might be tricked hence to execute an operation on
an fd which means something different than what we expect.

23 months agoRevert "logind: don't start user@UID.service instance for background sessions" 23999/head
Michal Sekletar [Wed, 13 Jul 2022 14:54:10 +0000 (16:54 +0200)] 
Revert "logind: don't start user@UID.service instance for background sessions"

This reverts commit e73bf3425c0b5a6339388a3a459ce2bac497308b.

23 months agoRevert "tests: add test for handling of background sessions"
Michal Sekletar [Wed, 13 Jul 2022 14:45:54 +0000 (16:45 +0200)] 
Revert "tests: add test for handling of background sessions"

This reverts commit bf40417c7cbe0afb185eda97ea46395b1bb74bdf.

23 months agoRevert "NEWS: mention change in default behavior of background sessions"
Michal Sekletar [Wed, 13 Jul 2022 14:37:23 +0000 (16:37 +0200)] 
Revert "NEWS: mention change in default behavior of background sessions"

This reverts commit 1611606fd91648f78137e823d5cc3ac68767e4a2.

23 months agoupdate TODO
Lennart Poettering [Tue, 12 Jul 2022 21:52:47 +0000 (23:52 +0200)] 
update TODO

23 months agotmpfiles: check the directory we were supposed to create, not its parent 24008/head
Lennart Poettering [Wed, 13 Jul 2022 21:44:45 +0000 (23:44 +0200)] 
tmpfiles: check the directory we were supposed to create, not its parent

This current code checks the wrong directory. This was broken in
4c39d899ff00e90b7290e4985696f321d7f2726f which converted the previous
code incorrectly.

23 months agostat-util: replace is_dir() + is_dir_fd() by single is_dir_full() call
Lennart Poettering [Wed, 13 Jul 2022 21:43:36 +0000 (23:43 +0200)] 
stat-util: replace is_dir() + is_dir_fd() by single is_dir_full() call

This new call can execute both of the old operations, but also do
generic fstatat() like behaviour.

23 months agosd-bus: do not pass NULL when received message with invalid type
Yu Watanabe [Thu, 14 Jul 2022 01:53:54 +0000 (10:53 +0900)] 
sd-bus: do not pass NULL when received message with invalid type

Fixes #24003.

23 months agosd-dhcp6-client: fix off-by-one error in parsing dhcp6 options 24002/head
Yu Watanabe [Thu, 14 Jul 2022 00:23:09 +0000 (09:23 +0900)] 
sd-dhcp6-client: fix off-by-one error in parsing dhcp6 options

This fixes error in parsing message when the rapid commit option is
located at the end of the message.

Fixes an issure reported in #24002.

23 months agosd-dhcp6-client: allow NULL option value when length is zero
Yu Watanabe [Thu, 14 Jul 2022 01:13:00 +0000 (10:13 +0900)] 
sd-dhcp6-client: allow NULL option value when length is zero

23 months agosd-dhcp6-client: add more debugging logs on parsing message
Yu Watanabe [Wed, 13 Jul 2022 23:37:53 +0000 (08:37 +0900)] 
sd-dhcp6-client: add more debugging logs on parsing message

23 months agoMerge pull request #23882 from dtardon/logind-set-display-test
Yu Watanabe [Wed, 13 Jul 2022 22:35:23 +0000 (07:35 +0900)] 
Merge pull request #23882 from dtardon/logind-set-display-test

Add tests for org.freedesktop.login1.Session SetType and SetDisplay

23 months agonetwork: Add support to select an IPv4 link-local start address
Andre Kalb [Thu, 30 Jun 2022 08:01:34 +0000 (10:01 +0200)] 
network: Add support to select an IPv4 link-local start address

23 months agonetwork: do not set invalid MAC address for non-ethernet interface
Yu Watanabe [Wed, 13 Jul 2022 20:23:01 +0000 (05:23 +0900)] 
network: do not set invalid MAC address for non-ethernet interface

23 months agonetwork: NDisc does not require MAC address
Yu Watanabe [Wed, 13 Jul 2022 21:50:15 +0000 (06:50 +0900)] 
network: NDisc does not require MAC address

This effectively revert ba4c7184b320bb8698d470530d46a6c94641cc6e.

Fixes #23546.

23 months agonetwork: dhcp4: disable DHCPv4 client on interfaces with non-supported types
Yu Watanabe [Wed, 13 Jul 2022 20:05:32 +0000 (05:05 +0900)] 
network: dhcp4: disable DHCPv4 client on interfaces with non-supported types

Replaces f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.

23 months agoRevert "network: configure DHCP clients after MAC address is assigned"
Yu Watanabe [Wed, 13 Jul 2022 19:56:07 +0000 (04:56 +0900)] 
Revert "network: configure DHCP clients after MAC address is assigned"

This reverts commit f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.

DHCPv6 client does not require MAC address.
DHCPv4 client will be handled in a different way in a later commit.

Partially fixes #23546.

23 months agoDo not fail EFI build with newer binutils
Michael Biebl [Wed, 22 Jun 2022 11:11:13 +0000 (13:11 +0200)] 
Do not fail EFI build with newer binutils

Newer binutils versions currently trigger the following warnings due to
a bug in gnu-efi

on arm64:
/usr/bin/ld.bfd: warning: src/boot/efi/systemd-bootaa64.elf has a LOAD segment with RWX permissions

on amd64:
/usr/bin/ld.bfd: warning: /usr/lib/crt0-efi-x86_64.o: missing .note.GNU-stack section implies executable stack

This results in a build failure due to --fatal-warnings.
Work around this issue by suppressing those warnings until gnu-efi has
been fixed.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013341

23 months agoman: lift pam_systemd_homed description to Summary
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 08:19:19 +0000 (10:19 +0200)] 
man: lift pam_systemd_homed description to Summary

Also change the title to describe the module more comprehensively.
Follow-up for 90bc309aa2c1430941f4c50f73e681ab3e488bd3. Suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=2085485#c5.

23 months agotest: add test for org.freedesktop.login1.Session SetDisplay 23882/head
David Tardon [Fri, 1 Jul 2022 14:43:34 +0000 (16:43 +0200)] 
test: add test for org.freedesktop.login1.Session SetDisplay

23 months agotest: add test for org.freedesktop.login1.Session SetType
David Tardon [Mon, 27 Jun 2022 06:37:22 +0000 (08:37 +0200)] 
test: add test for org.freedesktop.login1.Session SetType