]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoman/doc: document auto resize modes 21443/head
Lennart Poettering [Fri, 19 Nov 2021 09:55:57 +0000 (10:55 +0100)] 
man/doc: document auto resize modes

3 years agohomework: upload home password into kernel keyring if needed
Lennart Poettering [Tue, 2 Nov 2021 17:24:02 +0000 (18:24 +0100)] 
homework: upload home password into kernel keyring if needed

If we do automatic disk space rebalancing, we must be able to unlock the
encrypted volume for that in the background, thus we need to decryption
key around in userspace. Let's do this via the kernel keyring. This
allows us to do this in a relatively secure way, so that it sticks
around between homework invocations, but still is destroyed
automatically when homed goes down.

3 years agohomework: add auto-shrink/auto-grow
Lennart Poettering [Fri, 29 Oct 2021 08:15:00 +0000 (10:15 +0200)] 
homework: add auto-shrink/auto-grow

3 years agohomectl: expose new autoResizeMode JSON user record property
Lennart Poettering [Thu, 4 Nov 2021 17:05:49 +0000 (18:05 +0100)] 
homectl: expose new autoResizeMode JSON user record property

3 years agouser-record: add auto-resize property
Lennart Poettering [Fri, 29 Oct 2021 07:45:17 +0000 (09:45 +0200)] 
user-record: add auto-resize property

3 years agoMerge pull request #21470 from poettering/resolved-250-fixes
Lennart Poettering [Tue, 23 Nov 2021 07:01:50 +0000 (08:01 +0100)] 
Merge pull request #21470 from poettering/resolved-250-fixes

various smaller additions/fixes for resolved

3 years agoman: fix type in sd_bus_error_add_map() prototype
Lennart Poettering [Mon, 22 Nov 2021 21:05:57 +0000 (22:05 +0100)] 
man: fix type in sd_bus_error_add_map() prototype

Fixes: #21467
3 years agoresolved: lower connection timeout for DoT connections in opportunistic mode 21470/head
Lennart Poettering [Mon, 22 Nov 2021 17:32:57 +0000 (18:32 +0100)] 
resolved: lower connection timeout for DoT connections in opportunistic mode

Fixes: #20801
3 years agoresolved: clean up manager_write_resolv_conf() a bit
Lennart Poettering [Mon, 22 Nov 2021 17:29:17 +0000 (18:29 +0100)] 
resolved: clean up manager_write_resolv_conf() a bit

Let's downgrade log messages which are not fatal for the service to
LOG_WARNING.

And let's simplify clean-up by using _cleanup_(unlink_and_freep).

3 years agoresolved: make sure we don't hit an assert when dealing with incomplete DNSSD service...
Lennart Poettering [Mon, 22 Nov 2021 15:14:07 +0000 (16:14 +0100)] 
resolved: make sure we don't hit an assert when dealing with incomplete DNSSD service definitions

Fixes: #21142
3 years agoresolved: properly signal transient errors back to NSS stack
Lennart Poettering [Mon, 22 Nov 2021 14:17:34 +0000 (15:17 +0100)] 
resolved: properly signal transient errors back to NSS stack

NSS mostly knows four error cases: SUCCESS, NOTFOUND, UNAVAIL, TRYAGAIN,
and they can all be used in nsswitch.conf to route requests.

So far nss-resolve would return SUCCESS + NOTFOUND + UNAVAIL. Let's also
return TRYAGAIN in some cases, specifically the ones where we are
currntly unable to resolve a request but likely could later. i.e.
errors caused by networking issues or such.

Fixes: #20786
3 years agoresolved: fix ResolveService() hostname handling
Lennart Poettering [Mon, 22 Nov 2021 13:37:54 +0000 (14:37 +0100)] 
resolved: fix ResolveService() hostname handling

Let's eat up special returns of dns_query_process_cname_many() when
storing hostname resolution results.

The rest of the code assumes only == 0 means success and != 0 means
error, but so far > 0 also could mean success, let's fix that.

Fixes: #21365 #21140
(This was originally broken in 1db8e6d1db0880de240e5598e28d24d708479434)

3 years agonspawn: voidify expose_port_execute() calls
Lennart Poettering [Mon, 22 Nov 2021 13:37:48 +0000 (14:37 +0100)] 
nspawn: voidify expose_port_execute() calls

3 years agoresolved: add "proxy-only" stub on 127.0.0.54
Lennart Poettering [Mon, 22 Nov 2021 11:20:05 +0000 (12:20 +0100)] 
resolved: add "proxy-only" stub on 127.0.0.54

This beefs up the DNS stub logic to listen on two IP addresses:
127.0.0.53 (as before) + 127.0.0.54 (new). When the latter is contact
our stub will operate in "bypass" mode only, i.e we'll try to pass DNS
requests as unmodified upstream as we can (and not do mDNS/LLMNR and
such, also no DNSSEC validation – but we'll still do DNS-over-TLS
wrapping).

This is supposed to be useful for container environments or tethering:
this stub could be exposed (via NAT redirect) to clients of this system
and we'll try to stay out of the way with doing too much DNS magic
ourselves, but still expose whatever the current DNS server is from
upstream under a stable address/port.

How to use this:

  # iptables -t nat -I PREROUTING -p udp -i <interface> --dport 53 -j DNAT --to 127.0.0.54:53
  # echo 1 > /proc/sys/net/ipv4/conf/<interface>/route_localnet

3 years agosocket-util: add helper for generically initializing sockaddr_union from in_addr_union
Lennart Poettering [Mon, 22 Nov 2021 10:29:42 +0000 (11:29 +0100)] 
socket-util: add helper for generically initializing sockaddr_union from in_addr_union

3 years agoresolved: include IP address info in debug output for incoming datagrams
Lennart Poettering [Mon, 22 Nov 2021 10:13:26 +0000 (11:13 +0100)] 
resolved: include IP address info in debug output for incoming datagrams

3 years agoresolved: use RET_NERRNO() where it makes sense
Lennart Poettering [Mon, 22 Nov 2021 10:08:32 +0000 (11:08 +0100)] 
resolved: use RET_NERRNO() where it makes sense

3 years agoRemove own copyright line
Jan Janssen [Mon, 22 Nov 2021 15:08:37 +0000 (16:08 +0100)] 
Remove own copyright line

3 years agoMerge pull request #21357 from mbd98/usr-verity-auto
Luca Boccassi [Mon, 22 Nov 2021 13:09:38 +0000 (13:09 +0000)] 
Merge pull request #21357 from mbd98/usr-verity-auto

veritysetup-generator, fstab-generator: Setup and mount usr verity device when 'usrhash' (and optionally systemd.verity_usr_*) is present as kernel command line parameter

3 years agoFIDO2 device removal instructions (#21426)
Robert-L-Turner [Mon, 22 Nov 2021 11:43:44 +0000 (19:43 +0800)] 
FIDO2 device removal instructions (#21426)

* man: document FIDO2 device removal

Indicate to users how to remove FIDO2 device in the --fido2-device=path section by setting path to an empty string ("").  Tested on systemd 249 (249.6-3-arch)

3 years agoMerge pull request #21452 from vcaputo/mmap-cache-fd
Daan De Meyer [Mon, 22 Nov 2021 09:35:34 +0000 (10:35 +0100)] 
Merge pull request #21452 from vcaputo/mmap-cache-fd

mmap-cache: simplify MMapFileDescriptor-centric function signatures

3 years agoMerge pull request #21425 from keszybz/ppc64-fixes
Lennart Poettering [Mon, 22 Nov 2021 09:10:05 +0000 (10:10 +0100)] 
Merge pull request #21425 from keszybz/ppc64-fixes

Add base-filesystem defines for arm64/ppc64el/riscv64 and make build quiet again

3 years agotest runner: print time before/after tests
Luca Boccassi [Sat, 20 Nov 2021 00:44:13 +0000 (00:44 +0000)] 
test runner: print time before/after tests

When a timeout occurs we actually can't see when the test started/stopped. Print the time.

4 years agoanalyze: fix printing config when there is no main config file
Zbigniew Jędrzejewski-Szmek [Sat, 20 Nov 2021 10:42:31 +0000 (11:42 +0100)] 
analyze: fix printing config when there is no main config file

Since 8b8024f1c231c166f5c450905c8fd91d11704ae7 and the follow-up commits, the
main config file may be located in /usr or in other paths. But the code in
analyze.c was still assuming that it must be in /etc. Things mostly worked for
our own config files because we usually install a comments-only file in /etc,
but was not correct in the general case.

This fixes in particular 'systemd-analyze cat-config systemd/zram-generator.conf'.
In Fedora we distribute a config file in zram-generator-defaults.rpm that is in
/usr/lib, and 'cat-config' would refuse to show it because
/etc/systemd/zram-generator.conf does not exist.

The main config file is optional, but let's print an informative message
because this is a slightly unusual case.

The file paths that we printed were missing the root prefix.

4 years agoMerge pull request #21432 from DaanDeMeyer/journal-trivial-fixes
Luca Boccassi [Sat, 20 Nov 2021 18:00:35 +0000 (18:00 +0000)] 
Merge pull request #21432 from DaanDeMeyer/journal-trivial-fixes

Journal trivial fixes

4 years agoMerge pull request #21431 from DaanDeMeyer/issue-19799
Luca Boccassi [Sat, 20 Nov 2021 17:58:51 +0000 (17:58 +0000)] 
Merge pull request #21431 from DaanDeMeyer/issue-19799

journal: Limit the number of audit fields we add to a message

4 years agonspawn: use FOREACH_STRING() more
Lennart Poettering [Fri, 19 Nov 2021 14:48:01 +0000 (15:48 +0100)] 
nspawn: use FOREACH_STRING() more

4 years agocore: prefix functions to avoid identical static function names
Christian Göttsche [Fri, 19 Nov 2021 16:34:08 +0000 (17:34 +0100)] 
core: prefix functions to avoid identical static function names

The function name `method_reload` is used both in dbus-unit.c and
dbus-manager.c for static functions.
With the previous addition of adding the function name to the audit
information on SELinux denials, rename the one (and its relatives) in
dbus-unit.c as most of the functions in src/core/dbus-unit.c are already
prefixed with `bus_unit_`.

4 years agoselinux: name mac_selinux_generic_access_check as internal function
Christian Göttsche [Wed, 28 Jul 2021 15:00:02 +0000 (17:00 +0200)] 
selinux: name mac_selinux_generic_access_check as internal function

`mac_selinux_generic_access_check()` should not be called directly, only
via the wrapper macros `mac_selinux_access_check` and
`mac_selinux_unit_access_check`.

4 years agoselinux: improve debug log format
Christian Göttsche [Wed, 28 Jul 2021 14:59:57 +0000 (16:59 +0200)] 
selinux: improve debug log format

path might be NULL when checking against the system permissions, so wrap
with strna().

The command line might not be available over D-Bus and thus cl might be
empty. Print "n/a" instead of the empty string.

4 years agoselinux: add function name to audit data
Christian Göttsche [Wed, 28 Jul 2021 14:59:51 +0000 (16:59 +0200)] 
selinux: add function name to audit data

Include the systemd C function name in the audit message to improve the
debug ability on denials.
Similar like kernel denial messages include the syscall name.

4 years agommap-cache: s/mmap_cache/mmap_cache_fd_/ where apropos 21452/head
Vito Caputo [Wed, 17 Nov 2021 04:37:30 +0000 (20:37 -0800)] 
mmap-cache: s/mmap_cache/mmap_cache_fd_/ where apropos

Mostly mechanical renaming of mmap-cache functions that now
operate exclusively on the MMapFileDescriptor.

4 years agommap-cache: simplify API around MMapFileDescriptor
Vito Caputo [Wed, 17 Nov 2021 01:03:15 +0000 (17:03 -0800)] 
mmap-cache: simplify API around MMapFileDescriptor

MMapFileDescriptor carries a reference to its originating
MMapCache, there's no value in supplying the
MMapFileDescriptor-centric functions a separate MMapCache.

A future commit will rename these functions to consistently use
an mmap_cache_fd_* prefix for improved clarity.

4 years agoDocument usr-specific verity parameters 21357/head
Mark Boudreau [Sat, 13 Nov 2021 18:15:17 +0000 (13:15 -0500)] 
Document usr-specific verity parameters

Mention 'usrhash' and 'systemd.verity_usr_*' kernel command line
parameters in the man pages for veritysetup-generator and
kernel-command-line

4 years agofstab-generator: use 'usr' mapper device when 'usrhash' is present
Mark Boudreau [Wed, 10 Nov 2021 01:07:26 +0000 (20:07 -0500)] 
fstab-generator: use 'usr' mapper device when 'usrhash' is present

If 'usrhash' is present as a kernel command line parameter, use the usr
mapper device for usr mount

4 years agoveritysetup-generator: generate service for usr device
Mark Boudreau [Wed, 10 Nov 2021 00:38:29 +0000 (19:38 -0500)] 
veritysetup-generator: generate service for usr device

If 'usrhash' is present as a kernel command line parameter, generate a
veritysetup service for usr.
Also recognize systemd.verity_usr_* parameters.

4 years agojournal: Limit the number of audit fields per log message 21431/head
Daan De Meyer [Thu, 18 Nov 2021 12:37:04 +0000 (12:37 +0000)] 
journal: Limit the number of audit fields per log message

Similar to the kmsg handler, let's also limit the number of fields
we parse from audit messages.

Fixes #19799

4 years agoAdd a trivial guard against using the same uuid twice 21425/head
Zbigniew Jędrzejewski-Szmek [Fri, 19 Nov 2021 16:26:36 +0000 (17:26 +0100)] 
Add a trivial guard against using the same uuid twice

4 years agoshared/base-filesystem: use LIB_ARCH_TUPLE instead of string
Zbigniew Jędrzejewski-Szmek [Fri, 19 Nov 2021 16:02:09 +0000 (17:02 +0100)] 
shared/base-filesystem: use LIB_ARCH_TUPLE instead of string

4 years agoTrivial style fixes
Zbigniew Jędrzejewski-Szmek [Fri, 19 Nov 2021 15:34:17 +0000 (16:34 +0100)] 
Trivial style fixes

4 years agodocs: document the partition UUID used by homed
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 14:16:20 +0000 (15:16 +0100)] 
docs: document the partition UUID used by homed

4 years agoshared/gpt: fix bit-flip in LoongArch root partition UUID
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 14:15:55 +0000 (15:15 +0100)] 
shared/gpt: fix bit-flip in LoongArch root partition UUID

4e767154891083069a58c5c960f386974ad87fb4 added a slightly different UUID
in the header and in the docs. This makes the code match the docs.

> As some downstream projects are already using the UUID as in the docs, most
> notably util-linux [1], we should adjust code to match doc; no shipping
> LoongArch systems are using upstream systemd, and no open-source distro is
> merging LoongArch support yet, so the change should break no one. This also
> matches the work being done by @yetist at loongarch64/systemd#7.

[1] https://github.com/util-linux/util-linux/commit/2d29fccaad267d1b003dc0ed2bb9634ff76f3e49

4 years agodocs: generate table from header using a script
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 14:09:30 +0000 (15:09 +0100)] 
docs: generate table from header using a script

This adds a helper script:
$ python3 tools/list-discoverable-partitions.py <src/shared/gpt.h
<!-- generated with tools/list-discoverable-partitions.py -->
| Partition Type UUID | Name | Allowed File Systems | Explanation |
|---------------------|------|----------------------|-------------|
| _Root Partition (Alpha)_ | `6523f8ae-3eb1-4e2a-a05a-18b695ae656f` | [Root Partition] | [Root Partition more] |
| _Root Partition (ARC)_ | `d27f46ed-2919-4cb8-bd25-9531f3c16534` | ditto | ditto |
...

The output can be pasted into the markdown file. I think this works better than
trying to match the two lists by hand.

4 years agoshared/gpt: ARM_64 → ARM64
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 10:48:17 +0000 (11:48 +0100)] 
shared/gpt: ARM_64 → ARM64

"arm64" is generally written without the underscore.

4 years agoshared/gpt: add entries for a bunch of architectures
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 10:30:15 +0000 (11:30 +0100)] 
shared/gpt: add entries for a bunch of architectures

I don't think we want people to send us pull requests over the next two years.
Let's just make something up ourselves, this is going to have at least as good
results, and will be much quicker.

Note that this only includes architectures for which there's some indication
that they are in active use. In architecture.h there are some more esoteric
ones like ARC_BE. We can add those if there's some actual user demand.

In particular, I included everything on the Debian "List of official ports" [1]
and a few other arches that we have received patches for in recent times.

[1] https://www.debian.org/ports/#portlist-released

4 years agoshared/gpt: add a macro to make the definitions a bit less onerous
Zbigniew Jędrzejewski-Szmek [Fri, 19 Nov 2021 15:06:27 +0000 (16:06 +0100)] 
shared/gpt: add a macro to make the definitions a bit less onerous

4 years agojournal: Add verify_hash_table() 21432/head
Daan De Meyer [Tue, 16 Nov 2021 14:39:18 +0000 (14:39 +0000)] 
journal: Add verify_hash_table()

The existing verify_hash_table() function is renamed to
verify_data_hash_table() since it only verifies the data hash table.

The verify information is also made a little more detailed by splitting
one of the checks in two.

4 years agojournal: Add journal_file_object_to_string()
Daan De Meyer [Fri, 12 Nov 2021 11:17:01 +0000 (11:17 +0000)] 
journal: Add journal_file_object_to_string()

4 years agojournal: Simplify definition of HEADER_INCOMPATIBLE_SUPPORTED
Daan De Meyer [Mon, 15 Nov 2021 11:45:00 +0000 (11:45 +0000)] 
journal: Simplify definition of HEADER_INCOMPATIBLE_SUPPORTED

4 years agojournal: Use more structured initialization
Daan De Meyer [Thu, 11 Nov 2021 15:35:28 +0000 (15:35 +0000)] 
journal: Use more structured initialization

4 years agojournal: Use size_t instead of unsigned for array sizes
Daan De Meyer [Sun, 31 Oct 2021 12:33:40 +0000 (12:33 +0000)] 
journal: Use size_t instead of unsigned for array sizes

4 years agoshared/gpt: reorder arches alphabetically
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 10:00:56 +0000 (11:00 +0100)] 
shared/gpt: reorder arches alphabetically

It's just too annoying to add new ones otherwise.

4 years agoupdate TODO
Lennart Poettering [Fri, 19 Nov 2021 14:39:19 +0000 (15:39 +0100)] 
update TODO

4 years agodoc: rebreak boot loader spec
Lennart Poettering [Fri, 19 Nov 2021 14:39:32 +0000 (15:39 +0100)] 
doc: rebreak boot loader spec

4 years agodocs: switch the first two columns in partition uuid list
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 09:48:30 +0000 (10:48 +0100)] 
docs: switch the first two columns in partition uuid list

Readers are most likely to want to go from a partition id to the uuid,
so puts the uuid second

4 years agoshared/base-filesystem: add define for s390x
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 18:10:18 +0000 (19:10 +0100)] 
shared/base-filesystem: add define for s390x

This is based on the information in #14311 and
https://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-S390X/LSB-Core-S390X.pdf
and https://wiki.debian.org/Multiarch/Tuples.

Fixes #14311.

4 years agoshared/base-filesystem: m68k is 32-bit only
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 09:15:17 +0000 (10:15 +0100)] 
shared/base-filesystem: m68k is 32-bit only

4 years agoshared/base-filesystem: add define for arm
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 08:57:26 +0000 (09:57 +0100)] 
shared/base-filesystem: add define for arm

$ ls -l /lib /lib64
ls: cannot access '/lib64': No such file or directory
lrwxrwxrwx. 1 root root 7 Jan 26  2021 /lib -> usr/lib
$ ldd /bin/sh|grep ld
/lib/ld-linux-armhf.so.3 (0xb6f80000)

4 years agoshared/base-filesystem: add define for riscv64
Zbigniew Jędrzejewski-Szmek [Wed, 17 Nov 2021 14:10:20 +0000 (15:10 +0100)] 
shared/base-filesystem: add define for riscv64

https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the
linker paths. I used the linker path from Fedora.

$ ls -l /lib /lib64
lrwxrwxrwx. 1 root root 7 Aug 13  2020 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Aug 13  2020 /lib64 -> usr/lib64
$ ldd /bin/sh|grep ld
/lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fb8185000)
$ ls -l /lib/ld-linux-riscv64-lp64d.so.1
lrwxrwxrwx 1 root root 19 Aug  4 19:28 /lib/ld-linux-riscv64-lp64d.so.1 -> ../lib64/ld-2.32.so

$ uname -r
5.10.6+

So even though the canonical linker path uses /lib/, we need the /lib64 symlink
to be present.

4 years agoshared/base-filesystem: add define for ppc64el
Zbigniew Jędrzejewski-Szmek [Wed, 17 Nov 2021 14:01:18 +0000 (15:01 +0100)] 
shared/base-filesystem: add define for ppc64el

https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the
linker paths. I used the linker path from Fedora, but I can't look up the
linker paths for BE and 32 bit. At least the ifdef scaffolding is provided, so
it should be trivial to fill in if somebody has access to such a system.

$ ls -l /lib /lib64
lrwxrwxrwx. 1 root root 7 Jan 26  2021 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jan 26  2021 /lib64 -> usr/lib64
$ ldd /bin/sh|grep ld
/lib64/ld64.so.2 (0x00007fffa0a90000)
$ uname -r
5.14.9-200.fc34.ppc64le

Note that the macro defines listed in the wiki page don't match what I get
on Fedora: __PPC64__ vs. __ppc64__.

$ cpp -dM < /dev/null |grep -iE '__(powerpc|ppc)'|sort
 #define __powerpc__ 1
 #define __powerpc64__ 1
 #define __PPC__ 1
 #define __PPC64__ 1

First half of the fix for #14311.

4 years agoshared/base-filesystem: add define for arm64
Zbigniew Jędrzejewski-Szmek [Wed, 17 Nov 2021 13:51:39 +0000 (14:51 +0100)] 
shared/base-filesystem: add define for arm64

https://wiki.debian.org/ArchitectureSpecificsMemo:
> arm64 aarch64-linux-gnu 64 AARCH64 /lib/ld-linux-aarch64.so.1 aarch64 aarch64

Fedora:
$ ls -l /lib /lib64
lrwxrwxrwx. 1 root root 7 Jul 27  2020 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jul 27  2020 /lib64 -> usr/lib64
$ ldd /bin/sh|grep ld
/lib/ld-linux-aarch64.so.1 (0x0000ffff8c905000)
$ ls -l /lib/ld-linux-aarch64.so.1 /lib64/ld-2.32.so
lrwxrwxrwx. 1 root root     19 Jul 13 07:28 /lib/ld-linux-aarch64.so.1 -> ../lib64/ld-2.32.so
-rwxr-xr-x. 1 root root 961248 Jul 13 07:56 /lib64/ld-2.32.so

$ uname -r
5.14.16-101.fc33.aarch64

So we need both /lib and /lib64 to be present, even though the canonical linker
path uses /lib.

4 years agoshared/base-filesystem: add (empty) iffdery for the table
Zbigniew Jędrzejewski-Szmek [Wed, 17 Nov 2021 13:43:02 +0000 (14:43 +0100)] 
shared/base-filesystem: add (empty) iffdery for the table

I think this is going to be very annoying for our downstream maintainers.
Let's at least provide the ifdef scaffolding so that only filling in the
actual entries remains. The structure is copied from missing_syscall.h.

4 years agoshared/gpt: drop outdated comment
Zbigniew Jędrzejewski-Szmek [Thu, 18 Nov 2021 09:39:21 +0000 (10:39 +0100)] 
shared/gpt: drop outdated comment

C.f. 1fb2d8fcb69bcdbab0a5dd23bbf02f729e47e656.

4 years agodocs: clarify the assumption on numeric values of JSON parsers we make
Lennart Poettering [Fri, 12 Nov 2021 09:17:07 +0000 (10:17 +0100)] 
docs: clarify the assumption on numeric values of JSON parsers we make

Prompted by:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/BOBD6KVTXPR6K5ANAX6LIJLKNSGXCR3B/

4 years agoMerge pull request #21444 from poettering/gpt-test
Zbigniew Jędrzejewski-Szmek [Fri, 19 Nov 2021 14:08:36 +0000 (15:08 +0100)] 
Merge pull request #21444 from poettering/gpt-test

tests: dump table of archs + wether gpt partition type exists

4 years agoremoved copyright
Daniel Maixner [Fri, 19 Nov 2021 12:44:35 +0000 (13:44 +0100)] 
removed copyright

4 years agotest-gpt: add test that shows for which archs we have GPT partition types 21444/head
Lennart Poettering [Fri, 19 Nov 2021 10:23:06 +0000 (11:23 +0100)] 
test-gpt: add test that shows for which archs we have GPT partition types

4 years agogpt: make gpt_partition_type_uuid_from_string() return parameter optional
Lennart Poettering [Fri, 19 Nov 2021 10:22:58 +0000 (11:22 +0100)] 
gpt: make gpt_partition_type_uuid_from_string() return parameter optional

4 years agostrv: make sure FOREACH_STRING() can be nested
Lennart Poettering [Fri, 19 Nov 2021 10:22:44 +0000 (11:22 +0100)] 
strv: make sure FOREACH_STRING() can be nested

4 years agooss-fuzz: move apt-gets and pips to the systemd repository
Evgeny Vereshchagin [Wed, 17 Nov 2021 08:47:29 +0000 (08:47 +0000)] 
oss-fuzz: move apt-gets and pips to the systemd repository

to be able to control our dependencies right here without
sending PRs like https://github.com/google/oss-fuzz/pull/5199 and
https://github.com/google/oss-fuzz/pull/5601.

It should also allow us to pin meson to let Dependabot keep track of
it and jump from one version to another without breaking anything

4 years agoMerge pull request #21436 from yuwata/network-bus-introspect
Zbigniew Jędrzejewski-Szmek [Fri, 19 Nov 2021 08:42:46 +0000 (09:42 +0100)] 
Merge pull request #21436 from yuwata/network-bus-introspect

network: add --bus-introspect option

4 years agosystemd-coredump: allow setting external core size to infinity
Thomas Blume [Mon, 15 Nov 2021 09:11:44 +0000 (10:11 +0100)] 
systemd-coredump: allow setting external core size to infinity

Make it compatible to the ulimit setting: unlimited

4 years agoMerge pull request #21420 from DaanDeMeyer/journal-enumerate-skip
Lennart Poettering [Fri, 19 Nov 2021 08:23:17 +0000 (09:23 +0100)] 
Merge pull request #21420 from DaanDeMeyer/journal-enumerate-skip

journal: Skip over corrupt entry items in enumerate_data()

4 years agoMerge pull request #21411 from poettering/homed-maximize
Lennart Poettering [Fri, 19 Nov 2021 08:22:11 +0000 (09:22 +0100)] 
Merge pull request #21411 from poettering/homed-maximize

homed: add concept for "maximizing" home dirs

4 years agoMerge pull request #21435 from yuwata/network-cleanups-for-alternative-names
Yu Watanabe [Fri, 19 Nov 2021 03:05:04 +0000 (12:05 +0900)] 
Merge pull request #21435 from yuwata/network-cleanups-for-alternative-names

network: cleanups for alternative names

4 years agonetwork: always try to reconfigure when carrier gained
Yu Watanabe [Thu, 18 Nov 2021 20:12:35 +0000 (05:12 +0900)] 
network: always try to reconfigure when carrier gained

When networkd detects a wlan interface, the interface may not be
connected to any access point, and may enter the unmanaged state.
After the interface connected to an access point, previously networkd
did not reconfigure the interface. This fixes the issue.

4 years agohomectl: parse "min" and "max" as special disk size values 21411/head
Lennart Poettering [Fri, 29 Oct 2021 12:34:24 +0000 (14:34 +0200)] 
homectl: parse "min" and "max" as special disk size values

4 years agotest: extend homed test to test home dir "maximization"
Lennart Poettering [Wed, 17 Nov 2021 09:22:20 +0000 (10:22 +0100)] 
test: extend homed test to test home dir "maximization"

This moves the backing store to a separate tmpfs which we can nicely put
a size limit on to make sure we can test maximization sanely: if we ask
for the home dir to be grown really large it should effectively only be
grown until the size of the backing tmpfs.

(While we are at it, also set a cheaper KDF so that we don't waste CI
cycles for password hashing that aren#t secure anyway.)

4 years agohomework: also add logic for "maximizing" size of home
Lennart Poettering [Fri, 29 Oct 2021 10:21:41 +0000 (12:21 +0200)] 
homework: also add logic for "maximizing" size of home

4 years agohomework: make it safe to invoke home_setup_luks() twice in a row
Lennart Poettering [Fri, 29 Oct 2021 08:13:25 +0000 (10:13 +0200)] 
homework: make it safe to invoke home_setup_luks() twice in a row

Being able to invoke the call twice on the same HomeSetup object will
simplify auto-growing/auto-shrinking since we can issue a resize
operatio directly from activate/deactivate

4 years agohomework: make destroying of HomeSetup optional when resizing
Lennart Poettering [Fri, 29 Oct 2021 07:59:35 +0000 (09:59 +0200)] 
homework: make destroying of HomeSetup optional when resizing

This will be useful when we want to issue a resize operation right when
activating, where the HomeSetup object should be destroyed only after
both activation is done.

4 years agoman: add new man page org.freedesktop.network1 21436/head
Yu Watanabe [Thu, 18 Nov 2021 22:23:40 +0000 (07:23 +0900)] 
man: add new man page org.freedesktop.network1

4 years agonetwork: support --bus-introspect option
Yu Watanabe [Thu, 18 Nov 2021 21:49:50 +0000 (06:49 +0900)] 
network: support --bus-introspect option

4 years agonetwork: use BusObjectImplementation
Yu Watanabe [Thu, 18 Nov 2021 21:49:25 +0000 (06:49 +0900)] 
network: use BusObjectImplementation

4 years agojournal: Skip corrupt Data objects in sd_journal_get_data() 21420/head
Daan De Meyer [Wed, 17 Nov 2021 16:46:29 +0000 (16:46 +0000)] 
journal: Skip corrupt Data objects in sd_journal_get_data()

Similar to the change we made for sd_journal_enumerate_data(), let's
skip corrupt entry items and data objects in sd_journal_get_data().

4 years agojournal: Use separate variable for Data object in sd_journal_get_data()
Daan De Meyer [Wed, 17 Nov 2021 16:44:21 +0000 (16:44 +0000)] 
journal: Use separate variable for Data object in sd_journal_get_data()

A little cleanup to make the next change easier. We're not moving to a
new Entry object in the for loop so there's no danger of changing the
Entry object window.

4 years agojournal: Skip over corrupt entry items in enumerate_data()
Daan De Meyer [Wed, 17 Nov 2021 15:54:35 +0000 (15:54 +0000)] 
journal: Skip over corrupt entry items in enumerate_data()

Similar to sd_journal_next(), if trying to access an entry item
offset's data results in EBADMSG, skip to the next entry item so
we handle corruption better.

Fixes #21407

4 years agonetwork: skip re-generating map from alternative names to link 21435/head
Yu Watanabe [Thu, 18 Nov 2021 21:01:45 +0000 (06:01 +0900)] 
network: skip re-generating map from alternative names to link

4 years agonetwork: do not clear map from alternative names to link when IFLA_PROP_LIST attribut...
Yu Watanabe [Thu, 18 Nov 2021 20:36:44 +0000 (05:36 +0900)] 
network: do not clear map from alternative names to link when IFLA_PROP_LIST attribute is not contained

No IFLA_PROP_LIST attribute contained does not means the interface
has no alternative name.
E.g. the message created by inet6_fill_ifinfo() in net/ipv6/addrconf.c
does not contain IFLA_PROP_LIST.

4 years agotest: make the diff regex BRE-compatible
Frantisek Sumsal [Thu, 18 Nov 2021 16:19:03 +0000 (17:19 +0100)] 
test: make the diff regex BRE-compatible

Since the GNU `diff` utility uses grep-style regular expressions[0], which
use the BRE style, we need to tweak the regex to make it work properly
(most notably - in BRE the meta characters need to be escaped).

```
$ diff a b
21c21
<   Volume Key: 256bit
---
>   Volume Key: 257bit
25c25
< Disk Ceiling: 323.2M
---
> Disk Ceiling: 323.1M

$ diff -I '^\s*Disk (Size|Free|Floor|Ceiling):' a b
21c21
<   Volume Key: 256bit
---
>   Volume Key: 257bit
25c25
< Disk Ceiling: 323.2M
---
> Disk Ceiling: 323.1M

$ diff -I '^\s*Disk \(Size\|Free\|Floor\|Ceiling\):' a b && echo OK
21c21
<   Volume Key: 256bit
---
>   Volume Key: 257bit
```

Caught in one of the nightly CentOS CI cron jobs.

[0] https://www.gnu.org/software/diffutils/manual/html_node/Specified-Lines.html

4 years agojournal: Don't discard kmsg messages coming from journald itself
Daan De Meyer [Mon, 11 Oct 2021 13:05:08 +0000 (14:05 +0100)] 
journal: Don't discard kmsg messages coming from journald itself

Previously, we discarded any kmsg messages coming from journald
itself to avoid infinite loops where potentially the processing
of a kmsg message causes journald to log one or more messages to
kmsg which then get read again by the kmsg handler, ...

However, if we completely disable logging whenever we're processing
a kmsg message coming from journald itself, we also prevent any
infinite loops as we can be sure that journald won't accidentally
generate logging messages while processing a kmsg log message.

This change allows us to store all journald logs generated during
the processing of log messages from other services in the system
journal. Previously these could only be found in kmsg which has
low retention, can't be queried using journalctl and whose logs
don't survive reboots.

4 years agoTEST-12: make sure 'adm' group exist
Franck Bui [Thu, 18 Nov 2021 10:56:02 +0000 (11:56 +0100)] 
TEST-12: make sure 'adm' group exist

'adm' group is not available on openSUSE.

4 years agoman/kernel-command-line: add reference to getty_auto variable
Luca Boccassi [Thu, 18 Nov 2021 13:09:20 +0000 (13:09 +0000)] 
man/kernel-command-line: add reference to getty_auto variable

Follow-up for #21422

4 years agoMerge pull request #21424 from keszybz/json-double
Luca Boccassi [Thu, 18 Nov 2021 13:37:20 +0000 (13:37 +0000)] 
Merge pull request #21424 from keszybz/json-double

Use double and int64_t types in json

4 years agojournal: Use mf as variable name for MapField
Daan De Meyer [Thu, 18 Nov 2021 12:28:07 +0000 (12:28 +0000)] 
journal: Use mf as variable name for MapField

So we can have a variable m for the max iovec size in the next
commit like we do in the rest of the journal logic.

4 years agojournal: Use consistent naming for iovec in audit logic
Daan De Meyer [Thu, 18 Nov 2021 12:25:27 +0000 (12:25 +0000)] 
journal: Use consistent naming for iovec in audit logic

Let's use iovec and n for the iovec variable and it's size just like
we do in the rest of the journal code.

4 years agogetty-generator: add kernel cmdline and env vars to disable it
Luca Boccassi [Wed, 17 Nov 2021 17:28:54 +0000 (17:28 +0000)] 
getty-generator: add kernel cmdline and env vars to disable it

systemd.getty_auto/rd.systemd.getty_auto/SYSTEMD_GETTY_AUTO can be used
to disable the generator. Enabled by default.

4 years agoMerge pull request #21401 from poettering/open-mkdir-at
Lennart Poettering [Thu, 18 Nov 2021 09:13:26 +0000 (10:13 +0100)] 
Merge pull request #21401 from poettering/open-mkdir-at

add open_mkdir_at() helper and use it

4 years agomeson: add check:true/false to all run_command() invocations
Zbigniew Jędrzejewski-Szmek [Wed, 17 Nov 2021 12:58:53 +0000 (13:58 +0100)] 
meson: add check:true/false to all run_command() invocations

meson-0.59.4-1.fc35.noarch says:
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300

4 years agoshared/json: use int64_t instead of intmax_t 21424/head
Zbigniew Jędrzejewski-Szmek [Wed, 17 Nov 2021 22:24:49 +0000 (23:24 +0100)] 
shared/json: use int64_t instead of intmax_t

We were already asserting that the intmax_t and uintmax_t types
are the same as int64_t and uint64_t. Pretty much everywhere in
the code base we use the latter types. In principle intmax_t could
be something different on some new architecture, and then the code would
fail to compile or behave differently. We actually do not want the code
to behave differently on those architectures, because that'd break
interoperability. So let's just use int64_t/uint64_t since that's what
we indend to use.