1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

37867 Commits

Author SHA1 Message Date
Yu Watanabe
b261494128 Revert "sd-device: ignore bind/unbind events for now"
This reverts commit 56c886dc7e.

Fixes #11277 and #11299.
2019-01-02 04:00:14 +09:00
Yu Watanabe
03475e2232 meson: check whether C.UTF-8 exists or not and use it if exists
If C.UTF-8 does not exist, then fallback to en_US.UTF-8 or C.
2019-01-02 03:41:36 +09:00
Paul Seyfert
0e9ab1af64 zsh/coredumpctl: don't print warnings from completion function 2018-12-31 21:27:09 +01:00
Yu Watanabe
18fee12a2d sd-device: fix segfault when error occurs in device_new_from_{nulstr,strv}()
As devpath may not be set yet.

When debug logging is enabled, log_device_*() calls
sd_device_get_sysname(). So, we should not assume that devpath is always
set.

Fixes #11258.
2018-12-30 22:47:20 +09:00
Yu Watanabe
1f00998c87 ask-password-api: do not call ask_password_keyring() if keyname == NULL
Fixes #11295.
2018-12-30 21:13:47 +09:00
Yu Watanabe
8a111277c4 ask-password: make ask_password_keyring() static 2018-12-30 21:09:41 +09:00
ikelos
04ca4d191b Improve kernel-install support for initrd files. (#11281)
The current support in kernel-install for initrd images doesn't copy
over the initrd file or allow a means for it to be specified (it
requires a specific filename in a particular directory).

This patchset adds support for (optionally) providing the name of
initial ramdisk file to copied over and used by kernel-install.
2018-12-30 04:01:10 +09:00
Evgeny Vereshchagin
0d6e61d6a1 tests: introduce check_asan_reports and use it in check_result_{qemu|nspawn} 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
ed4f303f39 tests: look for ASan+UBSan reports in the journal 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
9688fccc27 tests: double DefaultTimeoutStartSec when systemd is run under ASan+UBSan 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
71cf890bcc travis: also run TEST-01-BASIC with QEMU to cover udevd and so on 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
c47bfb198a travis: pass $TRAVIS when running the tests so that they can be skipped properly 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
8934737154 travis: merge RUN_CLANG into RUN
They are basically the same except that a couple of environment variables
have to be passed for building systemd with clang.
2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
082bcdca2c tests: overwrite a hard-coded timeout in systemd-hwdb-update.service 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
ef30f7cac1 journal: rely on _cleanup_free_ to free a temporary string used in client_context_read_cgroup
Closes https://github.com/systemd/systemd/issues/11253.
2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
998445fd8a tests: fail if asan has found issues in journald 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin
7e11a95e41 tests: reproduce https://github.com/systemd/systemd/issues/11251 2018-12-29 19:14:28 +01:00
Dave Reisner
8ca9e92c74 Make default locale a compile time option
Default to a locale that's guaranteed to exist everywhere, but let
distros override this with something more exotic if they choose to.

Closes #11259.
2018-12-29 21:43:04 +09:00
Thomas Haller
911649fdd4 build: don't include shared's "serialize.h" in basic's "time-util.c"
"src/basic/time-util.c" is part of src/basic and should not include
"src/shared/serialize.h". It is one of the few cases where this
is done. Also, it's not even required.
2018-12-29 19:27:23 +09:00
Jani Uusitalo
ad7c65e6b8 Replace 'older then' with 'older than' 2018-12-28 14:32:14 -08:00
Yu Watanabe
adeb26c1af udev-event: do not read stdout or stderr if the pipefd is not created
Fixes #11255.
2018-12-28 12:51:40 +01:00
Yu Watanabe
a5c67ccc57 switch-root: fix error message
Fixes #11261.
2018-12-28 15:37:15 +09:00
Evgeny Vereshchagin
7334ade4a7 core: free lines after reading them
Closes https://github.com/systemd/systemd/issues/11251.
2018-12-28 15:36:00 +09:00
rogerjames99
7da7340afd Do not start server if it is already runnning (#11245) 2018-12-28 15:34:43 +09:00
James Hilliard
46e63a2a3e meson: use cross compilation compatible c++ check 2018-12-28 12:17:06 +09:00
Paul Seyfert
ffc7a6e931 zsh/coredumpctl: offer --quiet 2018-12-26 14:02:06 +01:00
Paul Seyfert
10dd7e746b zsh/coredumpctl: offer --directory option
After `-D <TAB>` and `--directory=<TAB>` _directories is called to
suggest directories.
2018-12-25 22:57:23 +01:00
Paul Seyfert
ddc052dc4e zsh/coredumpctl: complete argument for --debugger=
This way external commands (i.e. executables in the PATH) are suggested
at --debugger=<TAB>. Upon starting a path (e.g. --debugger=/<TAB> or
--debugger=./<TAB>), filenames of executables are completed.
2018-12-25 19:30:50 +01:00
Evgeny Vereshchagin
9103671d7c test: don't run TEST-01-BASIC in unprivileged containers on Travis CI 2018-12-24 08:52:33 +01:00
Evgeny Vereshchagin
b4a450d85f tests: use systemd-journald to check whether everything has been built with ASan 2018-12-24 08:52:33 +01:00
Evgeny Vereshchagin
1766204279 travis: add another stage to really run everything under ASan+UBsan
This should help to catch issues like https://github.com/systemd/systemd/issues/11253
and https://github.com/systemd/systemd/issues/11251.
2018-12-24 08:52:33 +01:00
Evgeny Vereshchagin
749d3c938f travis: switch to Debian Testing
Turns out Fedora is the least stable distribution in terms of
downloading packages. Debian is much more stable so let's use it.
2018-12-24 08:52:09 +01:00
Evgeny Vereshchagin
f9cf349147 travis: skip test-bpf on Travis CI
More generally IPAddress[Allow|Deny] are broken in docker and lxc containers.
2018-12-24 08:49:17 +01:00
Evgeny Vereshchagin
b635e4ef6b travis: use xenial instead of trusty
This should also fix an issue mentioned in
https://github.com/systemd/systemd/pull/11196#issuecomment-448123946.
2018-12-23 11:14:20 +01:00
Yu Watanabe
89b3fa6626 network: fix indentation 2018-12-23 08:00:59 +09:00
Yu Watanabe
e4a0fe6343 dhcp: drop unnecessary brackets 2018-12-23 08:00:59 +09:00
Yu Watanabe
da3c49e9a8 dhcp: use cast-to-bool for pointers 2018-12-23 08:00:59 +09:00
Yu Watanabe
759248856c dhcp: fix indentation 2018-12-23 08:00:59 +09:00
Patrick Williams
8eab766804 core: support %j in unit dependency resolution
Commit 250e9fadbc introduced
support for %j/%J specifier in unit files.  The function
unit_name_printf is used in unit dependency resolution,
such as Wants / After directives, but was missing support
for the %j.  Add to allow directives such as:

    [Unit]
    Wants=bar-%j.target

Fixes: systemd/systemd#11217
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2018-12-22 17:21:13 +09:00
Zbigniew Jędrzejewski-Szmek
1742aae2aa NEWS: add one more name and adjust location 2018-12-21 19:53:33 +01:00
Zbigniew Jędrzejewski-Szmek
1a2397e985
Merge pull request #11239 from poettering/news-v240-final
NEWS and build system bump for 240
2018-12-21 19:49:54 +01:00
Zbigniew Jędrzejewski-Szmek
cd2a429ed7 tree-wide: use assert_se() for signal operations with constants
Continuation of a3ebe5eb62:
in other places we sometimes use assert_se(), and sometimes normal error
handling. sigfillset and sigaddset can only fail if mask is NULL (which cannot
happen if we are passing in a reference), or if the signal number is invalid
(which really shouldn't happen when we are using a constant like SIGCHLD. If
SIGCHLD is invalid, we have a bigger problem). So let's simplify things and
always use assert_se() in those cases.

In sigset_add_many() we could conceivably pass an invalid signal, so let's keep
normal error handling here. The caller can do assert_se() around the
sigprocmask_many() call if appropriate.

'>= 0' is used for consistency with the rest of the codebase.
2018-12-21 19:49:28 +01:00
Zbigniew Jędrzejewski-Szmek
9d6e839ed8
Merge pull request #11206 from cdown/cgroup_no_v1
cgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all
2018-12-21 19:48:51 +01:00
Dmitry Torokhov
56c886dc7e sd-device: ignore bind/unbind events for now
Until systemd/udev are ready for the new events and do not flush entire
device state on each new event received, we should ignore them.
2018-12-21 19:48:13 +01:00
Zbigniew Jędrzejewski-Szmek
8340b762e4 Revert "sleep: offer hibernation only if the kernel image still exists"
This reverts commit edda44605f.

The kernel explicitly supports resuming with a different kernel than the one
used before hibernation. If this is something that shouldn't be supported, the
place to change this is in the kernel. We shouldn't censor something that this
exclusively in the kernel's domain.

People might be using this to switch kernels without restaring programs, and
we'd break this functionality for them.

Also, even if resuming with a different kernel was a bad idea, we don't really
prevent that with this check, since most users have more than one kernel and
can freely pick a different one from the menu. So this only affected the corner
case where the kernel has been removed, but there is no reason to single it
out.
2018-12-21 18:23:17 +01:00
Lennart Poettering
44f52cce9e
Merge pull request #11050 from poettering/resolved-domain-route
resolved: beef up domain routing
2018-12-21 18:03:58 +01:00
Lennart Poettering
5848a9eb4d
Merge pull request #11210 from thom311/dhcp-set-client-id-no-inval
dhcp: don't enforce hardware address length for sd_dhcp_client_set_client_id()
2018-12-21 18:00:42 +01:00
Beniamino Galvani
dc8dc0cf8a lldp: add 802.3 OUI subtype definitions 2018-12-21 17:30:01 +01:00
Beniamino Galvani
e6a92d5ea0 lldp: fix references to IEEE standard
It's 802.1AB, not 802.3AB. Also, the clause numbers referenced the old 2005
standard superseded by one from 2009.
2018-12-21 17:09:44 +01:00
Zbigniew Jędrzejewski-Szmek
830464c3e4 tree-wide: make new/new0/malloc_multiply/reallocarray safe for size 0
All underlying glibc calls are free to return NULL if the size argument
is 0. We most often call those functions with a fixed argument, or at least
something which obviously cannot be zero, but it's too easy to forget.

E.g. coverity complains about "rows = new0(JsonVariant*, n_rows-1);" in
format-table.c There is an assert that n_rows > 0, so we could hit this
corner case here. Let's simplify callers and make those functions "safe".

CID #1397035.

The compiler is mostly able to optimize this away:
$ size build{,-opt}/src/shared/libsystemd-shared-239.so
(before)
   text	   data	    bss	    dec	    hex	filename
2643329	 580940	   3112	3227381	 313ef5	build/src/shared/libsystemd-shared-239.so     (-O0 -g)
2170013	 578588	   3089	2751690	 29fcca	build-opt/src/shared/libsystemd-shared-239.so (-03 -flto -g)
(after)
   text	   data	    bss	    dec	    hex	filename
2644017	 580940	   3112	3228069	 3141a5	build/src/shared/libsystemd-shared-239.so
2170765	 578588	   3057	2752410	 29ff9a	build-opt/src/shared/libsystemd-shared-239.so
2018-12-21 16:39:34 +01:00