]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agobasic: remove an assertion from cunescape_one
Evgeny Vereshchagin [Fri, 16 Nov 2018 06:05:29 +0000 (07:05 +0100)] 
basic: remove an assertion from cunescape_one

The function takes a pointer to a random block of memory and
the length of that block. It shouldn't crash every time it sees
a zero byte at the beginning there.

This should help the dev-kmsg fuzzer to keep going.

5 years agotests: add a fuzzer for dev_kmsg_record
Evgeny Vereshchagin [Thu, 15 Nov 2018 16:52:57 +0000 (17:52 +0100)] 
tests: add a fuzzer for dev_kmsg_record

5 years agoudev-rules: fix possible assertion
Yu Watanabe [Thu, 15 Nov 2018 09:46:23 +0000 (18:46 +0900)] 
udev-rules: fix possible assertion

On 'remove' action, event->dev_db_clone is NULL. So, `IMPORT{db}` rule
on 'remove' action triggers assertion. This fixes the issue.

5 years agoRevert "units: lock down logind with fs namespacing options"
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 16:03:33 +0000 (17:03 +0100)] 
Revert "units: lock down logind with fs namespacing options"

5 years agobasic/json: silence gcc warning about limited range of data type
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2018 13:50:07 +0000 (14:50 +0100)] 
basic/json: silence gcc warning about limited range of data type

With gcc-7.1.1-3.fc26.aarch64:
../src/basic/json.c: In function ‘json_format’:
../src/basic/json.c:1409:40: warning: comparison is always true due to limited range of data type [-Wtype-limits]
                                 if (*q >= 0 && *q < ' ')
                                        ^~
../src/basic/json.c: In function ‘inc_lines_columns’:
../src/basic/json.c:1762:31: warning: comparison is always true due to limited range of data type [-Wtype-limits]
                 } else if (*s >= 0 && *s < 127) /* Process ASCII chars quickly */
                               ^~

Cast to (signed char) silences the warning, but a cast to (int) for some reason
doesn't.

5 years agoMerge pull request #10742 from poettering/c-utf8
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2018 11:47:17 +0000 (12:47 +0100)] 
Merge pull request #10742 from poettering/c-utf8

default to C.UTF-8 locale, and many improvements to env var file parsing/kernel cmdline parsing

5 years agoMerge pull request #10753 from keszybz/pager-no-interrupt
Lennart Poettering [Wed, 14 Nov 2018 19:09:39 +0000 (20:09 +0100)] 
Merge pull request #10753 from keszybz/pager-no-interrupt

Add mode in journalctl where ^C is handled by the pager

5 years agocore: drop dbus queue recursion check
Lennart Poettering [Wed, 14 Nov 2018 12:00:12 +0000 (13:00 +0100)] 
core: drop dbus queue recursion check

We don't dispatch the queue recursively anymore, hence let's simplify
things a bit.

As pointed out by @fbuihuu:

https://github.com/systemd/systemd/pull/10763#discussion_r233209550

5 years agotests: add some tests for cmdline args containing spaces 10742/head
Lennart Poettering [Wed, 14 Nov 2018 16:22:18 +0000 (17:22 +0100)] 
tests: add some tests for cmdline args containing spaces

5 years agoupdate NEWS
Lennart Poettering [Mon, 12 Nov 2018 16:00:32 +0000 (17:00 +0100)] 
update NEWS

5 years agoupdate TODO
Lennart Poettering [Mon, 12 Nov 2018 12:19:07 +0000 (13:19 +0100)] 
update TODO

5 years agolocale-util: introduce common helper locale_variables_free() for freeing locale varia...
Lennart Poettering [Mon, 12 Nov 2018 15:50:58 +0000 (16:50 +0100)] 
locale-util: introduce common helper locale_variables_free() for freeing locale variable arrays

5 years agofileio: automatically add NULL sentinel to parse_env_file()
Lennart Poettering [Mon, 12 Nov 2018 13:18:03 +0000 (14:18 +0100)] 
fileio: automatically add NULL sentinel to parse_env_file()

Let's modernize things a bit.

5 years agolocaled: be more careful with the used types
Lennart Poettering [Mon, 12 Nov 2018 13:06:22 +0000 (14:06 +0100)] 
localed: be more careful with the used types

5 years agofileio: drop "newline" parameter for env file parsers
Lennart Poettering [Mon, 12 Nov 2018 13:04:47 +0000 (14:04 +0100)] 
fileio: drop "newline" parameter for env file parsers

Now that we don't (mis-)use the env file parser to parse kernel command
lines there's no need anymore to override the used newline character
set. Let's hence drop the argument and just "\n\r" always. This nicely
simplifies our code.

5 years agotree-wide: replace all remaining uses of parse_env_file() for parsing /proc/cmdline
Lennart Poettering [Mon, 12 Nov 2018 12:49:20 +0000 (13:49 +0100)] 
tree-wide: replace all remaining uses of parse_env_file() for parsing /proc/cmdline

Let's always go through the proc-cmdline.c APIs.

5 years agolocaled: no need to log twice about reload requests
Lennart Poettering [Mon, 12 Nov 2018 12:23:51 +0000 (13:23 +0100)] 
localed: no need to log twice about reload requests

5 years agolocaled: show proper bus error if we can in log message
Lennart Poettering [Mon, 12 Nov 2018 12:22:48 +0000 (13:22 +0100)] 
localed: show proper bus error if we can in log message

5 years agolocaled: don't silently eat up errors, log something
Lennart Poettering [Mon, 12 Nov 2018 12:22:36 +0000 (13:22 +0100)] 
localed: don't silently eat up errors, log something

5 years agolocale-setup: default to C.UTF-8
Lennart Poettering [Mon, 12 Nov 2018 12:12:39 +0000 (13:12 +0100)] 
locale-setup: default to C.UTF-8

Most distributions already were shipping a C.UTF-8 locale and even Fedora
now supports the C.UTF-8 locale, and there's clear indication that this
is going upstream too. Hence, let's default to it now too, if nothing
else is set.

Note that this is only a fallback if noting else is set, and since
distros generally configure a default for this behaviour shouldn't
really change in installed systems.

On new systems this makes vconsole.conf redundant.

5 years agolocale-setup: rework to use new proc_cmdline_get_key_many() API
Lennart Poettering [Mon, 12 Nov 2018 11:53:28 +0000 (12:53 +0100)] 
locale-setup: rework to use new proc_cmdline_get_key_many() API

This way we use the same code to access /proc/cmdline as everywhere
else, and thus support it in containers and the SYSTEMD_PROC_CMDLINE env
var.

5 years agolocale-setup: use precise type for locale variable iterator
Lennart Poettering [Mon, 12 Nov 2018 11:51:23 +0000 (12:51 +0100)] 
locale-setup: use precise type for locale variable iterator

5 years agolocale-setup: use _cleanup_strv_free_
Lennart Poettering [Mon, 12 Nov 2018 11:50:06 +0000 (12:50 +0100)] 
locale-setup: use _cleanup_strv_free_

5 years agoproc-cmdline: introduce new proc_cmdline_get_key_many() helper
Lennart Poettering [Mon, 12 Nov 2018 11:41:23 +0000 (12:41 +0100)] 
proc-cmdline: introduce new proc_cmdline_get_key_many() helper

This is like parse_env_file(), but from the kernel command line

5 years agoproc-cmdline: split out rd. prefix handling in proc_cmdline_parse_given() and proc_cm...
Lennart Poettering [Mon, 12 Nov 2018 11:39:34 +0000 (12:39 +0100)] 
proc-cmdline: split out rd. prefix handling in proc_cmdline_parse_given() and proc_cmdline_get_key()

This introduces a wrapper around extrac_first_word() called
proc_cmdline_extract_first(), which suppresses "rd." parameters
depending on the specified calls.

This allows us to share more code between proc_cmdline_parse_given() and
proc_cmdline_get_key(), and makes it easier to reuse this logic for
other purposes.

5 years agoman: use <keycombo> more 10753/head
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 15:57:33 +0000 (16:57 +0100)] 
man: use <keycombo> more

5 years agobasic/pager: ignore ^C when piping to less and K is not set
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 18:04:00 +0000 (19:04 +0100)] 
basic/pager: ignore ^C when piping to less and K is not set

Normally, we want to immediately quit on ^C. But when we are running under
less, people may set SYSTEMD_LESS without K, in which case they can use ^C to
communicate with less, and e.g. start and stop following input.

Fixes #6405.

5 years agobasic/cgroup-util: remove two unnecessary includes
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 17:43:44 +0000 (18:43 +0100)] 
basic/cgroup-util: remove two unnecessary includes

5 years agoMove LONG_LINE_MAX definition to fileio.h
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 17:39:39 +0000 (18:39 +0100)] 
Move LONG_LINE_MAX definition to fileio.h

All users of the macro (except for one, in serialize.c), use the macro in
connection with read_line(), so they must include fileio.h.  Let's not play
libc games and require multiple header file to be included for the most common
use of a function.

The removal of def.h includes is not exact. I mostly went over the commits that
switch over to use read_line() and add def.h at the same time and reverted the
addition of def.h in those files.

5 years agobasic/pager: convert the pager options to a flags argument
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 11:56:29 +0000 (12:56 +0100)] 
basic/pager: convert the pager options to a flags argument

Pretty much everything uses just the first argument, and this doesn't make this
common pattern more complicated, but makes it simpler to pass multiple options.

5 years agoproc-cmdline: turn flags parameter into a proper typedef'ed enum
Lennart Poettering [Mon, 12 Nov 2018 10:58:58 +0000 (11:58 +0100)] 
proc-cmdline: turn flags parameter into a proper typedef'ed enum

Let's add some extra typesafety.

5 years agoMerge pull request #10759 from keszybz/udevd-more-configuration
Lennart Poettering [Wed, 14 Nov 2018 15:21:14 +0000 (16:21 +0100)] 
Merge pull request #10759 from keszybz/udevd-more-configuration

Udevd more configuration options

5 years agotravis: use double the normal timeout in the ASan & UBSan stage
Evgeny Vereshchagin [Wed, 14 Nov 2018 09:38:59 +0000 (10:38 +0100)] 
travis: use double the normal timeout in the ASan & UBSan stage

This should somewhat address https://github.com/systemd/systemd/issues/10696.

5 years agoMerge pull request #10747 from poettering/machinectl-list-fix
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 11:47:56 +0000 (12:47 +0100)] 
Merge pull request #10747 from poettering/machinectl-list-fix

properly acquire os-release file from containers

5 years agoMerge pull request #10763 from poettering/pending-reload-fix
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 09:44:50 +0000 (10:44 +0100)] 
Merge pull request #10763 from poettering/pending-reload-fix

when reloading, don't throttle unit/job dbus change signal generation

5 years agojson: decrease DEPTH_MAX to 4k
Yu Watanabe [Tue, 13 Nov 2018 00:05:59 +0000 (09:05 +0900)] 
json: decrease DEPTH_MAX to 4k

This makes DEPTH_MAX lower value, as test-json fails with stack
overflow.

Note that the test can pass with 8k, but for safety, here set to 4k.

Fixes #10738.

5 years agohwdb: Add accelerometer orientation quirk for the Chuwi CoreBook tablet
Ruben Suarez Alvarez [Wed, 14 Nov 2018 07:18:23 +0000 (08:18 +0100)] 
hwdb: Add accelerometer orientation quirk for the Chuwi CoreBook tablet

5 years agotravis: also compile and run unsafe unit tests
Evgeny Vereshchagin [Wed, 14 Nov 2018 06:41:06 +0000 (07:41 +0100)] 
travis: also compile and run unsafe unit tests

5 years agohwdb: Add Onda V820w accelerometer transformation matrix
jambonmcyeah [Wed, 14 Nov 2018 03:03:21 +0000 (22:03 -0500)] 
hwdb: Add Onda V820w accelerometer transformation matrix

Added accelerometer transformation matrix for the Onda V820w Tablet

5 years agounit: don't claim there was no IP traffic generated by a unit when we don't know
Lennart Poettering [Tue, 13 Nov 2018 19:51:31 +0000 (20:51 +0100)] 
unit: don't claim there was no IP traffic generated by a unit when we don't know

Only if we have some IP traffic accounting at all we should claim that.

5 years agocore: split out audit message generation from unit_notify()
Lennart Poettering [Tue, 13 Nov 2018 19:59:20 +0000 (20:59 +0100)] 
core: split out audit message generation from unit_notify()

Just some refactoring, no change in behaviour.

5 years agoman: document that env vars are not suitable for passing secrets
Lennart Poettering [Tue, 13 Nov 2018 22:09:32 +0000 (23:09 +0100)] 
man: document that env vars are not suitable for passing secrets

Prompted by the thread around:

https://lists.freedesktop.org/archives/systemd-devel/2018-November/041665.html

5 years agoupdate TODO
Lennart Poettering [Tue, 13 Nov 2018 22:05:36 +0000 (23:05 +0100)] 
update TODO

5 years agoMerge pull request #10757 from Antique/cgroupv2
Lennart Poettering [Tue, 13 Nov 2018 21:03:10 +0000 (22:03 +0100)] 
Merge pull request #10757 from Antique/cgroupv2

Fix cgroupv2 bpf-devices issues

5 years agoudev: downgrade message when we fail to set inotify watch up
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 13:53:04 +0000 (14:53 +0100)] 
udev: downgrade message when we fail to set inotify watch up

My logs are full of:

systemd-udevd[6586]: seq 13515 queued, 'add' 'block'
systemd-udevd[6586]: seq 13516 queued, 'change' 'block'
systemd-udevd[6586]: seq 13517 queued, 'change' 'block'
systemd-udevd[6586]: seq 13518 queued, 'remove' 'bdi'
systemd-udevd[6586]: seq 13519 queued, 'remove' 'block'
systemd-udevd[9865]: seq 13514 processed
systemd-udevd[9865]: seq 13515 running
systemd-udevd[9865]: GROUP 6 /usr/lib/udev/rules.d/50-udev-default.rules:59
systemd-udevd[9865]: IMPORT builtin 'blkid' /usr/lib/udev/rules.d/60-persistent-storage.rules:95
systemd-udevd[9865]: IMPORT builtin 'blkid' fails: No such file or directory
systemd-udevd[9865]: loop4: Failed to add device '/dev/loop4' to watch: No such file or directory
(the last line is at error level).
If we are too slow to set up a watch and the device is already gone by the time
we try, this is not an error.

5 years agoudev: also allow resolve_names= to be specified in udev.conf 10759/head
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 10:33:32 +0000 (11:33 +0100)] 
udev: also allow resolve_names= to be specified in udev.conf

5 years agoudev: move ResolveNameTiming definition and parsers to udev-util.h
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 12:42:42 +0000 (13:42 +0100)] 
udev: move ResolveNameTiming definition and parsers to udev-util.h

Follow-up for c4d44cba4d9bd9d92c86e06f21d5936cca1b8c16. No functional change,
but the parser is moved to libsystemd-shared.so.

5 years agoudevd: allow more parameters to be set through udev.conf
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 10:10:13 +0000 (11:10 +0100)] 
udevd: allow more parameters to be set through udev.conf

Rebooting to set change the kernel command line to set some udev parameters is
inconvenient. Let's allow setting more stuff in the config file.

Also drop quotes from around "info" in udev.conf. We need to accept them for
compatibility, but there is no reason to use them.

5 years agobpf-devices: fix order of removing and adding BPF programs 10757/head
Pavel Hrdina [Mon, 12 Nov 2018 09:53:47 +0000 (10:53 +0100)] 
bpf-devices: fix order of removing and adding BPF programs

The current code has multiple issues and it should never be done like
that.  If someone updates list of allowed devices we should attach new
program before we remove the old one for two reasons:

1. It takes some time to attach new program so there is a period of time
when all devices are allowed.

2. BPF programs have limit for number of instructions (4096) and if user
adds a lot of devices we might hit the instruction limit and the new
program will not be accepted which will result in allow all devices
because the old program was already removed.

In order to attach the new program before we remove the old one we need
to use BPF_F_ALLOW_MULTI flag every time.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
5 years agoudev: do not pass timeout_warn_usec around, calculate it on demand
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 09:37:05 +0000 (10:37 +0100)] 
udev: do not pass timeout_warn_usec around, calculate it on demand

It was always set to one third of timeout_usec, so let's simplify things by
calculating it using a helper function right before it is used.

Before 9d9264ba39f797d20100c8acfda3df895ab5aaa2, udevd.c would avoid setting
timeout_warn_usec to 0, using 1 instead. This wasn't necessary, because when
timeout_warn_usec is finally used in spawn_wait(), it is ignored if
timeout_usec is 0 or timeout_warn_usec is 0. So there was no need to handle
this case specially.

5 years agobpf-devices: fix cgroup v2 devices detection
Pavel Hrdina [Mon, 12 Nov 2018 09:52:05 +0000 (10:52 +0100)] 
bpf-devices: fix cgroup v2 devices detection

If cgroup v2 bpf devices is supported we need to return 1, not -1.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
5 years agocore: make sure we don't throttle change signal generator when a reload is pending 10763/head
Lennart Poettering [Tue, 13 Nov 2018 11:48:49 +0000 (12:48 +0100)] 
core: make sure we don't throttle change signal generator when a reload is pending

Fixes: #10627
5 years agocore: when we can't send the pending reload message, say we ignore it in the warning...
Lennart Poettering [Tue, 13 Nov 2018 11:00:42 +0000 (12:00 +0100)] 
core: when we can't send the pending reload message, say we ignore it in the warning we log

No change in behaviour, just better wording.

5 years agocore: rename queued_message → pending_reload_message
Lennart Poettering [Tue, 13 Nov 2018 10:59:06 +0000 (11:59 +0100)] 
core: rename queued_message → pending_reload_message

This field is only used for pending Reload() replies, hence let's rename
it to be more descriptive and precise.

No change in behaviour.

5 years agoshared/dissect-image: drop parens
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 08:08:24 +0000 (09:08 +0100)] 
shared/dissect-image: drop parens

5 years agonspawn: add a hint to the message we emit when a child dies
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2018 08:02:01 +0000 (09:02 +0100)] 
nspawn: add a hint to the message we emit when a child dies

From #10526:

$ sudo systemd-nspawn -i image
Spawning container image on /home/zbyszek/src/mkosi/image.
Press ^] three times within 1s to kill container.
Short read while reading cgroup mode.

5 years agotree-wide: port over other candidates for namespace_fork() 10747/head
Lennart Poettering [Mon, 12 Nov 2018 22:42:24 +0000 (23:42 +0100)] 
tree-wide: port over other candidates for namespace_fork()

Let's always use the same, correct, way to join a namespace.

5 years agomachined: when reading os-release file, join PID namespace too
Lennart Poettering [Mon, 12 Nov 2018 22:40:09 +0000 (23:40 +0100)] 
machined: when reading os-release file, join PID namespace too

This is required for /proc/self/fd/xyz to work, but that's what we need
to convert the O_PATH fd returned by chase_symlinks() back to a regular
file fd. Hence, let's do the joining of the namespaces fully and
correctly, by doing fork()+setns()+fork() with the PID and fs
namespaces.

This makes use of the new namespace_fork() helper we just added.

Fixes: #10549
5 years agosd-bus: port over to namespace_fork()
Lennart Poettering [Mon, 12 Nov 2018 22:39:01 +0000 (23:39 +0100)] 
sd-bus: port over to namespace_fork()

This is pretty similar code, let's replace it with the generic
namespace_fork() implementation.

5 years agocore: add namespace_fork() helper, that forks, joins a set of namespaces and forks...
Lennart Poettering [Mon, 12 Nov 2018 22:37:13 +0000 (23:37 +0100)] 
core: add namespace_fork() helper, that forks, joins a set of namespaces and forks again

This helper is useful to ensure pidns/userns joining is properly
executed (as that requires a fork after the setns()). This is
particularly important when it comes to /proc/self/ access or
SCM_CREDENTIALS, but is generally the safer mode of operation.

5 years agocore: use local variable m instead of u->manager
INSUN PYO [Tue, 13 Nov 2018 04:44:20 +0000 (13:44 +0900)] 
core: use local variable m instead of u->manager

5 years agoMerge pull request #10744 from poettering/logind-lock-down
Lennart Poettering [Tue, 13 Nov 2018 09:38:47 +0000 (10:38 +0100)] 
Merge pull request #10744 from poettering/logind-lock-down

units: lock down logind with fs namespacing options

5 years agounits: also change portabled's syscall filter to a whitelist
Lennart Poettering [Mon, 12 Nov 2018 18:21:09 +0000 (19:21 +0100)] 
units: also change portabled's syscall filter to a whitelist

5 years agoMerge pull request #10614 from thom311/dhcp-identifier-set-iaid
Lennart Poettering [Mon, 12 Nov 2018 19:13:48 +0000 (20:13 +0100)] 
Merge pull request #10614 from thom311/dhcp-identifier-set-iaid

endianness dependent behavior of dhcp_identifier_set_iaid()

5 years agotests: dbus.service was renamed to dbus-daemon.service in Rawhide
Frantisek Sumsal [Sun, 11 Nov 2018 11:13:48 +0000 (12:13 +0100)] 
tests: dbus.service was renamed to dbus-daemon.service in Rawhide

Fedora Rawhide renamed dbus.service to dbus-daemon.service - that
breaks tests which require working DBus (e.g. TEST-03-JOBS)

Excerpt from the dbus.spec:
The 'dbus' package is only retained for compatibility purposes. It will
eventually be removed and then replaced by 'Provides: dbus' in the
dbus-daemon package. It will then exclusively be used for other packages to
describe their dependency on a system and user bus. It does not pull in any
particular dbus *implementation*, nor any libraries. These should be pulled
in, if required, via explicit dependencies.

5 years agounits: lock down systemd-logind.service with various fs namespacing options 10744/head
Lennart Poettering [Mon, 12 Nov 2018 17:08:48 +0000 (18:08 +0100)] 
units: lock down systemd-logind.service with various fs namespacing options

now that logind doesn't mount $XDG_RUNTIME_DIR anymore we can lock down
the service using fs namespacing (as we don't need the mount to
propagate to the host namespace anymore).

5 years agodhcp: support endianness independent dhcp_identifier_set_iaid() 10614/head
Thomas Haller [Thu, 1 Nov 2018 13:43:11 +0000 (14:43 +0100)] 
dhcp: support endianness independent dhcp_identifier_set_iaid()

The previous code did htole64() followed by unaligned_write_be32() (the
XOR and shift in between is endianness agnostic). That means, on every
architeture there is always exactly one byte swap and the iaid is
dependent on endianness.

Since dhcp_identifier_set_iaid() is part of the DUID generation
algorithm, this cannot be fixed without changing the client-id.
In particular, as the client-id already depends on the machine-id (and
is thus inherrently host-specific), it is better to stick to the current
behavior.

However, add a parameter to switch between old and new behaviour.
Since the new behavior is unused, the only real purpose of this
change is to self-document the oddity of the function.

Fixes: 933f9caeeb2b3c1b951d330e04beb04226e5a890
5 years agodhcp: add test for dhcp_identifier_set_iaid()
Thomas Haller [Thu, 1 Nov 2018 13:46:27 +0000 (14:46 +0100)] 
dhcp: add test for dhcp_identifier_set_iaid()

5 years agologind: drop CAP_KILL from caps bounding set
Lennart Poettering [Mon, 12 Nov 2018 16:57:45 +0000 (17:57 +0100)] 
logind: drop CAP_KILL from caps bounding set

logind doesn't kill any processes anymore, hence let's drop the
capability.

5 years agoMerge pull request #10741 from poettering/signal-check
Lennart Poettering [Mon, 12 Nov 2018 18:03:22 +0000 (19:03 +0100)] 
Merge pull request #10741 from poettering/signal-check

propeperly handle sd_event_add_signal() errors

5 years agounits: set NoNewPrivileges= for all long-running services
Lennart Poettering [Mon, 12 Nov 2018 16:19:48 +0000 (17:19 +0100)] 
units: set NoNewPrivileges= for all long-running services

Previously, setting this option by default was problematic due to
SELinux (as this would also prohibit the transition from PID1's label to
the service's label). However, this restriction has since been lifted,
hence let's start making use of this universally in our services.

On SELinux system this change should be synchronized with a policy
update that ensures that NNP-ful transitions from init_t to service
labels is permitted.

An while we are at it: sort the settings in the unit files this touches.
This might increase the size of the change in this case, but hopefully
should result in stabler patches later on.

Fixes: #1219
5 years agoupdate TODO
Lennart Poettering [Mon, 12 Nov 2018 17:57:11 +0000 (18:57 +0100)] 
update TODO

5 years agoAlways rename an interface to its name specified in config if no NamePolicy= is specified
Mathieu Trudel-Lapierre [Fri, 25 May 2018 14:34:38 +0000 (10:34 -0400)] 
Always rename an interface to its name specified in config if no NamePolicy= is specified

This is for issue #9006

5 years agoMerge pull request #10603 from yuwata/udevd-parser
Lennart Poettering [Mon, 12 Nov 2018 17:39:51 +0000 (18:39 +0100)] 
Merge pull request #10603 from yuwata/udevd-parser

udevd: several cleanups for parsing options

5 years agojournal-remote: log about inability to install signals 10741/head
Lennart Poettering [Mon, 12 Nov 2018 12:31:53 +0000 (13:31 +0100)] 
journal-remote: log about inability to install signals

5 years agohostnamed,localed,timedate: properly propagate errors from sd_event_add_signal()
Lennart Poettering [Mon, 12 Nov 2018 12:31:03 +0000 (13:31 +0100)] 
hostnamed,localed,timedate: properly propagate errors from sd_event_add_signal()

main() can't doesn't expect negative error codes as return.

5 years agoupdate TODO
Lennart Poettering [Mon, 12 Nov 2018 16:44:33 +0000 (17:44 +0100)] 
update TODO

5 years agocore: include unit name in emergency_action() reason message
Tommi Rantala [Thu, 8 Nov 2018 12:15:25 +0000 (14:15 +0200)] 
core: include unit name in emergency_action() reason message

Add unit name in StartLimitAction=, FailureAction= and SuccessAction=
emergency_action() reason messages, so that the problematic unit is
easily visible, for example:

    "unit dbus.service failed"

5 years agoudev: use structured initializer at one more place 10603/head
Yu Watanabe [Thu, 25 Oct 2018 09:18:35 +0000 (18:18 +0900)] 
udev: use structured initializer at one more place

5 years agoudev: drop redundant initializations for file descriptors
Yu Watanabe [Thu, 25 Oct 2018 08:41:17 +0000 (17:41 +0900)] 
udev: drop redundant initializations for file descriptors

As udev_ctrl_new_from_fd() or udev_monitor_new_from_netlink_fd()
creates fd if negative fd is passed.

5 years agoudev: handle sd_is_socket() failure
Yu Watanabe [Thu, 25 Oct 2018 08:39:53 +0000 (17:39 +0900)] 
udev: handle sd_is_socket() failure

5 years agoudev: drop util_log_priority() and use log_level_from_string()
Yu Watanabe [Mon, 29 Oct 2018 07:50:39 +0000 (16:50 +0900)] 
udev: drop util_log_priority() and use log_level_from_string()

The function util_log_priority() is almost same as
log_level_from_string(). The difference between them is only that
util_log_priority() accepts such that '3 hogehoge'.

5 years agoudev: use parse_sec() to parse --event-timeout option
Yu Watanabe [Thu, 25 Oct 2018 09:06:44 +0000 (18:06 +0900)] 
udev: use parse_sec() to parse --event-timeout option

5 years agoudev: include error cause of parsing --children-max option in log message
Yu Watanabe [Thu, 25 Oct 2018 09:13:55 +0000 (18:13 +0900)] 
udev: include error cause of parsing --children-max option in log message

5 years agoudev: introduce enum ResolveNameTiming for --resolve-names argument
Yu Watanabe [Thu, 25 Oct 2018 06:30:51 +0000 (15:30 +0900)] 
udev: introduce enum ResolveNameTiming for --resolve-names argument

5 years agoudevd: use parse_sec() to parse --exec-delay option
Yu Watanabe [Thu, 25 Oct 2018 05:56:12 +0000 (14:56 +0900)] 
udevd: use parse_sec() to parse --exec-delay option

5 years agoudevd: explicitly set default value of global variables
Yu Watanabe [Thu, 25 Oct 2018 05:51:58 +0000 (14:51 +0900)] 
udevd: explicitly set default value of global variables

5 years agoupdate TODO
Lennart Poettering [Mon, 12 Nov 2018 10:43:38 +0000 (11:43 +0100)] 
update TODO

5 years agoMerge pull request #10736 from yuwata/coredump-comment
Lennart Poettering [Mon, 12 Nov 2018 10:42:16 +0000 (11:42 +0100)] 
Merge pull request #10736 from yuwata/coredump-comment

fuzz: fix oss-fuzz#8658

5 years agoMerge pull request #10734 from yuwata/network-use-structured-initializers
Lennart Poettering [Mon, 12 Nov 2018 10:42:02 +0000 (11:42 +0100)] 
Merge pull request #10734 from yuwata/network-use-structured-initializers

network: several cleanups

5 years agohwdb: revert airplane mode keys handling on Dell
seb128 [Fri, 9 Nov 2018 15:54:02 +0000 (16:54 +0100)] 
hwdb: revert airplane mode keys handling on Dell

That reverts the commits #8762 and #9868, those created double key events issues on some Dell laptops.

5 years agoMerge pull request #10730 from yuwata/udev_device_get_ifindex_returns_zero
Lennart Poettering [Mon, 12 Nov 2018 09:25:26 +0000 (10:25 +0100)] 
Merge pull request #10730 from yuwata/udev_device_get_ifindex_returns_zero

libudev: conserve previous behavior

5 years agoMerge pull request #10731 from yuwata/fix-oss-fuzz-11344
Lennart Poettering [Mon, 12 Nov 2018 09:23:23 +0000 (10:23 +0100)] 
Merge pull request #10731 from yuwata/fix-oss-fuzz-11344

Fixes oss-fuzz#11344

5 years agofuzz: add testcase of oss-fuzz#8658 10736/head
Yu Watanabe [Mon, 12 Nov 2018 09:10:24 +0000 (18:10 +0900)] 
fuzz: add testcase of oss-fuzz#8658

5 years agofuzz: decrease DATA_SIZE_MAX
Yu Watanabe [Mon, 12 Nov 2018 09:08:45 +0000 (18:08 +0900)] 
fuzz: decrease DATA_SIZE_MAX

Fixes oss-fuzz#8658.

5 years agocoredump: update comments
Yu Watanabe [Mon, 12 Nov 2018 08:56:20 +0000 (17:56 +0900)] 
coredump: update comments

5 years agotree-wide: use CONFIG_PARSER_PROTOTYPE() macro 10734/head
Yu Watanabe [Mon, 12 Nov 2018 07:45:04 +0000 (16:45 +0900)] 
tree-wide: use CONFIG_PARSER_PROTOTYPE() macro

5 years agowait-online: use hashmap_free_with_destructor()
Yu Watanabe [Mon, 12 Nov 2018 06:34:39 +0000 (15:34 +0900)] 
wait-online: use hashmap_free_with_destructor()

5 years agonetwork: use hashmap_steal_first() rather than hashmap_first()+hashmap_remove()
Yu Watanabe [Mon, 12 Nov 2018 06:33:18 +0000 (15:33 +0900)] 
network: use hashmap_steal_first() rather than hashmap_first()+hashmap_remove()

5 years agonetwork: use hashmap_clear_with_destructor() at one more place
Yu Watanabe [Mon, 12 Nov 2018 06:32:26 +0000 (15:32 +0900)] 
network: use hashmap_clear_with_destructor() at one more place