Commit Graph
100 Commits
Author SHA1 Message Date
Yu Watanabe 69ec5decf0 TODO: update 2017-12-15 09:11:54 +09:00
Yu Watanabe d852bda105 doc: update TRANSIENT-SETTINGS.md 2017-12-15 09:11:51 +09:00
Yu Watanabe 535e0d19a2 bus-unit-util: add path unit related options 2017-12-15 09:11:39 +09:00
Yu Watanabe 5b9fbf8989 core/path: implement transient path unit 2017-12-15 09:10:34 +09:00
Yu Watanabe 1e3b7b0ec8 core/dbus-timer: improve error messages 2017-12-15 09:10:28 +09:00
Yu Watanabe afcb1cd3a3 bus-unit-util: improve error messages 2017-12-15 09:10:21 +09:00
Yu Watanabe ed7e9b34ce bus-unit-util: remove unnecessary oom check
We cannot detect error by alloca().
2017-12-15 09:10:17 +09:00
Yu Watanabe 1bb8d1fce8 Merge pull request #7618 from tiagosh/sysctl_use_read_line
Make systemd-sysctl use read_line() and LONG_LINE_MAX
2017-12-14 13:58:53 +09:00
Yu Watanabe 314a6c0083 Merge pull request #7627 from poettering/lowercase-systemd
always spell out "systemd" in lowercase letters
2017-12-14 13:44:35 +09:00
Yu Watanabe ffbae6c978 Merge pull request #7588 from poettering/resolve-route-tweak
resolved domain routing tweaks and /etc/resolv.conf handling improvements
2017-12-13 13:43:55 +09:00
Yu Watanabe 74dc882153 Merge pull request #7569 from keszybz/doc-reverse-settings
Document reverse settings
2017-12-13 13:42:19 +09:00
Yu Watanabe f2b9f2c83e run: allow to specify multiple timer options 2017-12-11 21:21:10 +09:00
Yu Watanabe 268833ede7 core,run: add timer related options to Bus-API 2017-12-11 21:19:19 +09:00
Yu Watanabe 2d966746a3 bus-unit-util: check returned value
Follow-up for 784b9a1a32.
2017-12-11 21:04:10 +09:00
Yu Watanabe 4a0e9289bf resolved: fix wrong error code (#7601) 2017-12-10 16:27:19 +01:00
Yu Watanabe 848f01784e acl: fix typo in comment (#7580) 2017-12-08 13:34:25 +01:00
Yu Watanabe 8374cc6235 meson: warn if nobody-user and nobody-group are set to different name
It may work, but is very strange. So, let's warn about that.

v2:
Debian uses nobody and nogroup. Do not warn such case.
2017-12-07 17:19:11 +09:00
Yu Watanabe 6071202165 sysusers: use NOBODY_USER_NAME 2017-12-07 17:12:13 +09:00
Yu Watanabe a3d37fe9a3 test: use NOBODY_USER_NAME instead of hard-coded string "noody" 2017-12-07 17:12:09 +09:00
Yu Watanabe ad1afd60d4 bootspec: make boot_entries_select_default() static
The function is used only in bootspec.c.
So, let's make the function static.
2017-12-07 14:52:39 +09:00
Yu Watanabe 5838493a3a bootspec: fix debug message about default entry
When no entries matches with entry_oneshot, entry_default and
default_pattern, then log message shows a wrong entry.
Moreover, if none of entry_oneshot, entry_default and default_pattern
are set, then the index `i` is uninitialized.
This fixes such problem.
2017-12-07 14:50:49 +09:00
Yu Watanabe 6a483c5b2f Merge pull request #7497 from yuwata/fix-cpu-set
fixes related to cpu_set
2017-12-06 13:32:06 +09:00
Yu Watanabe c072c6d39a Merge pull request #7547 from hvenev/sysctl-no-net-default
Do not set `net.ipv4.conf.default.*`
2017-12-06 13:28:23 +09:00
Yu Watanabe a0605ddfcf Merge pull request #7549 from poettering/ptyfwd-fixes
pty forwarder fixes
2017-12-06 13:16:27 +09:00
Yu Watanabe 4e79aeaa65 test-execute: add tests for CPUAffinity= 2017-12-06 10:44:20 +09:00
Yu Watanabe 784b9a1a32 run: Allows the user to reset CPUAffinity= back to an empty list
Before this CPUAffinity= requires a valid cpu set, and the setting
cannot be reset. Moreover, if CPUAffinity= with empty string is passed,
then message container is closed without no values appended, thus
we get error.
This makes CPUAffinity= accepts empty string to reset the setting
and avoid error.
2017-12-06 10:32:48 +09:00
Yu Watanabe 501941aaf0 core: merge multiple CPUAffinity= settings 2017-12-06 10:32:42 +09:00
Yu Watanabe da681e1bd2 tree-wide: use cpu_set_mfree() 2017-12-06 10:32:38 +09:00
Yu Watanabe a9a2ed3f52 cpu-set-util: introduce cpu_set_mfree() 2017-12-06 10:32:35 +09:00
Yu Watanabe 6d8a29b2e1 cpu-set-util: internally merge two functions 2017-12-06 10:32:32 +09:00
Yu Watanabe 028f3a7f9c test-execute: add test for that DynamicUser= migrate StateDirectory=
Test for 949befd3f0.
2017-12-06 00:37:09 +09:00
Yu Watanabe f0e018e748 test-execute: cleanup
This makes rename the test units by a consistent naming scheme,
add several logs, and sort internal functions.
No functional change.
2017-12-06 00:36:55 +09:00
Yu Watanabe 3db93b3fc8 man: journal-remote: add missing options
This adds documents about supported, mainly SSL related,  options
in jurnal-remote, journal-upload, and journal-gatewayd.
2017-12-05 23:30:50 +09:00
Yu Watanabe bf2d3d7cae man: fix typo 2017-12-05 23:30:47 +09:00
Yu Watanabe e7ff71281d man: include standard-options.xml in systemd-hwdb(8) 2017-12-05 23:30:44 +09:00
Yu Watanabe c94c581c7b man: add missing options to and use standard-options.xml in udevadm(8) 2017-12-05 23:30:41 +09:00
Yu Watanabe 5639df9a80 udevadm: getopt() and help message cleanup
This adds missing options, mainly '--version' in getopt(), removes
an unused option from getopt().
Also, this adds a deprecate message in `udevadm hwdb`, and cleanups
help messages.

Follow-up for 65eb4378c3.
2017-12-05 23:30:10 +09:00
Yu Watanabe 49b5b3b403 dissect-image: remove unused variable when built without libcryptsetup (#7538) 2017-12-05 10:34:46 +01:00
Yu Watanabe a28b956732 test: increase timeout for test-async
The test calls sync(). So, on the heavy io system, the 30s default
can be easily exceeded.
2017-12-05 16:21:16 +09:00
Yu Watanabe 7f59dd3566 execute: define the variable mac_selinux_contex_net only when build with SELinux 2017-12-05 14:08:09 +09:00
Yu Watanabe 92b423b9b4 execute: define setup_smack() only if SMACK is enabled
This suppresses the following warning
```
execute.c:2149:12: warning: ‘setup_smack’ defined but not used [-Wunused-function]
 static int setup_smack(
            ^~~~~~~~~~~
```
2017-12-05 14:04:15 +09:00
Yu Watanabe 4e066f7fed bootspec: use blkid only if HAVE_BLKID is defined 2017-12-05 14:03:11 +09:00
Yu Watanabe d6806870a2 meson: fix indentation 2017-12-05 14:01:39 +09:00
Yu Watanabe a135d27105 man: lists short options in systemd-udevd.service(8)
Follow-up for 2d19c17e8e.
2017-12-04 21:05:38 +09:00
Yu Watanabe db9b9fb99d man: convert info to information or informational 2017-12-04 21:05:18 +09:00
Yu Watanabe af8cbf4741 man: add missing options 2017-12-04 21:02:09 +09:00
Yu Watanabe 8b2c2abc89 stdio-bridge: add missing option 2017-12-04 13:11:25 +09:00
Yu Watanabe fc11a1a204 Merge pull request #7534 from marcusfolkesson/helptext
Fix help textes for components
2017-12-04 10:34:25 +09:00
Yu Watanabe 5bc9f949a4 mount: use chase_symlinks() 2017-12-03 00:29:07 +09:00
Yu Watanabe f4938c2ea5 mount: do not require that the specified directory exists
If the specified direcotry does not exist, then systemd creates it
when the mount unit starts. So, it is not necessary to check the
existence in the client tool.
2017-12-03 00:29:03 +09:00
Yu Watanabe 6442c2109c mount: ignore error when stop non-existing automount unit
The command `systemd-mount -u` tries to stop both mount and automount
units. If the corresponding mount unit does not exist, then it is
user's fault, that is, the specified path is not a mount point.
However, not all mount units have corresponding autmount units.
Thus, the error about non-existing automount unit is not user's falut,
and showing the error may confuse users.
So, let's ignore the error of such case.
2017-12-03 00:28:59 +09:00
Yu Watanabe 95f35cccf0 test-fs-util: add more tests for chase_symlinks() 2017-12-03 00:28:50 +09:00
Yu Watanabe cd76d4c2fe test-fs-util: save current directory name 2017-12-03 00:25:06 +09:00
Yu Watanabe 46e92680e0 fs-util: remove comment about non-existing function 2017-12-03 00:25:00 +09:00
Yu Watanabe a1904a4663 fs-util: chase_symlinks(): remove unnecessary slash at the head
Before this, chase_symlinks("/../../foo/bar",...) returns //foo/bar.
This removes the unnecessary slash at the head.
2017-12-03 00:24:52 +09:00
Yu Watanabe ccac84d02e NEWS: systemd-mount also support -G option 2017-12-01 04:49:21 +09:00
Yu Watanabe e9ad86d509 NEWS: fix typo 2017-12-01 04:48:57 +09:00
Yu Watanabe 9d4f242a53 core/dbus-execute: actually set PassEnvironment= (#7510)
Follow-up for #7444.
2017-11-30 12:34:58 +01:00
Yu Watanabe 606df9a5a5 man: fix typo (#7511) 2017-11-30 12:02:20 +01:00
Yu Watanabe 191e9ef87d Merge pull request #7444 from poettering/dbus-no-spec
unit writing escaping fixes + related fixes and additions
2017-11-30 14:50:36 +09:00
Yu Watanabe 3235b4e70c Merge pull request #7492 from keszybz/coverity-fixes
A few more cleanups based on coverity and valgrind
2017-11-29 12:50:49 +09:00
Yu Watanabe 23cc81e7c2 test-cap-list: add more tests about capability_set_{from,to}_string() 2017-11-28 22:17:00 +09:00
Yu Watanabe 4c1a95fd84 test: move tests about cap_list_cap() from test-cap-list to test-capability 2017-11-28 22:14:54 +09:00
Yu Watanabe db4bd5bd62 cap-list: check range of numeric value 2017-11-28 22:06:34 +09:00
Yu Watanabe 6b86b9e65d test-bitmap: add tests for bitmap_copy() 2017-11-28 20:34:36 +09:00
Yu Watanabe ade0eb2190 test-architecture: add more tests 2017-11-28 20:34:32 +09:00
Yu Watanabe f30788ee23 test-alloc-util: add tests for memdup_suffix0() and greedy_realloc() 2017-11-28 20:33:58 +09:00
Yu Watanabe a4e6e06bc7 tests: add tests for empty string 2017-11-28 20:21:25 +09:00
Yu Watanabe d40c54fe56 alloc-util: coding style fix 2017-11-28 20:21:15 +09:00
Yu Watanabe dd5082a9de Merge pull request #7468 from yuwata/fix-7362
test and meson cleanups
2017-11-26 12:35:07 +09:00
Yu Watanabe 7accca234d fileio: include sys/mman.h 2017-11-26 02:40:23 +09:00
Yu Watanabe e481645174 meson: update header file to detect memfd_create() 2017-11-26 02:17:06 +09:00
Yu Watanabe 07b3a02643 test: set log_level to info in test-hwdb and check-help-*
These tests check the stderr. So, if the systemd.log_level=debug
is set in the kernel command line, then these tests fail.
This set log_level to info in hwdb-test.sh and meson-check-help.sh,
the kernel command line not to change the output of the target
programs.

Fixes #7362.
2017-11-26 00:01:55 +09:00
Yu Watanabe 62b1e758d3 nspawn: adjust path to static resolv.conf to support split usr
Fixes #7302.
2017-11-25 21:11:07 +09:00
Yu Watanabe 359b496f66 meson: remove abbreviations in status 2017-11-25 20:35:24 +09:00
Yu Watanabe a7353b4d14 firstboot: do not write vconsole.conf when arg_keymap is empty 2017-11-25 19:11:57 +09:00
Yu Watanabe 4540ae7400 machine: remove unused variables 2017-11-25 19:00:49 +09:00
Yu Watanabe 5354b0b7c0 journald: add _printf_ attribute to server_driver_message() 2017-11-25 19:00:44 +09:00
Yu Watanabe 8b3c4b5757 test-execute: test more % specifiers (#7450) 2017-11-24 10:17:28 +01:00
Yu Watanabe 8a38aac3a7 meson: do not install RPM macros if rpmmacrosdir is set to no (#7430)
Fixes #7427.
2017-11-23 14:20:22 +01:00
Yu Watanabe 706424c2e2 core/manager: check the existance of the special units (#7433)
In the user mode, not all special units exist.
So, we need to check whether the units exist or not before operate
something to the units.
Such the check was mistakenly dropped by e68537f0ba.

Fixes #7426.
2017-11-23 13:25:56 +01:00
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