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

31027 Commits

Author SHA1 Message Date
Lennart Poettering
846ab104ca efivars: if OsIndicationsSupported does not exist, assume that reboot-to-firmware is not available
It's not advertised and hence not available.

Fixes: #7424
2017-11-24 12:00:09 +01:00
Lennart Poettering
e22c567fea efivars: minor coding style improvements 2017-11-24 12:00:09 +01:00
Lennart Poettering
6f302ce676 logind: don't propagate firmware misbehaviours to bus clients
If for some reason we can't query the firmware state, don't propagate
that to clients, but instead log about it, and claim that
reboot-to-firmware is not available (which is the right answer, since it
is not working).

Let's log about this though, as this is certainly relevant to know, even
though not for the client.
2017-11-24 11:57:23 +01:00
Daniel Lockyer
4600a396d5 Remove NULL as last parameter to strjoin 2017-11-24 10:37:08 +00:00
Daniel Lockyer
a7419dbc59 Replace use of snprintf with xsprintf 2017-11-24 10:36:04 +00:00
Daniel Lockyer
f9ecfd3bbe Replace free and reassignment with free_and_replace 2017-11-24 10:33:41 +00:00
Daniel Lockyer
5fecf46d76 Replace free and return NULL with return mfree 2017-11-24 10:31:49 +00:00
Daniel Lockyer
95333b2bed Replace free and nullify by mfree 2017-11-24 09:37:50 +00:00
Daniel Lockyer
87e4e28dcf Replace empty ternary with helper method 2017-11-24 09:31:08 +00:00
Yu Watanabe
8b3c4b5757 test-execute: test more % specifiers (#7450) 2017-11-24 10:17:28 +01:00
Shawn Landden
fb8e74a499 __attribute__((fallthrough)) only when -Wimplicit-fallthrough (#7448)
That is version 7 or greater
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/

Fix regression of https://github.com/systemd/systemd/pull/7389
82a27ba821
on older gccs

bumping to re-run CI
upstream             FAIL timed out
boot-smoke           FAIL non-zero exit status 1
2017-11-24 10:08:12 +01:00
Lennart Poettering
9b3f8e5968 journalctl: add --output-fields= to --help text (#7443)
Follow-up for #7181
2017-11-24 10:04:14 +01:00
Lennart Poettering
371c0b794e core: track scope controllers on the bus
This watches controllers on the bus, and unsets them automatically when
they disappear.

Note that this is primarily a cosmetical fix. Since unique bus names are not
recycled, there's strictly no need to forget about them, but it's a lot
nicer to do so.
2017-11-23 21:47:48 +01:00
Lennart Poettering
f2c49c8658 core: refuse accepting a scope controller unless we are called on the API bus
Let's make sure clients get early errors if they try something weird.
2017-11-23 21:47:48 +01:00
Lennart Poettering
abdb9b08f6 nspawn: make use of the RequestStop logic of scope units
Since time began, scope units had a concept of "Controllers", a bus peer
that would be notified when somebody requested a unit to stop. None of
our code used that facility so far, let's change that.

This way, nspawn can print a nice message when somebody invokes
"systemctl stop" on the container's scope unit, and then react with the
right action to shut it down.
2017-11-23 21:47:48 +01:00
Lennart Poettering
33fe0afe9a core: serialize the "controller" field in scope units
We forgot to serialize it previously, hence daemon reload flushed it
out, since we also didn't write it to any unit file...
2017-11-23 21:47:48 +01:00
Lennart Poettering
b8afec2107 man: reorder/add sections to systemd.exec(5) (#7412)
The long long list of settings is getting too confusing, let's add some
sections and reorder things in them.

This makes no changes regarding contents, it only reorders things,
sometimes reindents them, and adds sections that made sense to me to
some degree.

Within each sections the settings are ordered by relevance (at least
according to how relevant I personally find them), and not
alphabetically.
2017-11-23 21:20:48 +01:00
Lennart Poettering
e2cd893bda
Merge pull request #7436 from poettering/mount-util-fixup
mount-util.c fixes regarding name_to_handle_at()
2017-11-23 21:01:12 +01:00
Susant Sahani
8dc787d185 networkd: fix commit 5f04a209ea (#7432)
If classless route not provided configure default routes.
Something went wrong in the rebase.
2017-11-24 01:38:08 +09:00
WaLyong Cho
459aafc6d8 smack: allow comments on smack rules (#7438) 2017-11-23 16:27:19 +01:00
Hans de Goede
3a26bc1dd5 hwdb: Add accel mount settings for Axxo TW-1011 2-in-1 (#7439)
Add accel mount settings for the SMO8500 accelerometer found in
Axxo TW-1011 2-in-1 devices to 60-sensor.hwdb.
2017-11-23 16:25:42 +01:00
Yu Watanabe
8a38aac3a7 meson: do not install RPM macros if rpmmacrosdir is set to no (#7430)
Fixes #7427.
2017-11-23 14:20:22 +01:00
Evgeny Vereshchagin
71050acb68 tests: install test as part of BASICTOOLS (#7434)
This makes TEST-19-DELEGATE, which is currently failing, work.

Closes https://github.com/systemd/systemd/issues/7425.
2017-11-23 13:28:12 +01:00
Lennart Poettering
9b1573ef76 test: fix test-mount-util when handling duplicate mounts on the same location
The test was written so far under the assumption that if two mounts are
placed onto the same location the "upper" mount is listed later in
/proc/self/mountinfo. This appears not to be guaranteed however, as
running the tests in a normal nspawn shows.

This patch fixes that: it reverses the hashmap of mounts we build:
instead of keying by path, we key by mnt_id, and if we notice that
path_get_mnt_id() doesn't match what a line in /proc/self/mountinfo
says, we use the returned ID to check if maybe another line agrees.

Fixes: #7431
2017-11-23 13:28:06 +01:00
Lennart Poettering
4739fc554d mount-util: fix bad indenting 2017-11-23 13:28:06 +01:00
Lennart Poettering
c83b20d73b mount-util: EOVERFLOW might have other causes than buffer size issues
When we get EOVERFLOW this might be caused by untriggered nfs4 mounts
(see discussion at
https://github.com/systemd/systemd/pull/7395#issuecomment-346164481 and
further down).

Handle this nicely by falling back to fdinfo-based mntid determination.

Fixes: #7082
2017-11-23 13:28:06 +01:00
Lennart Poettering
0d9bcb7c37 mount-util: fix error propagation in fd_fdinfo_mnt_id() 2017-11-23 13:28:06 +01:00
Lennart Poettering
fc010b01e7 mount-util: drop exponential buffer growing in name_to_handle_at_loop()
So, it appears name_to_handle_at() always returns the right buffer size
on EOVERFLOW, when it's returned due to a too small buffer. Let's rely
on that exclusively for sizing the buffer, and let's drop the
exponential buffer growing.

The new logic is now: if we see EOVERFLOW and the returned size has
increased, resize our buffer and try again. But if it didn't increase,
then propagate the EOVERFLOW as it likely has other causes.
2017-11-23 13:28:06 +01:00
Yu Watanabe
706424c2e2 core/manager: check the existance of the special units (#7433)
In the user mode, not all special units exist.
So, we need to check whether the units exist or not before operate
something to the units.
Such the check was mistakenly dropped by e68537f0ba.

Fixes #7426.
2017-11-23 13:25:56 +01:00
Carsten Strotmann
f75707dbcb Fixed Type nmnds-ipv4 -> nmdns-ipv4 (#7435) 2017-11-23 13:12:00 +01:00
Evgeny Vereshchagin
0fb8449930 cgroup: downgrade the log level of "invocation id" messages to debug (#7422)
Now that d3070fbdf6 has been merged, these errors are not as
critical as they used to be.
2017-11-23 11:07:20 +01:00
Evgeny Vereshchagin
abe4a74f80
Merge pull request #7420 from brauner/2017-11-22/systemd_in_container_unified_cgroup_hierarchy
cgroup: skip unwritable cgroups
2017-11-23 04:11:04 +03:00
Christian Brauner
2d56b80a18
cgroup: test whether pure unified hierarchy is writable
If it is not writable we should not mount it.
2017-11-22 17:35:21 +01:00
Christian Brauner
e07aefbd67
cgroup: check whether unified hierarchy is writable
When systemd is running inside a container employing user
namespaces it currently mounts the unified cgroup hierarchy
without being able to write to it. This causes systemd to
freeze during boot.
This patch checks whether the unified cgroup hierarchy
is writable. If it is not it will not mount it.

This solution is based on a patch by Evgeny Vereshchagin.

Closes #6408.
Closes https://github.com/lxc/lxc/issues/1678 .
2017-11-22 17:34:25 +01:00
Lennart Poettering
0a5b5115b1
Merge pull request #7416 from keszybz/readd-lost-test
Readd lost test
2017-11-22 17:24:21 +01:00
Zbigniew Jędrzejewski-Szmek
6b97bf2287 meson: re-attach rule-syntax-check.py test
39/248 rule-syntax-check                       OK     0.07 s

--- command ---
/home/zbyszek/src/systemd-work/test/rule-syntax-check.py \
    /home/zbyszek/src/systemd-work/build/../rules/60-block.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-cdrom_id.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-drm.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-evdev.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-input-id.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-alsa.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-input.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage-tape.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-v4l.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-sensor.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-serial.rules \
    /home/zbyszek/src/systemd-work/build/../rules/70-joystick.rules \
    /home/zbyszek/src/systemd-work/build/../rules/70-mouse.rules \
    /home/zbyszek/src/systemd-work/build/../rules/70-touchpad.rules \
    /home/zbyszek/src/systemd-work/build/../rules/75-net-description.rules \
    /home/zbyszek/src/systemd-work/build/../rules/75-probe_mtd.rules \
    /home/zbyszek/src/systemd-work/build/../rules/78-sound-card.rules \
    /home/zbyszek/src/systemd-work/build/../rules/80-drivers.rules \
    /home/zbyszek/src/systemd-work/build/../rules/80-net-setup-link.rules \
    /home/zbyszek/src/systemd-work/build/rules/50-udev-default.rules \
    /home/zbyszek/src/systemd-work/build/rules/64-btrfs.rules \
    /home/zbyszek/src/systemd-work/build/rules/99-systemd.rules
--- stdout ---
...
-------

It got dropped by mistake in 72cdb3e783.
2017-11-22 12:46:08 +01:00
Zbigniew Jędrzejewski-Szmek
2956395c83 rule-test-syntax: modernize syntax and add debug message 2017-11-22 12:29:58 +01:00
Zbigniew Jędrzejewski-Szmek
bfbcf21d75
Merge pull request #7406 from poettering/timestamp-rework
timestamping rework
2017-11-22 11:55:04 +01:00
Simon Peeters
bc9c9efd07 udevd: remove unused list node 2017-11-22 10:38:07 +01:00
Simon Peeters
40a5771658 udevd: use list.h instead of udev_list_node 2017-11-22 10:38:05 +01:00
Zbigniew Jędrzejewski-Szmek
a6856129ec udev: "handle" oom in path_id
path_prepend returned a status code, but it wasn't looked at anywhere.
Adding checks for the return value in all the bazillion places where it
is called is not very attractive, so let's just make the whole program
abort cleanly if the (very unlikely) oom is encountered.
2017-11-22 10:34:47 +01:00
Zbigniew Jędrzejewski-Szmek
d7d7daece9 udev: modernize style in path_id
No functional change.
2017-11-22 10:34:34 +01:00
Susant Sahani
d6df583c87 networkd: introduce vxcan netdev. (#7150)
Similar to the virtual ethernet driver veth, vxcan implements a
local CAN traffic tunnel between two virtual CAN network devices.
When creating a vxcan, two vxcan devices are created as pair
When one end receives the packet it appears on its pair and vice
versa. The vxcan can be used for cross namespace communication.
2017-11-22 08:23:22 +01:00
Zbigniew Jędrzejewski-Szmek
a217a4bcc5
Merge pull request #7395 from poettering/nametohandleat-loop
name_to_handle_at() EOVERFLOW handling
2017-11-22 08:20:36 +01:00
Susant Sahani
5f04a209ea networkd:DHCP-client ignore default route if classless static route is set (#6885)
According to RFC 3442:

If the DHCP server returns both a Classless Static Routes option and
a Router option, the DHCP client MUST ignore the Router option.

fixes #5695.
2017-11-22 07:43:55 +01:00
Zbigniew Jędrzejewski-Szmek
ffb70e4424
Merge pull request #7381 from poettering/cgroup-unified-delegate-rework
Fix delegation in the unified hierarchy + more cgroup work
2017-11-22 07:42:08 +01:00
Zbigniew Jędrzejewski-Szmek
82a27ba821
Merge pull request #7389 from shawnl/warning
tree-wide: adjust fall through comments so that gcc is happy
2017-11-22 07:38:51 +01:00
Andrew Jeddeloh
b1b96380fe README: add requirements for IPAddress{Allow,Deny} (#7414)
Document kernel options needed for IPAddress{Allow,Deny}.
2017-11-21 23:54:20 +01:00
Lennart Poettering
23209bcd37 test: fix UDEV-WANTS testcase for non-bash shells (#7407)
testsuite.sh uses "set -o pipefile", which is a bashism, hence use bash
to invoke the script.
2017-11-21 17:38:43 +01:00
longersson
fc696d52b9 Docs: Fix spelling and capitalization (#7408) 2017-11-21 14:37:16 +01:00