1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00
Commit Graph

39688 Commits

Author SHA1 Message Date
Yu Watanabe
06895a1dda test-network: fix invalid assertions 2019-04-25 00:29:20 +02:00
Zbigniew Jędrzejewski-Szmek
2d6888cc0d
Merge pull request #12376 from mrc0mmand/deal-with-backslashes-in-completion
bash-completion: properly autocomplete escaped unit names
2019-04-24 19:45:47 +02:00
Frantisek Sumsal
9521d5582b bash-completion: unify indentation 2019-04-24 18:03:30 +02:00
Frantisek Sumsal
72c9177db2 bash-completion: properly autocomplete escaped unit names 2019-04-24 18:03:15 +02:00
Paul Menzel
1fa3ba9096 NEWS: List getty@tty1.service as not being enabled anymore
Fixes: https://github.com/systemd/systemd/issues/12345
2019-04-24 16:13:02 +02:00
Lennart Poettering
aba5472979
Merge pull request #12351 from keszybz/sd-bus-add-symbol
Add symbol to tell the linker that new libsystemd version is needed
2019-04-24 10:23:10 +02:00
Zbigniew Jędrzejewski-Szmek
db8d154dc4 man: describe interaction with ProtectHome=/InaccessiblePaths= in BindMount=
https://github.com/systemd/systemd/issues/7153#issuecomment-485252308

Apparently this is still confusing for people.

Longer-term, I think we should just make BindMount= automatically "upgrade"
(or "downgrade", depending on how you look at this), any InaccessiblePath=
mountpoints to "tmpfs". I don't see much point in forcing users to remember
this interaction. But let's at least document the status quo, we can always
update the docs if the code changes.
2019-04-24 10:21:37 +02:00
Jan Klötzke
99b43caf26 core: immediately trigger watchdog action on WATCHDOG=trigger
A service might be able to detect errors by itself that may require the
system to take the same action as if the service locked up. Add a
WATCHDOG=trigger state change notification to sd_notify() to let the
service manager know about the self-detected misery and instantly
trigger the configured watchdog behaviour.
2019-04-24 10:17:10 +02:00
Lennart Poettering
1329fee5da
Merge pull request #12366 from lkundrak/lr/olpc-xo-175-keyboard
Add support for OLPC XO-1.75 keyboard
2019-04-24 10:15:54 +02:00
Lennart Poettering
0a6001c134
Merge pull request #12367 from keszybz/accept-check
Put a limit on the loop to flush connections
2019-04-24 10:14:51 +02:00
Frantisek Sumsal
d7707faec2 semaphore: merge semaphore scripts to avoid code duplication (#12365) 2019-04-24 07:52:49 +02:00
Zbigniew Jędrzejewski-Szmek
155dc16168 meson: do not use f-strings
Our travis CI still uses python3.5. I'm making this into a separate
commit to make it easy to revert later.
2019-04-23 22:59:19 +02:00
Zbigniew Jędrzejewski-Szmek
afb9c0c958 man: document sd_bus_add_{object,fallback}_vtable
The interface provided by those two functions is huge, so this text could
probably be made two or three times as long if all details were described.
But I think it's a good start.
2019-04-23 22:58:51 +02:00
Zbigniew Jędrzejewski-Szmek
bf135d288d sd-bus: when running user find function don't trust the value to be initialized
The find function is externally provided, and we shouldn't trust that the
authors remember to set the output parameter in all cases.
2019-04-23 22:58:39 +02:00
Zbigniew Jędrzejewski-Szmek
d5c8d8233c busctl: add introspect --xml-interface
This wraps the call to org.freedesktop.DBus.Introspectable.Introspect.
Using "busctl call" directly is inconvenient because busctl escapes the
string before printing.

Example:
$ busctl introspect --xml org.freedesktop.systemd1 /org/freedesktop/systemd1 | pygmentize -lxml | less -RF
2019-04-23 22:58:29 +02:00
Zbigniew Jędrzejewski-Szmek
d603324b4b test-bus-{vtable,introspect}: share data and test introspect_path()
test-bus-introspect is also applied to the tables from test-bus-vtable.c.

test-bus-vtable.c is also used as C++ sources to produce test-bus-vtable-cc,
and our hashmap headers are not C++ compatible. So let's do the introspection
part only in the C version.
2019-04-23 22:58:26 +02:00
Zbigniew Jędrzejewski-Szmek
31471d1ddb
Merge pull request #12320 from mrc0mmand/tweak-start-timeout-in-TEST-16-EXTEND-TIMEOUT
test: don't timeout while waiting for other test units
2019-04-23 15:48:47 +02:00
Zbigniew Jędrzejewski-Szmek
67962036f6 basic/socket-util: put a limit on the loop to flush connections
Follow-up for #12346.
2019-04-23 15:24:56 +02:00
Lubomir Rintel
0533cf4371 hwdb: Fix the key codes of the OLPC XO button pad
These are not on a key pad. These codes are sent by the "rocker" buttons
that resemble a game pad.
2019-04-23 15:20:19 +02:00
Lubomir Rintel
1430e4b653 hwdb: Fix the OLPC XO rotate key
The comment is incorrect -- this key code is sent by the rotate button,
the brightness keys are separate.
2019-04-23 15:15:33 +02:00
Lubomir Rintel
740bdfea87 hwdb: No LEDs on the OLPC XO keyboard 2019-04-23 15:15:17 +02:00
Lubomir Rintel
9c2b72065d hwdb: Make the OLPC XO rules also match XO-1.75
Uses the same keyboard, attached to the "Security Processor" P1J core
that bit-bangs the PS/2 keyboard protocol.
2019-04-23 15:14:04 +02:00
Zbigniew Jędrzejewski-Szmek
644cb4cc7a basic/socket-util: fix typo and reword comment
Comment bike-shedding might be the ultimate form of procrastination, but
I can't stop myself. :)
2019-04-23 15:11:08 +02:00
Zbigniew Jędrzejewski-Szmek
f5f899ef04
Merge pull request #12346 from poettering/accept-flush
socket-util: make sure accept_flush() doesn't hang on EOPNOTSUPP
2019-04-23 15:03:29 +02:00
Piotr Drąg
4b198b2a44 catalog: update Polish translation 2019-04-23 14:43:47 +02:00
Jiri Pirko
eaa9d507d8 udev: net_id: introduce predictable names for netdevsim
In order to properly and predictably name netdevsim netdevices,
introduce a separate implementation, as the netdevices reside on a
specific netdevsim bus. Note that this applies only to netdevsim devices
created using sysfs, because those expose phys_port_name attribute.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-04-23 14:01:00 +02:00
Marc-André Lureau
0fde5a3591 udev-rules: add udmabuf to kvm group
It will have the default 0660 mode.

Fixes: #12283
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-04-23 13:00:21 +02:00
Zbigniew Jędrzejewski-Szmek
dff9e25a76 sd-bus: split introspection into the content creation and reply creation parts
Just moving code around, in preparation to allow the content creation
part to be used in other places.

On the surface of things, introspect_path() should be in bus-introspect.c, but
introspect_path() uses many static helper functions in bus-objects.c, so moving
it would require all of them to be exposed, which is too much trouble.

test-bus-introspect is updated to actually write the closing bracket.
2019-04-23 12:23:15 +02:00
Zbigniew Jędrzejewski-Szmek
2abda6d1e4 sd-bus: use _cleanup_ for struct introspect 2019-04-23 12:23:15 +02:00
Zbigniew Jędrzejewski-Szmek
2caef9fba4 sd-bus: allow vtable format structure to grow in the future
We would check the size of sd_bus_vtable entries, requring one of the two known
sizes. But we should be able to extend the structure in the future, by adding
new fields, without breaking backwards compatiblity.

Incidentally, this check was what caused -EINVAL failures before, when programs
were compiled with systemd-242 and run with older libsystemd.
2019-04-23 12:23:15 +02:00
Zbigniew Jędrzejewski-Szmek
8dd8a286d1 sd-bus: add symbol to tell linker that new vtable functions are used
In 856ad2a86b sd_bus_add_object_vtable() and
sd_bus_add_fallback_vtable() were changed to take an updated sd_bus_vtable[]
array with additional 'features' and 'names' fields in the union.

The commit tried to check whether the old or the new table format is used, by
looking at the vtable[0].x.start.element_size field, on the assumption that the
added fields caused the structure size to grow. Unfortunately, this assumption
was false, and on arm32 (at least), the structure size is unchanged.

In libsystemd we use symbol versioning and a major.minor.patch semantic
versioning of the library name (major equals the number in the so-name).  When
systemd-242 was released, the minor number was (correctly) bumped, but this is
not enough, because no new symbols were added or symbol versions changed. This
means that programs compiled with the new systemd headers and library could be
successfully linked to older versions of the library. For example rpm only
looks at the so-name and the list of versioned symbols, completely ignoring the
major.minor numbers in the library name. But the older library does not
understand the new vtable format, and would return -EINVAL after failing the
size check (on those architectures where the structure size did change, i.e.
all 64 bit architectures).

To force new libsystemd (with the functions that take the updated
sd_bus_vtable[] format) to be used, let's pull in a dummy symbol from the table
definition. This is a bit wasteful, because a dummy pointer has to be stored,
but the effect is negligible. In particular, the pointer doesn't even change
the size of the structure because if fits in an unused area in the union.

The number stored in the new unsigned integer is not checked anywhere. If the
symbol exists, we already know we have the new version of the library, so an
additional check would not tell us anything.

An alternative would be to make sd_bus_add_{object,fallback}_vtable() versioned
symbols, using .symver linker annotations. We would provide
sd_bus_add_{object,fallback}_vtable@LIBSYSTEMD_221 (for backwards
compatibility) and e.g. sd_bus_add_{object,fallback}_vtable@@LIBSYSTEMD_242
(the default) with the new implementation. This would work too, but is more
work. We would have to version at least those two functions. And it turns out
that the .symver linker instructions have to located in the same compilation
unit as the function being annotated. We first compile libsystemd.a, and then
link it into libsystemd.so and various other targets, including
libsystemd-shared.so, and the nss modules. If the .symver annotations were
placed next to the function definitions (in bus-object.c), they would influence
all targets that link libsystemd.a, and cause problems, because those functions
should not be exported there. To export them only in libsystemd.so, compilation
would have to be rearranged, so that the functions exported in libsystemd.so
would not be present in libsystemd.a, but a separate compilation unit containg
them and the .symver annotations would be linked solely into libsystemd.so.
This is certainly possible, but more work than the approach in this patch.

856ad2a86b has one more issue: it relies on the
undefined fields in sd_bus_vtable[] array to be zeros. But the structure
contains a union, and fields of the union do not have to be zero-initalized by
the compiler. This means that potentially, we could have garbarge values there,
for example when reading the old vtable format definition from the new function
implementation. In practice this should not be an issue at all, because vtable
definitions are static data and are placed in the ro-data section, which is
fully initalized, so we know that those undefined areas will be zero. Things
would be different if somebody defined the vtable array on the heap or on the
stack. Let's just document that they should zero-intialize the unused areas
in this case.

The symbol checking code had to be updated because otherwise gcc warns about a
cast from unsigned to a pointer.
2019-04-23 12:23:12 +02:00
Chris Down
6610200d29
Merge pull request #12336 from anitazha/disablecontroller
core: support DisableControllers= for transient units
2019-04-23 10:42:37 +02:00
Anita Zhang
25cc30c4c8 core: support DisableControllers= for transient units 2019-04-22 11:52:08 -07:00
Lennart Poettering
6cdc62aa97 udev: whitespace fix 2019-04-18 15:18:12 +02:00
Lennart Poettering
5b116c37e1 test: add test for flush_accept()
Fixes: #12335
2019-04-18 15:18:12 +02:00
Lennart Poettering
f3d75364fb socket-util: make sure flush_accept() doesn't hang on unexpected EOPNOTSUPP
So apparently there are two reasons why accept() can return EOPNOTSUPP:
because the socket is not a listening stream socket (or similar), or
because the incoming TCP connection for some reason wasn't acceptable to
the host. THe latter should be a transient error, as suggested on
accept(2). The former however should be considered fatal for
flush_accept(). Let's fix this by explicitly checking whether the socket
is a listening socket beforehand.
2019-04-18 15:18:12 +02:00
Yu Watanabe
528fcf8d1d bootspec: fix build when EFI support is disabled
Follow-up for ce4c4f8108.
2019-04-17 11:20:04 +02:00
Yu Watanabe
ac9b17271f linux: import if_ether.h from kernel-5.0
kernel-4.15's if_ether.h has a bug that the header does not provide
'struct ethhdr'. The bug is introduced by
6926e041a8920c8ec27e4e155efa760aa01551fd (4.15-rc8)
and fixed by da360299b6734135a5f66d7db458dcc7801c826a (4.16-rc3).

This makes systemd built with kernel-4.15 headers.

Fixes #12319.
2019-04-16 10:27:01 +02:00
David Art
ec8181d1c5 hwdb: Add Medion Akoya E3216 MD60900 (#12323)
Fixes: #12312
2019-04-16 10:23:28 +02:00
Frantisek Sumsal
772f15c1d8 test: don't timeout while waiting for other test units
The main testsuite service timeouts sporadically when waiting for
other testsuite-* units. As the test timeout is handled by
the "test executor" (test.sh), let's disable it for the service.

This should (hopefully) fix the test flakiness.
2019-04-15 13:59:27 +02:00
Lennart Poettering
4d48eabf37
Merge pull request #12305 from yuwata/import-more-headers-from-kernel-5-0
linux: import more headers from kernel-5.0
2019-04-15 11:33:06 +02:00
Lennart Poettering
929b02b5b8
Merge pull request #12301 from keszybz/silence-alignment-warning
Silence alignment warning
2019-04-15 11:21:15 +02:00
Lennart Poettering
a4009bee4a
Merge pull request #12311 from yuwata/timeout_abort_set-change-bool
core: several follow-ups for timeout PR #11211
2019-04-15 11:14:18 +02:00
Florian Dollinger
5a1ee07302 Check for final assignments in RUN keys (#12309)
As described in #12291
2019-04-15 15:59:36 +09:00
Benjamin Robin
c424bed180 basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag is used
The memory leak introduced in #12223 (15f8f02)
2019-04-15 13:54:19 +09:00
Florian Dollinger
967de8face Document (final) assignment on the RUN (#12310)
As described in #12291, final assignments and assignments are clearing both command types.
2019-04-14 21:26:39 +09:00
Yu Watanabe
dcab85be18 core: do not show TimeoutStopSec= in dump message if it is not set 2019-04-14 20:47:13 +09:00
Yu Watanabe
9c79f0e0a0 core: add assertion in two inline functions 2019-04-14 20:46:24 +09:00
Yu Watanabe
3bf0cb65f5 core: use BUS_DEFINE_PROPERTY_GET() macro at more places 2019-04-14 20:45:31 +09:00
Yu Watanabe
54c1a6ab8c core: change type of Service::timeout_abort_set to bool
Follow-up for dc653bf487 (#11211).
2019-04-14 20:13:47 +09:00