1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-04 13:51:24 +03:00
Commit Graph

38922 Commits

Author SHA1 Message Date
Lennart Poettering
4ad9fb38a9 run: make sure NetworkNamespacePath= can be used on the systemd-run cmdline 2019-03-07 17:47:29 +01:00
Lennart Poettering
7619cb32f0 core: support netns joining also for sockets created by .socket unit
Similar to the cgroup magic we nowadays do when listening to sockets, to
assign them the right bpf programs, let's also do the same and join the
specified netns in the child process.

This allows people to listen in sockets in specific namespaces, or join
multiple services and socket units together to live in the same
namespace.
2019-03-07 17:47:29 +01:00
Lennart Poettering
a8d08f39d1 core: add new setting NetworkNamespacePath= for configuring a netns by path for a service
Fixes: #2741
2019-03-07 16:55:23 +01:00
Lennart Poettering
51af7fb230 core: add open_netns_path() helper
The new call allows us to open a netns from the file system, and store
it in a "storage fd pair". It's supposed to work with setup_netns() and
allows pre-population of the netns used with one opened from the file
system.
2019-03-07 16:55:23 +01:00
Lennart Poettering
da6bc6ed05 execute: no need to check for NULL when function right after does anyway 2019-03-07 16:55:19 +01:00
Lennart Poettering
44ffcbaea4 execute: (void)ify more 2019-03-07 16:53:45 +01:00
Lennart Poettering
2fa3742d96 execute: make things a tiny bit shorter 2019-03-07 16:53:45 +01:00
Lennart Poettering
8e8009dc50 execute: use structured initialization 2019-03-07 16:53:45 +01:00
Lennart Poettering
5468d9af77 random-seed: don't use "label" version of mkdir_parents()
We don't load the selinux label database anyway, hence this is not going
to do anything at all. Let's simplify this hence and drop the explicit
request.

Also note that today SELinux can take the filename into account when
automatically deducing the label for a new file, hence even if this code
actually would have done something it is redundant today.
2019-03-07 15:10:06 +01:00
Lennart Poettering
0c0e87fcd5 catalog: _cleanup_close_ is your friend 2019-03-07 15:10:06 +01:00
Lennart Poettering
3d477d6101 catalog: (void)ify all things 2019-03-07 15:10:06 +01:00
Lennart Poettering
5432d8a187 catalog: use structured initialization more 2019-03-07 15:10:06 +01:00
Lennart Poettering
3f1e2714a4 catalog: let's use mkdir_parents() and use same mode as tmpfiles.d for this dir
let's use mkdir_parents() (because its shorter), and 0755 as access
mode, so that things have the access mode tmpfiles.d also suggests.

Prompted by: #11903
2019-03-07 15:09:21 +01:00
Lennart Poettering
0640d48afb catalog: be a bit less aggressive with line breaking. After all 109ch is what we going for 2019-03-07 14:46:35 +01:00
Lennart Poettering
bbe804325e catalog: don't make catalog_entry_lang() clobber output params on failure
A minor fix to bring this in-line with our coding style
2019-03-07 14:46:35 +01:00
Michael Biebl
faab72d16b units: fix systemd.special man page reference in system-update-cleanup.service 2019-03-07 14:42:43 +01:00
Lennart Poettering
441dc329d7
Merge pull request #11916 from yuwata/pid1-id-renaming-handling
core: handle ID_RENAMING= udev property
2019-03-07 14:42:08 +01:00
Lennart Poettering
9522200649
Merge pull request #11918 from keszybz/clang-8
Two trivial changes to build with clang 8
2019-03-07 14:41:44 +01:00
Lennart Poettering
27da7ef0d0 nspawn: move payload to sub-cgroup first, then sync cgroup trees
if we sync the legacy and unified trees before moving to the right
subcgroup then ultimately the cgroup paths in the hierarchies will be
out-of-sync... Hence, let's move the payload first, and sync then.

Addresses: https://github.com/systemd/systemd/pull/9762#issuecomment-441187979
2019-03-07 11:26:17 +01:00
Piotr Drąg
119d27317c po: update Polish translation 2019-03-07 11:02:50 +01:00
Zbigniew Jędrzejewski-Szmek
2bd061a48b test-execute: avoid undefined variable warning when compiled w/o seccomp 2019-03-07 10:59:06 +01:00
Zbigniew Jędrzejewski-Szmek
eed336233c build-sys: disable -Wstring-plus-int
clang-8 warns about constructs like "foobar"+3 (to get "bar"). We
like to use patterns like this, so let's just disable the warning.
2019-03-07 10:58:49 +01:00
Stephane Chazelas
106bf8e445 remove "." path components from required mount paths
unit_require_mounts_for may be passed path arguments that contain "."
components like for user's home directories where "." is sometimes used
to specify some form of anchor point.

This change stops considering such path as an error and removes the "."
components instead.

Closes: #11910
2019-03-07 10:12:03 +01:00
Kai-Heng Feng
4ab97a0597 hwdb: Add support for Alienware touchpad toggle
BugLink: https://bugs.launchpad.net/bugs/1605433
2019-03-07 10:02:52 +01:00
Lennart Poettering
b6996652e2
Merge pull request #11911 from keszybz/bootspec-handle-invalid-efi
Bootspec handle invalid efi
2019-03-07 10:01:31 +01:00
Yu Watanabe
8c8b67ffec TODO: update 2019-03-07 17:28:33 +09:00
Yu Watanabe
1ec38b8574 test: add test for ID_RENAMING= udev property handling by pid1 2019-03-07 17:28:19 +09:00
Yu Watanabe
cd648ae195 man: mention possible actions supported by "udevadm trigger" 2019-03-07 15:19:02 +09:00
Yu Watanabe
dcee4a134c udevadm trigger: make --action option support all possible actions
This also make udevadm abort operations if invalid action is specified.
2019-03-07 15:19:02 +09:00
Yu Watanabe
08caaee0ac sd-device: move device_action_from_string() and friends to device-private.h 2019-03-07 15:18:49 +09:00
Yu Watanabe
2efa43dc4a core/device: make devices with ID_RENAMING= property be considered not ready 2019-03-07 12:54:58 +09:00
Zbigniew Jędrzejewski-Szmek
bd29f9de69 shared/bootspec: do not fail on errors when reading EFI vars
It seems that my EFI storage is corrupted. The kernel reports the file as present, but returns
an error when reading. Nevertheless, this shouldn't prevent me from reading the entry
list.

Fixes #11909.
2019-03-06 22:49:52 +01:00
Zbigniew Jędrzejewski-Szmek
1f18d94215 shared/bootspec: treat empty EFI vars as missing
We shouldn't really make any fuss about this. Also, change 'var' to 'variable'
for consistency with systemctl.c.
2019-03-06 22:45:37 +01:00
Zbigniew Jędrzejewski-Szmek
f40999f878 shared/bootspec: minor simplification 2019-03-06 22:21:34 +01:00
Lennart Poettering
c03f9cec42
Merge pull request #11898 from keszybz/meson-conv-lib
Use a convenience library for the sources shared between core/ and shutdown/
2019-03-06 10:46:18 +01:00
Frantisek Sumsal
2f2a0454ef test: parallelize tasks in TEST-24-UNIT-TESTS 2019-03-06 10:23:19 +01:00
Lennart Poettering
13a16a2bb3 json: log about the right line number
We mean the line number in the json data, not the line number in our
C source code.

Addresses: https://github.com/systemd/systemd/pull/9762#issuecomment-441183987
2019-03-05 21:10:57 +01:00
Zbigniew Jędrzejewski-Szmek
68d923d0d0 meson: drop "_la_" from variable name
A left-over from libtool times.
2019-03-05 21:02:40 +01:00
Zbigniew Jędrzejewski-Szmek
53f79e125d meson: use a convenience library for the sources shared between core/ and the outside
This avoids double compilation. Those files are tiny, so it doesn't save time,
but we avoid repeated warnings and errors, and it's generally cleaner to it
this way.

The number of commands in 'ninja -C build clean && ninja -C build' drops from
1462 to 1455 for me.
2019-03-05 21:01:17 +01:00
Zbigniew Jędrzejewski-Szmek
3170dfe42d
Merge pull request #10495 from poettering/login-boot-hookup
add "systemctl reboot --boot-loader-menu=" and "systemctl reboot --boot-loader-entry="
2019-03-05 20:38:41 +01:00
Zbigniew Jędrzejewski-Szmek
23bdba61b1 pkgconfig: avoid double slash with split-usr configuration
By defining rootprefix= we avoid a double slash in $systemdsystemunitdir and
other variables. This fixes a regression introduced in
1c2c7c6cb3 where the variables using rootprefix=/
would start with a double slash. This should be interpreted the same, but is
certainly ugly.

The rootprefix variable was added to systemd.pc in
1c2c7c6cb3, so there is no question of backwards
compatiblity. If people try to "override" the prefix and specify
--define-variable=rootprefix=/, they will get a double slash, which should be
OK, and is the same as --define-variable=rootprefix=/something/, which also
results in a double slash somewhere in the strings.
2019-03-05 18:49:28 +01:00
Lennart Poettering
12be0693eb update TODO 2019-03-05 16:52:46 +01:00
Lennart Poettering
e86c7a3abc docs: document the new environment variables logind groks 2019-03-05 16:52:46 +01:00
Lennart Poettering
350f9518ac logind: refactor logic of returning polkit challenge result into its own function
Let's share some code.
2019-03-05 16:52:46 +01:00
Lennart Poettering
97af80c5a7 systemctl: add support for booting into boot menu/entry
(This also removes support for booting into the EFI firmware setup
without logind. That's because otherwise the non-EFI fallback logind
implements can't work.)

Fixes: #9896
2019-03-05 16:52:46 +01:00
Lennart Poettering
31b221cf5e logind: add support for booting into the boot menu or a specific boot menu entry
This behaves similar to the "boot into firmware" logic, and also allows
either direct EFI operation (which sd-boot supports and others might
support eventually too) or override through env var.
2019-03-05 16:52:46 +01:00
Lennart Poettering
eed7210a5c bootspec: validate bootpsec entry ids before we use them 2019-03-05 16:50:58 +01:00
Lennart Poettering
38bd74d67e bootspec: get rid of find_default_boot_entry() entirely
Now only two operations are left. Let's just move this into the caller,
since it should make things simpler, clearer and shorter, in particular
as there's only a single user for this.
2019-03-05 16:50:58 +01:00
Lennart Poettering
b1a8771996 bootspec: rework find_default_boot_entry() to use boot_entries_load_config_auto()
it's pretty much the same code now, hence use it.
2019-03-05 16:50:58 +01:00
Lennart Poettering
eea4ce1ec7 bootspec: introduce new helper boot_entries_load_config_auto()
It's a simple wrapper around boot_entries_load_config(), but determines
the ESP/XBOOTLDR paths automatically at first. Also, it looks for a path
/run/boot-loader-entries/ and loads the entries from there if it
exists. This is supposed to be a hook for other boot loaders to make our
tools aware of their own entries.
2019-03-05 16:50:58 +01:00