Lennart Poettering
b2238e380e
test,systemctl,nspawn: use "const char*" instead of "char*" as iterator for FOREACH_STRING()
...
The macro iterates through literal strings (i.e. constant strings),
hence it's more correct to have the iterator const too.
2019-01-16 12:29:30 +01:00
Lucas Werkmeister
2732587540
Enable regular file and FIFO protection
...
These sysctls were added in Linux 4.19 (torvalds/linux@30aba6656f ), and
we should enable them just like we enable the older hardlink/symlink
protection since v199. Implements #11414 .
2019-01-16 12:22:01 +01:00
Joost Heitbrink
850115b3a1
Fix omission in docs
...
change "if is missing" to "if /etc/machine-id is missing".
2019-01-15 21:45:06 +01:00
Zbigniew Jędrzejewski-Szmek
29a93cb19d
Merge pull request #11418 from yuwata/fix-11404
...
network: fix infinite loop in setting up wireguard
2019-01-15 21:04:32 +01:00
Zbigniew Jędrzejewski-Szmek
477fd8e886
Merge pull request #11345 from kirbyfan64/tmpfiles-c-empty
...
tmpfiles: Make C still copy if the destination directory is empty
2019-01-15 16:54:19 +01:00
Zbigniew Jędrzejewski-Szmek
acd1220cff
Merge pull request #11428 from yuwata/network-issue-9130-v2
...
network: wait for kernel to reply ipv6 peer address
2019-01-15 16:44:27 +01:00
Zbigniew Jędrzejewski-Szmek
774d6375d6
NEWS: typos
2019-01-15 14:56:24 +01:00
Yu Watanabe
9e2bbf9915
network: make Link and NetDev always have the valid poiter to Manager
...
c4397d94c3
introduces
link_detach_from_manager() and netdev_detach_from_manager(), and they
set Link::manager or NetDev::manager NULL.
But, at the time e.g. link is removed, hence link_drop() is called,
there may be still some asynchronous netlink call is waiting, and
their callbacks hit assertion.
This make {link,netdev}_detach_from_manager() just drop all references
from manager, but keep the pointer to manager.
Fixes #11411 .
2019-01-15 14:48:53 +01:00
Mikhail Kasimov
50198038c8
Update uk.po
...
Updated translation for ```src/timedate/org.freedesktop.timedate1.policy```
2019-01-15 14:37:50 +01:00
Zbigniew Jędrzejewski-Szmek
a6ca3c1921
udev: do logging before setting variables to NULL
...
gcc-9 diagnoses this as an error.
Reported by Jeff Law.
2019-01-15 13:58:45 +01:00
Mikhail Kasimov
06156ed2cf
Update systemd-system.conf.xml
...
Updating due to phrase "Defaults to DefaultTimeoutStartSec= from the manager configuration file, except when Type=oneshot is used, in which case the timeout is disabled by default (see systemd-system.conf)" from [0] https://github.com/systemd/systemd/blob/master/man/systemd.service.xml
2019-01-15 13:56:35 +01:00
Topi Miettinen
a1e92eee3e
Remove 'inline' attributes from static functions in .c files ( #11426 )
...
Let the compiler perform inlining (see #11397 ).
2019-01-15 08:12:28 +01:00
Yu Watanabe
7e6636196a
test: add a testcase for Address.Peer= with ipv6
...
Testcase for #9130 .
2019-01-15 07:37:15 +09:00
Susant Sahani
dfef713f3e
networkd: wait for kernel to reply ipv6 peer address
...
When we configure address with peer, peer address is repliedby kernel.
Hence add the peer when it is available.
Closes #9130 .
2019-01-15 07:36:14 +09:00
Michael Biebl
1c8e48f506
Merge pull request #11417 from yuwata/fix-11416
...
udevadm: fix segfault
2019-01-14 02:39:11 +01:00
Yu Watanabe
da44fb8a72
test: add a testcase for 23 wirguard peers
2019-01-14 10:08:58 +09:00
Yu Watanabe
e1f717d4a0
network: wireguard: rename and split set_wireguard_interface()
...
This does not change the behavior except for fixing the issue #11404 .
Fixes #11404 .
2019-01-14 10:08:40 +09:00
Yu Watanabe
33c2ea8019
netlink: set maximum size of WGDEVICE_A_IFNAME
2019-01-14 09:47:31 +09:00
Yu Watanabe
0eba88dc9f
udevadm: fix segfault
...
Fixes #11416 .
2019-01-14 06:34:19 +09:00
Yu Watanabe
227bcd91b4
man: fix reference
...
Fixes #11396 .
2019-01-13 11:12:20 +01:00
Zbigniew Jędrzejewski-Szmek
0d432661fa
Merge pull request #11409 from yuwata/udev-synthetic-errno
...
udev: update logs
2019-01-13 11:11:22 +01:00
Yu Watanabe
8d6c4b310d
udev: use ENODATA when 'No entry found from hwdb'
...
Before:
IMPORT builtin 'hwdb' fails: No such file or directory
After:
IMPORT builtin 'hwdb' fails: No data available
Previous log is confusing and may be understood as hwdb file not exist.
2019-01-13 18:04:10 +09:00
Yu Watanabe
a119328608
udev: use SYNTHETIC_ERRNO() macro in log_device_*_errno()
2019-01-13 17:50:47 +09:00
Evgeny Vereshchagin
9bbcfac1cf
Merge pull request #11393 from mrc0mmand/fix-service-masking-in-TEST-01-BASIC
...
test: drop service masking in TEST-01-BASIC
2019-01-13 04:45:48 +03:00
Yu Watanabe
40f116f53d
README: mention that meson-0.49 is required to build PIEs
...
Follow-up for 4e4bbc439e
.
2019-01-13 09:47:10 +09:00
Yu Watanabe
bd36ef0a7c
NEWS: add more entries
2019-01-13 09:47:10 +09:00
Zbigniew Jędrzejewski-Szmek
455027c98f
NEWS: document deprecation of PermissionsStartOnly= in v240
...
https://github.com/systemd/systemd/pull/10802#issuecomment-453772058
2019-01-13 09:47:10 +09:00
Zbigniew Jędrzejewski-Szmek
b4ff3dbb66
NEWS: update for v241
2019-01-13 09:47:10 +09:00
Topi Miettinen
7ae3561a5a
Delete duplicate lines
...
Found by inspecting results of running this small program:
int main(int argc, const char **argv) {
for (int i = 1; i < argc; i++) {
FILE *f;
char line[1024], prev[1024], *r;
int lineno;
prev[0] = '\0';
lineno = 1;
f = fopen(argv[i], "r");
if (!f)
exit(1);
do {
r = fgets(line, sizeof(line), f);
if (!r)
break;
if (strcmp(line, prev) == 0)
printf("%s:%d: error: dup %s", argv[i], lineno, line);
lineno++;
strcpy(prev, line);
} while (!feof(f));
fclose(f);
}
}
2019-01-12 16:02:26 +01:00
Zbigniew Jędrzejewski-Szmek
899072c0cd
Merge pull request #11196 from yuwata/udevd-tiny-cleanups
...
udev: tiny cleanups
2019-01-12 16:00:52 +01:00
Frantisek Sumsal
d7283fc157
test: limit environments for systemd-hwdb-update under ASan
2019-01-12 11:44:39 +01:00
Frantisek Sumsal
5b2172ee50
test: bump QEMU_SMP to 4 when running under ASan/UBSan
2019-01-12 11:38:21 +01:00
Frantisek Sumsal
670bec2b07
test: bump QEMU memory to 1536M when running under ASan/UBSan
2019-01-12 11:38:21 +01:00
Yu Watanabe
e0b7a5d151
udevd: refuse devices which do not have ACTION property
2019-01-12 09:32:20 +09:00
Yu Watanabe
33ad742a84
udevd: drop unnecessary brackets
2019-01-12 09:32:20 +09:00
Yu Watanabe
c0ff3d6cbc
udevd: make worker also log ACTION property
2019-01-12 09:32:20 +09:00
Yu Watanabe
25d4f5b071
udevd: reject devices which do not have SEQNUM
2019-01-12 09:32:20 +09:00
Yu Watanabe
956833b417
udevd: provide worker_hash_ops and drop manager_workers_free()
2019-01-12 09:32:20 +09:00
Yu Watanabe
d40534643b
udevd: use structured initializer at one more place
2019-01-12 09:32:20 +09:00
Yu Watanabe
1f3f6bd007
udevd: use worker_free() on failure in worker_new()
...
Otherwise, worker_monitor may not unrefed correctly.
2019-01-12 09:32:20 +09:00
Yu Watanabe
ee0b9e721a
sd-device-monitor: fix ordering of setting buffer size
...
By b1c097af8d
(#10239 ), the receive buffer
size for uevents was set by SO_RCVBUF at first, and fallback to
use SO_RCVBUFFORCE. So, as SO_RCVBUF limits to the buffer size
net.core.rmem_max, which is usually much smaller than 128MB udevd requests,
uevents buffer size was not sufficient.
This fixes the ordering of the request: SO_RCVBUFFORCE first, and
fallback to SO_RCVBUF. Then, udevd's uevent buffer size can be set to
128MB.
This also revert 903893237a
.
Fixes #11314 and #10754 .
2019-01-11 21:52:23 +01:00
Yu Watanabe
28daa1d10d
Merge pull request #11400 from ffontaine/master
...
Fix build with older kernels
2019-01-12 05:51:37 +09:00
Fabrice Fontaine
5269db454f
lockfile-util.c: fix build without F_OFD_SETLK
...
systemd fails to build on kernel without F_OFD_SETLK since
9714c020fc
So put include missing_fcntl.h
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-01-11 17:37:36 +01:00
Fabrice Fontaine
e2d94d0c16
missing_syscall.h: include errno.h
...
This include is needed for errno and ENOSYS
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-01-11 17:37:36 +01:00
Fabrice Fontaine
6a9eb11b8a
missing_if_link.h: add IFLA_BOND_MODE
...
systemd fails to build on kernel without IFLA_BOND_MODE (< 3.13) since
9714c020fc
So put back IFLA_BOND_MODE definition
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-01-11 17:37:36 +01:00
Fabrice Fontaine
3ee57870d6
basic/tmpfile-util.c: fix build without O_TMPFILE
...
systemd fails to build on kernel without O_TMPFILE (< 3.11) since
dea72eda9c
To fix this error, include missing_fcntl.h
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-01-11 17:37:36 +01:00
Fabrice Fontaine
a22692d718
capability: fix build without PR_CAP_AMBIENT
...
systemd fails to build on kernel without PR_CAP_AMBIENT (< 4.3) since
2a03bb3e65
To fix this error, include missing_prctl.h in all files using
PR_CAP_AMBIENT
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-01-11 17:37:20 +01:00
Frantisek Sumsal
3071b3ff6e
test: introduce QEMU_MEM
...
Some tests (mainly under ASan/UBSan) require more than 512M of memory,
so let's make it configurable (but still default to 512M).
2019-01-11 16:23:53 +01:00
Frantisek Sumsal
e47df8232a
test: drop service masking in TEST-01-BASIC
...
This test should ensure all systemd starts correctly, so masking them is
counter-productive in this case.
2019-01-11 13:45:08 +01:00
Zbigniew Jędrzejewski-Szmek
0192cbdb2c
Revert "nss: prevent PROTECT_ERRNO from squashing changes to *errnop"
...
This reverts commit b26c904113
.
I don't see anythign wrong, but Ubuntu autopkgtest CI started failing fairly
consistently since this was merged. Let's see if reverting fixes things.
2019-01-10 21:23:14 +01:00