Commit graph

39792 commits

Author SHA1 Message Date
mpe85 448cd0f3ee hwdb: add Medion Akoya E3222 MD62450 to 60-sensor.hwdb (#12485) 2019-05-06 15:18:26 +02:00
Frantisek Sumsal 6ab668337e test: return a non-zero return code when 'nobody' user doesn't exist
Lookup of a non-existing user using getpwnam() is not considered
an error, thus the `errno` is not set appropriately, causing
unexpected fails on systems, where 'nobody' user doesn't exist by
default
2019-05-06 15:13:07 +02:00
Yu Watanabe c26f3b1c86
Merge pull request #12429 from ssahani/link-local-fallback
networkd: Option to use LinkLocalAddressing only when DHCP fails
2019-05-04 16:52:07 +02:00
Yu Watanabe 63c598ede3 test-network: add a test for LinkLocalAddressing=fallback 2019-05-04 16:46:03 +02:00
Yu Watanabe 810ae0dc95 network: warn about Network.IPv4LL= is deprecated 2019-05-04 16:46:02 +02:00
Yu Watanabe 29e81083bd network: disable fallback IPv4ll address assignment when DHCPv4 is disabled 2019-05-04 16:46:02 +02:00
Yu Watanabe e800fd24a1 network: use DEFINE_STRING_TABLE_LOOKUP() macro for AddressFamilyBoolean 2019-05-04 16:46:02 +02:00
Yu Watanabe 6c0c041a8e network: make link_check_ready() handle LinkLocalAddressing=fallback 2019-05-04 16:46:02 +02:00
Yu Watanabe 552081a499 network: rewrite condition about DHCP in link_check_ready() 2019-05-04 16:46:02 +02:00
Susant Sahani 8bc17bb3f7 networkd: Option to use LinkLocalAddressing only when DHCP fails
When LinkLocalAddressing=fallback or LinkLocalAddressing=ipv4-fallback
then IPv4LL will be started only when DHCP fails.

Closes #9648.
2019-05-04 16:45:57 +02:00
Chris Down 6450ee3f8c
Merge pull request #12466 from yuwata/network-fix-issue-12452
network: fix assertion when link get carrier
2019-05-03 23:01:28 -04:00
Chris Down b6adba159c
Merge pull request #12441 from ssahani/bridge-fdb
networkd: add support for bridge fdb destination address.
2019-05-03 09:50:47 -04:00
Wieland Hoffmann 8a7033ac2f fstab-generator: Prevent double free of reused FILE*
When the .automount unit file already existed for any reason in the
`normal-dir` passed to `systemd-fstab-generator`, but the normal .mount unit
file did not, `f` was closed (but _not_ set to NULL). The call to
`generator_open_unit_file(..., automount_name, &f)` then failed because the
.mount unit file already existed. Now `f` did not point to an open FILE and the
later cleanup from the `_cleanup_fclose_` attribute failed with a double free.
Reset `f` to NULL before reusing it.
2019-05-03 13:22:36 +02:00
Yu Watanabe 1c862fe05a test-network: add tests for BridgeFDB.Destination= 2019-05-03 06:12:04 +02:00
Susant Sahani c2c2793f39 networkd: Add support to configure destination address for bridge FDB
Closes #5145.

Example conf:
```
[Match]
Name=vxlan1309

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.2

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.4

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.5
```
2019-05-03 06:11:52 +02:00
Yu Watanabe b9ea3d2e47 network: fix assertion when link get carrier
This fixes a bug introduced by bd08ce5615.
When link is in LINK_STATE_INITIALIZED, `Link::network` may not be
set yet.

Fixes #12452.
2019-05-03 01:14:36 +02:00
Zbigniew Jędrzejewski-Szmek 64538af89b udev/cdrom_id: drop unneeded parentheses 2019-05-01 11:46:42 +02:00
Lennart Poettering adb7b782f8
Merge pull request #12218 from keszybz/use-libmount-more
Use libmount more
2019-04-30 19:44:17 +02:00
Franck Bui 9f3f596477 meson: make source files including nspawn-settings.h depend on libseccomp
Since nspawn-settings.h includes seccomp.h, any file that includes
nspawn-settings.h should depend on libseccomp so the correct header path where
seccomp.h lives is added to the header search paths.

It's especially important for distros such as openSUSE where seccomp.h is not
shipped in /usr/include but /usr/include/libseccomp.

This patch is similar to 8238423095.
2019-04-30 19:31:22 +02:00
Yu Watanabe 8b803ad634 udev: drop unnecessary brackets
Follow-up for ed0cb34682.
2019-04-30 19:10:35 +02:00
Lennart Poettering 0892f3f999
Merge pull request #12420 from mrc0mmand/coccinelle-tweaks
Coccinelle improvements
2019-04-30 11:37:19 +02:00
Lennart Poettering 8d76f2905d
Merge pull request #12439 from poettering/simplify-umask-util
simplify RUN_WITH_UMASK()
2019-04-30 11:36:55 +02:00
Lennart Poettering 043d453c40 tests: add test for umask-util.h 2019-04-30 09:53:09 +02:00
Lennart Poettering 650c7a2e8b umask-util: simplify RUN_WITH_UMASK()
Why have a struct to store the iteration bit if we actually have plenty
place in mode_t?
2019-04-30 09:52:35 +02:00
Frantisek Sumsal ccd52940d0 coccinelle: further restrict certain transformations
Some transformations generate results we don't want to keep, so
let's disable such transformations for specific files.

Also, disable const-strlen.cocci everywhere, as the STRLEN macro has a
pretty limited scope, so the transformation generates false positives in
most cases.
2019-04-30 09:39:13 +02:00
Frantisek Sumsal 1f72479037 coccinelle: exclude JsonVariant* from the IN_SET transformation
JsonVariant* doesn't work with the current IN_SET implementation, so
let's exclude it from the transformation altogether
2019-04-30 09:39:13 +02:00
Frantisek Sumsal ed0cb34682 tree-wide: code improvements suggested by Coccinelle 2019-04-30 09:39:07 +02:00
Susant Sahani f143c650a3 netword: fdb fix coding style 2019-04-30 13:06:10 +05:30
Zbigniew Jędrzejewski-Szmek cb9ff7532b
Merge pull request #12434 from poettering/rm-rf-children-take-ptr
minor rm_rf_children() modernizations
2019-04-30 08:23:13 +02:00
Aaron Barany fcc72fd0f1 alloc-util: don't use malloc_usable_size() to determine allocated size
This reverts commit d4b604baea.

When realloc() is called, the extra memory between the originally
requested size and the end of malloc_usable_size() isn't copied. (at
least with the version of glibc that currently ships on Arch Linux)
As a result, some elements get lost and use uninitialized memory, most
commonly 0, and can lead to crashes.

fixes #12384
2019-04-30 08:20:59 +02:00
Lennart Poettering b9de47b97b
Merge pull request #12428 from jwrdegoede/hwdb-logitech-kbds
Hwdb: Add key-mappings for various wireless Logitech keyboards
2019-04-29 21:34:42 +02:00
Yuri Chornoivan 95a37f5979 Update Ukrainian translation 2019-04-29 21:26:39 +02:00
Lennart Poettering 987719d37d
Merge pull request #12414 from keszybz/detect-podman
Detect podman as separate container type
2019-04-29 19:07:24 +02:00
Susant Sahani b5799eeb07 networkd: Add back static routes after DHCPv4 lease expires.
1. When the DHCPv4 lease expires kernel removes the route. So add it back
when we gain lease again.

Closes https://github.com/systemd/systemd/issues/12426

2. When UseRoutes=false do not remove router
2019-04-29 18:13:31 +02:00
Hans de Goede e38fd76e5f hwdb: Fix F12 mapping on the Logitech Internet Navigator
Many Logitech keyboards have the following special functions on F9-F12:
F9: file-browser F10: document-browser F11: image-browser F12:
music-browser. These should be bound to:

 #define KEY_FILE               144     /* AL Local Machine Browser */
 #define KEY_DOCUMENTS          235
 #define KEY_IMAGES           0x1ba     /* AL Image Browser */
 #define KEY_AUDIO            0x188     /* AL Audio Browser */

This commit fixes the wrong binding of F12 to KEY_SOUND (which
translates to XF86AudioPreset) and removes the ?? comments from
both F11 and F12.
2019-04-29 17:29:08 +02:00
Hans de Goede 29516b08cb hwdb: Add key mappings for Logitech MX5500 keyboard
Add support for various custom key-codes emitted by the Logitech MX5500
keyboard, both when attached through its Bluetooth-receiver in USB-HID
proxy mode; and when connected as a Bluetooth device.
2019-04-29 17:29:08 +02:00
Hans de Goede 6736357310 hwdb: Add key mappings for Logitech MX5000 keyboard
Add support for various custom key-codes emitted by the Logitech MX5000
keyboard, both when attached through its Bluetooth-receiver in USB-HID
proxy mode; and when connected as a Bluetooth device.
2019-04-29 17:29:08 +02:00
Hans de Goede 9e2e65678d hwdb: Add key mappings for Logitech 27 MHz S520 keyboard
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the S520 keyboard
(modelnumber Y-RBA97).
2019-04-29 17:29:08 +02:00
Hans de Goede c23bc35f9b hwdb: Add key mappings for Logitech 27 MHz EX100 keyboard
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the EX100 keyboard
(modelnumber Y-RBH94).
2019-04-29 17:29:08 +02:00
Hans de Goede 0eca286716 hwdb: Add key mappings for Logitech 27 MHz MX3200 keyboard
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the MX3200 keyboard
(modelnumber Y-RAV80).
2019-04-29 17:29:08 +02:00
Hans de Goede 3008f07e02 hwdb: Add key mappings for Logitech 27 MHz MX3000 keyboard
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the MX3000 keyboard
(modelnumber Y-RAM74).
2019-04-29 17:29:08 +02:00
Hans de Goede 465a319307 hwdb: Add key mappings for Logitech 27 MHz "Cordless Rechargeable Desktop" keyboard
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the "Logitech Rechargeable
Desktop" keyboard (modelnumber Y-RK49).
2019-04-29 17:29:08 +02:00
Hans de Goede bd9133c67e hwdb: Add key mappings for Logitech 27 MHz "Cordless Access Keyboard"
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the "Logitech Cordless
Access Keyboard" (modelnumber Y-RH35).
2019-04-29 17:29:08 +02:00
Hans de Goede e016c6d6ab hwdb: Add generic key mapping for Logitech 27 MHz keyboards
The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This will allow us to add per model keymappings for the special keys on
these keyboards, which may differ per model.

This commit adds a default / fallback mapping, assigning the most common
meaning of the custom Logitech c10XX keycodes.
2019-04-29 17:29:08 +02:00
Lennart Poettering 6dc14d7366 units: drop reference to sushell man page
sushell was a Fedoraism, and has been removed since. Hence our upstream
unit files shouldn't reference it either.
2019-04-29 17:06:52 +02:00
Ben Boeckel 5238e95759 codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
Lennart Poettering 50b6eec154 rm-rf: simplify rm_rf_children() a bit by using _cleanup_close_ 2019-04-29 16:21:01 +02:00
Lennart Poettering c0ba6b9286 switch-root: modernize rm_rf_children() invocation a bit 2019-04-29 16:17:29 +02:00
Frantisek Sumsal 4a4eaade60 coccinelle: exclude certain paths from the transformations
There's no point in running these transformation for certain files,
mainly anything from src/boot/efi and src/shared/linux, as this code
doesn't have access to our internal utility functions
2019-04-29 15:38:53 +02:00
Frantisek Sumsal 60d9959dd8 coccinelle: ignore function transformations causing recursion
For example, following transformation:

- isempty(s) ? NULL : s
+ empty_to_null(s)

would get applied to the empty_to_null function itself as well,
causing an infinite recursion, like:

--- src/basic/string-util.h
+++ /tmp/cocci-output-307-9f76e6-string-util.h
@@ -50,11 +50,11 @@ static inline bool isempty(const char *p
 }

 static inline const char *empty_to_null(const char *p) {
-        return isempty(p) ? NULL : p;
+        return empty_to_null(p);
 }

Let's avoid that by checking the current match position
2019-04-29 15:38:53 +02:00