1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
Commit Graph

40558 Commits

Author SHA1 Message Date
Michal Sekletar
b070c7c0e1 core: introduce NUMAPolicy and NUMAMask options
Make possible to set NUMA allocation policy for manager. Manager's
policy is by default inherited to all forked off processes. However, it
is possible to override the policy on per-service basis. Currently we
support, these policies: default, prefer, bind, interleave, local.
See man 2 set_mempolicy for details on each policy.

Overall NUMA policy actually consists of two parts. Policy itself and
bitmask representing NUMA nodes where is policy effective. Node mask can
be specified using related option, NUMAMask. Default mask can be
overwritten on per-service level.
2019-06-24 16:58:54 +02:00
Zbigniew Jędrzejewski-Szmek
c455677449
Merge pull request #12868 from poettering/doc-243-fixes
various man page fixes
2019-06-24 16:07:16 +02:00
Lennart Poettering
e5134f00f8 man: document that sd_bus_creds_get_exec() is not suitable for security decisions
Fixes: #12704
2019-06-24 15:30:10 +02:00
Lennart Poettering
eedaf7f322 man: drop references to "syslog" and "syslog+console" from man page
These options are pretty much equivalent to "journal" and
"journal+console" anyway, let's simplify things, and drop them from the
documentation hence.

For compat reasons let's keep them in the code.

(Note that they are not 100% identical to 'journal', but I doubt the
distinction in behaviour is really relevant to keep this in the docs.
And we should probably should drop 'syslog' entirely from our codebase
eventually, but it's problematic as long as we semi-support udev on
non-systemd systems still.)
2019-06-24 15:23:11 +02:00
Lennart Poettering
cd69e88ba3 doc: make clear that --system and --user only make sense with --test
Fixes: #12843
2019-06-24 14:51:52 +02:00
Lennart Poettering
b30772a403 man: correct that Sockets= may not be undone
Fixes: #12415
2019-06-24 14:22:43 +02:00
Lennart Poettering
e0e65f7d09 man: document that DynamicUser=1 implied sandboxing cannot be turned off
Fixes: #12476
2019-06-24 14:20:36 +02:00
Lennart Poettering
0d92a3088a
Merge pull request #12866 from yuwata/strv_consume_cleanups
tree-wide: use _cleanup_ attributes
2019-06-24 09:54:36 +02:00
Yu Watanabe
6abdec98f3 tree-wide: use _cleanup_ attribute and strv_consume() + TAKE_PTR() 2019-06-24 14:57:58 +09:00
Yu Watanabe
623550aff7 sd-path: use _cleanup_strv_free_ attribute 2019-06-24 14:57:50 +09:00
Lennart Poettering
ac5dca6489 update TODO 2019-06-23 16:13:26 +02:00
Peter A. Bigot
94c4bbe506 man: fix references to VTABLE property flags 2019-06-23 04:13:41 +09:00
Lennart Poettering
72bd85259b update TODO 2019-06-22 20:12:44 +02:00
Lennart Poettering
cee97d5768
Merge pull request #12836 from yuwata/tree-wide-replace-strjoin
tree-wide: replace strjoin() with path_join()
2019-06-22 20:02:46 +02:00
Anita Zhang
4c1567f29a bpf-firewall: optimization for IPAddressXYZ="any" (and unprivileged users)
This is a workaround to make IPAddressDeny=any/IPAddressAllow=any work
for non-root users that have CAP_NET_ADMIN. "any" was chosen since
all or nothing network access is one of the most common use cases for
isolation.

Allocating BPF LPM TRIE maps require CAP_SYS_ADMIN while BPF_PROG_TYPE_CGROUP_SKB
only needs CAP_NET_ADMIN. In the case of IPAddressXYZ="any" we can just
consistently return false/true to avoid allocating the map and limit the user
to having CAP_NET_ADMIN.
2019-06-22 19:56:06 +02:00
Topi Miettinen
e48fcfef06 cgroup-util: kill also threads
It's possible for a zombie process to have live threads. These are not listed
in /sys in "cgroup.procs" for cgroupsv2, but they show up in
"cgroup.threads" (cgroupv2) or "tasks" (cgroupv1) nodes. When killing a
cgroup (v2 only) with SIGKILL, let's also kill threads after killing processes,
so the live threads of a zombie get killed too.

Closes #12262.
2019-06-22 18:35:48 +02:00
Evgeny Vereshchagin
0127b1a05e coverity: stop setting _Float*
Should address https://github.com/systemd/systemd/issues/12854
2019-06-21 18:27:35 +03:00
Jan Synacek
6e9713f675 man: drop my copyright 2019-06-21 15:05:09 +09:00
Lennart Poettering
c6134d3e2f path-util: get rid of prefix_root()
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
2019-06-21 08:42:55 +09:00
Anita Zhang
f66ad46066 nspawn: don't hard fail when setting capabilities
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
2019-06-20 21:46:36 +02:00
Yu Watanabe
a5a4dfa1bc
Merge pull request #12846 from poettering/cap-last-cap-fix
cap_last_cap() off by one fixes
2019-06-21 03:31:49 +09:00
Lennart Poettering
1e59b5455e bpf: use more TAKE_FD() 2019-06-21 03:28:24 +09:00
Yu Watanabe
a13de89d36 sd-path: use _cleanup_ attribute 2019-06-21 03:26:23 +09:00
Yu Watanabe
657ee2d82b tree-wide: replace strjoin() with path_join() 2019-06-21 03:26:16 +09:00
Lennart Poettering
3972004297 bus-creds: fix size calculation for storing caps data
This is a bit confusing, hence let's at an example comment.
2019-06-20 14:55:30 +02:00
Lennart Poettering
4a33a02e99 capability: fix loops for cap_last_cap()
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.
2019-06-20 14:55:24 +02:00
Topi Miettinen
9af2820694 units: deny access to block devices
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.
2019-06-20 14:03:57 +02:00
Lennart Poettering
762267cdc1
Merge pull request #12762 from yuwata/network-introduce-carrier-and-network-state-12752
network: introduce carrier and address state to fix network_is_online()
2019-06-20 13:36:30 +02:00
Lennart Poettering
64ef83139c
Merge pull request #12837 from yuwata/tree-wide-lgtm-fixes
tree-wide: fix issues found by lgtm
2019-06-20 12:35:34 +02:00
Donald Buczek
0219b3524f cgroup: Continue unit reset if cgroup is busy
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
2019-06-20 10:16:53 +02:00
Yu Watanabe
b19eab1f74
Merge pull request #12806 from yuwata/networkctl-ethtool-12657
networkctl: show speed, duplex, auto negotiation, and port
2019-06-20 06:56:37 +09:00
Yu Watanabe
31a9be2372 util: use extract_first_word() instead of strsep() 2019-06-20 06:51:34 +09:00
Yu Watanabe
fe2e4b6961 tree-wide: use htobe{32,16}() instead of hton{l,s}() 2019-06-20 06:34:05 +09:00
Yu Watanabe
6d946490ba tree-wide: drop alloca() in loop 2019-06-20 06:29:19 +09:00
Yu Watanabe
c967d2c7ce networkctl: show link speed, duplex, auto negotiation, and port 2019-06-20 04:42:55 +09:00
Yu Watanabe
42a63431d3 network: change type of BitRates= bus property 2019-06-19 23:15:19 +09:00
Yu Watanabe
9ff27e6413 table: introduce FORMAT_BPS type 2019-06-19 23:15:19 +09:00
Yu Watanabe
049025a415 test: add tests for format_bytes() 2019-06-19 23:15:19 +09:00
Yu Watanabe
b7de125bba util: make format_bytes() support e.g. 3.0E 2019-06-19 23:15:19 +09:00
Yu Watanabe
aa89266900 util: introduce format_bytes_full()
And move it into format-util.c.
2019-06-19 23:15:19 +09:00
Yu Watanabe
33a8695fdc ethtool-util: introduce ethtool_get_link_info()
Will be used in later commits.
2019-06-19 23:15:19 +09:00
Yu Watanabe
7864b16b27 ethtool-util: make ethtool_connect() warn on failure 2019-06-19 23:15:19 +09:00
Yu Watanabe
b9bc7d42e3 ethtool-util: use structured initializers 2019-06-19 23:15:13 +09:00
Frantisek Sumsal
f9dc94408d sd-resolve: suppress false positive MSan warnings
MSan dislikes structured initializers for nested structures.
2019-06-19 15:48:36 +02:00
Zbigniew Jędrzejewski-Szmek
23ebb4dda9
Merge pull request #12828 from yuwata/network-routing-policy-rule-add-missing-entries
network: add missing entries in routing_policy_rule_{hash,compare}_func()
2019-06-19 15:25:31 +02:00
Lennart Poettering
43786739bf
Merge pull request #12815 from irtimmer/dot-strict
resolved: strict mode for DNS-over-TLS
2019-06-19 14:56:36 +02:00
Yu Watanabe
b80a511b1b network: add missing entries in routing_policy_rule_{hash,compare}_func()
This also makes routing_policy_rule_get() or friends take
a RoutingPolicyRule object as an input.
2019-06-19 21:10:07 +09:00
Yu Watanabe
f3f0d873e2 util: introduce siphash24_compress_boolean() 2019-06-19 21:03:16 +09:00
Iwan Timmer
9c0624dcdb resolved: support TLS 1.3 when using GnuTLS for DNS-over-TLS 2019-06-19 13:10:44 +02:00
Iwan Timmer
4310bfc20b resolved: add strict mode for DNS-over-TLS
Add strict mode for DNS-over-TLS, which will require TLS support from the server. Closes #10755
2019-06-19 13:10:44 +02:00