1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

36241 Commits

Author SHA1 Message Date
Yu Watanabe
f3d241feb2 udev: use sd_device for udev_event.dev_parent 2018-11-07 13:35:03 +09:00
Yu Watanabe
5ba7e79885 udev-rules: make match_attr() take sd_device instead of udev_device 2018-11-07 13:35:03 +09:00
Yu Watanabe
480ecb7d28 udev: use sd_device for udev_event.dev_db
Also, this adds sd_device_unref for the object in udev_event_free()
for safety and readability of code.
2018-11-07 13:35:03 +09:00
Yu Watanabe
e0bb2ff94b udev-event: make udev_event_new() take sd_netlink and take a reference of that 2018-11-07 13:35:03 +09:00
Yu Watanabe
0f86dc900e udev-event: make udev_event_new() take exec_delay 2018-11-07 13:35:03 +09:00
Evgeny Vereshchagin
13d8a53aae travis: make the directory with coverity tools available in a container
Otherwise `coverity.sh build` will fail with
```
find: '/var/tmp/coverity-scan-analysis': No such file or directory
```

See https://travis-ci.org/systemd/systemd/jobs/451683385.
2018-11-07 07:19:51 +03:00
imayoda
844df810b8 hwdb: IdeaPad Miix 310 with another bios version (#10661)
another bios version for same model with portrait screen.
2018-11-07 12:59:24 +09:00
Evgeny Vereshchagin
bd2125031b
Merge pull request #10644 from mrc0mmand/travis-fix
Fix & re-enable Travis CI
2018-11-07 05:11:02 +03:00
Evgeny Vereshchagin
9608a59449 travis: overwrite test-capability with a simple script that is just skipped
so that it will be possible to work on the test failure and try to make
Travis CI work at the same time.
2018-11-07 02:55:07 +01:00
Yu Watanabe
5176b272ea
Merge pull request #10640 from evverx/networkd-fuzzers
Add a couple of fuzzers for network_load_one and netdev_load_one
2018-11-07 08:50:25 +09:00
Frantisek Sumsal
532a92fbdf travis: workaround for dnf upgrade
dnf upgrade on Fedora Rawhide pulls in unwanted selinux-policy
packages which breaks the system in several ways (and usually
ends up with crashed systemd)
2018-11-06 21:09:45 +01:00
Evgeny Vereshchagin
3ff074bd85 oss-fuzz.sh: copy dictionaries along with "options" files
We currently don't have any upstream but it doesn't mean that
it should be impossible to experiment with local ones :-)
2018-11-06 19:55:11 +01:00
Evgeny Vereshchagin
220fa139de tests: add a couple of files containing all the sections and directives
This should help the fuzzers to discover code paths faster.

In case anyone is interested, they were generated with the following script
```
perl -aF'/[\s,]+/' -ne '
if (my ($s, $d) = ($F[0] =~ /^([^\s\.]+)\.([^\s\.]+)$/)) { $d{$s}{$d} = 1; }
END { while (my ($key, $value) = each %d) {
    printf "[%s]\n%s\n", $key, join("\n", keys(%$value))
}}'
```
by passing src/network/networkd-network-gperf.gperf and
src/network/netdev/netdev-gperf.gperf to it.
2018-11-06 19:42:29 +01:00
Evgeny Vereshchagin
cf02fd1b7a tests: replace AdActorSysPrio with AdActorSystemPriority
This is a follow-up to https://github.com/systemd/systemd/pull/10653.
2018-11-06 19:36:40 +01:00
Evgeny Vereshchagin
d0f51aa9cd tests: add a reporoducer for https://github.com/systemd/systemd/issues/10639 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin
efc1a59af6 tests: add some data that can be fed to fuzz-network-parser 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin
a633d5b997 tests: add a reproducer for https://github.com/systemd/systemd/issues/10629 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin
212bd73c78 networkd: make network_load_one "public" and add a fuzzer for it 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin
e27aac11f2 networkd: make netdev_load_one "public" and add a fuzzer for it 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin
0621f03b13 networkd: remove a weird assertion from network_load_one
The assertion was added in dbffab87f1 but I'm not exactly sure
why. Now it just crashes a fuzzer I wrote. I, of course, could fix the fuzzer
so that it would generate names ending in ".network" if anyone would tell
me why the assertion should be kept here.
2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin
3e180a2516 util: initialize _argtypes in VA_FORMAT_ADVANCE when systemd is built with MSan
This gets around https://github.com/google/sanitizers/issues/992.
2018-11-06 19:01:32 +01:00
Yu Watanabe
49a060aca8
Merge pull request #10654 from poettering/srand-rdrand
random-util.c mini-fixes
2018-11-07 02:03:09 +09:00
Marco Trevisan (Treviño)
6260d28b8a login: Don't mark framebuffer devices as master-of-seat devices
Currently we consider any framebuffer device as enough to have a
valid graphical session, but this might lead to many false postives
like in the case of framebuffer devices that have a linked drm card
which is still in the process of being added, or for vesa fb, and
so it doesn't ensure us that we can have a proper graphical session.

Since these days we normally don't consider anything without a DRM
card able to provide a full graphical session, let's not set this
at this level.
Drivers which can provide a graphical session with the sole fb are
still free to mark any device as `master-of-seat`

Fixes #10435
2018-11-06 20:02:26 +03:00
Lennart Poettering
39adc47495
Merge pull request #10658 from yuwata/udevd-worker-performance
udev: improve performance
2018-11-06 20:01:37 +03:00
Lennart Poettering
9edcbc4f44
Merge pull request #10602 from yuwata/sd-device-logs
update log messages
2018-11-06 19:33:51 +03:00
Lennart Poettering
b992109b3e
Merge pull request #10633 from yuwata/sd-resolve-destroy
Another solution to fix wireguard issues
2018-11-06 19:30:59 +03:00
Yu Watanabe
ed2e7967be time-util: make parse_sec() not accept "12.34.56"
This also changes the rational number treatment.
So, the limitations introduced by 8079c90333
and f6a178e91d are relaxed.

Fixes #10619.
2018-11-06 19:24:47 +03:00
Frantisek Sumsal
0d589dfcee travis: drop the unnecessary /etc/machine-id magic 2018-11-06 17:16:45 +01:00
Frantisek Sumsal
059f31920e travis: run Coverity on a more stable Fedora release 2018-11-06 16:27:34 +01:00
Yu Watanabe
faae64fa3d udevd: increase default number of workers
The uevent handling in udevd is not cpu hungry.
So, let's increase the default number of workers per cpu.
This decrease the number of queued uevents.

Without this commit (children_max is 16 on my laptop)
```
$ journalctl -b -u systemd-udevd.service | grep reached | wc -l
1544
```
With this commit (children_max is 30 on my laptop)
```
$ journalctl -b -u systemd-udevd.service | grep reached | wc -l
7
```
2018-11-07 00:25:20 +09:00
Yu Watanabe
eca195ec23 udevd: wait 3 seconds before killing worker processes
During boot process, many worker processes are forked and killed.
To decrease cycles of forking and killing worker, let's wait
3 seconds before killing workers. If new uevent or inotify event
comes within the delay, the killing porcess will be cancelled.
2018-11-07 00:25:13 +09:00
Frantisek Sumsal
a9145fc488 travis: move Docker setup to a separate script
This should make debugging somewhat easier
2018-11-06 15:56:52 +01:00
Yu Watanabe
da14313418 udevd: drop redundant logic of receiving uevent
If there exists pending uevents, then sd-event invokes uevent handler.
So, it is not necessary to receive the next uevent in inotify event.
2018-11-06 23:53:55 +09:00
Yu Watanabe
b6107f010a udevd: decrease indentation 2018-11-06 23:53:50 +09:00
Lennart Poettering
a0ca258adf
Merge pull request #10597 from toanju/fix-networkd-l3-loss
networkd: don't remove ip address or route
2018-11-06 17:44:24 +03:00
Yu Watanabe
05e6d9c64b udevd: merge conditions to decrease indentation 2018-11-06 23:21:25 +09:00
Lennart Poettering
ed63705975
Merge pull request #10650 from yuwata/udevadm-trigger-use-write-string-file
udevadm: use write_string_file() helper function
2018-11-06 16:46:25 +03:00
Tobias Jungel
db688b7e55 networkd: cleanup for #10542
fixes: 53b1f7d
2018-11-06 16:42:12 +03:00
Lennart Poettering
ce9d553d2e
Merge pull request #10652 from yuwata/lldp-ndisc-string-table
lldp,ndisc: update debug logs
2018-11-06 16:41:48 +03:00
Giuseppe Scrivano
875622c39e core, sysctl: skip ENOENT for /proc/sys/net/unix/max_dgram_qlen
sysctl is disabled for /proc mounted from an user namespace thus entries like
/proc/sys/net/unix/max_dgram_qlen do not exist.  In this case, skip the error
and do not try to change the default for the AF_UNIX datagram queue length.
2018-11-06 16:41:34 +03:00
Lennart Poettering
0e28c86f54 ask-password: fix minor memory leak on error path
CID 1396557
2018-11-06 16:41:01 +03:00
Tobias Jungel
7ecf0c3e17 networkd: don't remove route
In case networkd is restarted this prevents a removal of an already existing
route that would be configured using networkd. With the proposed changes the
route will be kept on the interface without removing. This happens only on
physical hosts or VMs since networkd handles interface configuration slightly
different in containers.
2018-11-06 13:28:12 +01:00
Tobias Jungel
30226d2718 networkd: don't remove ip address
In case networkd is restarted this prevents a removal of an already existing IP
address that would be configured using networkd. With the proposed changes the
IP address will be kept on the interface without removing. This happens only on
physical hosts or VMs since networkd handles interface configuration slightly
different in containers.
2018-11-06 13:26:37 +01:00
Yu Watanabe
7cadbe09e9 sd-device: use write_string_file() helper to write sysattr 2018-11-06 21:24:03 +09:00
Yu Watanabe
835d18ba20 fileio: introduce WRITE_STRING_FILE_NOFOLLOW flag for write_string_file() and friends 2018-11-06 21:24:03 +09:00
Yu Watanabe
57512c893e tree-wide: set WRITE_STRING_FILE_DISABLE_BUFFER flag when we write files under /proc or /sys 2018-11-06 21:24:03 +09:00
Yu Watanabe
76cdddfb9d udevd: use set_oom_score_adjust() to set OOM score 2018-11-06 21:24:03 +09:00
Yu Watanabe
92c40e1dc8 udevadm: use write_string_file() helper function 2018-11-06 21:24:03 +09:00
Yu Watanabe
90208b8217 test: add tests for string tables for lldp and ndisc events 2018-11-06 20:15:09 +09:00
Yu Watanabe
a2dcda328a ndisc: improve debug log message 2018-11-06 20:15:09 +09:00