Commit graph

37785 commits

Author SHA1 Message Date
Filipe Brandenburger c3e270f4ee docs: add a "front matter" snippet to our markdown pages
It turns out Jekyll (the engine behind GitHub Pages) requires that pages
include a "Front Matter" snippet of YAML at the top for proper rendering.

Omitting it will still render the pages, but including it opens up new
possibilities, such as using a {% for %} loop to generate index.md instead of
requiring a separate script.

I'm hoping this will also fix the issue with some of the pages (notably
CODE_OF_CONDUCT.html) not being available under systemd.io

Tested locally by rendering the website with Jekyll. Before this change, the
*.md files were kept unchanged (so not sure how that even works?!), after this
commit, proper *.html files were generated from it.
2019-01-02 14:16:34 -08:00
Alex Mayer 8d7fac92f0 Docs: Add Missing Space Between Words 2019-01-03 03:07:50 +09:00
Zbigniew Jędrzejewski-Szmek f41c6dba15
Merge pull request #11291 from yuwata/fix-11259
meson: check whether C.UTF-8 exists or not and use it if exists
2019-01-02 09:36:01 +01:00
Burt P 6012eaef6e hwdb/sdio.ids: add BCM43438 + minor rewording of class name
* BCM43438 is used in the Raspberry Pi 3 B and B+
  https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
  "BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board"
* With this minor change to "C 00", each class name could be prefixed
  with "Is a" and still make sense.

Signed-off-by: Burt P <pburt0@gmail.com>
2019-01-02 08:21:54 +01:00
Zbigniew Jędrzejewski-Szmek 339725910a
Merge pull request #11297 from yuwata/fix-11295
ask-password: fix assertion
2019-01-02 08:19:27 +01:00
Yu Watanabe 03475e2232 meson: check whether C.UTF-8 exists or not and use it if exists
If C.UTF-8 does not exist, then fallback to en_US.UTF-8 or C.
2019-01-02 03:41:36 +09:00
Yu Watanabe 1f00998c87 ask-password-api: do not call ask_password_keyring() if keyname == NULL
Fixes #11295.
2018-12-30 21:13:47 +09:00
Yu Watanabe 8a111277c4 ask-password: make ask_password_keyring() static 2018-12-30 21:09:41 +09:00
ikelos 04ca4d191b Improve kernel-install support for initrd files. (#11281)
The current support in kernel-install for initrd images doesn't copy
over the initrd file or allow a means for it to be specified (it
requires a specific filename in a particular directory).

This patchset adds support for (optionally) providing the name of
initial ramdisk file to copied over and used by kernel-install.
2018-12-30 04:01:10 +09:00
Dave Reisner 8ca9e92c74 Make default locale a compile time option
Default to a locale that's guaranteed to exist everywhere, but let
distros override this with something more exotic if they choose to.

Closes #11259.
2018-12-29 21:43:04 +09:00
Thomas Haller 911649fdd4 build: don't include shared's "serialize.h" in basic's "time-util.c"
"src/basic/time-util.c" is part of src/basic and should not include
"src/shared/serialize.h". It is one of the few cases where this
is done. Also, it's not even required.
2018-12-29 19:27:23 +09:00
Jani Uusitalo ad7c65e6b8 Replace 'older then' with 'older than' 2018-12-28 14:32:14 -08:00
Yu Watanabe adeb26c1af udev-event: do not read stdout or stderr if the pipefd is not created
Fixes #11255.
2018-12-28 12:51:40 +01:00
Yu Watanabe a5c67ccc57 switch-root: fix error message
Fixes #11261.
2018-12-28 15:37:15 +09:00
Evgeny Vereshchagin 7334ade4a7 core: free lines after reading them
Closes https://github.com/systemd/systemd/issues/11251.
2018-12-28 15:36:00 +09:00
rogerjames99 7da7340afd Do not start server if it is already runnning (#11245) 2018-12-28 15:34:43 +09:00
James Hilliard 46e63a2a3e meson: use cross compilation compatible c++ check 2018-12-28 12:17:06 +09:00
Patrick Williams 8eab766804 core: support %j in unit dependency resolution
Commit 250e9fadbc introduced
support for %j/%J specifier in unit files.  The function
unit_name_printf is used in unit dependency resolution,
such as Wants / After directives, but was missing support
for the %j.  Add to allow directives such as:

    [Unit]
    Wants=bar-%j.target

Fixes: systemd/systemd#11217
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2018-12-22 17:21:13 +09:00
Zbigniew Jędrzejewski-Szmek 1742aae2aa NEWS: add one more name and adjust location 2018-12-21 19:53:33 +01:00
Zbigniew Jędrzejewski-Szmek 1a2397e985
Merge pull request #11239 from poettering/news-v240-final
NEWS and build system bump for 240
2018-12-21 19:49:54 +01:00
Zbigniew Jędrzejewski-Szmek cd2a429ed7 tree-wide: use assert_se() for signal operations with constants
Continuation of a3ebe5eb620e49f0d24082876cafc7579261e64f:
in other places we sometimes use assert_se(), and sometimes normal error
handling. sigfillset and sigaddset can only fail if mask is NULL (which cannot
happen if we are passing in a reference), or if the signal number is invalid
(which really shouldn't happen when we are using a constant like SIGCHLD. If
SIGCHLD is invalid, we have a bigger problem). So let's simplify things and
always use assert_se() in those cases.

In sigset_add_many() we could conceivably pass an invalid signal, so let's keep
normal error handling here. The caller can do assert_se() around the
sigprocmask_many() call if appropriate.

'>= 0' is used for consistency with the rest of the codebase.
2018-12-21 19:49:28 +01:00
Zbigniew Jędrzejewski-Szmek 9d6e839ed8
Merge pull request #11206 from cdown/cgroup_no_v1
cgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all
2018-12-21 19:48:51 +01:00
Dmitry Torokhov 56c886dc7e sd-device: ignore bind/unbind events for now
Until systemd/udev are ready for the new events and do not flush entire
device state on each new event received, we should ignore them.
2018-12-21 19:48:13 +01:00
Zbigniew Jędrzejewski-Szmek 8340b762e4 Revert "sleep: offer hibernation only if the kernel image still exists"
This reverts commit edda44605f.

The kernel explicitly supports resuming with a different kernel than the one
used before hibernation. If this is something that shouldn't be supported, the
place to change this is in the kernel. We shouldn't censor something that this
exclusively in the kernel's domain.

People might be using this to switch kernels without restaring programs, and
we'd break this functionality for them.

Also, even if resuming with a different kernel was a bad idea, we don't really
prevent that with this check, since most users have more than one kernel and
can freely pick a different one from the menu. So this only affected the corner
case where the kernel has been removed, but there is no reason to single it
out.
2018-12-21 18:23:17 +01:00
Lennart Poettering 44f52cce9e
Merge pull request #11050 from poettering/resolved-domain-route
resolved: beef up domain routing
2018-12-21 18:03:58 +01:00
Lennart Poettering 5848a9eb4d
Merge pull request #11210 from thom311/dhcp-set-client-id-no-inval
dhcp: don't enforce hardware address length for sd_dhcp_client_set_client_id()
2018-12-21 18:00:42 +01:00
Zbigniew Jędrzejewski-Szmek 830464c3e4 tree-wide: make new/new0/malloc_multiply/reallocarray safe for size 0
All underlying glibc calls are free to return NULL if the size argument
is 0. We most often call those functions with a fixed argument, or at least
something which obviously cannot be zero, but it's too easy to forget.

E.g. coverity complains about "rows = new0(JsonVariant*, n_rows-1);" in
format-table.c There is an assert that n_rows > 0, so we could hit this
corner case here. Let's simplify callers and make those functions "safe".

CID #1397035.

The compiler is mostly able to optimize this away:
$ size build{,-opt}/src/shared/libsystemd-shared-239.so
(before)
   text	   data	    bss	    dec	    hex	filename
2643329	 580940	   3112	3227381	 313ef5	build/src/shared/libsystemd-shared-239.so     (-O0 -g)
2170013	 578588	   3089	2751690	 29fcca	build-opt/src/shared/libsystemd-shared-239.so (-03 -flto -g)
(after)
   text	   data	    bss	    dec	    hex	filename
2644017	 580940	   3112	3228069	 3141a5	build/src/shared/libsystemd-shared-239.so
2170765	 578588	   3057	2752410	 29ff9a	build-opt/src/shared/libsystemd-shared-239.so
2018-12-21 16:39:34 +01:00
Zbigniew Jędrzejewski-Szmek 5f9026027d analyze: add assert to verify we are not dividing by 0
CID #1397051.
2018-12-21 16:15:14 +01:00
Yu Watanabe a3ebe5eb62 udevadm: add two more assertions
Suggested by Coverity.

Closes CID#1397033 and CID#1395708.
2018-12-21 15:49:18 +01:00
Lennart Poettering 326731624c NEWS: prepare for v240 2018-12-21 15:02:11 +01:00
Lennart Poettering 67bee56fd5 build-sys: bump package/library versions 2018-12-21 14:58:49 +01:00
Chris Down 8f044cf9c9 cgroup: Add NEWS entry for cgroup_no_v1=all implying unified usage 2018-12-21 13:29:27 +00:00
Chris Down 5f086dc7db cgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all
cgroup_no_v1=all doesn't make a whole lot of sense with legacy hierarchy
(where we use v1 hierarchy for everything), or hybrid hierarchy (where
we still use v1 hierarchy for resource control).

Right now we have to tell people to add both cgroup_no_v1=all and
systemd.unified_cgroup_hierarchy=1 to get the desired behaviour,
however in reality it's hard to imagine any situation where someone
passes cgroup_no_v1=all but *doesn't* want to use the unified cgroup
hierarchy.

Make it so that cgroup_no_v1=all produces intuitive behaviour in systemd
by default, although it can still be disabled by passing
systemd.unified_cgroup_hierarchy=0 explicitly.
2018-12-21 13:29:27 +00:00
Lennart Poettering 2e88625f03 man: document new systemd-resolved.service(8) routing features in more detail 2018-12-21 12:10:07 +01:00
Lennart Poettering 396c716c62 man: split long section in systemd-resolved.service man page into three
Also, do some minor updating.
2018-12-21 12:10:07 +01:00
Lennart Poettering fdb4d3138a resolved: read DNS default route option from networkd 2018-12-21 12:10:07 +01:00
Lennart Poettering c629354e84 sd-network: add new API sd_network_link_get_dns_default_route()
This simply reads from networkd's state files whether a link shall be
used as DNS default route.
2018-12-21 12:10:07 +01:00
Lennart Poettering 7ece6f5897 networkd: permit DNS "DefaultRoute" configuration in .network files 2018-12-21 12:10:07 +01:00
Lennart Poettering 09451975df networkd: small simplification 2018-12-21 12:10:07 +01:00
Lennart Poettering f2fd3cdb45 resolvectl: add support for reading/writing per-link 'default-route' boolean 2018-12-21 12:10:07 +01:00
Lennart Poettering efe55c8165 resolvectl: minor whitespace fix 2018-12-21 12:10:07 +01:00
Lennart Poettering 77673795dc resolved: add bus API to set per-link "default route" boolean 2018-12-21 12:10:07 +01:00
Lennart Poettering ca5394d260 resolved: add an explicit way to configure whether a link is useful as default route
Previously, we'd use a link as "default" route depending on whether
there are route-only domains defined on it or not. (If there are, it
would not be used as default route, if there aren't it would.)

Let's make this explicit and add a link variable controlling this. The
variable is not changeable from the outside yet, but subsequent commits
are supposed to add that.

Note that making this configurable adds a certain amount of redundancy,
as there are now two ways to ensure a link does not receive "default"
lookup (i.e. DNS queries matching no configured route):

1. By ensuring that at least one other link configures a route on it
   (for example by add "." to its search list)

2. By setting this new boolean to false.

But this is exactly what is intended with this patch: that there is an
explicit way to configure on the link itself whether it receives
'default' traffic, rather than require this to be configured on other
links.

The variable added is a tri-state: if true, the link is suitable for
recieving "default" traffic. If false, the link is not suitable for it.
If unset (i.e. negative) the original logic of "has this route-only
routes" is used, to ensure compatibility with the status quo ante.
2018-12-21 12:10:07 +01:00
Lennart Poettering f76fa08899 resolved: rework dns_server_limited_domains(), replace by dns_scope_has_route_only_domains()
The function dns_server_limited_domains() was very strange as it
enumerate the domains associated with a DnsScope object to determine
whether any "route-only" domains, but did so as a function associated
with a DnsServer object.

Let's clear this up, and replace it by a function associated with a
DnsScope instead. This makes more sense philosphically and allows us to
reduce the loops through which we need to jump to determine whether a
scope is suitable for default routing a bit.
2018-12-21 12:09:00 +01:00
Lennart Poettering 1750854916 resolved: bind .local domains to mDNS with DNS_SCOPE_YES, similar LLMNR
Previously, we'd return DNS_SCOPE_MAYBE for all domain lookups matching
LLMNR or mDNS. Let's upgrade this to DNS_SCOPE_YES, to make the binding
stronger.

The effect of this is that even if "local" is defined as routing domain
on some iface, we'll still lookup domains in local via mDNS — if mDNS is
turned on. This should not be limiting, as people who don't want such
lookups should turn off mDNS altogether, as it is useless if nothing is
routed to it.

This also has the nice benefit that mDNS/LLMR continue to work if people
use "~." as routing domain on some interface.

Similar for LLMNR and single label names.

Similar also for the link local IPv4 and IPv6 reverse lookups.

Fixes: #10125
2018-12-21 11:41:45 +01:00
Lennart Poettering a97a3b256c resolved: rework how we determine which scope to send a query to
Fixes: #10830 #9825 #9472
2018-12-21 11:04:11 +01:00
Lennart Poettering 89307df394 resolved: add comment, explaining when Scope variables are copied from Link 2018-12-21 11:04:11 +01:00
Lennart Poettering 2bfdd6dc54 resolved: rename_DNS_SCOPE_INVALID → _DNS_SCOPE_MATCH_INVALID
The _INVALID and _MAX enum fields should always use the full name of
thenum.
2018-12-21 11:04:11 +01:00
Lennart Poettering dc2bc986eb resolved: check dns_over_tls_mode in link_needs_save()
This was forgotten when DoT was added.
2018-12-21 11:04:11 +01:00
Lennart Poettering 9a1bbc6642 resolved: use structured initialization for DnsScope 2018-12-21 11:04:11 +01:00