summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* coverity: stop setting _Float*coverityEvgeny Vereshchagin2019-06-211-2/+1
| | | | Should address https://github.com/systemd/systemd/issues/12854
* path-util: get rid of prefix_root()Lennart Poettering2019-06-2114-76/+44
| | | | | | | | | | | | | | | | | | | prefix_root() is equivalent to path_join() in almost all ways, hence let's remove it. There are subtle differences though: prefix_root() will try shorten multiple "/" before and after the prefix. path_join() doesn't do that. This means prefix_root() might return a string shorter than both its inputs combined, while path_join() never does that. I like the path_join() semantics better, hence I think dropping prefix_root() is totally OK. In the end the strings generated by both functon should always be identical in terms of path_equal() if not streq(). This leaves prefix_roota() in place. Ideally we'd have path_joina(), but I don't think we can reasonably implement that as a macro. or maybe we can? (if so, sounds like something for a later PR) Also add in a few missing OOM checks
* nspawn: don't hard fail when setting capabilitiesAnita Zhang2019-06-203-1/+55
| | | | | | | | | | | The OCI changes in #9762 broke a use case in which we use nspawn from inside a container that has dropped capabilities from the bounding set that nspawn expected to retain. In an attempt to keep OCI compliance and support our use case, I made hard failing on setting capabilities not in the bounding set optional (hard fail if using OCI and log only if using nspawn cmdline). Fixes #12539
* Merge pull request #12846 from poettering/cap-last-cap-fixYu Watanabe2019-06-213-6/+8
|\ | | | | cap_last_cap() off by one fixes
| * bus-creds: fix size calculation for storing caps dataLennart Poettering2019-06-201-3/+5
| | | | | | | | This is a bit confusing, hence let's at an example comment.
| * capability: fix loops for cap_last_cap()Lennart Poettering2019-06-202-3/+3
| | | | | | | | | | | | | | cap_last_cap() returns the last valid cap (instead of the number of valid caps). to iterate through all known caps we hence need to use a <= check, and not a < check like for all other cases. We got this right usually, but in three cases we did not.
* | bpf: use more TAKE_FD()Lennart Poettering2019-06-211-4/+2
|/
* units: deny access to block devicesTopi Miettinen2019-06-204-0/+8
| | | | | | While the need for access to character devices can be tricky to determine for the general case, it's obvious that most of our services have no need to access block devices. For logind and timedated this can be tightened further.
* Merge pull request #12762 from ↵Lennart Poettering2019-06-2013-78/+270
|\ | | | | | | | | yuwata/network-introduce-carrier-and-network-state-12752 network: introduce carrier and address state to fix network_is_online()
| * timesync: judging if network is online by networkd's address stateYu Watanabe2019-06-161-3/+8
| | | | | | | | Closes #12752.
| * sd-network: introduce functions for new link and manager statesYu Watanabe2019-06-164-9/+50
| |
| * network: drop unused manager_send_changed()Yu Watanabe2019-06-162-9/+0
| |
| * network: also introduce two new manager statesYu Watanabe2019-06-163-4/+36
| |
| * network: expose carrier and address states over dbusYu Watanabe2019-06-165-5/+57
| | | | | | | | | | | | Previously, when a bridge or bonding interface is in degraded-carrier state, then we cannot judge the interface has addresses or not. By using the new states, dbus clients can distinguish such situation.
| * network: split operational states into carrier and address statesYu Watanabe2019-06-163-39/+82
| | | | | | | | | | This should not change any behavior. The new states will be exposed by later commits.
| * network: introduce manager_send_changed_strv()Yu Watanabe2019-06-162-7/+13
| |
| * network: introduce link_send_changed_strv()Yu Watanabe2019-06-162-6/+13
| | | | | | | | It will be used in later commits.
| * network: split out DBus related prototypes to networkd-link-bus.hYu Watanabe2019-06-167-7/+22
| |
* | Merge pull request #12837 from yuwata/tree-wide-lgtm-fixesLennart Poettering2019-06-2010-38/+67
|\ \ | | | | | | tree-wide: fix issues found by lgtm
| * | util: use extract_first_word() instead of strsep()Yu Watanabe2019-06-202-22/+36
| | |
| * | tree-wide: use htobe{32,16}() instead of hton{l,s}()Yu Watanabe2019-06-202-3/+3
| | |
| * | tree-wide: drop alloca() in loopYu Watanabe2019-06-206-13/+28
| | |
* | | cgroup: Continue unit reset if cgroup is busyDonald Buczek2019-06-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When part of the cgroup hierarchy cannot be deleted (e.g. because there are still processes in it), do not exit unit_prune_cgroup early, but continue so that u->cgroup_realized is reset. Log the known case of non-empty cgroups at debug level and other errors at warning level. Fixes https://github.com/systemd/systemd/issues/12386
* | | Merge pull request #12806 from yuwata/networkctl-ethtool-12657Yu Watanabe2019-06-2024-214/+406
|\ \ \ | |/ / |/| | networkctl: show speed, duplex, auto negotiation, and port
| * | networkctl: show link speed, duplex, auto negotiation, and portYu Watanabe2019-06-201-2/+72
| | |
| * | network: change type of BitRates= bus propertyYu Watanabe2019-06-192-47/+18
| | |
| * | table: introduce FORMAT_BPS typeYu Watanabe2019-06-192-0/+24
| | |
| * | test: add tests for format_bytes()Yu Watanabe2019-06-192-0/+42
| | |
| * | util: make format_bytes() support e.g. 3.0EYu Watanabe2019-06-191-5/+8
| | |
| * | util: introduce format_bytes_full()Yu Watanabe2019-06-1911-49/+77
| | | | | | | | | | | | And move it into format-util.c.
| * | ethtool-util: introduce ethtool_get_link_info()Yu Watanabe2019-06-192-0/+41
| | | | | | | | | | | | Will be used in later commits.
| * | ethtool-util: make ethtool_connect() warn on failureYu Watanabe2019-06-192-16/+15
| | |
| * | ethtool-util: use structured initializersYu Watanabe2019-06-191-16/+19
| | |
| * | ethtool-util: move from src/udev/net/ to src/shared/Yu Watanabe2019-06-197-90/+101
| | |
* | | sd-resolve: suppress false positive MSan warningsFrantisek Sumsal2019-06-191-0/+10
| | | | | | | | | | | | MSan dislikes structured initializers for nested structures.
* | | Merge pull request #12828 from ↵Zbigniew Jędrzejewski-Szmek2019-06-196-141/+112
|\ \ \ | | | | | | | | | | | | | | | | yuwata/network-routing-policy-rule-add-missing-entries network: add missing entries in routing_policy_rule_{hash,compare}_func()
| * | | network: add missing entries in routing_policy_rule_{hash,compare}_func()Yu Watanabe2019-06-194-141/+105
| | | | | | | | | | | | | | | | | | | | This also makes routing_policy_rule_get() or friends take a RoutingPolicyRule object as an input.
| * | | util: introduce siphash24_compress_boolean()Yu Watanabe2019-06-192-0/+7
| | | |
* | | | Merge pull request #12815 from irtimmer/dot-strictLennart Poettering2019-06-1922-58/+129
|\ \ \ \ | |/ / / |/| | | resolved: strict mode for DNS-over-TLS
| * | | resolved: support TLS 1.3 when using GnuTLS for DNS-over-TLSIwan Timmer2019-06-191-1/+6
| | | |
| * | | resolved: add strict mode for DNS-over-TLSIwan Timmer2019-06-1914-15/+46
| | | | | | | | | | | | | | | | Add strict mode for DNS-over-TLS, which will require TLS support from the server. Closes #10755
| * | | resolved: don't require check when importing resolved-dnstls.hIwan Timmer2019-06-194-12/+7
| | | |
| * | | resolved: add missing error code check when initializing DNS-over-TLSIwan Timmer2019-06-184-11/+18
| | | |
| * | | resolved: move TLS data shared by all servers to managerIwan Timmer2019-06-188-30/+63
| | | | | | | | | | | | | | | | Instead of having a context and/or trusted CA list per server this is now moved to the server. Ensures future TLS configuration options are global instead of per server.
* | | | Merge pull request #12829 from yuwata/dhcp-memdup_suffix0Lennart Poettering2019-06-192-2/+2
|\ \ \ \ | | | | | | | | | | sd-bus,dhcp: use memdup_suffix0() instead of strndup()
| * | | | sd-bus: use memdup_suffix0() instead of strndup()Yu Watanabe2019-06-191-1/+1
| | | | |
| * | | | dhcp: use memdup_suffix0() instead of strndup()Yu Watanabe2019-06-191-1/+1
| | |/ / | |/| |
* | | | Merge pull request #12822 from poettering/tmpfiles-is-mount-pointYu Watanabe2019-06-191-45/+21
|\ \ \ \ | |/ / / |/| | | tmpfiles: use common fd_is_mount_point() implementation
| * | | tmpfiles: use common fd_is_mount_point() implementation in tmpfiles.cLennart Poettering2019-06-181-36/+10
| | | | | | | | | | | | | | | | | | | | No need to have a private reimplementation here. Let's just use the common one, which supports "fdinfo" as fallback.
| * | | tmpfiles: merge two nested if checks into oneLennart Poettering2019-06-181-8/+10
| | | |