]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoman: clarify that type #1 entries are also read from the XBOOTLDR partition 22813/head
Lennart Poettering [Mon, 21 Mar 2022 23:21:36 +0000 (00:21 +0100)] 
man: clarify that type #1 entries are also read from the XBOOTLDR partition

3 years agoman: also install systemd-stub man page as sd-stub
Lennart Poettering [Mon, 21 Mar 2022 23:19:32 +0000 (00:19 +0100)] 
man: also install systemd-stub man page as sd-stub

So, typically systemd-boot is referenced as sd-boot, due to te usual
shorter naming in ESP resources. systemd-stub didnt do that so far,
since it never appears as separate files in the ESP. However it's super
annoying that you can find "man sd-boot", but not the very closely
related "man sd-stub". Let's fix that, and also add an "sd-stub" alias
to the "systemd-stub" man page.

3 years agoman: clarify where the settings in type #1 entries are documented
Lennart Poettering [Mon, 21 Mar 2022 23:14:22 +0000 (00:14 +0100)] 
man: clarify where the settings in type #1 entries are documented

So (maybe weirdly) loader.conf(5) documents both loader.conf and type #1
entries (because they share a similar syntax). But it then only lists
the options of loader.conf. Let's add an explicit hint where to find
the documentation of the type #1 entries.

3 years agoman: clarify the format used by sd-boot config files
Lennart Poettering [Mon, 21 Mar 2022 23:13:10 +0000 (00:13 +0100)] 
man: clarify the format used by sd-boot config files

3 years agosd-event: fix creation of floating event_add_time_change() event sources
Lennart Poettering [Mon, 21 Mar 2022 17:15:42 +0000 (18:15 +0100)] 
sd-event: fix creation of floating event_add_time_change() event sources

We shouldn't auto-disable event sources we create in "floating" mode.
Hence don#t use the disabling destructor for event sources.

Given that noone else has access to this event source we just allocated
anyway there's no point in explicitly disabling it before freeing it.

Follow-up for ec75e8e07a0ad972e0c40e0a187e15a8d4fb3d66

3 years agoMerge pull request #22808 from poettering/openat-report-newly
Luca Boccassi [Mon, 21 Mar 2022 21:56:37 +0000 (21:56 +0000)] 
Merge pull request #22808 from poettering/openat-report-newly

journal: add openat() wrapper that reports file creation, and use it in journal

3 years agoman: fix sysupdate typos
Anita Zhang [Mon, 21 Mar 2022 15:53:35 +0000 (11:53 -0400)] 
man: fix sysupdate typos

3 years agoMerge pull request #22804 from mrc0mmand/test-tweaks
Luca Boccassi [Mon, 21 Mar 2022 20:05:06 +0000 (20:05 +0000)] 
Merge pull request #22804 from mrc0mmand/test-tweaks

A couple of TEST-69 tweaks

3 years agojournal-file: port journal_file_open() to openat_report_new() 22808/head
Lennart Poettering [Mon, 21 Mar 2022 17:13:06 +0000 (18:13 +0100)] 
journal-file: port journal_file_open() to openat_report_new()

We so far had some magic logic in place that files we open for write
with size zero are freshly created. That of course is a bogus
assumption, in particular as this code deals with corrupted file systems
which oftentimes contain zero size inodes from left-over runs.

Let's fix this properly, and actually let the kernel tell us whether it
create the file or not.

3 years agosd-journal: refuse invocation of journal_file_open() with O_RDONLY|O_CREAT
Lennart Poettering [Mon, 21 Mar 2022 17:12:53 +0000 (18:12 +0100)] 
sd-journal: refuse invocation of journal_file_open() with O_RDONLY|O_CREAT

3 years agofs-util: add openat_report_new() wrapper around openat()
Lennart Poettering [Mon, 21 Mar 2022 17:11:26 +0000 (18:11 +0100)] 
fs-util: add openat_report_new() wrapper around openat()

This is a wrapper around openat(). It works mostly the same, except for
one thing: it race-freely reports whether we just created the indicated
file in case O_CREAT is passed without O_EXCL.

3 years agoupdate TODO
Lennart Poettering [Mon, 21 Mar 2022 17:11:12 +0000 (18:11 +0100)] 
update TODO

3 years agotest: use a dropin to override the end.service unit 22804/head
Frantisek Sumsal [Mon, 21 Mar 2022 15:10:30 +0000 (16:10 +0100)] 
test: use a dropin to override the end.service unit

instead of removing it.

3 years agotest: run test-shutdown.py in verbose mode
Frantisek Sumsal [Mon, 21 Mar 2022 14:58:51 +0000 (15:58 +0100)] 
test: run test-shutdown.py in verbose mode

To make the debugging of spurious fails a bit easier.

3 years agotest: don't try to execute a non-existing script
Frantisek Sumsal [Mon, 21 Mar 2022 14:55:49 +0000 (15:55 +0100)] 
test: don't try to execute a non-existing script

3 years agoMerge pull request #22798 from keszybz/test-output-narrow-and-timeouts
Luca Boccassi [Mon, 21 Mar 2022 14:13:22 +0000 (14:13 +0000)] 
Merge pull request #22798 from keszybz/test-output-narrow-and-timeouts

Increase timeout for a flaky test and make test names shorter to avoid line wrapping in output

3 years agoMerge pull request #22799 from keszybz/man-spelling-and-crosslinks
Luca Boccassi [Mon, 21 Mar 2022 13:40:03 +0000 (13:40 +0000)] 
Merge pull request #22799 from keszybz/man-spelling-and-crosslinks

Typos and more internal links in documentation

3 years agobasic/strv: avoid potential UB with references to array[-1]
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:03:00 +0000 (11:03 +0100)] 
basic/strv: avoid potential UB with references to array[-1]

"""
Given an array a[N] of N elements of type T:
- Forming a pointer &a[i] (or a + i) with 0 ≤ i ≤ N is safe.
- Forming a pointer &a[i] with i < 0 or i > N causes undefined behavior.
- Dereferencing a pointer &a[i] with 0 ≤ i < N is safe.
- Dereferencing a pointer &a[i] with i < 0 or i ≥ N causes undefined behavior.
"""

As pointed by by @medhefgo, here we were forming a pointer to a[-1]. a itself
wasn't NULL, so a > 0, and a-1 was also >= 0, and this didn't seem to cause any
problems. But it's better to be formally correct, especially if we move the
code to src/fundamental/ later on and compile it differently.

Compilation shows no size change (with -O0 -g) on build/systemd, so this should
have no effect whatsoever.

3 years agoDrop unused variables to fix build
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 12:30:42 +0000 (13:30 +0100)] 
Drop unused variables to fix build

This is a merge conflict between #22740 and #20156.

3 years agoman: cross-link to BLS in more places, use "Type #1", "Type #2" as appropriate 22799/head
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 11:16:35 +0000 (12:16 +0100)] 
man: cross-link to BLS in more places, use "Type #1", "Type #2" as appropriate

3 years agospelling: weekday names are capitalized
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 11:08:41 +0000 (12:08 +0100)] 
spelling: weekday names are capitalized

3 years agoMerge pull request #20156 from poettering/sysupdate
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 11:06:48 +0000 (12:06 +0100)] 
Merge pull request #20156 from poettering/sysupdate

new "systemd-sysupdate" component

3 years agotest-nss-host: increase timeout 22798/head
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:41:40 +0000 (11:41 +0100)] 
test-nss-host: increase timeout

With my crappy home network the test takes 29.5s usually. But with any
tiny slowdown, it goes above the 30s limit and fails. Let's bump the
timeout to avoid spurious failures.

3 years agofuzz: rename fuzz-dhcp-server-relay-message to fuzz-dhcp-server-relay
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:36:45 +0000 (11:36 +0100)] 
fuzz: rename fuzz-dhcp-server-relay-message to fuzz-dhcp-server-relay

We can only relay messages, so we can make the name shorter without
losing informational value. This makes meson test output look better.

3 years agofuzz: rename the longest test samples
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:22:51 +0000 (11:22 +0100)] 
fuzz: rename the longest test samples

"meson test" uses a test name generated from the file name and those long names
cause the test log output to exceed terminal width which looks bad. Let's replace
some long names with more-meaningful names that actually say something about
the tests.

3 years agoMerge pull request #22740 from yuwata/list
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 09:52:03 +0000 (10:52 +0100)] 
Merge pull request #22740 from yuwata/list

tree-wide: declare iterator of LIST_FOREACH() in the loop

3 years agoMerge pull request #22789 from poettering/timesync-struct-log
Yu Watanabe [Sun, 20 Mar 2022 17:26:59 +0000 (02:26 +0900)] 
Merge pull request #22789 from poettering/timesync-struct-log

timesyncd: various refactorings and cleanup + structured log msg on first sync

3 years agopo: fix "sistemd" typo in it.po
Andrea Pappacoda [Thu, 17 Mar 2022 20:20:27 +0000 (21:20 +0100)] 
po: fix "sistemd" typo in it.po

Also use "ricaricare" instead of "riavviare" for "reload"

3 years agostrv: make iterator in STRV_FOREACH() declaread in the loop 22740/head
Yu Watanabe [Wed, 16 Mar 2022 13:32:23 +0000 (22:32 +0900)] 
strv: make iterator in STRV_FOREACH() declaread in the loop

This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()

3 years agoupdate TODO 20156/head
Lennart Poettering [Wed, 16 Jun 2021 11:11:42 +0000 (13:11 +0200)] 
update TODO

3 years agotest: add integration test for sysupdate
Lennart Poettering [Thu, 19 Aug 2021 14:54:40 +0000 (16:54 +0200)] 
test: add integration test for sysupdate

3 years agoman: add sysupdate documentation
Lennart Poettering [Mon, 5 Jul 2021 15:55:58 +0000 (17:55 +0200)] 
man: add sysupdate documentation

3 years agounit: add units for new "systemd-sysupdate" tool
Lennart Poettering [Wed, 16 Jun 2021 10:00:34 +0000 (12:00 +0200)] 
unit: add units for new "systemd-sysupdate" tool

These unit (if enabled) will try to update the OS in regular intervals.
Moreover, every day in the early morning this will attempt to reboot the
system if there's a newer version installed than running.

3 years agosysupdate: add new component "sysupdate"
Lennart Poettering [Mon, 28 Dec 2020 14:17:54 +0000 (15:17 +0100)] 
sysupdate: add new component "sysupdate"

3 years agolist: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer
Yu Watanabe [Tue, 15 Mar 2022 07:47:01 +0000 (16:47 +0900)] 
list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer

3 years agolist: declare iterator of LIST_FOREACH() in the loop
Yu Watanabe [Tue, 15 Mar 2022 07:14:53 +0000 (16:14 +0900)] 
list: declare iterator of LIST_FOREACH() in the loop

3 years agotimesyncd: improve log message whe getting a reply from server 22789/head
Lennart Poettering [Fri, 18 Mar 2022 15:58:26 +0000 (16:58 +0100)] 
timesyncd: improve log message whe getting a reply from server

The message is misleading: it's not about synchronization but about
successful communicaiton. And it's not about "initial", but only about
first contact since we siwtched to this server.

Let's hence reword the message a bit.

3 years agotimesyncd: generate a structure log message the first time we set the clock correctly
Lennart Poettering [Fri, 18 Mar 2022 15:52:06 +0000 (16:52 +0100)] 
timesyncd: generate a structure log message the first time we set the clock correctly

Usecase: later on we can use this to retroactively adjust log output in
journalctl or similar on systems lacking an RTC: we just have to search
for this sructured log message that indicates the first sync point and
can then retroactively adjust the incorrect timestamps collected before
that.

3 years agotimesyncd: add debug logging in case we can't touch /run/systemd/timesync/synchronized
Lennart Poettering [Fri, 18 Mar 2022 15:53:46 +0000 (16:53 +0100)] 
timesyncd: add debug logging in case we can't touch /run/systemd/timesync/synchronized

3 years agotimesyncd: when updating timestamp file, use best time we know, instead of system...
Lennart Poettering [Fri, 18 Mar 2022 15:50:59 +0000 (16:50 +0100)] 
timesyncd: when updating timestamp file, use best time we know, instead of system clock

We adjust the system clock slowly after all, even if we know a more
accurate time. Use the accurate time for the timestamp.

3 years agotimesyncd: rename bool 'good' → 'talking'
Lennart Poettering [Fri, 18 Mar 2022 15:57:56 +0000 (16:57 +0100)] 
timesyncd: rename bool 'good' → 'talking'

THe name is just too generic. Let's pick a name that makes clear that
this is about successful communication.

3 years agotimesyncd: don't abort packet handling if we can't save the timestamp to disk
Lennart Poettering [Fri, 18 Mar 2022 15:30:26 +0000 (16:30 +0100)] 
timesyncd: don't abort packet handling if we can't save the timestamp to disk

This should not be a fatal error, and it isn't in the other place we
call this.

3 years agosd-event: add a single implementation of an event source that runs on clock changes
Lennart Poettering [Fri, 18 Mar 2022 15:28:38 +0000 (16:28 +0100)] 
sd-event: add a single implementation of an event source that runs on clock changes

We basically had the same code in three places. Let's unify it in a
common helper function.

event_add_time_change() might be something we should add to the official
sd-event API sooner or later, given its general usefulness.

3 years agotimesyncd: move stuff that is not about setting the clock out of manager_adjust_clock()
Lennart Poettering [Fri, 18 Mar 2022 14:53:25 +0000 (15:53 +0100)] 
timesyncd: move stuff that is not about setting the clock out of manager_adjust_clock()

Let's make sure manager_adjust_clock() is purely about setting the
clock, and nothing else.

Let's clean up logging this way. manager_adjust_clock() now won#t log
about errors, but the caller can safely do that, and do with the right
log message string.

3 years agotimesyncd: use CMSG_FIND_DATA() macro where appropriate
Lennart Poettering [Fri, 18 Mar 2022 14:52:06 +0000 (15:52 +0100)] 
timesyncd: use CMSG_FIND_DATA() macro where appropriate

3 years agotimesyncd: merge some variable declarations
Lennart Poettering [Fri, 18 Mar 2022 15:55:29 +0000 (16:55 +0100)] 
timesyncd: merge some variable declarations

3 years agotimesyncd: rebreak some comments
Lennart Poettering [Fri, 18 Mar 2022 14:27:20 +0000 (15:27 +0100)] 
timesyncd: rebreak some comments

3 years agotimesyncd: add comment what bool arg is
Lennart Poettering [Fri, 18 Mar 2022 13:07:22 +0000 (14:07 +0100)] 
timesyncd: add comment what bool arg is

3 years agotimesyncd: make a constant structure actually static/const
Lennart Poettering [Fri, 18 Mar 2022 13:06:47 +0000 (14:06 +0100)] 
timesyncd: make a constant structure actually static/const

3 years agotimesyncd: cast some function invocations to void
Lennart Poettering [Fri, 18 Mar 2022 13:06:26 +0000 (14:06 +0100)] 
timesyncd: cast some function invocations to void

3 years agotimesyncd: get rid of unnecessary 'r' assignments
Lennart Poettering [Fri, 18 Mar 2022 15:55:24 +0000 (16:55 +0100)] 
timesyncd: get rid of unnecessary 'r' assignments

3 years agotimesyncd: use structured initialization more
Lennart Poettering [Fri, 18 Mar 2022 13:03:23 +0000 (14:03 +0100)] 
timesyncd: use structured initialization more

3 years agovarious: make parse_env_file error handling the same in various places
Zbigniew Jędrzejewski-Szmek [Thu, 10 Mar 2022 17:45:52 +0000 (18:45 +0100)] 
various: make parse_env_file error handling the same in various places

No big reason to do this, except that I was looking at all call sites
and it's nicer if the same style is used accross the codebase.

3 years agoboot: Draw unicode separator line for status messages
Jan Janssen [Tue, 25 Jan 2022 12:48:27 +0000 (13:48 +0100)] 
boot: Draw unicode separator line for status messages

3 years agoMerge pull request #22519 from poettering/boot-order-title-revert
Zbigniew Jędrzejewski-Szmek [Fri, 18 Mar 2022 18:04:48 +0000 (19:04 +0100)] 
Merge pull request #22519 from poettering/boot-order-title-revert

sd-boot: rework boot entry sorting

3 years agostrv: use STRV_FOREACH() at two more places
Yu Watanabe [Wed, 16 Mar 2022 13:30:13 +0000 (22:30 +0900)] 
strv: use STRV_FOREACH() at two more places

3 years agostrv: rewrite strv_copy() with cleanup attribute and STRV_FOREACH()
Yu Watanabe [Wed, 16 Mar 2022 13:29:32 +0000 (22:29 +0900)] 
strv: rewrite strv_copy() with cleanup attribute and STRV_FOREACH()

3 years agotime-util: add macros around timespec_store() that operates on compund literal alloca...
Lennart Poettering [Fri, 18 Mar 2022 13:19:20 +0000 (14:19 +0100)] 
time-util: add macros around timespec_store() that operates on compund literal allocated timespec struct

This way we can convert usec_t to timespec on-the-fly, without a buffer.

No actual behaviour change just some shortening of code.

3 years agoshell-completion: Add completion for oomctl
Nishal Kulkarni [Fri, 18 Mar 2022 09:11:42 +0000 (14:41 +0530)] 
shell-completion: Add completion for oomctl

Added bash and zsh completions for oomctl arguments and commands.

Related To: #22118

3 years agoMerge pull request #22787 from poettering/bootspec-split
Lennart Poettering [Fri, 18 Mar 2022 13:22:07 +0000 (14:22 +0100)] 
Merge pull request #22787 from poettering/bootspec-split

shared: split bootspec.c in two

3 years agoAdd HP Elitebook 2760p support (#22766)
AlexCatze [Fri, 18 Mar 2022 12:45:43 +0000 (14:45 +0200)] 
Add HP Elitebook 2760p support (#22766)

3 years agomeson: sort shared source file list again 22787/head
Lennart Poettering [Fri, 18 Mar 2022 10:51:08 +0000 (11:51 +0100)] 
meson: sort shared source file list again

3 years agoshared: split out ESP/XBOOTLDR search stuff from bootspec.c
Lennart Poettering [Fri, 18 Mar 2022 10:49:39 +0000 (11:49 +0100)] 
shared: split out ESP/XBOOTLDR search stuff from bootspec.c

The code is quite different from the rest of bootspec.c, with different
deps and stuff. There's even a /***/ line to separate the two parts.
Given how large the file already is, let#s just split it into two.

No code changes, just some splitting out.

3 years agoupdate TODO 22519/head
Lennart Poettering [Tue, 15 Mar 2022 13:43:58 +0000 (14:43 +0100)] 
update TODO

3 years agotest: add test that verifies correct order of boot entries
Lennart Poettering [Mon, 7 Mar 2022 17:00:55 +0000 (18:00 +0100)] 
test: add test that verifies correct order of boot entries

3 years agokernel-install: automatically generate "sort-key" field
Lennart Poettering [Tue, 15 Feb 2022 13:27:01 +0000 (14:27 +0100)] 
kernel-install: automatically generate "sort-key" field

Let's order by IMAGE_ID=/ID= by default.

3 years agosd-boot: add comments highlighting type 1 vs. type 2
Lennart Poettering [Tue, 15 Feb 2022 13:26:50 +0000 (14:26 +0100)] 
sd-boot: add comments highlighting type 1 vs. type 2

3 years agosd-boot: make use of new "sort-key" boot loader spec field
Lennart Poettering [Tue, 15 Feb 2022 13:24:53 +0000 (14:24 +0100)] 
sd-boot: make use of new "sort-key" boot loader spec field

3 years agodocs: add new "sort-key" field to boot loader spec
Lennart Poettering [Tue, 15 Feb 2022 13:19:40 +0000 (14:19 +0100)] 
docs: add new "sort-key" field to boot loader spec

This allows snippet generators to explicitly order entries: any string
can be set as an entry's "sort key". If set, sd-boot will use it to sort
entries on display.

New logic is hence (ignore the boot counting logic)

  sort-key is set → primary sort key: sort-key (lexicographically increasing order)
                  → secondary sort key: machine-id (also increasing order)
                  → tertiary sort key: version (lexicographically decreasing order!)

  sort-key is not set → primary sort key: entry filename (aka id), lexicographically increasing order)

With this scheme we can order OSes by their names from A-Z but then put
within the same OS still the newest version first. This should clean up
the order to match expectations more.

Based on discussions here:

https://github.com/systemd/systemd/pull/22391#issuecomment-1040092633

3 years agoRevert "boot: Change boot entry sorting"
Lennart Poettering [Tue, 15 Feb 2022 09:25:37 +0000 (10:25 +0100)] 
Revert "boot: Change boot entry sorting"

This reverts commit 9818ec8ea56e14902ac8e548a0f366dbb259f051.

3 years agodoc: mention that setfsuid() is a reason why UIDs >= 2147483648 are icky
Lennart Poettering [Fri, 18 Mar 2022 10:49:05 +0000 (11:49 +0100)] 
doc: mention that setfsuid() is a reason why UIDs >= 2147483648 are icky

3 years agoMerge pull request #22784 from poettering/bootctl-fixlets
Lennart Poettering [Fri, 18 Mar 2022 10:53:08 +0000 (11:53 +0100)] 
Merge pull request #22784 from poettering/bootctl-fixlets

Trivial bootctl/kernel-install fixlets

3 years agosystemctl: fix operations on relative paths
Zbigniew Jędrzejewski-Szmek [Wed, 2 Mar 2022 14:29:45 +0000 (15:29 +0100)] 
systemctl: fix operations on relative paths

We should treat ./some.service and $PWD/some.service as equivalent. But we'd
try to send the relative paths over dbus, which can't work well:

$ sudo systemctl enable ./test2.service
Failed to look up unit file state: Invalid argument
$ sudo systemctl enable $PWD/test2.service
Created symlink /etc/systemd/system/multi-user.target.wants/test2.service → /home/zbyszek/src/systemd/test2.service.
Created symlink /etc/systemd/system/test2.service → /home/zbyszek/src/systemd/test2.service.

Now both are equivalent.

3 years agoshared/install-printf: drop now-unused install_path_printf()
Zbigniew Jędrzejewski-Szmek [Tue, 8 Mar 2022 10:49:19 +0000 (11:49 +0100)] 
shared/install-printf: drop now-unused install_path_printf()

3 years agoshared/install: do not print aliases longer than UNIT_NAME_MAX
Zbigniew Jędrzejewski-Szmek [Tue, 8 Mar 2022 10:47:23 +0000 (11:47 +0100)] 
shared/install: do not print aliases longer than UNIT_NAME_MAX

065364920281e1cf59cab989e17aff21790505c4 did the conversion to install_path_printf().
But IIUC, here we are just looking at a unit file name, not the full
path.

3 years agobasic/env-file: inline one variable declaration
Zbigniew Jędrzejewski-Szmek [Thu, 10 Mar 2022 17:29:03 +0000 (18:29 +0100)] 
basic/env-file: inline one variable declaration

3 years agosystemctl: remove unused parameter
Zbigniew Jędrzejewski-Szmek [Mon, 14 Mar 2022 10:42:57 +0000 (11:42 +0100)] 
systemctl: remove unused parameter

3 years agosystemctl: drop left-over parens
Zbigniew Jędrzejewski-Szmek [Thu, 10 Mar 2022 15:48:04 +0000 (16:48 +0100)] 
systemctl: drop left-over parens

3 years agoman/systemd.exec: tweak markup a bit
Zbigniew Jędrzejewski-Szmek [Wed, 9 Mar 2022 13:45:59 +0000 (14:45 +0100)] 
man/systemd.exec: tweak markup a bit

3 years agoshared/install: adjust comment formatting
Zbigniew Jędrzejewski-Szmek [Tue, 8 Mar 2022 15:43:43 +0000 (16:43 +0100)] 
shared/install: adjust comment formatting

3 years agotree-wide: use strv_contains() in more places
Zbigniew Jędrzejewski-Szmek [Mon, 7 Mar 2022 18:28:11 +0000 (19:28 +0100)] 
tree-wide: use strv_contains() in more places

3 years agoshared/install: drop unnecessary casts
Zbigniew Jędrzejewski-Szmek [Wed, 2 Mar 2022 16:19:56 +0000 (17:19 +0100)] 
shared/install: drop unnecessary casts

The compiler coerces to bool for us, no need to do it explicitly.

3 years agoshared/install: drop unnecessary parentheses
Zbigniew Jędrzejewski-Szmek [Wed, 2 Mar 2022 16:17:54 +0000 (17:17 +0100)] 
shared/install: drop unnecessary parentheses

3 years agoshell-completion: Add completion in bootctl
Nishal Kulkarni [Fri, 18 Mar 2022 06:59:36 +0000 (12:29 +0530)] 
shell-completion: Add completion in bootctl

Added new completion for `--make-machine-id-directory`
provideds 3 options(yes no auto)

Closes: #22308
3 years agoshared/install: consistently use 'lp' as the name for the LookupPaths instance
Zbigniew Jędrzejewski-Szmek [Wed, 2 Mar 2022 16:17:39 +0000 (17:17 +0100)] 
shared/install: consistently use 'lp' as the name for the LookupPaths instance

Most of the codebase does this. Here we were using 'p' or 'paths'
instead. Those names are very generic and not good for a "global-like"
object like the LookupPaths instance. And we also have 'path' variable,
and it's confusing to have 'path' and 'paths' in the same function that
are unrelated.

Also pass down LookupPaths* lower in the call stack, in preparation for
future changes.

3 years agoAdd tests and documentation for all remaining sandboxing in user manager
Luca Boccassi [Sat, 12 Mar 2022 21:16:32 +0000 (21:16 +0000)] 
Add tests and documentation for all remaining sandboxing in user manager

3 years agocore: insist on sandboxing if ExtensionImages/Directories are configured
Luca Boccassi [Thu, 17 Mar 2022 23:37:29 +0000 (23:37 +0000)] 
core: insist on sandboxing if ExtensionImages/Directories are configured

Same as other image mounting in the namespace

3 years agosd-device: shorten code a bit
Yu Watanabe [Tue, 8 Mar 2022 05:24:48 +0000 (14:24 +0900)] 
sd-device: shorten code a bit

3 years agosd-device-enumerator: fix typo: contolC -> controlC
Yu Watanabe [Thu, 10 Mar 2022 10:03:23 +0000 (19:03 +0900)] 
sd-device-enumerator: fix typo: contolC -> controlC

Also shorten code a bit.

3 years agosort-util: add missing parens
Yu Watanabe [Sat, 5 Mar 2022 00:43:20 +0000 (09:43 +0900)] 
sort-util: add missing parens

With this, we can call e.g.
```
typesafe_qsort(buf + m, n - m, comp);
```

3 years agobootctl: add comment, explaining when verb_install() is called 22784/head
Lennart Poettering [Thu, 17 Mar 2022 17:54:15 +0000 (18:54 +0100)] 
bootctl: add comment, explaining when verb_install() is called

3 years agobootctl: use faccessat() more
Lennart Poettering [Thu, 17 Mar 2022 17:53:39 +0000 (18:53 +0100)] 
bootctl: use faccessat() more

3 years agobootctl: fix typo
Lennart Poettering [Thu, 17 Mar 2022 17:44:14 +0000 (18:44 +0100)] 
bootctl: fix typo

3 years agokernel-install: drop spurious double empty line
Lennart Poettering [Thu, 17 Mar 2022 17:25:19 +0000 (18:25 +0100)] 
kernel-install: drop spurious double empty line

3 years agokernel-install: make clear which variables are supposed to be placed in install.conf...
Lennart Poettering [Thu, 17 Mar 2022 17:24:51 +0000 (18:24 +0100)] 
kernel-install: make clear which variables are supposed to be placed in install.conf in a comment

3 years agoMerge pull request #22754 from mrc0mmand/creds_dir_specifier
Lennart Poettering [Fri, 18 Mar 2022 08:23:01 +0000 (09:23 +0100)] 
Merge pull request #22754 from mrc0mmand/creds_dir_specifier

core: add %d specifier for the $CREDENTIALS_DIRECTORY

3 years agotree-wide: fix duplicated words
Michael Biebl [Thu, 17 Mar 2022 22:53:03 +0000 (23:53 +0100)] 
tree-wide: fix duplicated words

the the
in in
not not
we we

3 years agoMerge pull request #22752 from yuwata/udev-ctrl-manage-sender-pids
Yu Watanabe [Thu, 17 Mar 2022 22:38:35 +0000 (07:38 +0900)] 
Merge pull request #22752 from yuwata/udev-ctrl-manage-sender-pids

udev: enable Delegate=

3 years agoMerge pull request #22774 from poettering/nspawn-uidmap-fix
Luca Boccassi [Thu, 17 Mar 2022 21:59:29 +0000 (21:59 +0000)] 
Merge pull request #22774 from poettering/nspawn-uidmap-fix

nspawn: uidmap mount fix

3 years agohomed: permit inodes owned by UID_MAPPED_ROOT to be created in $HOME 22774/head
Lennart Poettering [Thu, 17 Mar 2022 14:01:11 +0000 (15:01 +0100)] 
homed: permit inodes owned by UID_MAPPED_ROOT to be created in $HOME

If people use nspawn in their $HOME we should allow this inodes owned by
this special UID to be created temporarily, so that UID mapped nspawn
containers just work.