Commit graph

3393 commits

Author SHA1 Message Date
Lennart Poettering 8adf53582c man: document that ExecStop= is executed during restarts
Fixes: #7126
2017-11-17 11:25:02 +01:00
Lennart Poettering 78a263f432 man: add missing suffixing "=" for setting name 2017-11-17 11:25:02 +01:00
Lennart Poettering ff946d8243 man: write "stop and start" instead of "restart" when explaining the reload fallback operations
We already made a similar change when talking about the "restart"
command, let's also do this for "systemctl reload" and friends.

Follow-up for: 6539dd7c42

See: #7126
2017-11-17 11:25:02 +01:00
Lennart Poettering c4f2aaa45b man: document the interaction of "systemctl restart" and the FD store
See: #7126
2017-11-17 11:25:02 +01:00
Lennart Poettering bb84995789 nspawn: correctly document the relationship of --keep-unit and --register=no (#7364)
Fixes: #7228
2017-11-17 10:54:50 +01:00
Yu Watanabe 1bdfc7b951 core/cgroup: assigning empty string to Delegate= resets list of controllers (#7336)
Before this, assigning empty string to Delegate= makes no change to the
controller list. This is inconsistent to the other options that take list
of strings. After this, when empty string is assigned to Delegate=, the
list of controllers is reset. Such behavior is consistent to other options
and useful for drop-in configs.

Closes #7334.
2017-11-17 10:04:25 +01:00
Yu Watanabe dc3364832c mount: add "-G" as shortcut for "--property=CollectMode=inactive-or-failed" 2017-11-17 16:43:33 +09:00
Lennart Poettering fe9d0be90b run: add "-G" as shortcut for "--property=CollectMode=inactive-or-failed"
This option is likely to be very useful for systemd-run invocations,
hence let's add a shortcut for it.

With this new concepts it's now very easy to put together systemd-run
invocations that leave zero artifacts in the system, including when they
fail.
2017-11-16 14:38:36 +01:00
Lennart Poettering 5afe510c89 core: add a new unit file setting CollectMode= for tweaking the GC logic
Right now, the option only takes one of two possible values "inactive"
or "inactive-or-failed", the former being the default, and exposing same
behaviour as the status quo ante. If set to "inactive-or-failed" units
may be collected by the GC logic when in the "failed" state too.

This logic should be a nicer alternative to using the "-" modifier for
ExecStart= and friends, as the exit data is collected and logged about
and only removed when the GC comes along. This should be useful in
particular for per-connection socket-activated services, as well as
"systemd-run" command lines that shall leave no artifacts in the
system.

I was thinking about whether to expose this as a boolean, but opted for
an enum instead, as I have the suspicion other tweaks like this might be
a added later on, in which case we extend this setting instead of having
to add yet another one.

Also, let's add some documentation for the GC logic.
2017-11-16 14:38:36 +01:00
Zbigniew Jędrzejewski-Szmek 6af6a50a0b
Merge pull request #7246 from poettering/journal-extra-fields
add new per-unit LogLevelMax= and LogExtraField= setting
2017-11-16 14:24:53 +01:00
Zbigniew Jędrzejewski-Szmek 12c4ee0af3 man: mention how to provision Ubuntu and Tanglu for nspawn (#7359)
Also add urls. Urls are nice.
2017-11-16 13:40:35 +01:00
Lennart Poettering 8b8de13d54 man: document LogFieldMax= and LogExtraFields= 2017-11-16 12:40:17 +01:00
Lennart Poettering 4d14b2bd35 man: update SyslogXYZ= documentation a bit
Let's clarify that these settings only apply to stdout/stderr logging.
Always mention the journal before syslog (as the latter is in most ways
just a legacy alias these days). Always mention the +console cases too.
2017-11-16 12:40:17 +01:00
Lennart Poettering fc5f5706d3 man: rework the discussion of Storage= a bit
Most distributions default to persistent storage these days, hence don't
claim otherwise.
2017-11-16 12:40:17 +01:00
Yu Watanabe 798499278a man: fix wrong tag (#7358) 2017-11-16 11:35:30 +01:00
Lennart Poettering 0c08bc7f09 man: document that noauto doesn't affect automount units configured through /etc/fstab (#7350)
Fixes: #6937
2017-11-16 12:05:15 +09:00
Lennart Poettering 3e54b900e6 man: document interaction of --root= and the user/group databases (#7344)
Fixes: #7032
2017-11-16 12:00:56 +09:00
Lennart Poettering 7655cd3d58 man: document that generators can generate instances+templates and regular unit files (#7342)
This addition is kept brief on purpose, since in order to write a good
generator users don't really need to grok templating/instantiation.

Fixes: #7257
2017-11-16 11:37:25 +09:00
Lennart Poettering d38802e881 man: document explicitly that network-online.target doesn't track connectivity state dynamically (#7345)
Fixes: #5909
2017-11-16 11:26:27 +09:00
Roland Hieber e5bb1de8dd man/systemd-socket-proxyd: fix unit dependencies in examples (#7340)
This was probably a typo, since depending proxy-to-nginx.service on
itself makes no sense, but depending on the socket does.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
2017-11-15 11:51:56 +01:00
Lennart Poettering 0986658d51
Merge pull request #6866 from sourcejedi/set-linger2
logind: fix `loginctl enable-linger`
2017-11-15 11:15:15 +01:00
Alan Jenkins 34160d9195 logind: fix SetLinger to authorize by client's effective User ID
SetLinger is authorized by the PolicyKit action "set-self-linger", if it is
not passed an explicit UID.

According to comments we were determining the default UID from the client's
session.  However, user processes e.g. which are run from a terminal
emulator do not necessarily belong to a session scope unit.  They may
equally be started from the systemd user manager [1][2].  Actually the
comment was wrong, and it would also have worked for processes
started from the systemd user manager.

Nevertheless it seems to involve fetching "augmented credentials" i.e.
it's using a racy method, so we shouldn't have been authenticating based
on it.

We could change the default UID, but that raises issues especially for
consistency between the methods.  Instead we can just use the clients
effective UID for authorization.

This commit also fixes `loginctl enable-linger $USER` to match the docs
that say it was equivalent to `loginctl enable-linger` (given that $USER
matches the callers user and owner_uid).  Previously, the former would not
have suceeded for unpriviliged users in the default configuration.

[1] It seems the main meaning of per-session scopes is tracking the PAM
login process.  Killing that provokes logind to revoke device access.  Less
circularly, killing it provokes getty to hangup the TTY.

[2] User units may be started with an environment which includes
XDG_SESSION_ID (presuambly GNOME does this?).  Or not.
2017-11-14 18:15:33 +00:00
Lennart Poettering b0e8cec2dd man: document > /dev/stderr pitfalls (#7317)
Fixes: #7254
See: #2473
2017-11-14 10:51:09 +01:00
Lennart Poettering 49b625ed82 man: rework systemd-vconsole-setup man page a bit (#7312)
It's not systemd that invokes the service internally as needed, it's
systemd-localed. Correct that.

Also, stop using the word "helper". To me a "helper" constitutes
something internal, not official API. I doubt systemd-vconsole-setup
really matches that description though, hence let's better avoid the
term.

Also, clean up some other wording, and be less imbiguous, by suggesting
a single command to apply vconsole.conf instead of two.

Follow-up for 597c25d2a7
2017-11-13 19:14:19 +01:00
Lennart Poettering f38326f21a
Merge pull request #7284 from poettering/cgroup-delegate-mask
add a concept of delegating cgroups per unit while enabling specific controllers
2017-11-13 12:14:23 +01:00
Shuang Liu 597c25d2a7 man: remove productname which resulting trademark symbol (#7193) 2017-11-13 11:10:51 +01:00
Lennart Poettering a9f01ad1bf man: document the new Delegate= syntax 2017-11-13 10:49:15 +01:00
Zbigniew Jędrzejewski-Szmek b835eeb4ec
shared/seccomp: disallow pkey_mprotect the same as mprotect for W^X mappings (#7295)
MemoryDenyWriteExecution policy could be be bypassed by using pkey_mprotect
instead of mprotect to create an executable writable mapping.

The impact is mitigated by the fact that the man page says "Note that this
feature is fully available on x86-64, and partially on x86", so hopefully
people do not rely on it as a sole security measure.

Found by Karin Hossen and Thomas Imbert from Sogeti ESEC R&D.

https://bugs.launchpad.net/bugs/1725348
2017-11-12 17:28:48 +01:00
Zbigniew Jędrzejewski-Szmek f886559e55
Merge pull request #7186 from poettering/track-deps
rework unit dependency data structure to track why deps get created
2017-11-12 16:14:41 +01:00
Yu Watanabe 3df90f24cc core: allow to specify errno number in SystemCallErrorNumber= 2017-11-11 21:54:24 +09:00
Yu Watanabe 8cfa775f4f core: add support to specify errno in SystemCallFilter=
This makes each system call in SystemCallFilter= blacklist optionally
takes errno name or number after a colon. The errno takes precedence
over the one given by SystemCallErrorNumber=.

C.f. #7173.
Closes #7169.
2017-11-11 21:54:12 +09:00
Lennart Poettering dcebc9bae4 core: when a unit template is specified in SYSTEMD_WANTS=, instantiate it with sysfs path
This should make cases like the user's setup in #7109 a lot easier to
handle, as in that case we'll do the right escaping automatically.
2017-11-10 19:52:41 +01:00
Lennart Poettering 2651d03751 man: extend documentation on the unit name escaping logic 2017-11-10 19:45:29 +01:00
Boucman f332611abe device : reload when udev generates a "changed" event (#6850) 2017-11-10 17:00:32 +01:00
tblume ed457f1380 systemd-firstboot: add vconsole keymap support (#7035)
Enable systemd-firstboot to set the keymap.

RFE:

https://github.com/systemd/systemd/issues/6346
2017-11-10 10:31:44 +01:00
John Lin caa45f5b4e man: remove restrictions in [Install] section (#7278)
Now [Install] section also supports drop-in files.

Follow-up for 142468d895.
2017-11-10 00:12:01 +09:00
Lennart Poettering f9007887a6
Merge pull request #7268 from yuwata/rfe-7262
timesync: make poll interval configurable
2017-11-08 17:35:56 +01:00
Yu Watanabe fdfcb94631 man: update documents for RuntimeDirectory= and friends 2017-11-08 15:52:08 +09:00
Yu Watanabe a4465d0d4c timesync: make poll interval configurable
This adds PollIntervalMinSec= and PollIntervalMaxSec= to timesyncd.conf

Closes #7262.
2017-11-08 01:47:38 +09:00
Alessandro Ghedini 30046d9c89 man: fix reference to gateway hostname (#7258)
Follow-up to commit 1dc92a06e2 which didn't
catch all cases.
2017-11-07 19:13:15 +03:00
Shawn Landden ed440f6be9 condition: detect TOMOYO MAC (#7249)
TOMOYO is a Mandatory Access Control security module for Linux.
Rather than ship rules, TOMOYO features a learning mode.

http://tomoyo.osdn.jp/
http://tomoyo.osdn.jp/2.5/index.html.en
2017-11-07 19:12:36 +03:00
Yu Watanabe f907cc1620 timesync: add RootDistanceMaxSec= to timesyncd.conf (#7215)
Closes #7211.
2017-11-05 07:39:34 +01:00
Yu Watanabe 5b316b9ea6 meson: do not include man/meson.build if xsltproc not found
Fixes #7232.
2017-10-31 17:12:21 +09:00
Alan Jenkins f630daaae9 man: systemd.offline-updates: remove link to the doc it obsoletes (#7189)
https://www.freedesktop.org/wiki/Software/systemd/SystemUpdates/

> This document has been replaced by systemd.offline-updates(7) man page.

It's weird to visit the first "see also", and find that it is what the manpage replaces (and looks very similar).  Surely we should remove this link.
2017-10-27 10:15:40 +02:00
Lars Karlitski cc25a67e2a journalctl: add --output-fields= (#7181)
This option allows restricting the shown fields in the output modes that
would normally show all fields. It allows clients that are only
interested in a subset of the fields to access those more efficiently.
Also, it makes the resulting size of the output more predictable.

It has no effect on the various `short` output modes, because those
already only show a subset of the fields.
2017-10-27 12:10:47 +09:00
Lennart Poettering 14068e17f3 core: add support for expanding state/cache/log directory root in unit files
This augments %t which already resolves to the runtime directory root, and
should be useful for units that want to pass any of these paths in
command line arguments.

Example:

ExecStart=/usr/bin/mydaemon --datadir=%S/mydaemon

Why not expose a specifier resolving directly to the configured
state/runtime/cache/log dir? Three reasons:

1. Specifiers should be independent of configuration of the unit itself,
   and StateDirectory= and friends are unit configuration.  See
   03fc9c723c and related work.

2. We permit multiple StateDirectory= values per unit, and it hence
   wouldn't be clear which one is passed.

3. We already have %t for the runtime directory root, and we should
   continue with the same scheme.
2017-10-26 17:59:09 +02:00
Lennart Poettering 35682fd4a1 Merge pull request #7127 from keszybz/sundry-tweaks
Various unrelated small patches
2017-10-26 10:57:00 +02:00
Dimitri John Ledkov e6b2d948f8 resolved: create private stub resolve file for /etc/resolv.conf integration (#7014)
This creates a second private resolve.conf file which lists the stub resolver
and the resolved acquired search domains.

This runtime file should be used as a symlink target for /etc/resolv.conf such
that non-nss based applications can resolve search domains.

Fixes: #7009
2017-10-24 15:28:41 +02:00
Zbigniew Jędrzejewski-Szmek fc5ffacdab man: update the description of interval limiting (#7128)
Fixes #7125.
2017-10-24 09:41:52 +02:00
Lennart Poettering d3aa0a1c42 Merge pull request #6948 from pfl/radv_emit_dns
Add EmitDNS= and EmitDomains= network file configuration options
2017-10-23 18:39:07 +02:00