1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

40591 Commits

Author SHA1 Message Date
Frantisek Sumsal
a07a7324ad core: move config_parse_* functions to a shared module
Apart from making the code a little bit more clean, it should allow us
to write a fuzzer around the config-parsing functions in the future
2019-06-25 22:35:02 +09:00
INSUN PYO
c13fb25734 man: change true/false to yes/no for DefaultDependencies. 2019-06-25 21:55:38 +09:00
Lennart Poettering
12a9fbe649
Merge pull request #12877 from poettering/dynamic-user-re-migrate2
DynamicUser=1 → = 0 migration follow-up
2019-06-25 12:20:26 +02:00
Lennart Poettering
b5bd7a29f9 some CODING_STYLE additions 2019-06-25 10:56:15 +02:00
Lennart Poettering
33a5137cf0 man: say D-Bus, not dbus 2019-06-25 10:47:46 +02:00
Lennart Poettering
cc9ba15efe man: improve --test documentation
Incorporates some suggestions from:

https://github.com/systemd/systemd/pull/12868#discussion_r296738370
cd69e88ba3 (commitcomment-34060775)
2019-06-25 10:47:46 +02:00
Lennart Poettering
528c365658 test: add test for DynamicUser=0 → =1 migration (and back) 2019-06-25 10:47:46 +02:00
Lennart Poettering
2193f17c08 core: mention why we do migration for everything but ConfigurationDirectory= 2019-06-25 10:47:46 +02:00
Lennart Poettering
cf52c45d6b core: log when we convert from DynamicUser=1 to =0 or vice versa 2019-06-25 10:47:46 +02:00
camoz
9a02707561 systemd-nspawn(1): update example section
Remove the retired flag -d from Example 4. "Boot a minimal Arch Linux
distribution in a container". It has been retired here:
https://git.archlinux.org/arch-install-scripts.git/commit/pacstrap.in?id=0af6884aca68dcb7eed0b85fbc2960903df3d968
2019-06-25 10:47:32 +02:00
Lennart Poettering
c7e42ceb7a
Merge pull request #12869 from poettering/dynamic-user-re-migrate
DynamicUser=1 state directory back migration
2019-06-25 10:06:03 +02:00
Kai Lüke
fab347489f bpf-firewall: custom BPF programs through IP(Ingress|Egress)FilterPath=
Takes a single /sys/fs/bpf/pinned_prog string as argument, but may be
specified multiple times. An empty assignment resets all previous filters.

Closes https://github.com/systemd/systemd/issues/10227
2019-06-25 09:56:16 +02:00
Lennart Poettering
2d901d33a9
Merge pull request #12874 from yuwata/ethtool-make-ubsan-quiet
ethtool: make UBSan quiet and add missing link modes
2019-06-25 09:28:21 +02:00
Lennart Poettering
05b2ace147
Merge pull request #12870 from yuwata/tree-wide-further-path-join-cleanups
tree-wide: further path_join() and path_joina() cleanups
2019-06-25 09:27:01 +02:00
Yu Watanabe
01a619a6ac
Merge pull request #12871 from keszybz/various-printing-fixes
Various printing/logging fixes
2019-06-25 13:02:33 +09:00
Yu Watanabe
6d02888935 ethtool: reindent link mode table 2019-06-25 11:55:59 +09:00
Yu Watanabe
72dda93acb ethtool: add missing link mode 2019-06-25 11:55:04 +09:00
Yu Watanabe
d16c272844 ethtool-util: fix returned value when ethtool_cmd_speed() is SPEED_UNKNOWN 2019-06-25 11:44:19 +09:00
Yu Watanabe
ffba064ae4 linux: make UBSAN quiet 2019-06-25 11:44:08 +09:00
Yu Watanabe
2824ed64a1 linux: update kernel headers 2019-06-25 11:29:13 +09:00
Zbigniew Jędrzejewski-Szmek
9dae4c8a26 bootctl: fix display of options with embedeed newlines
I have an .efi image with embedded newlinews. Now I don't even remember if it
was created for testing or by accident, but it doesn't really matter. We should
display such files correctly.

(This isn't a problem with normal BLS entries, because input is split into lines
so newlines are consumed.)
2019-06-25 10:30:58 +09:00
Lubomir Rintel
c4f885e7e0 sd-device: don't accept /sys as a device path
Because it's not a device path and (slightly) bad things happen if it
gets confused with one:

  $ udevadm info /sys/
  Assertion 'device->devpath[0] == '/'' failed at
      ../src/libsystemd/sd-device/sd-device.c:958,
      function sd_device_get_devpath(). Aborting.
  Aborted (core dumped)
2019-06-25 10:22:18 +09:00
Lubomir Rintel
f053fc337e udevd: fix a reversed conditional on global property set
# udevadm control --property=HELLO=WORLD
  Received udev control message (ENV), unsetting 'HELLO'
  # udevadm control --property=HELLO=
  Received udev control message (ENV), setting 'HELLO='

Oh no, it's busted. Let's try removing this one little negation real quick
to see if it helps...

  # udevadm control --property=HELLO=WORLD
  Received udev control message (ENV), setting 'HELLO=WORLD'
  # udevadm control --property=HELLO=
  Received udev control message (ENV), unsetting 'HELLO'

Feels much better now.
2019-06-25 10:20:48 +09:00
Lennart Poettering
330703fb22 man: beef up systemd.exec(5)
Prompted by:

https://lists.freedesktop.org/archives/systemd-devel/2019-May/042773.html
2019-06-24 18:31:36 +02:00
Yu Watanabe
270384b2d4 tree-wide: replace strjoina() with prefix_roota() 2019-06-25 01:31:26 +09:00
Zbigniew Jędrzejewski-Szmek
44e891bbf6 networkd: rework warning and debug messages about address addition and removal
Those messages were quite confusing. In particular "adding address" suggests
that we are assiging a new address to an interface, but in fact we're just
reacting to a notification about an addition. So let's call that "remembering"
and "forgetting". It's not fully gramatically correct, but I think it's much
clearer than "adding"/"removing" in this context.

And "received address without address" is too cryptic, let's say "address
message" to distinguish the message from its content.

Also, make failure to format address non-fatal, and print more details in
various places.
2019-06-24 18:20:01 +02:00
Zbigniew Jędrzejewski-Szmek
b81b40d4c4 logind: log operation details when starting actions
For some reason, systemd-logind is trying to handle idle action in one of my containers:

Jun 07 10:28:08 rawhide systemd-logind[42]: System idle. Taking action.
Jun 07 10:28:08 rawhide systemd-logind[42]: Requested operation not supported, ignoring.

But we didn't log what exactly was being done. Let's put the name of the action in messages.
2019-06-24 17:26:13 +02:00
Zbigniew Jędrzejewski-Szmek
f2330acda4 logind: remove unused check
All callers pass either a fixed action, or HANDLE_IGNORE is explicitly filtered
out. Let's remove this case here, because we cannot properly log what opreation
we are ignoring.
2019-06-24 17:26:13 +02:00
Yu Watanabe
2d9b74ba87 tree-wide: replace strjoin() with path_join() 2019-06-24 23:59:38 +09:00
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
Yu Watanabe
f9421dd847 test: add more testcases for prefix_roota() 2019-06-24 23:40:33 +09:00
Yu Watanabe
95bbf19e2f path-util: fix an issue when the path argument of prefix_roota() is not absolute
When the first argument is '/' and the second argument is not absolute,
the return value was not prefixed with '/'. This fixes the issue.
2019-06-24 23:37:11 +09:00
Lennart Poettering
5c6d40d132 core: migrate service directories back from private if needed
Fixes: #12131
2019-06-24 16:20:34 +02:00
Lennart Poettering
3f5b15084e core: add missing space to DynamicUser=1 directory comment
(also line break again)
2019-06-24 16:20:34 +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