Yu Watanabe
3000f85014
core/swap: load() should fail when neither of corresponding unit file nor /proc/swap entry does not exist
...
It is not necessary to label as loaded to a swap unit when neither of
corresponding unit file nor entry in /proc/swap does not exist.
This makes swap_load() to fail such a case.
Partially fixes #7370 .
2017-11-20 09:35:35 +09:00
Yu Watanabe
4a78b63780
core/automount: load() should fail when the unit file does not exist
...
It is not necessary to label as loaded to automount unit when its unit
file does not exist. So, let's make automount_load() to fail when the
unit file does not exist.
Partially fixes #7370 .
2017-11-20 09:35:30 +09:00
Yu Watanabe
7b872092d9
networkd: fix indentation
2017-11-18 01:24:41 +09:00
Yu Watanabe
4a3b54fd3c
networkd: remove debug message and unref when error
...
Follow-up for 8006aa32ee .
2017-11-18 01:22:38 +09: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
de345d3464
mount: show which argument is invalid
2017-11-17 16:43:38 +09:00
Yu Watanabe
dc3364832c
mount: add "-G" as shortcut for "--property=CollectMode=inactive-or-failed"
2017-11-17 16:43:33 +09:00
Yu Watanabe
798499278a
man: fix wrong tag ( #7358 )
2017-11-16 11:35:30 +01:00
Yu Watanabe
99c1401807
core/dbus-unit: add property_get_requires_mounts_for() to send correct message ( #7322 )
...
PR #7186 changes requires_mounts_for from strv to Hashmap.
So, it is necessary to implement a function for getting the property RequiresMountsFor=.
This introduces property_get_requires_mounts_for() which reads the Hashmap
and sends messages to bus.
Fixes #7321 .
2017-11-14 09:01:21 +01:00
Yu Watanabe
7f749487c5
test-execute: change path to python3 ( #7306 )
...
Change python3 path from /bin/python3 to /usr/bin/python3 to make
the test work on Ubuntu Xenial.
Follow-up for #7178 .
2017-11-12 16:09:00 +01:00
Yu Watanabe
74b1731c75
core/mount: fstype may be NULL
2017-11-12 14:27:25 +01:00
Yu Watanabe
7a18854fe7
test-execute: update test for SystemCallErrorNumber=
2017-11-11 21:54:29 +09:00
Yu Watanabe
3df90f24cc
core: allow to specify errno number in SystemCallErrorNumber=
2017-11-11 21:54:24 +09:00
Yu Watanabe
b4891260b9
test: add tests for syscall:errno style in SystemCallFilter=
2017-11-11 21:54:20 +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
Yu Watanabe
473d2ec39c
test: add test for parse_errno() and parse_syscall_and_errno()
2017-11-11 21:53:56 +09:00
Yu Watanabe
cf26c4a722
parse-util: add parse_errno() and parse_syscall_and_errno()
2017-11-11 21:29:17 +09:00
Yu Watanabe
1850d0d271
basic/errno-list: remove errno_max() and define ERRNO_MAX as 4095
...
In Linux kernel code, MAX_ERRNO is defined as 4095.
Here, we use that value for ERRNO_MAX.
2017-11-11 21:28:25 +09:00
Yu Watanabe
c54515b1e4
core/load-fragment: add RemoveIPC= ( #7288 )
...
PR #3865 introduced RemoveIPC= but the option is not listed in
load-fragment-gperf.gperf. So, the option could be used only via d-bus.
This adds RemoveIPC= in load-fragment-gperf.gperf. Then, now we can
set the option in unit files.
Fixes #7281 .
2017-11-10 10:15:55 +01:00
Yu Watanabe
3fcf65c352
test-parse-util: add more tests, mainly for empty string
2017-11-09 18:39:50 +09:00
Yu Watanabe
ccd1fc2f69
libsystemd-network: coding style fix
2017-11-09 18:39:41 +09:00
Yu Watanabe
1950011227
tree-wide: do not work in assert()
...
Follow-up for 85e55d14de .
2017-11-09 18:38:02 +09:00
Yu Watanabe
fdfcb94631
man: update documents for RuntimeDirectory= and friends
2017-11-08 15:52:08 +09:00
Yu Watanabe
8092a48cc1
core/execute: do not create RuntimeDirectory= under private/ sub-directory
...
RuntimeDirectory= often used for sharing files or sockets with other
services. So, if creating them under private/ sub-directory, we cannot
set DynamicUser= to service units which want to share something through
RuntimeDirectory=.
This makes the directories given by RuntimeDirectory= are created under
/run/ even if DynamicUser= is set.
Fixes #7260 .
2017-11-08 15:50:58 +09:00
Yu Watanabe
2bf13bd51e
core/load-fragment: fix alignment
2017-11-08 15:49:22 +09:00
Yu Watanabe
652bb2637a
core/execute: RuntimeDirectory= or friends requires mount namespace
...
Since #6940 , RuntimeDirectory= or their friends imply BindPaths=.
So, if at least one of them are set, mount namespace is required.
2017-11-08 15:48:51 +09:00
Yu Watanabe
23fd04e92d
test: add test for ReadOnlyPaths= with RuntimeDirectory=
2017-11-08 15:48:32 +09:00
Yu Watanabe
d18aff0422
core: ReadWritePaths= and friends assume '+' prefix when BindPaths= or freinds are set
...
When at least one of BindPaths=, BindReadOnlyPaths=, RootImage=,
RuntimeDirectory= or their friends are set, systemd prepares
a namespace under /run/systemd/unit-root. Thus, ReadWritePaths=
or their friends without '+' prefix is completely meaningless.
So, let's assume '+' prefix when one of them are set.
Fixes #7070 and #7080 .
2017-11-08 15:48:01 +09:00
Yu Watanabe
7bcef4efe6
core: remove compile_read_write_paths()
...
From 6c47cd7d3b , RuntimeDirectory= and
their friends also imply BindPaths=. Thus, implying ReadWritePaths=
is meaningless.
2017-11-08 15:07:22 +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
Yu Watanabe
85e55d14de
tree-wide: do not work in assert() ( #7271 )
...
Fixes #7270 .
2017-11-07 16:04:20 +03:00
Yu Watanabe
f907cc1620
timesync: add RootDistanceMaxSec= to timesyncd.conf ( #7215 )
...
Closes #7211 .
2017-11-05 07:39:34 +01:00
Yu Watanabe
2e293b4a14
journal-remote: set description to timer_event ( #7234 )
...
Follow-up for 5e38eb931f .
2017-11-01 10:13:00 +01:00
Yu Watanabe
3bd469546b
meson: do not create systemd-user-sessions.service if PAM is disabled
...
Fixes #7227 .
2017-10-31 17:12:36 +09: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
Yu Watanabe
21df96c0b0
resolved: change newline position in stub-resolv.conf ( #7216 )
...
Follow-up for e6b2d948f8 .
2017-10-30 10:34:41 +01:00
Yu Watanabe
a8caf8b251
Merge pull request #7066 from poettering/specifier-update
...
extend unit file specifier expansion a bit + add a test for it
2017-10-27 12:09:26 +09:00
Yu Watanabe
3f856a2813
core: fix D-Bus API
...
This fixes bugs introduced by cffaed83e8 .
Closes #7129 .
2017-10-24 17:21:27 +09:00
Yu Watanabe
c85f1346c0
man: add explanation about target's DefaultDependencies= ( #7120 )
...
Closes #7113 .
2017-10-18 08:30:35 +02:00
Yu Watanabe
3bd493dc93
man: comment a requirement about the static user or group when DynamicUser=yes
2017-10-18 15:30:00 +09:00
Yu Watanabe
e2b0cc3415
core: fix invalid error message
...
The error message corresponds to EILSEQ is "Invalid or incomplete
multibyte or wide character", and is not suitable in this case.
So, let's show a custom error message when the function
dynamic_creds_realize() returns -EILSEQ.
2017-10-18 08:57:59 +09: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
Yu Watanabe
9ec655cbbd
dynamic-user: permit the case static uid and gid are different
...
This makes systemd supports the case that DynamicUser=yes and
static user and group exist such that uid and gid of them are different.
We only refuse the operation when user does not exist but the group
with the same name exists.
Fixes #7013 .
2017-10-11 14:41:19 +09:00
Yu Watanabe
9da440b1b3
dynamic-user: label functions not necessary to export as static
2017-10-11 12:46:27 +09: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
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
Yu Watanabe
689ca202e7
nss-systemd: if cannot open bus, then try to read user info directly ( #6971 )
...
If sd_bus_open_system() fail, then try to read information about
dynamic users from /run/systemd/dynamic-uid.
This makes services can successfully call getpwuid() or their friends
even if dbus.service is not started yet.
Fixes #6967 .
2017-10-04 19:29:36 +02:00
Yu Watanabe
4c70109600
tree-wide: use IN_SET macro ( #6977 )
2017-10-04 16:01:32 +02:00
Yu Watanabe
6b5bb2f9d0
man: fix that the same option is listed twice ( #6991 )
2017-10-04 14:43:00 +02:00
Yu Watanabe
9f2d41a65f
load-fragment: do not create empty array
...
Originally added in 4589f5bb0a .
C.f. 8249bb728d and #6746 .
2017-10-04 11:23:42 +02:00
Yu Watanabe
07883f198d
man: empty string resets the list of NTP servers ( #6984 )
2017-10-04 11:09:32 +02:00
Yu Watanabe
8502cadd4c
Merge pull request #6940 from poettering/magic-dirs
...
make sure StateDirectory= and friends play nicely with DynamicUser= and RootImage=/RootDirectory=
2017-10-03 13:28:48 +09:00
Yu Watanabe
945c2931bb
libsystemd: use IN_SET macro
2017-09-28 17:37:59 +09:00
Yu Watanabe
74dead3461
networkd: use assert_not_reached()
2017-09-28 15:38:50 +09:00
Yu Watanabe
25a1bffc8f
networkd: use IN_SET macro
2017-09-28 15:37:38 +09:00
Yu Watanabe
615ded6233
network: change log level when sd_rtnl_message_get_family() returns invalid family ( #6923 )
...
From bce67bbee3 , systemd-networkd always shows
```
rtnl: received address with invalid family type 32, ignoring.
```
during boot-up. In the code, there are log_warning() and log_debug() for the
same situation, and the log_debug() is never called. So, let's lower the
log level and remove never called function.
2017-09-27 17:55:13 +02:00
Yu Watanabe
0fe5062975
shared: allow to input empty string to config_parse_path()
...
Fixes #6633 .
2017-09-05 15:13:05 +09:00
Yu Watanabe
499295fb46
socket: Symlinks= with empty string resets the list of paths.
2017-09-05 15:08:59 +09:00
Yu Watanabe
7dd0974620
test: update test-unit-file
...
Follow-up for c792ec2e35 .
2017-09-04 16:25:28 +09:00
Yu Watanabe
de7070b49a
man: add examples for CapabilityBoundingSet=
...
Follow-up for c792ec2e35 .
2017-09-04 16:20:55 +09:00
Yu Watanabe
e2be442e79
systemd-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used
...
Fixes #6591 .
2017-09-04 10:55:51 +09:00
Yu Watanabe
4185da7c4d
systemd-mount: fix that wrong argument is used for arg_mount_what
2017-09-01 17:11:23 +09:00
Yu Watanabe
e8d85bc062
man: LockPersonality= takes a boolean argument ( #6718 )
...
Follow-up for 78e864e5b3 .
2017-09-01 09:38:41 +02:00
Yu Watanabe
621a2c804c
man: fix path for storing random seed
2017-08-31 18:37:27 +09:00
Yu Watanabe
d7bdedae87
TODO: update
2017-08-31 18:37:22 +09:00
Yu Watanabe
181b4f56e7
unit: use StateDirectory= instead of RequiresMountsFor=
2017-08-31 18:37:11 +09:00
Yu Watanabe
96f9f6aca7
unit: drop redundant options
2017-08-31 18:29:41 +09:00
Yu Watanabe
ada5e27657
core: StateDirectory= and friends imply RequiresMountsFor=
2017-08-31 18:19:35 +09:00
Yu Watanabe
ae978b9f6c
bus-util: remove unnecessary initializations
2017-08-31 17:08:30 +09:00
Yu Watanabe
52610b020c
systemctl: show capabilities in human readable format
...
Follow-up for 21771f338d .
2017-08-31 17:07:28 +09:00
Yu Watanabe
e64aae43dd
man: journal-remote: add detailed condition when SplitMode=none must be used
2017-08-30 17:03:37 +09:00
Yu Watanabe
cb30d3ba66
journal-remote: show error if SplitMode=host with 'active' source is specified
2017-08-30 16:56:41 +09:00
Yu Watanabe
5ed0dcf4d5
test: drop Exec* prefixes to obtain paths of executables
2017-08-30 16:00:07 +09:00
Yu Watanabe
53d133ea1b
timesync: move stamp file to /var/lib/systemd/timesync/clock
2017-08-30 15:59:57 +09:00
Yu Watanabe
6b1b9f75c8
journal-remote: show error message if output file name does not end with .journal
...
`journalctl -o export | systemd-journal-remote -o /tmp/dir -`
gives the following error messages.
```
Failed to open output journal /tmp/dir: Invalid argument
Failed to get writer for source stdin: Invalid argument
Failed to create source for fd:0 (stdin): Invalid argument
```
And these are hard to understand what is the problem.
This commit makes journal-remote check whether the output file name
ends with .journal suffix or not, and if not, output error message.
2017-08-27 16:34:57 +09:00
Yu Watanabe
c298b083c6
man: journal-remote: active mode without --url option requires output filename
...
Closes #6675 .
2017-08-27 16:20:16 +09:00
Yu Watanabe
87a85e25a2
units: make use of !! ExecStart= prefix in systemd-timesyncd.service
...
Let's make use of !! to run timesyncd with ambient capabilities on
systems supporting them.
2017-08-27 01:41:12 +09:00
Yu Watanabe
c61f302d3c
units: make use of !! ExecStart= prefix in systemd-networkd.service
...
Let's make use of !! to run networkd with ambient capabilities on
systems supporting them.
2017-08-27 01:40:47 +09:00
Yu Watanabe
5ce96b141a
Merge pull request #6582 from poettering/logind-tty
...
various tty path parsing fixes
2017-08-26 22:12:48 +09:00
Yu Watanabe
2c5ad0fd6d
Merge pull request #6577 from poettering/more-exec-flags
...
add ! and !! ExecStart= flags to make ambient caps useful
2017-08-26 21:49:05 +09:00
Yu Watanabe
d7ea7bb8a8
network,resolve: remove comments related to kdbus
2017-08-23 12:42:35 +09:00
Yu Watanabe
fb72b1d99f
networkd: do not fail manager_connect_bus() if dbus is not active yet
...
Fixes #6618 .
2017-08-23 12:42:22 +09:00
Yu Watanabe
9b5c390fe3
man: mention configuration directories to sysusers.d
2017-08-23 12:40:07 +09:00
Yu Watanabe
521d3679c1
Merge pull request #6615 from ssahani/client-id
...
networkd: fix spell DCHPClientIdentifier (DCHP => DHCP)
2017-08-22 20:19:19 +09:00
Yu Watanabe
2d56bdabc2
man: fix wrong citation in systemd-sysctl.service.xml
2017-08-22 13:26:09 +09:00
Yu Watanabe
4429c69f8d
units: do not perform m4 if not necessary ( #6575 )
2017-08-09 09:13:41 -04:00
Yu Watanabe
debe5d2376
unit: remove redundant options
2017-08-08 12:17:12 +09:00
Yu Watanabe
29444df23b
tmpfiles: drop systemd-remote.conf
...
The directories are only used by the specific services, and
created before the services are started. So, it is not necessary
to create them by systemd-tmpfiles.
2017-08-08 12:17:07 +09:00
Yu Watanabe
d0e62ae0f6
units: use {State,Logs}Directory= if they are applicable
2017-08-08 12:17:01 +09:00
Yu Watanabe
cffaed83e8
core: add missing properties in D-Bus API
...
Closes #6466 .
2017-08-08 00:37:02 +09:00
Yu Watanabe
b16bd5350f
seccomp-util: add parse_syscall_archs()
2017-08-07 23:41:52 +09:00
Yu Watanabe
29ea9f0f42
process-util: add sched_{policy,priority}_is_valid()
2017-08-07 23:41:39 +09:00
Yu Watanabe
032cf8e4d2
cpu-set-util: add parse_cpu_set()
2017-08-07 23:40:40 +09:00
Yu Watanabe
07d46372fe
securebits-util: add secure_bits_{from_string,to_string_alloc}()
2017-08-07 23:40:25 +09:00