Commit graph

42238 commits

Author SHA1 Message Date
Yu Watanabe f0beb6f816 udev: silence warning about PROGRAM+= or IMPORT+= rules
Closes #14062.
2019-11-18 16:46:12 +01:00
Zbigniew Jędrzejewski-Szmek a1db5bbc97 man: add entry for systemd-id128 --uuid 2019-11-18 16:44:10 +01:00
Yu Watanabe dc11d2bf66 udevadm: ignore EROFS and return earlier
Fixes #14060.
2019-11-18 16:07:21 +01:00
Zbigniew Jędrzejewski-Szmek 0b15d12204
Merge pull request #14040 from poettering/root-mount-deps
root mount dep fixes
2019-11-18 15:29:35 +01:00
Yu Watanabe c00c3b64be network: add more error logs 2019-11-18 15:26:55 +01:00
Zbigniew Jędrzejewski-Szmek f0f3a0b52a
Merge pull request #14046 from poettering/id128-uuid
add "-u" switch to systemd-uuid for outputting ids in UUID format
2019-11-18 15:19:43 +01:00
Lennart Poettering 353b2baa20 tree-wide: clean up --help texts a bit
This cleans up and unifies the outut of --help texts a bit:

1. Highlight the human friendly description string, not the command
   line via ANSI sequences. Previously both this description string and
   the brief command line summary was marked with the same ANSI
   highlight sequence, but given we auto-page to less and less does not
   honour multi-line highlights only the command line summary was
   affectively highlighted. Rationale: for highlighting the description
   instead of the command line: the command line summary is relatively
   boring, and mostly the same for out tools, the description on the
   other hand is pregnant, important and captions the whole thing and
   hence deserves highlighting.

2. Always suffix "Options" with ":" in the help text

3. Rename "Flags" →  "Options" in one case

4. Move commands to the top in a few cases

5. add coloring to many more help pages

6. Unify on COMMAND instead of {COMMAND} in the command line summary.
   Some tools did it one way, others the other way. I am not sure what
   precisely {} is supposed to mean, that uppercasing doesn't, hence
   let's simplify and stick to the {}-less syntax

And minor other tweaks.
2019-11-18 15:14:43 +01:00
Yu Watanabe ce0d4c4f91
Merge pull request #14056 from yuwata/dhcp-debug-logs
dhcp: add debug logs and propagate error in restarting client
2019-11-18 18:49:45 +09:00
Zbigniew Jędrzejewski-Szmek a2870138c1
Merge pull request #14055 from yuwata/network-send-option-takes-type-field
network: make SendOption= also take type field
2019-11-17 19:17:38 +01:00
Serge bf9012bbf6 sd-dhcp-client: anonymize DHCPDISCOVER (fixes #13992)
According to RFC7844 section 3 the DHCPDISCOVER message should not contain option 50 («Requested IP Address») when Anonymize is true
2019-11-18 00:06:01 +09:00
Yu Watanabe a339859f79 dhcp6: add debug logs 2019-11-17 23:58:43 +09:00
Yu Watanabe 944e23b8a0 dhcp4: propagate error in restarting DHCPv4 client 2019-11-17 23:52:46 +09:00
Yu Watanabe f515c345d2 dhcp4: add debug logs 2019-11-17 23:48:46 +09:00
Yu Watanabe 586ec936c6 network: make SendOption= also take type field
This makes SendOption= and SendRawOption= takes values in the same
format.
2019-11-17 23:17:29 +09:00
Yu Watanabe 2e5580a8c1 network: rename DHCPRawOption to DHCPOptionDataType
And moves the definition from networkd-dhcp-server.[ch] to networkd-dhcp-common.[ch].
2019-11-17 23:00:11 +09:00
Yu Watanabe 599e10a1d2 network: fix logged error value 2019-11-17 22:51:06 +09:00
Yu Watanabe 62a7c3608e network: fix indentation 2019-11-17 22:45:38 +09:00
Tom Fitzhenry a0fa3ef7ff Error, rather than warn, if failing to start DHCP server
This would have made diagnosing https://github.com/systemd/systemd/issues/14050 easier.
2019-11-17 22:31:43 +09:00
Cyprien Laplace 4d4ac92c92 basic: add vmware hypervisor detection from device-tree
Allow ConditionVirtualization=vmware to work on ESXi on arm VMs
using device-tree.
2019-11-16 13:56:26 +01:00
Lennart Poettering bf7eedbf8f mount: do not update exec deps on mountinfo changes
Fixes: #13978
2019-11-16 13:53:48 +01:00
Lennart Poettering b8e5776d38 mount: extend list of extrinsic mounts a bit 2019-11-16 13:53:48 +01:00
Lennart Poettering 836e293585
Merge pull request #14038 from keszybz/hwdb-update
hwdb update
2019-11-16 13:49:01 +01:00
Zbigniew Jędrzejewski-Szmek 852b72727a NEWS: more items
Also reorder some entries to restore the grouping by subject.
2019-11-16 13:48:41 +01:00
Lennart Poettering addc5f1e25
Merge pull request #14043 from poettering/shutdown-noswap-fix
shutdown: it's OK if /proc/swaps is missing
2019-11-16 13:48:25 +01:00
Lennart Poettering 82e8d02aa4
Merge pull request #14039 from keszybz/systemd-man
systemd(1) and journalctl(1) improvements
2019-11-16 13:47:59 +01:00
Lennart Poettering 19fa17c7c4 sd-bus: invalidate connection when Hello() fails
Fixes: #13969
2019-11-16 13:47:32 +01:00
Lennart Poettering 394fda4caf id128: drop "MESSAGE_" prefix of pretty output
Using these IDs for message identication is one use case, but there are
others, hence let's drop the prefix, it only made sense to have while
the tool was part of journalctl.
2019-11-15 19:07:05 +01:00
Lennart Poettering a19fdd66c2 id128: add new "-u" switch for outputting Ids in UUID format
For some unrelated stuff I wanted the machine ID in UUID format, and it
was annoying doing that manually. So let's add a switch for this, so
that this works:

    systemd-id128 machine-id -u
2019-11-15 19:07:05 +01:00
Lennart Poettering f0bfae7265
Merge pull request #14037 from poettering/machinectl-pw-agent
spawn ask pw tty agent from "machinectl start"
2019-11-15 16:59:49 +01:00
Lennart Poettering 8af381679d
Merge pull request #13940 from keur/protect_kernel_logs
Add ProtectKernelLogs to systemd.exec
2019-11-15 16:26:10 +01:00
Lennart Poettering 4e201419b7 umount: log on all errors 2019-11-15 14:58:06 +01:00
Lennart Poettering 2cdd0d612d umount: be happy if /proc/swaps doesn't exist
Kernels work without swap just fine.

Fixes: #13993
2019-11-15 14:57:27 +01:00
Lennart Poettering f795267e3a shutdown: make logging more useful if NULL swap/mount table files are specified
Makes the error output seen in #13993 more readable.
2019-11-15 14:56:35 +01:00
Zbigniew Jędrzejewski-Szmek c035f3766c man: significantly downgrade the Options section in systemd(1)
This structure of the man page originates from the time when systemd was
installed on top of sysvinit systems, and users had an actual chance to
interact with the systemd binary directly. Nowadays it is almost never called
directly, so let's properly explain this in the overview.

The Options section is moved down below the kernel command line, those options
are only needed in special circumstances. Let's refer the reader to the
description of the kernel command line options, and not duplicate the
descriptions (which makes the text longer than necessary and increases chances
for discrepancies).

Systemd is also prominently used as the user manager, let's mention that in the
Overview.

While at it, use "=" only when an argument is required as we nowadays do.
2019-11-15 13:36:20 +01:00
Zbigniew Jędrzejewski-Szmek 339bf2076b man: share description of $SYSTEMD_COLORS in other tools
It was only described in systemd(1), making it hard to discover.
Fixes #13561.

The same for $SYSTEMD_URLIFY.

I think all the tools whose man pages include less-variables.xml support
those variables.
2019-11-15 13:34:52 +01:00
Zbigniew Jędrzejewski-Szmek 18da36a8e7 hwdb: update
As before, the net change seems to be almost only additions, with some
minor removals that seems to be corrections of incomplete entries.
2019-11-15 11:36:59 +01:00
Zbigniew Jędrzejewski-Szmek 62d3999518 meson: add target to update the chromiumos rules
There is no change in the file right now, but the download seems to work
OK.

It's funny that the biggest company in the world cannot provide a
download link in plain text.
2019-11-15 11:36:59 +01:00
Lennart Poettering e41e9ba8bf machinectl: spawn ask password agent on "start"
We start units in the background, hence it is wise to also have the
ask pasword agent around.

Fixes: #13587
2019-11-15 11:12:34 +01:00
Lennart Poettering c59e2ec696 ask-password-agent: introduce ask_password_agent_open_if_enabled()
This makes the ask-password agent handling more alike the polkit agent
handling again, and introduces ask_password_agent_open_if_enabled() that
works just like the already existing polkit_agent_open_if_enabled().
2019-11-15 11:11:52 +01:00
Lennart Poettering 385d581b74 polkit-agent: don't use an inline function
This is long enough to just be a regular function, and is never called
in inner loops, let's hence just make this a plain function.
2019-11-15 11:11:14 +01:00
Torsten Hilbrich 7be830c6e8 nspawn: Allow Capability= to overrule private network setting
The commit:

a3fc6b55ac nspawn: mask out CAP_NET_ADMIN again if settings file turns off private networking

turned off the CAP_NET_ADMIN capability whenever no private networking
feature was enabled. This broke configurations where the CAP_NET_ADMIN
capability was explicitly requested in the configuration.

Changing the order of evalution here to allow the Capability= setting
to overrule this implicit setting:

Order of evaluation:

1. if no private network setting is enabled, CAP_NET_ADMIN is removed
2. if a private network setting is enabled, CAP_NET_ADMIN is added
3. the settings of Capability= are added
4. the settings of DropCapability= are removed

This allows the fix for #11755 to be retained and to still allow the
admin to specify CAP_NET_ADMIN as additional capability.

Fixes: a3fc6b55ac
Fixes: #13995
2019-11-15 10:13:51 +01:00
Kevin Kuehler 82dce83b19 systemd-analyze: Add ProtectKernelLogs to security 2019-11-15 00:59:54 -08:00
Kevin Kuehler 6168ae5840 units: set ProtectKernelLogs=yes on relevant units
We set ProtectKernelLogs=yes on all long running services except for
udevd, since it accesses /dev/kmsg, and journald, since it calls syslog
and accesses /dev/kmsg.
2019-11-15 00:59:54 -08:00
Kevin Kuehler 806aea3879 test-namespace: Add test for ProtectKernelLogs= 2019-11-15 00:59:51 -08:00
Zbigniew Jędrzejewski-Szmek 7edd8fb198 core: do not propagate polkit error to caller
If we fail to start polkit, we get a message like
"org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer.",
which has no meaning for the caller of our StartUnit method. Let's just
return -EACCES.

$ systemctl start apache
Failed to start apache.service: Could not activate remote peer. (before)
Failed to start apache.service: Access denied                   (after)

Fixes #13865.
2019-11-15 08:17:01 +01:00
Lennart Poettering 4df8fe8415 seccomp: more comprehensive protection against libseccomp's __NR_xyz namespace invasion
A follow-up for 59b657296a, adding the
same conditioning for all cases of our __NR_xyz use.

Fixes: #14031
2019-11-15 08:13:36 +01:00
Tommy J 48daf51026 PrefixDelegationHint-section: typo 2019-11-15 07:57:32 +01:00
Kevin Kuehler d916e35b9f man: Add description for ProtectKernelLogs= 2019-11-14 13:31:06 -08:00
Kevin Kuehler 97d05f3b70 test/test-seccomp: add test_protect_syslog 2019-11-14 13:31:03 -08:00
Kevin Kuehler 94a7b2759d core: ProtectKernelLogs= mask kmsg in proc and sys
Block access to /dev/kmsg and /proc/kmsg when ProtectKernelLogs is set.
2019-11-14 12:58:43 -08:00