summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mkdir: introduce follow_symlink flag to mkdir_safe{,_label}()Yu Watanabe2017-10-0615-27/+41
|
* tmpfiles: remove old ICE and X11 sockets at boot (#6979)Frederic Crozat2017-10-061-5/+6
| | | | | | 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.
* pass currently completed word to systemctl list-unit-files/list-units (#6927)g0tar2017-10-051-8/+8
| | | | | 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.
* Merge pull request #6999 from poettering/seccomp-newgroupsZbigniew Jędrzejewski-Szmek2017-10-055-35/+59
|\ | | | | add three new syscall groups, and port @privileged to make use of more existing ones
| * seccomp: port @privileged to use @reboot + @swapLennart Poettering2017-10-051-5/+2
| | | | | | | | | | Let's reuse two groups we already defined to make @privileged a bit shorter.
| * seccomp: there is no "kexec" syscallLennart Poettering2017-10-051-1/+1
| | | | | | | | it's called "kexec_load".
| * seccomp: add three more seccomp groupsLennart Poettering2017-10-055-29/+56
| | | | | | | | | | | | | | | | | | @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)
* | Merge pull request #7008 from poettering/sorevision235Zbigniew Jędrzejewski-Szmek2017-10-053-20/+30
|\ \ | | | | | | bump so revision for 235 and mailmap updates
| * | update .mailmap a bit moreLennart Poettering2017-10-052-17/+24
| | |
| * | NEWS: one more additionLennart Poettering2017-10-051-1/+4
| | |
| * | build-sys: bump so revisions for prepation of 235Lennart Poettering2017-10-051-2/+2
| |/
* | Merge pull request #6949 from poettering/restart-serversZbigniew Jędrzejewski-Szmek2017-10-0513-35/+270
|\ \ | | | | | | Automatically forget learnt DNS server information when network config changes
| * | resolved: include DNS server feature level info in SIGUSR1 status dumpLennart Poettering2017-10-055-3/+73
| | | | | | | | | | | | let's make the status dump more useful for tracking down server issues.
| * | resolved: add support for explicitly forgetting everything we learnt about ↵Lennart Poettering2017-10-058-28/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | resolved: automatically forget all learnt DNS server information when the ↵Lennart Poettering2017-10-057-7/+74
| |/ | | | | | | | | | | | | | | 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.
* | Merge pull request #6909 from sourcejedi/unitsLennart Poettering2017-10-057-9/+9
|\ \ | |/ |/| Unit dependency fixes (and cleanups)
| * units: DefaultDependencies already implies conflict with shutdown.targetAlan Jenkins2017-09-301-2/+0
| | | | | | | | (and system-update.target does not have DefaultDependencies=no)
| * units: add missing Before=shutdown.target for units which it ConflictsAlan Jenkins2017-09-303-2/+2
| | | | | | | | | | | | | | There's a few services missing this ordering. Also remove a duplicate Conflicts=shutdown.target from systemd-volatile-root.service.
| * units: add missing ordering deps for Conflicts= of emergency.serviceAlan Jenkins2017-09-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | 1. If we exited emergency mode immediately, we don't want to have an irreversible stop job still running for syslog.socket. I _suspect_ that can't happen, but let's not waste effort working out exactly why it's impossible and not just very improbable. 2. Similarly, it seems undesirable to have rescue.service and emergency.service both running with an open FD of /dev/console, for however short a period.
| * units: express Conflict in syslog.socket instead of emergency.serviceAlan Jenkins2017-09-292-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note this commit only changes how the code is expressed; it does not change the existence of any dependency. The `Conflicts=` was added in 3136ec90, "Stop syslog.socket when entering emergency mode". The discussion in the issue #266 raised concerns that this might be needed for other units, but failed to point out why syslog.socket is special. The reason is that syslog.socket has DefaultDepedencies=no, so it does not get Requires=sysinit.target like other socket units do. But syslog.service does require sysinit.target, among other things. We don't have many socket, path, or timer units with DefaultDependencies=no, and I don't think any of the triggered services have such additional hard dependencies as syslog.service does. It is much less confusing if we keep this `Conflicts=` in the same file as the `DefaultDependencies=no` which made it necessary.
| * units: do not kill rescue shell when machines.target is startedAlan Jenkins2017-09-291-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original aim of this commit is that starting machines.target from the rescue shell would not kill the rescue shell and lock you out of the system. This is similar to commit 6579a622, for the conflict between sysinit.target and the _emergency_ shell. That particular commit introduced an ordering cycle and will need to be reverted and/or fixed. This one does not, because it does not need to introduce any new dependencies. The reason why this commit is allowable also has it's own merit: machines.target was not marked as AllowIsolate. Also, the point of containers is to not escape them... I don't think we want to promote machines.target as a default target or similar; you would generally want some system service to allow you to shut down the machine, for example. I don't see this approach used in CoreOS, nor in Fedora Atomic Host; we are missing any positive examples of its utility. Requires=basic.target / After=basic.target can be removed for the same reason.
* | Update mailmap and contributor list (#7006)Zbigniew Jędrzejewski-Szmek2017-10-052-6/+7
| | | | | | Also fix typo (by using a word that is a better git anyway.)
* | units: restore User=systemd-journal-gateway in ↵Lennart Poettering2017-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | core: make gc_marker unsigned (#7004)Zbigniew Jędrzejewski-Szmek2017-10-051-1/+1
| | | | | | This matches the definition in unit.h.
* | seccomp: remove 'gettid' syscall from '@process' syscall set (#6989)Djalal Harouni2017-10-051-1/+0
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #6931 from poettering/job-timeout-secZbigniew Jędrzejewski-Szmek2017-10-056-6/+91
|\ \
| * | generator: when we insert a '\n', actually place a proper newline, tooLennart Poettering2017-10-051-4/+10
| | |
| * | unit: when JobTimeoutSec= is turned off, implicitly turn off ↵Lennart Poettering2017-10-055-2/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | NEWS: some nitpicking and bike-sheddingZbigniew Jędrzejewski-Szmek2017-10-051-39/+37
| | |
* | | Merge pull request #6952 from poettering/seccomp-getrlimitZbigniew Jędrzejewski-Szmek2017-10-052-12/+19
|\ \ \ | | | | | | | | a seccomp fix regarding ugetrlimit/prlimit64
| * | | seccomp: ignore (and debug log) errors by all invocations of ↵Lennart Poettering2017-10-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | seccomp: always handle seccomp_load() failing the same wayLennart Poettering2017-10-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | seccomp: react gracefully if we can't translate a syscall nameLennart Poettering2017-10-051-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | seccomp: include prlimit64 and ugetrlimit in @defaultLennart Poettering2017-10-052-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Revert "networkd: change UseMTU default to true. (#6837)" (#6950)Andrew Jeddeloh2017-10-053-7/+3
| | | | | | | | | | | | This reverts commit 22043e4317ecd2bc7834b48a6d364de76bb26d91. UseMTU is broken on real hardware and should not be enabled by default.
* | | Merge pull request #6988 from poettering/dns-stub-truncateZbigniew Jędrzejewski-Szmek2017-10-0510-49/+75
|\ \ \ | |/ / |/| | rework how resolved's dns stub deals with truncation
| * | resolved: rework how we handle truncation in the stub resolverLennart Poettering2017-10-059-37/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | resolved: take benefit of log_xyz_errno() returning the negative error codeLennart Poettering2017-10-051-12/+6
|/ / | | | | | | Just some modernizations.
* | Merge pull request #6944 from poettering/suspend-fixZbigniew Jędrzejewski-Szmek2017-10-056-120/+229
|\ \ | | | | | | systemctl reboot/suspend tweaks
| * | NEWS: add comment about change sync/async behaviour for shutdown commandsLennart Poettering2017-10-041-1/+15
| | |
| * | man: document which special "systemctl" commands are synchronous and which ↵Lennart Poettering2017-10-041-72/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | logind: don's change dry-run boolean before we actually enqueue the operationLennart Poettering2017-10-041-1/+4
| | | | | | | | | | | | Let's not affect change before the PK check.
| * | logind: reorder things a bitLennart Poettering2017-10-041-28/+28
| | | | | | | | | | | | Let's keep the three sleep method implementations close to each other.
| * | systemctl: make sure "reboot", "suspend" and friends are always asynchronousLennart Poettering2017-10-041-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | logind: add Halt() and CanHalt() APIsLennart Poettering2017-10-044-16/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | hwdb: Add accelerometer orientation entry for Chuwi Hi8 Pro tablet (#6998)Hans de Goede2017-10-051-0/+4
| | | | | | | | | Add an accelerometer orientation entry for the Chuwi Hi8 Pro tablet.
* | | tmpfiles: change btmp mode 0600 → 0660 (#6997)Lennart Poettering2017-10-042-1/+10
| | | | | | | | | | | | | | | As discussed in #6994. Fixes: #6994
* | | dynamic-user: don't use a UID that currently owns IPC objects (#6962)Lennart Poettering2017-10-043-41/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #6975 from sourcejedi/logind_pid_0_v2Zbigniew Jędrzejewski-Szmek2017-10-046-11/+11
|\ \ \ | |/ / |/| | Selectively revert "tree-wide: use pid_is_valid() at more places"
| * | logind: use pid_is_valid() where appropriateAlan Jenkins2017-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | These two sites _do_ match the definition of pid_is_valid(); they don't provide any special handling for the invalid PID value 0. (They're used by dbus methods, so the PID value 0 is handled with reference to the dbus client creds, outside of these functions).