summaryrefslogtreecommitdiffstats
path: root/src/detect-virt/detect-virt.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-03-04login: HyperV requires master-of-seat to be setMike Lothian1-0/+4
v2: Update comment provided by Lennart Fixes: https://github.com/systemd/systemd/issues/11299
2019-03-04fuzz-dhcp6-client: avoid assertion failure on samples which dont fit in pipeYu Watanabe2-0/+5
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11584.
2019-03-04test: add tests for log_syntax()Yu Watanabe1-1/+8
2019-03-04log: make log_syntax() assign correct errno and show valid error causeYu Watanabe2-2/+2
2019-03-03xbootldr: multiple spaces between keys and values (#11872)Ben Iofel1-1/+1
The example below the changed line has multiple spaces between e.g. `title` and `Fedora`
2019-03-03man: flush-caches and reset-server-features are commands for resolvectl (#11877)Yu, Li-Yu1-2/+2
2019-03-01man: document that --ephemeral and --template= don't cover submountsLennart Poettering1-15/+19
We never made this clear, let's fix that.
2019-03-01btrfs: when falling back to plain copy when snapshoting exclude submountsLennart Poettering1-1/+1
The subvol snapshot logic doesn't cover sub-mounts either, and it really shouldn't in the general case, hence let's simply stop at submounts in all cases, both in the main and in the fall-back codepath. As discussed here: https://github.com/systemd/systemd/pull/11243#pullrequestreview-209477230
2019-03-01test: add test for new sd-bus refcnt logicLennart Poettering2-0/+48
2019-03-01sd-bus: use "queue" message references for managing r/w message queues in ↵Lennart Poettering2-34/+32
connection objects Let's make use of the new concept the previous commit added. See: #4846
2019-03-01bus-message: introduce two kinds of references to bus messagesLennart Poettering2-3/+89
Before this commit bus messages had a single reference count: when it reached zero the message would be freed. This simple approach meant a cyclic dependency was typically seen: a message that was enqueued in a bus connection object would reference the bus connection object but also itself be referenced by the bus connection object. So far out strategy to avoid cases like this was: make sure to process the bus connection regularly so that messages don#t stay queued, and at exit flush/close the connection so that the message queued would be emptied, and thus the cyclic dependencies resolved. Im many cases this isn't done properly however. With this change, let's address the issue more systematically: let's break the reference cycle. Specifically, there are now two types of references to a bus message: 1. A regular one, which keeps both the message and the bus object it is associated with pinned. 2. A "queue" reference, which is weaker: it pins the message, but not the bus object it is associated with. The idea is then that regular user handling uses regular references, but when a message is enqueued on its connection, then this takes a "queue" reference instead. This then means that a queued message doesn't imply the connection itself remains pinned, only regular references to the connection or a message associated with it do. Thus, if we end up in the situation where a user allocates a bus and a message and enqueues the latter in the former and drops all refs to both, then this will detect this case and free both. Note that this scheme isn't perfect, it only covers references between messages and the busses they are associated with. If OTOH a bus message is enqueued on a different bus than it is associated with cyclic deps cannot be recognized with this simple algorithm, and thus if you enqueue a message associated with a bus A on a bus B, and another message associated with bus B on a bus A, a cyclic ref will be in effect and not be discovered. However, given that this is an exotic case (though one that happens, consider systemd-bus-stdio-bridge), it should be OK not to cover with this, and people have to explicit flush all queues on exit in that case. Note that this commit only establishes the separate reference counters per message. A follow-up commit will start making use of this from the bus connection object.
2019-03-01sd-bus: always go through sd_bus_unref() to free messagesLennart Poettering1-7/+5
Don't try to be smart, don't bypass the ref counting logic if there's no real reason to. This matters if we want to tweak the ref counting logic later.
2019-03-01sd-bus: drop two inappropriate empty linesLennart Poettering1-2/+0
2019-03-01sd-bus: make sure dispatch_rqueue() initializes return parameter on all ↵Lennart Poettering1-1/+3
types of success Let's make sure our own code follows coding style and initializes all return values on all types of success (and leaves it uninitialized in all types of failure).
2019-03-01sd-bus: reorder bus ref and bus message ref handlingLennart Poettering1-2/+3
Let's always place handling of these references together, so that all reference counting during allocation is at a single place.
2019-03-01sd-bus: make rqueue/wqueue sizes of type size_tLennart Poettering2-3/+3
Let's do this like we usually do and size arrays with size_t. We already do this for the "allocated" counter correctly, and externally we expose the queue sizes as uint64_t anyway, hence there's really no point in usigned "unsigned" internally.
2019-03-01sd-bus: initialize mutex after we allocated the wqueueLennart Poettering1-2/+2
That way the mutex doesn't have to be destroyed when we exit early due to OOM.
2019-03-01test: fix indenting off by oneLennart Poettering1-2/+2
2019-03-01man: document new systemd.volatile=overlay kernel command line optionLennart Poettering2-11/+20
2019-03-01man: document nspawn's new --volatile=overlay switchLennart Poettering1-44/+71
2019-03-01copy: don't synthesize a 'user.crtime_usec' xattr on copy unless explicitly ↵Lennart Poettering8-12/+16
requested Previously, when we'd copy an individual file we'd synthesize a user.crtime_usec xattr with the source's creation time if we can determine it. As the creation/birth time was until recently not queriable form userspace this effectively just propagated the same xattr on the source to the same xattr on the destination. However, current kernels now allow to query the birthtime using statx() and we do make use of that now. Which means that suddenly we started synthesizing these xattrs much more regularly. Doing this actually does make sense, but only in very few cases: not for the typical regular files we copy, but certainly when dealing with disk images. Hence, let's keep this kind of propagation, but let's make it a flag and default to off. Then turn it on whenever we deal with disk images, and leave it off otherwise. This is particularly relevant as overlayfs combining a real fs, and a tmpfs on top will result in EOPNOTSUPP when it is attempted to open a file with xattrs for writing, as tmpfs does not support xattrs, and hence the copy-up cannot work. Hence, let's avoid synthesizing this needlessly, to increase compat with overlayfs.
2019-03-01gpt-auto-generator: use new /run/systemd/volatile-root symlink as fallback ↵Lennart Poettering1-2/+20
when we otherwise cannot determine root device node
2019-03-01gpt-auto-generator: rename open_parent() → open_parent_devno() so that we ↵Lennart Poettering1-2/+2
can include fs-util.h later As that header also defines a function open_parent() which does something different.
2019-03-01volatile-root: export original rootLennart Poettering1-0/+20
2019-03-01volatile-root: add overlay mode for host boots, tooLennart Poettering2-18/+71
2019-03-01volatile-root: fail if we can't parse specified parameterLennart Poettering1-4/+2
2019-03-01volatile-root: add missing logging to volatile-rootLennart Poettering1-3/+5
2019-03-01volatile-util: tweak query_volatile_mode() a bitLennart Poettering1-9/+10
2019-03-01nspawn: rework how arg_read_only is initialized in --volatile= modeLennart Poettering1-4/+10
Previously, we'd refuse the combination, and claimed we'd imply it, but actually didn't. Let's allow the combination and imply read-only from --volatile=, because that's what's documented, what we claim we do, and what makes sense.
2019-03-01nspawn: refactor how we determine whether it's OK to write to /etcLennart Poettering1-6/+10
2019-03-01nspawn: no need to make top-level directory a bind mount if we just ↵Lennart Poettering1-4/+6
dissected an image
2019-03-01nspawn: slightly reorder mount logicLennart Poettering1-22/+22
Let's first setup the volatile logic, and only then mount secondary partitions of the image in.
2019-03-01nspawn: add --volatile=overlay supportLennart Poettering4-6/+76
Fixes: #11054 #3847
2019-03-01nspawn: fix an error pathLennart Poettering1-1/+1
2019-03-01nspawn: add volatile mode multiplexer call setup_volatile_mode()Lennart Poettering3-27/+26
Just some refactoring, no change in behaviour.
2019-03-01nspawn: explicitly refuse mounts over /Lennart Poettering1-0/+7
Previously this would fail later on, but let's filter this out at the time of parsing.
2019-03-01update TODOLennart Poettering1-8/+0
2019-03-01man: document XBOOTLDR partition logic in bootctl's man pageLennart Poettering1-15/+34
2019-03-01man: document XBOOTLDR search logic for sd-bootLennart Poettering1-28/+34
2019-03-01man: extend systemd-gpt-auto-generator with XBOOTLDR infoLennart Poettering1-36/+54
2019-03-01docs: enclose all uuids in ``Lennart Poettering1-3/+3
2019-03-01meson: sort header list againLennart Poettering1-1/+1
2019-03-01mkosi: let's update the boot loader also in /efiLennart Poettering1-0/+4
This is after all where we preferable mount the ESP today.
2019-03-01bootspec: stat() on an autofs mount point doesn't trigger it, let's hence do ↵Lennart Poettering1-1/+7
it explicitly
2019-03-01stub: don't override LoaderDevicePartUUID EFI varLennart Poettering1-3/+4
We document and all our code assumes that LoaderDevicePartUUID is initialized to the ESP's UUID. Let's hence not override the variable if it is already set, in order to not confuse userspace if the kernel's EFI image is run from a different partition than the ESP. This matches behaviour for all other variables set by the EFI stub, in particular the closely related LoaderImageIdentifier variable.
2019-03-01stub: don't ask for variable data we actually don't care aboutLennart Poettering1-4/+4
Let's take benefit of the fact that efivar_get_xyz() take NULL pointers for the return data: let's shorten the code a bit.
2019-03-01stub: fix GUID to check EFI vars inLennart Poettering1-4/+4
Our own variables are in the the "loader" GUID namespace, but our code so far checked the "global" GUID namespace (i.e. EFI's own), before setting the variables. Correct that, so that we always check the right namespace for existing variables before we write them.
2019-03-01efi: beef up efivar_get_xyz() to accept NULL return valuesLennart Poettering2-3/+15
2019-03-01sd-boot: don't print error string where there's no error code knownLennart Poettering1-1/+1
2019-03-01sd-boot: also look for boot loader entries in the XBOOTLDR partitionLennart Poettering4-0/+344
The specification always said so, let's actually implement this. Unfortunately UEFI's own APIs don't allow us to search for partition type GUID, hence we have to implement a minimal GPT parser ourselves.