summaryrefslogtreecommitdiffstats
path: root/units/systemd-nspawn@.service.in (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-11-22resolved: lower connection timeout for DoT connections in opportunistic modeLennart Poettering5-12/+38
Fixes: #20801
2021-11-22resolved: clean up manager_write_resolv_conf() a bitLennart Poettering1-26/+15
Let's downgrade log messages which are not fatal for the service to LOG_WARNING. And let's simplify clean-up by using _cleanup_(unlink_and_freep).
2021-11-22resolved: make sure we don't hit an assert when dealing with incomplete ↵Lennart Poettering1-1/+3
DNSSD service definitions Fixes: #21142
2021-11-22resolved: properly signal transient errors back to NSS stackLennart Poettering1-9/+46
NSS mostly knows four error cases: SUCCESS, NOTFOUND, UNAVAIL, TRYAGAIN, and they can all be used in nsswitch.conf to route requests. So far nss-resolve would return SUCCESS + NOTFOUND + UNAVAIL. Let's also return TRYAGAIN in some cases, specifically the ones where we are currntly unable to resolve a request but likely could later. i.e. errors caused by networking issues or such. Fixes: #20786
2021-11-22resolved: fix ResolveService() hostname handlingLennart Poettering1-1/+2
Let's eat up special returns of dns_query_process_cname_many() when storing hostname resolution results. The rest of the code assumes only == 0 means success and != 0 means error, but so far > 0 also could mean success, let's fix that. Fixes: #21365 #21140 (This was originally broken in 1db8e6d1db0880de240e5598e28d24d708479434)
2021-11-22nspawn: voidify expose_port_execute() callsLennart Poettering1-2/+2
2021-11-22resolved: add "proxy-only" stub on 127.0.0.54Lennart Poettering7-60/+179
This beefs up the DNS stub logic to listen on two IP addresses: 127.0.0.53 (as before) + 127.0.0.54 (new). When the latter is contact our stub will operate in "bypass" mode only, i.e we'll try to pass DNS requests as unmodified upstream as we can (and not do mDNS/LLMNR and such, also no DNSSEC validation – but we'll still do DNS-over-TLS wrapping). This is supposed to be useful for container environments or tethering: this stub could be exposed (via NAT redirect) to clients of this system and we'll try to stay out of the way with doing too much DNS magic ourselves, but still expose whatever the current DNS server is from upstream under a stable address/port. How to use this: # iptables -t nat -I PREROUTING -p udp -i <interface> --dport 53 -j DNAT --to 127.0.0.54:53 # echo 1 > /proc/sys/net/ipv4/conf/<interface>/route_localnet
2021-11-22socket-util: add helper for generically initializing sockaddr_union from ↵Lennart Poettering2-0/+37
in_addr_union
2021-11-22resolved: include IP address info in debug output for incoming datagramsLennart Poettering1-2/+10
2021-11-22resolved: use RET_NERRNO() where it makes senseLennart Poettering1-3/+2
2021-11-22Remove own copyright lineJan Janssen1-3/+0
2021-11-22FIDO2 device removal instructions (#21426)Robert-L-Turner1-0/+3
* man: document FIDO2 device removal Indicate to users how to remove FIDO2 device in the --fido2-device=path section by setting path to an empty string (""). Tested on systemd 249 (249.6-3-arch)
2021-11-22test runner: print time before/after testsLuca Boccassi1-2/+2
When a timeout occurs we actually can't see when the test started/stopped. Print the time.
2021-11-21analyze: fix printing config when there is no main config fileZbigniew Jędrzejewski-Szmek1-14/+29
Since 8b8024f1c231c166f5c450905c8fd91d11704ae7 and the follow-up commits, the main config file may be located in /usr or in other paths. But the code in analyze.c was still assuming that it must be in /etc. Things mostly worked for our own config files because we usually install a comments-only file in /etc, but was not correct in the general case. This fixes in particular 'systemd-analyze cat-config systemd/zram-generator.conf'. In Fedora we distribute a config file in zram-generator-defaults.rpm that is in /usr/lib, and 'cat-config' would refuse to show it because /etc/systemd/zram-generator.conf does not exist. The main config file is optional, but let's print an informative message because this is a slightly unusual case. The file paths that we printed were missing the root prefix.
2021-11-20nspawn: use FOREACH_STRING() moreLennart Poettering1-8/+8
2021-11-20core: prefix functions to avoid identical static function namesChristian Göttsche1-14/+14
The function name `method_reload` is used both in dbus-unit.c and dbus-manager.c for static functions. With the previous addition of adding the function name to the audit information on SELinux denials, rename the one (and its relatives) in dbus-unit.c as most of the functions in src/core/dbus-unit.c are already prefixed with `bus_unit_`.
2021-11-20selinux: name mac_selinux_generic_access_check as internal functionChristian Göttsche2-9/+9
`mac_selinux_generic_access_check()` should not be called directly, only via the wrapper macros `mac_selinux_access_check` and `mac_selinux_unit_access_check`.
2021-11-20selinux: improve debug log formatChristian Göttsche1-1/+1
path might be NULL when checking against the system permissions, so wrap with strna(). The command line might not be available over D-Bus and thus cl might be empty. Print "n/a" instead of the empty string.
2021-11-20selinux: add function name to audit dataChristian Göttsche2-7/+17
Include the systemd C function name in the audit message to improve the debug ability on denials. Similar like kernel denial messages include the syscall name.
2021-11-19mmap-cache: s/mmap_cache/mmap_cache_fd_/ where aproposVito Caputo5-29/+29
Mostly mechanical renaming of mmap-cache functions that now operate exclusively on the MMapFileDescriptor.
2021-11-19mmap-cache: simplify API around MMapFileDescriptorVito Caputo5-70/+60
MMapFileDescriptor carries a reference to its originating MMapCache, there's no value in supplying the MMapFileDescriptor-centric functions a separate MMapCache. A future commit will rename these functions to consistently use an mmap_cache_fd_* prefix for improved clarity.
2021-11-19Document usr-specific verity parametersMark Boudreau2-2/+14
Mention 'usrhash' and 'systemd.verity_usr_*' kernel command line parameters in the man pages for veritysetup-generator and kernel-command-line
2021-11-19fstab-generator: use 'usr' mapper device when 'usrhash' is presentMark Boudreau1-7/+28
If 'usrhash' is present as a kernel command line parameter, use the usr mapper device for usr mount
2021-11-19veritysetup-generator: generate service for usr deviceMark Boudreau1-54/+139
If 'usrhash' is present as a kernel command line parameter, generate a veritysetup service for usr. Also recognize systemd.verity_usr_* parameters.
2021-11-19journal: Limit the number of audit fields per log messageDaan De Meyer2-32/+25
Similar to the kmsg handler, let's also limit the number of fields we parse from audit messages. Fixes #19799
2021-11-19Add a trivial guard against using the same uuid twiceZbigniew Jędrzejewski-Szmek1-0/+6
2021-11-19shared/base-filesystem: use LIB_ARCH_TUPLE instead of stringZbigniew Jędrzejewski-Szmek1-5/+6
2021-11-19Trivial style fixesZbigniew Jędrzejewski-Szmek2-5/+3
2021-11-19docs: document the partition UUID used by homedZbigniew Jędrzejewski-Szmek2-0/+6
2021-11-19shared/gpt: fix bit-flip in LoongArch root partition UUIDZbigniew Jędrzejewski-Szmek1-1/+1
4e767154891083069a58c5c960f386974ad87fb4 added a slightly different UUID in the header and in the docs. This makes the code match the docs. > As some downstream projects are already using the UUID as in the docs, most > notably util-linux [1], we should adjust code to match doc; no shipping > LoongArch systems are using upstream systemd, and no open-source distro is > merging LoongArch support yet, so the change should break no one. This also > matches the work being done by @yetist at loongarch64/systemd#7. [1] https://github.com/util-linux/util-linux/commit/2d29fccaad267d1b003dc0ed2bb9634ff76f3e49
2021-11-19docs: generate table from header using a scriptZbigniew Jędrzejewski-Szmek3-40/+282
This adds a helper script: $ python3 tools/list-discoverable-partitions.py <src/shared/gpt.h <!-- generated with tools/list-discoverable-partitions.py --> | Partition Type UUID | Name | Allowed File Systems | Explanation | |---------------------|------|----------------------|-------------| | _Root Partition (Alpha)_ | `6523f8ae-3eb1-4e2a-a05a-18b695ae656f` | [Root Partition] | [Root Partition more] | | _Root Partition (ARC)_ | `d27f46ed-2919-4cb8-bd25-9531f3c16534` | ditto | ditto | ... The output can be pasted into the markdown file. I think this works better than trying to match the two lists by hand.
2021-11-19shared/gpt: ARM_64 → ARM64Zbigniew Jędrzejewski-Szmek2-14/+14
"arm64" is generally written without the underscore.
2021-11-19shared/gpt: add entries for a bunch of architecturesZbigniew Jędrzejewski-Szmek2-2/+145
I don't think we want people to send us pull requests over the next two years. Let's just make something up ourselves, this is going to have at least as good results, and will be much quicker. Note that this only includes architectures for which there's some indication that they are in active use. In architecture.h there are some more esoteric ones like ARC_BE. We can add those if there's some actual user demand. In particular, I included everything on the Debian "List of official ports" [1] and a few other arches that we have received patches for in recent times. [1] https://www.debian.org/ports/#portlist-released
2021-11-19shared/gpt: add a macro to make the definitions a bit less onerousZbigniew Jędrzejewski-Szmek1-109/+47
2021-11-19journal: Add verify_hash_table()Daan De Meyer1-32/+52
The existing verify_hash_table() function is renamed to verify_data_hash_table() since it only verifies the data hash table. The verify information is also made a little more detailed by splitting one of the checks in two.
2021-11-19journal: Add journal_file_object_to_string()Daan De Meyer2-27/+33
2021-11-19journal: Simplify definition of HEADER_INCOMPATIBLE_SUPPORTEDDaan De Meyer1-17/+5
2021-11-19journal: Use more structured initializationDaan De Meyer1-6/+12
2021-11-19journal: Use size_t instead of unsigned for array sizesDaan De Meyer1-2/+2
2021-11-19shared/gpt: reorder arches alphabeticallyZbigniew Jędrzejewski-Szmek3-102/+96
It's just too annoying to add new ones otherwise.
2021-11-19update TODOLennart Poettering1-24/+11
2021-11-19doc: rebreak boot loader specLennart Poettering1-66/+225
2021-11-19docs: switch the first two columns in partition uuid listZbigniew Jędrzejewski-Szmek1-56/+56
Readers are most likely to want to go from a partition id to the uuid, so puts the uuid second
2021-11-19shared/base-filesystem: add define for s390xZbigniew Jędrzejewski-Szmek1-0/+4
This is based on the information in #14311 and https://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-S390X/LSB-Core-S390X.pdf and https://wiki.debian.org/Multiarch/Tuples. Fixes #14311.
2021-11-19shared/base-filesystem: m68k is 32-bit onlyZbigniew Jędrzejewski-Szmek1-0/+2
2021-11-19shared/base-filesystem: add define for armZbigniew Jędrzejewski-Szmek1-0/+2
$ ls -l /lib /lib64 ls: cannot access '/lib64': No such file or directory lrwxrwxrwx. 1 root root 7 Jan 26 2021 /lib -> usr/lib $ ldd /bin/sh|grep ld /lib/ld-linux-armhf.so.3 (0xb6f80000)
2021-11-19shared/base-filesystem: add define for riscv64Zbigniew Jędrzejewski-Szmek1-0/+4
https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the linker paths. I used the linker path from Fedora. $ ls -l /lib /lib64 lrwxrwxrwx. 1 root root 7 Aug 13 2020 /lib -> usr/lib lrwxrwxrwx. 1 root root 9 Aug 13 2020 /lib64 -> usr/lib64 $ ldd /bin/sh|grep ld /lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fb8185000) $ ls -l /lib/ld-linux-riscv64-lp64d.so.1 lrwxrwxrwx 1 root root 19 Aug 4 19:28 /lib/ld-linux-riscv64-lp64d.so.1 -> ../lib64/ld-2.32.so $ uname -r 5.10.6+ So even though the canonical linker path uses /lib/, we need the /lib64 symlink to be present.
2021-11-19shared/base-filesystem: add define for ppc64elZbigniew Jędrzejewski-Szmek1-0/+9
https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the linker paths. I used the linker path from Fedora, but I can't look up the linker paths for BE and 32 bit. At least the ifdef scaffolding is provided, so it should be trivial to fill in if somebody has access to such a system. $ ls -l /lib /lib64 lrwxrwxrwx. 1 root root 7 Jan 26 2021 /lib -> usr/lib lrwxrwxrwx. 1 root root 9 Jan 26 2021 /lib64 -> usr/lib64 $ ldd /bin/sh|grep ld /lib64/ld64.so.2 (0x00007fffa0a90000) $ uname -r 5.14.9-200.fc34.ppc64le Note that the macro defines listed in the wiki page don't match what I get on Fedora: __PPC64__ vs. __ppc64__. $ cpp -dM < /dev/null |grep -iE '__(powerpc|ppc)'|sort #define __powerpc__ 1 #define __powerpc64__ 1 #define __PPC__ 1 #define __PPC64__ 1 First half of the fix for #14311.
2021-11-19shared/base-filesystem: add define for arm64Zbigniew Jędrzejewski-Szmek1-0/+6
https://wiki.debian.org/ArchitectureSpecificsMemo: > arm64 aarch64-linux-gnu 64 AARCH64 /lib/ld-linux-aarch64.so.1 aarch64 aarch64 Fedora: $ ls -l /lib /lib64 lrwxrwxrwx. 1 root root 7 Jul 27 2020 /lib -> usr/lib lrwxrwxrwx. 1 root root 9 Jul 27 2020 /lib64 -> usr/lib64 $ ldd /bin/sh|grep ld /lib/ld-linux-aarch64.so.1 (0x0000ffff8c905000) $ ls -l /lib/ld-linux-aarch64.so.1 /lib64/ld-2.32.so lrwxrwxrwx. 1 root root 19 Jul 13 07:28 /lib/ld-linux-aarch64.so.1 -> ../lib64/ld-2.32.so -rwxr-xr-x. 1 root root 961248 Jul 13 07:56 /lib64/ld-2.32.so $ uname -r 5.14.16-101.fc33.aarch64 So we need both /lib and /lib64 to be present, even though the canonical linker path uses /lib.
2021-11-19shared/base-filesystem: add (empty) iffdery for the tableZbigniew Jędrzejewski-Szmek1-8/+29
I think this is going to be very annoying for our downstream maintainers. Let's at least provide the ifdef scaffolding so that only filling in the actual entries remains. The structure is copied from missing_syscall.h.