Commit Graph

33090 Commits

Author SHA1 Message Date
Lennart Poettering 070d0ac9cf update TODO 2018-04-20 20:01:08 +02:00
Tobias Jungel 4c3879863a networkd: more specific link down while enslaving (#8771)
Issue #5853 introduced a link_down for every netdev enslaved. This behaviour is
not required on other slave interfaces.

fixes 14b6bb7
2018-04-20 16:30:40 +02:00
Tobias Jungel 201b26a344 remove unused variables (#8768)
clang 5.0 complains with -Wunused-variable
2018-04-20 13:31:17 +02:00
Susant Sahani 11102cba69 networkd: add support to configure IPv6 MTU (#8664)
This patch supports to configure IPv6 MTU.

Closes #8632
2018-04-20 11:38:39 +02:00
Lennart Poettering 0c300adfa4 nspawn: when running nspawn, set a $PATH including both bin + sbin by default (#8756)
We don't know what the container payload needs, hence default to a PATH
with both bin and sbin included, as well as / and /usr.

Follow-up for #8324

Fixes: #8698
2018-04-20 11:36:25 +02:00
Zbigniew Jędrzejewski-Szmek d18b57f7fd
Merge pull request #8754 from poettering/sysusers-fix
two minor memleak fixes for sysusers, fixing #8718
2018-04-19 19:39:48 +02:00
Zbigniew Jędrzejewski-Szmek 65a2718af5
Merge pull request #8767 from poettering/urlify-all-things
try to generate clickable links in our output if we can
2018-04-19 18:56:46 +02:00
Lennart Poettering c708025774 systemctl: format unit file and dropin paths as clickable links in status output 2018-04-19 18:04:26 +02:00
Lennart Poettering 78c7d20ebc systemctl: format documentation links in status output as clickable links 2018-04-19 18:04:26 +02:00
Lennart Poettering 87adb0db27 hostnamectl: make the distribution name a pretty clickable link if we can 2018-04-19 18:04:26 +02:00
Lennart Poettering 64928aa545 hostnamed: expose HOME_URL os-release field on the bus 2018-04-19 18:04:26 +02:00
Lennart Poettering 23b27b39d2 terminal: add internal API to format URLs for display in capable terminals
Newer terminals (in particular gnome-terminal) understand special escape
sequence for formatting clickable links. Let's support that to make our
tool output more clickable where that's appropriate.

For details see this:

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

The one big issue is that 'less' currently doesn't grok this, and
doesn't ignore sequence like regular terminal implementations do if they
don't support it. Hence for now, let's disable URL output if a pager is
used. We should revisit that though as soon as less added support for it
and enough time passed for it to enter various distributions.
2018-04-19 18:04:26 +02:00
Lennart Poettering 2c75088094
Merge pull request #8615 from yuwata/fix-1329
timedated: support multiple NTP services
2018-04-19 16:22:50 +02:00
Lennart Poettering 7a9a0c05d4
Merge pull request #8765 from poettering/test-fixes
some short fixes for the tests
2018-04-19 16:18:46 +02:00
Zbigniew Jędrzejewski-Szmek 9c531ff89f
Merge pull request #8623 from yuwata/resolvectl
resolvectl: rename systemd-resolve to resolvectl
2018-04-19 12:33:05 +02:00
Lennart Poettering 5d13a15b1d tree-wide: drop spurious newlines (#8764)
Double newlines (i.e. one empty lines) are great to structure code. But
let's avoid triple newlines (i.e. two empty lines), quadruple newlines,
quintuple newlines, …, that's just spurious whitespace.

It's an easy way to drop 121 lines of code, and keeps the coding style
of our sources a bit tigther.
2018-04-19 12:13:23 +02:00
Lennart Poettering ad80c6a655 user-util: trivial coding style fixes
Use C's downgrade-to-bool feature when comparing pointers against NULL,
as we usually do.
2018-04-19 11:41:28 +02:00
Lennart Poettering 5b3325fedf mkosi: drop dumping all test output to console again
As it appears meson's test cases nowadays (?) show useful logs for
failing tests anyway, hence there's no need to show them unconditionally
in full every time anymore. Let's hence simplify and drop this.
2018-04-19 11:41:28 +02:00
Lennart Poettering 63d6135fea tests: compare with correct shell
We synthesize the passwd record for UID 0, hence we need to compare with
our synthesized data and not with the data stored in /etc/passwd
2018-04-19 11:41:28 +02:00
Lennart Poettering 8f63253149 core: don't export per-unit metadata files in test mode
We shouldn't clobber the host's /run directories with metadata we export
for our units when we run in test mode.
2018-04-19 11:30:18 +02:00
Lennart Poettering 6a51a4682b mkosi: ensure the 'hostname' tool is available in the build environment
Our test-execute test uses 'hostname' to validate specifiers, hence it
should be available in our mkosi build too, so that the test can pass.
2018-04-19 11:30:18 +02:00
Lennart Poettering 6360b8ff83
Merge pull request #8758 from keszybz/improved-slice-checks
Improved slice checks
2018-04-19 11:28:05 +02:00
Ryan Gonzalez c5896b6a8c coredumpctl: Add debug as a gdb alias, and add lldb support (closes #8722) (#8744) 2018-04-18 21:32:17 +02:00
Yu Watanabe bd188ff0ee bash-completion: add completion for resolvectl 2018-04-19 03:26:54 +09:00
Yu Watanabe b69f810c8a man: create man page for resolvectl 2018-04-19 03:25:25 +09:00
Yu Watanabe a7a4c60a25 resolvectl: change syntax to use verb_dispatch()
This makes `resolvectl` use the verb style command line, e.g.,
`resolvectl status` or `resolvectl tlsa tcp fedoraproject.org:443`.
For compatibility, if the invocation name is `systemd-resolve`,
then it accepts the old syntax, e.g. `systemd-resolve --status`.
2018-04-19 03:24:35 +09:00
Yu Watanabe c2e84cab3a resolvectl: rename systemd-resolve to resolvectl
For the compatibility, `systemd-resolve` will be created as a symbolic
link to `resolvectl`.
2018-04-19 03:24:23 +09:00
Zbigniew Jędrzejewski-Szmek ecae73d74a core: do not allow Delegate= on unsupported unit types 2018-04-18 20:07:00 +02:00
Zbigniew Jędrzejewski-Szmek ff1b8455c2 core: fix resetting of Delegate= and properly ignore invalid assignment
The default is false not true. If we say "ignoring" we must return 0.
2018-04-18 20:07:00 +02:00
Lennart Poettering edd1dcd091 man: don't place nginx socket in /tmp (#8757)
First of all, it's frickin' ugly and wrong, as IPC sockets should be
placed in /run and definitely not under a guessable name under
world-writable /tmp. Secondly, it can't even work as we set
PrivateTmp=yes on the service.

Hence, let's clean up the example, and simply use a socket in /run
instead.

Fixes: #8419
2018-04-18 18:50:06 +02:00
Lennart Poettering 7aab22308e
Merge pull request #8708 from poettering/namespace-repeat
pid1 namespacing fixes
2018-04-18 18:46:44 +02:00
Franck Bui 80359410c4 sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737)
To indicate that the there're no more entries, these wrappers return false but
did leave the passed pointed unmodified.

However EOF is not an error and is a very common case so initialize the output
argument to NULL even in this case so callers don't need to do that.

Fixes: #8721
2018-04-18 18:32:21 +02:00
Lennart Poettering d9bcc5a6a2 sysusers: fix minor memory leak 2018-04-18 18:00:05 +02:00
Lennart Poettering c1a32819c2 sysusers: clarify that we knowingly ignore process_items() return values 2018-04-18 18:00:05 +02:00
Lennart Poettering 43e948eea6 sysusers: fix memory leak when /etc/passwd contains multiple identical lines
Fixes: #8718
2018-04-18 18:00:05 +02:00
Lennart Poettering 2dc993722b uid-range: remove spurious newline 2018-04-18 18:00:05 +02:00
Lennart Poettering 613bddf7d1
Merge pull request #8709 from poettering/format-table
generic table formatter
2018-04-18 16:20:13 +02:00
Lennart Poettering d2bcd0ba75
path-lookup: properly chase paths when reducing with root dir (#8750)
Let's make this correct.
2018-04-18 16:19:46 +02:00
Lennart Poettering 57ea45e11a util-lib: introduce new empty_or_root() helper (#8746)
We check the same condition at various places. Let's add a trivial,
common helper for this, and use it everywhere.

It's not going to make things much faster or much shorter, but I think a
lot more readable
2018-04-18 14:20:49 +02:00
Lennart Poettering 088696fe29 namespace: rework how we resolve symlinks in mount points
Before this patch we'd resolve all symlinks of bind mounts and other
mount points to establish for a service in advance, and only then start
mounting them. This is problematic, if symlink chains jump around
between directories in a namespace tree, so that to resolve a specific
symlink chain we need to establish another mount already. A typical case
where this happens is if /etc/resolv.conf is a symlink to some file in
/run: in that case we'd normally resolve and mount /etc/resolv.conf
early on, but that's broken, as to do this properly we'd need to resolve
/etc/resolv.conf first, then figure out that /run needs to be mounted
before we can proceed, and thus reorder the order in which we apply
mounts dynamically.

With this change, whenever we are about to apply a mount, we'll do a
single step of the symlink normalization process, patch the mount entry
accordingly, and then sort the list of mounts to establish again, taking
the new path into account. This means that we can correctly deal with
the example above: we might start with wanting to mount /etc/resolv.conf
early, but after resolving it to the path in /run/ we'd push it to the
end of the list, ensuring that /run is mounted first.

(Note that this also fixes another bug: we were following symlinks on
the bind mount source relative to the root directory of the service,
rather than of the host. That's wrong though as we explicitly document
tha the source of bind mounts is always on the host.)
2018-04-18 14:17:50 +02:00
Lennart Poettering e871786273 namespace: improve logging when creating mount source nodes 2018-04-18 14:15:48 +02:00
Lennart Poettering f8b64b5723 namespace: split out calls to normalize mount entry list into new function 2018-04-18 14:15:48 +02:00
Lennart Poettering c9ef8573be namespace: don't consider raw image read-only if /home in it is writable 2018-04-18 14:15:48 +02:00
Lennart Poettering f10f4215b5 fs-util: export how many iterations chase_symlinks() executes at max 2018-04-18 14:15:48 +02:00
Lennart Poettering 49eb36596b fs-util: add new CHASE_STEP flag to chase_symlinks()
If the flag is set only a single step of the normalization is executed,
and the resulting path is returned.

This allows callers to normalize piecemeal, taking into account every
single intermediary path of the normalization.
2018-04-18 14:15:48 +02:00
Lennart Poettering 5da19043f1 update TODO 2018-04-18 12:52:20 +02:00
Zbigniew Jędrzejewski-Szmek e206fcc164 test-locale-util: show special glyphs
This is mostly useful as a sanity check.
2018-04-18 12:51:15 +02:00
Zbigniew Jędrzejewski-Szmek 7c6c2e07fc test-utf8: add a smoke test for utf8_console_width() 2018-04-18 12:51:15 +02:00
Lennart Poettering 99f1229d76 loginctl: port loginctl to format-table.[ch] 2018-04-18 12:51:15 +02:00
Lennart Poettering 930a08dabc machinectl: port machinectl to format-table.[ch] 2018-04-18 12:51:15 +02:00