summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #15368 from poettering/color-fixZbigniew Jędrzejewski-Szmek2020-04-092-2/+2
|\ | | | | minor terminal ansi color seq fixes
| * test-terminal-util: fix typoLennart Poettering2020-04-081-1/+1
| |
| * terminal-util: fixate underlined yellow color tooLennart Poettering2020-04-081-1/+1
| | | | | | | | | | | | | | non-underlined yellow uses RGB ANSI sequences while the underlined version uses the paletted ANSI sequences. Let's unify that and use the RGB sequence for both cases, so that underlined or not doesn't alter the color.
* | mount-setup: change the system mount propagation to shared by default only ↵Wen Yang2020-04-093-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at bootup The commit b3ac5f8cb987 has changed the system mount propagation to shared by default, and according to the following patch: https://github.com/opencontainers/runc/pull/208 When starting the container, the pouch daemon will call runc to execute make-private. However, if the systemctl daemon-reexec is executed after the container has been started, the system mount propagation will be changed to share again by default, and the make-private operation above will have no chance to execute.
* | Merge pull request #15331 from vcaputo/busdpiZbigniew Jędrzejewski-Szmek2020-04-092-0/+158
|\ \ | | | | | | bus: introduce some sd-bus convenience helpers
| * | bus: introduce some sd-bus convenience helpersVito Caputo2020-04-042-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the convenience functions from sd-bus operate on verbose sets of discrete strings for destination/path/interface/member. For most callers, destination/path/interface are uniform, and just the member is distinct. This commit introduces a new struct encapsulating the destination/path/interface pointers called BusAddress, and wrapper functions which take a BusAddress* instead of three strings, and just pass the encapsulated strings on to the sd-bus convenience functions. Future commits will update call sites to use these helpers throwing out a bunch of repetitious destination/path/interface strings littered throughout the codebase, replacing them with some appropriately named static structs passed by pointer to these new helpers.
* | | systemd-run: add --slice-inheritMarc-André Lureau2020-04-091-9/+44
| | | | | | | | | | | | Add a new option to easily place a slice within the systemd-run slice.
* | | LLDP: Add support to transmit MUD URLSusant Sahani2020-04-085-1/+83
| | |
* | | sd-lldp: Add support to receive MUDSusant Sahani2020-04-073-1/+29
| |/ |/|
* | Merge pull request #14930 from tomhughes/dnssec-canonicaliseLennart Poettering2020-04-074-78/+136
|\ \ | | | | | | Canonicalise names in DNS responses per RFC4034 requirements
| * | Canonicalise names in DNS responses per RFC4034 requirementsTom Hughes2020-02-242-5/+136
| | | | | | | | | | | | | | | | | | | | | | | | Section 6.2 of RFC4034 requires that "all uppercase US-ASCII letters in the DNS names contained within the RDATA are replaced by the corresponding lowercase US-ASCII letters" for a long list of RR types. Fixes #14891
| * | Remove dnssec_canonicalize function which is no longer usedTom Hughes2020-02-243-73/+0
| | |
* | | Remove message->priority fieldZbigniew Jędrzejewski-Szmek2020-04-074-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A warning is emitted from sd_bus_message_{get,set}_priority. Those functions are exposed by pystemd, so we have no easy way of checking if anything is calling them. Just making the functions always return without doing anything would be an option, but then we could leave the caller with an undefined variable. So I think it's better to make the functions emit a warnings and return priority=0 in the get operation.
* | | fix manager_stateroot2020-04-071-5/+5
| | |
* | | detect-virt: also detect "microsoft" as WSLZbigniew Jędrzejewski-Szmek2020-04-041-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From https://github.com/microsoft/WSL/issues/423#issuecomment-221627364: > it's unlikely we'll change it to something that doesn't contain "Microsoft" > or "WSL". ... but well, it happened. If they change it incompatibly w/o adding an stable detection mechanism, I think we should not add yet another detection method. But adding a different casing of "microsoft" is not a very big step, so let's do that. Follow-up for #11932.
* | | Merge pull request #15298 from keszybz/show-property-valueLennart Poettering2020-04-041-4/+7
|\ \ \ | |_|/ |/| | systemctl --property-value as shortcut for --property --value
| * | systemctl: add -P as short for --value --property=Zbigniew Jędrzejewski-Szmek2020-04-031-4/+7
| | |
* | | Merge pull request #15321 from topimiettinen/dbus-execute-add-protect-clockAnita Zhang2020-04-041-0/+1
|\ \ \ | | | | | | | | dbus-execute: show also ProtectClock
| * | | dbus-execute: show also ProtectClockTopi Miettinen2020-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | Show also `ProtectClock=` setting. This also lets `systemd-analyze security` get the correct state for it.
* | | | Merge pull request #15290 from keszybz/unrelated-fixesAnita Zhang2020-04-042-6/+2
|\ \ \ \ | | | | | | | | | | Three unrelated minor tweaks
| * | | | journal-remote: fix description of optionZbigniew Jędrzejewski-Szmek2020-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | We use whatever compression is configured, most often not XZ.
| * | | | sd-bus: simplify bus_maybe_reply_errorZbigniew Jędrzejewski-Szmek2020-03-311-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sd_bus_reply_method_errno already does the same two checks (sd_bus_error_is_set(error), r < 0) internally. But it did them in opposite order. The effect is the same, because sd_bus_reply_method_errno falls back to sd_bus_reply_method_error, but it seems inelegant. So let's simplify bus_maybe_reply_error() to offload the job fully to sd_bus_reply_method_errno(). No functional change.
* | | | | Merge pull request #15297 from poettering/homed-no-fallocateAnita Zhang2020-04-041-26/+44
|\ \ \ \ \ | | | | | | | | | | | | homed: fall back to ftruncate() if fallocate() is not supported on ba…
| * | | | | homed: fall back to ftruncate() if fallocate() is not supported on backing fsLennart Poettering2020-04-011-26/+44
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | This means "discard" mode is enabled implicitly on such simpler backing fs. Fixes: #15059
* | | | | Merge pull request #15315 from DaanDeMeyer/deprecate-sd-bus-priorityZbigniew Jędrzejewski-Szmek2020-04-032-17/+13
|\ \ \ \ \ | | | | | | | | | | | | sd-bus: Deprecate priority functions
| * | | | | sd-bus: remove unused priority logicDaan De Meyer2020-04-021-14/+10
| | | | | |
| * | | | | sd-bus: Deprecate priority functionsDaan De Meyer2020-04-021-3/+3
| | | | | |
* | | | | | capability: don't skip ambient caps setup if we actually have something to setLennart Poettering2020-04-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up for 7ea4392f1e444388caa706d6bd64fb7b30dc2903 Let's not hide errors needlessly aggressively.
* | | | | | shared/dissect-image: log messages from cryptsetupTopi Miettinen2020-04-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` write(2, "Device /dev/loop1p1 is too small.\n", 34) = -1 ENOTCONN (Transport endpoint is not connected) ``` After: ``` $ journalctl -b -e | grep 'too small' Apr 02 16:53:30 loora systemd[343579]: Device /dev/loop1p1 is too small. ```
* | | | | | resolve: reload /etc/hosts on inode changeGiedrius Statkevičius2020-04-033-2/+11
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On certain distributions such as NixOS the mtime of `/etc/hosts` is locked to a fixed value. In such cases, only checking the last mtime of `/etc/hosts` is not enough - we also need to check if the st_ino/st_dev match up. Thus, let's make sure make sure that systemd-resolved also rereads `/etc/hosts` if the inode or the device containing `/etc/hosts` changes. Test script: ```bash hosts="/etc/hosts" echo "127.0.0.1 testpr" > "hosts_new" mv "hosts_new" "$hosts" resolvectl query testpr || exit 1 mtime="$(stat -c %y "$hosts")" echo "127.0.0.1 newhost" > "hosts_tmp" touch -d "$mtime" "hosts_tmp" install -p "hosts_tmp" "$hosts" sleep 10 resolvectl query newhost || exit 1 rm -f "hosts_tmp" ``` Closes #14456.
* | | | | string-util: make clear that split() + FOREACH_WORD() should dieLennart Poettering2020-04-021-0/+2
| | | | |
* | | | | string-util: make sure we eat even half complete words in split()Lennart Poettering2020-04-022-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | split() and FOREACH_WORD really should die, and everything be moved to extract_first_word() and friends, but let's at least make sure that for the remaining code using it we can't deadlock by not progressing in the word iteration. Fixes: #15305
* | | | | string-util: some minor coding style updatesLennart Poettering2020-04-021-27/+40
|/ / / /
* | | | Merge pull request #15210 from ssahani/networkctl-up-downZbigniew Jędrzejewski-Szmek2020-04-021-0/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Merging by hand because github refuses merging because "Rebasing the commits of this branch on top of the base branch cannot be performed automatically as this would create a different result than a regular merge.".
| * | | | networkctl: Add support to set link up and downSusant Sahani2020-03-261-0/+67
| | | | |
* | | | | sd-bus: add va_list variants of variadic convenience functionsVito Caputo2020-04-023-39/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consumers of the sd-bus convenience API can't make convenience helpers of their own without va_list variants. This commit is a mechanical change splitting out the existing function bodies into bare va_list variants having a 'v' suffixed to the names. The original functions now simply create the va_list before forwarding the call on to the va_list variant, and the va_list variants dispense with those steps.
* | | | | Merge pull request #15252 from ssahani/dhcpv6-mudZbigniew Jędrzejewski-Szmek2020-04-028-0/+103
|\ \ \ \ \ | | | | | | | | | | | | DHCPv6: Add support to send MUD URL
| * | | | | network: DHCPv6 Add support to send MUD URLSusant Sahani2020-04-016-0/+53
| | | | | |
| * | | | | sd-dhcpv6: Add support to set request MUD URLSusant Sahani2020-04-012-0/+50
| | | | | |
* | | | | | udev: Fix SIGSEGV in AlternativeNamesPolicy handlingLénaïc Huard2020-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function sd_device_get_property_value has some paths where it exits without touching the n pointer. In those cases, n remained uninitialized until it was eventually read inside isempty where it caused the segmentation fault. Fixes #15078
* | | | | | network: can: add support for CAN-FD related propertiesRichard Petri2020-04-013-0/+37
| | | | | |
* | | | | | network: can: introduce a config parser function for bitratesRichard Petri2020-04-014-7/+48
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | For now, this function is nearly equivalent to the si_uint64 parser, except for an additional range check as Linux only takes 32-bit values as bitrates. In future, this may also be used to introduce fancier bitrate config formats.
* | | | | Merge pull request #15278 from vcaputo/more-trivial-cleanupsZbigniew Jędrzejewski-Szmek2020-04-0123-78/+86
|\ \ \ \ \ | | | | | | | | | | | | Expand use of _cleanup_close_ where trivial
| * | | | | *: use _cleanup_close_ with fdopendir() where trivialVito Caputo2020-03-312-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | Also convert these to use take_fdopendir().
| * | | | | *: use _cleanup_close_ with fdopen() where trivialVito Caputo2020-03-315-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | Also convert these to use take_fdopen().
| * | | | | *: convert amenable fdopendir() calls to take_fdopendir()Vito Caputo2020-03-313-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some fdopendir() calls remain where safe_close() is manually performed, those could be simplified as well by converting to use the _cleanup_close_ machinery, but makes things less trivial to review so left for a future cleanup.
| * | | | | fileio: add take_fdopendir() variantVito Caputo2020-03-312-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | fdopendir() wrapper analogous to take_fdopen()
| * | | | | *: convert amenable fdopen calls to take_fdopenVito Caputo2020-03-3112-37/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mechanical change to eliminate some cruft by using the new take_fdopen{_unlocked}() wrappers where trivial.
| * | | | | fileio: introduce take_fdopen{_unlocked}() variantVito Caputo2020-03-312-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the addition of _cleanup_close_ there's a repetitious pattern of assigning -1 to the fd after a successful fdopen to prevent its close on cleanup now that the FILE * owns the fd. This introduces a wrapper that instead takes a pointer to the fd being opened, and always overwrites the fd with -1 on success. A future commit will cleanup all the fdopen call sites to use the wrapper and elide the manual -1 fd assignment.
| * | | | | home: narrow scope of 'size_t n'Vito Caputo2020-03-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | trivial cosmetic cleanup