Commit Graph

35551 Commits

Author SHA1 Message Date
Lennart Poettering ad191df836
Merge pull request #10134 from keszybz/test-runner
Some test-related fixed and a test runner for installed tests
2018-10-05 20:35:30 +02:00
Yu Watanabe 8a89c5392d man: fix explanation about UID/GID field in tmpfiles.d(5)
Fixes #9495.
2018-10-05 19:06:10 +02:00
Lennart Poettering dacd723620
Merge pull request #10117 from keszybz/undynamicify
Set DynamicUser=no for networkd, resolved, timesyncd
2018-10-05 17:41:56 +02:00
Alan Jenkins 923f910115 man/systemd.exec: MountFlags=shared behaviour was changed (fixed?)
The behaviour described *was* observed on Fedora 28
(systemd-238-9.git0e0aa59), with and without SELinux.  I don't actually
know why though!  It contradicts my understanding of the code, including an
explicit comment in the code.

Testing in a VM upgraded to v239-792-g1327f272d, this behaviour goes away.


Test case:

# /etc/systemd/system/mount-test.service
[Service]
MountFlags=shared
Type=oneshot
ExecStart=/usr/bin/ls -l /proc/1/ns/mnt /proc/self/ns/mnt
ExecStart=/usr/bin/grep ext4 /proc/self/mountinfo


Weird old behaviour: new mount namespace but / is fully shared.

lrwxrwxrwx. 1 root root 0 Sep 14 11:18 /proc/1/ns/mnt -> mnt:[4026531840]
lrwxrwxrwx. 1 root root 0 Sep 14 11:48 /proc/self/ns/mnt ->
mnt:[4026532851]

968 967 253:0 / / rw,relatime shared:1 - ext4 /dev/mapper/alan_dell_2016...


Current behaviour: / is not fully shared

lrwxrwxrwx. 1 root root 0 Sep 14 11:39 /proc/1/ns/mnt -> mnt:[4026531840]
lrwxrwxrwx. 1 root root 0 Sep 14 11:41 /proc/self/ns/mnt ->
mnt:[4026532329]

591 558 8:3 / / rw,relatime shared:313 master:1 - ext4 /dev/sda3 rw,secl...
2018-10-05 17:38:38 +02:00
Lennart Poettering 334415b16e
Merge pull request #10094 from keszybz/wants-loading
Fix bogus fragment paths in units in .wants/.requires
2018-10-05 17:36:31 +02:00
Lennart Poettering 083d27b654
Merge pull request #10152 from yuwata/udev-use-extract
udev: small cleanups
2018-10-05 17:11:43 +02:00
Patrik Flykt aabcb75409 networkd-link: Don't start a DHCPv6 informational exchange automatically
When a link is configured, wait until there is a Router Advertisement before
attempting to start DHCPv6. The intended DHCPv6 mode will be evaluated in
ndisc_router_handler() in networkd-ndisc.c.
2018-10-05 16:58:06 +02:00
Yu Watanabe 35f2cb2841 sd-resolve: make struct addrinfo defined 2018-10-05 17:09:26 +09:00
Yu Watanabe d6263ee4d5 meson: also run compile tests for not installed systemd headers
Follow-up for b62f900866 (#10277).
2018-10-05 17:08:10 +09:00
Yu Watanabe e913b7988f
test-execute: add a test for systemcall filter (#10273)
This adds a test for issue #9939 which is fixed by
a5404992cc (#9942).
2018-10-05 14:46:30 +09:00
Yu Watanabe 30782b4396 sd-netlink: sort headers and include net/ethernet.h 2018-10-05 14:27:32 +09:00
Thomas Haller b62f900866 dhcp6: don't include internal header "sparse-endian.h" in "sd-dhcp6-client.h"
Arguably, libsystemd-network is (still) entirely internal API.
However there is the aim of maybe exposing it as public API.
For that reason, it cannot include internal headers from
"src/basic/".

Note how files "src/systemd/sd-*.h" don't include any systemd
headers which don't themself have an "sd-" prefix.

Fixes: d89a400ed6
2018-10-04 21:29:35 +02:00
Stephen Gallagher a3e0bba8a9 Add DOCUMENTATION_URL as a standard value for /etc/os-release
It is very useful for distributions to be able to set a primary
documentation URL in a standard location so that users and
applications on the system can identify it. For example, many
headless systems these days use the "Cockpit" admin console. It
would be ideal if we could specify this location directly in the
os-release file so that any application or service could have a
well-known location for retrieving this and displaying it
appropriately. Users could likewise examine /etc/os-release to
learn this location.

Related: https://github.com/cockpit-project/cockpit/issues/10198

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2018-10-04 21:29:18 +02:00
Lennart Poettering 880512fe6a
Merge pull request #10263 from keszybz/test-fs-util-generalization
test-fs-util generalization
2018-10-04 13:23:41 +02:00
Yu Watanabe b81b9d406d test: fix memleak in test-fs-util
Fixes #10267 and CID#1395997.
2018-10-04 16:24:44 +09:00
Zbigniew Jędrzejewski-Szmek 2796485404 test-fs-util: run all tests on the specified directory
This removes $RENAME_NOREPLACE_DIR and uses a command-line argument instead.
Logging is added, and tests are skipped if we get -EPERM or friends
(which happens on FAT and other filesystems).
2018-10-04 16:18:58 +09:00
Zbigniew Jędrzejewski-Szmek 7158b4b3fc test-fs-util: simplify testdir creation 2018-10-03 13:42:08 +02:00
Zbigniew Jędrzejewski-Szmek 9a21d8b9fd
Merge pull request #10251 from poettering/renameat-racy
rename_noreplace() fallback for file systems where neither RENAME_REPLACE nor link()/unlinkat() is available
2018-10-03 13:37:53 +02:00
Zbigniew Jędrzejewski-Szmek 1ee55f52a8
Merge pull request #10257 from pfl/dhcp6_pd_enable_later_link
DHCP6 PD enable later link
2018-10-03 11:04:41 +02:00
Zbigniew Jędrzejewski-Szmek ac7b333009
Merge pull request #10261 from yuwata/test-network
test: small improvements for systemd-networkd-test.py
2018-10-03 10:03:34 +02:00
Yu Watanabe b7172f3471 test-execute: also tests under the condition that unshare() is filtered
This is mainly for testing 1beab8b0d0.
2018-10-03 08:33:23 +02:00
Zbigniew Jędrzejewski-Szmek 7bcf8123c0
Merge pull request #10213 from yuwata/oss-fuzz-10746
dhcp6: fix issue oss-fuzz#10746
2018-10-03 08:31:55 +02:00
Yu Watanabe 6aea927681 test: make systemd-networkd-tests.py run on arbitrary directory 2018-10-03 14:38:30 +09:00
Yu Watanabe ec6a47044a test: replace stop+start by restart
This suppress the following warnings:
```
Warning: Stopping systemd-networkd.service, but it can still be activated by:
  systemd-networkd.socket
```
2018-10-03 14:36:34 +09:00
Yu Watanabe 5b054bfc10 test: add a testcase for oss-fuzz#10746 2018-10-03 08:53:42 +09:00
Yu Watanabe 84452783b8 dhcp6: check option length before reading values
Fixes oss-fuzz#10746
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10746.
2018-10-03 08:49:55 +09:00
Yu Watanabe 9380d34c2a test: add test for sd_device 2018-10-02 23:04:55 +02:00
Joe Hershberger d81186ef4f udev: Allow acpi_index and index to be "0"
0 can be a valid index returned by the BIOS, so allow that by using the
parsing function safe_atolu() to check for errors without excluding the
valid value "0".

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-02 22:58:15 +02:00
Patrik Flykt 107523437c networkd-dhcp6: Request prefix delegation for a new link
Request prefix delegation for a new downstream link that is enabled
after any number of upstream DHCPv6 links. Submit the request after
the link has been configured with a link-local address.

If the upstream DHCPv6 client has already been configured to request
prefixes, attempt to re-assign any possible prefixes between the
already existing links and the new one. If no prefixes are yet
acquired, nothing will happen right away and any prefixes will be
distributed after a reply from the DHCPv6 server.

If none of the already existing downstream links have requested
DHCPv6 prefixes to be assigned, enable prefix delegation for each
client and restart them one by one if they are already running. This
causes the DHCPv6 clients to re-acquire addresses and prefixes and
to re-distribute them to all links when receiving an updated
response from their respective DHCPv6 servers. If the DHCPv6 client
in question was not already running, it is set to request prefixes
but not restarted.

When an error occurs while setting or restarting the DHCPv6 client,
log the incident and move over to the next link.

Fixes #9758.
2018-10-02 12:32:46 -06:00
Patrik Flykt 03d4fc2ed2 networkd-dhcp: Rename function and reduce its logging
Rename dhcp6_verify_link() to dhcp6_get_prefix_delegation() in order
to be clearer in what it does. Reduce unnecessary logging.
2018-10-02 12:32:46 -06:00
David Strauss bca676e3d3 Docs: Update CoC with email alias for David Strauss 2018-10-02 09:22:45 -07:00
Lennart Poettering 1384653e71 update TODO 2018-10-02 18:00:10 +02:00
Zbigniew Jędrzejewski-Szmek 0f0159e313
Merge pull request #10252 from poettering/recv-log-msg-bump
tiny sd-ravd/sd-ndisc logging fixes
2018-10-02 17:56:31 +02:00
Zbigniew Jędrzejewski-Szmek e80ef269a1
Merge pull request #10255 from poettering/hide-new-id128
drop references to "journalctl --new-id128"
2018-10-02 17:54:36 +02:00
Lennart Poettering 29088d374e
Merge pull request #9898 from keszybz/id128
Add a new tool 'systemd-id128'
2018-10-02 17:43:37 +02:00
Lennart Poettering eb74d3b97a
Merge pull request #10249 from keszybz/lgtm-fixes
Fixes for issues found by LGTM
2018-10-02 17:42:55 +02:00
Lennart Poettering b9d016d684 tree-wide: drop all references to "journalctl --new-id128"
Let's advertise "systemd-id128 new" instead.
2018-10-02 16:43:54 +02:00
Lennart Poettering 19a073db9b journalctl: drop --new-id128 from help and man texts
Let's remove redundancy and not advertise "journalctl --new-id128"
anymore, now that we have "systemd-id128 new" in a proper tool.

This allows us to reduce the overly large journalctl command set a bit.

Note that this just removes the --help and man text, the call remains
available for compat reasons.
2018-10-02 16:42:30 +02:00
Lennart Poettering 876449bb47 update TODO 2018-10-02 16:28:06 +02:00
Lennart Poettering 8eb41f4c08 sd-radv: EAGAIN is not really unexpected, distinguishit from other errors when logging 2018-10-02 16:26:50 +02:00
Lennart Poettering 437524f178 sd-ndisc: generate debug log messages on unexpected errors
We really should make it possible to debug unexpected errors, hence log
something at LOG_DEBUG.
2018-10-02 16:25:54 +02:00
Lennart Poettering fdc2afc102 sd-radv: remove log_radv_warning_errno()
According to our CODING_STYLE our library code should generally not log
beyond LOG_DEBUG. Let's hence get rid of log_radv_warning_errno() and
just use log_radv_errno() instead.
2018-10-02 16:22:54 +02:00
Lennart Poettering 4a5d77615e test: add test case for rename_noreplace() 2018-10-02 16:11:10 +02:00
Lennart Poettering 2f15b6253a fs-util: add racy RENAME_NOREPLACE fallback using access()
Apparently FAT on some recent kernels can't do RENAME_NOREPLACE, and of
course cannot do linkat()/unlinkat() either (as the hard link concept
does not exist on FAT). Add a fallback using an explicit beforehand
faccessat() check. This sucks, but what we can do if the safe operations
are not available?

Fixes: #10063
2018-10-02 16:11:10 +02:00
Lennart Poettering eaa680c09e fileio: fix error propagation in link_tmpfile() 2018-10-02 16:11:10 +02:00
Ronny Chevalier afc1feaeba bus-unit-util: fix parsing of IPAddress{Allow,Deny}
While the config parser correctly handles the case of multiple IPs,
bus_append_cgroup_property was only parsing one IP,
and it would fail with "Failed to parse IP address prefix" when given
a list of IPs.
2018-10-02 15:46:15 +02:00
Lennart Poettering c3281539da
Merge pull request #10246 from keszybz/fuzz-buss
Bus fuzzer
2018-10-02 15:45:21 +02:00
Zbigniew Jędrzejewski-Szmek 91db8ed5b2 journal-upload: add asserts that snprintf does not return an error
LGMT complains:
> The size argument of this snprintf call is derived from its return value,
> which may exceed the size of the buffer and overflow.

Let's make sure that r is non-negative. (This shouldn't occur unless the format
string is borked, so let's just add an assert.)
Then, let's reorder the comparison to avoid the potential overflow.
2018-10-02 15:36:24 +02:00
Zbigniew Jędrzejewski-Szmek 7c3733d5de pid1: remove unnecessary error reassignment
LGTM was complaining:
> Comparison is always true because r >= 0.
2018-10-02 15:36:24 +02:00
Zbigniew Jędrzejewski-Szmek 459500a32c shared/install: avoid overwriting 'r' counter with a partial result
We want to store either the first error or the total number of changes in 'r'.
Instead, we were overwriting this with the return value from
install_info_traverse().

LGTM complained later in the loop that:
> Comparison is always true because r >= 0.
2018-10-02 15:36:24 +02:00