Commit Graph

38755 Commits

Author SHA1 Message Date
Lennart Poettering fc420dfbe6 update TODO 2019-03-05 12:21:17 +01:00
Lennart Poettering 73622e02fb
Merge pull request #11881 from yuwata/networkd-vs-interface-renaming
Networkd vs interface renaming
2019-03-05 10:05:57 +01:00
Yu Watanabe 39a15c8a8d udev: run programs in the specified order
This fixes bugs introduced by 29448498c7
and d838e14515.

Previously, RUN and SECLABEL keys are stored in udev_list with its unique
flag is false. If the flag is false, then udev_list is just a linked
list and new entries are always added in the last.
So, we should use OrderedHashmap instead of Hashmap.

Fixes #11368.
2019-03-05 09:27:29 +01:00
roadrunner2 0dcb426328 hwdb: add touchpad resolutions for 2015-2017 MacBook(Pro)'s. (#11874)
These are all models using an SPI keyboard and touchpad and using the
same applespi kernel driver.
2019-03-05 17:52:22 +10:00
Evgeny Vereshchagin c5b4b18e7d travis: use /bin/systemd instead of /usr/bin/systemd
Apparently systemd is in /bin now.
2019-03-05 08:00:22 +03:00
Yu Watanabe 23041689ca dhcp: refuse to configure DHCP IAID if the interface is under renaming
systemd-networkd itself does not start dhcp client, but the code
may be used in other projects. So, check that the interface is under
renaming or not.
2019-03-05 12:48:26 +09:00
Yu Watanabe 299ad32d48 network: do not configure interfaces under renaming 2019-03-05 10:33:42 +09:00
Yu Watanabe 90ba130f00 util: introduce device_is_renaming()
It will be used in the later commit.
2019-03-05 10:33:41 +09:00
Yu Watanabe 30de2b89d1 network: always drop configs when interface is renamed
Before the renaming, wrong .network file may be assigned to the link.
So, let's always drop link configuration.
2019-03-05 10:33:27 +09:00
Yu Watanabe a4055a608e udev: set ID_RENAMING property when interface renaming is requested
And drop the property on the corresponding 'move' uevent.
2019-03-05 10:31:35 +09:00
Yu Watanabe 6d0fdf4513 udev: do not read UdevEvent object before checking it is non-NULL 2019-03-05 10:31:20 +09:00
Yu Watanabe 589384be8d udev: drop unnecessary copy of new interface name 2019-03-05 10:02:09 +09:00
Yu Watanabe 4d64309955 netlink: check new interface name is valid or not before sending request 2019-03-05 10:02:09 +09:00
Lennart Poettering bb5e88a226
Merge pull request #11841 from keszybz/dns-packet-speedup
DNS packet speedup
2019-03-04 19:30:23 +01:00
Lennart Poettering 1788875576
Merge pull request #11871 from yuwata/systemctl-show-format-unprintable
systemctl: format many entries in 'show' command
2019-03-04 19:04:27 +01:00
Lennart Poettering 38ba8c8874
Merge pull request #11888 from keszybz/non-atomic
Drop unused atomic operations
2019-03-04 19:03:46 +01:00
Zbigniew Jędrzejewski-Szmek f27abfccd0 fuzz-dns-packet: add test case with lots of labels
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13422
2019-03-04 15:53:37 +01:00
Zbigniew Jędrzejewski-Szmek dffb827772 resolved: when adding RR to an answer, avoid comparing keys twice
We'd call dns_resource_record_equal(), which calls dns_resource_key_equal()
internally, and then dns_resource_key_equal() a second time. Let's be
a bit smarter, and call dns_resource_key_equal() only once.

(before)
dns_resource_key_hash_func_count=514
dns_resource_key_compare_func_count=275
dns_resource_key_equal_count=62371
4.13s user 0.01s system 99% cpu 4.153 total

(after)
dns_resource_key_hash_func_count=514
dns_resource_key_compare_func_count=276
dns_resource_key_equal_count=31337
2.13s user 0.01s system 99% cpu 2.139 total
2019-03-04 15:53:37 +01:00
Zbigniew Jędrzejewski-Szmek 51969a5893 resolve: split the RR comparison function in two
No functional change.
2019-03-04 15:53:37 +01:00
Zbigniew Jędrzejewski-Szmek 2d34cf0c16 resolved: use a temporary Set to speed up dns question parsing
This doesn't necessarily make things faster, because we still spend more time
in dns_answer_add(), but it improves the compuational complexity of this part.
If we even make dns_resource_key_equal_faster, this will become worthwhile.
2019-03-04 15:53:37 +01:00
Yu Watanabe 305a285092 systemctl: format LogExtraFields= in 'show' command 2019-03-04 23:45:07 +09:00
Yu Watanabe 4c787df72f systemctl: format BindPaths= or TemporaryFileSystems= in 'show' command 2019-03-04 23:45:07 +09:00
Yu Watanabe 04749e4003 systemctl: print RestrictAddressFamilies= in 'show' command 2019-03-04 23:45:07 +09:00
Yu Watanabe 48d3358db1 systemctl: show nothing if no LoadError= 2019-03-04 23:45:07 +09:00
Yu Watanabe 56c6b69007 systemctl: format IPIngressBytes= or friends nicely 2019-03-04 23:45:07 +09:00
Yu Watanabe 9c1f946566 systemctl: show IPAddressAllow= and IPAddressDeny= in 'show' command 2019-03-04 23:45:07 +09:00
Yu Watanabe 9201eea137 test: add tests for test_in_addr_prefix_to_string() 2019-03-04 23:45:07 +09:00
Yu Watanabe 146cf7f05b test: move tests for in_addr_prefix_from_string() 2019-03-04 23:45:07 +09:00
Yu Watanabe d9143dac3e util: introduce in_addr_prefix_to_string() 2019-03-04 23:45:07 +09:00
Yu Watanabe 81260be12e util: use _cleanup_ attributes 2019-03-04 23:45:07 +09:00
Yu Watanabe a672f4fe8d core: fix received size of signal or status size
sd_bus_message_read_array() returns size of array in bytes, not number
of elements.

This also convert int to int32_t, as the dbus type 'i' is int32_t.
2019-03-04 23:44:29 +09:00
Zbigniew Jędrzejewski-Szmek 756479043d sd-hwdb: fix off_t vs. size_t confusion in cast
> on 32bit, size_t is 32bit, but .st_size is off_t hence 64bit
2019-03-04 15:42:58 +01:00
Yu Watanabe 4a22071201 systemctl: show SuccessExitStatus= and friends 2019-03-04 23:35:56 +09:00
Yu Watanabe 8e066ef316 systemctl: use streq() if arguments must be non-NULL 2019-03-04 23:35:56 +09:00
Yu Watanabe a3ddd4571d systemctl: do not show negative values in {Success,Failure}ActionExitStatus= 2019-03-04 23:35:56 +09:00
Yu Watanabe 102b021460 bus-util: drop unnecessary re-formatting 2019-03-04 23:35:46 +09:00
INSUN PYO c7bb2fec78 systemctl: show SELinuxContext=, AppArmorProfile= and SmackProcessLabel=
Run: systemctl show -a dbus.service | grep -E "SELinuxContext|AppArmorProfile|SmackProcessLabel"

Before patch:
  SELinuxContext=[unprintable]
  AppArmorProfile=[unprintable]
  SmackProcessLabel=[unprintable]

After patch:
  SELinuxContext=[""|"value of context"]
  AppArmorProfile=[""|"value of context"]
  SmackProcessLabel=[""|"value of context"]
2019-03-04 15:27:30 +01:00
Martin Pitt 0d427d377a semaphoreci: caching and more robust creation of container image
lxc-create in semaphore sometimes fails with

    ERROR: Unable to fetch GPG key from keyserver

Which often happens behind proxies. As the default key server is a load
balancer, retry a few times.

Also, cache the container image between runs, and only recreate it when
it is older than a week.
2019-03-04 15:05:14 +01:00
Davide Cavalca 4d97f5a09e test: do not assume test-chown-rec is running as root 2019-03-04 14:40:17 +01:00
Zbigniew Jędrzejewski-Szmek 311b63fef8 Remove now-unused refcnt.h 2019-03-04 14:16:39 +01:00
Zbigniew Jędrzejewski-Szmek f23ab4dc3c sd-netlink: do not use atomic reference counters
Same as with the other users, any non-trivial use of the objects requires
use from a single thread only or external locking. Using atomic operations
just for reference counts is not useful.
2019-03-04 14:16:39 +01:00
Zbigniew Jędrzejewski-Szmek af40711050 sd-hwdb: some minor logging and style updates 2019-03-04 14:16:39 +01:00
Zbigniew Jędrzejewski-Szmek 468905cac8 sd-hwdb: use non-atomic reference counters
The sd-hwdb objects cannot be used concurrently from two threads in any
meaningful way, because query and iteration operations modify the object.
Thus atomic reference counts are pointless.
2019-03-04 14:16:39 +01:00
Zbigniew Jędrzejewski-Szmek 42541a71a2 bus: make reference counting non-atomic
We had atomic counters, but all other operations were non-serialized. This
means that concurrent access to the bus object was only safe if _all_ threads
were doing read-only access. Even sending of messages from threads would not be
possible, because after sending of the message we usually want to remove it
from the send queue in the bus object, which would race. Let's just kill this.
2019-03-04 14:16:24 +01:00
Zbigniew Jędrzejewski-Szmek f68a26221c tests: use the test helpers in more places
This is mostly cosmetic. It makes those test binaries support SYSTEMD_LOG_*
environment variables.
2019-03-04 14:15:38 +01:00
Lennart Poettering 46d4d67d79
Merge pull request #11820 from dm0-/chase
Allow tmpfiles to create files in a root under an unprivileged directory
2019-03-04 13:04:45 +01:00
Lennart Poettering d8a23f5e4f
Merge pull request #11770 from yuwata/fix-9955
network: rework address pool
2019-03-04 12:11:07 +01:00
Mike Lothian 17f377efd0 login: HyperV requires master-of-seat to be set
v2: Update comment provided by Lennart

Fixes: https://github.com/systemd/systemd/issues/11299
2019-03-04 12:04:53 +01:00
Yu Watanabe 55ac7b6314 fuzz-dhcp6-client: avoid assertion failure on samples which dont fit in pipe
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11584.
2019-03-04 12:04:09 +01:00
Lennart Poettering 965bfcd6b2
Merge pull request #11882 from yuwata/fix-log-syntax
Fix log_syntax()
2019-03-04 11:03:36 +01:00