Commit graph

32582 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek c0b4b0f8f5 meson: libmount is required for oss-fuzz builds now too
See https://github.com/google/oss-fuzz/issues/1191.
2018-03-09 14:58:47 +01:00
Zbigniew Jędrzejewski-Szmek af4d7860c4 meson: avoid warning about comparison of bool and string
meson.build:2907: WARNING: Trying to compare values of different types (bool, str) using ==.
The result of this is undefined and will become a hard error in a future Meson release.
2018-03-09 14:21:08 +01:00
Zbigniew Jędrzejewski-Szmek f83f8c70bd meson: use triple-quote delimition in one more place 2018-03-09 14:15:39 +01:00
Filipe Brandenburger 416be1a03b core/socket: support binary inside chroot when looking for SELinux label (#8405)
Otherwise having a .socket unit start a .service running a binary under
a chroot fails as the unit is unable to determine the SELinux label of
the binary.
2018-03-09 12:20:56 +01:00
Yu Watanabe 906bdbf5e7 core/cgroup: accepts MemorySwapMax=0 (#8366)
Also, this moves two macros from dbus-util.h to dbus-cgroup.c,
as they are only used in dbus-cgroup.c.

Fixes #8363.
2018-03-09 11:34:50 +01:00
Peter Hutterer fc6f94500e hwdb: add axis overrides for HP Pavilion 15 (#8404)
https://bugzilla.redhat.com/show_bug.cgi?id=1551188
2018-03-09 10:54:28 +01:00
Lennart Poettering 586fb20fd1
Merge pull request #8372 from keszybz/two-cleanups
Two cleanups
2018-03-08 23:23:43 +01:00
Yu Watanabe 5cbaad2f67 core: do not free heap-allocated strings (#8391)
Fixes #8387.
2018-03-08 14:21:54 +01:00
Yu Watanabe 280029d18f sd-bus: do not try to close already closed fd (#8392)
Fixes #8376, which is introduced by 2b33ab0957.
2018-03-08 14:19:35 +01:00
Mario Limonciello c58493c00a Introduce suspend-to-hibernate (#8274)
Suspend to Hibernate is a new sleep method that invokes suspend
for a predefined period of time before automatically waking up
and hibernating the system.

It's similar to HybridSleep however there isn't a performance
impact on every suspend cycle.

It's intended to use with systems that may have a higher power
drain in their supported suspend states to prevent battery and
data loss over an extended suspend cycle.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
2018-03-08 14:17:33 +01:00
Daniel Lin fc17f194de hwdb: add accelerometer mount matrix for Eve V (#8382) 2018-03-08 08:44:11 +01:00
Peter Hutterer 2b5f20a99d hwdb: add Dell Inspiron 3537 axis overrides (#8388)
PS/2 and RMI4 entries

https://bugs.freedesktop.org/show_bug.cgi?id=105370
2018-03-08 08:41:33 +01:00
Yu Watanabe a1d32bac2a
Revert "core: don't setup init.scope in test mode (#8380)" (#8390)
This reverts commit a9e8ecf037,
as it breaks test-path.

Fixes #8389.
2018-03-08 15:29:19 +09:00
Zbigniew Jędrzejewski-Szmek 18ce247c4c test-cgroup-util: bail out when running under mock (#8365)
The builds were failing in Fedora koji, where something strange is mounted
on /sys/fs/cgroup.

Also closes https://github.com/systemd/systemd/issues/8383.
2018-03-08 00:41:25 +03:00
Michal Sekletar a9e8ecf037 core: don't setup init.scope in test mode (#8380)
Reproducer:

$ meson build && cd build
$ ninja
$ sudo useradd test
$ sudo su test
$ ./systemd --system --test
...
Failed to create /user.slice/user-1000.slice/session-6.scope/init.scope control group: Permission denied
Failed to allocate manager object: Permission denied

Above error message is caused by the fact that user test didn't have its
own session and we tried to set up init.scope already running as user
test in the directory owned by different user.

Let's skip setting up init.scope altogether since we won't be launching
processes anyway.
2018-03-07 16:41:41 +01:00
Zbigniew Jędrzejewski-Szmek 6f10433df7
Merge pull request #8378 from evverx/get-around-freopen
tests: stop using `freopen` in `test-fileio`
2018-03-07 11:35:35 +01:00
Zbigniew Jędrzejewski-Szmek 48af1eb6ee Merge pull request #8086 from hdante/sdboot-setmode-v2 2018-03-07 10:41:44 +01:00
Zbigniew Jędrzejewski-Szmek 595ced4d81
Merge pull request #7817 from medhefgo/systemd-boot
systemd-boot improvements
2018-03-07 10:14:41 +01:00
Zbigniew Jędrzejewski-Szmek 70756b3b4d systemd-boot: fix off-by-one buffer overrun
We'd allocate a buffer of some size and then write zero to the byte one after.
2018-03-07 09:03:23 +01:00
Zbigniew Jędrzejewski-Szmek 12643e7c43 systemd-boot: reduce indentation in config_entry_add_linux()
No functional change.
2018-03-07 09:03:18 +01:00
Jan Janssen 4c8c9f9f8a systemd-boot: Try harder not to add ourselves to the list
We don't need to check if we are adding ourselves to the list
if we know that it's the windows or EFI shell loaders.

If we are adding the EFI default loader, additionally try to
see if we can find the systemd-boot magic string and skip
this entry if we do.
2018-03-07 09:03:18 +01:00
Zbigniew Jędrzejewski-Szmek f6a8265b9a core: drop unnecessary __useless_struct_to_allow_trailing_semicolon__
ISO C does not allow empty statements outside of functions, and gcc
will warn the trailing semicolons when compiling with -pedantic:

  warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]

But our code cannot compile with -pedantic anyway, at least because

  warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]

Without -pedatnic, clang and even old gcc (3.4) generate no warnings about
those semicolons, so let's just drop __useless_struct_to_allow_trailing_semicolon__.
2018-03-06 10:41:41 +01:00
Zbigniew Jędrzejewski-Szmek eef03d70c1 basic/cgroup-util: remove unused variable 2018-03-06 10:41:41 +01:00
Tomasz Torcz 07a35e846b NEWS: fix typos in v238 section (#8369) 2018-03-06 17:35:47 +09:00
Yu Watanabe 694d57655c rpm: add missing '-p <lua>' in trigger script (#8367)
Follow-up for 32a00a9c09 (#8090).
2018-03-06 08:02:44 +01:00
Evegeny Vereshchagin 9a92e25545 tests: close a leftover file descriptor in test-fileio
This should make it a bit easier to search for real file descriptor leaks.

```
$ valgrind --leak-check=full --track-fds=yes ./build/test-fileio
...
==29457==
==29457== FILE DESCRIPTORS: 4 open at exit.
==29457== Open file descriptor 3: /tmp/test-systemd_writing_tmpfile.lyV5Rc
==29457==    at 0x4B9AD9E: open (open.c:43)
==29457==    by 0x4B19B24: __gen_tempname (tempname.c:261)
==29457==    by 0x4BA5CC3: mkostemp64 (mkostemp64.c:32)
==29457==    by 0x48F739B: mkostemp_safe (fileio.c:1206)
==29457==    by 0x10D968: test_writing_tmpfile (test-fileio.c:620)
==29457==    by 0x10E930: main (test-fileio.c:767)
==29457==
```
2018-03-05 22:17:23 +00:00
Zbigniew Jędrzejewski-Szmek 738ab7502a
Merge pull request #8362 from keszybz/release-238
Release 238
2018-03-05 23:16:37 +01:00
Zbigniew Jędrzejewski-Szmek e6131c6ea6
Merge pull request #8358 from fbuihuu/tmpfiles-dont-resolve-pathnames-when-traversing-recursively
Tmpfiles dont resolve pathnames when traversing recursively
2018-03-05 23:15:56 +01:00
Evegeny Vereshchagin 362973902c tests: stop using freopen in test-fileio
This helps get around a bug confusing `glibc` and making the test bail
out with the following error under `asan` on `x86`:

Fatal error: glibc detected an invalid stdio handle
Aborted (core dumped)

The bug has been reported in https://github.com/google/sanitizers/issues/778,
but it is unlikely to be fixed anytime soon.
2018-03-05 21:57:14 +00:00
Franck Bui e04fc13f5f test: add tests for systemd-tmpfiles 2018-03-05 21:49:11 +01:00
Franck Bui caced73270 test: fix setup_suse() to make it work with an already populated root 2018-03-05 19:24:23 +01:00
Franck Bui 936f6bdb80 tmpfiles: don't resolve pathnames when traversing recursively through directory trees
Otherwise we can be fooled if one path component is replaced underneath us.

The patch achieves that by always operating at file descriptor level (by using
*at() helpers) and by making sure we do not any path resolution when traversing
direcotry trees.

However this is not always possible, for instance when listing the content of a
directory or some operations don't provide the *at() helpers or others (such as
fchmodat()) don't have the AT_EMPTY_PATH flag. In such cases we operate on
/proc/self/fd/%i pseudo-symlink instead, which works the same for all kinds of
objects and requires no checking of type beforehand.

Also O_PATH flag is used when opening file objects in order to prevent
undesired behaviors: device nodes from reacting, automounts from
triggering, etc...

Fixes: #7986
Fixes: CVE-2018-6954
2018-03-05 19:00:11 +01:00
Franck Bui 56114d45d0 tmpfiles: fstat() works with fd opened with O_PATH since Linux 3.6 2018-03-05 19:00:11 +01:00
Franck Bui 774f79b570 tmpfiles: make hardlink_vulnerable() argument constant 2018-03-05 19:00:11 +01:00
Zbigniew Jędrzejewski-Szmek de5fbba9e2
Merge pull request #8341 from yuwata/test-execute-ambient
test-execute: check capabilities before runnig tests
2018-03-05 17:45:28 +01:00
Zbigniew Jędrzejewski-Szmek c657bff1d5 NEWS: bump version and add contributors 2018-03-05 17:22:09 +01:00
Zbigniew Jędrzejewski-Szmek ad6a085310 meson: bump so revision and systemd version in preparation for v238 2018-03-05 17:21:09 +01:00
Zbigniew Jędrzejewski-Szmek 72dea211d4 mailmap: one more person 2018-03-05 17:21:09 +01:00
Zbigniew Jędrzejewski-Szmek 8c6414be15
Merge pull request #8345 from sourcejedi/logind_restart_is_sorely_lacking_in_testing
login: fix for #8343
2018-03-05 17:18:47 +01:00
Zbigniew Jędrzejewski-Szmek b719b66b0a
Merge pull request #8354 from keszybz/new-NEWS
NEWS for v238
2018-03-05 17:16:04 +01:00
Filipe Brandenburger 2ea09665e2 mkosi: use locale that supports UTF-8, detect one that is available (#8340)
Using C.UTF-8 (as was done before #7244) breaks Arch Linux, but using
en_US.UTF-8 (after #7244) breaks Debian in our .mkosi/mkosi.debian.

So try to detect which one is available and works, first checking
whether we're already running under a valid UTF-8 locale, then trying
C.UTF-8 and finally en_US.UTF-8.

If we fail to find a valid UTF-8 locale, then fail early, instead of
letting the whole build complete only for Mesos to fail midway through
the `ninja test` step.

Tested on all of mkosi.fedora, mkosi.debian and mkosi.arch.

Fixes: #7238
2018-03-05 17:03:52 +01:00
Marco Gulino 81818edc7a Add accel matrix for iOTA 360 (#8342) 2018-03-05 16:47:28 +01:00
Zbigniew Jędrzejewski-Szmek 313c32c3a4 NEWS: update for v238 2018-03-05 16:42:04 +01:00
Zbigniew Jędrzejewski-Szmek c8fad2e7db man: just use unicode for an mdash 2018-03-05 09:31:17 +01:00
Zbigniew Jędrzejewski-Szmek 46dcfbbdb6 basic/glob-util: do not use names with "_" prefix
Names starting with _ or __ are reserved by the standard, better to
avoid them.
2018-03-05 09:04:39 +01:00
Yu Watanabe e8fb0238cd coredump: do not leak memory (#8352)
Fixes #8351.
2018-03-05 08:39:52 +01:00
Yu Watanabe e5ba1d324d test-execute: use CAP_CHOWN instead of CAP_NET_ADMIN
CAP_NET_ADMIN is somtrimes dropped by container runtime.
This changes to use CAP_CHOWN instead of CAP_NET_ADMIN, as it is
less likely to be dropped.
2018-03-05 00:02:22 +09:00
Yu Watanabe b7856f9218 test-execute: check capabilities before running tests
Fixes #8193.
2018-03-05 00:00:35 +09:00
Andika Triwidada a8170f9a3f po: Updated Indonesian translation (#8348) 2018-03-04 21:15:21 +09:00
SjonHortensius fe4a1d0f0d fixed 3 occurences of 'Failed top open' (#8349) 2018-03-04 21:12:45 +09:00