Commit Graph

5614 Commits

Author SHA1 Message Date
Lennart Poettering 43e7dd70bc
Merge pull request #17344 from keszybz/bus-connect-more-logs
Add some debug logs to help diagnose bus connections
2020-10-19 17:39:37 +02:00
Lennart Poettering bb63863304 man: document that for Type=dbus services dropping bus name has consequences
Fixes: #17150
2020-10-19 09:22:13 +02:00
Lennart Poettering af4b8f8048 man: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers
Fixes: #16941
2020-10-19 09:20:20 +02:00
Lennart Poettering cea0e4e281
Merge pull request #17358 from keszybz/hwdb-add-stars
Add trailing star to all hwdb patterns
2020-10-16 15:35:31 +02:00
Zbigniew Jędrzejewski-Szmek 32a4aec4fa man: describe wildcards and range matches in hwdb syntax 2020-10-15 18:06:23 +02:00
Zbigniew Jędrzejewski-Szmek c0443b97b7 hwdb: add trailing ":*" everywhere
No functional change is intended.
The general pattern of changes:

-usb:v04F3p2B7C*
+usb:v04F3p2B7C:*
This is mostly a clarification, to make the part that makes the usb vXXXXpYYYY
part visually separated. It would only make a difference if we added further
keys with a different number of digits, which is unlikely.

-usb:v0627p0001:*QEMU USB Keyboard*
-usb:v0627p0001:*QEMU USB Mouse*
-usb:v0627p0001:*QEMU USB Tablet*
+usb:v0627p0001:*QEMU USB Keyboard*:*
+usb:v0627p0001:*QEMU USB Mouse*:*
+usb:v0627p0001:*QEMU USB Tablet*:*
Again, only a clarification. We know that ":" will appear somewhere later in
the match key, so anything that matches "…Keyboard*" will also match "…Keyboard*:*".

-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
This makes the match narrower. Previously we would match product "N53SV"
and "N53SV2", "N53SV3", and others. Here we are saying that the ':pn' part must
match exactly. Most of the changes in this patch match this pattern. I made a few
judgement calls and used "pn…*:*" when I wasn't sure if the full pn is included:
-evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*
+evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*

-evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:
+evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:*
This more like the "QEMU" example above, since all dmi strings end in ":", so
anything which matches the old version will also match the new version.

-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:*

I replaced trailing ":pvr*" by ":*". This makes no functional difference because
we expect "pvr" to always appear in the dmi string. This makes patterns shorter.

-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:*

OTOH, ":pn*" is kept. This is because almost patterns include ":pn*", and if we
skip it, we should make it clear that this is on purpose, that we really want to
match any product name.

The python script to generate autosuspend rules is updated to use ":*" too.

Inspired by https://github.com/systemd/systemd/pull/17281#discussion_r501489750.
2020-10-15 18:01:32 +02:00
Zbigniew Jędrzejewski-Szmek 699a810b3f man: add org.freedesktop.oom1(5) stub 2020-10-15 15:08:31 +02:00
Zbigniew Jędrzejewski-Szmek 69c0807432
Merge pull request #15206 from anitazha/systoomd-v0
systemd-oomd
2020-10-15 14:16:52 +02:00
Yu Watanabe b8caa4ef34 network: rename Gateway=_dhcp6 -> Gateway=_ipv6ra 2020-10-15 07:04:02 +09:00
Lennart Poettering 21ad331873
Merge pull request #17350 from poettering/bus-read-array
sd-bus: initialize return values on success in sd_bus_message_read_ar…
2020-10-14 19:41:01 +02:00
Lennart Poettering 64a7fcc5cd bootctl: separate boot loader specific commands in man and --help
bootctl implements three types of operation: those that work with an EFI
boot loader, those which work with any EFI boot loader that implements
the boot loader spec + interface, and finally those specific to sd-boot.
Previously the --help text and the man page mixed them all up. Let's put
them clearly in three separate sections however, to communicate clearly
what is supposed to work everywhere, and what is specific to
systemd-boot or boot loaders implementing the two specs.

This adjusts wording here and there, but is mostly just about
re-ordering existing docs, and putting them under new sections.
2020-10-14 19:40:39 +02:00
Lennart Poettering 84fc961082
Merge pull request #17270 from keszybz/less-secure-mode
Use less in "secure" mode when under sudo
2020-10-14 18:33:10 +02:00
Zbigniew Jędrzejewski-Szmek ab4a88eb92 sd-bus: add custom return code when $XDG_RUNTIME_DIR is not set
We would return ENOENT, which is extremely confusing. Strace is not helpful because
no *file* is actually missing. So let's add some logs at debug level and also use
a custom return code. Let all user-facing utilities print a custom error message
in that case.
2020-10-14 18:28:30 +02:00
Lennart Poettering 4840807c6d man: update sd_bus_message_read_array() docs to clarify return value 0 vs. 1 2020-10-14 17:36:06 +02:00
Zbigniew Jędrzejewski-Szmek 0a42426d79 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
2020-10-14 10:04:12 +02:00
Dmitry Borodaenko 5fad3913e2 typo in systemd.network(5): IPv6PrefixDelegation=dhcpv6 2020-10-14 07:28:47 +09:00
Anita Zhang cf3e57884e man: document systemd-oomd and related items 2020-10-09 02:40:19 -07:00
Anita Zhang 4d824a4e0b core: add ManagedOOM*= properties to configure systemd-oomd on the unit
This adds the hook ups so it can be read with the usual systemd
utilities. Used in later commits by sytemd-oomd.
2020-10-07 16:17:23 -07:00
Yu Watanabe d306d1d0ca network: introduce Gateway=_dhcp4 and _dhcp6, and deprecate "_dhcp"
Fixes #17249.
2020-10-08 02:51:23 +09:00
Lennart Poettering 1378ac6989
Merge pull request #17231 from poettering/event-source-exit-on-failure
sd-event: add "exit-on-failure" feature for event source
2020-10-07 12:55:56 +02:00
Lennart Poettering 85585b767d
Merge pull request #17238 from keszybz/man-tmp-noexec
Say that noexec should not be used for /tmp
2020-10-07 09:45:58 +02:00
Lennart Poettering b9350e70aa sd-event: support callback=NULL in IO/child/inotify/defer event sources, too
Also, document this functionality more prominently, including with a
reference from sd_event_exit().

This is mostly to make things complete, as previously we supported NULL
callbacks only in _add_time() and _add_signal(). However, I think this
makes snese for IO event sources too (think: when some fd such as a pipe
end sees SIGHUP or so, exit), as well as defer or post event sources (i.e. exit
once we got nothing else to do). This also adds support for inotify
event sources, simply to complete things (I can't see the immediate use,
but maybe someone else comes up with it).

The only event source type that doesn't allow callback=NULL now are exit
callbacks, but for them they make little sense, as the event loop is
exiting then anyway.
2020-10-07 09:40:16 +02:00
Lennart Poettering 647f2ee259 man: add docs for sd_event_source_set_exit_on_failure() 2020-10-07 09:39:39 +02:00
Lennart Poettering 612ebf6c91 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
2020-10-07 09:23:07 +02:00
Michal Suchanek 3224e38bb6 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>
2020-10-06 08:24:12 +02:00
Zbigniew Jędrzejewski-Szmek bf645844f7
Merge pull request #17251 from keszybz/two-man-pages-tweaks
The remaining man page issues listed in #17177
2020-10-06 07:57:53 +02:00
Zbigniew Jędrzejewski-Szmek 806d919cb5 man: add note that %T/%V don't have the trailing slash 2020-10-05 18:44:05 +02:00
Zbigniew Jędrzejewski-Szmek 3b1211574b man: use trailing slash on directories in more places 2020-10-05 18:44:05 +02:00
Zbigniew Jędrzejewski-Szmek 7ec2f5e00c man: add a note about flags on /tmp and /var/tmp
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1875340.
2020-10-05 18:38:35 +02:00
Zbigniew Jędrzejewski-Szmek 422128b46d man: use paragraphs in descriptions of /tmp and /var/tmp
We have three somewhat separate ideas: what the directory is for, what $TMPDIR is for, and security considerations.
Let's use paragraphs.

Also, conjunctions in titles aren't capitalized usually.
2020-10-05 18:38:35 +02:00
Zbigniew Jędrzejewski-Szmek 41b6ae4da3 man: reword description of KillOnlyUsers=/KillExcludeUsers=
Fixes #17177.
2020-10-05 17:56:28 +02:00
Lennart Poettering ddd6dd9f23 man: fix table alignment 2020-10-05 17:46:15 +02:00
Zbigniew Jędrzejewski-Szmek e6fd398d61 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.
2020-10-05 14:23:40 +02:00
Zbigniew Jędrzejewski-Szmek e0c60bf6a0 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.
2020-10-05 14:13:14 +02:00
Lennart Poettering 6f5cf88009 man: fix typo systmed → systemd 2020-10-05 11:40:48 +02:00
Samanta Navarro 5e2b0e1cfa man: fix typos 2020-10-03 11:56:50 +00:00
Lennart Poettering fabf877705
Merge pull request #17154 from keszybz/crypttab-commas
Allow escaping commas in crypttab
2020-10-01 10:26:24 +02:00
Lennart Poettering 9230f5774a
Merge pull request #17213 from keszybz/man-cleanups
Fix links in man pages
2020-10-01 10:24:44 +02:00
Lennart Poettering 533ee38b56 man: mention that sd_bus_send() buffers locally, and sd_bus_process() is needed to flush it out
Prompted-by: #17128
2020-09-30 15:01:17 +02:00
Zbigniew Jędrzejewski-Szmek 21556381ff man: correct various links
As usual, linkchecker ftw!
2020-09-30 14:57:21 +02:00
Zbigniew Jędrzejewski-Szmek a9d99f6e3d man: update rules
Fixup for 278fdd064d.
2020-09-30 14:52:48 +02:00
Zbigniew Jędrzejewski-Szmek 550f3ba68d 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 ;(
2020-09-30 14:43:12 +02:00
Lennart Poettering d1f6e01e47 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
2020-09-30 14:37:52 +02:00
Lennart Poettering 626fb9f301
Merge pull request #17203 from poettering/resolv-conf-mode
expose resolv.conf mode bus property
2020-09-30 14:37:24 +02:00
Lennart Poettering 54565e509d
Merge pull request #17195 from keszybz/man-cleanups
Man page cleanups
2020-09-30 14:16:05 +02:00
Lennart Poettering 24d86fdb2f
Merge pull request #17087 from yuwata/man-initial-congestion-window
man: update InitialCongestionWindow= and InitialAdvertisedReceiveWindow=
2020-09-30 10:55:18 +02:00
Zbigniew Jędrzejewski-Szmek 885a4e6ca7 man: assorted small fixes
This is almost all of #17177.
2020-09-30 10:31:21 +02:00
Zbigniew Jędrzejewski-Szmek 0558f3035f man/systemd.network(5): unify descriptions of MUDURL=
Let's write one good description and refer to it from the other two
spots.
2020-09-30 10:30:03 +02:00
Zbigniew Jędrzejewski-Szmek 9e7600cfd7 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.
2020-09-30 10:30:03 +02:00
Zbigniew Jędrzejewski-Szmek 0b4d17c9a5 man: link to fork(2) more prominently
For #17177.
2020-09-30 10:30:03 +02:00