Commit Graph

21292 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek fc65dabdb5 test-condition: extend tests to all ConditionSecurity= values
Also print out what we detect, for manual verification.
2018-06-20 22:46:18 +02:00
Lennart Poettering be405b909e condition: add new conditon ConditionSecurity=uefi-secureboot
We have the detector call for this anyway, and it's useful for
conditioning out dbxtool.service, hence let's add this tiny new option.
2018-06-20 22:33:47 +02:00
Zbigniew Jędrzejewski-Szmek 92963e74df
Merge pull request #9363 from yuwata/specifier-config-dir
core: add unit specifier for configuration directory root
2018-06-20 22:30:18 +02:00
Yu Watanabe 56ddbf1009 meson: make DNS-over-TLS support optional
This adds dns-over-tls option to meson. If set to 'false',
systemd-resolved is not linked with libgnutls.
2018-06-20 22:28:01 +02:00
Franck Bui 25c59b5d85 systemctl: mask always reports the same unit names when different unknown units are passed
Before this patch:

  # systemctl --runtime mask abuild.mount does-not-exist.mount does-also-not-exist.mount
  Unit abuild.mount does not exist, proceeding anyway.
  Unit abuild.mount does not exist, proceeding anyway.
  Unit abuild.mount does not exist, proceeding anyway.
  Created symlink /run/systemd/system/abuild.mount → /dev/null.
  Created symlink /run/systemd/system/does-not-exist.mount → /dev/null.
  Created symlink /run/systemd/system/does-also-not-exist.mount → /dev/null.

After this patch:

  # systemctl --runtime mask abuild.mount does-not-exist.mount does-also-not-exist.mount
  Unit abuild.mount does not exist, proceeding anyway.
  Unit does-not-exist.mount does not exist, proceeding anyway.
  Unit does-also-not-exist.mount does not exist, proceeding anyway.
  Created symlink /run/systemd/system/abuild.mount → /dev/null.
  Created symlink /run/systemd/system/does-not-exist.mount → /dev/null.
  Created symlink /run/systemd/system/does-also-not-exist.mount → /dev/null.
2018-06-20 21:53:23 +02:00
Yu Watanabe 969309c2b4 core: add unit specifier for configuration directory root
Follow-up for 14068e17f3.
2018-06-21 03:20:37 +09:00
Zbigniew Jędrzejewski-Szmek 54781addb7 test-sizeof: another aproach to _Float128 availability detection 2018-06-20 17:06:21 +02:00
Lennart Poettering a6887cc03e tree-wide: drop MSG_NOSIGNAL flag from recvmsg() invocations
MSG_NOSIGNAL is only defined for sendmsg(), not for recvmsg(), hence
let's drop it's use, in particular as it appears to create problems on
older kernels. See:

https://lists.freedesktop.org/archives/systemd-devel/2018-June/040869.html
2018-06-20 16:12:55 +02:00
Lennart Poettering 41145af8a9 Revert "mention alias for poweroff in machinectl --help"
This reverts commit bebd5382ba4c820377f05e1e518c6dfd96b278be.

For the reasoning, see: https://github.com/systemd/systemd/pull/9342#issuecomment-398715417
2018-06-20 13:25:42 +02:00
Lennart Poettering 6dd9477dde
Merge pull request #9348 from keszybz/copyright-removal
Copyright removal
2018-06-20 12:27:56 +02:00
Zbigniew Jędrzejewski-Szmek 68ad174eb8 Drop copyrights tags for "systemd authors" 2018-06-20 12:11:12 +02:00
Zbigniew Jędrzejewski-Szmek 5b4f9cc15b basic/bpf-program: drop obsolete comment
As far as I can see, nothing in that particular file is from the
kernel. Let's just drop the comment.
2018-06-20 12:07:38 +02:00
Zbigniew Jędrzejewski-Szmek d9b02e1697 tree-wide: drop copyright headers from frequent contributors
Fixes #9320.

for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do
  git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms'
done
2018-06-20 11:58:53 +02:00
Zbigniew Jędrzejewski-Szmek 3c47d50906 shared/path-lookup: remove unnecessary 'if' to help gcc
Fixes #9343.
2018-06-20 10:57:51 +02:00
Yu Watanabe d149a404b1 resolve: fix log message 2018-06-20 08:25:10 +02:00
Yu Watanabe e55fc5b094 resolve: do not log about negative cache for mdns packets
Fixes #9335.
2018-06-20 08:25:10 +02:00
Christian Rebischke 91fd39687a mention alias for poweroff in machinectl --help
This commit adds the stop alias to the output of `machinectl --help`.
In the past we only mention this in the man page. It's nice to mention
this in the output `machinectl --help` as well.
2018-06-20 08:11:03 +02:00
Susant Sahani 44b598a1c9 networkd: Unify set MTU
Now the setting MTU is embedded into the link_up message which makes it
incapable of setting MTU if link is up. MTU can be set while Link is up.

Closes #9254
2018-06-20 08:09:30 +02:00
Hannes Reinecke c0373eb019 scsi_id: Fixup prefix for pre-SPC inquiry reply
The prefix for EMC Symmetrix pre-SPC VPD inquiry reply
is always SCSI_ID_NAA, so we need to hardcode it to
avoid false values here.

Signed-off-by: Hannes Reinecke <hare@suse.com>
2018-06-19 12:46:24 +02:00
Jérémy Rosen 14c1abccf0 add _AUDIT_TYPE_NAME field to audit records in the journal 2018-06-19 10:48:38 +02:00
Zbigniew Jędrzejewski-Szmek 1183320594 resolved: move dot to end of sentence
Noticed in #9285.
2018-06-19 16:14:48 +09:00
Yu Watanabe 22509a8df0 sd-bus: fix typo in comment 2018-06-19 08:44:55 +02:00
Yu Watanabe 31d99bd172 tree-wide: do not assign values if not used 2018-06-19 08:44:55 +02:00
Zbigniew Jędrzejewski-Szmek 496ab389cc
Merge pull request #9330 from yuwata/ja-po-portable
portable: update polkit messages
2018-06-19 08:37:36 +02:00
Yu Watanabe 980982da62 mount: do not output (null) in option
Fixes #9327.
2018-06-19 08:27:47 +02:00
Yu Watanabe 9c7f1abbe2 portable: update polkit messages 2018-06-19 13:21:17 +09:00
Chris Lamb 3fe910794b Correct a number of trivial typos. 2018-06-18 22:44:44 +02:00
Jérémy Rosen ed563b609c do not filter out deprecated USER audit messages 2018-06-18 14:48:09 +02:00
Ronny Chevalier 98008caa94 shared: do not include ~ when appending syscall filters property
The method already uses a boolean argument to determine whether it is in
whitelist mode or not. The code that will parse the string of filters
does not expect the ~, since it already has the boolean argument. Thus,
it will fail to parse the list of filters.
2018-06-18 13:12:20 +02:00
Zbigniew Jędrzejewski-Szmek 88f375b8c2
Merge pull request #8766 from poettering/syscall-filter-service
add a new `@system-service` syscall group that is good as a starting point for whitelisting syscalls
2018-06-15 11:34:44 +02:00
Yu Watanabe 1e8c7bd55c namespace: drop protect_{home,system}_or_bool_from_string()
The functions protect_{home,system}_from_string() are not used
except for defining protect_{home,system}_or_bool_from_string().
This makes protect_{home,system}_from_string() support boolean
strings, and drops protect_{home,system}_or_bool_from_string().
2018-06-15 11:32:27 +02:00
Yu Watanabe 3177e14c4d
Merge pull request #9303 from poettering/busctl-fixlets
tiny busctl fixlets
2018-06-15 12:11:44 +09:00
Iwan Timmer f6c9c5f8ed resolved: fix error handling in resolved-dns-stream
During the transition from system functions using errno to our own read and write functions with negative return codes some errors where introduced. This patch correctly convert errno to negative return codes for read and write and fix checks still using errno instead of the return code.

Closes #9283
2018-06-14 20:01:03 +02:00
Lennart Poettering 6f659e5075 portable: add SystemCallFilter=@system-service to the three main portable service profiles
… but leave the "trusted" profile unmodified, it shall have full access
to all system calls, as before.
2018-06-14 17:44:20 +02:00
Lennart Poettering e05ee49b14 seccomp: explain why we use setuid rather than @setuid in @privileged 2018-06-14 17:44:20 +02:00
Lennart Poettering 705268414f seccomp: add new system call filter, suitable as default whitelist for system services
Currently we employ mostly system call blacklisting for our system
services. Let's add a new system call filter group @system-service that
helps turning this around into a whitelist by default.

The new group is very similar to nspawn's default filter list, but in
some ways more restricted (as sethostname() and suchlike shouldn't be
available to most system services just like that) and in others more
relaxed (for example @keyring is blocked in nspawn since it's not
properly virtualized yet in the kernel, but is fine for regular system
services).
2018-06-14 17:44:20 +02:00
Lennart Poettering 48956c396e busctl: make use of log_error_errno() where we can 2018-06-14 14:54:32 +02:00
Lennart Poettering 02bf91ee29 busctl: add 'const' where we can 2018-06-14 14:53:59 +02:00
Lennart Poettering 6b0f548498 busctl: use fflush_and_check() where appropriate 2018-06-14 14:53:46 +02:00
Zbigniew Jędrzejewski-Szmek 50d1760d26 Drop more license boilerplate
$ git grep -e 'This program is free software' -l |grep -v LICENSE | \
  xargs perl -i -0pe 's/ \* This program.*?for more details.\s*\*\n( \* You should have.*licenses.>.\n)?//gms'

For some reason they were missed previously. All those files seem to
have proper SDPX tags.
2018-06-14 13:05:41 +02:00
Zbigniew Jędrzejewski-Szmek 58f21e63b4 Fix SPDX license tags 2018-06-14 13:05:41 +02:00
Zbigniew Jędrzejewski-Szmek 0cd41d4dff Drop my copyright headers
perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
2018-06-14 13:03:20 +02:00
Zbigniew Jędrzejewski-Szmek b0450864f1
Merge pull request #9274 from poettering/comment-header-cleanup
drop "this file is part of systemd" and lennart's copyright from header
2018-06-14 11:26:50 +02:00
Zbigniew Jędrzejewski-Szmek 36ee2ececc
Merge pull request #9199 from poettering/copy-file-atomic
make copy_file_atomic() use O_TMPFILE to create the destination file
2018-06-14 11:19:22 +02:00
Jan Synacek 0722b35934 namespace: always use a root directory when setting up namespace
1) mv /var/tmp /var/tmp.old
2) mkdir /tmp/varrr
3) ln -s /tmp/varrr /var/tmp

Now, when a service has PrivateTmp=yes, during namespace setup,
/tmp is first mounted over with a new mount. Then, when /var/tmp
is being resolved, it points to /tmp/varrr, which by then doesn't
exist, because it had already been obscured.
2018-06-14 10:25:16 +02:00
Lennart Poettering c7e6744fa8
Merge pull request #9297 from yuwata/rfe-9296
timesync: ignore any errors related to timestamp file
2018-06-14 10:22:11 +02:00
Lennart Poettering 96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Lennart Poettering 0c69794138 tree-wide: remove Lennart's copyright lines
These lines are generally out-of-date, incomplete and unnecessary. With
SPDX and git repository much more accurate and fine grained information
about licensing and authorship is available, hence let's drop the
per-file copyright notice. Of course, removing copyright lines of others
is problematic, hence this commit only removes my own lines and leaves
all others untouched. It might be nicer if sooner or later those could
go away too, making git the only and accurate source of authorship
information.
2018-06-14 10:20:20 +02:00
Lennart Poettering 2aafd60bee grypt-util: drop two emacs modelines
No idea why they didn't get removed earlier...
2018-06-14 10:20:20 +02:00
Lennart Poettering 810adae9e9 tree-wide: use proper unicode © instead of (C) where we can
Let's use a proper unicode copyright symbol where we can, it's prettier.

This important patch is very important.
2018-06-14 10:20:20 +02:00