summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "networkd: stop clients when networkd shuts down (#12463)"revert-12463-issue-12452-netlinkZbigniew Jędrzejewski-Szmek2019-05-073-6/+1
| | | | This reverts commit 946f8e14d59ec1262f1779bc9a65d1c048d6544b.
* Italian translations: minor updates (#12494)Daniele Medri2019-05-071-17/+50
|
* Merge pull request #12478 from yuwata/wireguard-fwmarkYu Watanabe2019-05-073-3/+5
|\ | | | | network: rename WireGuard.FwMark -> FirewallMark
| * network: rename WireGuard.FwMark -> FirewallMarkYu Watanabe2019-05-043-3/+5
| | | | | | | | For the consistency with FirewallMark= in [RoutingPolicyRule] section.
* | Merge pull request #12487 from mschiu77/acer-series-hwdbYu Watanabe2019-05-071-2/+6
|\ \ | | | | | | Acer series hwdb
| * | hwdb: Align airplane mode toggle key mapping for all Acer seriesChris Chiu2019-05-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Packard Bell and Gateway are different marketing names from Acer. The same scan code E0 86 is fired for the airplane mode toggle key. It was verified in commit d8d51328fe6db33a2d8cda06f181c55c00d09672. Signed-off-by: Chris Chiu <chiu@endlessm.com>
| * | Revert "hwdb: Apply Acer mappings to all Gateway and Packard Bell models"Chris Chiu2019-05-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e09dba97b96f877e36cd3f1afdb321922eed064b. It's reported that the same rules for Acer cause false match and unexpected response from certain keys on an old PackardBell laptop. Bug: https://github.com/systemd/systemd/issues/12178
* | | Merge pull request #12440 from poettering/realloc-againZbigniew Jędrzejewski-Szmek2019-05-062-6/+45
|\ \ \ | | | | | | | | another shot at the malloc_usable_size() thing
| * | | test-alloc-util: let's test a few more things around GREEDY_REALLOC()Lennart Poettering2019-05-021-6/+21
| | | |
| * | | alloc-util: reintroduce malloc_usable_size() into greedy_realloc()Lennart Poettering2019-05-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another attempt at d4b604baeadbb2498e4f2c3e260260eed210f5d6 and #12438 Instead of blindly using the extra allocated space, let's do so only after telling libc about it, via a second realloc(). The second realloc() should be quick, since it never has to copy memory around.
* | | | basic/mountpoint-util: whitelist 'exfat' in fstype_can_uid_gidMike Gilbert2019-05-061-0/+1
| | | |
* | | | networkd: stop clients when networkd shuts down (#12463)Susant Sahani2019-05-063-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We not stopping the clients when networkd stops. They should shut down cleanly and then we need to clean the DS. One of requirements to implement https://github.com/systemd/systemd/issues/10820. ``` ^CBus bus-api-network: changing state RUNNING → CLOSED DHCP SERVER: UNREF DHCP SERVER: STOPPED DHCP CLIENT (0x60943df0): STOPPED veth-test: DHCP lease lost veth-test: Removing address 192.168.5.31 NDISC: Stopping IPv6 Router Solicitation client DHCP CLIENT (0x0): FREE ==24308== ==24308== HEAP SUMMARY: ==24308== in use at exit: 8,192 bytes in 2 blocks ==24308== total heap usage: 4,230 allocs, 4,228 frees, 1,209,732 bytes allocated ==24308== ==24308== LEAK SUMMARY: ==24308== definitely lost: 0 bytes in 0 blocks ==24308== indirectly lost: 0 bytes in 0 blocks ==24308== possibly lost: 0 bytes in 0 blocks ==24308== still reachable: 8,192 bytes in 2 blocks ==24308== suppressed: 0 bytes in 0 blocks ==24308== Rerun with --leak-check=full to see details of leaked memory ==24308== ==24308== For lists of detected and suppressed errors, rerun with: -s ==24308== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==24308== could not unlink /tmp/vgdb-pipe-from-vgdb-to-24308-by-sus-on-Zeus ==24308== could not unlink /tmp/vgdb-pipe-to-vgdb-from-24308-by-sus-on-Zeus ==24308== could not unlink /tmp/vgdb-pipe-shared-mem-vgdb-24308-by-sus-on-Zeus ```
* | | | hwdb: update the Chuwi HI13 pattern (#12469)pEJipE2019-05-061-1/+1
| | | | | | | | | | | | | | | | Correct the searching pattern for Chuwi Hi13. Follow-up for c70b51a7b98c3538aba7bbfee455b850b0aa714e.
* | | | Update Brazilian Portuguese translationRafael Fontenelle2019-05-061-30/+71
| | | |
* | | | Systemd Catalog, Italian translation: minor updates (#12483)Daniele Medri2019-05-061-19/+129
| | | |
* | | | hwdb: add Medion Akoya E3222 MD62450 to 60-sensor.hwdb (#12485)mpe852019-05-061-0/+4
| | | |
* | | | test: return a non-zero return code when 'nobody' user doesn't existFrantisek Sumsal2019-05-061-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | 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
* | | Merge pull request #12429 from ssahani/link-local-fallbackYu Watanabe2019-05-0413-64/+167
|\ \ \ | |_|/ |/| | networkd: Option to use LinkLocalAddressing only when DHCP fails
| * | test-network: add a test for LinkLocalAddressing=fallbackYu Watanabe2019-05-042-2/+46
| | |
| * | network: warn about Network.IPv4LL= is deprecatedYu Watanabe2019-05-041-1/+15
| | |
| * | network: disable fallback IPv4ll address assignment when DHCPv4 is disabledYu Watanabe2019-05-041-0/+7
| | |
| * | network: use DEFINE_STRING_TABLE_LOOKUP() macro for AddressFamilyBooleanYu Watanabe2019-05-043-43/+26
| | |
| * | network: make link_check_ready() handle LinkLocalAddressing=fallbackYu Watanabe2019-05-041-6/+6
| | |
| * | network: rewrite condition about DHCP in link_check_ready()Yu Watanabe2019-05-041-6/+3
| | |
| * | networkd: Option to use LinkLocalAddressing only when DHCP failsSusant Sahani2019-05-049-16/+74
|/ / | | | | | | | | | | | | When LinkLocalAddressing=fallback or LinkLocalAddressing=ipv4-fallback then IPv4LL will be started only when DHCP fails. Closes #9648.
* | Merge pull request #12466 from yuwata/network-fix-issue-12452Chris Down2019-05-031-2/+2
|\ \ | | | | | | network: fix assertion when link get carrier
| * | network: fix assertion when link get carrierYu Watanabe2019-05-031-2/+2
| |/ | | | | | | | | | | | | | | This fixes a bug introduced by bd08ce56156751d58584a44e766ef61340cdae2d. When link is in LINK_STATE_INITIALIZED, `Link::network` may not be set yet. Fixes #12452.
* | Merge pull request #12441 from ssahani/bridge-fdbChris Down2019-05-038-8/+89
|\ \ | | | | | | networkd: add support for bridge fdb destination address.
| * | test-network: add tests for BridgeFDB.Destination=Yu Watanabe2019-05-033-6/+32
| | |
| * | networkd: Add support to configure destination address for bridge FDBSusant Sahani2019-05-035-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| * | netword: fdb fix coding styleSusant Sahani2019-04-301-1/+1
| | |
* | | fstab-generator: Prevent double free of reused FILE*Wieland Hoffmann2019-05-031-1/+1
| |/ |/| | | | | | | | | | | | | | | | | 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.
* | udev/cdrom_id: drop unneeded parenthesesZbigniew Jędrzejewski-Szmek2019-05-011-20/+18
| |
* | Merge pull request #12218 from keszybz/use-libmount-moreLennart Poettering2019-04-307-136/+121
|\ \ | | | | | | Use libmount more
| * | shared/mount-util: make sure utab is ignored in umount_recursive()Zbigniew Jędrzejewski-Szmek2019-04-232-2/+7
| | | | | | | | | | | | See https://github.com/systemd/systemd/pull/12218#pullrequestreview-226029985.
| * | Add helper function for mnt_table_parse_{stream,mtab}Zbigniew Jędrzejewski-Szmek2019-04-236-34/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wraps a few common steps. It is defined as inline function instead of in a .c file to avoid having a .c file. With a .c file, we would have three choices: - either link it into libshared, but then then libshared would have to be linked to libmount. - or compile the .c file into each target separately. This has the disdvantage that configuration of every target has to be updated and stuff will be compiled multiple times anyway, which is not too different from keeping this in the header file. - or create a new convenience library just for this. This also has the disadvantage that the every target would have to be updated, and a separate library for a 10 line function seems overkill. By keeping everything in a header file, we compile this a few times, but otherwise it's the least painful option. The compiler can optimize most of the function away, because it knows if 'source' is set or not.
| * | mount-tool: use libmount to parse /proc/self/mountinfoZbigniew Jędrzejewski-Szmek2019-04-232-34/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same motivation as in other places: let's use a single logic to parse this. Use path_equal() to compare the path. A bug in error handling is fixed: if we failed after the GREEDY_REALLOC but before the line that sets the last item to NULL, we would jump to _cleanup_strv_free_ with the strv unterminated. Let's use GREEDY_REALLOC0 to avoid the issue.
| * | shared/mount-util: convert to libmountZbigniew Jędrzejewski-Szmek2019-04-233-94/+74
| | | | | | | | | | | | | | | | | | | | | It seems better to use just a single parsing algorithm for /proc/self/mountinfo. Also, unify the naming of variables in all places that use mnt_table_next_fs(). It makes it easier to compare the different call sites.
* | | meson: make source files including nspawn-settings.h depend on libseccompFranck Bui2019-04-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 8238423095ca54c48d9408a5da13e0325b31e6f6.
* | | udev: drop unnecessary bracketsYu Watanabe2019-04-303-32/+20
| | | | | | | | | | | | Follow-up for ed0cb346821972ec2c505ee11ed3d383aba6256e.
* | | Merge pull request #12420 from mrc0mmand/coccinelle-tweaksLennart Poettering2019-04-3040-231/+270
|\ \ \ | | | | | | | | Coccinelle improvements
| * | | coccinelle: further restrict certain transformationsFrantisek Sumsal2019-04-305-55/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | coccinelle: exclude JsonVariant* from the IN_SET transformationFrantisek Sumsal2019-04-302-67/+30
| | | | | | | | | | | | | | | | | | | | JsonVariant* doesn't work with the current IN_SET implementation, so let's exclude it from the transformation altogether
| * | | tree-wide: code improvements suggested by CoccinelleFrantisek Sumsal2019-04-3011-52/+57
| | | |
| * | | coccinelle: exclude certain paths from the transformationsFrantisek Sumsal2019-04-291-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | coccinelle: ignore function transformations causing recursionFrantisek Sumsal2019-04-293-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | coccinelle: ignore macro transformations in the macros themselvesFrantisek Sumsal2019-04-283-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, the following transformation: - sizeof(s)-1 + STRLEN(s) would replace sizeof by STRLEN even in the STRLEN macro definition itself, which generates following nonsensical patch: --- src/basic/macro.h +++ /tmp/cocci-output-8753-b50773-macro.h @@ -182,7 +182,7 @@ static inline unsigned long ALIGN_POWER2 * Contrary to strlen(), this is a constant expression. * @x: a string literal. */ -#define STRLEN(x) (sizeof(""x"") - 1) +#define STRLEN(x) (STRLEN("" x "")) /* * container_of - cast a member of a structure out to the containing structure Let's exclude the macro itself from the transformation to avoid this
| * | | tree-wide: drop !! casts to booleansFrantisek Sumsal2019-04-282-2/+2
| | | | | | | | | | | | | | | | Done by coccinelle/bool-cast.cocci
| * | | tree-wide: replace explicit NULL checks with their shorter variantsFrantisek Sumsal2019-04-2815-30/+30
| | | | | | | | | | | | | | | | Done by coccinelle/equals-null.cocci
| * | | coccinelle: avoid matching 'errno' as a file descriptorFrantisek Sumsal2019-04-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `coccinelle/take-fd.cocci` transformation file attempts to rewrite r = fd; fd = -1; to r = TAKE_FD(fd); Unfortunately, using `identifier` or `idexpression` as a metavariable type in this case wouldn't match more complex location descriptions, like: x->fd = fd fd = -1; Using 'expression' metavariable type generates false positives, as you can't specify scope of such expression. The only real example from the current codebase is the global 'errno' variable, which results in following patch generated by `spatch`: --- src/basic/errno-util.h +++ /tmp/cocci-output-28263-971baa-errno-util.h @@ -15,8 +15,7 @@ static inline void _reset_errno_(int *sa #define UNPROTECT_ERRNO \ do { \ - errno = _saved_errno_; \ - _saved_errno_ = -1; \ + errno = TAKE_FD(_saved_errno_); \ } while (false) static inline int negative_errno(void) { Let's explicitly state that the matched expression should not equal 'errno' to avoid this. It's not particularly nice, but it should be enough, at least for now.