summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* nspawn-oci: use SYNTHETIC_ERRNOZbigniew Jędrzejewski-Szmek2019-03-213-268/+212
|
* nspawn: mask out CAP_NET_ADMIN again if settings file turns off private ↵Lennart Poettering2019-03-151-4/+10
| | | | | | networking Fixes: #11755
* man: document the various new options nspawn learntLennart Poettering2019-03-152-0/+66
|
* nspawn: use right constant for shifting for uint64_t capsLennart Poettering2019-03-151-2/+2
|
* nspawn: add support for executing OCI runtime bundles with nspawnLennart Poettering2019-03-1511-171/+3233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a pretty large patch, and adds support for OCI runtime bundles to nspawn. A new switch --oci-bundle= is added that takes a path to an OCI bundle. The JSON file included therein is read similar to a .nspawn settings files, however with a different feature set. Implementation-wise this mostly extends the pre-existing Settings object to carry additional properties for OCI. However, OCI supports some concepts .nspawn files did not support yet, which this patch also adds: 1. Support for "masking" files and directories. This functionatly is now also available via the new --inaccesible= cmdline command, and Inaccessible= in .nspawn files. 2. Support for mounting arbitrary file systems. (not exposed through nspawn cmdline nor .nspawn files, because probably not a good idea) 3. Ability to configure the console settings for a container. This functionality is now also available on the nspawn cmdline in the new --console= switch (not added to .nspawn for now, as it is something specific to the invocation really, not a property of the container) 4. Console width/height configuration. Not exposed through .nspawn/cmdline, but this may be controlled through $COLUMNS and $LINES like in most other UNIX tools. 5. UID/GID configuration by raw numbers. (not exposed in .nspawn and on the cmdline, since containers likely have different user tables, and the existing --user= switch appears to be the better option) 6. OCI hook commands (no exposed in .nspawn/cmdline, as very specific to OCI) 7. Creation of additional devices nodes in /dev. Most likely not a good idea, hence not exposed in .nspawn/cmdline. There's already --bind= to achieve the same, which is the better alternative. 8. Explicit syscall filters. This is not a good idea, due to the skewed arch support, hence not exposed through .nspawn/cmdline. 9. Configuration of some sysctls on a whitelist. Questionnable, not supported in .nspawn/cmdline for now. 10. Configuration of all 5 types of capabilities. Not a useful concept, since the kernel will reduce the caps on execve() anyway. Not exposed through .nspawn/cmdline as this is not very useful hence. Note that this only implements the OCI runtime logic itself. It does not provide a runc-compatible command line tool. This is left for a later PR. Only with that in place tools such as "buildah" can use the OCI support in nspawn as drop-in replacement. Currently still missing is OCI hook support, but it's already parsed and everything, and should be easy to add. Other than that it's OCI is implemented pretty comprehensively. There's a list of incompatibilities in the nspawn-oci.c file. In a later PR I'd like to convert this into proper markdown and add it to the documentation directory.
* nspawn: (void)ify more stuffLennart Poettering2019-03-151-1/+1
|
* nspawn: refactor setuid code a bitLennart Poettering2019-03-152-17/+36
| | | | | | | | Let's separate out the raw uid_t/gid_t handling from the username handling. This is useful later on. Also, let's use the right gid_t type for group types wherever appropriate.
* capability: let's protect against the kernel eventually doing more than 64 capsLennart Poettering2019-03-151-5/+10
| | | | | | Everyone will be in trouble then (as quite widely caps are store in 64bit fields). But let's protect ourselves at least to the point that we ignore all higher caps for now.
* capability: deal with libcap being older than kernelLennart Poettering2019-03-151-3/+18
|
* capability: add a way to get a uint64_t with all caps setLennart Poettering2019-03-151-3/+5
|
* capability: keep CAP_SETPCAP while dropping bounding capsLennart Poettering2019-03-151-3/+41
| | | | | | The kernel only allows dropping bounding caps as long as we have CAP_SETPCAP. Hence, let's keep that before dropping the bounding caps, and afterwards drop them too.
* Merge pull request #12012 from keszybz/generator-man-docsLennart Poettering2019-03-158-275/+463
|\ | | | | Generator and documentation improvements
| * man: reorder and add examples to systemd-analyze(1)Zbigniew Jędrzejewski-Szmek2019-03-151-258/+431
| | | | | | | | | | | | | | The number of verbs supported by systemd-analyze has grown quite a bit, and the man page has become an unreadable wall of text. Let's put each verb in a separate subsection, grouping similar verbs together, and add a lot of examples to guide the user.
| * man,units: document what user "default.target" is a bitZbigniew Jędrzejewski-Szmek2019-03-152-3/+16
| |
| * analyze: reword explanation in critical-chain headerZbigniew Jędrzejewski-Szmek2019-03-151-2/+2
| | | | | | | | Let's try to make it a bit clearer.
| * man: tell generator writers to provide authorship and source informationZbigniew Jędrzejewski-Szmek2019-03-151-6/+9
| | | | | | | | | | | | | | Our generators always put a comment who generated the file, but we didn't recommend it to others. Let's also strengthen the advice to use SourcePath=.
| * fstab-generator: do not print double headerZbigniew Jędrzejewski-Szmek2019-03-151-2/+1
| | | | | | | | | | | | | | | | | | | | $ /run/systemd/generator/dev-mapper-fedora_krowka\x2dswap.swap # Automatically generated by systemd-fstab-generator # Automatically generated by systemd-fstab-generator [Unit] ...
| * tree-wide: spell "lifecycle" without hyphen everywhereZbigniew Jędrzejewski-Szmek2019-03-142-4/+4
| | | | | | | | | | We had 10 instances of unhyphentated spelling, and 4 of the hyphenated one. Consistency trumps ispell.
* | Merge pull request #11988 from keszybz/test-binaries-installationLennart Poettering2019-03-151-2/+5
|\ \ | | | | | | Install more requires binaries for tests
| * | tests: install /usr/bin/dbus-broker when using dbus-brokerZbigniew Jędrzejewski-Szmek2019-03-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | We'd install the service file, and then dbus-broker-launcher because it is mentioned in ExecStart=, but not the main executable, so nothing would work. Let's just install dbus-broker executables if found. They are small, so this doesn't matter much, and is much easier than figuring the exact conditions under which dbus-broker will be used instead of dbus-daemon.
| * | tests: install "head" in the imageZbigniew Jędrzejewski-Szmek2019-03-131-2/+2
| | | | | | | | | | | | For #11915.
* | | Merge pull request #12009 from ↵Lennart Poettering2019-03-152-2/+2
|\ \ \ | | | | | | | | | | | | | | | | mrc0mmand/bump-partition-size-for-TEST-02-CRYPTSETUP test: fix LUKS2 support
| * | | test: use PBKDF2 instead of Argon2 in cryptsetup...Frantisek Sumsal2019-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | to reduce memory requirements for volume manipulation. Also, to further improve the test performance, reduce number of PBKDF iterations to 1000 (allowed minimum).
| * | | test: bump the second partition size to 50MBFrantisek Sumsal2019-03-151-1/+1
| | |/ | |/| | | | | | | 10MB is not enough for a LUKS2 partition.
* | | Merge pull request #11658 from yuwata/systemd-id128Zbigniew Jędrzejewski-Szmek2019-03-153-8/+88
|\ \ \ | |/ / |/| | id128: several cleanups
| * | bash-completion: add systemd-id128 supportYu Watanabe2019-03-151-0/+74
| | |
| * | sd-id128: split the logic obtaining invocation ID from sd_id128_get_invocation()Yu Watanabe2019-03-151-7/+13
| | |
| * | id128: no command accepts additional argumentsYu Watanabe2019-03-151-1/+1
|/ /
* | Add accelerometer orientation quirk for the MYRIA MY8307 2-in-1.Van Laser2019-03-141-0/+8
| |
* | Merge pull request #12002 from keszybz/man-headersLennart Poettering2019-03-14296-1383/+679
|\ \ | | | | | | Man headers
| * | man: use same header for all filesZbigniew Jędrzejewski-Szmek2019-03-14296-379/+421
| | | | | | | | | | | | | | | | | | | | | The "include" files had type "book" for some raeason. I don't think this is meaningful. Let's just use the same everywhere. $ perl -i -0pe 's^..DOCTYPE (book|refentry) PUBLIC "-//OASIS//DTD DocBook XML V4.[25]//EN"\s+"http^<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"\n "http^gms' man/*.xml
| * | man: standarize on one-line license headerZbigniew Jędrzejewski-Szmek2019-03-14267-1004/+258
| | | | | | | | | | | | | | | | | | No need to waste space, and uniformity is good. $ perl -i -0pe 's|\n+<!--\s*SPDX-License-Identifier: LGPL-2.1..\s*-->|\n<!-- SPDX-License-Identifier: LGPL-2.1+ -->|gms' man/*.xml
* | | Merge pull request #11989 from poettering/minimal-portable-imageLennart Poettering2019-03-148-63/+200
|\ \ \ | | | | | | | | various documentation updates
| * | | man: say explicitly which settings are not available in --user servicesLennart Poettering2019-03-142-25/+86
| | | | | | | | | | | | | | | | Fixes: #3944
| * | | man: document that if the main process exits after SIGTERM we go directly to ↵Lennart Poettering2019-03-141-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | SIGKILL Fixes: #8122
| * | | networkd: clarify that IPv6 RA uses our own stack, no the kernel'sLennart Poettering2019-03-141-0/+5
| | | | | | | | | | | | | | | | Fixes: #8906
| * | | man: mention O_NOCTTY and it's importance in daemon(7)Lennart Poettering2019-03-141-3/+8
| | | | | | | | | | | | | | | | Fixes: #9164
| * | | docs: adjust the spec a bit with firmware authros in mindLennart Poettering2019-03-141-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This borrows heavily from Nico Huber's https://github.com/systemd/systemd/pull/10398, but makes a number of changes. Replaces: #10398
| * | | man: document the network interface size limits --network-veth= enforcesLennart Poettering2019-03-141-5/+17
| | | | | | | | | | | | | | | | Fixes: #10721
| * | | man: document that Anonymize=yes makes DHCP leases grow in sizeLennart Poettering2019-03-141-0/+5
| | | | | | | | | | | | | | | | Fixes: #11551
| * | | docs: comprehensively document what a minimal portable service image needs ↵Lennart Poettering2019-03-141-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to include The docs were incomplete on this. Let's fix that. Fixes: #11870
* | | | Merge pull request #11785 from dvdhrm/implicit-saslLennart Poettering2019-03-141-42/+77
|\ \ \ \ | |/ / / |/| | | sd-bus: allow cross-uid-namespace connections
| * | | sd-bus: skip sending formatted UIDs via SASLDavid Rheinsberg2019-03-141-38/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dbus external authentication takes as optional argument the UID the sender wants to authenticate as. This uid is purely optional. The AF_UNIX socket already conveys the same information through the auxiliary socket data, so we really don't have to provide that information. Unfortunately, there is no way to send empty arguments, since they are interpreted as "missing argument", which has a different meaning. The SASL negotiation thus changes from: AUTH EXTERNAL <uid> NEGOTIATE_UNIX_FD (optional) BEGIN to: AUTH EXTERNAL DATA NEGOTIATE_UNIX_FD (optional) BEGIN And thus the replies we expect as a client change from: OK <server-id> AGREE_UNIX_FD (optional) to: DATA OK <server-id> AGREE_UNIX_FD (optional) Since the old sd-bus server implementation used the wrong reply for "AUTH" requests that do not carry the arguments inlined, we decided to make sd-bus clients accept this as well. Hence, sd-bus now allows "OK <server-id>\r\n" replies instead of "DATA\r\n" replies. Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
| * | | sd-bus: fix SASL reply to empty AUTHDavid Rheinsberg2019-03-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct way to reply to "AUTH <protocol>" without any payload is to send "DATA" rather than "OK". The "DATA" reply triggers the client to respond with the requested payload. In fact, adding the data as hex-encoded argument like "AUTH <protocol> <hex-data>" is an optimization that skips the "DATA" roundtrip. The standard way to perform an authentication is to send the "DATA" line. This commit fixes sd-bus to properly send the "DATA" line. Surprisingly no existing implementation depends on this, as they all pass the data directly as argument to "AUTH". This will not work if we want to pass an empty argument, though. Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
| * | | sd-bus: avoid magic number in SASL length calculationDavid Rheinsberg2019-03-141-2/+6
| |/ / | | | | | | | | | | | | | | | Lets avoid magic numbers and use a constant `strlen()` instead. Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
* | | Merge pull request #12000 from poettering/split-more-utilZbigniew Jędrzejewski-Szmek2019-03-1477-267/+344
|\ \ \ | |/ / |/| | split more files in src/basic/
| * | main: use _exit() rather than exit() in code potentially caled from signal ↵Lennart Poettering2019-03-141-3/+3
| | | | | | | | | | | | handler
| * | util: split out nulstr related stuff to nulstr-util.[ch]Lennart Poettering2019-03-1440-40/+70
| | |
| * | util: move some raw memory functions from string-util.h → memory-util.hLennart Poettering2019-03-145-46/+47
| | |
| * | util: don't include util.h from def.hLennart Poettering2019-03-142-4/+2
| | | | | | | | | | | | Nothing it defines is used in it.