Commit graph

3536 commits

Author SHA1 Message Date
Lennart Poettering 49e87292dc tmpfiles: make "f" lines behaviour match what the documentation says
CHANGE OF BEHAVIOUR — with this commit "f" line's behaviour is altered
to match what the documentation says: if an "argument" string is
specified it is written to the file only when the file didn't exist
before. Previously, it would be appended to the file each time
systemd-tmpfiles was invoked — which is not a particularly useful
behaviour as the tool is not idempotent then and the indicated files
grow without bounds each time the tool is invoked.

I did some spelunking whether this change in behaviour would break
things, but afaics nothing relies on the previous O_APPEND behaviour of
this line type, hence I think it's relatively safe to make "f" lines
work the way the docs say, rather than adding a new modifier for it or
so.

Triggered by:

https://lists.freedesktop.org/archives/systemd-devel/2018-January/040171.html
2018-01-24 10:54:10 +01:00
Lennart Poettering 7fa1074831 tmpfiles: create parent directories if they are missing for more line types
Currently, we create leading directories implicitly for all lines that
create directory or directory-like nodes.

With this, we also do the same for a number of other lines: f/F, C, p,
L, c/b (that is regular files, pipes, symlinks, device nodes as well as
file trees we copy).

The leading directories are created with te default access mode of 0755.
If something else is desired, users should simply declare appropriate
"d" lines.

Fixes: #7853
2018-01-23 21:19:00 +01:00
Lennart Poettering 2695b872bd man: it appears the description of async signal safety has its own man page now
Let's refer to the new page.
2018-01-23 19:09:54 +01:00
Lennart Poettering 5b7e1d8ef0 man: document explicitly that sd_journal_stream_fd() never shares fds
Also, clarify that O_NONBLOCK is turned off and that the fd is only
half-open.
2018-01-23 19:06:21 +01:00
Jan Klötzke 889d695d6c systemd-analyze: add service-watchdogs verb
New debug verb that enables or disables the service runtime watchdogs
and emergency actions during runtime. This is the systemd-analyze
version of the systemd.service_watchdogs command line option.
2018-01-22 18:10:12 +01:00
Jan Klötzke 2a12e32efa pid1: add option to disable service watchdogs
Add a "systemd.service_watchdogs=" option to the command line which
disables all service runtime watchdogs and emergency actions.
2018-01-22 18:10:03 +01:00
Susant Sahani fb5c821664 networkd: DHCPv6 client allow to configure Rapid Commit (#6930)
The DHCPv6 client can obtain configuration parameters from a
DHCPv6 server through a rapid two-message exchange solicit and reply).
When the rapid commit option is enabled by both the DHCPv6 client and
the DHCPv6 server, the two-message exchange is used, rather than the default
four-method exchange (solicit, advertise, request, and reply). The two-message
exchange provides faster client configuration and is beneficial in environments
in which networks are under a heavy load.

Closes #5845
2018-01-22 17:09:18 +09:00
Zbigniew Jędrzejewski-Szmek 91ec71c162 man: document that sd_j_stream_fd is signal safe (#7942)
Fixes #7912.
2018-01-21 18:51:55 +09:00
Zbigniew Jędrzejewski-Szmek 89f552c0e2 man: document signal unsafeness of journal functions
Fixes #7912.
2018-01-20 15:11:54 +11:00
Alan Jenkins bf105e38d5 man: sd_journal_stream_fd: no, fds are not shared (#7926)
sd_journal_stream_fd() does not return the same file descriptor across
different calls.  It can't possibly do so, because the file descriptor
is created using certain parameters passed by the caller.

Also the implementation clearly isn't doing this, it's just connecting
to a unix socket.

It opens exactly one file descriptor, and does not close it unless there
is a write failure.  Nothing like "temporarily multiple file descriptors
may be open".
2018-01-20 14:02:50 +11:00
Yu Watanabe fec0ccea86 man: fix typo (#7937)
Reported by Дилян Палаузов (https://github.com/dilyanpalauzov) in #7870.
2018-01-20 13:22:57 +11:00
Yu Watanabe 7e577c30d6
Merge pull request #7934 from keszybz/man-improvements
Man page improvements
2018-01-20 11:15:52 +09:00
Susant Sahani 09f5dfad2c networkd: add quickack option to route (#7896)
This patch adds quickack option to enable/disable TCP quick ack
mode for per-route.
2018-01-20 08:49:15 +09:00
Michal Sekletar 877dce40cb man: make clear that accessing network and mounting filesystems is not supported in udev rules (#7916)
These restrictions are implied by systemd options used for
systemd-udevd.service, i.e. MountFlags=slave and
IPAddressDeny=any. However, there are users out there getting tripped by
this, so let's make things clear in the man page so the actual
restrictions we implement by default have better visibility.
2018-01-20 08:47:27 +09:00
Zbigniew Jędrzejewski-Szmek 22a705631d man: clarify that Requires stop propagation only applies to explit requests
Follow-up for e79eabdb1b. There was an
apparent contradiction:

  man/systemd.unit says for Requires=:

  Besides, with or without specifying After=, this unit will be deactivated
  if one of the other units get deactivated.

  Also, some unit types may deactivate on their own (for example, a service
  process may decide to exit cleanly, or a device may be unplugged by the
  user), which is not propagated to units having a Requires= dependency.

Fixes #7870.
2018-01-20 10:45:02 +11:00
Zbigniew Jędrzejewski-Szmek 1317f55b9b man: alphabetize and move targets to proper sections in systemd.special 2018-01-20 10:38:09 +11:00
Zbigniew Jędrzejewski-Szmek 1655cdee04 man: fix example formatting in systemd.preset
Repeating "example" everywhere was not useful, so remove
that and improve the formatting a bit.
2018-01-20 10:37:34 +11:00
Zbigniew Jędrzejewski-Szmek c605bd00d2 man: document default for WakeOnLan 2018-01-20 10:33:15 +11:00
Zbigniew Jędrzejewski-Szmek 8eeaf79c86 man: add a note where coredump default values are
I don't want to include all the default values in the man page
because that's bound to get out of date…
2018-01-20 10:27:46 +11:00
Zbigniew Jędrzejewski-Szmek ee8f5a58b0 man: fix _STREAM_ID, _LINE_BREAK descriptions
Pointed out by Дилян Палаузов (https://github.com/dilyanpalauzov).
Fixes #7870.
2018-01-20 10:15:06 +11:00
Alan Jenkins a30504ed69 man: systemd-nspawn: fix list of default capabilities (#7925)
* Sort them alphabetically.
* Add CAP_MKNOD (commit 7f112f50fe added it).

the list is now in sync with the one at the top of nspawn.c
2018-01-19 04:11:11 +09:00
Yu Watanabe c7612b2005 man: mention that systemctl is-active or is-failed do not load units
See the discussion in the issue #7875.
2018-01-16 23:25:56 +09:00
Yu Watanabe fb76275a7a man: remove duplicated line
Follow-up for c46bc7e216.
2018-01-16 22:22:18 +09:00
John Lin 3c887f9733 man: fix broken kernel document links (#7892) 2018-01-16 18:29:35 +09:00
Shawn Landden c46bc7e216 machined: use getent to get default shell for machinectl shell (#7684)
Closes: https://github.com/systemd/systemd/issues/1395
2018-01-16 05:17:51 +11:00
Дилян Палаузов 5f79d69cba man: fix typo
Closes #7866.
2018-01-16 00:10:12 +09:00
Yu Watanabe 3249bf3125 man: logind: update reference
Fixes #7858.
2018-01-16 00:03:33 +09:00
Lennart Poettering 38edb7674b
Merge pull request #7582 from pfl/dhcp6_prefix_delegation
DHCPv6 prefix delegation
2018-01-15 12:02:37 +01:00
Zbigniew Jędrzejewski-Szmek f94abc667a man: --this-boot is deprecated (#7880)
This removes the last public reference. Follow-up for #7844.
2018-01-15 19:45:40 +09:00
Zbigniew Jędrzejewski-Szmek e0b6d3cabe
Merge pull request #7816 from poettering/chase-pid
Make MAINPID= and PIDFile= handling more restrictive (and other stuff)
2018-01-15 14:14:34 +04:00
Zbigniew Jędrzejewski-Szmek c557fc3e2f
Merge pull request #7844 from yuwata/bash-completion
update bash completions
2018-01-15 13:51:29 +04:00
Lennart Poettering db256aab13 core: be stricter when handling PID files and MAINPID sd_notify() messages
Let's be more restrictive when validating PID files and MAINPID=
messages: don't accept PIDs that make no sense, and if the configuration
source is not trusted, don't accept out-of-cgroup PIDs. A configuratin
source is considered trusted when the PID file is owned by root, or the
message was received from root.

This should lock things down a bit, in case service authors write out
PID files from unprivileged code or use NotifyAccess=all with
unprivileged code. Note that doing so was always problematic, just now
it's a bit less problematic.

When we open the PID file we'll now use the CHASE_SAFE chase_symlinks()
logic, to ensure that we won't follow an unpriviled-owned symlink to a
privileged-owned file thinking this was a valid privileged PID file,
even though it really isn't.

Fixes: #6632
2018-01-11 15:12:16 +01:00
Lennart Poettering 65c6b99094 notify: add new --uid= command
The new --uid= switch allows selecting the UID from which the
notificaiton messages shall originate.

This is primarily useful for testing purposes, but might have other
uses.
2018-01-11 15:12:16 +01:00
Susant Sahani 6b21ad33ab networkd: initcwn/initwnd use the right parsers
Closes #7765
2018-01-11 15:07:03 +01:00
Yu Watanabe a953b31a8b man: run: add missing option 2018-01-10 23:21:17 +09:00
Yu Watanabe 4deb55036b man: nspawn: add missing option 2018-01-10 23:20:20 +09:00
Yu Watanabe ee156e8d88 man: machinectl: fix typo 2018-01-10 23:17:00 +09:00
Zbigniew Jędrzejewski-Szmek 2269954112 Merge pull request #7191 from Mic92/systemd
The change in netdev.c done in the merge is necessary to avoid crashing in
cleanup. This is a follow-up for f3c33b234d.
2018-01-09 14:35:54 +01:00
Jörg Thalheim e5719363f5 networkd: add support for wireguard interface type
More information may be found at wireguard.com.
2018-01-09 14:00:49 +01:00
Lennart Poettering d97eac36d8 man: document all the new APIs we added 2018-01-05 13:58:33 +01:00
Lennart Poettering 8c095a070b man: let's drop references to /var/run in public man pages
/var/run is a legacy compatibility feature, let's avoid mentioning it.
2018-01-05 13:58:32 +01:00
Lennart Poettering 56d820b6a4 busctl: add a new --watch-bind switch
This is useful for testing, and early-boot scripting.
2018-01-05 13:55:08 +01:00
Patrik Flykt 982be97c00 man: Update man page regarding DHCPv6 Prefix Delegation 2018-01-04 15:22:44 +02:00
Zbigniew Jędrzejewski-Szmek 7f8b3d1d32 man: drop --arch from debootstrap invocation
Nowadays people use systemd on many different architectures, so we
shouldn't presuppose that they are using amd64. debootstrap defaults
to the native architecture and this should be good enough.
2018-01-04 11:16:19 +01:00
Lennart Poettering fb92330ccc
Merge pull request #7759 from yuwata/dbus-api
DBus-API: add more options in transient units
2018-01-03 18:41:32 +01:00
Susant Sahani 3a4f3e423d networkd: Tunnel allows tunnel traffic on ip6tnl devices (#7756)
where the remote endpoint is a local host address.
2017-12-29 23:19:21 +09:00
Susant Sahani 323d9329e7 networkd: allow to configure default/initial send/recv congestion window and store persistentl (#7750)
Currently we can only change initcwnd/initrwnd in the following way, and it does not store persistently:
sudo ip route change default via 192.168.1.1 dev tun0 initcwnd 20
sudo ip route change default via 192.168.1.1 dev tun0 initrwnd 20

For more details about initcwnd/initrwnd, please look at:
http://hjzhao.blogspot.com/2012/05/increase-initcwnd-for-performance.html
http://www.cdnplanet.com/blog/tune-tcp-initcwnd-for-optimum-performance
or google 'initcwnd initrwnd'

This work allows to configure the initcwnd and initrwnd.

Closes #2118
2017-12-29 23:18:05 +09:00
Yu Watanabe e73b1eb2fa man: remove empty paragraph 2017-12-29 16:55:31 +09:00
Lennart Poettering 559fdfa3e5
Merge pull request #7629 from poettering/condition-kernel-version
core,udev,networkd: add ConditionKernelVersion=
2017-12-26 20:48:58 +01:00
nulsoh 11b2dc547b man: systemd: fix typo (#7746)
Add missing _r_ for ctl-alt-del.target
2017-12-27 04:45:06 +09:00