]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 years agoMerge pull request #6917 from keszybz/restore-some-tests
Lennart Poettering [Tue, 26 Sep 2017 14:00:28 +0000 (16:00 +0200)] 
Merge pull request #6917 from keszybz/restore-some-tests

Restore some tests

6 years agotest-cpu-set-util.c: fix typo in comment (#6916)
Jan Synacek [Tue, 26 Sep 2017 11:50:31 +0000 (13:50 +0200)] 
test-cpu-set-util.c: fix typo in comment (#6916)

6 years agomeson: hook up hwdb-test.sh again 6917/head
Zbigniew Jędrzejewski-Szmek [Tue, 26 Sep 2017 11:44:04 +0000 (13:44 +0200)] 
meson: hook up hwdb-test.sh again

The motivation for the ./systemd-hwdb is the same as in the grandparent
for systemd-sysv-generator.

6 years agomeson: hook up udev-test.pl again
Zbigniew Jędrzejewski-Szmek [Tue, 26 Sep 2017 11:39:43 +0000 (13:39 +0200)] 
meson: hook up udev-test.pl again

Seems it was dropped along with the automake rules in
72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8.

6 years agosysv-generator-test: do not query $builddir
Zbigniew Jędrzejewski-Szmek [Tue, 26 Sep 2017 11:34:55 +0000 (13:34 +0200)] 
sysv-generator-test: do not query $builddir

This variable is not set by meson, so let's not try to use it.

We could use some more elaborate scheme (e.g. based on $MESON_BUILD_ROOT and
$MESON_SUBDIR) to find the path to systemd-sysv-generator, but it seems
that plain ./systemd-sysv-generator works just as well and has the advantage
that it's easy to invoke the test by hand (as long as one cd's to the
meson build dir).

6 years agosysv-generator-test: drop python2 work-around
Zbigniew Jędrzejewski-Szmek [Tue, 26 Sep 2017 09:59:08 +0000 (11:59 +0200)] 
sysv-generator-test: drop python2 work-around

We require python3 for meson anyway, so support python2 doesn't seem
useful anymore.

6 years agojournal-verfiy: add a couple of missing le64toh() calls (#6888)
Lennart Poettering [Mon, 25 Sep 2017 20:26:10 +0000 (22:26 +0200)] 
journal-verfiy: add a couple of missing le64toh() calls (#6888)

Apparently BE users don't verify their journals...

Noticed as result of #6887

6 years agostring-util: use size_t for strjoina macro (#6914)
Jonathan Lebon [Mon, 25 Sep 2017 19:56:57 +0000 (15:56 -0400)] 
string-util: use size_t for strjoina macro (#6914)

`strlen` returns a `size_t` and `alloca` expects a `size_t`.

6 years agoinstall: drop left-over debug message (#6913)
Zbigniew Jędrzejewski-Szmek [Mon, 25 Sep 2017 17:59:49 +0000 (19:59 +0200)] 
install: drop left-over debug message (#6913)

6 years agoMerge pull request #6893 from poettering/cgroup-delegate-yay
Zbigniew Jędrzejewski-Szmek [Sun, 24 Sep 2017 18:53:04 +0000 (20:53 +0200)] 
Merge pull request #6893 from poettering/cgroup-delegate-yay

cgroup delegation fixes, as well as socket unit slice assignment

6 years agoMerge pull request #6891 from poettering/read-line
Zbigniew Jędrzejewski-Szmek [Sun, 24 Sep 2017 18:51:01 +0000 (20:51 +0200)] 
Merge pull request #6891 from poettering/read-line

add read_line() helper as bounded getline() and make use of it at some places

6 years agoMerge pull request #6887 from rantala/6447
Lennart Poettering [Sun, 24 Sep 2017 17:52:07 +0000 (19:52 +0200)] 
Merge pull request #6887 from rantala/6447

journal: add object sanity check to journal_file_move_to_object() (#6447)

6 years agofileio: return 0 from read_one_line_file on success 6891/head
Zbigniew Jędrzejewski-Szmek [Sun, 24 Sep 2017 12:27:21 +0000 (14:27 +0200)] 
fileio: return 0 from read_one_line_file on success

Fixup for f4b51a2d09. Suggested by Evgeny Vereshchagin.

6 years agojournal: add missing le64toh() calls in journal_file_check_object() 6887/head
Tommi Rantala [Sun, 24 Sep 2017 08:56:52 +0000 (11:56 +0300)] 
journal: add missing le64toh() calls in journal_file_check_object()

Lennart Poettering noticed missing le64toh() calls.

6 years agotest-fileio: also test read_line() with actual files
Zbigniew Jędrzejewski-Szmek [Sun, 24 Sep 2017 07:10:48 +0000 (09:10 +0200)] 
test-fileio: also test read_line() with actual files

Just in case the real FILE and the one from fmemopen weren't exactly
the same.

6 years agotest-fileio: close two leaked file handles
Zbigniew Jędrzejewski-Szmek [Sun, 24 Sep 2017 06:59:49 +0000 (08:59 +0200)] 
test-fileio: close two leaked file handles

6 years agoman: add missing verb in timedatectl(1) (#6896)
Zbigniew Jędrzejewski-Szmek [Sat, 23 Sep 2017 14:51:41 +0000 (16:51 +0200)] 
man: add missing verb in timedatectl(1) (#6896)

As noted by Michael Biebl.

6 years agoMerge pull request #6894 from poettering/read-full-file-optimize
Zbigniew Jędrzejewski-Szmek [Sat, 23 Sep 2017 11:31:02 +0000 (13:31 +0200)] 
Merge pull request #6894 from poettering/read-full-file-optimize

fileio: various fixes

6 years agoMerge pull request #6892 from keszybz/enablement-work
Lennart Poettering [Sat, 23 Sep 2017 10:44:49 +0000 (12:44 +0200)] 
Merge pull request #6892 from keszybz/enablement-work

Fix various issues with enabled/disabled units

6 years agotest-conf-parser: add tests for the new long lines, including overflow handling
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 12:36:12 +0000 (14:36 +0200)] 
test-conf-parser: add tests for the new long lines, including overflow handling

6 years agotest-conf-parser: use _cleanup_
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 10:02:49 +0000 (12:02 +0200)] 
test-conf-parser: use _cleanup_

6 years agofileio: use _cleanup_ for FILE unlocking
Zbigniew Jędrzejewski-Szmek [Sat, 23 Sep 2017 08:48:09 +0000 (10:48 +0200)] 
fileio: use _cleanup_ for FILE unlocking

6 years agoupdate TODO 6897/head
Lennart Poettering [Fri, 22 Sep 2017 16:27:03 +0000 (18:27 +0200)] 
update TODO

6 years agoconf-parse: remove 4K line length limit
Lennart Poettering [Fri, 22 Sep 2017 16:26:35 +0000 (18:26 +0200)] 
conf-parse: remove 4K line length limit

Let's use read_line() to solve our long line limitation.

Fixes #3302.

6 years agotest-conf-parser: add some basic tests for config_parse()
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 12:24:01 +0000 (14:24 +0200)] 
test-conf-parser: add some basic tests for config_parse()

This function is pretty important, but we weren't calling it directly
even once in tests.

v2: add a few tests for escaping and line continuations

6 years agofileio: initialize errno to zero before we do fread() 6894/head
Lennart Poettering [Fri, 22 Sep 2017 19:05:03 +0000 (21:05 +0200)] 
fileio: initialize errno to zero before we do fread()

if there was something in the read buffer already errno might not be set
on error, let's detect that case.

6 years agofileio: try to read one byte too much in read_full_stream()
Lennart Poettering [Fri, 22 Sep 2017 19:03:33 +0000 (21:03 +0200)] 
fileio: try to read one byte too much in read_full_stream()

Let's read one byte more than the file size we read from stat() on the
first fread() invocation. That way, the first read() will already be
short and indicate eof to fread().

This is a minor optimization, and replaces #3908.

6 years agofileio: move fsync() logic into write_string_stream_ts()
Lennart Poettering [Fri, 22 Sep 2017 18:59:39 +0000 (20:59 +0200)] 
fileio: move fsync() logic into  write_string_stream_ts()

That way, write_string_stream_ts() becomes more powerful, and we can
remove duplicate code from  write_string_file_atomic() and
write_string_file_ts().

6 years agofileio: make write_string_stream() accept flags parameter
Lennart Poettering [Fri, 22 Sep 2017 18:55:34 +0000 (20:55 +0200)] 
fileio: make write_string_stream() accept flags parameter

Let's make write_string_stream() and write_string_file() more alike, and
pass the same flag set so that we can remove a number of boolean
parameters.

6 years agofileio: support writing atomic files with timestamp
Lennart Poettering [Fri, 22 Sep 2017 18:45:06 +0000 (20:45 +0200)] 
fileio: support writing atomic files with timestamp

Let's make sure "ts" is taken into account when writing atomic files,
too.

6 years agocgroup-util: replace one use of fgets() by read_line()
Lennart Poettering [Fri, 22 Sep 2017 16:25:45 +0000 (18:25 +0200)] 
cgroup-util: replace one use of fgets() by read_line()

6 years agofileio: rework read_one_line_file() on top of read_line() 6898/head
Lennart Poettering [Fri, 22 Sep 2017 16:01:32 +0000 (18:01 +0200)] 
fileio: rework read_one_line_file() on top of read_line()

6 years agodef: add new constant LONG_LINE_MAX 6901/head
Lennart Poettering [Fri, 22 Sep 2017 18:23:58 +0000 (20:23 +0200)] 
def: add new constant LONG_LINE_MAX

LONG_LINE_MAX is much like LINE_MAX, but longer.

As it turns out LINE_MAX at 4096 is too short for many usecases. Since
the general concept of having a common maximum line length limit makes
sense let's add our own, and make it larger (1MB for now).

6 years agofileio: add new helper call read_line() as bounded getline() replacement
Lennart Poettering [Fri, 22 Sep 2017 15:55:53 +0000 (17:55 +0200)] 
fileio: add new helper call read_line() as bounded getline() replacement

read_line() is much like getline(), and returns a line read from a
FILE*, of arbitrary sizes. In contrast to gets() it will grow the buffer
dynamically, and in contrast to getline() it will place a user-specified
boundary on the line.

6 years agosocket: assign socket units to a default slice unconditionally 6893/head
Lennart Poettering [Fri, 22 Sep 2017 18:09:21 +0000 (20:09 +0200)] 
socket: assign socket units to a default slice unconditionally

Due to the chown() logic socket units might end up with processes even
if no explicit command is defined for them, hence let's make sure these
processes are in the right cgroup, and that means within a slice.

Mount, swap and service units unconditionally are assigned to a slice
already, let's do the same here, too.

(This becomes more important as soon as the ebpf/firewall stuff is
merged, as there'll be another reason to fork off processes then)

6 years agocgroup: make use of unit_cgroup_delegate() where useful
Lennart Poettering [Fri, 22 Sep 2017 18:02:23 +0000 (20:02 +0200)] 
cgroup: make use of unit_cgroup_delegate() where useful

It's an easy-to-use wrapper, so let's take benefit of it.

6 years agocgroup: rework which files we chown() on delegation
Lennart Poettering [Fri, 22 Sep 2017 17:58:24 +0000 (19:58 +0200)] 
cgroup: rework which files we chown() on delegation

On cgroupsv2 we should also chown()/chmod() the subtree_control file,
so that children can use controllers the way they like.

On cgroupsv1 we should also chown()/chmod() cgroups.clone_children, as
not setting this for new cgroups makes little sense, and hence delegated
clients should be able to write to it.

Note that error handling for both cases is different. subtree_control
matters so we check for errors, but the clone_children/tasks stuff
doesn't really, as it's legacy stuff. Hence we only log errors and
proceed.

Fixes: #6216
6 years agocgroup-util: downgrade log messages from library code to LOG_DEBUG
Lennart Poettering [Fri, 22 Sep 2017 17:57:07 +0000 (19:57 +0200)] 
cgroup-util: downgrade log messages from library code to LOG_DEBUG

These errors don't really matter, that's why we log and proceed in the
current code. However, we currently log at LOG_WARNING, but we really
shouldn't given that this is library code. Hence downgrade this to
LOG_DEBUG.

6 years agoman: Requires= needs After= to deactivate "this unit" (#6869)
John Lin [Fri, 22 Sep 2017 17:15:28 +0000 (01:15 +0800)] 
man: Requires= needs After= to deactivate "this unit" (#6869)

Fixes: #6856
6 years agoMerge pull request #6879 from marcelhollerbach/testsuite-fix
Lennart Poettering [Fri, 22 Sep 2017 16:47:59 +0000 (18:47 +0200)] 
Merge pull request #6879 from marcelhollerbach/testsuite-fix

time-util: testsuite fix

6 years agoinstall: consider globally enabled units as "enabled" for the user 6892/head
Zbigniew Jędrzejewski-Szmek [Fri, 22 Sep 2017 12:46:09 +0000 (14:46 +0200)] 
install: consider globally enabled units as "enabled" for the user

We would not consider symlinks in /etc/systemd/user/*.{wants,requires}/
towards the user unit being "enabled", because the symlinks were not
located in "config" paths. But this is confusing to users, since those units
are clearly enabled and will be started. So let's muddle the definition of
enablement a bit to include the paths only accessible to root when looking for
enabled user units.

Fixes #4432.

6 years agoinstall: consider non-Alias=/non-DefaultInstance= symlinks as "indirect" enablement
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 17:03:17 +0000 (19:03 +0200)] 
install: consider non-Alias=/non-DefaultInstance= symlinks as "indirect" enablement

I think this matches the spirit of "indirect" well: the unit
*might* be active, even though it is not "installed" in the
sense of symlinks created based on the [Install] section.

The changes to test-install-root touch the same lines as in the previous
commit; the change in each case is from
   assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_ENABLED)
to
   assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_DISABLED)
to
   assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_INDIRECT)
in the last two commits.

6 years agoinstall: only consider names in Alias= as "enabling"
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 16:53:45 +0000 (18:53 +0200)] 
install: only consider names in Alias= as "enabling"

When a unit has a symlink that makes an alias in the filesystem,
but that name is not specified in [Install], it is confusing
is the unit is shown as "enabled". Look only for names specified
in Alias=.

Fixes #6338.

v2:
- Fix indentation.
- Fix checking for normal enablement, when the symlink name is the same as the
  unit name. This case wasn't handled properly in v1.

v3:
- Rework the patch to also handle templates properly:
  A template templ@.service with DefaultInstance=foo will be considered
  enabled only when templ@foo.service symlink is found. Symlinks with
  other instance names do not count, which matches the logic for aliases
  to normal units. Tests are updated.

6 years agotime-util: mktime_or_timegm are changing the struct tm 6879/head
Marcel Hollerbach [Wed, 20 Sep 2017 17:26:13 +0000 (19:26 +0200)] 
time-util: mktime_or_timegm are changing the struct tm

after that wm_day etc. seems to be changed. Moving the check infront of
the mktime_or_timegm fixes that.

6 years agotime-util: correctly handle the timezone when parsing
Marcel Hollerbach [Wed, 20 Sep 2017 12:47:49 +0000 (14:47 +0200)] 
time-util: correctly handle the timezone when parsing

The timezone was cut off the string once the timezone was not UTC.
If it is not UTC but a other timezone that matches tzname[0] or
tzname[1], then we can leave it to the impl function to parse that
correctly. If not we can just fallback to whatever is the current
timezone is in the given t_timezone.

This should fix the testuite and tests.

6 years agojournald: make maximum size of stream log lines configurable and bump it to 48K ...
Lennart Poettering [Fri, 22 Sep 2017 08:22:24 +0000 (10:22 +0200)] 
journald: make maximum size of stream log lines configurable and bump it to 48K (#6838)

This adds a new setting LineMax= to journald.conf, and sets it by
default to 48K. When we convert stream-based stdout/stderr logging into
record-based log entries, read up to the specified amount of bytes
before forcing a line-break.

This also makes three related changes:

- When a NUL byte is read we'll not recognize this as alternative line
  break, instead of silently dropping everything after it. (see #4863)

- The reason for a line-break is now encoded in the log record, if it
  wasn't a plain newline. Specifically, we distuingish "nul",
  "line-max" and "eof", for line breaks due to NUL byte, due to the
  maximum line length as configured with LineMax= or due to end of
  stream. This data is stored in the new implicit _LINE_BREAK= field.
  It's not synthesized for plain \n line breaks.

- A randomized 128bit ID is assigned to each log stream.

With these three changes in place it's (mostly) possible to reconstruct
the original byte streams from log data, as (most) of the context of
the conversion from the byte stream to log records is saved now. (So,
the only bits we still drop are empty lines. Which might be something to
look into in a future change, and which is outside of the scope of this
work)

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86465
See: #4863
Replaces: #4875

6 years agojournal: add object sanity check to journal_file_move_to_object()
Tommi Rantala [Tue, 19 Sep 2017 08:10:49 +0000 (11:10 +0300)] 
journal: add object sanity check to journal_file_move_to_object()

Introduce journal_file_check_object(), which does lightweight object
sanity checks, and use it in journal_file_move_to_object(), so that we
will catch certain corrupted objects in the journal file.

This fixes #6447, where we had only partially written out OBJECT_ENTRY
(ObjectHeader written, but rest of object zero bytes), causing
"journalctl --list-boots" to fail.

  $ builddir.vanilla/journalctl --list-boots -D bug6447/
  Failed to determine boots: No data available

  $ builddir.patched/journalctl --list-boots -D bug6447/
  -52 22633da1c5374a728d6c215e2c301dc2 Mon 2017-07-10 05:29:21 EEST—Mon 2017-07-10 05:31:51 EEST
  -51 2253aab9ea7e4a2598f2abda82939eff Mon 2017-07-10 05:32:22 EEST—Mon 2017-07-10 05:36:49 EEST
  -50 ef0d85d35c74486fa4104f9d6391b6ba Mon 2017-07-10 05:40:33 EEST—Mon 2017-07-10 05:40:40 EEST
  [...]

Note that journal_file_check_object() is similar to
journal_file_object_verify(). The most expensive checks are omitted, as
they would slow down every journal_file_move_to_object() call too much.

With this implementation, the added overhead is small, for example when
dumping some journal content to /dev/null
(built with -Dbuildtype=debugoptimized -Db_ndebug=true):

 Performance counter stats for 'builddir.vanilla/journalctl -D 76f4d4c3406945f9a60d3ca8763aa754/':

      12542,311634      task-clock:u (msec)       #    1,000 CPUs utilized
                 0      context-switches:u        #    0,000 K/sec
                 0      cpu-migrations:u          #    0,000 K/sec
            80 100      page-faults:u             #    0,006 M/sec
    41 786 963 456      cycles:u                  #    3,332 GHz
   105 453 864 770      instructions:u            #    2,52  insn per cycle
    24 342 227 334      branches:u                # 1940,809 M/sec
       105 709 217      branch-misses:u           #    0,43% of all branches

      12,545199291 seconds time elapsed

 Performance counter stats for 'builddir.patched/journalctl -D 76f4d4c3406945f9a60d3ca8763aa754/':

      12734,723233      task-clock:u (msec)       #    1,000 CPUs utilized
                 0      context-switches:u        #    0,000 K/sec
                 0      cpu-migrations:u          #    0,000 K/sec
            80 693      page-faults:u             #    0,006 M/sec
    42 661 017 429      cycles:u                  #    3,350 GHz
   107 696 985 865      instructions:u            #    2,52  insn per cycle
    24 950 526 745      branches:u                # 1959,252 M/sec
       101 762 806      branch-misses:u           #    0,41% of all branches

      12,737527327 seconds time elapsed

Fixes #6447.

6 years agoMerge pull request #6853 from sourcejedi/GetAll
Lennart Poettering [Thu, 21 Sep 2017 19:41:55 +0000 (21:41 +0200)] 
Merge pull request #6853 from sourcejedi/GetAll

 sd-bus: fix response for GetAll on non-existent objects

6 years agoLink to the right glibc commit in comment (#6884)
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 18:54:16 +0000 (20:54 +0200)] 
Link to the right glibc commit in comment (#6884)

Reported by Marcos Mello.

Fixes #6882.

6 years agoinstall: move and rename to lowercase two functions
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 16:36:45 +0000 (18:36 +0200)] 
install: move and rename to lowercase two functions

No reason to make them look like macros.

6 years agotimedatectl: be more explicit what "ntp synchronized" means
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 14:05:52 +0000 (16:05 +0200)] 
timedatectl: be more explicit what "ntp synchronized" means

The documentation explained that the message doesn't really mean what it says,
but I think it's better to just make the message more straightforward.

Fixes #6554.

6 years agotime-util: fix shadowing of timezone
Marcel Hollerbach [Tue, 19 Sep 2017 15:00:56 +0000 (17:00 +0200)] 
time-util: fix shadowing of timezone

timezone was shadowing timezone from time.h which leads to a buildbreak
since systemd is built with -Werror

6 years agoexecute: fix typo in error message (#6881)
Jan Synacek [Thu, 21 Sep 2017 08:38:52 +0000 (10:38 +0200)] 
execute: fix typo in error message (#6881)

6 years agoMerge pull request #6847 from keszybz/disable-enable-generators
Lennart Poettering [Wed, 20 Sep 2017 17:51:44 +0000 (19:51 +0200)] 
Merge pull request #6847 from keszybz/disable-enable-generators

Disable and optionally again enable generators in test mode

6 years agopath-lookup: fix minor memleak 6847/head
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2017 09:31:16 +0000 (11:31 +0200)] 
path-lookup: fix minor memleak

Introduced in a1f31f4715.

6 years agoanalyze-verify: add --generators switch to enable generators again
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2017 09:29:34 +0000 (11:29 +0200)] 
analyze-verify: add --generators switch to enable generators again

6 years agoMake test_run into a flags field and disable generators again
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2017 09:19:43 +0000 (11:19 +0200)] 
Make test_run into a flags field and disable generators again

Now generators are only run in systemd --test mode, where this makes
most sense (how are you going to test what would happen otherwise?).

Fixes #6842.

v2:
- rename test_run to test_run_flags

6 years agonetworkd: route - support unicast,blackhole,unreachable and prohibited (#6861)
Susant Sahani [Tue, 19 Sep 2017 14:28:26 +0000 (19:58 +0530)] 
networkd: route - support unicast,blackhole,unreachable and prohibited (#6861)

Resolves issues #797 and #967.

Conf

```
[Route]
Type=blackhole
Destination=202.54.1.2
```

ip route

```
blackhole 202.54.1.2 proto static

6 years agotests: change dbus tests to use user bus (#6845)
Michael Biebl [Tue, 19 Sep 2017 12:17:57 +0000 (14:17 +0200)] 
tests: change dbus tests to use user bus (#6845)

This makes it possible to run more dbus tests in a build
environment/chroot where no system bus is available.
To run the dbus test one then can use dbus-run-session.

6 years agoAdded docs for new timezone support added at #6788 (#6865)
Ivan Kurnosov [Tue, 19 Sep 2017 09:23:34 +0000 (21:23 +1200)] 
Added docs for new timezone support added at #6788 (#6865)

6 years agosystemd-link: Add support to configure tx-tcp6-segmentation (#6859)
Susant Sahani [Tue, 19 Sep 2017 08:49:58 +0000 (14:19 +0530)] 
systemd-link: Add support to configure tx-tcp6-segmentation (#6859)

closes #6854

tcp-segmentation-offload: off
tx-tcp-segmentation: off
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: off <==========================

6 years agoMerge pull request #6855 from keszybz/more-docs
Lennart Poettering [Tue, 19 Sep 2017 08:38:40 +0000 (10:38 +0200)] 
Merge pull request #6855 from keszybz/more-docs

More docs

6 years agonetworkd: change UseMTU default to true. (#6837)
Dimitri John Ledkov [Tue, 19 Sep 2017 08:26:17 +0000 (09:26 +0100)] 
networkd: change UseMTU default to true. (#6837)

Typically when DHCP server sets MTU it is a lower one. And a lower than usual
MTU is then thus required on said network to have operational networking. This
makes networkd's dhcp client to work in more similar way to other dhcp-clients
(e.g. isc-dhcp). In particular, in a cloud setting, without this default
instances have resulted in timing out talking to cloud metadata source and
failing to provision.

This does not change this default for the Annonymize code path.

6 years agobuild-sys: bump xslt maxdepth limit (#6863)
Zbigniew Jędrzejewski-Szmek [Tue, 19 Sep 2017 06:04:02 +0000 (08:04 +0200)] 
build-sys: bump xslt maxdepth limit (#6863)

With libxslt-1.30, builds were failing on some recursion depth limit
with systemd.index.xml. Bumping the limit fixes the issue.

6 years agotypo: chache → cache (#6864)
Ansgar Burchardt [Tue, 19 Sep 2017 04:48:09 +0000 (06:48 +0200)] 
typo: chache → cache (#6864)

6 years agoman/systemd.special: correct what slices.target pulls in (#6862)
Alan Jenkins [Mon, 18 Sep 2017 15:43:19 +0000 (16:43 +0100)] 
man/systemd.special: correct what slices.target pulls in (#6862)

6 years agosd-radv: Free DNS domain search list on unref (#6858)
Patrik Flykt [Mon, 18 Sep 2017 10:09:44 +0000 (13:09 +0300)] 
sd-radv: Free DNS domain search list on unref (#6858)

6 years agoMerge pull request #6851 from keszybz/fix-masking-with-empty-files
Evgeny Vereshchagin [Sun, 17 Sep 2017 21:07:12 +0000 (00:07 +0300)] 
Merge pull request #6851 from keszybz/fix-masking-with-empty-files

Fix masking with empty files

6 years agotest-exec-util: add two test cases for scripts masked with empty file 6851/head
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 13:17:50 +0000 (15:17 +0200)] 
test-exec-util: add two test cases for scripts masked with empty file

A test for #6831. Fails without the previous commit.

Suggested by Evgeny Vereshchagin.

6 years agoconf-files: fix check for masking with empty files
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 13:26:01 +0000 (15:26 +0200)] 
conf-files: fix check for masking with empty files

Fixes #6831.

6 years agoman: describe user@host:machine syntax 6855/head
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 19:05:20 +0000 (21:05 +0200)] 
man: describe user@host:machine syntax

Fixes #6734.

6 years agoman: update limits on seat and session identifiers in sd-login(3)
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 18:05:57 +0000 (20:05 +0200)] 
man: update limits on seat and session identifiers in sd-login(3)

For the session identifier, the code is currently slightly stricter, because it
only uses digits and letters, than the description. This should be OK.

Fixes #6745.

6 years agoman: import "Multi-Seat on Linux" into sd-login(3)
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 17:52:15 +0000 (19:52 +0200)] 
man: import "Multi-Seat on Linux" into sd-login(3)

The document on the wiki is partially outdated and not very visible.  Let's
import the gist of it here. The original text is retained, with only grammar
and stylistic and formatting changes.

6 years agosd-bus: style nitpick node_vtable_get_userdata() 6853/head
Alan Jenkins [Sat, 16 Sep 2017 11:32:59 +0000 (12:32 +0100)] 
sd-bus: style nitpick node_vtable_get_userdata()

It's confusing to use a single void* to store data with two different
types, i.e. a userdata value which is safe to pass to ->find(), and a
userdata value which identifies the found object.

Name the latter `found_u`.  This naming treats (!c->find) as a degenerate
case.  (I.e. at that point, we know the object has already been found :).

6 years agosd-bus: fix response for GetAll on non-existent objects
Alan Jenkins [Sat, 16 Sep 2017 13:39:22 +0000 (14:39 +0100)] 
sd-bus: fix response for GetAll on non-existent objects

Before this commit, if you run `loginctl user-status` from
debug-shell.service (and you have no login sessions for root), you always
see this output:

0
Linger: no

because Properties.GetAll is returning success but without any properties,
when the only find() callback had returned 0 to mean "no object found".

After:

Could not get properties: Unknown object:
'/org/freedesktop/login1/user/self'

BTW I have a fix for more user-friendly messages from logind in this case.
It is pending in my local branch for #6829 "fix `loginctl enable-linger`".

6 years agoMerge pull request #6788 from zerkms/TIMER_TIMEZONE
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 13:05:35 +0000 (15:05 +0200)] 
Merge pull request #6788 from zerkms/TIMER_TIMEZONE

Timezone support for timers

6 years agoFix for dst/non-dst timezones 6788/head
Ivan Kurnosov [Sun, 17 Sep 2017 11:09:38 +0000 (23:09 +1200)] 
Fix for dst/non-dst timezones

The problem was with the tm.tm_isdst that is set to the current environment
value: either DST or not. While the current state is not relevant to the state
in the desired date.

Hence — it should be reset so that the mktime_or_timegm could normalise it
later.

6 years agoMerge pull request #6846 from keszybz/fix-udev_event_apply_format
Lennart Poettering [Sun, 17 Sep 2017 10:04:21 +0000 (12:04 +0200)] 
Merge pull request #6846 from keszybz/fix-udev_event_apply_format

Fix udev_event_apply_format()

6 years agotest-date: add more logging on error
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 07:50:52 +0000 (09:50 +0200)] 
test-date: add more logging on error

6 years agoMerge pull request #6840 from keszybz/more-docs
Lennart Poettering [Sun, 17 Sep 2017 09:56:24 +0000 (11:56 +0200)] 
Merge pull request #6840 from keszybz/more-docs

Some more documentation updates

6 years agoSimplify the if cases for timezone checking
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 07:10:03 +0000 (09:10 +0200)] 
Simplify the if cases for timezone checking

Just to reduce the indentation a bit.

6 years agoAdded timezone to the CalendarSpec, parser/formatter and the timedatectl
Ivan Kurnosov [Wed, 6 Sep 2017 09:56:36 +0000 (21:56 +1200)] 
Added timezone to the CalendarSpec, parser/formatter and the timedatectl

6 years agoMove one space from dbus-execute.c to execute.c 6846/head
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2017 06:45:02 +0000 (08:45 +0200)] 
Move one space from dbus-execute.c to execute.c

The number of spaces is conserved ;)

6 years agoudev: fix buffer overflow in udev_event_apply_format()
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2017 06:38:28 +0000 (08:38 +0200)] 
udev: fix buffer overflow in udev_event_apply_format()

Fixes #6664.

6 years agofix path in btrfs rule (#6844)
Christian Hesse [Fri, 15 Sep 2017 19:28:24 +0000 (21:28 +0200)] 
fix path in btrfs rule (#6844)

Commit 0e8856d2 (assemble multidevice btrfs volumes without external
tools (#6607)) introduced a call to udevadm. That lives in @rootbindir@,
not @rootlibexecdir@. So fix the path.

6 years agoMerge pull request #6832 from poettering/keyring-mode
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 19:24:48 +0000 (21:24 +0200)] 
Merge pull request #6832 from poettering/keyring-mode

Add KeyringMode unit property to fix cryptsetup key caching

6 years agoMerge pull request #6841 from poettering/doc-exit-codes
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 15:26:35 +0000 (17:26 +0200)] 
Merge pull request #6841 from poettering/doc-exit-codes

document exit codes

6 years agoman: use "filename" not "file name" by default 6840/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 12:59:45 +0000 (14:59 +0200)] 
man: use "filename" not "file name" by default

We settled on "filename" and "file system", so change a couple of places for
consistency. The exception is when there's an adjective before "file" that
binds more strongly then "name": "password file name", "output file name", etc.
Those cases are left intact.

6 years agoman: update udevadm -y/--sysname-match documentation
Russell Stuart [Tue, 12 Sep 2017 23:25:04 +0000 (09:25 +1000)] 
man: update udevadm -y/--sysname-match documentation

Fixes #6792.

[zj: reorganize the sentece for grammatical correctness.]

6 years agomailmap: add entry to fix encoding issues
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 12:49:44 +0000 (14:49 +0200)] 
mailmap: add entry to fix encoding issues

6 years agoman: add a whole section detailing journal stdout/stderr stream logging
Lennart Poettering [Fri, 15 Sep 2017 12:17:32 +0000 (14:17 +0200)] 
man: add a whole section detailing journal stdout/stderr stream logging

Details about EPIPE/SIGPIPE handling, metadata and more.

Fixes: #6620
6 years agocryptsetup: make sure we invoke the cryptsetup tools with a shared keyring 6832/head
Lennart Poettering [Thu, 14 Sep 2017 19:23:56 +0000 (21:23 +0200)] 
cryptsetup: make sure we invoke the cryptsetup tools with a shared keyring

We want that cryptsetup can cache keys between multiple invocations, and
it does so via the root user's user keyring, hence let's share it among
services.

Replaces: #6286

6 years agocore: add new per-unit setting KeyringMode= for controlling kernel keyring setup
Lennart Poettering [Thu, 14 Sep 2017 19:19:05 +0000 (21:19 +0200)] 
core: add new per-unit setting KeyringMode= for controlling kernel keyring setup

Usually, it's a good thing that we isolate the kernel session keyring
for the various services and disconnect them from the user keyring.
However, in case of the cryptsetup key caching we actually want that
multiple instances of the cryptsetup service can share the keys in the
root user's user keyring, hence we need to be able to disable this logic
for them.

This adds KeyringMode=inherit|private|shared:

    inherit: don't do any keyring magic (this is the default in systemd --user)
    private: a private keyring as before (default in systemd --system)
    shared: the new setting

6 years agoMerge pull request #6830 from keszybz/generator-dirs
Lennart Poettering [Fri, 15 Sep 2017 14:48:41 +0000 (16:48 +0200)] 
Merge pull request #6830 from keszybz/generator-dirs

Redirect generators to a temporary directory in test mode

6 years agodoc: document service exit codes 6841/head
Jan Synacek [Thu, 26 Jan 2017 12:45:46 +0000 (13:45 +0100)] 
doc: document service exit codes

(Heavily reworked by Lennart while rebasing)

Fixes: #3545
Replaces: #5159

6 years agoexecute: improve and augment execution log messages
Lennart Poettering [Fri, 15 Sep 2017 14:42:09 +0000 (16:42 +0200)] 
execute: improve and augment execution log messages

Let's generate friendly messages for more cases, and make slight
adjustments to the existing messages.

6 years agoexit-status: drop EXIT_MAKE_STARTER
Lennart Poettering [Fri, 15 Sep 2017 14:41:19 +0000 (16:41 +0200)] 
exit-status: drop EXIT_MAKE_STARTER

This is unused since kdbus has been removed.

6 years agobuild-sys: require libmount >= 2.30 (#6795)
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 12:47:57 +0000 (14:47 +0200)] 
build-sys: require libmount >= 2.30 (#6795)

Fixes #4871.

The new libmount has two changes relevant for us:

- x-* options are propagated to /run/mount/utab and are visible through
  libmount (fixes #4817).

- umount -c now really works (partially solves #6115).

6 years agoMerge pull request #6772 from pfl/dnssl
Lennart Poettering [Fri, 15 Sep 2017 11:17:36 +0000 (13:17 +0200)] 
Merge pull request #6772 from pfl/dnssl

networkd: DNSSL option for systemd-networkd prefix delegation

6 years agoman: update the description of machinectl -M
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 09:47:46 +0000 (11:47 +0200)] 
man: update the description of machinectl -M

Fixes #6621.

Also rework the introduction a bit.