Samanta Navarro [Sat, 3 Oct 2020 11:56:40 +0000 (11:56 +0000)]
seccomp-util: fix typo in help message
Lennart Poettering [Thu, 1 Oct 2020 12:57:06 +0000 (14:57 +0200)]
github: ask for arch+kernel in bug report form
Quite often we see kernel and arch specific issues, let's ask for the
version right-away when people file the issue.
Other tweaks.
Lennart Poettering [Fri, 2 Oct 2020 09:01:30 +0000 (11:01 +0200)]
Merge pull request #17172 from keszybz/read-login-defs
Read /etc/login.defs
Zbigniew Jędrzejewski-Szmek [Thu, 1 Oct 2020 18:01:46 +0000 (20:01 +0200)]
Merge pull request #17219 from poettering/exec-root-dir
minor tweaks to execute.[ch]
Zbigniew Jędrzejewski-Szmek [Thu, 1 Oct 2020 16:18:26 +0000 (18:18 +0200)]
sysusers: emit warnings about login.defs overrides on first user or group creation
*** Running /home/zbyszek/src/systemd-work/test/test-sysusers/test-14.input (with login.defs symlinked)
login.defs specifies UID allocation range 401–555 that is different than the built-in defaults (201–998)
login.defs specifies GID allocation range 405–666 that is different than the built-in defaults (201–990)
Zbigniew Jędrzejewski-Szmek [Thu, 1 Oct 2020 12:55:22 +0000 (14:55 +0200)]
tests: when creating temp dirs, include test name in path
This makes it easier to figure out which directory we want to look at
when tests fail, and also which test left behind a directory when it
shouldn't.
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 15:16:06 +0000 (17:16 +0200)]
sysusers: look at login.defs when setting the default range to allocate users
Also, even if login.defs are not present, don't start allocating at 1, but at
SYSTEM_UID_MIN.
Fixes #9769.
The test is adjusted. Actually, it was busted before, because sysusers would
never use SYSTEM_GID_MIN, so if SYSTEM_GID_MIN was different than
SYSTEM_UID_MIN, the tests would fail. On all "normal" systems the two are
equal, so we didn't notice. Since sysusers now always uses the minimum of the
two, we only need to substitute one value.
Zbigniew Jędrzejewski-Szmek [Thu, 1 Oct 2020 12:16:46 +0000 (14:16 +0200)]
test-sysusers: fix how paths are calculated
We were looking at ${f%.*}, i.e. the $f with any suffix starting with a dot removed.
This worked fine for paths like /some/path/test-11.input. It also worked
for paths like /some/path/inline (there were no dots, so we got $f back unscathed).
But in the ubuntu CI the package is built in a temporary directory like
/tmp/autopkgtest-lxc.nnnfqb26/downtmp/build.UfW/ (yes, it has a dot, even two.).
That still worked for the first case, but in the second case we truncated things
after the first dot, and we would try to get
/tmp/autopkgtest-lxc.nnnfqb26/downtmp/build and try to load
/tmp/autopkgtest-lxc.nnnfqb26/downtmp/build.expected-password, which obviously
didn't work as expected. To avoid this issue, do the suffix removal only when
we know that there really is a suffix.
A second minor issue was that we would try to copy $1.expected-*, and sometimes
$1 would be given, and sometimes not. Effectively we were relying on there
not being any files matching .expected-*. There weren't any such files, but let's
avoid this ugliness and always pass $1.
Zbigniew Jędrzejewski-Szmek [Sun, 27 Sep 2020 09:30:17 +0000 (11:30 +0200)]
test-sysusers: sort examples
This shouldn't affect the outcome, but makes outputs easier to compare.
Zbigniew Jędrzejewski-Szmek [Sat, 26 Sep 2020 09:58:24 +0000 (11:58 +0200)]
test/TEST-21-SYSUSERS: turn into a unit test
All this test does is manipulate text files in a subdir specified with --testroot.
It can be a normal unittest without the overhead of creating a machine image.
As a bonus, also test the .standalone version.
Zbigniew Jędrzejewski-Szmek [Thu, 1 Oct 2020 11:52:16 +0000 (13:52 +0200)]
basic/fileio: add chase_symlinks_and_fopen_unlocked()
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 15:51:41 +0000 (17:51 +0200)]
shared/uid-range: reduce scope of iterator variables
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 14:50:45 +0000 (16:50 +0200)]
Also parse the minimum uid/gid values
We don't (and shouldn't I think) look at them when determining the type of the
user, but they should be used during user/group allocation. (For example, an
admin may specify SYS_UID_MIN==200 to allow statically numbered users that are
shared with other systems in the range 1–199.)
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 14:31:42 +0000 (16:31 +0200)]
Look at /etc/login.defs for the system_max_[ug]id values
It makes little sense to make the boundary between systemd and user guids
configurable. Nevertheless, a completely fixed compile-time define is not
enough in two scenarios:
- the systemd_uid_max boundary has moved over time. The default used to be
500 for a long time. Systems which are upgraded over time might have users
in the wrong range, but changing existing systems is complicated and
expensive (offline disks, backups, remote systems, read-only media, etc.)
- systems are used in a heterogenous enviornment, where some vendors pick
one value and others another.
So let's make this boundary overridable using /etc/login.defs.
Fixes #3855, #10184.
Lennart Poettering [Thu, 1 Oct 2020 08:53:56 +0000 (10:53 +0200)]
execute: use empty_to_root() a bit more
Lennart Poettering [Thu, 1 Oct 2020 08:42:10 +0000 (10:42 +0200)]
execute: add helper for checking if root_directory/root_image are set in ExecContext
Lennart Poettering [Thu, 1 Oct 2020 09:00:02 +0000 (11:00 +0200)]
Merge pull request #17152 from keszybz/make-mountapivfs-default
Make MountAPIVFS=yes default
Franck Bui [Thu, 1 Oct 2020 08:51:19 +0000 (10:51 +0200)]
Merge pull request #17214 from poettering/log-generator-fix
fix logging in generators
Lennart Poettering [Thu, 1 Oct 2020 08:26:24 +0000 (10:26 +0200)]
Merge pull request #17154 from keszybz/crypttab-commas
Allow escaping commas in crypttab
Lennart Poettering [Thu, 1 Oct 2020 08:24:44 +0000 (10:24 +0200)]
Merge pull request #17213 from keszybz/man-cleanups
Fix links in man pages
Lennart Poettering [Wed, 30 Sep 2020 09:04:08 +0000 (11:04 +0200)]
bootspec: don't fail with EIO if searching for ESP and finding one without an enveloping partition table
If this happens this should just mean: we couldn't find the ESP.
Fixes: #17122
Lennart Poettering [Wed, 30 Sep 2020 14:19:12 +0000 (16:19 +0200)]
generator: use kmsg in system-level generators, journal otherwise
Fixes: #17129.
Lennart Poettering [Wed, 30 Sep 2020 14:17:12 +0000 (16:17 +0200)]
log: normalize log target condition check
THis doesn't change the condition's logic at all, but is an attempt to
make things a bit more readable: instead of checking log_target !=
LOG_TARGET_AUTO let's actually list the targets where we want to
consider journal/syslog/kmsg, to make things a bit less confusing. After
all the message here is not to avoid them if LOG_TARGET_AUTO is set, but
to definitely do them in the other cases.
Lennart Poettering [Wed, 30 Sep 2020 14:06:53 +0000 (16:06 +0200)]
log: update comment
The logic was changed in
bc694c06e60505efeb09e5278a7b22cdfa23975e, let's
update the comment accordingly.
Jan Schlüter [Wed, 30 Sep 2020 08:34:35 +0000 (10:34 +0200)]
Add Aiptek Hyperpen 6000U to hwdb
Lennart Poettering [Wed, 23 Sep 2020 08:09:53 +0000 (10:09 +0200)]
man: mention that sd_bus_send() buffers locally, and sd_bus_process() is needed to flush it out
Prompted-by: #17128
Zbigniew Jędrzejewski-Szmek [Wed, 30 Sep 2020 12:57:21 +0000 (14:57 +0200)]
man: correct various links
As usual, linkchecker ftw!
Zbigniew Jędrzejewski-Szmek [Wed, 30 Sep 2020 12:52:48 +0000 (14:52 +0200)]
Zbigniew Jędrzejewski-Szmek [Wed, 30 Sep 2020 12:24:01 +0000 (14:24 +0200)]
man/html: fix invocation for pages which are *not* symlinks
It seems I tested that redirects work, but I forgot to check that non-redirects
are still fine too ;(
Lennart Poettering [Mon, 21 Sep 2020 16:25:46 +0000 (18:25 +0200)]
homed: explicitly deactivate all home directories on shutdown
Let's explicitly deactivate all home dirs on shutdown, in order to
properly synchronizing unmounting and avoiding blocking devices.
Previously, we'd rely on automatic deactivation when home directories
become unused. However, that scheme is asynchronous, and ongoing
deactviations might conflicts with attempts to unmount /home. Let's fix
that by providing an explicit service systemd-homed-activate.service
whose only job is to have a ExecStop= line that explicitly deactivates
all home directories on shutdown. This service can the be ordered after
home.mount and similar, ensuring that we'll first deactivate all homes
before deactivating /home itself during shutdown.
This is kept separate from systemd-homed.service so that it is possible
to restart systemd-homed.service without deactivating all home
directories.
Fixes: #16842
Lennart Poettering [Wed, 30 Sep 2020 12:37:24 +0000 (14:37 +0200)]
Merge pull request #17203 from poettering/resolv-conf-mode
expose resolv.conf mode bus property
Lennart Poettering [Wed, 30 Sep 2020 12:16:05 +0000 (14:16 +0200)]
Merge pull request #17195 from keszybz/man-cleanups
Man page cleanups
Lennart Poettering [Wed, 30 Sep 2020 08:55:18 +0000 (10:55 +0200)]
Merge pull request #17087 from yuwata/man-initial-congestion-window
man: update InitialCongestionWindow= and InitialAdvertisedReceiveWindow=
Lennart Poettering [Tue, 29 Sep 2020 14:10:40 +0000 (16:10 +0200)]
resolved: turn off that a search domain is derived from the host's fqdn
If the hostname of a system is set to an fqdn, glibc traditionally
derives a search domain from it if none is explicitly configured.
This is a bit weird, and we currently don't do that in our own search
path logic.
Following #17193 let's turn this behaviour off for now.
Yes, this has a slight chance of pissing people off who think this
behaviour is good. If this is indeed an issue, we can revisit the issue
but in that case if we readd the concept we should do it properly:
derive the search domain from the fqdn in our codebase too and report it
in resolvectl, and in our generated stub files. But I have the suspicion
most people who set the hostname to an fqdn aren#t even aware of this
behaviour nor want it, so let's wait until people complain.
Fixes: #17193
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 10:31:27 +0000 (12:31 +0200)]
man: assorted small fixes
This is almost all of #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 10:27:19 +0000 (12:27 +0200)]
man/systemd.network(5): unify descriptions of MUDURL=
Let's write one good description and refer to it from the other two
spots.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 10:16:12 +0000 (12:16 +0200)]
man: in systemd-nspawn(1), refer to systemd.exec(5) for the shared stuff
We should avoid duplicating lengthy description of very similar concepts.
--root-hash-sig follows the same semantics as RootHashSig=, so just refer
the reader to the other man page. --root-hash doesn't implement the same
features as RootHash=, so we can't fully replace the description, but let's
give the user a hint to look at the other man page too.
For #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 08:10:35 +0000 (10:10 +0200)]
man: link to fork(2) more prominently
For #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 08:04:12 +0000 (10:04 +0200)]
man: do not index various /foobar/ paths
For #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 07:55:00 +0000 (09:55 +0200)]
man: refer to the right man page for Environment=
For #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 07:43:18 +0000 (09:43 +0200)]
man: reword description of "-" in sysctl.d(5)
For #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 07:30:42 +0000 (09:30 +0200)]
man: explain why TZ=: is used
Also, reword the description a bit. "As a string" is meaningless in the context
of commandline arguments, where evyrything is a string. This is not a
strongly-typed programming language where 5 is a number but "5" is something
completely different. Here both 5 and "5" are indistinguishable. The original
text was trying to say that a location name should be given and not a number,
so say "time zone location name".
For #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 07:21:15 +0000 (09:21 +0200)]
man: adjustments in file-hierarchy(7)
In table titles, capitalize only the first word (they are rather long and
it is easier to read when it looks like a normal sentence).
Adjust some phrases to make them clearer when reported as unclear in #17177.
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 06:03:10 +0000 (08:03 +0200)]
man,units: link to the new dbus-api man pages
Zbigniew Jędrzejewski-Szmek [Wed, 30 Sep 2020 08:28:51 +0000 (10:28 +0200)]
Merge pull request #17199 from poettering/log-tid
include thread ID in log output
Lennart Poettering [Tue, 29 Sep 2020 15:28:31 +0000 (17:28 +0200)]
resolvectl: show resolv.conf mode in resolvectl output
Lennart Poettering [Tue, 29 Sep 2020 15:25:15 +0000 (17:25 +0200)]
resolved: expose a new bus property that informs about the /etc/resolv.conf mode
It can be one of "foreign", "missing", "stub", "static", "uplink",
depending on how /etc/resolv.conf is set up:
foreign → someone/something else manages /etc/resolv.conf,
systemd-resolved is just the consumer
missing → /etc/resolv.conf is missing altogether
stub/static/uplink → the file is managed by resolved, with the
well-known modes
Fixes: #17159
Ronan Pigott [Wed, 30 Sep 2020 06:51:08 +0000 (23:51 -0700)]
loginctl: add -P as short for --value --property=
nl6720 [Wed, 30 Sep 2020 05:09:25 +0000 (08:09 +0300)]
sysusers: use "!*" instead of "!!" as an invalid group password
This basically implements
fc58c0c7bf7e4f525b916e3e5be0de2307fef04e for gshadow.
gpasswd may not have a lock/unlock that behaves the same as passwd, but
according to gshadow(5) the logic of the password field is the same.
Lennart Poettering [Tue, 29 Sep 2020 13:59:28 +0000 (15:59 +0200)]
seccomp-util: add cacheflush() syscall to @default syscall set
This is like membarrier() I guess and basically just exposes CPU
functionality via kernel syscall on some archs. Let's whitelist it for
everyone.
Fixes: #17197
RussianNeuroMancer [Wed, 30 Sep 2020 02:07:53 +0000 (10:07 +0800)]
Calendar and micmute hotkeys on HP EliteBook Folio G1
This commit add calendar and micmute hotkeys for HP EliteBook Folio G1, and also correct name of other laptop from HP EliteBook Folio series - HP EliteBook Folio 1040 G2
Ronan Pigott [Wed, 30 Sep 2020 07:11:48 +0000 (00:11 -0700)]
zsh: loginctl: complete alias 'self'
Pass Automated Testing Suite [Mon, 28 Sep 2020 15:49:55 +0000 (17:49 +0200)]
path-lookup: Correct order of XDG_CONFIG_HOME and XDG_CONFIG_DIRS
According to the XDG Base Directory Specification [1] XDG_CONFIG_HOME
should take precedence over XDG_CONFIG_DIRS.
Fixes: https://github.com/systemd/systemd/issues/16095
[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
nl6720 [Tue, 29 Sep 2020 13:10:08 +0000 (16:10 +0300)]
docs: update old documentation links
Yu Watanabe [Tue, 29 Sep 2020 04:44:28 +0000 (13:44 +0900)]
udevadm: do not ignroe error caused by unpriviledged user invoking the command
This effectively reverts commit
67acde4869a9505f9721e31fa5167c82445e0e12.
After commits
569ad251adde02dc0915758fe027e0346e50738a and
67acde4869a9505f9721e31fa5167c82445e0e12, -EACCES errors are ignored,
and thus 'udevadm trigger' succeeds even when it is invoked by non-root
users. Moreover, on -EACCES error, log messages are shown in debug
level, so usually we see no message, and users are easily confused
why uevents for devices are not triggered.
Lennart Poettering [Tue, 29 Sep 2020 11:07:07 +0000 (13:07 +0200)]
log: include TID= field in structred log output
It always was the intention to expose this as trusted field _TID=, i.e.
automatically determine it from journald via some SCM_xyz field or so,
but this is never happened, and it's unlikely this will be added anytime
soon to the kernel either, hence let's just generate this sender side,
even if it means it's untrusted.
Lennart Poettering [Tue, 29 Sep 2020 11:06:12 +0000 (13:06 +0200)]
log: optionally display thread ID in log output to tty
This is very useful when playing around with threaded tests, but should
be useful in other cases too.
Lennart Poettering [Tue, 29 Sep 2020 13:50:06 +0000 (15:50 +0200)]
Merge pull request #17194 from poettering/dot-suffix
resolved: turn off search domain logic for queries for dot-suffixed domains
Zbigniew Jędrzejewski-Szmek [Tue, 29 Sep 2020 11:53:41 +0000 (13:53 +0200)]
Merge pull request #17190 from poettering/udev-opath
udev: manipulate device nodes with O_PATH
Lennart Poettering [Tue, 29 Sep 2020 09:53:31 +0000 (11:53 +0200)]
resolved: imply SD_RESOLVED_NO_SEARCH when looking up trailing dot domains
Let's turn off the search domain logic if a trailing dot is specified
when looking up hostnames and RRs via the Varlink + D-Bus APIs (and thus
also when doing so via nss-resolve). (This doesn't affect lookups via
the stub, since for the any search path logic is done client side
anyway)
It might make sense to force the DNS protocol in this case too (and
disable LLMR + mDNS), but we'll leave that for a different PR — if it
even makes sense. It might also make sense to disable the logic of never
routing single-label lookups to the Internet if a trailing to is
specified, but this needs more discussion too.
Lennart Poettering [Tue, 29 Sep 2020 09:52:15 +0000 (11:52 +0200)]
dns-domain: add helper that checks whether domain is dot suffixed
Yu Watanabe [Thu, 17 Sep 2020 08:01:36 +0000 (17:01 +0900)]
man: update InitialCongestionWindow= and InitialAdvertisedReceiveWindow=
Fixes #16643.
Anita Zhang [Tue, 29 Sep 2020 06:48:28 +0000 (23:48 -0700)]
Merge pull request #17186 from poettering/tmpfiles-cleanup-man-fix
man: fix reference to unit file
Yu Watanabe [Tue, 29 Sep 2020 04:55:14 +0000 (13:55 +0900)]
network: limit InitialCongestionWindow= and InitialAdvertisedReceiveWindow= value
Strivtly speaking, this breaks backward compatibility. But setting
too large value into them, then their networking easily breaks.
Note that typically 100 for them is event too large. So, ommiting the
values equal or higher than 1024, and dropping support of k, M, and G
suffixes is OK for normal appropriate use cases.
See discussion in #16643.
Lennart Poettering [Mon, 14 Sep 2020 19:58:40 +0000 (21:58 +0200)]
udev: apply access mode/ownership to device nodes with O_PATH
Let's open the device node to modify with O_PATH, and then adjust it
only after verifying everything is in order. This fixes a race where the
a device appears, disappears and quickly reappers, while we are still
running the rules for the first appearance: when going by path we'd
possibly adjust half of the old and half of the new node. By O_PATH we
can pin the node while we operate on it, thus removing the race.
Previously, we'd do a superficial racey check if the device node changed
undearneath us, and would propagate EEXIST in that case, failing the
rule set. With this change we'll instead gracefully handle this, exactly
like in the pre-existing case when the device node disappeared in the
meantime.
Lennart Poettering [Fri, 25 Sep 2020 14:40:02 +0000 (16:40 +0200)]
fs-util: add new futimens_opath() helper
futimens() that works for O_PATH fds.
Lennart Poettering [Mon, 14 Sep 2020 19:54:20 +0000 (21:54 +0200)]
selinux: add apis to set labels/fix labels per fd instead of path
Lennart Poettering [Fri, 25 Sep 2020 14:48:07 +0000 (16:48 +0200)]
udev-util: simplify device_is_renaming() error handling
Lennart Poettering [Mon, 28 Sep 2020 14:29:20 +0000 (16:29 +0200)]
update TODO
Lennart Poettering [Mon, 28 Sep 2020 14:29:36 +0000 (16:29 +0200)]
man: fix reference to unit file
It' "systemd-tmpfiles-clean" not "systemd-tmpfiles-cleanup"
Fixes: #17171
RussianNeuroMancer [Sun, 27 Sep 2020 01:25:27 +0000 (09:25 +0800)]
Prevent triple reporting of rfkill button on HP Elite x2 1013 G3, plus five other hotkeys
1. rfkill hotkey is reported from three source: keyboard, Intel HID and HP Wireless hotkeys. Let's block first two.
2. Correct mapping for calendar, micmute, display and brightness hotkeys.
Anita Zhang [Thu, 17 Sep 2020 08:49:17 +0000 (01:49 -0700)]
core: move reset_arguments() to the end of main's finish
Fixes #16991
fb39af4ce42d7ef9af63009f271f404038703704 replaced `free_arguments()` with
`reset_arguments()`, which frees arg_* variables as before, but also resets all
of them to the default values. `reset_arguments()` was positioned
in such a way that it overrode some arg_* values still in use at shutdown.
To avoid further unintentional resets, I moved `reset_arguments()`
right before the return, when nothing else will be using the arg_* variables.
RussianNeuroMancer [Fri, 25 Sep 2020 18:03:50 +0000 (02:03 +0800)]
Add accel mount matrix for Irbis NB111 transformer
bauen1 [Fri, 25 Sep 2020 16:45:29 +0000 (18:45 +0200)]
core: ensure that namespace tmp directories always get the correct label
If a namespace with PrivateTmp=true is constructed we need to restore
the context of the namespaces /tmp directory (i.e.
/tmp/systemd-private-XXXXX/tmp) to the (default) context of /tmp .
Otherwise filetransitions might result in the namespaces tmp directory
having the wrong context.
Samuel BF [Sun, 27 Sep 2020 20:01:44 +0000 (22:01 +0200)]
Removing unused n_fields in journal-gatewayd
Luca Boccassi [Fri, 25 Sep 2020 10:19:56 +0000 (11:19 +0100)]
libcrypt-util: use build-time check for crypt_preferred_method
After https://github.com/systemd/systemd/pull/16981 only the presence of crypt_gensalt_ra
is checked, but there are cases where that function is available but crypt_preferred_method
is not, and they are used in the same ifdef.
Add a check for the latter as well.
Oğuz Ersen [Sat, 26 Sep 2020 06:29:30 +0000 (08:29 +0200)]
Translated using Weblate (Turkish)
Currently translated at 100.0% (133 of 133 strings)
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/master
Lennart Poettering [Fri, 25 Sep 2020 15:23:34 +0000 (17:23 +0200)]
repart: use proper API to check if block device can do partition scanning
We have the API wrapper already, hence use it, instead of using a
limited version of it that only works for loopback devices.
huangyong [Fri, 25 Sep 2020 09:49:36 +0000 (17:49 +0800)]
Add Chinese translation
Lennart Poettering [Thu, 24 Sep 2020 13:07:52 +0000 (15:07 +0200)]
mount-util: show mount source in mount_verbose_full() debug output
Lennart Poettering [Fri, 25 Sep 2020 15:55:18 +0000 (17:55 +0200)]
Merge pull request #17166 from poettering/loop-mini-fixes
two minor fixes to the loop block device handling
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 14:09:00 +0000 (16:09 +0200)]
coredump: use uid_is_system() when appropriate
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 11:56:13 +0000 (13:56 +0200)]
Move {uid,gid}_is_*() from basic to shared
Those are functions that express policy, and nothing in basic/ uses
(or should use) them.
Lennart Poettering [Thu, 24 Sep 2020 13:08:22 +0000 (15:08 +0200)]
loop-util: apparently opening a loop device sometimes results in ENXIO, handle this
Lennart Poettering [Thu, 24 Sep 2020 13:09:14 +0000 (15:09 +0200)]
loop-util: use right flags field
Lennart Poettering [Fri, 25 Sep 2020 13:50:15 +0000 (15:50 +0200)]
Merge pull request #17148 from jlebon/pr/crypt-source
cryptsetup-generator: use "/proc/cmdline" as source when appropriate
Zbigniew Jędrzejewski-Szmek [Fri, 25 Sep 2020 11:39:24 +0000 (13:39 +0200)]
Merge pull request #17132 from keszybz/test-suite-update
Test suite updates
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 13:08:44 +0000 (15:08 +0200)]
man: describe comma escaping in crypttab(5)
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 12:55:57 +0000 (14:55 +0200)]
fstab,crypttab: allow escaping of commas
Fixes #17035. We use "," as the separator between arguments in fstab and crypttab
options field, but the kernel started using "," within arguments. Users will need
to escape those nested commas.
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 11:07:51 +0000 (13:07 +0200)]
core/execute: escape the separator in exported paths
Our paths shouldn't even contain ":", but let's escape it if one somehow sneaks
in.
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 11:06:52 +0000 (13:06 +0200)]
basic/strv: allow escaping the separator in strv_join()
The new parameter is false everywhere except for tests, so no functional change
is expected.
Jonathan Lebon [Wed, 23 Sep 2020 19:25:41 +0000 (15:25 -0400)]
cryptsetup-generator: avoid magic value in ternary
`startswith` already returns the string with the prefix skipped, so we
can simplify this further and avoid using a magic value.
Noticed in passing.
Co-authored-by: Lennart Poettering <lennart@poettering.net>
mog422 [Thu, 24 Sep 2020 15:04:52 +0000 (00:04 +0900)]
sd-dhcp6-client: Fix sending prefix delegation request (#17136)
SD_DHCP6_OPTION_IA_NA does not exist in DHCP6_ADVERTISE packet if DHCP server only provides prefix delegation. So the attempt to send the DHCP6_REQUEST packet fails on r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia); forever.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 17:05:17 +0000 (19:05 +0200)]
test-seccomp: accept ENOSYS from sysctl(2) too
It seems that kernel 5.9 started returning that.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 16:26:28 +0000 (18:26 +0200)]
test: switch TEST-02-CRYPTSETUP and TEST-24-UNITTESTS
When tests are executed serially (the default), it seems better to launch
the fairly generic test that runs the unittests early in the sequence.
Right now the tests are ordered based on when they were written, but
this doesn't make much sense.
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 08:54:10 +0000 (10:54 +0200)]
cryptsetup: upgrade log line for option parsing error
If we failed here, we would exit with only a debug message.
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 08:45:25 +0000 (10:45 +0200)]
cryptsetup-generator: drop unused fstat()
The result stopped being used in
71e4e1258436e7e81d772aed52a02bb5d9c87cb8.
Zbigniew Jędrzejewski-Szmek [Wed, 23 Sep 2020 10:20:14 +0000 (12:20 +0200)]
nspawn: give better message when invoked as non-root without arguments
When invoked as non-root, we would suggest re-running as root without any
further hint. But this immediately spawns a machine from the local directory,
which can be rather surprising. So let's give a better hint.
(In general, I don't think commandline programs should do "significant" things
when invoked without any arguments. In this regard it would be better if
systemd-nspawn would not spawn a machine from the current directory if called
with no arguments and at least "-D ." would be required.)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Sep 2020 10:02:48 +0000 (12:02 +0200)]
tree-wide: drop assignments to r when we only need errno
If the whole call is simple and we don't need to look at the return value
apart from the conditional, let's use a form without assignment of the return
value. When the function call is more complicated, it still makes sense to
use a temporary variable.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 10:36:38 +0000 (12:36 +0200)]
TEST-50-DISSECT: drop now-unneeded MountAPIVFS=yes and full paths to executables
With the previous changes we can simplify the invocations in the test a bit.