Fabrice Fontaine
38c1c96db1
meson.build: fix detection of -Werror=shadow
...
Pass -Werror=shadow in args of cc.compiles otherwise test will always
succeed
This fix a build failure with gcc 4.7.3
Fixes:
- http://autobuild.buildroot.org/results/ffd71c473d3b29618c18cd2e04705370266696f2
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-11-30 08:45:22 +01:00
Zbigniew Jędrzejewski-Szmek
9ed6a1d2c6
Merge pull request #10990 from keszybz/link-libmount-less
...
Link libmount less
2018-11-29 21:38:37 +01:00
Zbigniew Jędrzejewski-Szmek
77c772f227
Move mount-util.c to shared/
...
libmount dep is moved from libbasic to libshared, potentially removing
libmount from some build products.
2018-11-29 21:03:44 +01:00
Zbigniew Jędrzejewski-Szmek
049af8ad0c
Split out part of mount-util.c into mountpoint-util.c
...
The idea is that anything which is related to actually manipulating mounts is
in mount-util.c, but functions for mountpoint introspection are moved to the
new file. Anything which requires libmount must be in mount-util.c.
This was supposed to be a preparation for further changes, with no functional
difference, but it results in a significant change in linkage:
$ ldd build/libnss_*.so.2
(before)
build/libnss_myhostname.so.2:
linux-vdso.so.1 (0x00007fff77bf5000)
librt.so.1 => /lib64/librt.so.1 (0x00007f4bbb7b2000)
libmount.so.1 => /lib64/libmount.so.1 (0x00007f4bbb755000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4bbb734000)
libc.so.6 => /lib64/libc.so.6 (0x00007f4bbb56e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4bbb8c1000)
libblkid.so.1 => /lib64/libblkid.so.1 (0x00007f4bbb51b000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f4bbb512000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4bbb4e3000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f4bbb45e000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f4bbb458000)
build/libnss_mymachines.so.2:
linux-vdso.so.1 (0x00007ffc19cc0000)
librt.so.1 => /lib64/librt.so.1 (0x00007fdecb74b000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007fdecb744000)
libmount.so.1 => /lib64/libmount.so.1 (0x00007fdecb6e7000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdecb6c6000)
libc.so.6 => /lib64/libc.so.6 (0x00007fdecb500000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdecb8a9000)
libblkid.so.1 => /lib64/libblkid.so.1 (0x00007fdecb4ad000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fdecb4a2000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fdecb475000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fdecb3f0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fdecb3ea000)
build/libnss_resolve.so.2:
linux-vdso.so.1 (0x00007ffe8ef8e000)
librt.so.1 => /lib64/librt.so.1 (0x00007fcf314bd000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007fcf314b6000)
libmount.so.1 => /lib64/libmount.so.1 (0x00007fcf31459000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcf31438000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcf31272000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcf31615000)
libblkid.so.1 => /lib64/libblkid.so.1 (0x00007fcf3121f000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fcf31214000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fcf311e7000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fcf31162000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fcf3115c000)
build/libnss_systemd.so.2:
linux-vdso.so.1 (0x00007ffda6d17000)
librt.so.1 => /lib64/librt.so.1 (0x00007f610b83c000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f610b835000)
libmount.so.1 => /lib64/libmount.so.1 (0x00007f610b7d8000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f610b7b7000)
libc.so.6 => /lib64/libc.so.6 (0x00007f610b5f1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f610b995000)
libblkid.so.1 => /lib64/libblkid.so.1 (0x00007f610b59e000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f610b593000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f610b566000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f610b4e1000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f610b4db000)
(after)
build/libnss_myhostname.so.2:
linux-vdso.so.1 (0x00007fff0b5e2000)
librt.so.1 => /lib64/librt.so.1 (0x00007fde0c328000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fde0c307000)
libc.so.6 => /lib64/libc.so.6 (0x00007fde0c141000)
/lib64/ld-linux-x86-64.so.2 (0x00007fde0c435000)
build/libnss_mymachines.so.2:
linux-vdso.so.1 (0x00007ffdc30a7000)
librt.so.1 => /lib64/librt.so.1 (0x00007f06ecabb000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f06ecab4000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f06eca93000)
libc.so.6 => /lib64/libc.so.6 (0x00007f06ec8cd000)
/lib64/ld-linux-x86-64.so.2 (0x00007f06ecc15000)
build/libnss_resolve.so.2:
linux-vdso.so.1 (0x00007ffe95747000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa56a80f000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007fa56a808000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa56a7e7000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa56a621000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa56a964000)
build/libnss_systemd.so.2:
linux-vdso.so.1 (0x00007ffe67b51000)
librt.so.1 => /lib64/librt.so.1 (0x00007ffb32113000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007ffb3210c000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffb320eb000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffb31f25000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffb3226a000)
I don't quite understand what is going on here, but let's not be too picky.
2018-11-29 21:03:44 +01:00
Lennart Poettering
192b89368e
Merge pull request #10987 from poettering/index-md-work-around
...
docs: work around GitHub pages weirdness
2018-11-29 19:29:02 +01:00
Lennart Poettering
6740028516
Merge pull request #10989 from keszybz/nss-man
...
Add example to nss-mymachines(8)
2018-11-29 19:28:39 +01:00
Lennart Poettering
f7db73528f
docs: work around GitHub pages weirdness
...
Fixes : #10546
2018-11-29 19:09:09 +01:00
Zbigniew Jędrzejewski-Szmek
401faa3533
Merge pull request #10357 from poettering/import-fs
...
machinectl import-fs command and other fixes
2018-11-29 16:38:46 +01:00
Zbigniew Jędrzejewski-Szmek
f2cca38e46
man: add an extensive example to nss-mymachines(8)
...
The man page didn't really say what we are mapping and with what
patterns. Let's fix that.
2018-11-29 15:47:21 +01:00
Zbigniew Jędrzejewski-Szmek
f781c8fe78
Merge pull request #10959 from poettering/systemctl-edit-fixo
...
Fix "systemctl edit" for non-loadable units
2018-11-29 15:35:07 +01:00
Lennart Poettering
edc8e7b81f
docs: fix typo
2018-11-29 15:29:47 +01:00
Lennart Poettering
c1d3483d47
docs: uppercase the title of our Markdown docs
2018-11-29 15:29:47 +01:00
Susant Sahani
173a6e29be
networkd: vxlan make use of parse_ip_port_range
...
Use parse_ip_port_range
2018-11-29 14:04:26 +01:00
Zbigniew Jędrzejewski-Szmek
3bfb1010b2
machinectl: fix printing of multiple addresses
...
We'd print everything jumbled together:
$ machinectl --max-addresses=3
MACHINE CLASS SERVICE OS VERSION ADDRESSES
rawhide container systemd-nspawn fedora 30 169.254.40.164fe80::94aa:3aff:fe7b:d4b9
2018-11-29 13:04:50 +01:00
Zbigniew Jędrzejewski-Szmek
4527a83bc7
machinectl: drop helper function
...
It only serves to forward some arguments without modification and is only
used in one place anyway.
2018-11-29 13:04:50 +01:00
Lennart Poettering
02a126a33d
systemctl: if service manager couldn't load unit file, don't rely on it to tell us the fragment path
...
Previously, "systemctl edit" exclusively used the service manager's
per-unit FragmentPath property to figure out which file to edit, when
operating on a non-template unit. If for some reason loading the unit
file failed entirely though (LoadState=error), then FragmentPath would
be empty, and thus the unit not editable.
Let's fix this, by falling back to client-side unit file searching in
this case.
(Also, various other clean-ups to make the relevant functions follow our
coding style)
Fixes : #9561
2018-11-29 11:25:32 +01:00
Lennart Poettering
85163756da
systemctl: rework message suggesting how to create a new unit file
...
We need to specifiy --full for creating full unit files.
Also, this is an explanatory hint, hence shouldn't be logged on LOG_ERR
level.
2018-11-29 11:25:32 +01:00
Lennart Poettering
df79fdab21
systemctl: shorten code a bit
2018-11-29 11:25:32 +01:00
Lennart Poettering
5daacba233
systemctl: improve message when we skip a unit for editing a bit
2018-11-29 11:25:32 +01:00
Lennart Poettering
92d6b0bfdc
systemctl: use _cleanup_ logic for error paths in unit_file_create_copy(), too
2018-11-29 11:25:32 +01:00
Lennart Poettering
919d272085
systemctl: rework error paths in unit_file_create_new()
...
Let's use _cleanup_ to clean up stuff for us.
2018-11-29 11:25:32 +01:00
Lennart Poettering
b03677e2da
systemctl: rework unit_find_template_path() to follow coding style
...
This makes sure that we don't clobber return values on failure and reset
all return values on success.
2018-11-29 11:25:32 +01:00
Lennart Poettering
f67cb27060
systemctl: make sure we initialize return parameters in unit_file_find_path() on success
...
According to our coding style return values should be initialized when
we return any form of success, do so here too.
2018-11-29 11:21:55 +01:00
Lennart Poettering
c45e7e0cbf
systemctl: rename unit_file_find_path()'s return paramete to indicate that it is one
2018-11-29 11:15:45 +01:00
Lennart Poettering
ecb1a44cc9
docs: add brief docs explaing udev's flock() block device node synchronization
2018-11-29 10:48:30 +01:00
Lennart Poettering
0abf94923b
NEWS: extend docs on RLIMIT_NOFILE
...
We now settled on 512K, and forgot to update NEWS.
Moreover, explain why 512K was chosen.
2018-11-29 14:55:31 +09:00
Evgeny Vereshchagin
c90c39ff7b
catalog: reject entries where the language is too short early
...
Closes https://oss-fuzz.com/testcase-detail/5674475278827520
2018-11-29 13:41:40 +09:00
Lennart Poettering
bf61b05a06
networkd: slightly rework route establishment logic
...
Use a for() loop to merge the two very similar loops into one, and add
more comments explaining the logic behing this.
Follow-up for 0d34228fc0
2018-11-29 13:38:54 +09:00
Yu Watanabe
636a13d1ec
Merge pull request #10977 from yuwata/test-network-remove-state-file
...
test-network: optionally remove state file of networkd
2018-11-29 13:38:08 +09:00
Zbigniew Jędrzejewski-Szmek
8b4e51a60e
Merge pull request #10797 from poettering/run-generator
...
add new "systemd-run-generator" for running arbitrary commands from the kernel command line as system services using the "systemd.run=" kernel command line switch
2018-11-28 22:40:55 +01:00
Yu Watanabe
c0bf673376
test-network: stop systemd-networkd.socket during testing
...
To suppress noisy warning messages.
2018-11-28 22:00:40 +01:00
Yu Watanabe
bad4969bba
test-network: clear state file before starting networkd
...
Otherwise, some tests may disturb others, e.g.,
NetworkdNetWorkTests.test_routing_policy_rule_port_range and
NetworkdNetWorkTests.test_routing_policy_rule.
2018-11-28 21:40:57 +01:00
Yu Watanabe
d486a2d0c1
test-network: use /run instead of legacy /var/run
2018-11-28 19:55:01 +01:00
Yu Watanabe
50ae773f85
Merge pull request #10970 from yuwata/from-name-return-negative-errno
...
util: make *_from_name() returns negative errno on error
2018-11-29 03:18:03 +09:00
Yu Watanabe
fab57f7f13
Merge pull request #10948 from ssahani/iprule-port-proto
...
networkd: add support to configure ip rule port range and protocol.
2018-11-29 03:17:36 +09:00
Lennart Poettering
09dad04c49
meson: let's bump RLIMIT_NOFILE hard limit to 512K
...
Prompted by:
https://lists.freedesktop.org/archives/systemd-devel/2018-October/041578.html
2018-11-28 17:08:27 +01:00
Lubomir Rintel
230450d4e4
sysctl.d: switch net.ipv4.conf.all.rp_filter from 1 to 2
...
This switches the RFC3704 Reverse Path filtering from Strict mode to Loose
mode. The Strict mode breaks some pretty common and reasonable use cases,
such as keeping connections via one default route alive after another one
appears (e.g. plugging an Ethernet cable when connected via Wi-Fi).
The strict filter also makes it impossible for NetworkManager to do
connectivity check on a newly arriving default route (it starts with a
higher metric and is bumped lower if there's connectivity).
Kernel's default is 0 (no filter), but a Loose filter is good enough. The
few use cases where a Strict mode could make sense can easily override
this.
The distributions that don't care about the client use cases and prefer a
strict filter could just ship a custom configuration in
/usr/lib/sysctl.d/ to override this.
2018-11-28 16:29:01 +01:00
Susant Sahani
926062f083
networkd: add support to configure ip rule port range and protocol.
...
Please see:
iprule: support for ip_proto, sport and dport match options
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=f686f764682745daf6a93b0a6330ba42a961f858
Closes 10622
2018-11-28 20:06:28 +05:30
Susant Sahani
0d34228fc0
fix: systemd-networkd reverse route ordering
...
We missing a default route. Add gateway first.
This fixes https://github.com/systemd/systemd/issues/5430
2018-11-28 23:19:00 +09:00
Victor Tapia
e6eed94459
resolved: Increase size of TCP stub replies
...
DNS_PACKET_PAYLOAD_SIZE_MAX is limiting the size of the stub replies to
512 with EDNS off or 4096 with EDNS on, without checking the protocol
used. This makes TCP replies for clients without EDNS support to be
limited to 512, making the truncate flag useless if the query result is
bigger than 512 bytes.
This commit increases the size of TCP replies to DNS_PACKET_SIZE_MAX
Fixes : #10816
2018-11-28 14:06:36 +01:00
Yu Watanabe
acf4d15893
util: make *_from_name() returns negative errno on error
2018-11-28 20:20:50 +09:00
Yu Watanabe
7b5e750d2a
util: also move scripts related to socket-protocol-list.[ch] to shared/
...
The source files were moved to shared/. Let's also move the relevant scripts.
2018-11-28 20:20:29 +09:00
Yu Watanabe
6ec439fd4b
tools: move generate-gperfs.py to tools/
2018-11-28 20:19:41 +09:00
Lennart Poettering
59a2a18e27
missing.h: remove duplicate definition of 'struct ethtool_link_settings'
...
Fixes : #10966
2018-11-28 10:37:03 +01:00
Lennart Poettering
1f70196644
Merge pull request #10961 from poettering/busctl-monitor-json
...
busctl: support json mode also for 'busctl monitor'
2018-11-28 10:30:53 +01:00
Lennart Poettering
b4525804a1
core: USB function properties do not change dynamically, don't claim so
...
This reduces our PropertiesChanged signals a bit in size as we don't
keep out blasting properties that cannot change anyway all the time.
2018-11-28 10:29:51 +01:00
Zbigniew Jędrzejewski-Szmek
e33437844e
Merge pull request #10954 from poettering/install-all-fixo
...
correct of enabling logic for template units without DefaultInstall=
2018-11-28 10:28:05 +01:00
Lennart Poettering
e4086ae0b3
install: when enabling a template unit without DefaultInstance= nor specified instance don't do anything
...
Previously, we'd link the unit file into /etc in this case, but that
should only be done if the unit file is not in the search path anyway,
and this is already done implicitly anyway for all enabled unit files,
hence no reason to duplicate this here.
Fixes : #10253
2018-11-28 08:43:47 +01:00
Lennart Poettering
d23aeead14
install: use structured initializers
2018-11-28 08:43:47 +01:00
Lennart Poettering
ac9bbabbc5
systemctl: separate out paragraphs in long message with empty line
2018-11-28 08:43:47 +01:00