Commit Graph

44580 Commits

Author SHA1 Message Date
Daan De Meyer 3df22bb5c8 sd-bus: Add sd_bus_message_peek_type docs 2020-04-23 19:37:21 +02:00
Daan De Meyer 7cd40caa66 sd-bus: Add sd_bus_message_open/close/enter/exit_container docs 2020-04-23 18:30:40 +02:00
Daan De Meyer 31e4abd1a6 sd-bus: Fix typo in sd_bus_message_append_array docs 2020-04-23 18:27:34 +02:00
Lennart Poettering 0f4a141744
Merge pull request #15504 from poettering/cmsg-find-pure
just the recvmsg_safe() stuff from #15457
2020-04-23 17:28:19 +02:00
Lennart Poettering cd9aa8f0f9 man: document binfmt's new --unregister switch 2020-04-23 17:14:54 +02:00
Lennart Poettering 846acb6798 binfmt: also unregister binfmt entries from unit
We unregister binfmt_misc twice during shutdown with this change:

1. A previous commit added support for doing that in the final shutdown
   phase, i.e. when we do the aggressive umount loop. This is the robust
   thing to do, in case the earlier ("clean") shutdown phase didn't work
   for some reason.

2. This commit adds support for doing that when systemd-binfmt.service
   is stopped. This is a good idea so that people can order mounts
   before the service if they want to register binaries from such
   mounts, as in that case we'll undo the registration on shutdown
   again, before unmounting those mounts.

And all that, just because of that weird "F" flag the kernel introduced
that can pin files...

Fixes: #14981
2020-04-23 17:14:45 +02:00
Lennart Poettering f3670df13e binfmt: modernize code a bit
Let's just copy out the bit of the string we need, and let's make sure
we refuse rules called "status" and "register", since those are special
files in binfmt_misc's file system.
2020-04-23 17:14:41 +02:00
Lennart Poettering 0282c0285a shutdown: unregister all binfmt_misc entries before entering shutdown loop
Apparently if the new "F" flag is used they might pin files, which
blocks us from unmounting things. Let's hence clear this up explicitly.
Before entering our umount loop.

Fixes: #14981
2020-04-23 17:14:38 +02:00
Lennart Poettering 965cc99416 shared: add common helper for unregistering all binfmt entries 2020-04-23 17:13:50 +02:00
Lennart Poettering a9ab5cdb50
Merge pull request #15472 from keszybz/dbus-api-docs
A few more dbus api documentation updates
2020-04-23 17:01:11 +02:00
Lennart Poettering 185924ab63 update TODO 2020-04-23 16:01:46 +02:00
Zbigniew Jędrzejewski-Szmek d3d53e5cd1 shared: add NULL callback check in one more place
Follow-up for 9f65637308.
2020-04-23 14:53:54 +02:00
Lennart Poettering f8606626ed tmpfiles: if we get ENOENT when opening /proc/self/fd/, check if /proc is mounted
let's return ENOSYS in that case, to make things a bit less confusng.

Previously we'd just propagate ENOENT, which people might mistake as
applying to the object being modified rather than /proc/ just not being
there.

Let's return ENOSYS instead, i.e. an error clearly indicating that some
kernel API is not available. This hopefully should put people on a
better track.

Note that we only do the procfs check in the error path, which hopefully
means it's the less likely path.

We probably can add similar bits to more suitable codepaths dealing with
/proc/self/fd, but for now, let's pick to the ones noticed in #14745.

Fixes: #14745
2020-04-23 14:52:10 +02:00
Lennart Poettering 883fff25f4 stat-util: add simpler helper for checking if /proc/ is mounted 2020-04-23 14:51:08 +02:00
Lennart Poettering 6d965610bd stat-util: no need to open a file to check fs type 2020-04-23 14:50:53 +02:00
Lennart Poettering 0f7e4b2888 sysusers,tmpfiles: always mention error when failing to replace specifiers 2020-04-23 14:50:07 +02:00
Lennart Poettering 2230e8f29d sysusers: add accidentally forgotten 'return' 2020-04-23 14:49:14 +02:00
Zbigniew Jędrzejewski-Szmek 8f3e342fa9 core: fix unused variable warning when !HAVE_SECCOMP 2020-04-23 14:42:09 +02:00
Lennart Poettering 9663ed378e udev: use STR_IN_SET() wher eit makes sense 2020-04-23 13:56:21 +02:00
Lennart Poettering cd3c8a117c udev: prepare memory for extra NUL termination for NULSTR
Fixes: #15162
2020-04-23 13:56:21 +02:00
Lennart Poettering 2d69cf6eb0
Merge pull request #15543 from poettering/fix-ubsan-sd-bus
sd-bus: work around ubsan warning
2020-04-23 13:39:58 +02:00
Balint Reczey 9f65637308 shared: Don't try calling NULL callback in bus_wait_for_units_clear
BugLink: https://bugs.launchpad.net/bugs/1870930
2020-04-23 12:25:20 +02:00
Lennart Poettering b70cc80ffb
Merge pull request #15544 from poettering/fix-journalctl-namespace
sd-journal: fix namespace check
2020-04-23 12:19:25 +02:00
Lennart Poettering a5f0f46f1a
Merge pull request #15538 from poettering/nspawn-no-netns
nspawn: politely refuse --image= when run inside non-host netns
2020-04-23 11:11:11 +02:00
Zbigniew Jędrzejewski-Szmek ca57eed2e1
Merge pull request #15527 from Werkov/mkosi-opensuse
Add mkosi config for openSUSE Tumbleweed
2020-04-23 11:00:02 +02:00
Michal Koutný 69d95d6468 mkosi: Add openSUSE params file
The setup is meant to run against openSUSE Tumbleweed and install
minimum packages necessary for successful build and passing tests.

To speed up incremental build an external build directory is used.
2020-04-23 10:28:03 +02:00
Lennart Poettering a7c71d214c run: don't wait for start job to complete when running interactively anyway
Otherwise we'd not read the services input while waiting for the job to
wait, and there's no point in waiting for the job anyway if we wait for
the unit to stop ultimately.

Fixes: #15395
2020-04-23 09:47:20 +02:00
Lennart Poettering 3691bcf3c5 tree-wide: use recvmsg_safe() at various places
Let's be extra careful whenever we return from recvmsg() and see
MSG_CTRUNC set. This generally means we ran into a programming error, as
we didn't size the control buffer large enough. It's an error condition
we should at least log about, or propagate up. Hence do that.

This is particularly important when receiving fds, since for those the
control data can be of any size. In particular on stream sockets that's
nasty, because if we miss an fd because of control data truncation we
cannot recover, we might not even realize that we are one off.

(Also, when failing early, if there's any chance the socket might be
AF_UNIX let's close all received fds, all the time. We got this right
most of the time, but there were a few cases missing. God, UNIX is hard
to use)
2020-04-23 09:41:47 +02:00
Lennart Poettering 47eae6ce0c socket-util: add recvmsg_safe() wrapper that handles MSG_CTRUNC 2020-04-23 09:40:56 +02:00
Kumar Kartikeya Dwivedi 5c568be167 test: add a test case for #15528 2020-04-23 09:24:17 +02:00
Lennart Poettering 2b6df46d21 sd-journal: don't check namespaces if we have no namespace to go by
Fixes: #15528
2020-04-23 09:23:53 +02:00
Lennart Poettering 287b737693 nspawn: refuse politely when we are run in the non-host netns in combination with --image=
Strictly speaking this doesn't really fix #15079, but it at least means
we won't hang anymore.

Fixes: #15079
2020-04-23 09:18:43 +02:00
Lennart Poettering 1433e0f212 nspawn: minor simplification 2020-04-23 09:18:05 +02:00
Zbigniew Jędrzejewski-Szmek 73781de41f
Merge pull request #15530 from ssahani/lpr-dhcpv4-option-9
network: add support to DHCPv4 server/client option 9 LPR
2020-04-23 09:10:14 +02:00
Daan De Meyer 0076098b0a sd-bus: Add sd_bus_message_get_error/errno docs 2020-04-23 08:57:39 +02:00
Lennart Poettering 49490c1d35 acpi-fpdt: mark structures as packed
Let's make sure the alignment doesn't matter.
2020-04-23 08:55:08 +02:00
Lennart Poettering 0cd41757d0 sd-bus: work around ubsan warning
ubsan complains that we add an offset to a NULL ptr here in some cases.
Which isn't really a bug though, since we only use it as the end
condition for a for loop, but we can still fix it...

Fixes: #15522
2020-04-23 08:54:30 +02:00
Daan De Meyer 570f92c691 sd-bus: Add sd_bus_get/set_allow_interactive_authorization docs 2020-04-23 08:53:27 +02:00
Zbigniew Jędrzejewski-Szmek 9786b27cbb
Merge pull request #15546 from poettering/pid1-serialize-comand-fix
core: make sure to restore the control command id, too
2020-04-23 08:51:58 +02:00
Zbigniew Jędrzejewski-Szmek 4ee40eefce
Merge pull request #15516 from poettering/nspawn-resolv-conf
beef up --resolv-conf= options of systemd-nspawn
2020-04-23 08:01:46 +02:00
Lennart Poettering 81d2fe53fc nspawn: some minor modernizations 2020-04-23 07:59:26 +02:00
Niklas Hambüchen 69123c218c man: Fix typo "multiplied with" -> "multiplied by" 2020-04-23 07:56:28 +02:00
Daan De Meyer e8c47f7370 sd-bus: Add sd_bus_message_at_end docs 2020-04-22 23:42:03 +02:00
Zbigniew Jędrzejewski-Szmek bbdeb2b5e9
Merge pull request #15517 from DaanDeMeyer/sd-bus-monitor-docs
sd-bus: Add sd_bus_set/is_monitor docs
2020-04-22 23:38:37 +02:00
Zbigniew Jędrzejewski-Szmek 1943d50e4e
Merge pull request #15507 from poettering/bus-log-api
add generic bus interface for setting log level that can be implemented by any daemon
2020-04-22 23:30:09 +02:00
Lennart Poettering e8cf09b2a2 core: make sure we don't get confused when setting TERM for a tty fd
Fixes: #15344
2020-04-22 22:59:41 +02:00
Lennart Poettering 60e16d20a3 man: document that VirtualEthernetExtra= has nothing to do with Bridge=
Fixes: #15402
2020-04-22 22:34:52 +02:00
Lennart Poettering e9da62b18a core: make sure to restore the control command id, too
Fixes: #15356
2020-04-22 20:34:02 +02:00
Lennart Poettering 5b99bd5fd4 core: some minor clean-ups/modernizations 2020-04-22 20:33:57 +02:00
Lennart Poettering e309b929ba man: document the new --resolv-conf= options 2020-04-22 19:38:04 +02:00