Zbigniew Jędrzejewski-Szmek [Fri, 14 Sep 2018 14:39:47 +0000 (16:39 +0200)]
man: remove recommendation to pull in slices from slices.target
That recommendation is likely to cause more trouble and for pretty
much all end-user units is not useful. Let's recommend relying on
the implicit dependency instead.
Fixes #10015.
Zbigniew Jędrzejewski-Szmek [Fri, 14 Sep 2018 14:02:48 +0000 (16:02 +0200)]
man: add a description of systemctl return codes
Fixes #10056.
Franck Bui [Fri, 14 Sep 2018 07:24:08 +0000 (09:24 +0200)]
socket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails
Both SO_SNDBUFFORCE and SO_RCVBUFFORCE requires capability 'net_admin'.
If this capability is not granted to the service the first attempt to increase
the recv/snd buffers (via sd_notify()) with SO_RCVBUFFORCE/SO_SNDBUFFORCE will
fail, even if the requested size is lower than the limit enforced by the
kernel.
If apparmor is used, the DENIED logs for net_admin will show up. These log
entries are seen as red warning light, because they could indicate that a
program has been hacked and tries to compromise the system.
It would be nicer if they can be avoided without giving services (relying on
sd_notify) net_admin capability or dropping DENIED logs for all such services
via their apparmor profile.
I'm not sure if sd_notify really needs to forcibly increase the buffer sizes,
but at least if the requested size is below the kernel limit, the capability
(hence the log entries) should be avoided.
Hence let's first ask politely for increasing the buffers and only if it fails
then ignore the kernel limit if we have sufficient privileges.
Zbigniew Jędrzejewski-Szmek [Fri, 14 Sep 2018 08:05:59 +0000 (10:05 +0200)]
Merge pull request #9920 from yuwata/udev-cleanup-4
udev: drop unused udev structs and use verbs in udevadm
Harshit Jain [Fri, 14 Sep 2018 07:04:10 +0000 (12:34 +0530)]
man: fix typo (#10084)
fixes #10083
Alan Jenkins [Fri, 14 Sep 2018 03:11:57 +0000 (04:11 +0100)]
user-runtime-dir@.service: don't stop on runlevel switch (#10079)
Followup to commit
13cf422e04b7 ("user@.service: don't kill user manager at runlevel switch")
I think there's a general rule that units with `StopWhenUnneeded=yes` need
`IgnoreOnIsolate=yes`... But it doesn't apply to `suspend.target` and friends.
`printer.target` and friends break on isolate even if we apply the rule[1].
That just leaves `graphical-session.target`, which is a user service.
"isolate" is *mostly* a weird attempt to emulate runlevels, so I decided
not to worry about it for user services.
[1] https://github.com/systemd/systemd/issues/6505#issuecomment-
320644819
killermoehre [Thu, 13 Sep 2018 11:53:03 +0000 (13:53 +0200)]
replace https://github.com/systemd/systemd/blob/master/doc/* with https://github.com/systemd/systemd/blob/master/docs/* to point to proper documentation
Thomas Blume [Wed, 12 Sep 2018 13:10:58 +0000 (15:10 +0200)]
user@.service: don't kill user manager at runlevel switch
Loggin in as root user and then switching the runlevel results in a
stop of the user manager, even though the user ist still logged in.
That leaves a broken user session.
Adding "IgnoreOnIsolate=true" to user@.service fixes this.
Yu Watanabe [Thu, 13 Sep 2018 07:37:33 +0000 (16:37 +0900)]
test: unset $XDG_{CONFIG,DATA}_DIRS
When $XDG_DATA_DIRS is unset, then, the default value
'/usr/local/share:/usr/share' is used.
When $XDG_DATA_DIRS contain the default paths but the order
is inverted: '/usr/share:/usr/local/share', then test-path-lookup fails.
Fixes #10002.
Lennart Poettering [Wed, 12 Sep 2018 19:39:14 +0000 (21:39 +0200)]
update TODO
afg [Wed, 29 Aug 2018 01:20:27 +0000 (09:20 +0800)]
nspawn: use copy-static if systemd-resolved is up and image is writable
Lennart Poettering [Wed, 12 Sep 2018 18:45:31 +0000 (20:45 +0200)]
Merge pull request #10061 from xnox/fix-logindless-scheduled-shutdown
Fix logindless scheduled shutdown
Lennart Poettering [Wed, 12 Sep 2018 18:17:53 +0000 (20:17 +0200)]
Merge pull request #10060 from yuwata/property-take-value
bus-util: make --property= optionaly take value
Filipe Brandenburger [Wed, 12 Sep 2018 07:23:40 +0000 (00:23 -0700)]
test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
This makes it so that tests no longer need to know the absolute paths to the
source and build dirs, instead using the systemd-runtest.env file to get these
paths when running from the build tree.
Confirmed that test-catalog works on `ninja test`, when called standalone and
also when the environment file is not present, in which case it will use the
installed location under /usr/lib/systemd/catalog.
The location can now also be overridden for this test by setting the
$SYSTEMD_CATALOG_DIR environment variable.
Filipe Brandenburger [Wed, 12 Sep 2018 06:55:02 +0000 (23:55 -0700)]
test: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA
This simplifies get_testdata_dir() to simply checking for an environment
variable, with an additional function to locate a systemd-runtest.env file in
the same directory as the test binary and reading environment variable
assignments from that file if it exists.
This makes it possible to:
- Run `ninja test` from the build dir and have it use ${srcdir}/test for
test unit definitions.
- Run a test directly, such as `build/test-execute` and have it locate
them correctly.
- Run installed tests (from systemd-tests package) and locate the test
units in the installed location (/usr/lib/systemd/tests/testdata), in
which case the absence of the systemd-runtest.env file will have
get_testdata_dir() use the installed location hardcoded into the
binaries.
Explicit setting of $SYSTEMD_TEST_DATA still overrides the contents of
systemd-runtest.env.
Filipe Brandenburger [Wed, 12 Sep 2018 06:15:09 +0000 (23:15 -0700)]
test: remove support for suffix in get_testdata_dir()
Instead, use path_join() in callers wherever needed.
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:51:27 +0000 (11:51 +0200)]
Set theme jekyll-theme-slate
Yu Watanabe [Wed, 12 Sep 2018 03:36:22 +0000 (12:36 +0900)]
bash-completion: systemctl: re-implement __filter_units_by_properties()
This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.
Yu Watanabe [Tue, 11 Sep 2018 08:18:14 +0000 (17:18 +0900)]
bus-util: make --property= optionally take value
Michael Biebl [Tue, 11 Sep 2018 21:30:16 +0000 (23:30 +0200)]
Merge pull request #10046 from yuwata/fix-10045
test: use installed catalogs when test-catalog is not located at build dir
Dimitri John Ledkov [Tue, 11 Sep 2018 09:41:56 +0000 (10:41 +0100)]
systemctl: correctly proceed to immediate shutdown if scheduling fails
Actually check the return code from logind_schedule_shutdown() and proceed to
immediate shutdown if that fails. Negative return codes can be returned if
systemctl is compiled without logind support, or if logind otherwise failed
(either too old, disabled/masked, or it is incomplete
systemd-shim/systemd-service implementation).
Thomas Haller [Tue, 11 Sep 2018 00:45:48 +0000 (02:45 +0200)]
dhcp: fix assertion starting DHCP client without MAC address (#10054)
An assertion in dhcp_network_bind_raw_socket() is triggered when
starting an sd_dhcp_client without setting a MAC address first.
- sd_dhcp_client_start()
- client_start()
- client_start_delayed()
- dhcp_network_bind_raw_socket()
In that case, the arp-type and MAC address is still unset. Note that
dhcp_network_bind_raw_socket() already checks for a valid arp-type
and MAC address below, so we should just gracefully return -EINVAL.
Maybe sd_dhcp_client_start() should fail earlier when starting without
MAC address. But the failure here will be correctly propagated and
the start aborted.
Fixes:
76253e73f9c9c24fec755e485516f3b55d0707b4
Yu Watanabe [Tue, 11 Sep 2018 00:18:33 +0000 (09:18 +0900)]
test: make test-catalog relocatable
Fixes #10045.
Yu Watanabe [Tue, 11 Sep 2018 00:17:22 +0000 (09:17 +0900)]
test: introduce test_is_running_from_builddir()
Dariusz Gadomski [Mon, 10 Sep 2018 22:35:30 +0000 (00:35 +0200)]
hwdb: Update PNP IDs of Goldstar (now: LG Electronics). (#10051)
hwdb: Update PNP IDs of Goldstar (now: LG Electronics)
Franck Bui [Mon, 10 Sep 2018 12:17:32 +0000 (14:17 +0200)]
nspawn: always use mode 555 for /sys
When a network namespace is needed, /sys is mounted as tmpfs (see commit
d8fc6a000fe21b0c1ba27f for details).
But in this case mode 755 was used as initial permissions for /sys whereas the
default mode for sysfs is 555.
In practice using 755 doesn't have any impact because /sys is mounted read-only
too but for consistency, let's use the correct mode.
Fixes: #10050
Dimitri John Ledkov [Mon, 10 Sep 2018 18:54:12 +0000 (19:54 +0100)]
Revert "systemctl: if no logind, don't try to schedule shutdown"
This reverts commit
c68867da320de296917820e5a76e902a8a86be5a.
Dimitri John Ledkov [Mon, 10 Sep 2018 18:53:59 +0000 (19:53 +0100)]
Revert "systemctl: fix compilation w/o logind"
This reverts commit
807690fb7f7e4998e2bb67f32026ab9f1c7b8077.
Jürg Billeter [Sat, 18 Aug 2018 07:29:43 +0000 (09:29 +0200)]
pam_systemd: support use in PID namespaces
Pass 0 as leader PID to CreateSession to let logind use the PID from the
D-Bus credentials. This allows use of pam_systemd in PID namespaces.
Yu Watanabe [Wed, 22 Aug 2018 14:56:34 +0000 (23:56 +0900)]
udevadm-util: drop unused function print_version()
Yu Watanabe [Wed, 22 Aug 2018 14:52:52 +0000 (23:52 +0900)]
udevadm-info: make info_main() returns negative value on error
Also, this replaces fprintf(stderr, ...) by log_error().
Yu Watanabe [Wed, 22 Aug 2018 14:41:55 +0000 (23:41 +0900)]
udevadm-trigger: make trigger_main() returns negative value on error
Yu Watanabe [Tue, 21 Aug 2018 07:24:23 +0000 (16:24 +0900)]
udevadm-test: modernize code
Yu Watanabe [Tue, 21 Aug 2018 07:08:54 +0000 (16:08 +0900)]
udevadm-test-builtin: modernize code
Yu Watanabe [Wed, 22 Aug 2018 12:59:29 +0000 (21:59 +0900)]
udevadm-settle: modernize code
Yu Watanabe [Fri, 24 Aug 2018 12:55:47 +0000 (21:55 +0900)]
udevadm-monitor: modernize code
Yu Watanabe [Fri, 24 Aug 2018 12:55:19 +0000 (21:55 +0900)]
udevadm-control: modernize code a bit
Yu Watanabe [Tue, 21 Aug 2018 02:28:26 +0000 (11:28 +0900)]
udevadm-hwdb: modernize code a bit
Yu Watanabe [Wed, 22 Aug 2018 12:50:50 +0000 (21:50 +0900)]
strbuf: accept NULL for strbuf_cleanup()
Yu Watanabe [Tue, 21 Aug 2018 02:17:01 +0000 (11:17 +0900)]
udevadm: use dispatch_verb() and drop udevadm_cmd struct
Yu Watanabe [Tue, 28 Aug 2018 05:02:37 +0000 (14:02 +0900)]
udevd: drop unused refcount
Yu Watanabe [Tue, 28 Aug 2018 05:01:35 +0000 (14:01 +0900)]
udev-ctrl: use DEFINE_TRIVIAL_REF_FUNC() macro or friends
Yu Watanabe [Wed, 22 Aug 2018 10:57:32 +0000 (19:57 +0900)]
udev: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 10:57:07 +0000 (19:57 +0900)]
udev: drop unused udev_watch struct
Yu Watanabe [Wed, 22 Aug 2018 10:51:32 +0000 (19:51 +0900)]
libudev-util: adjust type of returned value by util_string_hash32()
Yu Watanabe [Wed, 22 Aug 2018 10:46:37 +0000 (19:46 +0900)]
libudev-util: drop unnecessary argument 'struct udev *udev' from util_resolve_subsys_kernel()
Yu Watanabe [Wed, 22 Aug 2018 08:10:38 +0000 (17:10 +0900)]
udev/net: replace udev_device by sd_device
Yu Watanabe [Fri, 24 Aug 2018 03:31:15 +0000 (12:31 +0900)]
udev/scsi_id: drop never used code blocks
Yu Watanabe [Fri, 24 Aug 2018 03:30:38 +0000 (12:30 +0900)]
udev/scsi_id: coding style fixes
Yu Watanabe [Fri, 24 Aug 2018 03:30:12 +0000 (12:30 +0900)]
udev/scsi_id: drop unused udev struct
Yu Watanabe [Thu, 23 Aug 2018 12:04:25 +0000 (21:04 +0900)]
udev/cdrom_id: drop duplicated logs
Yu Watanabe [Wed, 22 Aug 2018 08:07:45 +0000 (17:07 +0900)]
udev/cdrom_id: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 08:06:26 +0000 (17:06 +0900)]
udev/ata_id: coding style fixes
Yu Watanabe [Wed, 22 Aug 2018 08:05:57 +0000 (17:05 +0900)]
udev/ata_id: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 08:03:42 +0000 (17:03 +0900)]
udev: drop collect
Zbigniew Jędrzejewski-Szmek [Sun, 9 Sep 2018 19:01:17 +0000 (21:01 +0200)]
Merge pull request #10037 from filbranden/docs2
Moving docs around and starting conversion to Markdown
Filipe Brandenburger [Sat, 8 Sep 2018 20:55:09 +0000 (13:55 -0700)]
build-sys: Use common gcc argument detection for negative warning flags.
Starting with meson 0.46, it is able to detect these argument correctly.
See this commit in meson codebase for more details:
https://github.com/mesonbuild/meson/commit/
695b8f3a0377d3e2ce78ba8716adc365b18edea1
We already carry a requirement for meson_version : '>= 0.46', so we can be sure
our build system will include this commit.
Tested by building systemd using a cloned meson synced to the 0.46.0 tag,
confirmed the warnings were detected correctly in that case. The meson messages included this snippet:
> Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
> Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
> Compiler for C supports arguments -Wno-unused-result -Wunused-result: YES
> Compiler for C supports arguments -Wno-format-signedness -Wformat-signedness: YES
> Compiler for C supports arguments -Wno-error=nonnull -Werror=nonnull: YES
> Compiler for C supports arguments -Wno-maybe-uninitialized -Wmaybe-uninitialized: YES
Zbigniew Jędrzejewski-Szmek [Sun, 9 Sep 2018 18:39:23 +0000 (20:39 +0200)]
Merge pull request #10042 from jwrdegoede/hwdb-sensors4
Hwdb sensors4
Hans de Goede [Fri, 7 Sep 2018 11:14:52 +0000 (13:14 +0200)]
hwdb: Add accelerometer orientation quirk for the Onda v975w tablet
Add accelerometer orientation quirk for the Onda v975w tablet.
Hans de Goede [Sat, 30 Jun 2018 19:56:59 +0000 (21:56 +0200)]
hwdb: Add accelerometer orientation quirk for the Connect Tablet9 tablet
Add accelerometer orientation quirk for the Connect Tablet9 tablet.
Hans de Goede [Sun, 20 May 2018 15:33:30 +0000 (17:33 +0200)]
hwdb: Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd
Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd 2-in-1.
Hans de Goede [Fri, 8 Jun 2018 07:29:09 +0000 (09:29 +0200)]
hwdb: Add accelerometer orientation quirk for the Chuwi Vi10 tablet
Add accelerometer orientation quirk for the Chuwi Vi10 (CWI505) tablet.
While at it also update the Chuwi Hi8 Pri comment to include the
CWI model-number.
Filipe Brandenburger [Fri, 7 Sep 2018 08:44:49 +0000 (01:44 -0700)]
docs: convert TRANSLATORS to Markdown
Also expand it to cover typical tasks of creating new translations, updating
existing ones and compiling them (which can be useful to check syntax.)
Filipe Brandenburger [Fri, 7 Sep 2018 08:22:34 +0000 (01:22 -0700)]
docs: convert DISTRO_PORTING to Markdown
Filipe Brandenburger [Fri, 7 Sep 2018 08:07:06 +0000 (01:07 -0700)]
docs: move markdown docs from .github/ to docs/
The GitHub guide on contributing file says: "Decide whether to store your
contributing guidelines in your repository's root, docs, or .github directory."
https://help.github.com/articles/setting-guidelines-for-repository-contributors/#adding-a-contributing-file
But there's really no advantage to keeping it in the hidden .github/, since
these are public and really belong together with the other documentation.
We can still keep the issue templates under .github/, since they are not really
documentation on their own.
Updated the links pointing to CONTRIBUTING.md to refer to the one in docs/.
Filipe Brandenburger [Fri, 7 Sep 2018 08:02:42 +0000 (01:02 -0700)]
docs: move doc/ to docs/
The docs/ directory is special in GitHub, since it can be used to serve GitHub
Pages from, so there's a benefit to switching to it in order to expose it
directly as a website.
Updated references to it from the documentations themselves, from the
CONTRIBUTING.md file and from Meson build files.
Zbigniew Jędrzejewski-Szmek [Sat, 8 Sep 2018 15:17:07 +0000 (17:17 +0200)]
Merge pull request #9832 from yuwata/fix-9831
network: fixes related to setting MTU
Zbigniew Jędrzejewski-Szmek [Sat, 8 Sep 2018 10:08:54 +0000 (12:08 +0200)]
Merge pull request #9942 from lucaswerkmeister/9939
seccomp: fix #9939 and allow specifying multiple errnos for syscall
Filipe Brandenburger [Thu, 6 Sep 2018 19:34:24 +0000 (12:34 -0700)]
build-sys: disable -Wmaybe-uninitialized
Compiler flag -Wmaybe-uninitialized is quite noisy and produces many false
positives, especially when optimization flags are enabled (tested gcc 8.2.1),
so let's just disable it in systemd build.
For example, with CFLAGS=-O2, the build produces 11 such warnings and the
default CFLAGS of Fedora's rpmbuild warns about it in 176 places. A look at a
sample of those shows that most are false positives, where the compiler just
can't figure it out correctly. (While fixing those would be nice, I'm not sure
it's a good use of our time.)
The noisy [-Wmaybe-uninitialized] warnings are not just an annoyance, since
they make it harder to spot warnings that indicate actual problems (such as
variable declared but not used.) Silencing those is beneficial, so that
contributors would see warnings where there are actually actionable problems,
so there's a better chance of having those issues addressed before a PR is
pushed.
Tested:
$ CFLAGS='-O2 -Wp,-D_FORTIFY_SOURCE=2' meson build/
$ ninja -C build/
(NOTE: -Wp,-D_FORTIFY_SOURCE=2 prevents [-Wstringop-truncation] warnings.)
With the commands above, the build will not produce any [-Wmaybe-uninitialized]
warnings (or any other warnings), which is not really the case before this commit.
Also tested with rpmbuild on Fedora, after this commit there are no warnings
produced in the build step.
Evgeny Vereshchagin [Fri, 7 Sep 2018 06:13:17 +0000 (06:13 +0000)]
tests: put fuzz_journald_processing_function in a .c file
Wyatt Ward [Sat, 8 Sep 2018 06:18:44 +0000 (02:18 -0400)]
hwdb: Add hwdb entry for X220 tablet (#10036)
Lucas Werkmeister [Wed, 29 Aug 2018 19:35:38 +0000 (21:35 +0200)]
seccomp: permit specifying multiple errnos for a syscall
If more than one errno is specified for a syscall in SystemCallFilter=,
use the last one instead of reporting an error. This is especially
useful when used with system call sets:
SystemCallFilter=@privileged:EPERM @reboot
This will block any system call requiring super-user capabilities with
EPERM, except for attempts to reboot the system, which will immediately
terminate the process. (@reboot is included in @privileged.)
This also effectively fixes #9939, since specifying different errnos for
“the same syscall” (same pseudo syscall number) is no longer an error.
Yu Watanabe [Wed, 5 Sep 2018 05:56:08 +0000 (14:56 +0900)]
gitignore: add nspawn image lock and mkosi temporary files
Yu Watanabe [Thu, 6 Sep 2018 02:58:29 +0000 (11:58 +0900)]
backlight: do not unref parent device
Fixes double-free introduced by
9aadd28149ae2d8ce9956495c961d97ba4033b0e.
Filipe Brandenburger [Fri, 7 Sep 2018 03:10:22 +0000 (20:10 -0700)]
po: update Brazilian Portuguese translation
Julian Andres Klode [Fri, 7 Sep 2018 14:39:44 +0000 (16:39 +0200)]
man: Document networkd states in networkctl(1) (#10033)
The manpage gives example outputs with the states, but it never
explains what the states are.
Fixes #575
Wyatt Ward [Fri, 7 Sep 2018 01:35:55 +0000 (21:35 -0400)]
hwdb: Added entry for X200 Tablet/X201 Tablet so their pointing sticks would be recognized. They share parts with normal X200 and X201's. (#10029)
Yu Watanabe [Wed, 5 Sep 2018 02:46:17 +0000 (11:46 +0900)]
Merge pull request #10009 from evverx/rework-journald-fuzzers
Add a fuzzer for server_process_native_message
Yu Watanabe [Fri, 24 Aug 2018 02:19:22 +0000 (11:19 +0900)]
sd-dhcp6: set requested time for DUID-LLT
Follow-up for
7e90a499ab1d5648c9169b5991b117d36fc59fad.
Yu Watanabe [Fri, 24 Aug 2018 02:14:32 +0000 (11:14 +0900)]
sd-dhcp: drop meaningless checking
mac_addr is not dynamically allocated.
Fixes CID 1395162 and 1395164.
Trevonn [Tue, 4 Sep 2018 16:47:08 +0000 (17:47 +0100)]
hwdb: add Logitech G703 Wired/Wireless (#10005)
Network Silence [Tue, 4 Sep 2018 16:46:07 +0000 (12:46 -0400)]
hwdb: Synaptics touchpad edge fix for HP Pavilion G6 (#10008)
Michal Sekletar [Thu, 30 Aug 2018 08:45:11 +0000 (08:45 +0000)]
cryptsetup-generator: introduce basic keydev support
Dracut has a support for unlocking encrypted drives with keyfile stored
on the external drive. This support is included in the generated initrd
only if systemd module is not included.
When systemd is used in initrd then attachment of encrypted drives is
handled by systemd-cryptsetup tools. Our generator has support for
keyfile, however, it didn't support keyfile on the external block
device (keydev).
This commit introduces basic keydev support. Keydev can be specified per
luks.uuid on the kernel command line. Keydev is automatically mounted
during boot and we look for keyfile in the keydev
mountpoint (i.e. keyfile path is prefixed with the keydev mount point
path). After crypt device is attached we automatically unmount
where keyfile resides.
Example:
rd.luks.key=
70bc876b-f627-4038-9049-
3080d79d2165=/key:LABEL=KEYDEV
Michael Biebl [Tue, 4 Sep 2018 14:18:02 +0000 (16:18 +0200)]
Merge pull request #10007 from keszybz/fix-no-logind
systemctl: fix compilation w/o logind
Zbigniew Jędrzejewski-Szmek [Tue, 4 Sep 2018 07:34:16 +0000 (09:34 +0200)]
systemctl: fix compilation w/o logind
Fixes #10006.
Dongsu Park [Mon, 3 Sep 2018 18:44:13 +0000 (20:44 +0200)]
importd, basic/string-util: use case-insensitive comparison for HTTP headers
According to RFC2616[1], HTTP header names are case-insensitive. So
it's totally valid to have a header starting with either `Date:` or
`date:`.
However, when systemd-importd pulls an image from an HTTP server, it
parses HTTP headers by comparing header names as-is, without any
conversion. That causes failures when some HTTP servers return headers
with different combinations of upper-/lower-cases.
An example:
https://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_developer_container.bin.bz2 returns `Etag: "pe89so9oir60"`,
while https://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2
returns `ETag: "
f03372edea9a1e7232e282c346099857"`.
Since systemd-importd expects to see `ETag`, the etag for the Container Linux image
is correctly interpreted as a part of the hidden file name.
However, it cannot parse etag for Flatcar Linux, so the etag the Flatcar Linux image
is not appended to the hidden file name.
```
$ sudo ls -al /var/lib/machines/
-r--r--r-- 1 root root
3303014400 Aug 21 20:07 '.raw-https:\x2f\x2falpha\x2erelease\x2ecore-os\x2enet\x2famd64-usr\x2fcurrent\x2fcoreos_developer_container\x2ebin\x2ebz2.\x22f03372edea9a1e7232e282c346099857\x22.raw'
-r--r--r-- 1 root root
3303014400 Aug 17 06:15 '.raw-https:\x2f\x2falpha\x2erelease\x2eflatcar-linux\x2enet\x2famd64-usr\x2fcurrent\x2fflatcar_developer_container\x2ebin\x2ebz2.raw'
```
As a result, when the Flatcar image is removed and downloaded again,
systemd-importd is not able to determine if the file has been already
downloaded, so it always download it again. Then it fails to rename it
to an expected name, because there's already a hidden file.
To fix this issue, let's introduce a new helper function
`memory_startswith_no_case()`, which compares memory regions in a
case-insensitive way. Use this function in `curl_header_strdup()`.
See also https://github.com/kinvolk/kube-spawn/issues/304
[1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
Liberasys [Mon, 3 Sep 2018 15:35:44 +0000 (17:35 +0200)]
man: fix a typo in the documentation (#10003)
Yu Watanabe [Mon, 3 Sep 2018 12:44:30 +0000 (21:44 +0900)]
Merge pull request #9919 from keszybz/more-sd-bus-doc
Some more sd-bus docs
Harald Hoyer [Mon, 3 Sep 2018 11:57:54 +0000 (13:57 +0200)]
boot/efi/stub.c: fix Dell LoadOptions
On Dell machines LoadOptions is filled with:
01 00 00 00 <name of BIOS Boot Loader Entry> ... <unknown bytes>
So, in case of meaningfull LoadOptions, better check if the first char
is a printable character.
Alan Jenkins [Mon, 3 Sep 2018 10:10:24 +0000 (11:10 +0100)]
user-runtime-dir: fix selinux regression
Fix #9993. When this code was split out to user-runtime-dir, it forgot to
include the call to mac_selinux_init(). So mkdir_label() stopped working.
Fixes:
a9f0f5e50104 ("logind: split %t directory creation to a helper
unit")
Yu Watanabe [Mon, 3 Sep 2018 09:39:56 +0000 (18:39 +0900)]
network: drop an unused variable
Follow-up for
53cb501a1314740fa777f145067cefccda954487.
Evgeny Vereshchagin [Sun, 2 Sep 2018 18:13:31 +0000 (18:13 +0000)]
tests: add reproducers for several issues uncovered with fuzz-journald-syslog
This is a follow-up to
a70f343cacf03ac51cdefb0d2e.
Zbigniew Jędrzejewski-Szmek [Mon, 3 Sep 2018 12:06:41 +0000 (14:06 +0200)]
Merge pull request #9995 from yuwata/fix-usbffs
core/socket: fix memleak in the error paths in usbffs_dispatch_eps()
Evgeny Vereshchagin [Mon, 3 Sep 2018 07:05:48 +0000 (07:05 +0000)]
tests: add a fuzzer for server_process_native_message
Evgeny Vereshchagin [Mon, 3 Sep 2018 07:03:10 +0000 (07:03 +0000)]
journald: make server_process_native_message compatible with fuzz_journald_processing_function
Evgeny Vereshchagin [Mon, 3 Sep 2018 06:46:24 +0000 (06:46 +0000)]
tests: rework the code fuzzing journald
This should make it easier to add a new fuzzer without a lot of
duplication.
Yu Watanabe [Mon, 3 Sep 2018 05:22:08 +0000 (14:22 +0900)]
core/socket: fix memleak in the error paths in usbffs_dispatch_eps()
Yu Watanabe [Mon, 3 Sep 2018 05:21:13 +0000 (14:21 +0900)]
TODO: drop duplicated entry
Renaud Métrich [Mon, 3 Sep 2018 03:42:39 +0000 (05:42 +0200)]
journald: fixed assertion failure when system journal rotation fails (#9893)
Evgeny Vereshchagin [Mon, 3 Sep 2018 03:18:26 +0000 (06:18 +0300)]
tests: add a rudimentary fuzzer for server_process_syslog_message (#9979)