]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 months agopretty-print: add format-string version of draw_progress_bar() 34939/head
Lennart Poettering [Tue, 29 Oct 2024 20:32:28 +0000 (21:32 +0100)] 
pretty-print: add format-string version of draw_progress_bar()

We often format the prefix string via asprintf() before, let's hence add
a helper for that.

12 months agopretty-print: rename draw_progress_bar_impl()→draw_progress_bar_unbuffered()
Lennart Poettering [Tue, 29 Oct 2024 20:14:54 +0000 (21:14 +0100)] 
pretty-print: rename draw_progress_bar_impl()→draw_progress_bar_unbuffered()

12 months agobusctl: minor tweak to help text for --limit-messages=
Lennart Poettering [Tue, 29 Oct 2024 20:13:51 +0000 (21:13 +0100)] 
busctl: minor tweak to help text for --limit-messages=

12 months agoimport: Draw progress bars
Daan De Meyer [Fri, 25 Oct 2024 15:03:37 +0000 (17:03 +0200)] 
import: Draw progress bars

Currently every progress update results in a new progress message
which is extremely verbose. Instead, let's use the progress bar infra
to draw a proper progress bar similar to what we do in systemd-repart
now.

12 months agoprogress-bar: issue Windows Terminal progress indicating ANSI sequences (#34929)
Lennart Poettering [Tue, 29 Oct 2024 20:00:15 +0000 (21:00 +0100)] 
progress-bar: issue Windows Terminal progress indicating ANSI sequences (#34929)

This generates the Windows Terminal OSC sequences indicating progress.
This let's the terminal know that we are doing a slow operation, and how
we are progressing.

Windows Terminal uses this in two ways: it shows a circle in the tab
that completes, and it highlights the progress in the task bar.

I found no Linux terminal that currently supports it, but also none that
didn't like it. Thankfully most terminals correctly ignore unrecognized
OSC sequences.

I think we should just merge this, and see if this trips up too many
people, but I have reason to believe this shouldn't be too bad.

And yes, I do work from Windows Terminal sometimes, ssh into my Linux
build systems, and it is really cute seeing the progress animation
there.

12 months agosysusers: optionally create fully locked accounts (#34876)
Luca Boccassi [Tue, 29 Oct 2024 18:46:14 +0000 (18:46 +0000)] 
sysusers: optionally create fully locked accounts (#34876)

Let's ramp up security for system user accounts, at least where
possible, by creating them fully locked (instead of just with an invalid
password). This matters when taking non-password (i.e. SSH) logins into
account.

Fixes: #13522
12 months agobusctl: various bugfixes + tweaks (#34928)
Luca Boccassi [Tue, 29 Oct 2024 18:15:16 +0000 (18:15 +0000)] 
busctl: various bugfixes + tweaks (#34928)

Fixes: #34048
Replaces: #34796
Follow-up for: #33961

12 months agomkosi: update fedora commit reference 34876/head
Lennart Poettering [Tue, 29 Oct 2024 16:22:23 +0000 (17:22 +0100)] 
mkosi: update fedora commit reference

e42eed4afd test_sysusers_defined: support new ! line flag for creating fully locked accounts
2c6a4e2f90 Version 256.7
bedc0270e7 Move yum/dnf protection removal config file under /usr
5a82129a41 Reword some descriptions
ce99022f7b Version 256.6

12 months agoMerge pull request #34245 from bluca/logind_drop_weak_delay_inhibitor
Zbigniew Jędrzejewski-Szmek [Tue, 29 Oct 2024 16:13:11 +0000 (17:13 +0100)] 
Merge pull request #34245 from bluca/logind_drop_weak_delay_inhibitor

logind: drop new delay-weak inhibitor

12 months agobusctl: add the usual section highlighting to our --help texts 34928/head
Lennart Poettering [Mon, 28 Oct 2024 13:04:05 +0000 (14:04 +0100)] 
busctl: add the usual section highlighting to our --help texts

12 months agobusctl: add a testcase that definitely causes the timeout to trigger
Lennart Poettering [Mon, 28 Oct 2024 12:59:28 +0000 (13:59 +0100)] 
busctl: add a testcase that definitely causes the timeout to trigger

12 months agobusctl: if --timeout= or --limit-messages= are specified with no argument, reset...
Lennart Poettering [Mon, 28 Oct 2024 12:52:04 +0000 (13:52 +0100)] 
busctl: if --timeout= or --limit-messages= are specified with no argument, reset to defaults.

Follow-up for: 989e843e7543b21b91de4368da44692d674722a5
See: #34048

12 months agobusctl: rename --num-matches= → --limit-messages=
Lennart Poettering [Mon, 28 Oct 2024 12:48:30 +0000 (13:48 +0100)] 
busctl: rename --num-matches= → --limit-messages=

We should avoid unnecessary abbreviations for such messages, and this
puts a maximum limit on things, hence it should indicate this in the
name.

Moreover, matches is a bit confusing, since most people will probably
call "busctl monitor" without any match specification, i.e. zero
matches, but that's not what was meant here at all.

Also, add a brief switch for this (-N) since I figure in particular
"-N1" might be a frequent operation people might want to use.

Follow-up for: 989e843e7543b21b91de4368da44692d674722a5
See: #34048

12 months agobusctl: fix timeout calculation for "busctl monitor"
Lennart Poettering [Mon, 28 Oct 2024 12:36:00 +0000 (13:36 +0100)] 
busctl: fix timeout calculation for "busctl monitor"

The --timeout= logic was implemented incorrectly, as it would not put a
a limit on the runtime of the operation, but only on the IO sleep.
However, spurious wakeups are possible, hence the timer would be reset
too often.

Fix that, by determining the absolute timestamp early, and checking
against that.

Follow-up for: 989e843e7543b21b91de4368da44692d674722a5
See: #34048

12 months agoNEWS: be less misleading since systemd-run does not support ExtraFileDescriptors...
Mike Yuan [Tue, 29 Oct 2024 15:32:34 +0000 (16:32 +0100)] 
NEWS: be less misleading since systemd-run does not support ExtraFileDescriptors= yet

12 months agomeson.build: do not mark test-progress-bar as manual 34929/head
Lennart Poettering [Tue, 29 Oct 2024 14:55:12 +0000 (15:55 +0100)] 
meson.build: do not mark test-progress-bar as manual

It will finish on its own always and cleanly, and running it always
should increase test coverage.

12 months agoprogress-bar: issue Windows Terminal progress indicating ANSI sequences
Lennart Poettering [Tue, 29 Oct 2024 10:27:51 +0000 (11:27 +0100)] 
progress-bar: issue Windows Terminal progress indicating ANSI sequences

This generates the Windows Terminal OSC sequences indicating progress.
This let's the terminal know that we are doing a slow operation, and how
we are progressing.

Windows Terminal uses this in two ways: it shows a circle in the tab
that completes, and it highlights the progress in the task bar.

I found no Linux terminal that currently supports it, but also none that
didn't like it. Thankfully most terminals correctly ignore unrecognized
OSC sequences.

I think we should just merge this, and see if this trips up too many
people, but I have reason to believe this shouldn't be too bad.

And yes, I do work from Windows Terminal sometimes, ssh into my Linux
build systems, and it is really cute seeing the progress animation
there.

12 months agoudevadm: automatically anable JSON-SEQ in case JSON is used for "udevadm info -a"
Lennart Poettering [Mon, 28 Oct 2024 12:26:01 +0000 (13:26 +0100)] 
udevadm: automatically anable JSON-SEQ in case JSON is used for "udevadm info -a"

We are going to output a series of JSON objects, hence let's
automatically enable JSON-SEQ output mode, as we usually do.

"jq --seq" supports this natively, hence this should not really restrict
us.

Follow-up for: 67ea8a4c0edef33b1775536bc81d5de2c8ac4d88

12 months agomkosi: Move copying packages to the output directory to the postinst script
Daan De Meyer [Mon, 28 Oct 2024 20:12:19 +0000 (21:12 +0100)] 
mkosi: Move copying packages to the output directory to the postinst script

Now that we have the mkosi.clangd script to run clangd from the mkosi
build script, it becomes clear that doing cleanup with mkosi.clean has
a big gap in that we always run the mkosi.clean script and thus we also
run it when we run the mkosi.clangd script, causing the previously built
packages to be removed when we run clangd without producing new ones.

In mkosi we're improving the situation by only running clean scripts when we
clean up the output directory and disallowing writing to the output directory
from build scripts.

Let's adapt systemd to these changes by moving the copying of packages to the
output directory to the postinst script.

12 months agotest: test new 'u' sysusers.d lines
Lennart Poettering [Thu, 24 Oct 2024 08:01:14 +0000 (10:01 +0200)] 
test: test new 'u' sysusers.d lines

12 months agosysusers.d: lock all system users defined by us
Lennart Poettering [Wed, 23 Oct 2024 20:22:54 +0000 (22:22 +0200)] 
sysusers.d: lock all system users defined by us

12 months agosysusers: add new ! line flag for creating fully locked accounts
Lennart Poettering [Wed, 23 Oct 2024 20:22:15 +0000 (22:22 +0200)] 
sysusers: add new ! line flag for creating fully locked accounts

Fixes: #13522
12 months agoMerge pull request #34391 from poettering/dns-long-label-fix
Lennart Poettering [Tue, 29 Oct 2024 09:47:14 +0000 (10:47 +0100)] 
Merge pull request #34391 from poettering/dns-long-label-fix

resolved: fixes when trying to serialize overly long DNS names

12 months agoupdate-utmp: wait slightly longer for the private bus socket being active
Yu Watanabe [Sat, 26 Oct 2024 14:28:32 +0000 (23:28 +0900)] 
update-utmp: wait slightly longer for the private bus socket being active

Before a339495b1d67f69f49ffffdd96002164a28f1c93, update-utmp typically
connects the public DBus socket when disconnected from the private DBus
socket, as dbus service should be active even during PID1 is being reexecuted.

However, after a339495b1d67f69f49ffffdd96002164a28f1c93, update-utmp
tries to connect only the private DBus socket, but reexecution of PID1
may be slow, hence all trials may fail when the reexecution is slow.

With this change, now it waits for 100ms to 2000ms, so in total it waits
about 37 seconds in average, previously about 4 seconds.

12 months agoman: fix return parameter type of sd_device_get_device_id()
Lennart Poettering [Mon, 28 Oct 2024 22:34:40 +0000 (23:34 +0100)] 
man: fix return parameter type of sd_device_get_device_id()

12 months agosocket: support setting ownership of message queues
David Michael [Fri, 25 Oct 2024 14:45:44 +0000 (10:45 -0400)] 
socket: support setting ownership of message queues

This applies the existing SocketUser=/SocketGroup= options to units
defining a POSIX message queue, bringing them in line with UNIX
sockets and FIFOs.  They are set on the file descriptor rather than
a file system path because the /dev/mqueue path interface is an
optional mount unit.

12 months agoupdate NEWS for v257
Lennart Poettering [Mon, 28 Oct 2024 22:34:19 +0000 (23:34 +0100)] 
update NEWS for v257

12 months agoMerge pull request #34633 from keszybz/sd-json-enum-formatting
Yu Watanabe [Mon, 28 Oct 2024 18:29:03 +0000 (03:29 +0900)] 
Merge pull request #34633 from keszybz/sd-json-enum-formatting

Add sd_json_format_enabled() helper

12 months agoMerge pull request #34806 from ryantimwilson/protect-control-groups
Yu Watanabe [Mon, 28 Oct 2024 17:53:11 +0000 (02:53 +0900)] 
Merge pull request #34806 from ryantimwilson/protect-control-groups

cgroup: Add support for ProtectControlGroups= private and strict

12 months agopo: Translated using Weblate (Czech)
Pavel Borecki [Mon, 28 Oct 2024 15:47:46 +0000 (16:47 +0100)] 
po: Translated using Weblate (Czech)

Currently translated at 86.5% (219 of 253 strings)

Co-authored-by: Pavel Borecki <pavel.borecki@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main

12 months agocgroup: Add support for ProtectControlGroups= private and strict 34806/head
Ryan Wilson [Fri, 18 Oct 2024 18:41:09 +0000 (11:41 -0700)] 
cgroup: Add support for ProtectControlGroups= private and strict

This commit adds two settings private and strict to
the ProtectControlGroups= property. Private will unshare the cgroup
namespace and mount a read-write private cgroup2 filesystem at /sys/fs/cgroup.
Strict does the same except the mount is read-only. Since the unit is
running in a cgroup namespace, the new root of /sys/fs/cgroup is the unit's
own cgroup.

We also add a new dbus property ProtectControlGroupsEx which accepts strings
instead of boolean. This will allow users to use private/strict via dbus
and systemd-run in addition to service files.

Note private and strict fall back to no and yes respectively if the kernel
doesn't support cgroup2 or system is not using unified hierarchy.

Fixes: #34634
12 months agocore: Refactor ProtectControlGroups= to use enum vs bool
Ryan Wilson [Wed, 16 Oct 2024 23:51:17 +0000 (16:51 -0700)] 
core: Refactor ProtectControlGroups= to use enum vs bool

This commit refactors ProtectControlGroups= from using a boolean
in the dbus/execute backend to using an enum. There is no functional
change but this will allow adding new non-boolean values (e.g. strict,
private) a la PrivateHome.

12 months agosd-json,tree-wide: add sd_json_format_enabled() and use it everwhere 34633/head
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2024 16:08:35 +0000 (18:08 +0200)] 
sd-json,tree-wide: add sd_json_format_enabled() and use it everwhere

We often used a pattern like if (!FLAGS_SET(flags, SD_JSON_FORMAT_OFF)),
which is rather verbose and also contains a double negative, which we try
to avoid. Add a little helper to avoid an explicit bit check.

This change clarifies an aditional thing: in some cases we treated
SD_JSON_FORMAT_OFF as a flag (flags & SD_JSON_FORMAT_OFF), while in other cases
we treated it as an independent enum value (flags == SD_JSON_FORMAT_OFF).
In the first form, flags like SD_JSON_FORMAT_SSE do _not_ turn the json
output on, while in the second form they do. Let's use the first form
everywhere.

No functional change intended.

Initially I wasn't sure if this helper should be made public or just internal,
but it seems such a common pattern that if we expose the flags, we might just
as well expose it too, to make life easier for any consumers.

12 months agosd-id128: mark functions as const, not pure
Zbigniew Jędrzejewski-Szmek [Mon, 28 Oct 2024 08:20:32 +0000 (09:20 +0100)] 
sd-id128: mark functions as const, not pure

We would need to use pure if the funtion was getting pointers and
dereferencing them. But sd128_t is a structure and those functions
only access the parameters of the call.

12 months agosd-common: add __const__
Zbigniew Jędrzejewski-Szmek [Mon, 28 Oct 2024 08:13:10 +0000 (09:13 +0100)] 
sd-common: add __const__

const is stronger than pure, see
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute
and
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-const-function-attribute.

12 months agomeson: add loongarch64's definition to cpu_arch_defines
Zhou Qiankang [Mon, 28 Oct 2024 04:47:20 +0000 (12:47 +0800)] 
meson: add loongarch64's definition to cpu_arch_defines

The default definition to add is `-D__loongarch64__`, which is not searched in [bpf_tracing.h](https://github.com/libbpf/libbpf/blob/09b9e83102eb8ab9e540d36b4559c55f3bcdb95d/src/bpf_tracing.h#L68)

This may avoid `error: Must specify a BPF target arch via __TARGET_ARCH_xxx` in loongarch64

Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com>
12 months agopo: Translated using Weblate (Indonesian)
Andika Triwidada [Sun, 27 Oct 2024 05:38:33 +0000 (06:38 +0100)] 
po: Translated using Weblate (Indonesian)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/
Translation: systemd/main

12 months agoMerge pull request #34902 from ryantimwilson/root-dir-not-exists-error
Yu Watanabe [Sun, 27 Oct 2024 04:49:05 +0000 (13:49 +0900)] 
Merge pull request #34902 from ryantimwilson/root-dir-not-exists-error

core: Add RootDirectory= path to error message if directory does not exist

12 months agocore: Add RootDirectory= path to error message if directory does not exist 34902/head
Ryan Wilson [Sat, 26 Oct 2024 22:33:30 +0000 (15:33 -0700)] 
core: Add RootDirectory= path to error message if directory does not exist

A colleague reported when RootDirectory= does not exist, systemd reports an error like:
```
Failed to set up mount namespacing: No such file or directory
```

Unfortunately, with large spec files, it can be hard to diagnose which path systemd is talking
about. Thus, to make the error message more helpful and similar to mount error messages, we add
the root directory/image path into the error message like:
```
Failed to set up mount namespacing: /tmp/thisdoesnotexist: No such file or directory
```

12 months agocore/execute: Rename error_path -> reterr_path/ret_path per coding guidelines
Ryan Wilson [Sat, 26 Oct 2024 22:28:49 +0000 (15:28 -0700)] 
core/execute: Rename error_path -> reterr_path/ret_path per coding guidelines

This is a non-functional change to ensure error_path used to print out the
offending mount causing an error follows coding guidelines.

12 months agocore/cgroup: rename CGROUP_PRESSURE_WATCH_ON/OFF -> CGROUP_PRESSURE_WATCH_YES/NO
Yu Watanabe [Sat, 26 Oct 2024 16:24:49 +0000 (01:24 +0900)] 
core/cgroup: rename CGROUP_PRESSURE_WATCH_ON/OFF -> CGROUP_PRESSURE_WATCH_YES/NO

No functional change, but let's print yes/no rather than on/off in systemd-analyze.

Similar to 2e8a581b9cc1132743c2341fc334461096266ad4 and
edd3f4d9b7a63dc9a142ef20119e80d1d9527f2f.
(Note, the commit messages of those commits are wrong, as
 parse_boolean() supports on/off anyway.)

12 months agohwdb: add Stream Deck Neo (#34903)
Sascha Mester [Sat, 26 Oct 2024 15:27:29 +0000 (17:27 +0200)] 
hwdb: add Stream Deck Neo (#34903)

12 months agosd-event: fix memleak when built without assertion
Yu Watanabe [Fri, 25 Oct 2024 18:25:26 +0000 (03:25 +0900)] 
sd-event: fix memleak when built without assertion

Fixes a bug introduced by baf3fdec27f0b3a1f3d39c7def2a778824cbee51.

This also adds several assertions at the beginning of the function.

Fixes #34899.

12 months agoman: fix typo
Yu Watanabe [Sat, 26 Oct 2024 05:00:34 +0000 (14:00 +0900)] 
man: fix typo

Follow-up for 115fac3c29c80d8917158df2275d45fee118d61f.

12 months agobasic/missing: add short comment about when CLONE_NEWCGROUP is added
Yu Watanabe [Sat, 26 Oct 2024 04:59:19 +0000 (13:59 +0900)] 
basic/missing: add short comment about when CLONE_NEWCGROUP is added

12 months agotree-wide: replace for loop with FOREACH_ELEMENT or FOREACH_ARRAY macros (#34893)
Integral [Fri, 25 Oct 2024 22:10:22 +0000 (06:10 +0800)] 
tree-wide: replace for loop with FOREACH_ELEMENT or FOREACH_ARRAY macros (#34893)

12 months agoMerge pull request #34884 from poettering/run0-disconnect-fix
Yu Watanabe [Fri, 25 Oct 2024 17:50:48 +0000 (02:50 +0900)] 
Merge pull request #34884 from poettering/run0-disconnect-fix

run: reconnect if our dbus connection is terminated

12 months agoMerge pull request #34881 from poettering/run0-ui-tweaks
Yu Watanabe [Fri, 25 Oct 2024 17:49:48 +0000 (02:49 +0900)] 
Merge pull request #34881 from poettering/run0-ui-tweaks

run0: various UI tweaks

12 months agomachine: operation should not send a response when 'done' callback set
Ivan Kruglov [Thu, 24 Oct 2024 12:13:51 +0000 (14:13 +0200)] 
machine: operation should not send a response when 'done' callback set

12 months agotest: add brief testcase for systemd-run disconnect handling 34884/head
Lennart Poettering [Fri, 25 Oct 2024 09:31:38 +0000 (11:31 +0200)] 
test: add brief testcase for systemd-run disconnect handling

12 months agorun: reconnect if our dbus connection is terminated
Lennart Poettering [Thu, 24 Oct 2024 13:08:22 +0000 (15:08 +0200)] 
run: reconnect if our dbus connection is terminated

We must be prepared that systemd temporarily drops off the bus or
disconnects our direct connections (due to systemctl daemon-reexec or
so). Hence automatically reconnect when we watch the unit status, and
handle this case gracefully.

Fixes: #32906 #27204
12 months agoupdate TODO 34881/head
Lennart Poettering [Fri, 25 Oct 2024 08:18:48 +0000 (10:18 +0200)] 
update TODO

12 months agorun: drop "-" prefix from command line when generating unit description
Lennart Poettering [Thu, 24 Oct 2024 10:14:01 +0000 (12:14 +0200)] 
run: drop "-" prefix from command line when generating unit description

Let's not confuse users with the login shell indicator and drop it from
the description. This means a run0 session will now usually show up with
a description of "[run0] /bin/bash" rather than "[run0] -/bin/bash".

12 months agorun: prefix unit description with our own process name
Lennart Poettering [Thu, 24 Oct 2024 10:07:24 +0000 (12:07 +0200)] 
run: prefix unit description with our own process name

I think we should try to communicate clearly if something is a run0
session, or a systemd-run invocation. Hence, let's initialize the
description so that the command is prefixed by
program_invocation_short_name.

Effectively this means that our run0 sessions now appear as services
with a description of "[run0] -/bin/bash"

12 months agorun: tweak how we name our transient units
Lennart Poettering [Thu, 24 Oct 2024 10:04:43 +0000 (12:04 +0200)] 
run: tweak how we name our transient units

The current logic is a bit complex how systemd-run units are called. It
used to be just the unique ID of the dbus connection. Which was nice,
since its system-widely, uniquely assigned to us. But this didn't work
out well, due to direct connections to PID 1 and due to soft reboots.

We nowadays have a better ID to use though, with nicer properties: the
kernel manages a pidfd ID for every process after all, and it's globally
unique, for any process, and regardless of soft reboots. Hence use that
for naming preferably, and just keep one branch with a randomized name
as fallback.

12 months agorun0: optionally show superhero emoji on each shell prompt
Lennart Poettering [Thu, 24 Oct 2024 09:36:48 +0000 (11:36 +0200)] 
run0: optionally show superhero emoji on each shell prompt

This makes use of the infra introduced in 229d4a980607e9478cf1935793652ddd9a14618b to indicate visually on each prompt that we are in superuser mode temporarily.
pick ad5de3222f userdbctl: add some basic client-side filtering

12 months agoMerge pull request #34891 from poettering/run0-pty
Lennart Poettering [Fri, 25 Oct 2024 14:25:01 +0000 (16:25 +0200)] 
Merge pull request #34891 from poettering/run0-pty

run0: add --pty and --pipe switches to force allocation of a pty or pipe

12 months agoci: add some basic testing of the new --pty and --pipe switches 34891/head
Lennart Poettering [Fri, 25 Oct 2024 07:29:38 +0000 (09:29 +0200)] 
ci: add some basic testing of the new --pty and --pipe switches

12 months agorun0: add options to force allocation of PTY or of pipe use
Lennart Poettering [Thu, 24 Oct 2024 21:27:59 +0000 (23:27 +0200)] 
run0: add options to force allocation of PTY or of pipe use

Fixes: #33033
12 months agotree-wide: use isatty_safe() everywhere
Lennart Poettering [Thu, 24 Oct 2024 21:12:31 +0000 (23:12 +0200)] 
tree-wide: use isatty_safe() everywhere

12 months agoupdate TODO
Lennart Poettering [Fri, 25 Oct 2024 11:57:44 +0000 (13:57 +0200)] 
update TODO

12 months agoMerge pull request #34877 from aafeijoo-suse/veritysetup-fixes
Lennart Poettering [Fri, 25 Oct 2024 08:06:31 +0000 (10:06 +0200)] 
Merge pull request #34877 from aafeijoo-suse/veritysetup-fixes

veritysetup-generator: minor man/code changes

12 months agoMerge pull request #34880 from poettering/change-user-on-pam-always
Lennart Poettering [Fri, 25 Oct 2024 07:22:03 +0000 (09:22 +0200)] 
Merge pull request #34880 from poettering/change-user-on-pam-always

core: make sure that if PAMName= is set we always do the full user ch…

12 months agotest: add quick test to verify the PAM stack really ran in all run0 modes of operation 34880/head
Lennart Poettering [Thu, 24 Oct 2024 20:51:49 +0000 (22:51 +0200)] 
test: add quick test to verify the PAM stack really ran in all run0 modes of operation

12 months agocore: make sure that if PAMName= is set we always do the full user changing even...
Lennart Poettering [Thu, 24 Oct 2024 08:52:56 +0000 (10:52 +0200)] 
core: make sure that if PAMName= is set we always do the full user changing even if no user is specified explicitly

When PAMName= is set this should be enough to go through our entire user
changing story, so that PAM is definitely run, and environment variables
definitely pulled in and so on.

Previously, it would happen that under some circumstances we might no do
this when transitioning from root to root itself even though PAM was
enabled.

Fixes: #34682
12 months agoMerge pull request #34875 from poettering/userdbctl-filter
Lennart Poettering [Thu, 24 Oct 2024 20:36:22 +0000 (22:36 +0200)] 
Merge pull request #34875 from poettering/userdbctl-filter

userdbctl: add some basic client-side filtering

12 months agouser-util: tighten shell validation a tiny bit
Lennart Poettering [Thu, 24 Oct 2024 08:50:16 +0000 (10:50 +0200)] 
user-util: tighten shell validation a tiny bit

12 months agoMerge pull request #34799 from YHNdnzj/service-followups
Mike Yuan [Thu, 24 Oct 2024 17:44:10 +0000 (19:44 +0200)] 
Merge pull request #34799 from YHNdnzj/service-followups

core: follow-ups for live mount

12 months agoci: give new userdbctl some CI exposure 34875/head
Lennart Poettering [Wed, 23 Oct 2024 20:12:29 +0000 (22:12 +0200)] 
ci: give new userdbctl some CI exposure

12 months agouser-record: fix indentation
Lennart Poettering [Wed, 23 Oct 2024 20:07:05 +0000 (22:07 +0200)] 
user-record: fix indentation

12 months agouserdbctl: set shell/home cell type to TABLE_PATH
Lennart Poettering [Wed, 23 Oct 2024 20:34:34 +0000 (22:34 +0200)] 
userdbctl: set shell/home cell type to TABLE_PATH

This only matters for sorting, and we currently don't support sorting by
path, hence this is of no real effect, but it certainly is more correct.

12 months agouserdbctl: grey out nologin shell in tabular output
Lennart Poettering [Wed, 23 Oct 2024 19:44:24 +0000 (21:44 +0200)] 
userdbctl: grey out nologin shell in tabular output

12 months agouserdbctl: optionally hide UID range boundaries in output
Lennart Poettering [Wed, 23 Oct 2024 19:36:06 +0000 (21:36 +0200)] 
userdbctl: optionally hide UID range boundaries in output

12 months agouserdbctl: add some basic client-side filtering
Lennart Poettering [Wed, 23 Oct 2024 13:19:36 +0000 (15:19 +0200)] 
userdbctl: add some basic client-side filtering

This adds some basic client-side user/group filtering to "userdbctl":

1. by uid/gid min/max
2. by user "disposition" (i.e. show only regular users with "userdbctl
   user -R")
3. by fuzzy name (i.e. search by substring/levenshtein of user name,
   real name, and other identifiers of the user/group record).

In the long run we also want to support this server side, but let's
start out with doing this client-side, since many backends won't support
server-side filtering anytime soon anyway, so we need it in either case.

12 months agoveritysetup-generator: remove unused code 34877/head
Antonio Alvarez Feijoo [Thu, 24 Oct 2024 08:07:45 +0000 (10:07 +0200)] 
veritysetup-generator: remove unused code

12 months agoman/veritysetup-generator: document veritytab kernel command line option
Antonio Alvarez Feijoo [Thu, 24 Oct 2024 08:07:28 +0000 (10:07 +0200)] 
man/veritysetup-generator: document veritytab kernel command line option

12 months agoman: fix links to veritysetup(8)
Antonio Alvarez Feijoo [Thu, 24 Oct 2024 07:54:48 +0000 (09:54 +0200)] 
man: fix links to veritysetup(8)

12 months agoman: insert a comma before 'and'
Yu Watanabe [Thu, 24 Oct 2024 07:42:48 +0000 (16:42 +0900)] 
man: insert a comma before 'and'

Follow-up for bd91f23acfecc92ede6965d752540a758b3e6c79.

12 months agoMerge pull request #27916 from yuwata/test-execute-credstore
Yu Watanabe [Thu, 24 Oct 2024 07:34:49 +0000 (16:34 +0900)] 
Merge pull request #27916 from yuwata/test-execute-credstore

test: update permission of credstore

12 months agoRevert "TEST-55-OOMD: workaround for kernel regression in 6.12-rcX"
Yu Watanabe [Wed, 23 Oct 2024 08:10:33 +0000 (17:10 +0900)] 
Revert "TEST-55-OOMD: workaround for kernel regression in 6.12-rcX"

This reverts commit 88bbf187a9b2ebe0732caa1e886616ae5f8186da.

The kernel regression has been hopefully fixed by
https://github.com/torvalds/linux/commit/c6508124193d42bbc3224571eb75bfa4c1821fbb
which is included in 6.12-rc4.
Let's drop the workaround.

12 months agopo: Translated using Weblate (Swedish)
Anders Jonsson [Thu, 24 Oct 2024 00:56:39 +0000 (02:56 +0200)] 
po: Translated using Weblate (Swedish)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Anders Jonsson <anders.jonsson@norsjovallen.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main

12 months agodocs: Mention that a local build might be required to use mkosi
Daan De Meyer [Tue, 22 Oct 2024 12:22:47 +0000 (14:22 +0200)] 
docs: Mention that a local build might be required to use mkosi

Currently we need ukify with support for --profile and --join-profile
which isn't in an official release yet so mention that a local build
from source might be required.

12 months agoman/network: suggest to not request IA_NA when received RA with Managed bit unset
Yu Watanabe [Wed, 23 Oct 2024 08:20:38 +0000 (17:20 +0900)] 
man/network: suggest to not request IA_NA when received RA with Managed bit unset

Follow-up for 1f5a052963464755e87a075f6f4a8867b2199311.

12 months agoMerge pull request #34834 from yuwata/protect-home-tmpfs-read-only
Yu Watanabe [Wed, 23 Oct 2024 20:32:12 +0000 (05:32 +0900)] 
Merge pull request #34834 from yuwata/protect-home-tmpfs-read-only

core/namespace: make ProtectHome=tmpfs makes /home and friends read-only as documented

12 months agocore: don't forget about fallback_smack_process_label
Łukasz Stelmach [Wed, 23 Oct 2024 10:58:36 +0000 (12:58 +0200)] 
core: don't forget about fallback_smack_process_label

Call setup_smack() also when only fallback_smack_process_label is set.

Fixes: 75689fb2d41f
12 months agocore/namespace: replace MOUNT_PRIVATE_TMP_READ_ONLY with MOUNT_PRIVATE_TMP with ... 34834/head
Yu Watanabe [Sat, 19 Oct 2024 05:40:13 +0000 (14:40 +0900)] 
core/namespace: replace MOUNT_PRIVATE_TMP_READ_ONLY with MOUNT_PRIVATE_TMP with .read_only = true

12 months agocore/namespace: coding style cleanups
Yu Watanabe [Sat, 19 Oct 2024 03:46:05 +0000 (12:46 +0900)] 
core/namespace: coding style cleanups

12 months agocore/namespace: honor MountEntry.read_only, .options, and so on in static entries
Yu Watanabe [Sat, 19 Oct 2024 05:38:08 +0000 (14:38 +0900)] 
core/namespace: honor MountEntry.read_only, .options, and so on in static entries

Otherwise, ProtectHome=tmpfs makes /home/ and friends not read-only.
Also, mount options for /run/ specified in MountAPIVFS=yes are not
applied.

The function append_static_mounts() was introduced in
5327c910d2fc1ae91bd0b891be92b30379c7467b, but at that time, there were
neither .read_only nor .options in the struct. But, when later the
struct is extended, the function was not updated and they were not
copied from the static table.
The fields has been used in static tables since
e4da7d8c796a1fd11ecfa80fb8a48eac9e823f06, and also in
94293d65cd4125347e21b3e423d0e245226b1be2.

Fixes #34825.

12 months agorefactor: replace sizeof in loop with ELEMENTSOF & FOREACH_ELEMENT (#34863)
Integral [Wed, 23 Oct 2024 08:32:02 +0000 (16:32 +0800)] 
refactor: replace sizeof in loop with ELEMENTSOF & FOREACH_ELEMENT (#34863)

12 months agoupdate TODO
Lennart Poettering [Wed, 23 Oct 2024 08:27:04 +0000 (10:27 +0200)] 
update TODO

12 months agoman/network: fix typo
Yu Watanabe [Wed, 23 Oct 2024 08:23:26 +0000 (17:23 +0900)] 
man/network: fix typo

Follow-up for 1f5a052963464755e87a075f6f4a8867b2199311.

12 months agomeasure: fix typo
Yu Watanabe [Wed, 23 Oct 2024 08:22:22 +0000 (17:22 +0900)] 
measure: fix typo

Follow-up for 0005411352f9bda0d9887c37b9e75a2bce6c1133.

12 months agoTEST-55-OOMD: fix typo
Yu Watanabe [Wed, 23 Oct 2024 08:13:55 +0000 (17:13 +0900)] 
TEST-55-OOMD: fix typo

Follow-up for 63d4c4271ca529f8357a84cbc075170fffdb3de8.

12 months agoMerge pull request #34850 from poettering/openat-report-new-tweaks
Lennart Poettering [Wed, 23 Oct 2024 08:25:18 +0000 (10:25 +0200)] 
Merge pull request #34850 from poettering/openat-report-new-tweaks

openat_report_new() tweaks

12 months agonetwork: adjust log message about DNR
Ronan Pigott [Tue, 22 Oct 2024 15:20:17 +0000 (08:20 -0700)] 
network: adjust log message about DNR

The only possible error return in this position is -ENODATA, which is
not interesting.

12 months agoMerge pull request #34861 from poettering/can-idle
Lennart Poettering [Wed, 23 Oct 2024 08:24:23 +0000 (10:24 +0200)] 
Merge pull request #34861 from poettering/can-idle

logind: introduce CanIdle/CanLock properties on logind session dbus objects

12 months agoresolved: add test case from #33671 34391/head
Lennart Poettering [Thu, 12 Sep 2024 15:09:37 +0000 (17:09 +0200)] 
resolved: add test case from #33671

12 months agoresolved: explicitly refuse adding invalid DNS names to DNS packets
Lennart Poettering [Thu, 12 Sep 2024 15:08:36 +0000 (17:08 +0200)] 
resolved: explicitly refuse adding invalid DNS names to DNS packets

Fixes: #33671
12 months agoresolved: when adding names to packet fails, remove them from label compression hash...
Lennart Poettering [Thu, 12 Sep 2024 15:05:24 +0000 (17:05 +0200)] 
resolved: when adding names to packet fails, remove them from label compression hash table again

let's make sure we undo any pollution of the label compression hash
table.

Fixes: #33671
12 months agodns-domain: tweak hash table comparison function for DNS names
Lennart Poettering [Thu, 12 Sep 2024 15:00:04 +0000 (17:00 +0200)] 
dns-domain: tweak hash table comparison function for DNS names

Currently, when comparing two DNS names when storing them in a
hashtable, and the DNS names are not actually valid we'll compare the
error codes.

This is not very smart however, since this means two invalid DNS names
that happen to be equally "invalid" will be considered identical, even
if their strings are entirely different.

Let's find a better solution for this niche case: let's simple compare
the domains as strings.

This matters in case of DNS label compression: if we already added added
an invalid DNS name into the label compression hash table, and lookup
any other invalid DNS name, this lookup will likely return what the
earlier one already returned, and that's confusing.