1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

37597 Commits

Author SHA1 Message Date
Franck Bui
7f0704da94 tmpfiles: use CHASE_WARN in addition to CHASE_SAFE
and let's emit a more comprehensive warning when an unsafe transition is
encountered.

Before this patch:

 Unsafe symlinks encountered in /run/nrpe, refusing.

After:

 Detected unsafe path transition / → /run during canonicalization of /run/nrpe.
2018-12-10 09:19:14 +01:00
Franck Bui
36c97decbe fs-util: make chase_symlink() returns -ENOLINK when unsafe transitions are met
We previously returned -EPERM but it can be returned for various other reasons
too.

Let's use -ENOLINK instead as this value shouldn't be used currently. This
allows users of CHASE_SAFE to detect without any ambiguities when unsafe
transitions are encountered by chase_symlinks().

All current users of CHASE_SAFE that explicitly reacted on -EPERM have been
converted to react on -ENOLINK.
2018-12-10 09:18:27 +01:00
William A. Kennington III
e4a71bf36f networkd: Static neighbor support
When using networkd we currently have no way of ensuring that static
neighbor entries are set when our link comes up. This change adds a new
section to the network definition that allows multiple static neighbors
to be set on a link.
2018-12-09 16:56:37 -08:00
William A. Kennington III
289e6774d0 networkd: Use only a generic CONFIGURING state
This allows us to convey that we are performing multiple link
configuration changes in parallel. This is needed to support configuring
neighbors while simultaneously configuring addresses and routes.
2018-12-09 16:56:00 -08:00
William A. Kennington III
c42ff3a1a7 networkd: Track address configuration
This will be useful to assert that our static route configuration always
happens after address configuration once our individual configure state
goes away.
2018-12-09 16:54:37 -08:00
Yu Watanabe
d8a0bcfd77 tree-wide: drop header for emacs from python scripts 2018-12-10 03:17:33 +09:00
Yu Watanabe
87421ff560 tools: add one more SPDX license header 2018-12-10 03:08:52 +09:00
Yu Watanabe
fc1c09e1df lgtm: use python3 2018-12-10 03:07:17 +09:00
Yu Watanabe
2f6c9b6f3f tools: drop unused variable 2018-12-10 03:07:08 +09:00
Yu Watanabe
af182e786c hwdb: drop unused imported object 2018-12-10 03:06:58 +09:00
Yu Watanabe
a9f2655dbe hwdb: drop comment 2018-12-10 03:06:44 +09:00
Alexey Bogdanenko
1e5548c0e0 udev-test: fix missing directory test/run
Fixes the following error:

    Failed to mount test /run: No such file or directory

By the time command "./test-udev check" calls function "fake_filesystems",
directory "test/run" must be present.
2018-12-09 20:53:11 +03:00
Alexey Bogdanenko
7935dae547 udev-test: fix test skip condition
When there is a failure to setup the environment, the following happens:

1. Command "./test-udev check" exits with non-zero code.
2. Perl function "system" returns the code.
3. The code is evaluated as true by Perl.

Then we stop the test.
2018-12-09 19:22:47 +03:00
Evgeny Vereshchagin
a01eb97b6c
Merge pull request #11095 from evverx/use-systemd-as-pid1-yolo
travis: use systemd as PID1 in debian containers
2018-12-09 16:53:03 +03:00
Zbigniew Jędrzejewski-Szmek
6e076600d0
Merge pull request #10931 from yuwata/daemon-util
sd-daemon: add notify_on_cleanup() helper function and use it where applicable
2018-12-09 12:10:57 +01:00
Zbigniew Jędrzejewski-Szmek
503a1bd37f
Merge pull request #11097 from jwrdegoede/hwdb-sensors5
Hwdb sensors5
2018-12-09 11:50:39 +01:00
Evgeny Vereshchagin
f413cd0a6a travis: mount tmpfs on /tmp before running the tests
To judge from https://api.travis-ci.org/v3/job/465547774/log.txt,
overlayfs on Travis CI is having trouble delivering inotify events,
which is why `test-path` and `test-event` are failing there.
2018-12-09 11:46:23 +01:00
Evgeny Vereshchagin
ee6776b41a travis: use systemd as PID1 in debian containers
Turns out some tests like `test-execute` are tightly coupled with
systemd as PID1 (which should be fixed of course). In the meantime,
let's see how it goes.
2018-12-09 11:31:01 +01:00
Lennart Poettering
be24321f3d mount-point: honour AT_SYMLINK_FOLLOW correctly
Fixes: #11092
2018-12-08 22:43:55 +01:00
Hans de Goede
84e8548313 hwdb: Add accelerometer orientation quirk for the PoV P1005W-232 tablet
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-12-08 22:11:39 +01:00
Hans de Goede
76efe240b8 hwdb: Add accelerometer orientation quirk for the Prowise PT301 tablet 2018-12-08 22:11:39 +01:00
Zbigniew Jędrzejewski-Szmek
c90ee83400 coding style: reduce text width to 109 characters
Patches are shown on github with a fixed width (no matter how wide the window
is). When line numbers are high (we have some files with 5 digit line numbers),
the diff does not fit, and horizontal scrolling must be used when viewing the
patch. This is super annoying. Let's reduce the width a bit. I think 109 is
still very wide, but at least the github issue should be alleviated.
2018-12-08 10:14:28 +01:00
Yu Watanabe
d8dd35fd31 journal-remote: define main through macro
Also, this fixes memleaks on failure.
2018-12-08 18:09:40 +09:00
Yu Watanabe
94952201e1 journal-remote: destroy RemoteServer object by using _cleanup_ attribute 2018-12-08 18:09:40 +09:00
Yu Watanabe
f36bb1e182 journal-upload: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
c9ed608679 journal-upload: use _cleanup_ attribute to clear uploader 2018-12-08 18:09:40 +09:00
Yu Watanabe
29cd4c8ffb journal-gateway: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
0d2a1a2085 journal-gateway: use _cleanup_ attribute to stop microhttpd daemon 2018-12-08 18:09:40 +09:00
Yu Watanabe
c03a80c419 wait-online: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
82310c7981 timesync: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
2362a8f547 network: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
1e88b8199b resolve: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
c157884f09 sd-daemon: add notify_start() and notify_on_cleanup() helper function 2018-12-08 18:09:25 +09:00
Yu Watanabe
1437822638 meson: rename sd_event_c to sd_event_sources 2018-12-08 18:06:45 +09:00
Lennart Poettering
99b5b0d0ef
Merge pull request #11055 from poettering/resolved-close-fix
a number of resolved fixes
2018-12-08 00:23:43 +01:00
Lennart Poettering
e474bf118c
Merge pull request #10980 from poettering/mount-no-extras
mount and swap improvements
2018-12-08 00:23:15 +01:00
Lennart Poettering
06721f39f6 swap: always add in extras when we load a swap unit
Much like for the mount units we need fields such as the slice
initialized by the time we activate the swap, hence when the kernel
let's us know about a new swap that appeared we need to initialize the
slice in any Swap object we allocated for that right-away, even if we
can't read the real unit file for the swap device.
2018-12-07 17:35:32 +01:00
Lennart Poettering
a0a424083f swap: drop return value
We don't actually return any valid 'r' here, let's explicitly return 0
here hence instead.
2018-12-07 17:35:32 +01:00
Lennart Poettering
eb04385dc5 swap: don't propagate issues with processing /proc/swaps
This follows similar recent changes in mount.c: error should be consider
local, and not be propagated.
2018-12-07 17:35:32 +01:00
Lennart Poettering
46f944802c swap: when loading a unit from /proc/swaps, mark its load state as good
This follows similar logic in the mount unit.
2018-12-07 17:35:32 +01:00
Lennart Poettering
15332d738f swap: split out code adding in additional unit props into a function of its own
This adds swap_add_extras() similar to mount_add_extras().

No change in behaviour, just some refactoring.
2018-12-07 17:35:32 +01:00
Lennart Poettering
ba6fbb2cee swap: fix misplaced comment 2018-12-07 17:35:32 +01:00
Lennart Poettering
31135818e4 swap: flush out state when activating a unit, not when deactivating it
This is similar to the previous commit which did the same change for
mount units.
2018-12-07 17:35:32 +01:00
Lennart Poettering
7eba1463de mount: flush out cycle state on DEAD→MOUNTED only, not the other way round
For services (and other units) we generally follow the rule that at the
beginning of each cycle, i.e. when the INACTIVE/FAILED state is left for
ACTIVATING/ACTIVE we flush out various state variables. Mount units
handled this differently so far when the unit state change was effected
outside of systemd: in that case these variables would be flushed out
when going back to INACTIVE/FAILED already.

Let's fix that, and flush out this state always during the activating
transition, not during the deactivating transition.
2018-12-07 17:35:32 +01:00
Lennart Poettering
ec88d1ea05 mount: replace three closely related mount flags into a proper flags enum
We pass these flags around, and even created a structure for them. Let's
fix things properly, and make them a flags value of its own.
2018-12-07 17:35:32 +01:00
Lennart Poettering
b6418dc94e mount: strdup() device paths we collect
We never know what the changes triggered by mount_set_state() do to the
unit. Let's be safe and copy the device path into our set, so that we
are safe against that.
2018-12-07 17:35:32 +01:00
Lennart Poettering
f8064c4fda mount: when the kernel reports a mount to be established reset all kinds of load failures
It doesn't matter what kind of precise failure we had earlier with
loading the unit, let's report that it loaded successfully now, after
all the kernel is an OK source for that, like any other.
2018-12-07 17:35:32 +01:00
Lennart Poettering
a37422045f mount: regenerate all deps whenever a mount's parameters changes
Whenever we notice a change on an existing /proc/self/mountinfo line,
let's update the deps generated from it. For that, let's flush out the
old deps generated this way, and add in the new ones.

This takes benefit of the fact that today (unlike a comment this patch
removes says) we can remove deps in a somewhat reasonable way.
2018-12-07 17:35:32 +01:00
Lennart Poettering
6d7e89b070 mount: when allocating a Mount object based on /proc/self/mountinfo mark it so
Let's set 'from_proc_self_mountinfo' right away, since we know its from
there. This is important so that when the load queue is dispatched (and
thus mount_load() called) this
fact is already known.
2018-12-07 17:35:32 +01:00
Lennart Poettering
26e35b164b mount: let mount_add_extras() take care of remote-fs.target deps
In a previous commit we added logic that mount_add_extras() (or more
precisely mount_add_default_dependencies()) adds in dependencies on
remote-fs.target and local-fs.target, hence we can drop this from
mount_setup_new_unit() and let the usual load queue dispatching take
care of this.
2018-12-07 17:34:29 +01:00