Commit graph

38505 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek d05da14f32
Merge pull request #11796 from yuwata/fuzz-link-parser
fuzz: add fuzzer for .link files
2019-02-25 09:55:02 +01:00
Yu Watanabe 051f39c227 tools: check all directives even if it detects non-updated files 2019-02-25 12:41:11 +09:00
Yu Watanabe 810d43a8e8 tools: update check-directives.sh to support fuzz-link-parser 2019-02-25 12:41:11 +09:00
Yu Watanabe eac31d708f fuzz: add directives.link and 99-default.link for fuzz-link-parser
Also adds several reproducers of errors fixed in earlier commits.
2019-02-25 12:40:42 +09:00
Yu Watanabe a378400b3f fuzz: add fuzzer for parsing .link files
This also renames load_link() to link_load_one()
2019-02-25 12:35:51 +09:00
Yu Watanabe 7cd1f60df0 fuzz: use fflush() and drop unnecessary rewind() 2019-02-25 12:35:51 +09:00
Yu Watanabe 84fb56d396 udev/ethtool: fix error detection of ethtool_link_mode_bit_from_string() 2019-02-25 12:35:40 +09:00
Yu Watanabe 391f6bc1db udev: fix memleak in conditions for .link file 2019-02-25 11:57:14 +09:00
Yu Watanabe 176d9c0e11 udev/net: drop .link files earlier when their conditions do not match system environment 2019-02-25 11:54:50 +09:00
Yu Watanabe 6cdab9f17f udev/net: use structured initializer at one more place 2019-02-25 11:53:57 +09:00
Yu Watanabe 79a60834e2 udev/net: use size_t for index at one more place 2019-02-25 11:51:32 +09:00
Yu Watanabe e8a42907ed udev/net: ignore errors in loading .link files but warn about that 2019-02-25 11:50:57 +09:00
Yu Watanabe f2d251cdb8 udev/net: shorten load_link() a little bit 2019-02-25 11:48:39 +09:00
Yu Watanabe c6b3370ab2 udev: drop unused Ethernet section 2019-02-25 11:45:34 +09:00
Frantisek Sumsal f350965b15
Merge pull request #11808 from yuwata/fix-11806
test-network: testing with two bond slaves
2019-02-24 21:25:34 +01:00
Yu Watanabe cc3e488c7d test-network: testing with two bond slaves 2019-02-23 19:43:25 +09:00
Michal Sekletar 03b6fa0c5b logind: don't print warning when user@.service template is masked
User instance of systemd is optional feature and if user@.service
template is masked then administrator most likely doesn't want --user
instances of systemd for logged in users. We don't need to be verbose
about it.
2019-02-22 23:15:38 +01:00
Chris 87dddbaf62 Fix manpage typo: abrubtly
Fix a minor typo: abrubtly -> abruptly.
2019-02-22 17:44:21 +01:00
Lennart Poettering d04fbcf43c
Merge pull request #11797 from keszybz/analyze-calendar-highlight
Highlight in systemd-analyze calendar
2019-02-22 15:59:22 +01:00
Roman Kulikov 8e3480ebc0 logind: udev rule for Parallels video adapter
This enables graphical capability for a video adapter of Parallels
virtualization platform (Parallels Desktop for Mac product) which is not
a DRM device at the moment.

This fixes GUI in Fedora 29 guest on Parallels Desktop where gdm now
strictly checks for CanGraphical property of a seat, see [1].

Should be noted that there's no in-kernel driver for Parallels video at
the moment so device matching is done by vid/pid.

[1] https://gitlab.gnome.org/GNOME/gdm/merge_requests/37
2019-02-22 15:57:49 +01:00
Taro Yamada 74387d79fb mkosi: (Archlinux) increase the size of root partition.
Currently "mkosi --default .mkosi/mkosi.arch" fails to build the image due to pacman error:

"error: Partition /var/tmp/mkosi-xxx/root too full: yyy blocks needed, zzz blocks free"
"error: not enough free disk space"
"error: failed to commit transaction (not enough free disk space)"

So increase the size to 3G.
2019-02-22 19:53:27 +09:00
Zbigniew Jędrzejewski-Szmek c9151d5c4a
Merge pull request #11781 from yuwata/udev-rule-continuation-fix
udev-rules: fix line continuation
2019-02-22 09:51:50 +01:00
Zbigniew Jędrzejewski-Szmek deed4d50a2 analyze: add color highlighting when printing calendar elapses
With multiple iterations, I found it hard to pick out the interesting bits in
the column of text. I tried plain highlighting first, but it doesn't seem
enough. But blue/yellow makes it easy to jump to the right iteration.
2019-02-22 09:32:17 +01:00
Zbigniew Jędrzejewski-Szmek 84653d99fa analyze: split out loop innards into a separate function
This was intended to be just a refactoring, but it also fixes a minor bug:
after printing "never", we would skip subsequent expressions:

$ systemd-analyze calendar --iterations=20 @0 @1
systemd-analyze calendar --iterations=20 @0 @1
  Original form: @0
Normalized form: 1970-01-01 00:00:00 UTC
    Next elapse: never

(the second expression was skipped).
2019-02-22 09:32:17 +01:00
Lennart Poettering f2ccf8320a analyze: optionally, show more than one elapse time for calendar expressions 2019-02-22 09:10:54 +01:00
Martin Pitt 95a32e9750
units: re-drop ProtectHostname from systemd-hostnamed.service (#11792)
This was an overzealous setting from commit 99894b867f. Without this,
`hostnamectl set-hostname` fails with

    Could not set property: Access denied

as `sethostname()` fails with `EPERM`.
2019-02-22 08:04:37 +01:00
emersion 772afb7616 libsystemd: check if _POSIX_C_SOURCE is defined
This can cause issues if sd-event.h is included in a source file that doesn't
define _POSIX_C_SOURCE and is compiled with -Wundef.
2019-02-22 10:09:48 +09:00
Yu Watanabe 3dd2d52414 test-udev: fix alignment and drop unnecessary white spaces 2019-02-22 06:50:21 +09:00
Yu Watanabe 84a0819c9d test-udev: add more tests for line continuation 2019-02-22 06:50:20 +09:00
Yu Watanabe e8b2737f20 udev-rules: do not ignore short lines
Otherwise, a short line continues the previous continuation.

This fixes a bug introduced by f10aa08e3e.
2019-02-22 06:50:12 +09:00
Hans de Goede 7e85b073c7 hwdb: Add accelerometer orientation quirk for the Medion Akoya E2212T
Add accelerometer orientation quirk for the Medion Akoya E2212T 2-in-1.
2019-02-21 16:40:51 +01:00
Lennart Poettering 9fa326b18a
Merge pull request #11608 from taro-yamada/add_persistent_randmized_delay
core: add "Persistent=delay" to delay persistent timers after boot
2019-02-21 15:15:37 +01:00
Lennart Poettering 953a1af082
Merge pull request #11776 from keszybz/networkd-ordered-sets
Store domains lists in OrderedSets in networkd
2019-02-21 15:15:11 +01:00
Lennart Poettering 6f0475879a
Merge pull request #11784 from martinpitt/networkd-tests
Various networkd test fixes
2019-02-21 14:05:26 +01:00
Zbigniew Jędrzejewski-Szmek 08995a6b47 Add a work-around for memsan
Fixes #11735.
2019-02-21 14:05:10 +01:00
Martin Pitt f5cf985e9c networkd-test: fix test_dropin()
- This test needs resolved, so make sure it is started. In some Debian
   environments it is not.
 - It was an unnecessary, and now failing assumption that name servers
   get atomically written to the resolved's resolv.conf. Wait until both
   expected name servers are in the file.
2019-02-21 12:37:08 +01:00
Martin Pitt ca56805c8d networkd-test: use a complete domain name in test_route_only_dns()
Since version 241 (commit ea4678?), querying MX type records for
single-label domains does not actually forward the query to the DNS
server any more. Use "example.com" instead, which is the recommended
test domain anyway.
2019-02-21 12:37:08 +01:00
Martin Pitt 6592c9c850 networkd-test: disable DNSSEC in domain-restricted DNS test
dnsmasq 2.80 changed behaviour when being queried by resolved with
enabled DNSSEC: It returns errors for SOA and DS queries which cause the
entire query to fail. As we don't configure DNSSEC in this test anyway,
just disable it so that we retain compatibility with old and new dnsmasq
versions.
2019-02-21 12:37:06 +01:00
Taro Yamada a87c1d3a97 core: delay persistent timers by "RandomizedDelaySec=" at boot.
Fixes #5659.
Currently, if Persistent=true and the machine is off at the scheduled time of the timer unit, the timer
will be triggered immediately at the next boot even if RandomizedDelaySec= is specified.

As a result, if multiple timers meet that condition, they will be triggered at the same time and too
much CPU/IO work makes boot slow down.

With this commit, if the scheduled time of the persistent timer has already elapsed at boot,
set the time when systemd first started as the scheduled time and RandomizedDelaySec= is applied to it.
2019-02-21 20:33:21 +09:00
Zbigniew Jędrzejewski-Szmek 95b2903bde tests: shorten the fuzz test case
The test was failing in Ubuntu CI with a 30s timeout. It makes
sense to keep the file so exercise the set allocation logic, but
we can make it shorter.
2019-02-21 12:30:13 +01:00
Zbigniew Jędrzejewski-Szmek b61658fd9a shared/hashmap: trivial style updates 2019-02-21 12:04:27 +01:00
Zbigniew Jędrzejewski-Szmek 5e2a51d588 networkd: use OrderedSets instead of strvs to store lists of domains
We were already using OrderedSets in the manager object, but strvs in the
configuration parsing code. Using sets gives us better scaling when many
domains are used.

In oss-fuzz #13059 the attached reproducer takes approximately 30.5 s to be
parsed. Converting to sets makes this go down to 10s. This is not _vastly_
faster, but using sets seems like a nicer approach anyway. In particular, we
avoid the quadratic de-unification operation after each addition.
2019-02-21 12:04:27 +01:00
Zbigniew Jędrzejewski-Szmek 53ae3f6467 basic/ordered-set: export networkd function to print string sets
Tests are added.
2019-02-21 12:00:05 +01:00
Zbigniew Jędrzejewski-Szmek ef79eae09a basic/ordered-set: add functions to operate on OrderedSets of strings 2019-02-21 12:00:05 +01:00
Yu Watanabe 528a74a1ad socket-util: re-implement socket_address_parse_netlink() by using extract_first_word()
This drops support of trailing white space when a multicast group is
specified.

Fixes one of issues in #11738.
2019-02-21 11:30:49 +01:00
Lennart Poettering 09ba1fcc57
Merge pull request #11748 from yuwata/fix-11711
network: handle disable_ipv6 sysctl property
2019-02-21 11:28:35 +01:00
Lennart Poettering 83159fa039
Merge pull request #11772 from c0d3z3r0/master
Make systemd-boot compliant with the Linux Boot / EFI Handover Protocol
2019-02-21 11:09:35 +01:00
Yu Watanabe 30f9e0bfe5 resolve: fix null pointer dereferences
Follow-up for 8227cfa137.

Fixes CID#1398986.
2019-02-21 11:07:32 +01:00
Szabolcs Fruhwald 5fe74e893c cgtop: Fix processing of controllers other than CPU
After debugging the issue with gdb, I found that the following change

 94ddb08 "cgtop: Still try to get CPU statistics if controller-free"

has introduced a bug, which prevents process(..) method processing
memory and io controllers when cpu_accounting_is_cheap() is true.
The obvious fix is to move this branch to be the last one, keeping
the intended behavior of the above change, without having a negative
effect on the other controllers.

Fixes #11773 [systemd-cgtop no longer shows memory (and io) usage]
2019-02-21 11:00:10 +01:00
Zbigniew Jędrzejewski-Szmek 804f8e1729 generator: rename systemd-mkfs@.service to systemd-makefs@.service
The second name was used in documentation, and the first in the code that
generated the unit. 'systemd-makefs' is the name we want, for example for
consistency with the systemd-makefs executable.

In principle this breaks compatibility, but in practice this is unlikely to be
noticeable. Each instance of the unit is created by writing out a full
definition, so the template was never defined. So the name could only be used
for ordering, and there is not reason to order things against this unit from
the outside: the ordering would rather be against the final mount unit.

Fixes #11769.
2019-02-21 10:59:27 +01:00