1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

40989 Commits

Author SHA1 Message Date
Yu Watanabe
dfc3365593 network: ip6tnl and vti6 does not support the case both Local= and Remote= are any
This partially revert feb0c8b86f.

This also drop assertions about Tunnel.family.
2019-07-11 15:09:09 +09:00
Yu Watanabe
db105415d3
Merge pull request #13013 from yuwata/network-xfrm-follow-ups
network: follow-ups for XFRM netdevs and introduce AssignToLoopback= for Tunnel devices
2019-07-11 15:08:13 +09:00
Yu Watanabe
e64dc40615 test-network: add test for Xfrm netdev 2019-07-11 11:51:23 +09:00
Yu Watanabe
95082dbef5 test-network: add test for AssignToLoopback= setting 2019-07-11 09:59:06 +09:00
Yu Watanabe
8c9c703c55 network: add AssignToLoopback= setting to [Tunnel] section
networkd does not manage loopback interface lo. So, previously, we have
no way to assign tunnel devices to lo.
2019-07-11 09:59:06 +09:00
Yu Watanabe
3140e8a55a network: simplify the condition about xfrm 2019-07-11 09:59:06 +09:00
Lennart Poettering
8e27167cc9
Merge pull request #13011 from keszybz/auto-erase
Remove string_erase and friends
2019-07-11 01:05:01 +02:00
Yu Watanabe
feb0c8b86f network: support gre tunnel or friends with Local=any Remote=any
Fixes #13014.
2019-07-11 00:03:57 +02:00
Lennart Poettering
261e7d9270
Merge pull request #12755 from keszybz/short-identifiers
Allow using unit names in status messages
2019-07-11 00:00:51 +02:00
Lennart Poettering
08945b59d1
Merge pull request #12926 from keszybz/urlify-logs
Urlify CONFIG_FILE and improve SYSTEMD_LOG_LOCATION
2019-07-11 00:00:34 +02:00
Lennart Poettering
bdd0f4b6d1
Merge pull request #13009 from keszybz/efi-feature-xbootldr
sd-boot feature xbootldr
2019-07-11 00:00:12 +02:00
Lennart Poettering
6f209cb01d
Merge pull request #12965 from keszybz/auto-erase
_cleanup_(erase_and_freep)
2019-07-10 16:20:50 +02:00
Lennart Poettering
a082157282
Merge pull request #13005 from keszybz/fix-gcc-warning
Fix two gcc warnings
2019-07-10 16:20:31 +02:00
Lennart Poettering
afb7e1ceb9 tmpfiles: use log_syntax() for complaining about configuration file errors
In the light of #12926 I needed some log messages for testing. This
tmpfiles one came to mind, since it's frequently seen on typical Fedora
systems. Alas, they didn't actually use log_syntax, and thus weren't
recognizable by the new config file urlifaction code. Let's fix that.
2019-07-10 16:20:08 +02:00
Lennart Poettering
afacf3fc8a generator: downgrade Requires= → Wants= of fsck from /usr mount unit
Fixes #5099
2019-07-10 16:19:31 +02:00
Lennart Poettering
cbdc9cfe2b core: spaces rock 2019-07-10 16:19:31 +02:00
Yu Watanabe
f392c06566
Merge pull request #12863 from 1848/if_xfrm
Added support for xfrm interfaces
2019-07-10 23:04:49 +09:00
1848
b7700511ef Fixed condition checked twice 2019-07-10 23:02:24 +09:00
1848
98d20a17a9 Added support for xfrm interfaces 2019-07-10 23:02:19 +09:00
Zbigniew Jędrzejewski-Szmek
3a76fbe01c bootctl,sd-boot: define EFI_LOADER_FEATURE_XBOOTLDR
It was added back in fa2a3bbdd8, but we
forgot to add the feature define.
2019-07-10 15:02:33 +02:00
Zbigniew Jędrzejewski-Szmek
91b08bb00f boot,shared: share the definitions of EFI_LOADER_FEATURE macros
This means the the code needs to be kept compatible in the shared header,
but I think that still nicer than having two places to declare the same
things.

I added src/boot to -I, so that efi/foo.h needs to be used. This reduces
the potential for accidentally including the wrong header.
2019-07-10 14:59:48 +02:00
Lennart Poettering
ba40f0399e
Merge pull request #12939 from yuwata/lgtm-fixes
make LGTM quiet
2019-07-10 14:57:14 +02:00
Zbigniew Jędrzejewski-Szmek
b4f386d53b test-strv: test strv_free_erase() a little bit 2019-07-10 14:43:44 +02:00
Zbigniew Jędrzejewski-Szmek
309c6b19a7 Remove string_erase 2019-07-10 14:43:44 +02:00
Zbigniew Jędrzejewski-Szmek
79dc477f2f shared/logs-show: urlify CONFIG_FILE in verbose mode
Now all short-*, verbose, with-unit modes are handled. cat, export, json-* are
not, but those are usually used for post-processing, so I don't think it'd be
useful there.
2019-07-10 14:20:09 +02:00
Zbigniew Jędrzejewski-Szmek
76f7cc3fe4 shared/logs-show: urlify CONFIG_FILE in short mode
v2:
- check that the filename is terminated by ':', ' ', or EOS
- fix grep highlight overlap check
2019-07-10 14:19:26 +02:00
Zbigniew Jędrzejewski-Szmek
9ae4ef49cd Remove string_free_erase 2019-07-10 13:48:55 +02:00
Zbigniew Jędrzejewski-Szmek
2a8f53c67b Use unit->id instead of description in messages
v2:
- rename unit_identifier to unit_status_string
2019-07-10 13:35:26 +02:00
Zbigniew Jędrzejewski-Szmek
36cf45078c Add config and kernel commandline option to use short identifiers
No functional change, just docs and configuration and parsing.

v2:
- change ShortIdentifiers=yes|no to StatusUnitFormat=name|description.
2019-07-10 13:35:26 +02:00
Zbigniew Jędrzejewski-Szmek
c1d95b713a pid1: tiny simplification
v2:
- use empty_to_root()
2019-07-10 13:35:17 +02:00
Zbigniew Jędrzejewski-Szmek
e04df06f58 systemctl: allow "cat" on units with bad settings
That's precisely the state where 'cat' is particularly useful ;).
2019-07-10 12:32:52 +02:00
Yu Watanabe
e4443f9bfc network: fix memleak
set_put() does not return -EEXIST.

Fixes #12995 and oss-fuzz#15678.
2019-07-10 12:27:48 +02:00
Zbigniew Jędrzejewski-Szmek
c7dd209526 reply-password: define main through macro 2019-07-10 11:39:03 +02:00
Zbigniew Jędrzejewski-Szmek
e693a93235 Use _cleanup(free_and_erasep) where appropriate
Replaces #12959.
2019-07-10 11:39:03 +02:00
Zbigniew Jędrzejewski-Szmek
44c786f04a test: add _cleanup_(erase_and_freep)
Based on the macro and test case by Lennart Poettering and
Topi Miettinen suggestion.
2019-07-10 11:39:03 +02:00
Yu Watanabe
e2d5aab32a test-network: add tests for UseDNS= in [DHCP] section 2019-07-10 17:44:43 +09:00
Yu Watanabe
b6d587d1d2 test-network: enable systemd-resolved.service 2019-07-10 17:40:14 +09:00
Yu Watanabe
4f7331a85e network: rename [DHCP] section to [DHCPv4]
To keep the backward compatibility broken by the previous commit.
2019-07-10 17:33:09 +09:00
Zbigniew Jędrzejewski-Szmek
573e9a3310 networkd: silence bogus gcc warning about %s
Fixes #12931.

In file included from ../src/basic/macro.h:558,
                 from ../src/basic/alloc-util.h:9,
                 from ../src/network/networkd-link.c:7:
../src/network/networkd-link.c: In function ‘link_sysctl_ipv6_enabled’:
../src/basic/log.h:107:9: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  107 |         log_internal_realm(LOG_REALM_PLUS_LEVEL(LOG_REALM, (level)), __VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/shared/log-link.h:21:25: note: in expansion of macro ‘log_internal’
   21 |                         log_internal(level, error, _FILE_, __LINE__, __func__, ##__VA_ARGS__); \
      |                         ^~~~~~~~~~~~
../src/shared/log-link.h:33:50: note: in expansion of macro ‘log_link_full’
   33 | #define log_link_warning_errno(link, error, ...) log_link_full(link, LOG_WARNING, error, ##__VA_ARGS__)
      |                                                  ^~~~~~~~~~~~~
../src/network/networkd-link.c:83:24: note: in expansion of macro ‘log_link_warning_errno’
   83 |                 return log_link_warning_errno(link, r,
      |                        ^~~~~~~~~~~~~~~~~~~~~~
../src/network/networkd-link.c:84:77: note: format string is defined here
   84 |                                               "Failed to read net.ipv6.conf.%s.disable_ipv6 sysctl property: %m",
      |                                                                             ^~
cc1: some warnings being treated as errors
2019-07-10 10:32:39 +02:00
Zbigniew Jędrzejewski-Szmek
706fb34851 shared/dm-util: use strncpy_exact() to silence gcc
With gcc-9.1.1-2.fc31.x86_64 and -Doptimization=2:
../src/shared/dm-util.c: In function ‘dm_deferred_remove’:
../src/shared/dm-util.c:35:9: warning: ‘strncpy’ specified bound 128 equals destination size [-Wstringop-truncation]
   35 |         strncpy(dm.name, name, sizeof(dm.name));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc is plain wrong here, because we checked strlen(name) a few lines above, so
there can be no truncation and even the terminator always fits. But let's avoid
the warning.
2019-07-10 10:32:39 +02:00
Susant Sahani
caa8ca4286 networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options
Closes https://github.com/systemd/systemd/issues/12917
2019-07-10 16:59:29 +09:00
Evgeny Vereshchagin
f34635bcda fuzzbuzz: rename fuzz.yaml to fuzzbuzz.yaml
fuzz.yaml will stop working in a week
2019-07-10 05:11:52 +03:00
Dave Reisner
d8c72e87a0 importd: Avoid need for fd translation table
Make use of curl_multi_assign to associate each IO sd_event_source with
a CURL object. This means we always get passed the right event source
and don't need to worry about looking up the associated CURL object,
particularly in the case where the FD has been closed on a REMOVE event.
2019-07-09 10:00:13 +02:00
Yu Watanabe
593aee8f3c network: read sysctl value only once (#12990)
Follow-up for bafa964144.

When the value is changed, networkd needs to be restarted.
2019-07-09 09:56:50 +02:00
Yu Watanabe
8164e30603 util: fix sign-compare warning 2019-07-09 09:54:13 +02:00
Dan Streetman
abb9cc50af test/udev-test.pl: cleanup if skipping test
In Ubuntu CI, udev-test.pl is run from the debian/test/udev script,
in a test dir created for it; but udev-test.pl setup mounts a
dir, so if it doesn't cleanup/unmount before exiting, the test dir
autopkgtest created for it can't be removed, and autopkgtest
aborts the entire test suite, for example this output (from a
test run inside an armhf container):

autopkgtest [12:45:36]: test udev: [-----------------------
umount: test/tmpfs: no mount point specified.
mknod: test/tmpfs/dev/null: Operation not permitted
unable to create test/tmpfs/dev/null at ./udev-test.pl line 1611.
Failed to set up the environment, skipping the test at ./udev-test.pl line 1731.
autopkgtest [12:45:41]: test udev: -----------------------]
autopkgtest [12:45:44]: test udev:  - - - - - - - - - - results - - - - - - - - - -
udev                 FAIL non-zero exit status 77
rm: cannot remove '/tmp/autopkgtest.ocPFA6/autopkgtest_tmp/test/tmpfs': Device or resource busy
autopkgtest [12:46:22]: ERROR: "rm -rf /tmp/autopkgtest.ocPFA6/udev-artifacts /tmp/autopkgtest.ocPFA6/autopkgtest_tmp" failed with stderr "rm:
2019-07-09 14:54:34 +09:00
Evgeny Vereshchagin
869250e6b8
Merge pull request #12992 from mrc0mmand/test-functions-fixes
Various test/test-functions fixes/improvements
2019-07-09 02:27:39 +03:00
Zbigniew Jędrzejewski-Szmek
334c0979f3 pid1: fix serialization/deserialization of commmands with spaces
Fixes #12258.

This is enough to reproduce:
$ systemd-run bash -c 'sleep 10' && systemctl daemon-reload
would result in
Current command vanished from the unit file.

We would serialize as:
ExecStart 0 /usr/bin/bash /usr/bin/bash -c sleep 10000
which of course can't work.
Now we serialize as
ExecStart 0 /usr/bin/bash "/usr/bin/bash" "-c" "sleep 10".
2019-07-09 01:25:35 +02:00
Zbigniew Jędrzejewski-Szmek
cd132992bb nspawn: fix abort when we cannot execve
If execve failed, we would die in safe_close(), because master was already
closed by fdset_close_others() on line 3123. IIUC, we don't need to keep the
fd open after sending it, so let's just close it immediately.

Reproducer:
sudo build/systemd-nspawn -M rawhide fooooooo

Fixup for 3acc84ebd9.
2019-07-09 01:24:20 +02:00
Zbigniew Jędrzejewski-Szmek
5350df966a
Merge pull request #12972 from intelfx/cryptsetup-enable-libcryptsetup-debug
cryptsetup: properly handle libcryptsetup debug logging
2019-07-09 00:47:06 +02:00