platform/upstream/systemd.git
5 years agoenv-util: normalize one more flags enum
Lennart Poettering [Thu, 3 Jan 2019 11:18:47 +0000 (12:18 +0100)]
env-util: normalize one more flags enum

5 years agoMerge pull request #11327 from keszybz/revert-dbus-address
Lennart Poettering [Mon, 7 Jan 2019 15:14:07 +0000 (16:14 +0100)]
Merge pull request #11327 from keszybz/revert-dbus-address

Revert "pam_systemd: drop setting DBUS_SESSION_BUS_ADDRESS"

5 years agoMerge pull request #11252 from evverx/use-asan-wrapper-on-travis-ci
Frantisek Sumsal [Sun, 6 Jan 2019 17:48:38 +0000 (18:48 +0100)]
Merge pull request #11252 from evverx/use-asan-wrapper-on-travis-ci

travis: run PID1, journald and everything else under ASan+UBsan

5 years agoMerge pull request #11241 from bengal/lldp-802-3-subtypes
Lennart Poettering [Sun, 6 Jan 2019 17:15:51 +0000 (18:15 +0100)]
Merge pull request #11241 from bengal/lldp-802-3-subtypes

lldp: add 802.3 OUI subtype definitions

5 years agopam_systemd: set $DBUS_SESSION_BUS_ADDRESS unconditionally
Zbigniew Jędrzejewski-Szmek [Sun, 6 Jan 2019 16:37:00 +0000 (17:37 +0100)]
pam_systemd: set $DBUS_SESSION_BUS_ADDRESS unconditionally

There's very little lost if the variable is set for a socket that isn't
connectible, but a lot lost (races, ...) if it's not set but the socket exists.

Also, drop the FIXME note, since we don't plan to revert this revert any time
soon.

5 years agoMerge pull request #11328 from keszybz/static-array-size-declarations
Lennart Poettering [Sun, 6 Jan 2019 13:06:59 +0000 (14:06 +0100)]
Merge pull request #11328 from keszybz/static-array-size-declarations

Use a c99 feature for additional code analysis

5 years agoman: systemctl: document effect of --all on journal output
Lucas Werkmeister [Sat, 5 Jan 2019 14:41:31 +0000 (15:41 +0100)]
man: systemctl: document effect of --all on journal output

Based on the journalctl documentation of this option added in 23ad99b519
(#10527), but with the first reference to “fields” replaced by “journal
messages”, since I think it’s less common to show other fields with
`systemctl status` (though it’s possible with the `-o` option).

5 years agoPrint the systemd version in a format that dracut likes
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jan 2019 14:07:43 +0000 (15:07 +0100)]
Print the systemd version in a format that dracut likes

- systemd 240-63-g4199f68+
+ systemd 240 (240-63-g4199f68+)

Sad, but easy.

Fixes #11330.

5 years agoMerge pull request #11337 from keszybz/build-version-h
Lennart Poettering [Sun, 6 Jan 2019 12:55:10 +0000 (13:55 +0100)]
Merge pull request #11337 from keszybz/build-version-h

meson: declare version.h as dep for libbasic

5 years agoDisable tools/choose-default-locale.sh when cross compiling
James Hilliard [Sat, 5 Jan 2019 03:28:59 +0000 (11:28 +0800)]
Disable tools/choose-default-locale.sh when cross compiling

5 years agoRevert "meson: declare version.h as dep for fuzzers"
Zbigniew Jędrzejewski-Szmek [Sat, 5 Jan 2019 12:20:52 +0000 (13:20 +0100)]
Revert "meson: declare version.h as dep for fuzzers"

This reverts commit 0c2e93b863f8ec164e7e9e119ab127a752cb1331.

This should not be necessary anymore after previous commit.
I don't quite remember what sequence of steps was failing, but right now
"meson build -Dslow-tests=true && ninja -C build fuzzers" work fine.

5 years agomeson: declare version.h as dep for libbasic
Zbigniew Jędrzejewski-Szmek [Sat, 5 Jan 2019 12:20:37 +0000 (13:20 +0100)]
meson: declare version.h as dep for libbasic

"meson build && ninja -C build systemd-cat" would fail on missing version.h.

Fixes #11335.

5 years agoUse c99 static array size declarations in exported functions too
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jan 2019 11:37:10 +0000 (12:37 +0100)]
Use c99 static array size declarations in exported functions too

It seems quite useful to provide this additional information in public exported
functions.

This is a c99 feature, not supported in C++. Without the check in _sd-common.h:
FAILED: test-bus-vtable-cc@exe/src_libsystemd_sd-bus_test-bus-vtable-cc.cc.o
...
In file included from ../src/libsystemd/sd-bus/test-bus-vtable-cc.cc:9:
In file included from ../src/systemd/sd-bus-vtable.h:26:
In file included from ../src/systemd/sd-bus.h:26:
../src/systemd/sd-id128.h:38:47: error: static array size is a C99 feature, not permitted in C++
char *sd_id128_to_string(sd_id128_t id, char s[static SD_ID128_STRING_MAX]);
                                              ^

In .c files, I opted to use the define for consistency, even though we don't support
compilation with a C++ compiler, so the unconditional keyword would work too.

5 years agotree-wide: use c99 static for array size declarations
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jan 2019 11:30:45 +0000 (12:30 +0100)]
tree-wide: use c99 static for array size declarations

https://hamberg.no/erlend/posts/2013-02-18-static-array-indices.html

This only works with clang, unfortunately gcc doesn't seem to implement the check
(tested with gcc-8.2.1-5.fc29.x86_64).

Simulated error:
[2/3] Compiling C object 'systemd-nspawn@exe/src_nspawn_nspawn.c.o'.
../src/nspawn/nspawn.c:3179:45: warning: array argument is too small; contains 15 elements, callee requires at least 16 [-Warray-bounds]
                        candidate = (uid_t) siphash24(arg_machine, strlen(arg_machine), hash_key);
                                            ^                                           ~~~~~~~~
../src/basic/siphash24.h:24:64: note: callee declares array parameter as static here
uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[static 16]);
                                                               ^~~~~~~~~~~~

5 years agoRevert "pam_systemd: drop setting DBUS_SESSION_BUS_ADDRESS"
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jan 2019 10:19:10 +0000 (11:19 +0100)]
Revert "pam_systemd: drop setting DBUS_SESSION_BUS_ADDRESS"

This reverts commit 2b2b7228bffef626fe8e9f131095995f3d50ee3b.

Fixes #11293.

Removing the environment variable causes problems, e.g. Xfce and Chromium and
... don't communicate with the running dbus instance. If they attempt to start their
own instance, things become even more confusing. Those packages could be fixed
one by one, but removing the variable right now is causing too many problems.

5 years agoMerge pull request #11317 from filbranden/docs1
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jan 2019 17:38:57 +0000 (18:38 +0100)]
Merge pull request #11317 from filbranden/docs1

Improvements to systemd.io generation

5 years agoMerge pull request #11244 from yuwata/revert-udev-changes
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jan 2019 15:28:30 +0000 (16:28 +0100)]
Merge pull request #11244 from yuwata/revert-udev-changes

udev: revert bind/unbind patch and one more

5 years agoMerge pull request #11250 from yuwata/dhcp-coding-style-fixes
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jan 2019 14:12:12 +0000 (15:12 +0100)]
Merge pull request #11250 from yuwata/dhcp-coding-style-fixes

dhcp,network: trivial coding style fixes

5 years agolibudev-util: make util_replace_whitespace() read only len characters
Yu Watanabe [Tue, 25 Dec 2018 03:56:48 +0000 (12:56 +0900)]
libudev-util: make util_replace_whitespace() read only len characters

This effectively reverts df8ba4fa0e8be1ff7899d08a4b6be0196c8405a0.

Fixes #11264.

5 years agoPass separate dev_t var to device_path_parse_major_minor
YunQiang Su [Tue, 25 Dec 2018 11:01:17 +0000 (19:01 +0800)]
Pass separate dev_t var to device_path_parse_major_minor

MIPS/O32's st_rdev member of struct stat is unsigned long, which
is 32bit, while dev_t is defined as 64bit, which make some problems
in device_path_parse_major_minor.

Don't pass st.st_rdev, st_mode to device_path_parse_major_minor,
while pass 2 seperate variables. The result of stat is alos copied
out into these 2 variables. Fixes: #11247

5 years agoMerge pull request #11273 from pseyfert/zsh-debugger-completion
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jan 2019 14:00:26 +0000 (15:00 +0100)]
Merge pull request #11273 from pseyfert/zsh-debugger-completion

zsh/coredumpctl: additional completions

5 years agohwdb: Add Lenovo IdeaPad D330 accel mount matrix
howl [Tue, 25 Dec 2018 22:09:52 +0000 (23:09 +0100)]
hwdb: Add Lenovo IdeaPad D330 accel mount matrix

I have the fhd screen with pentium without lte model. Don't know if other models could differ in the accelerometer.

5 years agopo: update Italian translation
Daniele Medri [Wed, 2 Jan 2019 12:52:26 +0000 (13:52 +0100)]
po: update Italian translation

5 years agosleep: install default sleep.conf
Yu Watanabe [Wed, 2 Jan 2019 17:32:57 +0000 (02:32 +0900)]
sleep: install default sleep.conf

Closes #11310.

5 years agotest-json: check absolute and relative difference in floating point test
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 21:49:53 +0000 (22:49 +0100)]
test-json: check absolute and relative difference in floating point test

The test fails under valgrind, so there was an exception for valgrind.
Unfortunately that check only works when valgrind-devel headers are
available during build. But it is possible to have just valgrind installed,
or simply install it after the build, and then "valgrind test-json" would
fail.

It also seems that even without valgrind, this fails on some arm32 CPUs.
Let's do the usual-style test for absolute and relative differences.

5 years agoMerge pull request #11230 from keszybz/version-string-alt
Yu Watanabe [Thu, 3 Jan 2019 12:33:55 +0000 (21:33 +0900)]
Merge pull request #11230 from keszybz/version-string-alt

Generate version string from git describe (alternative approach)

5 years agoman: update color of journal logs in DEBUG level
Yu Watanabe [Wed, 2 Jan 2019 21:21:17 +0000 (06:21 +0900)]
man: update color of journal logs in DEBUG level

Fixes #11303.

5 years agocgroup: s/cgroups? ?v?([0-9])/cgroup v\1/gI
Chris Down [Wed, 2 Jan 2019 20:15:15 +0000 (20:15 +0000)]
cgroup: s/cgroups? ?v?([0-9])/cgroup v\1/gI

Nitpicky, but we've used a lot of random spacings and names in the past,
but we're trying to be completely consistent on "cgroup vN" now.

Generated by `fd -0 | xargs -0 -n1 sed -ri --follow-symlinks 's/cgroups?  ?v?([0-9])/cgroup v\1/gI'`.

I manually ignored places where it's not appropriate to replace (eg.
"cgroup2" fstype and in src/shared/linux).

5 years agoMerge pull request #11274 from yuwata/fix-11272
Yu Watanabe [Wed, 2 Jan 2019 23:29:26 +0000 (08:29 +0900)]
Merge pull request #11274 from yuwata/fix-11272

network: set link state configuring before setting addresses

5 years agodocs: generate index.md in Jekyll
Filipe Brandenburger [Wed, 2 Jan 2019 22:20:39 +0000 (14:20 -0800)]
docs: generate index.md in Jekyll

This uses a {% for %} loop in Jekyll to render the page, from the "title"
information in the Front Matter of the actual page files.

This also makes `make-index-md` build rule unnecessary, since generation is
done by the template engine itself.

Tested this by running Jekyll locally.

5 years agodocs: add a "front matter" snippet to our markdown pages
Filipe Brandenburger [Wed, 2 Jan 2019 22:16:34 +0000 (14:16 -0800)]
docs: add a "front matter" snippet to our markdown pages

It turns out Jekyll (the engine behind GitHub Pages) requires that pages
include a "Front Matter" snippet of YAML at the top for proper rendering.

Omitting it will still render the pages, but including it opens up new
possibilities, such as using a {% for %} loop to generate index.md instead of
requiring a separate script.

I'm hoping this will also fix the issue with some of the pages (notably
CODE_OF_CONDUCT.html) not being available under systemd.io

Tested locally by rendering the website with Jekyll. Before this change, the
*.md files were kept unchanged (so not sure how that even works?!), after this
commit, proper *.html files were generated from it.

5 years agoDocs: Add Missing Space Between Words
Alex Mayer [Wed, 2 Jan 2019 17:53:47 +0000 (12:53 -0500)]
Docs: Add Missing Space Between Words

5 years agotest-network: disable DNS function of dnsmasq
Yu Watanabe [Wed, 26 Dec 2018 22:31:26 +0000 (23:31 +0100)]
test-network: disable DNS function of dnsmasq

5 years agotest-network: drop unused variable
Yu Watanabe [Wed, 26 Dec 2018 22:30:35 +0000 (23:30 +0100)]
test-network: drop unused variable

5 years agotest: fix neighbor address
Yu Watanabe [Wed, 26 Dec 2018 22:16:20 +0000 (23:16 +0100)]
test: fix neighbor address

5 years agonetwork: set *_configured flags to false before requesting addresses or freinds
Yu Watanabe [Sun, 30 Dec 2018 13:08:10 +0000 (22:08 +0900)]
network: set *_configured flags to false before requesting addresses or freinds

Fixes #11272.

5 years agonetwork: rename link_set_routing_policy_rule() to link_request_set_routing_policy_rule()
Yu Watanabe [Sun, 30 Dec 2018 13:10:32 +0000 (22:10 +0900)]
network: rename link_set_routing_policy_rule() to link_request_set_routing_policy_rule()

For consistency to other functions.

5 years agonetwork: do not ignore errors on link_request_set_neighbors() and link_set_routing_po...
Yu Watanabe [Sun, 30 Dec 2018 13:07:23 +0000 (22:07 +0900)]
network: do not ignore errors on link_request_set_neighbors() and link_set_routing_policy()

5 years agoudevadm: add a workaround for dracut
Zbigniew Jędrzejewski-Szmek [Wed, 2 Jan 2019 09:26:16 +0000 (10:26 +0100)]
udevadm: add a workaround for dracut

Also add a comment, so we don't fall into the same trap again.

5 years agoMerge pull request #11291 from yuwata/fix-11259
Zbigniew Jędrzejewski-Szmek [Wed, 2 Jan 2019 08:36:01 +0000 (09:36 +0100)]
Merge pull request #11291 from yuwata/fix-11259

meson: check whether C.UTF-8 exists or not and use it if exists

5 years agohwdb/sdio.ids: add BCM43438 + minor rewording of class name
Burt P [Sun, 30 Dec 2018 03:49:49 +0000 (21:49 -0600)]
hwdb/sdio.ids: add BCM43438 + minor rewording of class name

* BCM43438 is used in the Raspberry Pi 3 B and B+
  https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
  "BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board"
* With this minor change to "C 00", each class name could be prefixed
  with "Is a" and still make sense.

Signed-off-by: Burt P <pburt0@gmail.com>
5 years agoMerge pull request #11297 from yuwata/fix-11295
Zbigniew Jędrzejewski-Szmek [Wed, 2 Jan 2019 07:19:27 +0000 (08:19 +0100)]
Merge pull request #11297 from yuwata/fix-11295

ask-password: fix assertion

5 years agotest: add test for sending/receiving an invalid device
Yu Watanabe [Sat, 22 Dec 2018 18:28:28 +0000 (03:28 +0900)]
test: add test for sending/receiving an invalid device

5 years agoRevert "udevd: configure a child process name for worker processes"
Yu Watanabe [Sat, 22 Dec 2018 10:49:47 +0000 (19:49 +0900)]
Revert "udevd: configure a child process name for worker processes"

This reverts commit 49f3ee7e74c714f55aab395c080b1099fc17f7fd.

5 years agoRevert "sd-device: ignore bind/unbind events for now"
Yu Watanabe [Tue, 1 Jan 2019 19:00:14 +0000 (04:00 +0900)]
Revert "sd-device: ignore bind/unbind events for now"

This reverts commit 56c886dc7ed5b2bb0882ba85136f4070545bfc1b.

Fixes #11277 and #11299.

5 years agomeson: check whether C.UTF-8 exists or not and use it if exists
Yu Watanabe [Sat, 29 Dec 2018 13:00:07 +0000 (22:00 +0900)]
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.

5 years agozsh/coredumpctl: don't print warnings from completion function
Paul Seyfert [Mon, 31 Dec 2018 20:27:09 +0000 (21:27 +0100)]
zsh/coredumpctl: don't print warnings from completion function

5 years agosd-device: fix segfault when error occurs in device_new_from_{nulstr,strv}()
Yu Watanabe [Sat, 22 Dec 2018 18:06:47 +0000 (03:06 +0900)]
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.

5 years agoask-password-api: do not call ask_password_keyring() if keyname == NULL
Yu Watanabe [Sun, 30 Dec 2018 12:13:43 +0000 (21:13 +0900)]
ask-password-api: do not call ask_password_keyring() if keyname == NULL

Fixes #11295.

5 years agoask-password: make ask_password_keyring() static
Yu Watanabe [Sun, 30 Dec 2018 12:09:41 +0000 (21:09 +0900)]
ask-password: make ask_password_keyring() static

5 years agoImprove kernel-install support for initrd files. (#11281)
ikelos [Sat, 29 Dec 2018 19:01:10 +0000 (19:01 +0000)]
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.

5 years agotests: introduce check_asan_reports and use it in check_result_{qemu|nspawn}
Evgeny Vereshchagin [Tue, 25 Dec 2018 07:31:50 +0000 (08:31 +0100)]
tests: introduce check_asan_reports and use it in check_result_{qemu|nspawn}

5 years agotests: look for ASan+UBSan reports in the journal
Evgeny Vereshchagin [Sun, 23 Dec 2018 14:48:18 +0000 (15:48 +0100)]
tests: look for ASan+UBSan reports in the journal

5 years agotests: double DefaultTimeoutStartSec when systemd is run under ASan+UBSan
Evgeny Vereshchagin [Tue, 25 Dec 2018 05:13:45 +0000 (06:13 +0100)]
tests: double DefaultTimeoutStartSec when systemd is run under ASan+UBSan

5 years agotravis: also run TEST-01-BASIC with QEMU to cover udevd and so on
Evgeny Vereshchagin [Tue, 25 Dec 2018 04:56:46 +0000 (05:56 +0100)]
travis: also run TEST-01-BASIC with QEMU to cover udevd and so on

5 years agotravis: pass $TRAVIS when running the tests so that they can be skipped properly
Evgeny Vereshchagin [Mon, 24 Dec 2018 03:44:47 +0000 (04:44 +0100)]
travis: pass $TRAVIS when running the tests so that they can be skipped properly

5 years agotravis: merge RUN_CLANG into RUN
Evgeny Vereshchagin [Mon, 24 Dec 2018 03:03:40 +0000 (04:03 +0100)]
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.

5 years agotests: overwrite a hard-coded timeout in systemd-hwdb-update.service
Evgeny Vereshchagin [Mon, 24 Dec 2018 00:15:43 +0000 (01:15 +0100)]
tests: overwrite a hard-coded timeout in systemd-hwdb-update.service

5 years agojournal: rely on _cleanup_free_ to free a temporary string used in client_context_rea...
Evgeny Vereshchagin [Sun, 23 Dec 2018 23:29:56 +0000 (00:29 +0100)]
journal: rely on _cleanup_free_ to free a temporary string used in client_context_read_cgroup

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

5 years agotests: fail if asan has found issues in journald
Evgeny Vereshchagin [Sun, 23 Dec 2018 14:30:41 +0000 (15:30 +0100)]
tests: fail if asan has found issues in journald

5 years agotests: reproduce https://github.com/systemd/systemd/issues/11251
Evgeny Vereshchagin [Sun, 23 Dec 2018 13:46:00 +0000 (14:46 +0100)]
tests: reproduce https://github.com/systemd/systemd/issues/11251

5 years agoMake default locale a compile time option
Dave Reisner [Fri, 28 Dec 2018 12:38:36 +0000 (07:38 -0500)]
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.

5 years agobuild: don't include shared's "serialize.h" in basic's "time-util.c"
Thomas Haller [Fri, 28 Dec 2018 16:14:01 +0000 (17:14 +0100)]
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.

5 years agoReplace 'older then' with 'older than'
Jani Uusitalo [Fri, 28 Dec 2018 18:35:46 +0000 (20:35 +0200)]
Replace 'older then' with 'older than'

5 years agoudev-event: do not read stdout or stderr if the pipefd is not created
Yu Watanabe [Tue, 25 Dec 2018 15:36:55 +0000 (00:36 +0900)]
udev-event: do not read stdout or stderr if the pipefd is not created

Fixes #11255.

5 years agoswitch-root: fix error message
Yu Watanabe [Tue, 25 Dec 2018 04:10:18 +0000 (13:10 +0900)]
switch-root: fix error message

Fixes #11261.

5 years agocore: free lines after reading them
Evgeny Vereshchagin [Sun, 23 Dec 2018 14:01:03 +0000 (15:01 +0100)]
core: free lines after reading them

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

5 years agoDo not start server if it is already runnning (#11245)
rogerjames99 [Fri, 28 Dec 2018 06:34:43 +0000 (06:34 +0000)]
Do not start server if it is already runnning (#11245)

5 years agomeson: use cross compilation compatible c++ check
James Hilliard [Thu, 27 Dec 2018 01:16:20 +0000 (09:16 +0800)]
meson: use cross compilation compatible c++ check

5 years agozsh/coredumpctl: offer --quiet
Paul Seyfert [Wed, 26 Dec 2018 13:02:06 +0000 (14:02 +0100)]
zsh/coredumpctl: offer --quiet

5 years agozsh/coredumpctl: offer --directory option
Paul Seyfert [Tue, 25 Dec 2018 21:57:23 +0000 (22:57 +0100)]
zsh/coredumpctl: offer --directory option

After `-D <TAB>` and `--directory=<TAB>` _directories is called to
suggest directories.

5 years agozsh/coredumpctl: complete argument for --debugger=
Paul Seyfert [Tue, 25 Dec 2018 18:30:50 +0000 (19:30 +0100)]
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.

5 years agotest: don't run TEST-01-BASIC in unprivileged containers on Travis CI
Evgeny Vereshchagin [Sun, 23 Dec 2018 13:28:01 +0000 (14:28 +0100)]
test: don't run TEST-01-BASIC in unprivileged containers on Travis CI

5 years agotests: use systemd-journald to check whether everything has been built with ASan
Evgeny Vereshchagin [Sun, 23 Dec 2018 13:12:20 +0000 (14:12 +0100)]
tests: use systemd-journald to check whether everything has been built with ASan

5 years agotravis: add another stage to really run everything under ASan+UBsan
Evgeny Vereshchagin [Sun, 23 Dec 2018 12:31:14 +0000 (13:31 +0100)]
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.

5 years agotravis: switch to Debian Testing
Evgeny Vereshchagin [Sun, 23 Dec 2018 12:01:41 +0000 (13:01 +0100)]
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.

5 years agotravis: skip test-bpf on Travis CI
Evgeny Vereshchagin [Sun, 23 Dec 2018 11:04:20 +0000 (12:04 +0100)]
travis: skip test-bpf on Travis CI

More generally IPAddress[Allow|Deny] are broken in docker and lxc containers.

5 years agotravis: use xenial instead of trusty
Evgeny Vereshchagin [Sun, 23 Dec 2018 10:10:06 +0000 (11:10 +0100)]
travis: use xenial instead of trusty

This should also fix an issue mentioned in
https://github.com/systemd/systemd/pull/11196#issuecomment-448123946.

5 years agonetwork: fix indentation
Yu Watanabe [Sat, 22 Dec 2018 22:59:54 +0000 (07:59 +0900)]
network: fix indentation

5 years agodhcp: drop unnecessary brackets
Yu Watanabe [Sat, 22 Dec 2018 22:59:20 +0000 (07:59 +0900)]
dhcp: drop unnecessary brackets

5 years agodhcp: use cast-to-bool for pointers
Yu Watanabe [Sat, 22 Dec 2018 22:58:58 +0000 (07:58 +0900)]
dhcp: use cast-to-bool for pointers

5 years agodhcp: fix indentation
Yu Watanabe [Sat, 22 Dec 2018 22:57:28 +0000 (07:57 +0900)]
dhcp: fix indentation

5 years agocore: support %j in unit dependency resolution
Patrick Williams [Thu, 20 Dec 2018 14:59:18 +0000 (08:59 -0600)]
core: support %j in unit dependency resolution

Commit 250e9fadbcc0ca90e697d7efb40855b054ed3b8f 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>
5 years agoNEWS: add one more name and adjust location v240
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 18:52:16 +0000 (19:52 +0100)]
NEWS: add one more name and adjust location

5 years agoMerge pull request #11239 from poettering/news-v240-final
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 18:49:54 +0000 (19:49 +0100)]
Merge pull request #11239 from poettering/news-v240-final

NEWS and build system bump for 240

5 years agotree-wide: use assert_se() for signal operations with constants
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 08:20:15 +0000 (09:20 +0100)]
tree-wide: use assert_se() for signal operations with constants

Continuation of a3ebe5eb620e49f0d24082876cafc7579261e64f:
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.

5 years agoMerge pull request #11206 from cdown/cgroup_no_v1
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 18:48:51 +0000 (19:48 +0100)]
Merge pull request #11206 from cdown/cgroup_no_v1

cgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all

5 years agosd-device: ignore bind/unbind events for now
Dmitry Torokhov [Sun, 9 Dec 2018 19:59:34 +0000 (11:59 -0800)]
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.

5 years agoRevert "sleep: offer hibernation only if the kernel image still exists"
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 10:01:34 +0000 (11:01 +0100)]
Revert "sleep: offer hibernation only if the kernel image still exists"

This reverts commit edda44605f06a41fb86b7ab8128dcf99161d2344.

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.

5 years agoMerge pull request #11050 from poettering/resolved-domain-route
Lennart Poettering [Fri, 21 Dec 2018 17:03:58 +0000 (18:03 +0100)]
Merge pull request #11050 from poettering/resolved-domain-route

resolved: beef up domain routing

5 years agoMerge pull request #11210 from thom311/dhcp-set-client-id-no-inval
Lennart Poettering [Fri, 21 Dec 2018 17:00:42 +0000 (18:00 +0100)]
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()

5 years agolldp: add 802.3 OUI subtype definitions
Beniamino Galvani [Fri, 21 Dec 2018 16:29:37 +0000 (17:29 +0100)]
lldp: add 802.3 OUI subtype definitions

5 years agolldp: fix references to IEEE standard
Beniamino Galvani [Fri, 21 Dec 2018 16:07:13 +0000 (17:07 +0100)]
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.

5 years agotree-wide: make new/new0/malloc_multiply/reallocarray safe for size 0
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 09:21:41 +0000 (10:21 +0100)]
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

5 years agoanalyze: add assert to verify we are not dividing by 0
Zbigniew Jędrzejewski-Szmek [Fri, 21 Dec 2018 07:20:41 +0000 (08:20 +0100)]
analyze: add assert to verify we are not dividing by 0

CID #1397051.

5 years agoudevadm: add two more assertions
Yu Watanabe [Fri, 21 Dec 2018 07:12:45 +0000 (16:12 +0900)]
udevadm: add two more assertions

Suggested by Coverity.

Closes CID#1397033 and CID#1395708.

5 years agoNEWS: prepare for v240
Lennart Poettering [Fri, 21 Dec 2018 14:02:11 +0000 (15:02 +0100)]
NEWS: prepare for v240

5 years agobuild-sys: bump package/library versions
Lennart Poettering [Fri, 21 Dec 2018 13:58:49 +0000 (14:58 +0100)]
build-sys: bump package/library versions

5 years agocgroup: Add NEWS entry for cgroup_no_v1=all implying unified usage
Chris Down [Fri, 21 Dec 2018 13:07:45 +0000 (13:07 +0000)]
cgroup: Add NEWS entry for cgroup_no_v1=all implying unified usage

5 years agocgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all
Chris Down [Wed, 19 Dec 2018 03:33:53 +0000 (03:33 +0000)]
cgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all

cgroup_no_v1=all doesn't make a whole lot of sense with legacy hierarchy
(where we use v1 hierarchy for everything), or hybrid hierarchy (where
we still use v1 hierarchy for resource control).

Right now we have to tell people to add both cgroup_no_v1=all and
systemd.unified_cgroup_hierarchy=1 to get the desired behaviour,
however in reality it's hard to imagine any situation where someone
passes cgroup_no_v1=all but *doesn't* want to use the unified cgroup
hierarchy.

Make it so that cgroup_no_v1=all produces intuitive behaviour in systemd
by default, although it can still be disabled by passing
systemd.unified_cgroup_hierarchy=0 explicitly.