Commit Graph

34899 Commits

Author SHA1 Message Date
Yu Watanabe a168792c2d udev: drop collect 2018-09-10 18:27:36 +09:00
Zbigniew Jędrzejewski-Szmek 3c83f15967
Merge pull request #10037 from filbranden/docs2
Moving docs around and starting conversion to Markdown
2018-09-09 21:01:17 +02:00
Filipe Brandenburger bf7efeb16f 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:
695b8f3a03

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
2018-09-09 20:57:08 +02:00
Zbigniew Jędrzejewski-Szmek 5e5796e3e1
Merge pull request #10042 from jwrdegoede/hwdb-sensors4
Hwdb sensors4
2018-09-09 20:39:23 +02:00
Hans de Goede f253cee808 hwdb: Add accelerometer orientation quirk for the Onda v975w tablet
Add accelerometer orientation quirk for the Onda v975w tablet.
2018-09-09 16:02:58 +02:00
Hans de Goede f0545adcd3 hwdb: Add accelerometer orientation quirk for the Connect Tablet9 tablet
Add accelerometer orientation quirk for the Connect Tablet9 tablet.
2018-09-09 16:02:58 +02:00
Hans de Goede a8b33d5cfd 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.
2018-09-09 16:02:58 +02:00
Hans de Goede a4d08d24e6 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.
2018-09-09 15:41:28 +02:00
Filipe Brandenburger b6dc0d7d01 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.)
2018-09-08 13:40:19 -07:00
Filipe Brandenburger 1d1cb1683e docs: convert DISTRO_PORTING to Markdown 2018-09-08 13:39:03 -07:00
Filipe Brandenburger c2beadcd34 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/.
2018-09-08 13:39:03 -07:00
Filipe Brandenburger 9e825ebf4f 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.
2018-09-08 13:39:03 -07:00
Zbigniew Jędrzejewski-Szmek 9d0798a2ed
Merge pull request #9832 from yuwata/fix-9831
network: fixes related to setting MTU
2018-09-08 17:17:07 +02:00
Zbigniew Jędrzejewski-Szmek a5404992cc
Merge pull request #9942 from lucaswerkmeister/9939
seccomp: fix #9939 and allow specifying multiple errnos for syscall
2018-09-08 12:08:54 +02:00
Filipe Brandenburger 8794164fed 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.
2018-09-08 12:05:56 +02:00
Evgeny Vereshchagin 231dca5579 tests: put fuzz_journald_processing_function in a .c file 2018-09-08 12:05:14 +02:00
Wyatt Ward c155a05549 hwdb: Add hwdb entry for X220 tablet (#10036) 2018-09-08 15:18:44 +09:00
Lucas Werkmeister 9d7fe7c65a 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.
2018-09-07 21:44:13 +02:00
Yu Watanabe 6e222ac9d9 gitignore: add nspawn image lock and mkosi temporary files 2018-09-07 20:00:22 +02:00
Yu Watanabe e8596ca5c4 backlight: do not unref parent device
Fixes double-free introduced by 9aadd28149.
2018-09-07 20:00:01 +02:00
Filipe Brandenburger 3f9233e401 po: update Brazilian Portuguese translation 2018-09-07 19:37:55 +02:00
Julian Andres Klode abcf95e95e 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
2018-09-07 16:39:44 +02:00
Wyatt Ward b9d365e6e2 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) 2018-09-07 10:35:55 +09:00
Yu Watanabe 3457a7a939
Merge pull request #10009 from evverx/rework-journald-fuzzers
Add a fuzzer for server_process_native_message
2018-09-05 11:46:17 +09:00
Yu Watanabe 53253d9c54 sd-dhcp6: set requested time for DUID-LLT
Follow-up for 7e90a499ab.
2018-09-04 13:07:37 -07:00
Yu Watanabe 339697f081 sd-dhcp: drop meaningless checking
mac_addr is not dynamically allocated.

Fixes CID 1395162 and 1395164.
2018-09-04 13:07:37 -07:00
Trevonn 862764560b hwdb: add Logitech G703 Wired/Wireless (#10005) 2018-09-04 18:47:08 +02:00
Network Silence 973de224dc hwdb: Synaptics touchpad edge fix for HP Pavilion G6 (#10008) 2018-09-04 18:46:07 +02:00
Michal Sekletar 70f5f48eb8 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
2018-09-04 16:54:53 +02:00
Michael Biebl b711aee08f
Merge pull request #10007 from keszybz/fix-no-logind
systemctl: fix compilation w/o logind
2018-09-04 16:18:02 +02:00
Zbigniew Jędrzejewski-Szmek 807690fb7f systemctl: fix compilation w/o logind
Fixes #10006.
2018-09-04 09:34:16 +02:00
Dongsu Park 21224070e8 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
2018-09-03 22:59:27 +02:00
Liberasys 8b247b43c8 man: fix a typo in the documentation (#10003) 2018-09-04 00:35:44 +09:00
Yu Watanabe e03b9f2a3b
Merge pull request #9919 from keszybz/more-sd-bus-doc
Some more sd-bus docs
2018-09-03 21:44:30 +09:00
Harald Hoyer 15720d0340 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.
2018-09-03 14:10:38 +02:00
Alan Jenkins 81375d8026 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: a9f0f5e501 ("logind: split %t directory creation to a helper
unit")
2018-09-03 14:09:21 +02:00
Yu Watanabe 7dd05e9472 network: drop an unused variable
Follow-up for 53cb501a13.
2018-09-03 14:08:30 +02:00
Evgeny Vereshchagin 3311c74d05 tests: add reproducers for several issues uncovered with fuzz-journald-syslog
This is a follow-up to a70f343cac.
2018-09-03 14:07:44 +02:00
Zbigniew Jędrzejewski-Szmek b8fc55cb9b
Merge pull request #9995 from yuwata/fix-usbffs
core/socket: fix memleak in the error paths in usbffs_dispatch_eps()
2018-09-03 14:06:41 +02:00
Evgeny Vereshchagin 9cdea02db5 tests: add a fuzzer for server_process_native_message 2018-09-03 07:16:52 +00:00
Evgeny Vereshchagin 21acb27b71 journald: make server_process_native_message compatible with fuzz_journald_processing_function 2018-09-03 07:03:52 +00:00
Evgeny Vereshchagin b1bd453f36 tests: rework the code fuzzing journald
This should make it easier to add a new fuzzer without a lot of
duplication.
2018-09-03 06:46:24 +00:00
Yu Watanabe 0de4876496 core/socket: fix memleak in the error paths in usbffs_dispatch_eps() 2018-09-03 14:25:08 +09:00
Yu Watanabe f069ebfadd TODO: drop duplicated entry 2018-09-03 14:21:13 +09:00
Renaud Métrich fd790d6f09 journald: fixed assertion failure when system journal rotation fails (#9893) 2018-09-03 12:42:39 +09:00
Evgeny Vereshchagin a70f343cac tests: add a rudimentary fuzzer for server_process_syslog_message (#9979) 2018-09-03 12:18:26 +09:00
Arkan49 af2217a735 Update 60-sensor.hwdb (#9991) 2018-09-03 12:07:23 +09:00
Sergey Ptashnick 4ec74f4797 po: update Russian translation (#9992) 2018-09-03 12:05:45 +09:00
Daniele Medri ae5e3bd6b6 po: update Italian translation (#9980) 2018-09-03 12:05:28 +09:00
Yu Watanabe 645461f0cf
cryptsetup: do not define arg_sector_size if libgcrypt is v1.x (#9990)
Follow-up for #9936.
2018-09-01 23:47:46 +09:00