Lennart Poettering
2c57597745
tmpfiles: 'D' doesn't do globs for creation, shouldn't do for removal either
2018-11-08 09:52:16 +01:00
Lennart Poettering
64adb37968
tmpfiles: always remove/clean-up before creating
...
Let's always clean the platform before we build something new.
Fixes : #9508
2018-11-08 09:52:16 +01:00
Lennart Poettering
21af33863f
tmpfiles: log when we skip an entry due to autofs
2018-11-08 09:52:16 +01:00
Lennart Poettering
811a158778
tmpfiles: create parents before children, but remove children before parents
...
Previously, we'd always process parents before children. With this
change we are a bit more careful and create parents before children but
clean up children before parents.
The "done" boolean by item is replaced by a mask so that we can descent
and ascend for the right operations only.
See: #9508
2018-11-08 09:52:16 +01:00
Lennart Poettering
133bbca42e
tmpfiles: no need to set zero initialization of first enum value
2018-11-08 09:52:16 +01:00
Lennart Poettering
599ebe29a3
tmpfiles: instead of accessing global 'arg_operation' pass it through the stack
...
Just some refactoring, no change in behaviour.
2018-11-08 09:52:16 +01:00
Lennart Poettering
1a967b6bb1
tmpfiles: replace the three arg_create/arg_remove/arg_clean booleans with a single bitmask
...
No change in behaviour, just a bit of refactoring.
2018-11-08 09:52:16 +01:00
Lennart Poettering
ccd114f0f9
tmpfiles: fix minor memory leak on error path
2018-11-08 09:52:16 +01:00
Lennart Poettering
81fa4479f8
tmpfiles: use free_and_replace() where appropriate
2018-11-08 09:52:16 +01:00
Lennart Poettering
7ab7529d45
tmpfiles: why memset() and memcpy() if we have '=' and structured initialization?
2018-11-08 09:52:16 +01:00
Lennart Poettering
96d10d7837
tmpfiles: rename "count" → "n_items"
...
"count" is so very generic. Let's follow our usual naming logic here,
and rename this to "n_items", to make clear what we count here.
2018-11-08 09:52:16 +01:00
Lennart Poettering
647687141a
tmpfiles: rename second parameter to GREEDY_REALLOC() 'allocated'
...
We pretty much always name it like that, and it is very descriptive,
hence let's stick to that nomenclature here.
2018-11-08 09:52:16 +01:00
Lennart Poettering
ae1940d294
btrfs-util: before deleting a subvol check that it is one
...
This has the benefit that we can return ENOTTY rather than EPERM if we
are attempting to delete a subvol and don't have the privs to.
2018-11-08 09:52:16 +01:00
Lennart Poettering
cc83d5197c
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.
2018-11-08 09:44:27 +01:00
Lennart Poettering
6fb6f13896
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().
2018-11-08 09:44:27 +01:00
Lennart Poettering
776cf7461f
random-util: if zero random bytes are requested we can always fulfill the request
2018-11-08 09:44:27 +01:00
Lennart Poettering
68534345b8
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.
2018-11-08 09:44:27 +01:00
Lennart Poettering
94d457e8d9
random-util: change high_quality_required bool parameter into a flags parameter
...
No change in behaviour, just some refactoring.
2018-11-08 09:44:27 +01:00
Lennart Poettering
afff8f16ae
random-util: fix indentation
2018-11-08 09:44:27 +01:00
Lennart Poettering
d68ccc0841
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.
2018-11-08 09:44:27 +01:00
Lennart Poettering
3335dc2d75
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.
2018-11-08 09:44:27 +01:00
Lennart Poettering
8d2411f693
Merge pull request #10682 from yuwata/fix-oss-fuzz-network-issues
...
network: fix memleak
2018-11-08 09:37:35 +01:00
Yu Watanabe
b9c04eafb8
core: introduce exec_params_clear()
...
Follow-up for 1ad6e8b302 .
Fixes #10677 .
2018-11-08 09:36:37 +01:00
Matthew Leeds
0ccc48b5b8
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 .
2018-11-08 12:41:06 +09:00
Yu Watanabe
d571998498
fuzz: add a testcase for oss-fuzz#11285
2018-11-08 12:31:02 +09:00
Yu Watanabe
28c3428df0
network: adds missing strv_free()
...
Fixes oss-fuzz#11285.
2018-11-08 12:30:03 +09:00
Yu Watanabe
7a99f98b50
network: make config_parse_radv_search_domains() log error in dns_name_apply_idna()
2018-11-08 12:29:38 +09:00
Yu Watanabe
9f7d3db3ed
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 62facba19a .
2018-11-08 12:16:13 +09:00
Zbigniew Jędrzejewski-Szmek
e1b2d44366
Merge pull request #10670 from yuwata/oss-fuzz-netdev-fixes
...
network: ignore multiple assignment of netdev kind
2018-11-07 19:31:31 +01:00
Steven Allen
86cf4554ef
logind: fix compilation without utmp ( #10674 )
2018-11-07 17:29:21 +01:00
Jan Synacek
1432d2dbdf
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 .
2018-11-07 15:48:43 +01:00
Zbigniew Jędrzejewski-Szmek
e44c5a3ba6
Merge pull request #10594 from poettering/env-reload-fix
...
change handling of environment block of PID1's manager object
2018-11-07 12:49:13 +01:00
Zbigniew Jędrzejewski-Szmek
e67813dde0
Merge pull request #10610 from yuwata/udev-rules-cleanups
...
udev-rules: replace udev_device by sd_device
2018-11-07 11:34:33 +01:00
Yu Watanabe
1909e9f11d
network: drop unused members in Wireguard object
2018-11-07 18:14:11 +09:00
Yu Watanabe
348784e62a
fuzz: add testcases for oss-fuzz#11279 and #11280
2018-11-07 17:24:41 +09:00
Yu Watanabe
62facba19a
network: ignore multiple assignment of netdev kind
...
Fixes oss-fuzz#11279 and oss-fuzz#11280.
2018-11-07 17:23:50 +09:00
Yu Watanabe
11d93952ea
test: missing "die"
...
Follow-up for a41ff38b09 .
2018-11-07 08:57:28 +01:00
Evgeny Vereshchagin
44f7190c2d
Merge pull request #10668 from evverx/travis-tweaks
...
travis: build and run fuzzers against crash reproducers
2018-11-07 10:13:21 +03:00
Evgeny Vereshchagin
eeec5f2a69
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 .
2018-11-07 07:49:50 +01:00
Evgeny Vereshchagin
b9abc93558
travis: build and run fuzzers against crash reproducers
2018-11-07 07:47:22 +01:00
Yu Watanabe
c6d8bbb66e
in-addr-util: make in_addr_default_prefix_from_string() or friend set 0 to prefixlen when family == AF_INET6 ( #10665 )
...
Follow-up for a4798d4e6d .
Fixes #10662 .
2018-11-07 15:31:26 +09:00
Yu Watanabe
b74a0b6ae7
test: replace udev_device by sd_device in test-udev
2018-11-07 13:35:03 +09:00
Yu Watanabe
77ad202c72
udevadm-test: replace udev_device by sd_device
2018-11-07 13:35:03 +09:00
Yu Watanabe
cf28ad4689
udev-event: make udev_event_new() take sd_device instead of udev_device
2018-11-07 13:35:03 +09:00
Yu Watanabe
cf697ec00e
udev-rules: replace udev_device by sd_device in udev_rules_apply_to_event()
2018-11-07 13:35:03 +09:00
Yu Watanabe
dbea7f24d2
udev-rules: replace two udev_list_entry_foreach() by corresponding FOREACH_DEVICE_*() macros
2018-11-07 13:35:03 +09:00
Yu Watanabe
1017d66bf5
udev-rules: use structured initializer
2018-11-07 13:35:03 +09:00
Yu Watanabe
92b80c6baa
udev-rules: drop unused member file_list in struct udev_rules
2018-11-07 13:35:03 +09:00
Yu Watanabe
1ce7fecb4f
udev-rules: make import_parent_into_properties() take sd_device
2018-11-07 13:35:03 +09:00
Yu Watanabe
13c7b75f2f
udev-rules: make import_file_into_properties() take sd_device
2018-11-07 13:35:03 +09:00