1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

5509 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
ee224c4d6a pager: make pager secure when under euid is changed or explicitly requested
The variable is renamed to SYSTEMD_PAGERSECURE (because it's not just about
less now), and we automatically enable secure mode in certain cases, but not
otherwise.

This approach is more nuanced, but should provide a better experience for
users:

- Previusly we would set LESSSECURE=1 and trust the pager to make use of
  it. But this has an effect only on less. We need to not start pagers which
  are insecure when in secure mode. In particular more is like that and is a
  very popular pager.

- We don't enable secure mode always, which means that those other pagers can
  reasonably used.

- We do the right thing by default, but the user has ultimate control by
  setting SYSTEMD_PAGERSECURE.

Fixes #5666.

v2:
- also check $PKEXEC_UID

v3:
- use 'sd_pid_get_owner_uid() != geteuid()' as the condition

(cherry picked from commit 0a42426d797406b4b01a0d9c13bb759c2629d108)
2020-12-08 15:54:23 +01:00
Lennart Poettering
19bce9516a pager: set $LESSSECURE whenver we invoke a pager
Some extra safety when invoked via "sudo". With this we address a
genuine design flaw of sudo, and we shouldn't need to deal with this.
But it's still a good idea to disable this surface given how exotic it
is.

Prompted by #5666

(cherry picked from commit 612ebf6c913dd0e4197c44909cb3157f5c51a2f0)
2020-12-08 15:53:39 +01:00
Dmitry Borodaenko
1df745acad typo in systemd.network(5): IPv6PrefixDelegation=dhcpv6
(cherry picked from commit 5fad3913e2db5eda2339419e049af88953c17ff3)
2020-12-08 15:16:17 +01:00
Michal Suchanek
e037fe7241 basic/virt: Detect PowerVM hypervisor
Currently systemd-detect-virt fails to detect running under PowerVM.

Add code to detect PowerVM based on code in util-linux.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
(cherry picked from commit 3224e38bb6b3287ca253cbafb460a150544d5818)
2020-12-08 14:50:55 +01:00
Zbigniew Jędrzejewski-Szmek
ae98ab9e67 man: reword description of KillOnlyUsers=/KillExcludeUsers=
Fixes #17177.

(cherry picked from commit 41b6ae4da3d3e1360a9f78ca3e1176a3bfe2ec2d)
2020-12-08 14:50:46 +01:00
Zbigniew Jędrzejewski-Szmek
92905ae08d man: reword the descriptions of VXLAN DestinationPort= and PortRange=
The usual: "empty string" is meaningless in this context. We are not assigning
DestinationPort="". Just say "unset".

Fixes #17240.

(cherry picked from commit e6fd398d61a9810d53a2a5a30294500718e43286)
2020-12-08 14:50:45 +01:00
Zbigniew Jędrzejewski-Szmek
2e77eda39a man: reword of fido2 key derivation
"keyed by" is indeed a bit jargony. Say " a HMAC hash of the salt combined with
an internal secret key" instead.

For #17177.

(cherry picked from commit e0c60bf6a0065ba447b50fcb1bb171725e8bd00d)
2020-12-08 14:50:43 +01:00
Lennart Poettering
0e4e26bb85 man: fix table alignment
(cherry picked from commit ddd6dd9f2398c01f69acf163bfdedf161d7cea0d)
2020-12-08 14:50:39 +01:00
Lennart Poettering
8763164660 man: mention that sd_bus_send() buffers locally, and sd_bus_process() is needed to flush it out
Prompted-by: #17128
(cherry picked from commit 533ee38b56e881a49481bdc095793c294acce121)
2020-12-08 14:43:10 +01:00
Lennart Poettering
d07f5bbcd9 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
(cherry picked from commit 4261ab654c0df009b5a37a30593d58d47fec617f)
2020-12-08 14:42:14 +01:00
Pass Automated Testing Suite
3102633746 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

(cherry picked from commit e3820eeaf11f3b4614cbdfbc85675bc16a486e21)
2020-12-08 14:39:25 +01:00
nl6720
18e0c98716 docs: update old documentation links
(cherry picked from commit f856778b9c87d2dc9a6924db0cf26374aa7235c3)
2020-12-08 14:39:18 +01:00
Lennart Poettering
f4a3a1cf21 man: fix reference to unit file
It' "systemd-tmpfiles-clean" not "systemd-tmpfiles-cleanup"

Fixes: #17171
(cherry picked from commit 6457e88902a9e2cf0b7f184a8e50a7ef666bcc78)
2020-12-08 14:37:13 +01:00
Roy Chen (陳彥廷)
9192f901bc man: sd_bus_message_new: fix typo
(cherry picked from commit f280aecd38bb1a62ac02fb1033644a97993860b2)
2020-12-08 14:28:03 +01:00
Chris Down
41f9f2816d doc: Put proot under "container" section
Missed in #15426. Otherwise, it ends up only taking the first two rows
of the table, in no section.

(cherry picked from commit 45ba6a585321cc655ce53d22d631747961330d69)
2020-12-08 10:50:21 +01:00
Lennart Poettering
a2a8802abe homed: make clean that --storage=directory --image-path=/dev/some-block-device is not supported
The directory backend needs a file system path, and not a raw block
device. That's only supported for the LUKS2 backend.

Let's make this clearer in the man page and also generate a better error
message if attempted anyway.

Fixes: #17068
(cherry picked from commit f9d525ae558105bf7fd77ad76e4fdb135bb9f634)
2020-09-20 12:09:59 +02:00
Zbigniew Jędrzejewski-Szmek
9353607ef3 man: substitute path to rc.local in the man page
Different systems use different paths for it and users are confused when the
man page has a path different than the one on the local system.

https://bugzilla.redhat.com/show_bug.cgi?id=1876905
(cherry picked from commit c2ee27a5e7fa1c6a71341579baa2d941c6e3e6e6)
2020-09-20 12:04:30 +02:00
Lennart Poettering
366d38d8ed man: document that RemainAfterElapse=no means that also the triggered unit needs to deactivate
Fixes: #16378
(cherry picked from commit 415f8a5bfed4604e4a1bc275682d51af3ad3b611)
2020-09-20 12:00:25 +02:00
Nazar Vinnichuk
fb2afc5f30 man: document the random delay of persistent timers
The manual states that a persistent timer triggers it's service
immediately on activation to catch up with missed invocations, but since
PR #11608 it is no longer the case if RandomizedDelaySec= is set to a
non-zero value.

(cherry picked from commit 5501da15ba34284e50c10ccd6b3ffa8838bb431b)
2020-09-11 20:17:42 +02:00
Lennart Poettering
0ad86030c5 man: document that sd_bus_message_close_container() may only be called at end of container
Prompted-by: https://lists.freedesktop.org/archives/systemd-devel/2020-September/045264.html
(cherry picked from commit 8d29a1b9c52467f1b4c4c4c3c4b1be0dcd2bb5f5)
2020-09-11 20:09:44 +02:00
Zbigniew Jędrzejewski-Szmek
16b9426f70 man: fix quickhelp listing in sysusers.d(5)
Fixes #16958.

(cherry picked from commit fc706b4816f75c01bd78bd5936e5f8740405093a)
2020-09-11 19:53:17 +02:00
Lennart Poettering
5933d77afe doc: cross link sd_listen_fd() docs a bit
Let's make sure the sd_listen_fd() docs are really found from the
.socket file documentation as well as the FileDescriptorStoreMax=
documentation.

Let's also emphasize that that's where the order in which the fds are
passed are documented.

Fixes: #16647
(cherry picked from commit df2f58176d0093f5798240d4d0a69aba21a8f2e2)
2020-09-01 17:28:02 +02:00
Lennart Poettering
20ad76d0a7 man: document fd ownership for sd-bus fd marshalling
Fixes: #8003
(cherry picked from commit e2b40db616b4e723036f72a726e2f2f31d35ffe1)
2020-09-01 17:25:20 +02:00
Lennart Poettering
5ad4e68c37 man: extend on the usec/sec discrepancy
Let's document the discrepancy between the Sec and USec suffixing of
unit files and D-Bus properties at three places: in "systemctl show"
(where it already was briefly mentioned), in the D-Bus interface
description (at one place at least, i.e. the most prominent of
properties that encapsulate time values, there are many more) and in the
general man page explaining time values.

By documenting this at all three places I think we now do as much as we
can do about this highlighting the discrepancy of the naming and the
reasons behind it.

Fixes: #2047
(cherry picked from commit 3c719357dcd56d4c826ec6a4e6870111c2ee8a36)
2020-09-01 17:21:46 +02:00
Yu Watanabe
dcbea51c5a man: clarify that several networkctl commands takes device names
(cherry picked from commit f2c676c6c016e24f246a21d70e359b9358a2f61d)
2020-09-01 17:18:04 +02:00
Lennart Poettering
6d802dd596 man: drop reference to long gone .busname unit type
Seems we missed one occurence.

(cherry picked from commit 68dd195c1b8fdba3fccf166a1c3c2d7ca5a912fe)
2020-08-26 14:35:32 +02:00
Jan Chren
a29656804b man: fix a fix of a typo in systemd.service example
The fix from cb263973acf83de22a86f08fe502a9cbd6c01d2b was made the other way around,
i.e. `SIGKILL` was changed to `SIGUSR1`, but the sentence is about a "termination signal", i.e. `SIGKILL`, not `SIGUSR1`.

(cherry picked from commit be3f62faf5d498aaab4cf6ceb3ca56e0d994ddf5)
2020-08-26 14:35:32 +02:00
Zbigniew Jędrzejewski-Szmek
cab5cde8c9 man: update autogenerated dbus api lists
We forgot to do this before the release :(
Relavant commits are:
4e11ddfdd3c1f93721b8ca534e33e16ced32ff06,
0bb007f7a23c41e23481373ded47ee3ddcf8f26b,
a3d19f5d99c44940831a33df8b5bece4aaf749f7,
bf760801804e55b045aed54bf9b1d0b0131be3f2,
4793c31083031e729e6eb17b87b540a3944bba3b.

Suitable for backporting.

(cherry picked from commit 9653108f1135ad5105fbe71ccf6f818aeb7aa5f8)
2020-08-26 14:35:32 +02:00
Yu Watanabe
0d8000522b man: fix invalid tag place
(cherry picked from commit d91b9bbce881c7e0d2ee80208325be59924b0e8f)
2020-08-26 14:35:32 +02:00
Zbigniew Jędrzejewski-Szmek
ea94f218be man: add conditionals to more man pages
Fixes #16701.

(cherry picked from commit bb5a34fb3eeef824afe02b679d391853244161b1)
2020-08-26 14:35:32 +02:00
Phaedrus Leeds
496a71f444 man: Fix typo in systemd-tmpfiles
(cherry picked from commit c2892a244c82ee142089f8fb7848547dada4ed32)
2020-08-26 14:33:29 +02:00
Nicolas Fella
1e53c2d70f Fix function description in logind man page
Fix a presumed copy&paste error. SetLockedHint corresponds to the "locked hint", not the "idle hint".

(cherry picked from commit 07b4f4496868578e56932a292de0f0b1881ecc84)
2020-08-26 14:33:28 +02:00
Lennart Poettering
208ba581f4 man: fix incorrectly placed full stop
(cherry picked from commit 6b49257f6b92c1bcdf02ca0e896009da36ed9bb0)
2020-08-17 18:27:08 +02:00
Zbigniew Jędrzejewski-Szmek
6c81d57828 man: fix typo
(cherry picked from commit d08a529518c37734e4e77540844373249589fb78)
2020-08-17 18:26:20 +02:00
Lennart Poettering
443aacfcda man: clarify that LogNamespace= is for system services only
Fixes: #16638
(cherry picked from commit a6991726f80c299ac7275f4570e310e1dd5bce96)
2020-08-07 17:01:26 +02:00
Zbigniew Jędrzejewski-Szmek
dda6fec1df man: describe that changing Storage= does not move existing data
Fixes #16384.

(cherry picked from commit f254abcd72b6ca6c4567c245a7dbaf739d02dfc2)
2020-08-07 16:59:32 +02:00
Etienne Doms
cb263973ac man: fix typo in systemd.service 2020-08-01 13:20:08 +02:00
Florian Klink
73b432e7ef network: fix DHCPv6 Prefix Delegation example after option rename
99e015e28c8322bf714f45cd1defcf20ac2103c5 missed to update the example
below - DHCPv6.AssignAcquiredDelegatedPrefixAddress was moved to
DHCPv6PrefixDelegation.Assign.

As it already defaulted to true since it's introduction in
9efa8a3cff9948d3a78597b74dca75c805716de4, there's no need to explicitly
list it at all.
2020-08-01 00:35:35 +09:00
Lennart Poettering
dd57cf6444 meson: run 'ninja man/update-man-rules' again 2020-07-30 04:39:33 +09:00
Lennart Poettering
6b222c4b02 man: fix link markup 2020-07-30 00:51:41 +09:00
Yu Watanabe
99e015e28c network: rename settings about DHCPv6 Prefix Delegation
Closes #16602.
2020-07-29 05:50:08 +09:00
Luca Boccassi
98aac2ad5a doc: update os-release spec with new path for container host's file 2020-07-23 18:47:38 +02:00
Zbigniew Jędrzejewski-Szmek
5cf821acf8 man: do not say that isolate is like switching runlevels
We need to do better here, but for now let's at least not trick
users into nuking their graphical environment. Inspired by #16548.
2020-07-23 15:30:35 +02:00
Lennart Poettering
82ff544160
Merge pull request #16496 from DaanDeMeyer/firstboot-shell
firstboot: Add --root-shell option and tighten up passwd/shadow handling
2020-07-23 08:39:45 +02:00
Daan De Meyer
28900a1bfe firstboot: Add --root-shell option 2020-07-22 21:22:46 +01:00
Daan De Meyer
c4a53ebf7a firstboot: Tighten up passwd/shadow handling
There are a lot of edge cases that the current implementation
doesn't handle, especially in cases where one of passwd/shadow
exists and the other doesn't exist. For example, if
--root-password is specified, we will write /etc/shadow but
won't add a root entry to /etc/passwd if there is none.

To fix some of these issues, we constrain systemd-firstboot to
only modify /etc/passwd and /etc/shadow if both do not exist
already (or --force) is specified. On top of that, we calculate
all necessary information for both passwd and shadow upfront so
we can take it all into account when writing the actual files.

If no root password options are given --force is specified or both
files do not exist, we lock the root account for security purposes.
2020-07-22 21:22:41 +01:00
Zbigniew Jędrzejewski-Szmek
8fa2cd83c6 Revert "man: add note about systemd-vconsole-setup.service and tty as input/output"
This reverts commit 0b578036301d7c3f2dab8df1f31f0121552a4e10.

From https://github.com/systemd/systemd/pull/16503#issuecomment-660212813:
systemd-vconsole-setup (the binary) is supposed to run asynchronously by udev
therefore ordering early interactive services after systemd-vconsole-setup.service
has basically no effect.

Let's remove this paragraph. It's better to say nothing than to give pointless
advice.
2020-07-22 10:43:52 +02:00
Zbigniew Jędrzejewski-Szmek
f25e9eda52
Merge pull request #16514 from keszybz/zstd-decompress-fix
Fix coredumpctl operation with zstd-compressed journals
2020-07-22 10:40:19 +02:00
Zbigniew Jędrzejewski-Szmek
0da322d9a4 man: update docs with the new functions and other enhancements 2020-07-21 17:42:16 +02:00
Lennart Poettering
49f16281c9 tree-wide: use READ_FULL_FILE_CONNECT_SOCKET at various places
Let's use the new flag wherever we read key material/passphrases/hashes
off disk, so that people can plug in their own IPC service as backend if
they like, easily.

(My main goal was actually to support this for crypttab key files — i.e.
that you can specify AF_UNIX sockets as third column in crypttab — but
that's harder to implement, since the keys are read via libcryptsetup's
API, not ours.)
2020-07-21 10:32:01 +02:00