Commit graph

32931 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Zbigniew Jędrzejewski-Szmek b834c6cee5 fuzz-unit-file: allow a space between variable name and "=" (#8670)
The parser allows that, so the check when to skip needs this too.

https://oss-fuzz.com/v2/issue/5106486364602368/7422
2018-04-06 11:36:17 +02:00
Zbigniew Jędrzejewski-Szmek 43d2646ad3
Merge pull request #8663 from poettering/dissect-tighten
Small fixes for image dissection code.
2018-04-06 10:14:25 +02:00
Yu Watanabe 66f5730471
core/device: remove unnecessary check (#8661)
Follow-up for 0dfb0a0abd.
2018-04-06 15:45:13 +09:00
Philip Sequeira 7511655807 nspawn: wait for network namespace creation before interface setup (#8633)
Otherwise, network interfaces can be "moved" into the container's
namespace while it's still the same as the host namespace, in which case
e.g. host0 for a veth ends up on the host side instead of inside the
container.

Regression introduced in 0441378080.

Fixes #8599.
2018-04-05 07:04:27 -07:00
Zbigniew Jędrzejewski-Szmek 1b836bed2c
Merge pull request #8662 from poettering/rfkill-enxio
handle ENODEV and ENXIO gracefully in rfkill
2018-04-05 13:20:38 +02:00
Lennart Poettering 429d4e414d dissect: when pulling metadata from an image, don't bother with /home or ESP
When we try to read meta-data from an image, don't bother with mounting
/home or the ESP, as that's not where the metadata is. This not only
speeds things up a bit, but also has the benefit that setups where an
unencrypted root is mixed with an encrypted /home (which I have on one
of my own systems) won't result in errors that the crypto key is needed.
2018-04-05 13:15:43 +02:00
Lennart Poettering 0bb8dfaa53 update TODO 2018-04-05 13:07:31 +02:00
David Tardon 3de8ff5a69 journald: bump rate limits (#8660)
Apparently, it is quite common to hit a problem, where systemd-journald
would drop messages because service is logging too fast.
2018-04-05 13:06:59 +02:00
Lennart Poettering aae22eb3a3 dissect: tighten block device checks a bit
This extends on #8609, and makes two changes:

1. We'll now explicitly check that the child devices of a block device
   we are interested in (i.e. the partitions) are block devices themselves.
   On newer kernels the mmc rpmb stuff is actually exposed as char rather
   than block device as before, and they probably should have been that in
   the first place. By adding this check we'll hence filter out these weird
   devices through a second rule too, that hopefully makes things a bit
   more future-proof, should more devices like this be added eventually,
   or other subsystems do a similar thing.

2. When counting partitions we'll now also check the devnum of the
   device being non-null, which we already do when matching up the devices
   in the second iteration. This should make things more robust, and
   prevent other kinds of miscounting, which after all was the main
   issue #8609 fixed.
2018-04-05 13:03:37 +02:00
Lennart Poettering bc5e002ef1 rfkill: treat ENXIO/ENODEV the same way as ENOENT
If an rfkill device disappears between the time we get notified about
the existance and we fully opened it we might get ENXIO or ENODEV (i.e.
the two kinds of "device not found" errors, which are typically
generated when for example a device node has no actual backing device
behind it). let's handle that the same way as ENOENT, and downgrade the
log message to LOG_DEBUG.

Fixes: #8586
2018-04-05 13:00:43 +02:00
Lennart Poettering 3b3d1737be rfkill: use our usual style for writing destructors
Let's accept NULL values gracefully, and let's return NULL.
2018-04-05 12:42:50 +02:00
Lennart Poettering 6064de2de8
Merge pull request #8617 from keszybz/tmpfiles-relax
Do not exit with error when systemd-tmpfiles --boot fails
2018-04-05 11:54:02 +02:00
Lennart Poettering ba45959cb2
Merge pull request #8656 from yuwata/random-fixes
use TAKE_PTR() and TAKE_FD() macros, and small fixes
2018-04-05 10:19:12 +02:00
Zbigniew Jędrzejewski-Szmek c79b89e6eb tmpfiles: ignore "operational" errors during setup
We still get the errors logged, but we don't fail the service. This
is better for users because rerunning tmpfiles-setup.service a second
time is dangerous (c.f. cd9f5b68ce).
Note that this only touches sd-tmpfiles-setup.service and
sd-tmpfiles-setup-dev.service. sd-tmpfiles-clean.service is as before.

https://bugzilla.redhat.com/show_bug.cgi?id=1539341
2018-04-05 08:13:53 +02:00
Zbigniew Jędrzejewski-Szmek bb9947be2f tmpfiles: add a new return code for "operational failure" when processing
Things can fail, and we have no control over it:
- file system issues (immutable bits, file system errors, MAC refusals, etc)
- kernel refusing certain arguments when writing to /proc/sys or /sys
Let's add a new code for the case where we parsed configuration but failed
to execute it because of external errors.
2018-04-05 08:13:53 +02:00
Yu Watanabe 0dfb0a0abd core/device: trivial simplification 2018-04-05 14:26:34 +09:00
Yu Watanabe 1cc6c93a95 tree-wide: use TAKE_PTR() and TAKE_FD() macros 2018-04-05 14:26:26 +09:00
Yu Watanabe 3d282fff06 network: fix typo in log message 2018-04-05 10:20:13 +09:00
Yu Watanabe 393a256bbb meson: sort source files 2018-04-05 10:20:08 +09:00
Yu Watanabe 9629659f60 bus-util: fix a meaningless assertion 2018-04-05 10:19:57 +09:00
Zbigniew Jędrzejewski-Szmek c0f9017c11
Merge pull request #8605 from poettering/drop-in-name-fix
Fix validation of unit file drop-in naming in install.c.
2018-04-04 11:52:14 +02:00
Filipe Brandenburger edb3ca0d61 test-path: Set umask explicitly (#8616)
Running `test-path` under an umask such as 027 fails with:

  Assertion '(s.st_mode & S_IRWXO) == 0004' failed at ../src/test/test-path.c:247, function test_path_makedirectory_directorymode(). Aborting.

Looking at directory /tmp/test-path_makedirectory, it was indeed created
with mode 0740, applying the umask to the requested 0744.

Set an explicit umask for this test, to ensure reproducible results.
2018-04-04 11:17:19 +02:00
Filipe Brandenburger add384dd4d units: use systemctl exit to kill the user manager (#8648)
Use `systemctl --user --force exit` to implement the systemd-exit
user service.

This removes our dependence on an external `kill` binary and the
concerns about whether they recognize SIGRTMIN+n by name or what their
interpretation of SIGRTMIN is.

Tested: `systemctl --user start systemd-exit.service` kills the
  `systemd --user` instance for my user.
2018-04-04 11:14:37 +02:00
Feng Sun 709e86f18f fix missed bracket of exec-personality-ppc64le.service (#8650)
Signed-off-by: Neil Sun <neilsun@yunify.com>
2018-04-04 11:10:42 +02:00
Zbigniew Jędrzejewski-Szmek 29ac24d2f4
Merge pull request #8624 from yuwata/fix-8371
bash-completion: fixes for busctl
2018-04-04 09:39:10 +02:00
Filipe Brandenburger 63554ed907 oss-fuzz: Fallback to ninja-build when available (#8641)
The ninja binary is deployed as `ninja-build` in older distros such as
RHEL 7/CentOS 7.  Detect that and use `ninja-build` instead of `ninja`
when it's available.
2018-04-04 09:32:59 +02:00
Evgeny Vereshchagin 68b04721dc
Merge pull request #8643 from poettering/coding-style-fixlets
Trivial CODING_STYLE additions
2018-04-04 02:13:05 +03:00
Lennart Poettering 25ac900ad7 CODING_STYLE: document suggested suffixes to use in documentation 2018-04-03 15:22:26 +02:00
Lennart Poettering 46f8867372 CODING_STYLE: two minor additions 2018-04-03 15:22:26 +02:00
Lennart Poettering 4afbb9004c CODING_STYLE: mention that we ship .editconfig/.vimrc/.dir-locals.el in our repo 2018-04-03 15:22:26 +02:00
Lennart Poettering 53c70a2706 update TODO 2018-04-03 15:22:25 +02:00
Ricardo Salveti de Araujo 2ef5de1bd9 tmpfiles: fix directory removal with force symlink (#8619)
symlink_atomic returns -EISDIR when the target symlink path is a
directory.

Fixes #7447

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
2018-04-03 15:05:11 +02:00
Evgeny Vereshchagin f6c63f6fc9 core: skip the removal of cgroups in the TEST_RUN_MINIMAL mode (#8622)
When `systemd` is run in the TEST_RUN_MINIMAL mode, it doesn't really
set up cgroups, so it shouldn't try to remove anything.

Closes https://github.com/systemd/systemd/issues/8474.
2018-04-03 15:04:22 +02:00
João Paulo Rechi Vita cde942f61b dissect: Don't count RPMB and boot partitions (#8609)
Filter-out RPMB partitions and boot partitions from MMC devices when
counting partitions enumerated by the kernel. Also factor out the now
duplicated code into a separate function.

This complement the previous fixes to the problem reported in
https://github.com/systemd/systemd/issues/5806
2018-04-03 14:51:18 +02:00
Lennart Poettering bd6ae7e6f0
Merge pull request #8628 from jwrdegoede/hwdb-sensors2
Hwdb sensors2
2018-04-03 14:49:39 +02:00
Radostin Stoyanov fcc7ce4c8e man: machinectl: update fedora exmple URL (#8642) 2018-04-03 12:06:53 +09:00
Alexander Kurtz 61f1196085 coccinelle: fix typo in file name (#8640) 2018-04-02 23:30:26 +09:00
Lennart Poettering 34bfb98ace
Merge pull request #8626 from floppym/initctl
sysvinit-2.89 compatibility fixes
2018-03-31 12:56:58 +02:00
Will Dietz 203690537b generate-af-list.sh: slightly generalize pattern, fix w/musl (#8629)
Accept definitions to other AF_ constants, not just PF_ ones,
such as:

  #define AF_LINUX AF_LOCAL

It may not be necessary to impose any restriction on the
definitions of the macros extracted, but for now
keep most of that requirement but match AF_* as well.
2018-03-31 12:55:45 +02:00
Hans de Goede 86f8fd7141 hwdb: Add accelerometer orientation quirk for the Pipo W4 tablet
Add an accelerometer orientation quirk for the Pipo W4 tablet.
2018-03-30 23:39:29 +02:00
Mike Gilbert 83c76e8c38 systemctl: try opening /run/initctl before /dev/initctl
This ensures compatability with old/new sysvinit.

http://git.savannah.nongnu.org/cgit/sysvinit.git/commit/?id=80dbcf3de3c1b83aeaa713a8fe5b8d35d8649af2
2018-03-30 16:52:14 -04:00
Mike Gilbert 4d8c7c1b3a units: initctl: move the fifo to /run/initctl to match sysvinit
The fifo location was moved in sysvinit-2.89.

http://git.savannah.nongnu.org/cgit/sysvinit.git/commit/?id=80dbcf3de3c1b83aeaa713a8fe5b8d35d8649af2
2018-03-30 16:52:14 -04:00
Hans de Goede d167ea9886 hwdb: Add accelerometer orientation quirk for the Lenovo Ideapad Miix 310
Add an accelerometer orientation quirk for the Lenovo Ideapad Miix 310.
Note this quirk is limited to the production batches which ship with a
portrait panel, rather then with a landscape panel (recognized by the
different BIOS version these 2 variants use).
2018-03-30 20:00:27 +02:00
Hans de Goede 366b21efed hwdb: Add accelerometer orientation quirk for the MSI S100 2-in-1
Add an accelerometer orientation quirk for the MSI S100 2-in-1.
2018-03-30 17:11:17 +02:00
Hans de Goede fd2f44a2f9 hwdb: Add accelerometer orientation quirk for the Yours Y8W81 tablet
Add an accelerometer orientation quirk for the Yours Y8W81 8" tablet.

For future reference: this tablet has the same case and mostly the same
internals as the Chuwi Vi8. Both seem to be from an ODM called inet-tek.
Both are labelled: "INET-I86M-REVxx" on the PCB, with the Chuwi Vi8 being
REV03 (and having a ALC5640 audio codec) and the Yours Y8W81 being REV21
(and having a ALC5651 audio codec).
2018-03-30 17:11:17 +02:00
Hans de Goede 03994fa227 hwdb: Add accelerometer orientation entry for the I.T.Works TW701 tablet
Add accelerometer orientation entry for the I.T.Works TW701 7"
windows tablet, note this is the same hardware/PCB as the Trekstor
ST70416-6 for which we already have the same quirk.
2018-03-30 17:11:17 +02:00
Hans de Goede 839e7ac2de hwdb: 60-sensors: Fix alphabetic sorting by vendor name
The Cytrix entry was added at the end instead of sorted alphabetically
by vendor name.
2018-03-30 17:10:51 +02:00
Yu Watanabe 7f9c3ecad8 bash-completion: busctl: make variables local 2018-03-30 17:13:52 +09:00
Yu Watanabe 4cbb7c500a bash-completion: busctl: do not suggest "-" for signature
Fixes #8371.
2018-03-30 17:08:14 +09:00