Commit Graph

36316 Commits

Author SHA1 Message Date
Lennart Poettering 45313bd921
Merge pull request #10010 from msekletar/cryptsetup-generator-keydev-followups
cryptsetup-generator: keydev support - followups
2018-10-31 18:26:25 +01:00
Lennart Poettering e2d39e549f nspawn: add proper error message if setns() on network namespace fd fails
Addresses: https://github.com/systemd/systemd/pull/10589#issuecomment-434670595
2018-10-31 18:07:30 +01:00
Lennart Poettering 1ad6e8b302 core: split environment block mantained by PID 1's Manager object in two
This splits the "environment" field of Manager into two:
transient_environment and client_environment. The former is generated
from configuration file, kernel cmdline, environment generators. The
latter is the one the user can control with "systemctl set-environment"
and similar.

Both sets are merged transparently whenever needed. Separating the two
sets has the benefit that we can safely flush out the former while
keeping the latter during daemon reload cycles, so that env var settings
from env generators or configuration files do not accumulate, but
dynamic API changes are kept around.

Note that this change is not entirely transparent to users: if the user
first uses "set-environment" to override a transient variable, and then
uses "unset-environment" to unset it again things will revert to the
original transient variable now, while previously the variable was fully
removed. This change in behaviour should not matter too much though I
figure.

Fixes: #9972
2018-10-31 18:00:53 +01:00
Lennart Poettering bea1a01310 strv: wrap strv_new() in a macro so that NULL sentinel is implicit 2018-10-31 18:00:52 +01:00
Lennart Poettering fc03c53653
Merge pull request #10573 from faheel/master
Convert remaining docs to Markdown
2018-10-31 15:15:41 +01:00
welaq 9e97a15b5d l10n: Add Lithuanian translation (#10590)
Create lt.po
2018-10-31 14:53:46 +01:00
Yu Watanabe 7707a5e574 po: drop my copyright 2018-10-31 13:44:58 +01:00
Lennart Poettering 0aeff581cc
Merge pull request #10556 from yuwata/udev-event-cleanup-2
udev-event: several fixes for previous PR
2018-10-31 12:10:12 +01:00
Yu Watanabe 21486d9e99 network: also monitor udev 'change' event for network interfaces
If networkd starts earlier than all network interfaces are initialized,
then uninitialized interfaces are staying in pending state and cannot
become up.
With this, such interfaces are started after receiving 'change' event.
2018-10-31 12:08:34 +01:00
Joerg Behrmann 56ef8db9f5 core: apply WorkingDirectory after enforce_user
If WorkingDirectory is on NFS, root might only have the privileges of
nobody and the chdir to the WorkingDirectory might fail, even if the
user running the service would have the proper privileges to chdir to
that directory.

Fixes #10568
2018-10-31 12:07:24 +01:00
Alan Jenkins 0ba8987337 units: remove unused busnames.target
I found zero references to busnames.target, using git grep "busnames".
(And we do not install using a wildcard units/*.*.  There is no
busnames.target installed on my Fedora 28 system).
2018-10-31 11:44:03 +01:00
Yu Watanabe 12d1d3dfd1
Merge pull request #10586 from keszybz/more-copyright-and-license-cleanup
More copyright and license cleanup
2018-10-31 19:04:41 +09:00
Zbigniew Jędrzejewski-Szmek 9507f4ea61 po: drop duplicate "This file is distributed under..." lines
The header already says "LGPL-2.1+", so there is no need to repeat
the same thing more ambiguously.
2018-10-31 09:34:38 +01:00
Zbigniew Jędrzejewski-Szmek 2f5ed71556 Drop copyright for Marius Vollmer
Ack in #9320.
2018-10-31 09:34:38 +01:00
Zbigniew Jędrzejewski-Szmek 3728de04b3 Drop copyright for Piotr Drąg
Ack in #9320.

Also drop some lines with my name.
2018-10-31 09:34:29 +01:00
Muhammet Kara 7631257389 po: Update Turkish translation 2018-10-31 09:24:41 +01:00
Yu Watanabe fbd0aea17e dissect: do not store unused devnum 2018-10-31 09:29:51 +09:00
Yu Watanabe 4375dab58d udev-event: fix timeout log messages
Follow-up for e81c3a4c5f.
2018-10-31 09:29:51 +09:00
Yu Watanabe 7af1c7808b udev-event: do not store unused devnum 2018-10-31 09:29:51 +09:00
Yu Watanabe d4a95a952e udev-event: check whether device has devnum before calling udev_node_remove()
This fixes a bug in 'remove' event handling, which was introduced by
eb1f9e30ec, as 'devnum' variable may
not be initialized.
2018-10-31 09:29:51 +09:00
scootergrisen 5061dfa850 danish to Danish (#10584) 2018-10-31 09:10:06 +09:00
Piotr Drąg cc62b2c350 catalog: update Polish translation 2018-10-30 23:59:23 +01:00
Zbigniew Jędrzejewski-Szmek 230072a5da
Merge pull request #10569 from poettering/various-doc-fixes
various man page fixes
2018-10-30 23:55:39 +01:00
Faheel Ahmad eea984028f docs: Update links to updated docs 2018-10-30 23:01:20 +05:30
Insun fee04d7f3a core: don't drop timer expired but not yet processed when system date is changed
There is difference between time set by the user and real elapsed time because of accuracy feature.
If you change the system date(or time) between these times, the timer drops.

You can easily reproduce it with the following command.
-----------------------------------------------------------
$ systemd-run --on-active=3s ls; sleep 3; date -s "`date`"
-----------------------------------------------------------

In the following command, the problem is rarely reproduced. But it exists.
---------------------------------------------------------------------------------------------
$ systemd-run --on-active=3s --timer-property=AccuracySec=1us ls ; sleep 1; date -s "`date`"
---------------------------------------------------------------------------------------------

Note : Global AccuracySec value.
----------------------------------------------------------------------
$ cat /etc/systemd/system.conf
DefaultTimerAccuracySec=1min
----------------------------------------------------------------------
2018-10-30 15:38:45 +01:00
Lennart Poettering c1b785bb66
Merge pull request #10559 from yuwata/sd-device-prototype-change
sd-device: change prototype of sd_device_get_is_initialized()
2018-10-30 15:36:52 +01:00
Lennart Poettering e5b62c9bf1 man: document what "in-memory" units means
Fixes: #10338
2018-10-30 15:30:18 +01:00
Lennart Poettering ff5bd14bb4 man: document that "list-dependencies --reverse" is pretty incomplete
Fixes: #9681
2018-10-30 15:30:18 +01:00
Lennart Poettering 0e18724eb1 man: emphasize the ReadOnlyPaths= mount propagation "hole"
This changes the ProtectSystem= documentation to refer in more explicit
words to the restrictions of ReadOnlyPath=, as sugegsted in #9857.

THis also extends the paragraph in ReadOnlyPath= that explains the hole.

Fixes: #9857
2018-10-30 15:30:18 +01:00
Lennart Poettering d287820dec man: document that various sandboxing settings are not available in --user services
This is brief and doesn't go into detail, but should at least indicate
to those searching for it that some stuff is not available.

Fixes: #9870
2018-10-30 15:30:18 +01:00
Lennart Poettering 48e6dd3763 man: document relationship of .socket units and network namespaces
Fixes: #10018
2018-10-30 15:30:18 +01:00
Lennart Poettering 53bd20ea06 man: don't claim that AssertXYZ= expressions failing had an effect on unit state
In the documentation for ConditionXYZ= we claimed that AssertXYZ= would
have an effect on unit state (which is wrong), while at the
documentation for AssertXYZ= we said it only has an effect on the job,
but not the unit (which is right). Let's fix this contradiction, and
only claim the latter.

Also, fix a couple of other things (for example, stop talking about a
"failure state", but let's just expressly called it "the 'failed' state",
as that's the actual name of that state.

Finally, let's emphasize again when the conditions/assertions are
executed, and that they hence are not useful to conditionalize deps.

Fixes: #10433
2018-10-30 15:30:18 +01:00
Lennart Poettering 860cc6df6d man: document that "systemctl reset-failed" also reset the start limit counters
Fixes: #10529
2018-10-30 15:30:18 +01:00
Franck Bui 651b3b6c92 core: skip unit deserialization and move to the next one when unit_deserialize() fails
If unit_deserialize() fails (because one read line is overly long), it returns
an error and we would have assumed that the next read would point to the next
unit to deserialize.

But instead unit_deserialize() can leave the file offset in the middle of a
line.

Therefore we need to ignore and skip the current unit in this case too.

While at it, move unit deserialization in a dedicated functions. That should
make the code easier to read.
2018-10-30 14:52:13 +01:00
Lennart Poettering 8cb17a64c4
Merge pull request #10563 from keszybz/lz4-quickfix-quickfix
journal: adapt for new improved LZ4_decompress_safe_partial()
2018-10-30 14:51:55 +01:00
Faheel Ahmad 5a8a9dee1a docs: Convert HACKING to Markdown
Also fix minor grammatical errors
2018-10-30 15:58:58 +05:30
Faheel Ahmad 82143987b3 docs: Convert CODING_STYLE to Markdown
Also fix minor grammatical errors
2018-10-30 15:58:44 +05:30
Zbigniew Jędrzejewski-Szmek 029427043b fuzz-compress: add fuzzer for compression and decompression 2018-10-30 11:04:53 +01:00
Zbigniew Jędrzejewski-Szmek e41ef6fd00 journal: adapt for new improved LZ4_decompress_safe_partial()
With lz4 1.8.3, this function can now decompress partial results into a smaller
buffer. The release news don't say anything interesting, but the test case that
was previously failing now works OK.

Fixes #10259.

A test is added. It shows that with *older* lz4, a partial decompression can
occur with the returned size smaller then the requested number of bytes _and_
smaller then the size of the compressed data:

(lz4-libs-1.8.2-1.fc29.x86_64)
Compressed 4194304 → 16464
Decompressed → 4194304
Decompressed partial 12/4194304 → 4194304
Decompressed partial 1/1 → -2 (bad)
Decompressed partial 2/2 → -2 (bad)
Decompressed partial 3/3 → -2 (bad)
Decompressed partial 4/4 → -2 (bad)
Decompressed partial 5/5 → -2 (bad)
Decompressed partial 6/6 → 6 (good)
Decompressed partial 7/7 → 6 (good)
Decompressed partial 8/8 → 6 (good)
Decompressed partial 9/9 → 6 (good)
Decompressed partial 10/10 → 6 (good)
Decompressed partial 11/11 → 6 (good)
Decompressed partial 12/12 → 6 (good)
Decompressed partial 13/13 → 6 (good)
Decompressed partial 14/14 → 6 (good)
Decompressed partial 15/15 → 6 (good)
Decompressed partial 16/16 → 6 (good)
Decompressed partial 17/17 → 6 (good)
Decompressed partial 18/18 → -16459 (bad)

(lz4-libs-1.8.3-1.fc29.x86_64)
Compressed 4194304 → 16464
Decompressed → 4194304
Decompressed partial 12/4194304 → 12
Decompressed partial 1/1 → 1 (good)
Decompressed partial 2/2 → 2 (good)
Decompressed partial 3/3 → 3 (good)
Decompressed partial 4/4 → 4 (good)
...

If we got such a short "successful" decompression in decompress_startswith() as
implemented before this patch, we could be confused and return a false negative
result. But it turns out that this only occurs with small output buffer
sizes. We use greedy_realloc() to manager the buffer, so it is always at least
64 bytes. I couldn't hit a case where decompress_startswith() would actually
return a bogus result. But since the lack of proof is not conclusive, the code
for *older* lz4 is changed too, just to be safe. We cannot rule out that on a
different architecture or with some unlucky compressed string we could hit this
corner case.

The fallback code is guarded by a version check. The check uses a function not
the compile-time define, because there was no soversion bump in lz4 or new
symbols, and we could be compiled against a newer lz4 and linked at runtime
with an older one. (This happens routinely e.g. when somebody upgrades a subset
of distro packages.)
2018-10-30 11:04:51 +01:00
Bastien Nocera 0d1a2be93e hwdb: Apply the same quirk to all the lis3lv02d devices
HP laptops and desktop containing the lis3lv02d device (as supported by
the drivers/platform/x86/hp_accel.c driver) are supposed to output their
values according to their "standard" orientation, one that
corresponds to "can play neverball".

For all those devices, we need to convert that "neverball" orientation
to a "Windows 8" orientation. We will not accept quirks for HP machines
that use the lis3lv02d device, they should go in the hp_accel.c driver
instead.

Closes: #5160
2018-10-30 11:02:51 +01:00
Peter Hutterer af9a5a0c7c hwdb: add a click angle entry for the Logitech MX Anywhere 2s 2018-10-30 09:43:24 +01:00
Zbigniew Jędrzejewski-Szmek ba17efce44 test-compress: add test for short decompress_startswith calls
I thought this might fail with lz4 < 1.8.3, but it seems that because of
greedy_realloc, we always use a buffer that is large enough, and it always
passes.
2018-10-30 09:28:51 +01:00
Michal Sekletar 7949dfa73a cryptsetup-generator: allow whitespace characters in keydev specification
For example, <luks.uuid>=/keyfile:LABEL="KEYFILE FS" previously wouldn't
work, because we truncated label at the first whitespace character,
i.e. LABEL="KEYFILE".
2018-10-30 09:18:46 +01:00
Michal Sekletar 579875bc4a cryptsetup-generator: don't return error if target directory already exists 2018-10-30 09:02:34 +01:00
Yu Watanabe b9e7ea4841
Merge pull request #10564 from evverx/lldp-fuzzer
tests: add an lldp fuzzer
2018-10-30 07:54:20 +09:00
Zbigniew Jędrzejewski-Szmek e0a1d4b049 Drop support for lz4 < 1.3.0
lz4-r130 was released on May 29th, 2015. Let's drop the work-around for older
versions. In particular, we won't test any new code against those ancient
releases, so we shouldn't pretend they are supported.
2018-10-29 21:54:42 +01:00
dkg bb01aab6ef doc: spell initramfs properly (#10566) 2018-10-30 02:28:11 +09:00
Evgeny Vereshchagin 28ffcec2cb tests: add an lldp fuzzer
I went through my antique collection of fuzzers the other day
to see which ones I hadn't sent upstream yet. This one
seems to be nice to have and ready to be merged. As far as I can
tell, it hasn't managed to find anything useful yet,
but it's better to be safe than sorry especially when it comes to networking
code :-)
2018-10-29 15:24:16 +00:00
Evgeny Vereshchagin e0f768c356 journal: drop an unused variable clang is complaining about
../../src/systemd/src/journal/journal-file.c:3592:30: warning: unused variable 'p' [-Wunused-variable]
        _cleanup_free_ char *p = NULL;
                             ^
1 warning generated.

This is a follow-up to 6812765891.
2018-10-29 15:21:58 +00:00
TJ d1a7b5dd07 hwdb: Add Asus T300CHI accelerator matrix 2018-10-29 13:52:53 +01:00