Commit Graph

44040 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 6635f57d3e sysctl: enable coredump for suid binaries
Right now the kernel will not dump anything that went through setuid or
setgid. But it is routine for daemons to do that, and it makes things hard to
debug.

systemd-coredump saves the coredump readable by the users the process was
running as. This should be enough to avoid information leakage. So let's also
tell the kernel to do the coredump.

For https://bugzilla.redhat.com/show_bug.cgi?id=1790972.

Both patterns are stored in the same file, so they are enabled or disabled
together. (Though suid_dumpable=2 is supposed to be safe even when writing to
plain files.)
2020-04-07 15:28:46 +02:00
root f9d29f6d06 fix manager_state 2020-04-07 15:27:50 +02:00
Hans de Goede e6b68254c2 hwdb: Add accel orientation quirk for MPMAN MPWIN895CL tablet
Add a quirk to fix the accelerometer orientation on the MPMAN MPWIN895CL
tablet.
2020-04-07 14:23:31 +02:00
Lennart Poettering 602235f27d
Merge pull request #15349 from keszybz/doc-work
Remove stray file and fix two minor issues in man pages
2020-04-07 14:10:56 +02:00
Zbigniew Jędrzejewski-Szmek 9aa822179b man: update rules
Apparently this step was forgotten in 935052a8aa.
2020-04-06 20:47:14 +02:00
Zbigniew Jędrzejewski-Szmek 326b1f897b Remove stray file 2020-04-06 20:45:41 +02:00
Zbigniew Jędrzejewski-Szmek bb288a2cb3 man: drop apostophe from section title
For whatever reason, this does not get rendered propely in the man
page and results in an invalid code:
W: manual-page-warning /usr/share/man/man7/systemd.special.7.gz 103: warning: macro `AQ' not defined

We say 'user manager' and 'system manager' in most other places, so let's just
use this form here too.
2020-04-06 20:45:41 +02:00
Marcel Holtmann 9fac14980d hwdb: Update database of Bluetooth company identifiers 2020-04-05 10:01:14 +02:00
Evgeny Vereshchagin 3c2a50c945 oss-fuzz: point the badge directly to our logs 2020-04-04 19:41:33 +02:00
Evgeny Vereshchagin 858b64593a semaphore: switch to upstream-ci
"debian/master" has been broken since
d6483013d5
was merged.
2020-04-04 19:36:53 +03:00
Zbigniew Jędrzejewski-Szmek a2f838d590 detect-virt: also detect "microsoft" as WSL
From https://github.com/microsoft/WSL/issues/423#issuecomment-221627364:
> it's unlikely we'll change it to something that doesn't contain "Microsoft"
> or "WSL".

... but well, it happened. If they change it incompatibly w/o adding an stable
detection mechanism, I think we should not add yet another detection method.
But adding a different casing of "microsoft" is not a very big step, so let's
do that.

Follow-up for #11932.
2020-04-04 16:52:32 +02:00
Lennart Poettering 4c39820562
Merge pull request #15298 from keszybz/show-property-value
systemctl --property-value as shortcut for --property --value
2020-04-04 11:22:59 +02:00
Anita Zhang 3d9489ee45
Merge pull request #15321 from topimiettinen/dbus-execute-add-protect-clock
dbus-execute: show also ProtectClock
2020-04-03 16:15:51 -07:00
Anita Zhang 4fbf39926e
Merge pull request #15290 from keszybz/unrelated-fixes
Three unrelated minor tweaks
2020-04-03 15:54:38 -07:00
Anita Zhang 3adb304ae6
Merge pull request #15297 from poettering/homed-no-fallocate
homed: fall back to ftruncate() if fallocate() is not supported on ba…
2020-04-03 15:49:43 -07:00
Zbigniew Jędrzejewski-Szmek 5522e628f5 test: use show -P in places
Not all places are converted on purpose, to also test the other option
name.
2020-04-03 18:24:21 +02:00
Zbigniew Jędrzejewski-Szmek 5292c24047 systemctl: add -P as short for --value --property= 2020-04-03 18:24:20 +02:00
Zbigniew Jędrzejewski-Szmek 1b87e27999
Merge pull request #15315 from DaanDeMeyer/deprecate-sd-bus-priority
sd-bus: Deprecate priority functions
2020-04-03 18:07:54 +02:00
Lennart Poettering c4b2371263 capability: don't skip ambient caps setup if we actually have something to set
Follow-up for 7ea4392f1e

Let's not hide errors needlessly aggressively.
2020-04-03 18:02:08 +02:00
Zbigniew Jędrzejewski-Szmek e30934c80f
Merge pull request #15310 from poettering/repart-no-enable
make systemd-repart static again, but condition it out if no config
2020-04-03 17:44:47 +02:00
Topi Miettinen 1887032f71 shared/dissect-image: log messages from cryptsetup
Before:
```
write(2, "Device /dev/loop1p1 is too small.\n", 34) = -1 ENOTCONN (Transport
endpoint is not connected)
```

After:
```
$ journalctl -b -e | grep 'too small'
Apr 02 16:53:30 loora systemd[343579]: Device /dev/loop1p1 is too small.
```
2020-04-03 17:44:20 +02:00
Giedrius Statkevičius aa5408e2e8 resolve: reload /etc/hosts on inode change
On certain distributions such as NixOS the mtime of `/etc/hosts` is
locked to a fixed value. In such cases, only checking the last mtime of
`/etc/hosts` is not enough - we also need to check if the st_ino/st_dev
match up. Thus, let's make sure make sure that systemd-resolved also
rereads `/etc/hosts` if the inode or the device containing `/etc/hosts` changes.

Test script:

```bash
hosts="/etc/hosts"
echo "127.0.0.1 testpr" > "hosts_new"
mv "hosts_new" "$hosts"
resolvectl query testpr || exit 1
mtime="$(stat -c %y "$hosts")"
echo "127.0.0.1 newhost" > "hosts_tmp"
touch -d "$mtime" "hosts_tmp"
install -p "hosts_tmp" "$hosts"
sleep 10
resolvectl query newhost || exit 1
rm -f "hosts_tmp"
```

Closes #14456.
2020-04-03 17:34:10 +02:00
Topi Miettinen b8b7b838fd
dbus-execute: show also ProtectClock
Show also `ProtectClock=` setting. This also lets `systemd-analyze security`
get the correct state for it.
2020-04-03 16:32:10 +03:00
Evgeny Vereshchagin 50f5e2e281
Merge pull request #15309 from poettering/strv-split
remove dead-lock in strv_split()
2020-04-03 06:37:54 +03:00
Daan De Meyer 1e9a7c44a9 sd-bus: remove unused priority logic 2020-04-02 21:42:32 +02:00
Daan De Meyer 11a177d9de sd-bus: Deprecate priority functions 2020-04-02 21:36:59 +02:00
Lennart Poettering fdfe909123 units: run systemd-repart only if there's configuration for it 2020-04-02 17:07:48 +02:00
Lennart Poettering aade0c3b6e Revert "units: make systemd-repart.service installable"
This reverts commit 7e1ed1f3b2.

systemd-repart is not a user service that should be something people
enable/disable, instead it should just work if there's configuration for
it. It's like systemd-tmpfiles, systemd-sysusers, systemd-load-modules,
systemd-binfmt, systemd-systemd-sysctl which are NOPs if they have no
configuration, and thus don't hurt, but cannot be disabled since they
are too deep part of the OS.

This doesn't mean people couldn't disable the service if they really
want to, there's after all "systemctl mask" and build-time disabling,
but those are OS developer facing instead of admin facing, that's how it
should be.

Note that systemd-repart is in particular an initrd service, and so far
enable/disable state of those is not managed anyway via "systemctl
enable/disable" but more what dracut decides to package up and what not.
2020-04-02 17:04:59 +02:00
Lennart Poettering 0fc659eea9 update TODO 2020-04-02 16:58:49 +02:00
Lennart Poettering 82aa14e2a3 string-util: make clear that split() + FOREACH_WORD() should die 2020-04-02 16:43:39 +02:00
Lennart Poettering 29965a2a6e string-util: make sure we eat even half complete words in split()
split() and FOREACH_WORD really should die, and everything be moved to
extract_first_word() and friends, but let's at least make sure that for
the remaining code using it we can't deadlock by not progressing in the
word iteration.

Fixes: #15305
2020-04-02 16:43:36 +02:00
Lennart Poettering 5fed82c642 string-util: some minor coding style updates 2020-04-02 16:43:24 +02:00
Lennart Poettering 77b19caf6b update TODO 2020-04-02 16:42:20 +02:00
Zbigniew Jędrzejewski-Szmek c83a5ead31 Merge pull request #15210 from ssahani/networkctl-up-down
Merging by hand because github refuses merging because "Rebasing the commits of
this branch on top of the base branch cannot be performed automatically as this
would create a different result than a regular merge.".
2020-04-02 11:21:25 +02:00
Vito Caputo 935052a8aa sd-bus: add va_list variants of variadic convenience functions
Consumers of the sd-bus convenience API can't make convenience
helpers of their own without va_list variants.

This commit is a mechanical change splitting out the existing function
bodies into bare va_list variants having a 'v' suffixed to the names.

The original functions now simply create the va_list before forwarding
the call on to the va_list variant, and the va_list variants dispense
with those steps.
2020-04-02 10:26:18 +02:00
Zbigniew Jędrzejewski-Szmek c51c6f2f57
Merge pull request #15252 from ssahani/dhcpv6-mud
DHCPv6: Add support to send MUD URL
2020-04-02 10:23:15 +02:00
Zbigniew Jędrzejewski-Szmek 4e561c6200
Merge pull request #15109 from keszybz/units-make-installable
Make homed/userdbd/repart services installable (to allow uninstalling)
2020-04-02 10:21:29 +02:00
Lénaïc Huard 61fd7d6720 udev: Fix SIGSEGV in AlternativeNamesPolicy handling
The function sd_device_get_property_value has some paths where it exits without
touching the n pointer. In those cases, n remained uninitialized until it was
eventually read inside isempty where it caused the segmentation fault.

Fixes #15078
2020-04-02 10:18:56 +02:00
Lennart Poettering e7b0ea5440
Merge pull request #15238 from rpls/canfd
network: can: add support for CAN-FD related properties
2020-04-02 10:13:24 +02:00
Richard Petri 7e025e9cdb network: can: add support for CAN-FD related properties 2020-04-01 20:07:20 +02:00
Richard Petri 74a2726869 network: can: introduce a config parser function for bitrates
For now, this function is nearly equivalent to the si_uint64 parser, except for
an additional range check as Linux only takes 32-bit values as bitrates. In
future, this may also be used to introduce fancier bitrate config formats.
2020-04-01 20:07:20 +02:00
Lennart Poettering e46f877c5c homed: fall back to ftruncate() if fallocate() is not supported on backing fs
This means "discard" mode is enabled implicitly on such simpler backing
fs.

Fixes: #15059
2020-04-01 18:19:07 +02:00
Susant Sahani 3175a8c21b network: DHCPv6 Add support to send MUD URL 2020-04-01 17:01:12 +02:00
Susant Sahani de8d6e5563 sd-dhcpv6: Add support to set request MUD URL 2020-04-01 16:59:29 +02:00
Zbigniew Jędrzejewski-Szmek 6829d8ce69
Merge pull request #15253 from DaanDeMeyer/object-vtable-error-docs
sd-bus: Add error handling info to sd_bus_add_object_vtable docs
2020-04-01 12:25:34 +02:00
Zbigniew Jędrzejewski-Szmek e6a4e25a82 man: add note that --no-hostname has limited effect
Clearly there is some confusion about the intent of this option, let's add
a short note.

https://bugzilla.redhat.com/show_bug.cgi?id=1819313
2020-04-01 09:25:50 +02:00
Zbigniew Jędrzejewski-Szmek c083264115
Merge pull request #15278 from vcaputo/more-trivial-cleanups
Expand use of _cleanup_close_ where trivial
2020-04-01 00:16:56 +02:00
Lennart Poettering 9e76a88faf man: mention that stdout logging works the same as stderr logging
Apparently people wondered about that:

https://lists.freedesktop.org/archives/systemd-devel/2020-March/044091.html
2020-04-01 00:15:41 +02:00
Daan De Meyer 47203ed085 sd-bus: sd_bus_call docs improvements 2020-04-01 00:15:11 +02:00
Daan De Meyer e3e5a6eebd sd-bus: Add sd_bus_get/set_priority docs + fixes 2020-04-01 00:11:33 +02:00