Commit Graph

30301 Commits

Author SHA1 Message Date
Yu Watanabe 4240cb02fd sysusers: do not create unneeded users 2017-10-06 16:06:47 +09:00
Yu Watanabe 941afc4b90 unit: enable DynamicUser= for journal-upload 2017-10-06 16:06:21 +09:00
Yu Watanabe 48d3e88c18 timesyncd: enable DynamicUser= 2017-10-06 16:05:20 +09:00
Yu Watanabe c31ad02403 mkdir: introduce follow_symlink flag to mkdir_safe{,_label}() 2017-10-06 16:03:33 +09:00
Frederic Crozat 4a1f92c704 tmpfiles: remove old ICE and X11 sockets at boot (#6979)
tmpfiles: remove old ICE and X11 sockets at boot

When not using tmpfs based /tmp, leftover sockets
might prevent X startup. Ensure directory is clean at boot time.
2017-10-06 01:28:19 +02:00
g0tar 91277dff73 pass currently completed word to systemctl list-unit-files/list-units (#6927)
This change noticeably increases completion performance at the expense
of preventing possible _correct, _approximate or any matcher-list rules.
Still, responsiveness increase so huge seems to make it worth the price.
2017-10-05 22:17:51 +02:00
Zbigniew Jędrzejewski-Szmek 082827e6c6 Merge pull request #6999 from poettering/seccomp-newgroups
add three new syscall groups, and port @privileged to make use of more existing ones
2017-10-05 22:06:39 +02:00
Zbigniew Jędrzejewski-Szmek acc7b23256 Merge pull request #7008 from poettering/sorevision235
bump so revision for 235 and mailmap updates
2017-10-05 21:51:13 +02:00
Zbigniew Jędrzejewski-Szmek 1e5284bda3 Merge pull request #6949 from poettering/restart-servers
Automatically forget learnt DNS server information when network config changes
2017-10-05 21:24:36 +02:00
Lennart Poettering fdb6343484 Merge pull request #6909 from sourcejedi/units
Unit dependency fixes (and cleanups)
2017-10-05 18:26:02 +02:00
Lennart Poettering 76451c1db0 update .mailmap a bit more 2017-10-05 17:39:50 +02:00
Lennart Poettering 75dfbbacb3 NEWS: one more addition 2017-10-05 17:23:17 +02:00
Lennart Poettering d128f369bc build-sys: bump so revisions for prepation of 235 2017-10-05 17:14:04 +02:00
Lennart Poettering cf84484a56 resolved: include DNS server feature level info in SIGUSR1 status dump
let's make the status dump more useful for tracking down server issues.
2017-10-05 17:02:25 +02:00
Lennart Poettering d55b0463b2 resolved: add support for explicitly forgetting everything we learnt about DNS server feature levels
This adds "systemd-resolve --reset-server-features" for explicitly
forgetting what we learnt. This might be useful for debugging
purposes, and to force systemd-resolved to restart its learning logic
for all DNS servers.
2017-10-05 16:56:50 +02:00
Lennart Poettering 59c0fd0e17 resolved: automatically forget all learnt DNS server information when the network configuration changes
When the network configuration changes we should relearn everything
there is to know about the configured DNS servers, because we might talk
to the same addresses, but there might be different servers behind them.
2017-10-05 16:22:22 +02:00
Lennart Poettering af0f047ba8 seccomp: port @privileged to use @reboot + @swap
Let's reuse two groups we already defined to make @privileged a bit
shorter.
2017-10-05 15:42:48 +02:00
Lennart Poettering e59608fa5f seccomp: there is no "kexec" syscall
it's called "kexec_load".
2017-10-05 15:42:48 +02:00
Lennart Poettering 44898c5358 seccomp: add three more seccomp groups
@aio → asynchronous IO calls
@sync → msync/fsync/... and friends
@chown → changing file ownership

(Also, change @privileged to reference @chown now, instead of the
individual syscalls it contains)
2017-10-05 15:42:48 +02:00
Zbigniew Jędrzejewski-Szmek 608f70e6b4 Update mailmap and contributor list (#7006)
Also fix typo (by using a word that is a better git anyway.)
2017-10-05 15:41:33 +02:00
Lennart Poettering c74cdb5cc3 units: restore User=systemd-journal-gateway in systemd-journal-gatewayd.service (#7005)
After the discussions around #7003 I think we should restore the
User=systemd-journal-gateway line for systemd-journal-gatewayd.service,
too, so that we continue to use the state user if it exists, and create
it as dynamic user only when it does not.

Note that undoes part of a change made after 234, i.e. a never released
change.
2017-10-05 15:05:02 +02:00
Zbigniew Jędrzejewski-Szmek 892a035c2e core: make gc_marker unsigned (#7004)
This matches the definition in unit.h.
2017-10-05 15:04:19 +02:00
Djalal Harouni 7c72bab4e3 seccomp: remove 'gettid' syscall from '@process' syscall set (#6989)
The gettid syscall is one of the most basic syscalls, it never fails and
it operates on current thread. Most applications are not suposed to use
it, however even if it is used there is no much justification on blocking
it. This patch removes it from '@process' set so if users blacklist this
set to block setns or clone syscalls, the gettid syscall will still be
available. Of course they can always block gettid explicitly.

Note that the gettid is already in the '@default' set.
2017-10-05 14:46:41 +02:00
Zbigniew Jędrzejewski-Szmek c05f3c8ff8 Merge pull request #6931 from poettering/job-timeout-sec 2017-10-05 14:43:13 +02:00
Zbigniew Jędrzejewski-Szmek 21723f53db NEWS: some nitpicking and bike-shedding 2017-10-05 14:42:12 +02:00
Zbigniew Jędrzejewski-Szmek be03929503 Merge pull request #6952 from poettering/seccomp-getrlimit
a seccomp fix regarding ugetrlimit/prlimit64
2017-10-05 13:22:03 +02:00
Lennart Poettering acd53eaa7e generator: when we insert a '\n', actually place a proper newline, too 2017-10-05 13:06:44 +02:00
Lennart Poettering eae51da36e unit: when JobTimeoutSec= is turned off, implicitly turn off JobRunningTimeoutSec= too
We added JobRunningTimeoutSec= late, and Dracut configured only
JobTimeoutSec= to turn of root device timeouts before. With this change
we'll propagate a reset of JobTimeoutSec= into JobRunningTimeoutSec=,
but only if the latter wasn't set explicitly.

This should restore compatibility with older systemd versions.

Fixes: #6402
2017-10-05 13:06:44 +02:00
Andrew Jeddeloh 95ab9eff1e Revert "networkd: change UseMTU default to true. (#6837)" (#6950)
This reverts commit 22043e4317.
UseMTU is broken on real hardware and should not be enabled by default.
2017-10-05 12:58:02 +02:00
Zbigniew Jędrzejewski-Szmek 70b491d190 Merge pull request #6988 from poettering/dns-stub-truncate
rework how resolved's dns stub deals with truncation
2017-10-05 12:35:24 +02:00
Lennart Poettering 5102765695 resolved: rework how we handle truncation in the stub resolver
When we a reply message gets longer than the client supports we need to
truncate the response and set the TC bit, and we already do that.
However, we are not supposed to send incomplete RRs in that case, but
instead truncate right at a record boundary. Do that.

This fixes the "Message parser reports malformed message packet."
warning the venerable "host" tool outputs when a very large response is
requested.

See: #6520
2017-10-05 12:22:43 +02:00
Lennart Poettering 9886b6b13c resolved: take benefit of log_xyz_errno() returning the negative error code
Just some modernizations.
2017-10-05 12:21:18 +02:00
Lennart Poettering 448ac526a3 seccomp: ignore (and debug log) errors by all invocations of seccomp_rule_add_exact()
System calls might exist on some archs but not on others, or might be
multiplexed but not on others. Ignore such errors when putting together
a filter at this location like we already do it on all others.
2017-10-05 11:27:34 +02:00
Lennart Poettering 1c6af69b2d seccomp: always handle seccomp_load() failing the same way
Unfortunately libseccomp doesn't return (nor document) clean error
codes, hence until then only check for specific error codes that we
propagate, but ignore (but debug log) all others. Do this at one more
place, we are already doing that at all others.
2017-10-05 11:27:34 +02:00
Lennart Poettering ff217dc3af seccomp: react gracefully if we can't translate a syscall name
When a libseccomp implementation doesn't know a syscall yet, that's no
reason for us to fail completely. Instead, debug log, and proceed.

This hopefully fixes the preadv2/pwritev2 issues pointed out here:

https://github.com/systemd/systemd/pull/6952#issuecomment-334302923
2017-10-05 11:27:34 +02:00
Lennart Poettering 4c3a917617 seccomp: include prlimit64 and ugetrlimit in @default
Also, move prlimit64() out of @resources.

prlimit64() may be used both for getting and setting resource limits, and
is implicitly called by glibc at various places, on some archs, the same
was as getrlimit(). SImilar, igetrlimit() is an arch-specific
replacement for getrlimit(), and hence should be whitelisted at the same
place as getrlimit() and prlimit64().

Also see: https://lists.freedesktop.org/archives/systemd-devel/2017-September/039543.html
2017-10-05 11:27:34 +02:00
Zbigniew Jędrzejewski-Szmek c9905d4dd2 Merge pull request #6944 from poettering/suspend-fix
systemctl reboot/suspend tweaks
2017-10-05 11:26:44 +02:00
Hans de Goede 2a2fcbeecd hwdb: Add accelerometer orientation entry for Chuwi Hi8 Pro tablet (#6998)
Add an accelerometer orientation entry for the Chuwi Hi8 Pro tablet.
2017-10-05 01:06:55 +02:00
Lennart Poettering f6e64b78cc tmpfiles: change btmp mode 0600 → 0660 (#6997)
As discussed in #6994.

Fixes: #6994
2017-10-04 21:44:29 +02:00
Lennart Poettering 98e4fcec36 dynamic-user: don't use a UID that currently owns IPC objects (#6962)
This fixes a mostly theoretical potential security hole: if for some
reason we failed to remove IPC objects created for a dynamic user (maybe
because a MAC/SElinux erronously prohibited), then we should not hand
out the same UID again until they are successfully removed.

With this commit we'll enumerate the IPC objects currently existing, and
step away from using a UID for the dynamic UID logic if there are any
matching it.
2017-10-04 21:40:01 +02:00
Zbigniew Jędrzejewski-Szmek 03d4358277 Merge pull request #6975 from sourcejedi/logind_pid_0_v2
Selectively revert "tree-wide: use pid_is_valid() at more places"
2017-10-04 21:33:52 +02:00
Lennart Poettering e06fafb2d7 NEWS: add comment about change sync/async behaviour for shutdown commands 2017-10-04 20:59:15 +02:00
Lennart Poettering 6324a8a727 man: document which special "systemctl" commands are synchronous and which asynchronous.
This documents the status quo, clarifying when we are synchronous and
when asynchronous by default and when --no-block is support to force
asynchronous operation.

See: #6479
2017-10-04 20:59:15 +02:00
Lennart Poettering d13f5e164e logind: don's change dry-run boolean before we actually enqueue the operation
Let's not affect change before the PK check.
2017-10-04 20:56:24 +02:00
Lennart Poettering 15e99a4392 logind: reorder things a bit
Let's keep the three sleep method implementations close to each other.
2017-10-04 20:56:24 +02:00
Lennart Poettering 130246d2e8 systemctl: make sure "reboot", "suspend" and friends are always asynchronous
Currently, "systemctl reboot" behaves differently in setups with and
without logind. If logind is used (which is probably the more common
case) the operation is asynchronous, and otherwise synchronous (though
subject to --no-block in this case). Let's clean this up, and always
expose the same behaviour, regardless if logind is used or not: let's
always make it asynchronous.

It might make sense to add a "--block" mode in a future PR that makes
these operations synchronous, but this requires non-trivial work in
logind, and is outside of the scope of this change.

See: #6479
2017-10-04 20:56:24 +02:00
Lennart Poettering 36b69c3131 logind: add Halt() and CanHalt() APIs
This adds new method calls Halt() and CanHalt() to the logind bus APIs.
They aren't overly useful (as the whole concept of halting isn't really
too useful), however they clean up one major asymmetry: currently, using
the "shutdown" legacy commands it is possibly to enqueue a "halt"
operation through logind, while logind officially doesn't actually
support this. Moreover, the path through "shutdown" currently ultimately
fails, since the referenced "halt" action isn't actually defined in
PolicyKit.

Finally, the current logic results in an unexpected asymmetry in
systemctl: "systemctl poweroff", "systemctl reboot" are currently
asynchronous (due to the logind involvement) while "systemctl halt"
isnt. Let's clean this up, and make all three APIs implemented by
logind natively, and all three hence asynchronous in "systemctl".

Moreover, let's add the missing PK action.

Fixes: #6957
2017-10-04 20:56:24 +02:00
Lennart Poettering e65270ad12 Merge pull request #6992 from keszybz/fix-test-copy
test-copy: fix operation when test-copy is too small
2017-10-04 20:00:14 +02:00
Zbigniew Jędrzejewski-Szmek 57056020c5 hwdb: switch meson to use ids_parser.py (#6964)
Also drop the now-unused perl implementation (that doesn't do sorting),
so it's incompatible anyway.
2017-10-04 19:32:59 +02:00
Zbigniew Jędrzejewski-Szmek 5991ce44dc udevadm,basic: replace nulstr_contains with STR_IN_SET (#6965)
STR_IN_SET is a newer approach which is easier to write and read, and which
seems to result in space savings too:

before:
4949848 build/src/shared/libsystemd-shared-234.so
 350704 build/systemctl
4967184 build/systemd
 826216 build/udevadm

after:
4949848 build/src/shared/libsystemd-shared-234.so
 350704 build/systemctl
4966888 build/systemd
 826168 build/udevadm
2017-10-04 19:32:12 +02:00