Commit Graph

29915 Commits

Author SHA1 Message Date
Lennart Poettering
82f93439af units: properly unset the l10n environment variables where we need to
Now that we have UnsetEnvironment=, let's make proper use of it for
unsetting l10n settings for console gettys.

Fixes: #6407
2017-09-14 15:17:40 +02:00
Lennart Poettering
42cc99d5ec test: add test case for UnsetEnvironment= 2017-09-14 15:17:40 +02:00
Lennart Poettering
00819cc151 core: add new UnsetEnvironment= setting for unit files
With this setting we can explicitly unset specific variables for
processes of a unit, as last step of assembling the environment block
for them. This is useful to fix #6407.

While we are at it, greatly expand the documentation on how the
environment block for forked off processes is assembled.
2017-09-14 15:17:40 +02:00
Michael Grzeschik
dbbf424c8b rules: ubi mtd - add link to named partitions (#6750)
[zjs:
- rebase onto recent master
- drop signed-off-by]
2017-09-14 14:53:07 +02:00
Lennart Poettering
3b22864e20 Merge pull request #6428 from boucman/device_reload
device : reload when udev generates a "changed" event
2017-09-14 12:46:23 +02:00
Lennart Poettering
9492c16031 TODO: Drop even more redundant and implemented items 2017-09-14 11:21:24 +02:00
Lennart Poettering
09624cee53 TODO: remove some items that are implemented now or otherwise obsolete 2017-09-14 11:08:59 +02:00
Zbigniew Jędrzejewski-Szmek
71e0acccfd nss: use secure_getenv for behaviour-modifying booleans (#6817)
Follow up for fe102d6ab1.
2017-09-14 09:20:27 +02:00
Lennart Poettering
fe102d6ab1 nss-systemd,sysusers: make sure sysusers doesn't get confused by nss-systemd (#6812)
In nss-systemd we synthesize user entries for "nobody" and "root", as
fallback if we boot up with an entirely empty /etc. This is supposed to
be a fallback only though, and it's intended that both users exists
regularly in /etc/passwd + /etc/group. Before this patch
systemd-sysusers would never create the entries however as it notices
the synthetic entries. Let's add a way how systemd-sysusers can tell
nss-systemd not to synthesize the entries for itself.

Fixes: #6808
2017-09-14 06:20:39 +02:00
Davide Cavalca
d5df18e4b6 basic: ensure O_TMPFILE is always defined (#6816) 2017-09-14 06:14:29 +02:00
Zbigniew Jędrzejewski-Szmek
6fcdcbc517 Merge pull request #6807 from poettering/service-result
man: complete and rework $SERVICE_RESULT documentation
2017-09-13 23:17:20 +02:00
Zbigniew Jędrzejewski-Szmek
111dc55baa Merge pull request #6810 from poettering/test-mode-segfault
don't crash in pager code when "systemd --test" is invoked
2017-09-13 23:13:10 +02:00
Zbigniew Jędrzejewski-Szmek
e124ccdf5b man: rework grammatical form of sentences in a table in systemd.exec(5)
"Currently, the following values are defined: xxx: in case <condition>" is
awkward because "xxx" is always defined unconditionally. It is _used_ in case
<condition> is true. Correct this and a bunch of other places where the
sentence structure makes it unclear what is the subject of the sentence.
2017-09-13 23:06:20 +02:00
Zbigniew Jędrzejewski-Szmek
96b02bcdf1 Merge pull request #6775 from poettering/run-pipe2
run: add new --pipe option for "systemd-run"
2017-09-13 22:27:04 +02:00
Zbigniew Jędrzejewski-Szmek
368ebf62bf Merge pull request #6805 from poettering/exec-dir
exec-util,conf-files: skip non-executable files in execute_directories()
2017-09-13 22:26:41 +02:00
Zbigniew Jędrzejewski-Szmek
156d6036be man: fix repeated use of "use" in a sentence 2017-09-13 22:11:32 +02:00
Lennart Poettering
036d61b32e sd-bus: extend D-Bus authentication timeout considerably (#6813)
As it turns out the authentication phase times out too often than is
good, mostly due to PRNG pools not being populated during boot. Hence,
let's increase the authentication timeout from 25s to 90s, to cover for
that.

(Note that we leave the D-Bus method call timeout at 25s, matching the
reference implementation's value. And if the auth phase managed to
complete then the pools should be populated enough and mehtod calls
shouldn't take needlessly long anymore).

Fixes: #6418
2017-09-13 19:08:26 +02:00
Lennart Poettering
d74edffa8b Merge pull request #6811 from fbuihuu/dont-detach-root-DM-dev
Dont try to detach DM dev hosting "/" even when it uses BTRFS
2017-09-13 15:09:25 +02:00
Lennart Poettering
44a51139b9 Merge pull request #6798 from poettering/nspawn-seccomp
nspawn seccomp improvements
2017-09-13 12:57:59 +02:00
Franck Bui
33e8d8af14 shutdown: don't be fooled when detaching DM devices with BTRFS
Otherwise we would try to detach the DM device hosting the rootfs with BTRFS
which is doomed to fail.
2017-09-13 11:59:46 +02:00
Franck Bui
c43b2b9c71 util: make get_block_device() available 2017-09-13 11:49:43 +02:00
Lennart Poettering
e34aa8ed09 conf-files: log when we skip a drop-in configuration file 2017-09-13 11:42:32 +02:00
Lennart Poettering
b50846055e exec-util,conf-files: skip non-executable files in execute_directories()
Fixes: #6787
2017-09-13 11:42:31 +02:00
Lennart Poettering
d262e99e39 pager: let's create pager fds with O_CLOEXEC first
We make copies (without O_CLOEXEC) of the fds anyway before using them,
hence let's be safe and create them with O_CLOEXEC first, so that we
don't run into issues should pager_open() be called in a threaded
environment where another thread fork()s at the wrong time and ends up
with fds not marked O_CLOEXEC.
2017-09-13 10:37:52 +02:00
Lennart Poettering
dea374e898 main: skip many initialization steps when running in --test mode
Most importantly, don't collect open socket activation fds when in
--test mode. This specifically created a problem because we invoke
pager_open() beforehand (which these days makes copies of the original
stdout/stderr in order to be able to restore them when the pager goes
away) and we might mistakenly the fd copies it creates as socket
activation fds.

Fixes: #6383
2017-09-13 10:37:52 +02:00
Lennart Poettering
3d4ec01269 shutdown: fix incorrect fscanf() result check (#6806)
A correction for 090e3c9796.

Fixes: #6796
2017-09-13 10:08:37 +02:00
jonasBoss
586377fc92 hwdb: add Lenovo Yoga 510-14IKB sensor mount quirk (#6799) 2017-09-12 18:39:25 +02:00
Lukáš Nykrýn
9c63ba988d tmpfiles.d/journal-nocow: fix typo (#6804) 2017-09-12 13:28:21 -03:00
Lennart Poettering
38a7c3c0bd man: complete and rework $SERVICE_RESULT documentation
This reworks the paragraph describing $SERVICE_RESULT into a table, and
adds two missing entries: "success" and "start-limit-hit".

These two entries are then also added to the table explaining the
$EXIT_CODE + $EXIT_STATUS variables.

Fixes: #6597
2017-09-12 18:04:26 +02:00
Lennart Poettering
5dca7739e8 run: add new --pipe option for including "systemd-run" commands in shell pipelines
In this mode, we'll directly connect stdin/stdout/stderr of the invoked
service with whatever systemd-run itself is invoked on. This allows
inclusion of "systemd-run" commands in shell pipelines, as unlike
"--pty" this means EOF of stdin/stdout/stderr are propagated
independently.

If --pty and --pipe are combined systemd-run will automatically pick the
right choice for the context it is invoked in, i.e. --pty when invoked
on a TTY, and --pipe otherwise.
2017-09-12 16:28:12 +02:00
Lennart Poettering
3e2e660584 Merge pull request #6802 from systemd-mailing-devs/20170911184738.GA11495@dtor-ws
rules: load drivers only on "add" events
2017-09-12 16:15:22 +02:00
Lennart Poettering
960e4569e1 nspawn: implement configurable syscall whitelisting/blacklisting
Now that we have ported nspawn's seccomp code to the generic code in
seccomp-util, let's extend it to support whitelisting and blacklisting
of specific additional syscalls.

This uses similar syntax as PID1's support for system call filtering,
but in contrast to that always implements a blacklist (and not a
whitelist), as we prepopulate the filter with a blacklist, and the
unit's system call filter logic does not come with anything
prepopulated.

(Later on we might actually want to invert the logic here, and
whitelist rather than blacklist things, but at this point let's not do
that. In case we switch this over later, the syscall add/remove logic of
this commit should be compatible conceptually.)

Fixes: #5163

Replaces: #5944
2017-09-12 14:06:21 +02:00
Dmitry Torokhov
9b32afa9f2 rules: load drivers only on "add" events
Previously we were loading kernel modules on all device events save
for "remove". With the introduction of KOBJ_BIND/KOBJ_UNBIND this causes
issues, as driver modules that have devices bound to their drivers get
immediately reloaded, and it appears to the user that module unloading
does not work.

Let's change the rules to only load modules on "add" events instead.
2017-09-11 21:04:34 +02:00
Lennart Poettering
7609340e2f nspawn: replace homegrown seccomp filter table largely with references to the existing syscall groups
Let's shorten the table, now that we are hooked up to the syscall group
system.
2017-09-11 18:00:07 +02:00
Lennart Poettering
402530d91e nspawn: part over seccomp code to use seccomp_add_syscall_filter_item()
Let's unify a bit of the code here.
2017-09-11 18:00:07 +02:00
Lennart Poettering
69b1b241bb seccomp: split out inner loop code of seccomp_add_syscall_filter_set()
Let's add a new helper function seccomp_add_syscall_filter_item() that
contains the inner loop code of seccomp_add_syscall_filter_set(). This
helper function we can then export and make use of elsewhere.
2017-09-11 18:00:07 +02:00
Lennart Poettering
12dc378902 seccomp: drop default_action parameter from seccomp_add_syscall_filter_set()
The function doesn't actually use the parameter, hence let's drop it.
2017-09-11 18:00:07 +02:00
John Lin
c13ee7cc8b units: remove unnecessary Requires= and After= in system.slice (#6794) 2017-09-11 10:35:51 +02:00
Marcus Lundblad
20d8b12256 hwdb: Add ACCEL_MOUNT_MATRIX for the Lamina T-1016B.NORD 2-in-1 tablet (#6430) 2017-09-11 09:56:57 +02:00
Thomas Sailer
d74c1dea2e accelerator mount matrix for Asus TP300LD (#6789) 2017-09-11 08:36:05 +02:00
Jérémy Rosen
0ffddc6e2c device : reload when udev generates a "changed" event 2017-09-10 18:53:26 +02:00
Jérémy Rosen
f54bcca5c1 unit : allow any unit which propagates reloads to be reloaded 2017-09-10 18:53:26 +02:00
Lennart Poettering
526664f627 systemctl: don't do ANSI underlining on TERM=linux (#6778)
The linux console apparently can't do underlining, hence let's not do it
on the console.

Also see: #6601
2017-09-09 22:48:35 +02:00
Zbigniew Jędrzejewski-Szmek
c5aaaebced Merge pull request #6780 from poettering/agent-message
Three minor fixes.
2017-09-09 22:32:37 +02:00
Lennart Poettering
309f631d41 libudev: add missing errno initialization/error propagation (#6781)
In libudev (which es much older code than the rest of systemd), we
propagate errors in functions not returning an int, via (positive) errno
(i.e. libc-style), and as negative Exyz values in those returning an int
(much preferred, i.e. Linux kernel style). Let's fix up a few place,
where this was incorrectly done, or not done at all.

Fixes: #6613
2017-09-09 22:31:09 +02:00
Alan Jenkins
0aabe74749 man: update reference to definition of StartLimitAction (#6786)
The values for StartLimitAction are defined in `man systemd.unit`.
Don't send people to `man systemd.service` just to find they need to look
back in `man systemd.unit` again :).
2017-09-09 14:54:23 +02:00
0xAX
95441cf2ed kmod-setup: define has_virtio_rng() only in a case when HAVE_KMOD is enabled (#6784)
in other way we will get a warning message:

../src/core/kmod-setup.c:83:13: warning: ‘has_virtio_rng’ defined but
not used [-Wunused-function]

  static bool has_virtio_rng(void) {
             ^~~~~~~~~~~~~~
2017-09-08 23:51:04 +02:00
Felipe Sateler
912a0f21d9 sulogin-shell: switch from shell implementation to a C implementation (#6698) 2017-09-08 18:21:37 +02:00
Lennart Poettering
e1e26566ec efivars: don't crash when somebody wants to remove an efi variable
This corrects b3c908b4a2 by allowing a
NULL value again for variable deletion.

Fixes: #6753
2017-09-08 17:34:11 +02:00
Lennart Poettering
8cc7661dc5 man: only document "systemd-mount --umount", never "--unmount"
Internally, we accept either, but let's stick to one of the spellings
for all docs.

Fixes: #6757
2017-09-08 17:29:55 +02:00