Commit graph

30345 commits

Author SHA1 Message Date
Michal Sekletar fab35afabf mount: make sure we unmount tmpfs mounts before we deactivate swaps (#7076)
In the past we introduced this property just for tmp.mount. However on
todays systems usually there are many more tmpfs mounts. Most notably
mounts backing XDG_RUNTIME_DIR for each user.

Let's generalize what we already have for tmp.mount and implement the
ordering After=swap.target for all tmpfs based mounts.
2017-10-16 16:15:05 +02:00
Zbigniew Jędrzejewski-Szmek 0051ca1f63 Merge pull request #7061 from lkundrak/lr/serialized-environment
Environment serialization/deserialization inconsistently validates the variables
2017-10-15 12:47:30 +02:00
Boucman 92f34a9c47 Display the systemctl status in green if state is "running" (#7094) 2017-10-15 12:22:47 +02:00
Zbigniew Jędrzejewski-Szmek a524f12457 Merge pull request #7062 from yuwata/test-bind-paths
test: add test for BindPaths= and BindReadOnlyPaths=
2017-10-13 10:19:55 +02:00
John Lin 7cca1437d6 gitignore: ignore output file of mkid (#7081)
mkid is from https://www.gnu.org/software/idutils/
2017-10-13 10:17:43 +02:00
Christian Hesse 1dc92a06e2 man: update changes about gateway -> _gateway (#7085)
Commit 5248e7e1f1
(resolved,nss-myhostname: use _gateway for the gateway) changed how the
gateway is resolved. Reflect the change in documentation.

Close #7084.
2017-10-13 16:10:26 +09:00
Lubomir Rintel 4e93d369b9 systemctl: clarify --global, --root and --runtime options (#7071)
They're not only for enabling.
2017-10-12 08:14:25 +02:00
Vito Caputo ed05452014 shared: add vectorized parse_field() (#7056)
By vectorizing parse_field() the chain of parse_field() calls in
output_short() can be replaced with a single call receiving a description
of the desired fields and their targets.

While at it, eliminate the repeated strlen() calls performed on constant
field names by making parse_field() receive the field length, and storing
it in the ParseFieldVec at compile time.

Also sort the output_short() fields so the short ones are tried first, for
a minor efficiency gain.

In addition to making the code less repetitive, gcc in my tests now inlines
the parse_fieldv() call in output_short().
2017-10-12 08:14:07 +02:00
Yu Watanabe 709dbeac14 core: cleanup for enforce_groups() (#7064)
SupplementaryGroups= is preprocessed in get_supplementary_groups().
So, it is not necessary to input ExecContext to enforce_groups().
2017-10-12 08:10:25 +02:00
Yu Watanabe 038a373651 test-execute: always use /bin/sh 2017-10-12 13:26:39 +09:00
Yu Watanabe d053b72bdd test: add test for BindPaths= and BindReadOnlyPaths=
Follow-up for a8cabc612b.
2017-10-12 13:25:06 +09:00
John Lin 35d379b2e8 systemctl: supress enable/disable messages when -q is given (#7067)
Fixes: #7036
2017-10-11 20:22:51 +02:00
Lennart Poettering 523578aa6d basic: split unit-name.[ch] into two (#7065)
It always bothered me a bit that unit-name.[ch] contains so many
definitions that aren't really have much to do with unit nameing, for
example all the unit state definitions.

With this patch unit-name.[ch] is split into two: the file now contains
only the unit naming related operations, and everything else is split
out into a new set of files unit-def.[ch]. That's mostly unit state
stuff as well as dbus path and interface name operations.

No functional changes. This just moves code around.

(Note as both .c files include each other's headers this doesn't make
the build simpler or anything. All it does is make the C files a bit
shorter, and medicate my pretend OCD)
2017-10-11 20:21:28 +02:00
Lubomir Rintel c7d797bbdf basic/env-util: don't relax unesaping of serialized environment strings
We wrote them ourselves -- they shouldn't contain invalid sequences.
2017-10-11 15:05:38 +02:00
Lubomir Rintel ea43bdd1d7 basic/env-util: drop the validation when deserializing environment
The environment variables we've serialized can quite possibly contain
characters outside the set allowed by env_assignment_is_valid(). In
fact, my environment seems to contain a couple of these:

  * TERMCAP set by screen contains a '\x7f' character
  * BASH_FUNC_module%% variable has a '%' character in name

Strict check of environment variables name and value certainly makes sense for
unit files, but not so much for deserialization of values we already had
in our environment.
2017-10-11 15:01:32 +02:00
Florian Klink da172fa9ea test-dhcp-client: fix typos in comment (#7052) 2017-10-11 14:45:48 +02:00
Susant Sahani 0da812036f networkd: bridge allow AgeingTimeSec to be set 0 (#7021)
Closes #7019.
2017-10-11 09:08:05 +02:00
Vito Caputo 3f6aef0d02 Merge pull request #7058 from yuwata/fix-7055
core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths= is set
2017-10-10 21:05:00 -07:00
Yu Watanabe a8cabc612b core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths= is set
This fixes a bug introduced by 6c47cd7d3b.

Fixes #7055.
2017-10-11 12:28:22 +09:00
Jakub Wilk dcfaecc70a man: fix typos (#7029) 2017-10-10 21:59:03 +02:00
Zbigniew Jędrzejewski-Szmek fdaf359bce Merge pull request #7044 from poettering/minidocfixes
tiny doc fixes
2017-10-10 21:57:39 +02:00
AsciiWolf f7ed48a9ae l10n: update Czech Translation (#7049) 2017-10-10 21:52:52 +02:00
Zbigniew Jędrzejewski-Szmek 7081228acd Merge pull request #7045 from poettering/namespace-casing
some super-trivial fixes to namespace.c
2017-10-10 21:50:17 +02:00
Zbigniew Jędrzejewski-Szmek 651d47d14b tests: skip tests when cg_pid_get_path fails (#7033)
v2:
- cast the fstype_t type to ull, because it varies between arches.
  Making it long long should be on the safe side.
2017-10-10 20:55:20 +02:00
Lennart Poettering b74023db06 Merge pull request #7003 from yuwata/enable-dynamic-user
timesyncd, journal-upload: Enable DynamicUser=
2017-10-10 10:05:43 +02:00
gwendalcr e2c2d70ba7 rules: Add MODEL_ID for NVMe device (#7037)
To mimic MODEL_ID variable built for ATA and SCSI devices, add rules
to add MODEL_ID variable for NVMe devices.

TEST: Check on a system with NVMe device that MODEL_ID variable is
present:
 udevadm info --query=all -n /dev/nvme0n1p1 | grep ID_MODEL
and
 udevadm info --query=all -n /dev/nvme0n1p1 | grep ID_MODEL
return:
E: ID_MODEL=SAMSUNG...
2017-10-10 10:03:38 +02:00
Lennart Poettering 0fa5b8312a namespace: make ns_type_supported() a tiny bit shorter
namespace_type_to_string() already validates the type paramater, we can
use that, and shorten the function a bit.
2017-10-10 09:52:08 +02:00
Lennart Poettering bb0ff3fb1b namespace: change NameSpace → Namespace
We generally use the casing "Namespace" for the word, and that's visible
in a number of user-facing interfaces, including "RestrictNamespace=" or
"JoinsNamespaceOf=". Let's make sure to use the same casing internally
too.

As discussed in #7024
2017-10-10 09:51:58 +02:00
Michal Sekletar 6e2d7c4f13 namespace: fall back gracefully when kernel doesn't support network namespaces (#7024) 2017-10-10 09:46:13 +02:00
Sergey Ptashnick 4984902ccb catalog,po: update Russian translation (#7041) 2017-10-10 09:44:52 +02:00
Lennart Poettering 1d5f179153 man: fix link to documentation of slice concept 2017-10-10 09:43:37 +02:00
Lennart Poettering ad2caa7d5f man: symlinks are made onto "unit files", not "units"
We should be careful when talking about "units" and "unit files". The
latter should be the concept on disk, and the former, the loaded version
of it. However, as a single unit file can result in multiple loaded
units (think templates), and a units can also exist with no unit file at
all (think .device units), we should be precise.

As symlinks are created on unit files rather than units (as symlinks are
an fs object, and unit files are too, but units are not), let's say so
here.
2017-10-10 09:41:17 +02:00
Muhammet Kara be6e38ed1d Updated Turkish translation (#7017) 2017-10-09 15:39:19 +02:00
Lennart Poettering ba67f686bf Merge pull request #7034 from keszybz/modules-load-downgrade-errors
Downgrade errors resulting from user configuration in modules-load
2017-10-09 15:38:30 +02:00
Lennart Poettering 6fc373ee43 update TODO 2017-10-09 15:22:45 +02:00
Zbigniew Jędrzejewski-Szmek 6cbb0af16e modules-load: downgrade error on ENODEV/ENOENT
Some kernel modules may be loaded if the hardware does not exist
(usually when the hardware is hot-pluggable), while others fail with
ENODEV. Let's make those two cases more similar, and simply log
modules which cannot be loaded because of missing hardware without
failing systemd-modules-load.service.

For modules which don't exist, let's warn, but not fail the whole
service. I think a warning is appropriate because it's likely that
a typo was made.
2017-10-08 22:29:45 +02:00
Zbigniew Jędrzejewski-Szmek 2c3f0bb207 kmod_module_probe_insert_module returns 0 on success, != 0 on failure
More specifically, it should return > 0 only for conditions specified in
probe_flags. We only set KMOD_PROBE_APPLY_BLACKLIST in probe_flags, so the
code was correct, but add an assert to clarify this.
2017-10-08 22:29:32 +02:00
Mike Gilbert 1e99c1ee82 test: skip hwdb and sysv-generator if the features are disabled (#7026) 2017-10-08 22:14:45 +02:00
Zbigniew Jędrzejewski-Szmek 232ac0d681 util-lib: introdude _cleanup_ macros for kmod objects 2017-10-08 22:04:07 +02:00
bleep_blop 132523e7f7 man: fix typo for !! in systemd.service (#7031)
!! must be very similar to !, not itself.
2017-10-08 22:01:08 +02:00
Piotr Drąg b32bceb6c3 po: update Polish translation (#7015) 2017-10-06 16:10:33 +02:00
Lennart Poettering c1719d8bc9 NEWS: patch in today's date for the 235 release 2017-10-06 10:18:04 +02:00
Zbigniew Jędrzejewski-Szmek 83fefc8888 man: explain precedence for options which take a list (#7010)
Hopefully finally fixes #6639.
2017-10-06 10:04:49 +02:00
Yu Watanabe a7456af52c meson: fix feature list (#7011) 2017-10-06 09:33:21 +02:00
Yu Watanabe 4240cb02fd sysusers: do not create unneeded users 2017-10-06 16:06:47 +09:00
Yu Watanabe 941afc4b90 unit: enable DynamicUser= for journal-upload 2017-10-06 16:06:21 +09:00
Yu Watanabe 48d3e88c18 timesyncd: enable DynamicUser= 2017-10-06 16:05:20 +09:00
Yu Watanabe c31ad02403 mkdir: introduce follow_symlink flag to mkdir_safe{,_label}() 2017-10-06 16:03:33 +09:00
Frederic Crozat 4a1f92c704 tmpfiles: remove old ICE and X11 sockets at boot (#6979)
tmpfiles: remove old ICE and X11 sockets at boot

When not using tmpfs based /tmp, leftover sockets
might prevent X startup. Ensure directory is clean at boot time.
2017-10-06 01:28:19 +02:00
g0tar 91277dff73 pass currently completed word to systemctl list-unit-files/list-units (#6927)
This change noticeably increases completion performance at the expense
of preventing possible _correct, _approximate or any matcher-list rules.
Still, responsiveness increase so huge seems to make it worth the price.
2017-10-05 22:17:51 +02:00