platform/upstream/systemd.git
5 years agolibsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCK
Yu Watanabe [Sun, 11 Nov 2018 17:03:22 +0000 (02:03 +0900)]
libsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCK

5 years agofuzz: explicitly set initial value of global variables
Yu Watanabe [Sun, 11 Nov 2018 16:58:17 +0000 (01:58 +0900)]
fuzz: explicitly set initial value of global variables

5 years agofuzz: set SOCK_CLOEXEC and SOCK_NONBLOCK
Yu Watanabe [Sun, 11 Nov 2018 16:57:27 +0000 (01:57 +0900)]
fuzz: set SOCK_CLOEXEC and SOCK_NONBLOCK

5 years agofuzz: use SOCK_STREAM instead of SOCK_DGRAM
Yu Watanabe [Sun, 11 Nov 2018 16:56:08 +0000 (01:56 +0900)]
fuzz: use SOCK_STREAM instead of SOCK_DGRAM

Fixes oss-fuzz#10734.

5 years agofuzz: add testcase of already fixed issue 10908
Yu Watanabe [Sun, 11 Nov 2018 16:17:45 +0000 (01:17 +0900)]
fuzz: add testcase of already fixed issue 10908

5 years agoMerge pull request #10722 from yuwata/sd-device-monitor-change-arguments
Lennart Poettering [Sun, 11 Nov 2018 14:43:45 +0000 (15:43 +0100)]
Merge pull request #10722 from yuwata/sd-device-monitor-change-arguments

sd-device-monitor: slightly re-design API arguments

5 years agoMerge pull request #10723 from yuwata/fix-oss-fuzz-11345
Lennart Poettering [Sun, 11 Nov 2018 14:42:46 +0000 (15:42 +0100)]
Merge pull request #10723 from yuwata/fix-oss-fuzz-11345

network: add missing free() in network_free()

5 years agoMerge pull request #10726 from michaelolbrich/meson-fixes
Yu Watanabe [Sun, 11 Nov 2018 14:19:50 +0000 (23:19 +0900)]
Merge pull request #10726 from michaelolbrich/meson-fixes

Meson fixes

5 years agomeson: fix building with -Ddns-over-tls=false
Michael Olbrich [Sun, 11 Nov 2018 10:30:53 +0000 (11:30 +0100)]
meson: fix building with -Ddns-over-tls=false

Assigning multiple variables in one line is no valid meson syntax.
Without this running meson with -Ddns-over-tls=false fails with:

meson.build:1191:8: ERROR:  Tried to assign an invalid value to variable.

5 years agomeson: don't build fuzzers if tests are disabled
Michael Olbrich [Sun, 11 Nov 2018 10:27:35 +0000 (11:27 +0100)]
meson: don't build fuzzers if tests are disabled

Fuzzers are just special tests anyways and without this, building with
'-Dtests=false' fails with:

.../src/fuzz/fuzz-main.c:20: undefined reference to `test_setup_logging'

5 years agofuzz: add testcase of oss-fuzz#11345
Yu Watanabe [Sun, 11 Nov 2018 03:03:52 +0000 (12:03 +0900)]
fuzz: add testcase of oss-fuzz#11345

5 years agonetwork: use hashmap_free_with_destructor() in network_free()
Yu Watanabe [Sun, 11 Nov 2018 02:21:13 +0000 (11:21 +0900)]
network: use hashmap_free_with_destructor() in network_free()

5 years agonetwork: fix missing free() in network_free()
Yu Watanabe [Sun, 11 Nov 2018 02:20:51 +0000 (11:20 +0900)]
network: fix missing free() in network_free()

Fixes oss-fuzz#11345.

5 years agocore: log about /var/run/ prefix used in PIDFile=, patch it to be /run instead
Lennart Poettering [Fri, 9 Nov 2018 17:19:40 +0000 (18:19 +0100)]
core: log about /var/run/ prefix used in PIDFile=, patch it to be /run instead

In a way this is a follow-up for
a2d1fb882c4308bc10362d971f333c5031d60069, but adds a similar warning for
PIDFile=.

There's a much stronger case for doing this kind of notification in
tmpfiles.d (since it helps relating lines to each other for the purpose
of merging them). Doing this for PIDFile= is mostly about being
systematic and copying tmpfiles.d/ behaviour here.

While we are at it, let's also support relative filenames in PIDFile=
now, and prefix them with /run, to make them absolute.

Fixes: #10657

5 years agorandom-util: allow RDRAND to be used in 32-bit x86 binaries
Mike Gilbert [Thu, 8 Nov 2018 14:47:16 +0000 (09:47 -0500)]
random-util: allow RDRAND to be used in 32-bit x86 binaries

Rename rdrand64 to rdrand, and switch from uint64_t to unsigned long.
This produces code that will compile/assemble on both x86-64 and x86-32.

This could be useful when running a 32-bit copy of systemd on a modern
Intel processor.

RDRAND is inherently arch-specific, so relying on the compiler-defined
'long' type seems reasonable.

5 years agosd-device: drop priority and description from sd_device_monitor_attach_event() and...
Yu Watanabe [Sat, 10 Nov 2018 13:50:11 +0000 (22:50 +0900)]
sd-device: drop priority and description from sd_device_monitor_attach_event() and sd_device_monitor_start()

Now we have sd_device_monitor_get_event_soruce(). So, it is not
necessary to include these parameters in the functions for sd_device_monitor.

5 years agosd-device: add sd_device_monitor_get_event_source()
Yu Watanabe [Sat, 10 Nov 2018 13:13:07 +0000 (22:13 +0900)]
sd-device: add sd_device_monitor_get_event_source()

5 years agoMerge pull request #10717 from yuwata/fix-oss-fuzz-11324
Lennart Poettering [Sat, 10 Nov 2018 13:18:22 +0000 (14:18 +0100)]
Merge pull request #10717 from yuwata/fix-oss-fuzz-11324

network: add missing verification for ip6gretap and sit

5 years agosd-device: fix possible use of uninitialized value
Yu Watanabe [Sat, 10 Nov 2018 07:05:05 +0000 (16:05 +0900)]
sd-device: fix possible use of uninitialized value

5 years agoid128,analyze: fix layout of help message
Yu Watanabe [Sat, 10 Nov 2018 08:13:11 +0000 (17:13 +0900)]
id128,analyze: fix layout of help message

5 years agobasic: make rdrand64 a little bit more MSAn-friendly
Evgeny Vereshchagin [Sat, 10 Nov 2018 08:10:49 +0000 (09:10 +0100)]
basic: make rdrand64 a little bit more MSAn-friendly

MSan doesn't instrument inline asm calls so let's help it
by marking err as initialized manually.

Fixes: https://github.com/systemd/systemd/issues/10714.

5 years agofuzz: add testcase for oss-fuzz#11324
Yu Watanabe [Sat, 10 Nov 2018 06:38:35 +0000 (15:38 +0900)]
fuzz: add testcase for oss-fuzz#11324

5 years agonetwork: add missing verification for ip6gretap and sit
Yu Watanabe [Sat, 10 Nov 2018 06:35:56 +0000 (15:35 +0900)]
network: add missing verification for ip6gretap and sit

Fixes oss-fuzz#11324.

5 years agotravis: treat warnings as errors while building systemd
Evgeny Vereshchagin [Fri, 9 Nov 2018 23:45:00 +0000 (00:45 +0100)]
travis: treat warnings as errors while building systemd

5 years agoman: fix system.generator in systemd.unit
Michael Biebl [Fri, 9 Nov 2018 20:39:43 +0000 (21:39 +0100)]
man: fix system.generator in systemd.unit

Fixes: #10713

5 years agoMerge pull request #10306 from poettering/nspawn-ref-unref
Zbigniew Jędrzejewski-Szmek [Fri, 9 Nov 2018 19:49:31 +0000 (20:49 +0100)]
Merge pull request #10306 from poettering/nspawn-ref-unref

nspawn scope lifecycle fixes

5 years agoMerge pull request #10711 from poettering/sd-bus-close-man
Zbigniew Jędrzejewski-Szmek [Fri, 9 Nov 2018 19:46:45 +0000 (20:46 +0100)]
Merge pull request #10711 from poettering/sd-bus-close-man

sd-bus: add docs for a couple of sd-bus APIs

5 years agosd-path: drop redundant "= 0ULL" assignment in enum
Lennart Poettering [Sat, 6 Oct 2018 17:16:17 +0000 (19:16 +0200)]
sd-path: drop redundant "= 0ULL" assignment in enum

This has exactly zero effect as the type of an enum is not derived from
the integer types assigned to its items.

5 years agoTODO
Lennart Poettering [Mon, 8 Oct 2018 13:46:04 +0000 (15:46 +0200)]
TODO

5 years agocore: expose bus client names currently reffing a unit as property
Lennart Poettering [Mon, 8 Oct 2018 13:44:22 +0000 (15:44 +0200)]
core: expose bus client names currently reffing a unit as property

This is useful for debugging client-side ref counting of units: for each
ref taken on a unit the client's sender name is listed. If a client has
multiple refs on the same unit it is listed multiple times.

5 years agomachined: rework referencing of machine scopes from machined, too
Lennart Poettering [Sun, 7 Oct 2018 12:50:11 +0000 (14:50 +0200)]
machined: rework referencing of machine scopes from machined, too

When a machine scope is registered by machined, let's add a reference to
it, and change the GC mode so that the unit is cleaned up as soon as
machined drops the reference, regardless of the fail state.

Fixes: #2809

5 years agoman: document sd_bus_attach_event()
Lennart Poettering [Sat, 6 Oct 2018 18:31:17 +0000 (20:31 +0200)]
man: document sd_bus_attach_event()

5 years agoman: document sd_bus_flush_close_unref()
Lennart Poettering [Sat, 6 Oct 2018 17:15:57 +0000 (19:15 +0200)]
man: document sd_bus_flush_close_unref()

5 years agoman: document sd_bus_close() + sd_bus_flush()
Lennart Poettering [Sat, 6 Oct 2018 17:05:48 +0000 (19:05 +0200)]
man: document sd_bus_close() + sd_bus_flush()

5 years agonspawn: rework how we allocate/kill scopes
Lennart Poettering [Fri, 5 Oct 2018 20:56:40 +0000 (22:56 +0200)]
nspawn: rework how we allocate/kill scopes

Fixes: #6347

5 years agonspawn: merge two variable declaration lines
Lennart Poettering [Fri, 5 Oct 2018 20:56:20 +0000 (22:56 +0200)]
nspawn: merge two variable declaration lines

5 years agonspawn: simplify machine terminate bus call
Lennart Poettering [Fri, 5 Oct 2018 20:54:57 +0000 (22:54 +0200)]
nspawn: simplify machine terminate bus call

We have the machine name anyway, let's use TerminateMachine() on
machined's Manager object directly with it. That way it's a single
method call only, instead of two, to terminate the machine.

5 years agonspawn: make use of the new sd_bus_set_close_on_exit() call in nspawn
Lennart Poettering [Sat, 6 Oct 2018 16:45:58 +0000 (18:45 +0200)]
nspawn: make use of the new sd_bus_set_close_on_exit() call in nspawn

5 years agosd-bus: make "close+flush-on-exit" optional when using sd-event with sd-bus
Lennart Poettering [Sat, 6 Oct 2018 16:43:28 +0000 (18:43 +0200)]
sd-bus: make "close+flush-on-exit" optional when using sd-event with sd-bus

This adds a new pair of API calls sd_bus_set_close_on_exit() and
sd_bus_get_close_on_exit(). They control whether an sd_bus object
attached to a an sd-event loop shall automatically be flushed/closed
when the event loop goes down. Usually that's a good thing, except for
very few cases where the bus connection is longer living than the event
loop it is attached on. Specifically, this is the case for nspawn, where
we run the event loop only while the container is up, but afterwards
still want to be able to use the bus connection.

5 years agounit: enqueue cgroup empty check event if the last ref on a unit is dropped
Lennart Poettering [Fri, 5 Oct 2018 21:04:51 +0000 (23:04 +0200)]
unit: enqueue cgroup empty check event if the last ref on a unit is dropped

5 years agopid1: add a new AbandonScope() method call on the Manager object
Lennart Poettering [Fri, 5 Oct 2018 20:50:25 +0000 (22:50 +0200)]
pid1: add a new AbandonScope() method call on the Manager object

This is the same as Abandon() on the Scope object, but saves clients
from first translating a unit name into a unit object path. This logic
matches how all the other unit methods have counterparts on the Manager
object too (e.g. StopUnit() on the Manager object matching Stop() on the
Unit object), this one was simply forgotten so far.

5 years agotests: keep SYS_PTRACE when running under ASan
Frantisek Sumsal [Fri, 9 Nov 2018 11:47:30 +0000 (12:47 +0100)]
tests: keep SYS_PTRACE when running under ASan

5 years agoMerge pull request #10695 from yuwata/fuzz-network-fixes
Lennart Poettering [Fri, 9 Nov 2018 13:49:37 +0000 (14:49 +0100)]
Merge pull request #10695 from yuwata/fuzz-network-fixes

network: fix recent issues found by oss-fuzz

5 years agofuzz: add testcases of recent issues
Yu Watanabe [Fri, 9 Nov 2018 02:45:43 +0000 (11:45 +0900)]
fuzz: add testcases of recent issues

5 years agonetwork: fix potential segfault in network_free()
Yu Watanabe [Fri, 9 Nov 2018 02:43:50 +0000 (11:43 +0900)]
network: fix potential segfault in network_free()

5 years agonetwork: fix offset for IPv6MTUByte=
Yu Watanabe [Fri, 9 Nov 2018 02:42:11 +0000 (11:42 +0900)]
network: fix offset for IPv6MTUByte=

Fixes oss-fuzz#11302 and oss-fuzz#11314.

5 years agoMerge pull request #10678 from evverx/more-travis-tweaks
Evgeny Vereshchagin [Thu, 8 Nov 2018 22:43:57 +0000 (01:43 +0300)]
Merge pull request #10678 from evverx/more-travis-tweaks

travis: also rebuild everything with ASan and UBSan and install dependencies necessary for running parse-hwdb.py

5 years agocgroup: actually reset the cgroup invalidation mask after we made our changes
Lennart Poettering [Thu, 18 Oct 2018 08:02:00 +0000 (10:02 +0200)]
cgroup: actually reset the cgroup invalidation mask after we made our changes

Previously we never unmasked the mask after it was set once. Let's fix
that.

5 years agounit: replace three non-type-safe macros by type-safe inline functions
Lennart Poettering [Thu, 8 Nov 2018 11:27:39 +0000 (12:27 +0100)]
unit: replace three non-type-safe macros by type-safe inline functions

Behaviour is prett ymuch the same, but there's some additional type
checking done on the input parameters.

(In the case of UNIT_WRITE_FLAGS_NOOP() the C compiler won't actually do
the type checking necessarily, but static chckers at least could)

5 years agotravis: use 3 times the normal timeout when the tests are run under ASan+UBSan
Evgeny Vereshchagin [Thu, 8 Nov 2018 12:45:46 +0000 (13:45 +0100)]
travis: use 3 times the normal timeout when the tests are run under ASan+UBSan

5 years agotravis.yml: replace test-capability with a script exiting with 77
Evgeny Vereshchagin [Thu, 8 Nov 2018 12:40:56 +0000 (13:40 +0100)]
travis.yml: replace test-capability with a script exiting with 77

The test is currently failing when run under ASan in a docker container:
```
--- command ---
SYSTEMD_KBD_MODEL_MAP='/build/src/locale/kbd-model-map' PATH='/build/build:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' SYSTEMD_LANGUAGE_FALLBACK_MAP='/build/src/locale/language-fallback-map' /build/build/test-capability
--- stderr ---
have ambient caps: yes
Capabilities:= cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read+eip
Capabilities:= cap_dac_override,cap_net_raw+ep
==7021==LeakSanitizer has encountered a fatal error.
==7021==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==7021==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Assertion 'WIFEXITED(status) && WEXITSTATUS(status) == 0' failed at ../src/test/test-capability.c:71, function fork_test(). Aborting.
-------
```

https://api.travis-ci.org/v3/job/452349948/log.txt

5 years agotravis: run ASan job in parallel with the standard one
Frantisek Sumsal [Thu, 8 Nov 2018 11:47:07 +0000 (12:47 +0100)]
travis: run ASan job in parallel with the standard one

5 years agotravis: UBSan should be every C programmer's friend so let's build systemd with it too
Evgeny Vereshchagin [Thu, 8 Nov 2018 00:28:11 +0000 (01:28 +0100)]
travis: UBSan should be every C programmer's friend so let's build systemd with it too

5 years agotest: initialize hwdb so that the test won't try to free memory it has never allocated
Evgeny Vereshchagin [Wed, 7 Nov 2018 22:24:16 +0000 (23:24 +0100)]
test: initialize hwdb so that the test won't try to free memory it has never allocated

See https://github.com/systemd/systemd/pull/10678#issuecomment-436790906.

5 years agotravis: move the ASan part into a separate stage
Evgeny Vereshchagin [Wed, 7 Nov 2018 22:01:27 +0000 (23:01 +0100)]
travis: move the ASan part into a separate stage

5 years agotravis: also rebuild everything with ASan
Evgeny Vereshchagin [Wed, 7 Nov 2018 21:23:46 +0000 (22:23 +0100)]
travis: also rebuild everything with ASan

It should help to catch issues like https://github.com/systemd/systemd/issues/10677.

5 years agotravis: install dependencies necessary for running parse-hwdb.py
Evgeny Vereshchagin [Wed, 7 Nov 2018 21:17:51 +0000 (22:17 +0100)]
travis: install dependencies necessary for running parse-hwdb.py

5 years agoMerge pull request #10676 from poettering/rdrand-everywhere
Zbigniew Jędrzejewski-Szmek [Thu, 8 Nov 2018 12:33:02 +0000 (13:33 +0100)]
Merge pull request #10676 from poettering/rdrand-everywhere

prefer RDRAND over getrandom() and /dev/urandom when we don't need the very best randomness

5 years agoMerge pull request #10651 from yuwata/fix-10598
Lennart Poettering [Thu, 8 Nov 2018 11:36:06 +0000 (12:36 +0100)]
Merge pull request #10651 from yuwata/fix-10598

conf-parser: ignore trailing back-slash in comment

5 years agoMerge pull request #10687 from mrc0mmand/fix-test-capabilities
Lennart Poettering [Thu, 8 Nov 2018 11:35:39 +0000 (12:35 +0100)]
Merge pull request #10687 from mrc0mmand/fix-test-capabilities

Fix test-capability

5 years agotravis: drop the workaround for test-capability
Frantisek Sumsal [Thu, 8 Nov 2018 09:26:01 +0000 (10:26 +0100)]
travis: drop the workaround for test-capability

5 years agotests: drop the precondition check for inherited flag
Frantisek Sumsal [Thu, 8 Nov 2018 08:40:13 +0000 (09:40 +0100)]
tests: drop the precondition check for inherited flag

Docker's default capability set has the inherited flag already
set - that breaks tests which expect otherwise. Let's just
drop the check and run the test anyway.

Fixes #10663

5 years agocore/device: use LIST_FOREACH_AFTER() or friend
Yu Watanabe [Thu, 8 Nov 2018 04:02:45 +0000 (13:02 +0900)]
core/device: use LIST_FOREACH_AFTER() or friend

5 years agounit: make UNIT() cast function deal with NULL pointers
Lennart Poettering [Thu, 8 Nov 2018 08:33:31 +0000 (09:33 +0100)]
unit: make UNIT() cast function deal with NULL pointers

Fixes: #10681

5 years agoman: document the details of continuations and comments
Zbigniew Jędrzejewski-Szmek [Thu, 8 Nov 2018 08:36:52 +0000 (09:36 +0100)]
man: document the details of continuations and comments

5 years agoconf-parser: ignore trailing back-slash in comment
Yu Watanabe [Tue, 6 Nov 2018 04:22:09 +0000 (13:22 +0900)]
conf-parser: ignore trailing back-slash in comment

Fixes #10598.

5 years agorandom-util: optionally allow randomness to be generated via RDRAND
Lennart Poettering [Wed, 7 Nov 2018 18:46:18 +0000 (19:46 +0100)]
random-util: optionally allow randomness to be generated via RDRAND

We only use this when we don't require the best randomness. The primary
usecase for this is UUID generation, as this means we don't drain
randomness from the kernel pool for them. Since UUIDs are usually not
secrets RDRAND should be goot enough for them to avoid real-life
collisions.

5 years agorandom-util: introduce RANDOM_DONT_DRAIN
Lennart Poettering [Wed, 7 Nov 2018 18:31:39 +0000 (19:31 +0100)]
random-util: introduce RANDOM_DONT_DRAIN

Originally, the high_quality_required boolean argument controlled two
things: whether to extend any random data we successfully read with
pseudo-random data, and whether to return -ENODATA if we couldn't read
any data at all.

The boolean got replaced by RANDOM_EXTEND_WITH_PSEUDO, but this name
doesn't really cover the second part nicely. Moreover hiding both
changes of behaviour under a single flag is confusing. Hence, let's
split this part off under a new flag, and use it from random_bytes().

5 years agorandom-util: if zero random bytes are requested we can always fulfill the request
Lennart Poettering [Wed, 7 Nov 2018 18:14:47 +0000 (19:14 +0100)]
random-util: if zero random bytes are requested we can always fulfill the request

5 years agorandom-util: optionally enable blocking getrandom() behaviour
Lennart Poettering [Wed, 7 Nov 2018 18:04:04 +0000 (19:04 +0100)]
random-util: optionally enable blocking getrandom() behaviour

When generating the salt for the firstboot password logic, let's use
getrandom() blocking mode, and insist in the very best entropy.

5 years agorandom-util: change high_quality_required bool parameter into a flags parameter
Lennart Poettering [Wed, 7 Nov 2018 17:40:26 +0000 (18:40 +0100)]
random-util: change high_quality_required bool parameter into a flags parameter

No change in behaviour, just some refactoring.

5 years agorandom-util: fix indentation
Lennart Poettering [Wed, 7 Nov 2018 17:52:41 +0000 (18:52 +0100)]
random-util: fix indentation

5 years agorandom-util: handle if getrandom() returns 0
Lennart Poettering [Wed, 7 Nov 2018 17:37:13 +0000 (18:37 +0100)]
random-util: handle if getrandom() returns 0

This should normally not happen, but given that the man page suggests
something about this in the context of interruption, let's handle this
and propagate an I/O error.

5 years agorandom-util: rename acquire_random_bytes() → genuine_random_bytes()
Lennart Poettering [Wed, 7 Nov 2018 17:27:57 +0000 (18:27 +0100)]
random-util: rename acquire_random_bytes() → genuine_random_bytes()

It's more descriptive, since we also have a function random_bytes()
which sounds very similar.

Also rename pseudorandom_bytes() to pseudo_random_bytes(). This way the
two functions are nicely systematic, one returning genuine random bytes
and the other pseudo random ones.

5 years agoMerge pull request #10682 from yuwata/fix-oss-fuzz-network-issues
Lennart Poettering [Thu, 8 Nov 2018 08:37:35 +0000 (09:37 +0100)]
Merge pull request #10682 from yuwata/fix-oss-fuzz-network-issues

network: fix memleak

5 years agocore: introduce exec_params_clear()
Yu Watanabe [Thu, 8 Nov 2018 05:08:10 +0000 (14:08 +0900)]
core: introduce exec_params_clear()

Follow-up for 1ad6e8b302e87b6891a2bfc35ad397b0afe3d940.

Fixes #10677.

5 years agoman: Fix implicit dep info for timer units (#10679)
Matthew Leeds [Thu, 8 Nov 2018 03:41:06 +0000 (19:41 -0800)]
man: Fix implicit dep info for timer units (#10679)

This reorganizes the systemd.timer man page so that it doesn't claim
there are no implicit dependencies right after specifying the implicit
dependencies, and so that it matches the other man pages for units. This
fixes a mistake introduced by commit aed5cb03db.

5 years agofuzz: add a testcase for oss-fuzz#11285
Yu Watanabe [Thu, 8 Nov 2018 03:31:02 +0000 (12:31 +0900)]
fuzz: add a testcase for oss-fuzz#11285

5 years agonetwork: adds missing strv_free()
Yu Watanabe [Thu, 8 Nov 2018 03:30:00 +0000 (12:30 +0900)]
network: adds missing strv_free()

Fixes oss-fuzz#11285.

5 years agonetwork: make config_parse_radv_search_domains() log error in dns_name_apply_idna()
Yu Watanabe [Thu, 8 Nov 2018 03:29:38 +0000 (12:29 +0900)]
network: make config_parse_radv_search_domains() log error in dns_name_apply_idna()

5 years agofuzz: add more testcases of already fixed issue about multiple netdev kind
Yu Watanabe [Thu, 8 Nov 2018 03:15:09 +0000 (12:15 +0900)]
fuzz: add more testcases of already fixed issue about multiple netdev kind

This adds testcases of oss-fuzz#11286, oss-fuzz#11287, oss-fuzz#11296,
oss-fuzz#11297, and oss-fuzz#11299.

The issue was fixed by 62facba19ad645df7fb425ce170bdbda208b303c.

5 years agoMerge pull request #10670 from yuwata/oss-fuzz-netdev-fixes
Zbigniew Jędrzejewski-Szmek [Wed, 7 Nov 2018 18:31:31 +0000 (19:31 +0100)]
Merge pull request #10670 from yuwata/oss-fuzz-netdev-fixes

network: ignore multiple assignment of netdev kind

5 years agologind: fix compilation without utmp (#10674)
Steven Allen [Wed, 7 Nov 2018 16:29:21 +0000 (08:29 -0800)]
logind: fix compilation without utmp (#10674)

5 years agoask-password: improve log message when inotify limit is reached
Jan Synacek [Mon, 8 Oct 2018 13:14:38 +0000 (15:14 +0200)]
ask-password: improve log message when inotify limit is reached

When inotify_add_watch() fails because of the inotify limit, errno is
set to ENOSPC and then gets shown to users as "No space left on device".
That is very confusing and requires in-depth knowledge of the C library.
Therefore, show user-friendly message when inotify limit is reached.

Fixes #6030.

5 years agoMerge pull request #10594 from poettering/env-reload-fix
Zbigniew Jędrzejewski-Szmek [Wed, 7 Nov 2018 11:49:13 +0000 (12:49 +0100)]
Merge pull request #10594 from poettering/env-reload-fix

change handling of environment block of PID1's manager object

5 years agoMerge pull request #10610 from yuwata/udev-rules-cleanups
Zbigniew Jędrzejewski-Szmek [Wed, 7 Nov 2018 10:34:33 +0000 (11:34 +0100)]
Merge pull request #10610 from yuwata/udev-rules-cleanups

udev-rules: replace udev_device by sd_device

5 years agonetwork: drop unused members in Wireguard object
Yu Watanabe [Wed, 7 Nov 2018 09:14:11 +0000 (18:14 +0900)]
network: drop unused members in Wireguard object

5 years agofuzz: add testcases for oss-fuzz#11279 and #11280
Yu Watanabe [Wed, 7 Nov 2018 08:24:41 +0000 (17:24 +0900)]
fuzz: add testcases for oss-fuzz#11279 and #11280

5 years agonetwork: ignore multiple assignment of netdev kind
Yu Watanabe [Wed, 7 Nov 2018 08:21:41 +0000 (17:21 +0900)]
network: ignore multiple assignment of netdev kind

Fixes oss-fuzz#11279 and oss-fuzz#11280.

5 years agotest: missing "die"
Yu Watanabe [Wed, 7 Nov 2018 05:56:20 +0000 (14:56 +0900)]
test: missing "die"

Follow-up for a41ff38b0999fb83464309a29b8f39450b8d4b85.

5 years agoMerge pull request #10668 from evverx/travis-tweaks
Evgeny Vereshchagin [Wed, 7 Nov 2018 07:13:21 +0000 (10:13 +0300)]
Merge pull request #10668 from evverx/travis-tweaks

travis: build and run fuzzers against crash reproducers

5 years agotravis: show all commands when building systemd
Evgeny Vereshchagin [Wed, 7 Nov 2018 06:49:50 +0000 (07:49 +0100)]
travis: show all commands when building systemd

This should prevent Travis CI from terminating build jobs
that don't print anything for more than 10 minutes.

See https://travis-ci.org/systemd/systemd/builds/451737177.

5 years agotravis: build and run fuzzers against crash reproducers
Evgeny Vereshchagin [Wed, 7 Nov 2018 06:47:22 +0000 (07:47 +0100)]
travis: build and run fuzzers against crash reproducers

5 years agoin-addr-util: make in_addr_default_prefix_from_string() or friend set 0 to prefixlen...
Yu Watanabe [Wed, 7 Nov 2018 06:31:26 +0000 (15:31 +0900)]
in-addr-util: make in_addr_default_prefix_from_string() or friend set 0 to prefixlen when family == AF_INET6 (#10665)

Follow-up for a4798d4e6d88c2be2625ce62d8326eaa9b80f2ee.

Fixes #10662.

5 years agotest: replace udev_device by sd_device in test-udev
Yu Watanabe [Thu, 1 Nov 2018 13:58:42 +0000 (22:58 +0900)]
test: replace udev_device by sd_device in test-udev

5 years agoudevadm-test: replace udev_device by sd_device
Yu Watanabe [Thu, 1 Nov 2018 13:52:39 +0000 (22:52 +0900)]
udevadm-test: replace udev_device by sd_device

5 years agoudev-event: make udev_event_new() take sd_device instead of udev_device
Yu Watanabe [Mon, 29 Oct 2018 07:27:13 +0000 (16:27 +0900)]
udev-event: make udev_event_new() take sd_device instead of udev_device

5 years agoudev-rules: replace udev_device by sd_device in udev_rules_apply_to_event()
Yu Watanabe [Mon, 29 Oct 2018 07:15:07 +0000 (16:15 +0900)]
udev-rules: replace udev_device by sd_device in udev_rules_apply_to_event()

5 years agoudev-rules: replace two udev_list_entry_foreach() by corresponding FOREACH_DEVICE_...
Yu Watanabe [Mon, 29 Oct 2018 06:39:53 +0000 (15:39 +0900)]
udev-rules: replace two udev_list_entry_foreach() by corresponding FOREACH_DEVICE_*() macros

5 years agoudev-rules: use structured initializer
Yu Watanabe [Thu, 1 Nov 2018 13:30:43 +0000 (22:30 +0900)]
udev-rules: use structured initializer