Commit graph

44459 commits

Author SHA1 Message Date
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
Lennart Poettering 86775e3524 nspawn: beef up --resolve-conf= modes
Let's add flavours for copying stub/uplink resolv.conf versions.

Let's add a more brutal "replace" mode, where we'll replace any existing
destination file.

Let's also change what "auto" means: instead of copying the static file,
let's use the stub file, so that DNS search info is copied over.

Fixes: #15340
2020-04-22 19:38:04 +02:00
Lennart Poettering 082814743f resolve: move resolv.conf path definitions to shared header
That way we can use it from nspawn.
2020-04-22 19:38:04 +02:00
Susant Sahani 828e653c48 networkctl: Add support to display LPR servers 2020-04-22 14:50:27 +02:00
Susant Sahani d64cc72e80 sd-network: Add support to retrive LPR servers 2020-04-22 14:49:52 +02:00
Susant Sahani d361b3730a network: Add support send and receive LPR servers 2020-04-22 14:49:27 +02:00
Susant Sahani 50018bfa84 sd-network: DHCPv4 Add support to send and receive LPR servers. 2020-04-22 14:48:11 +02:00
Zbigniew Jędrzejewski-Szmek eecf4f7e04
Merge pull request #15526 from bluca/start_stop_wait_debug
Add debug log when a job in the activation queue is not runnable
2020-04-22 14:24:07 +02:00
Luca Boccassi c03fbd37d6 core: add debug log when a job in the activation queue is not runnable
When a job is skipped due its dependencies not being ready, log
a debug message saying what is holding it back.
This was very useful with transient units timing out to figure
out where the problem was.
2020-04-22 09:58:12 +01:00
Michal Koutný ff5499824f mkosi: Unify environment for unit tests
Some testcases in test-execute rely on existence of user groups with
certain gids. However, their existence is not universally granted [1].
Although the test could be skipped in their absence and give up testing
some code paths, different approach was chosen -- create dummy groups in
the testing image.

[1] See how systemd-sysusers allocates gids (e.g.
src/test/test-uid-range.c).
2020-04-22 10:35:12 +02:00
Michal Koutný 9acb2964d7 test: Simplify hostname checking
Both hostname and uname utilities boil down to uname(2) syscall. Reduce
tests dependency footprint by using uname for checking hostname too.
2020-04-22 10:35:12 +02:00
Michal Koutný bac567a53b mkosi: Use distro-invariant rootprefix
Distributions may be build with various configs, e.g. customized
rootprefix. It'd be unmaintanable to have specific mkosi.build for each
supported distro. Hence, make the build script flexible yet distro
oblivious.
2020-04-22 10:35:12 +02:00
Zbigniew Jędrzejewski-Szmek 9df91db5e0 Merge pull request #15519 from DaanDeMeyer/sd-bus-message-read-strv-docs 2020-04-22 09:44:27 +02:00
Frantisek Sumsal 80b44b38b5 test: correctly clean up test artifacts
Remove the artifact files indicating test result (testok, failed, and
skipped) just before running the test so we always get the latest and
most relevant result instead of incorrectly consuming previous results.

Discovered in https://github.com/systemd/systemd/pull/15378#issuecomment-616801873
2020-04-22 08:57:38 +02:00
Balaji Punnuru f6f4f5fe53 util: return the correct correct wd from inotify helpers
We need to propagate the acquired watch descriptors because our callers
are counting on them.

[Lennart: this is split out of #15381 and simplified]
2020-04-22 08:57:17 +02:00
Lennart Poettering df3d3bdfe8 core: minor error code handling fixes 2020-04-22 08:56:05 +02:00
Daan De Meyer 42f5c9a335 sd-bus: Clarify sd_bus_list_names results ownership 2020-04-22 08:42:50 +02:00
Daan De Meyer e5f1a3faab sd-bus: Add sd_bus_message_read_strv docs 2020-04-22 08:42:29 +02:00
Zbigniew Jędrzejewski-Szmek 2807b68019
Merge pull request #15520 from mrc0mmand/various-codebase-improvements
tree-wide: various codebase improvements
2020-04-22 08:41:38 +02:00
Zbigniew Jędrzejewski-Szmek a00f28c554
Merge pull request #15443 from ddstreet/use_gateway_backwards_compatible
Make UseGateway= default backwards compatible, and fix UseGateway/RoutesToDNS
2020-04-22 08:39:46 +02:00
Dan Streetman 06c2b0c76b test: verify RoutesToDNS= is independent of UseGateway= 2020-04-21 17:21:37 -04:00
Frantisek Sumsal 86b52a3958 tree-wide: fix spelling errors
Based on a report from Fossies.org using Codespell.

Followup to #15436
2020-04-21 23:21:08 +02:00