summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mailmap: one more personZbigniew Jędrzejewski-Szmek2018-02-141-0/+1
| | | | For a083b4875e8dec5ce5379d8bc437d750cd338c37.
* manager: avoid infinite loop for unexpected waitid() error (#8168)Alan Jenkins2018-02-131-5/+4
| | | | | | | | | | | I think if we log the error as being _ignored_, we should also consider the event as handled and clear it. This was the behaviour prior to 575b300b (PR #7968). I don't think we particularly wanted to change behaviour and keep retrying. Sometimes that's useful, other times you cause more problems by filling the logs. Plus a nearby typo fix.
* l10n: update POTFILES.in (#8163)AsciiWolf2018-02-131-0/+1
|
* tmpfiles: age root-owned read-only files, by default (#7917)itsbill2018-02-121-6/+0
| | | | [zj: The note in NEWS was added in 82c8e3e6503a40684cf265842bb1c26a8f7681b5 and released as part of systemd-237.]
* Merge pull request #8143 from yuwata/drop-unused-funcYu Watanabe2018-02-106-114/+1
|\ | | | | Drop several unused functions
| * socket-util: drop getnameinfo_pretty()Yu Watanabe2018-02-103-68/+0
| |
| * fs-util: drop readlink_and_make_absolute_root()Yu Watanabe2018-02-092-21/+0
| |
| * fs-util: drop readlink_and_canonicalize()Yu Watanabe2018-02-093-25/+1
| |
* | Revert "Periodically call sd_journal_process in journalctl" (#8147)Zbigniew Jędrzejewski-Szmek2018-02-091-28/+0
| | | | | | | | | | | | | | | | | | This reverts commit 992149c07e3ecfbfe4067641e92a6923e7aacda4. https://github.com/systemd/systemd/pull/8144#issuecomment-364464627 $ (set -o pipefail; sudo ./build/journalctl --no-pager | wc -l; echo $?) Failed to process inotify events: Bad file descriptor 1025 1
* | basic/socket-util: drop use of NI_IDN_USE_STD3_ASCII_RULESZbigniew Jędrzejewski-Szmek2018-02-091-1/+1
| | | | | | | | | | | | | | The only use of socknameinfo_pretty() is in src/journal-remote/journal-remote.c, to determine the output filename. Replaces #8120.
* | fd-util: move certain fds above fd #2 (#8129)Lennart Poettering2018-02-099-14/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds some paranoia code that moves some of the fds we allocate for longer periods of times to fds > 2 if they are allocated below this boundary. This is a paranoid safety thing, in order to avoid that external code might end up erroneously use our fds under the assumption they were valid stdin/stdout/stderr. Think: some app closes stdin/stdout/stderr and then invokes 'fprintf(stderr, …' which causes writes on our fds. This both adds the helper to do the moving as well as ports over a number of users to this new logic. Since we don't want to litter all our code with invocations of this I tried to strictly focus on fds we keep open for long periods of times only and only in code that is frequently loaded into foreign programs (under the assumptions that in our own codebase we are smart enough to always keep stdin/stdout/stderr allocated to avoid this pitfall). Specifically this means all code used by NSS and our sd-xyz API: 1. our logging APIs 2. sd-event 3. sd-bus 4. sd-resolve 5. sd-netlink This changed was inspired by this: https://github.com/systemd/systemd/issues/8075#issuecomment-363689755 This shows that apparently IRL there are programs that do close stdin/stdout/stderr, and we should accomodate for that. Note that this won't fix any bugs, this just makes sure that buggy programs are less likely to interfere with out own code.
* | Suspend on lid close based on power status. (#8016)Simon Fowler2018-02-098-14/+53
| | | | | | | | | | | | | | This change adds support for controlling the suspend-on-lid-close behaviour based on the power status as well as whether the machine is docked or has an external monitor. For backwards compatibility the new configuration file variable is ignored completely by default, and must be set explicitly before being considered in any decisions.
* | Merge pull request #8066 from LittleCVR/udevadm-trigger-and-settleZbigniew Jędrzejewski-Szmek2018-02-092-12/+112
|\ \ | | | | | | udevadm: allow trigger command to be synchronous
| * | udevadm: check for oom and other style fixesZbigniew Jędrzejewski-Szmek2018-02-091-11/+19
| | |
| * | udevadm: allow trigger command to be synchronousMao2018-02-092-8/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases that we want to trigger and settle only specific commands. For example, let's say at boot time we want to make sure all the graphics devices are working correctly because it's critical for booting, but not the USB subsystem (we'll trigger USB events later). So we do: udevadm trigger --action="add" --subsystem-match="graphics" udevadm settle However, we cannot block the kernel from emitting kernel events from discovering USB devices. So if any of the USB kernel event was emitted before the settle command, the settle command would still wait for the entire queue to complete. And if the USB event takes a long time to be processed, the system slows down. The new `settle` option allows the `trigger` command to wait for only the triggered events, and effectively solves this problem.
* | | Merge pull request #8134 from keszybz/unit-load-pathsZbigniew Jędrzejewski-Szmek2018-02-0919-273/+452
|\ \ \ | | | | | | | | Various fixes to unit load paths, and systemd-analyze load-paths verb to list them
| * | | analyze: slight simplificationZbigniew Jędrzejewski-Szmek2018-02-091-12/+13
| | | |
| * | | analyze: remove implicit conversions of numbers to booleansZbigniew Jędrzejewski-Szmek2018-02-091-14/+14
| | | |
| * | | man: make Notes section in systemd.geneator(5) toplevelZbigniew Jędrzejewski-Szmek2018-02-091-147/+120
| | | | | | | | | | | | | | | | This is mostly a indentation change and rewrapping.
| * | | man: document unit load pathsZbigniew Jędrzejewski-Szmek2018-02-092-48/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we didn't document control, transient, dbus config, or generator paths. But those paths are visible to users, and they need to understand why systemd loads units from those paths, and how the precedence hierarchy looks. The whole thing is a bit messy, since the list of paths is quite long. I made the tables a bit shorter by combining rows for the alternatives where $XDG_* is set and the fallback. In various places, tags are split like <element param="blah"> this. This is necessary to keep everyting in one logical XML line so that docbook renders the table properly. Replaces #8050.
| * | | shared/path-lookup: rename user control dirs to "user.control"Zbigniew Jędrzejewski-Szmek2018-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ diff -u <(old/systemd-analyze --user unit-paths) <(new/systemd-analyze --user unit-paths)|colordiff --- /proc/self/fd/14 2018-02-08 14:36:34.190046129 +0100 +++ /proc/self/fd/15 2018-02-08 14:36:34.190046129 +0100 @@ -1,5 +1,5 @@ -/home/zbyszek/.config/systemd/system.control -/run/user/1000/systemd/system.control +/home/zbyszek/.config/systemd/user.control +/run/user/1000/systemd/user.control /run/user/1000/systemd/transient ... Strictly speaking, online upgrades of user instances through daemon-reexec will be broken. We can get away with this since a) reexecs of the user instance are not commonly done, at least package upgrade scripts don't do this afawk. b) cgroups aren't delegateable on cgroupsv1 there's little reason to use "systemctl set-property" for --user mode
| * | | shared/path-lookup: rearrange paths in --global mode to match --user modeZbigniew Jędrzejewski-Szmek2018-02-092-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not good if the paths are in different order. With --user, we expect more paths, but it must be a strict superset, and the order for the ones that appear in both sets must be the same. $ diff -u <(build/systemd-analyze --global unit-paths) <(build/systemd-analyze --user unit-paths)|colordiff --- /proc/self/fd/14 2018-02-08 14:11:45.425353107 +0100 +++ /proc/self/fd/15 2018-02-08 14:11:45.426353116 +0100 @@ -1,6 +1,17 @@ +/home/zbyszek/.config/systemd/system.control +/run/user/1000/systemd/system.control +/run/user/1000/systemd/transient +/run/user/1000/systemd/generator.early +/home/zbyszek/.config/systemd/user /etc/systemd/user +/run/user/1000/systemd/user /run/systemd/user +/run/user/1000/systemd/generator +/home/zbyszek/.local/share/systemd/user +/home/zbyszek/.local/share/flatpak/exports/share/systemd/user +/var/lib/flatpak/exports/share/systemd/user /usr/local/share/systemd/user /usr/share/systemd/user /usr/local/lib/systemd/user /usr/lib/systemd/user +/run/user/1000/systemd/generator.late A test is added so that we don't regress on this.
| * | | path-lookup: include paths from --global in --user search path tooZbigniew Jędrzejewski-Szmek2018-02-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | This doesn't matter that much, because set-property --global does not work, so at least those paths wouldn't be used automatically. It is still possible to create such snippets manually, so we better fix this.
| * | | path-lookup: fix confusion between persistent_control and persistent_configZbigniew Jędrzejewski-Szmek2018-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | persistent_config would not appear in the search path at all, hence those overrides would not work at all.
| * | | shell-completion: add --global and unit-pathsZbigniew Jędrzejewski-Szmek2018-02-092-5/+7
| | | |
| * | | analyze: add unit-paths verbZbigniew Jędrzejewski-Szmek2018-02-092-0/+40
| | | |
| * | | analyze: add --global optionZbigniew Jędrzejewski-Szmek2018-02-082-21/+34
| | | | | | | | | | | | | | | | This is somewhat useful for 'verify', and will be used later with 'unit-paths'.
| * | | tree-wide: use "cannot" instead of "can not"Zbigniew Jędrzejewski-Szmek2018-02-0811-22/+22
| | | | | | | | | | | | | | | | This is the usual spelling, and a bit shorter.
* | | | service: relax PID file symlink chain checks a bit (#8133)Lennart Poettering2018-02-091-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's read the PID file after all if there's a potentially unsafe symlink chain in place. But if we do, then refuse taking the PID if its outside of the cgroup. Fixes: #8085
* | | | man:systemd.service(5): fix description of specifiers in command lines (#8146)Oleander Reis2018-02-091-3/+1
| | | | | | | | | | | | | | | | | | | | Command lines now accept specifiers within the first argument. see issues #3061, #679 and pr #4835
* | | | Merge pull request #8083 from shawnl/close-sshLennart Poettering2018-02-096-2/+34
|\ \ \ \ | | | | | | | | | | sd-bus: cleanup ssh sessions (Closes: #8076)
| * | | | sd-bus: cleanup ssh sessions (Closes: #8076)Shawn Landden2018-02-085-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we still invoke ssh unnecessarily when there in incompatible or erreneous input The fallow-up to finish that would make the code a bit more verbose, as it would require repeating this bit: ``` r = bus_connect_transport(arg_transport, arg_host, false, &bus); if (r < 0) { log_error_errno(r, "Failed to create bus connection: %m"); goto finish; } sd_bus_set_allow_interactive_authorization(bus, arg_ask_password); ``` in every verb, after parsing. v2: add waitpid() to avoid a zombie process, switch to SIGTERM from SIGKILL v3: refactor, wait in bus_start_address()
| * | | | machine: add some missing assertsShawn Landden2018-02-081-0/+6
| |/ / /
* | | | Merge pull request #8142 from yuwata/sd-bus-memleakLennart Poettering2018-02-095-35/+33
|\ \ \ \ | | | | | | | | | | Fix potential memory leaks and several code style updates
| * | | | core: remove unnecessary initializationYu Watanabe2018-02-093-4/+4
| | | | |
| * | | | udev: use "#pragma once"Yu Watanabe2018-02-091-5/+2
| | | | |
| * | | | sd-bus: explicitly convert int to boolYu Watanabe2018-02-091-5/+5
| | | | |
| * | | | sd-bus: use free_and_replace()Yu Watanabe2018-02-091-14/+7
| | | | |
| * | | | sd-bus: avoid potential memory leaksYu Watanabe2018-02-091-7/+15
| | |_|/ | |/| |
* | | | man: fix capability name in man:systemd-tmpfiles(8) (#8139)Lucas Werkmeister2018-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | CAP_ADMIN does not exist (the closest existing capability name would be CAP_SYS_ADMIN), and according to man:open(2) and man:capabilities(7), the capability required to specify O_NOATIME is actually CAP_FOWNER.
* | | | Periodically call sd_journal_process in journalctlPeter Portante2018-02-081-0/+28
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `journalctl` take a long time to process messages, and during that time journal file rotation occurs, a `journalctl` client will keep those rotated files open until it calls `sd_journal_process()`, which typically happens as a result of calling `sd_journal_wait()` below in the "following" case. By periodically calling `sd_journal_process()` during the processing loop we shrink the window of time a client instance has open file descriptors for rotated (deleted) journal files. **Warning** This change does not appear to solve the case of a "paused" output stream. If somebody is using `journalctl | less` and pauses the output, then without a background thread periodically listening for inotify delete events and cleaning up, journal logs will eventually stop flowing in cases where a journal client with enough open files causes the "free" disk space threshold to be crossed.
* | | networkd: vxlan require Remote= to be a non multicast address (#8117)Susant Sahani2018-02-082-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Remote= must be a non multicast address. ip-link(8) says: > remote IPADDR - specifies the unicast destination IP address to > use in outgoing packets when the destination link layer address > is not known in the VXLAN device forwarding database. Closes #8088.
* | | man: .service <filename> to <literal> (#8126)Faalagorn2018-02-081-1/+1
| | | | | | | | | Changed <filename>.service</filename> to <literal>.service</literal> to match style in other manual pages: man 5 systemd.socket, device, mount, automount, swap, target path, timer, slice and scope.
* | | journal: avoid code that relies on LOG_KERN == 0 (#8110)Alan Jenkins2018-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOG_FAC() is the general way to extract the logging facility (when it has been combined with the logging priority). LOG_FACMASK can be used to mask off the priority so you only have the logging facility bits... but to get the logging facility e.g. LOG_USER, you also have to bitshift it as well. (The priority is in the low bits, and so only requires masking). ((priority & LOG_FACMASK) == LOG_KERN) happens to work only because LOG_KERN is 0, and hence has the same value with or without the bitshift. Code that relies on weird assumptions like this could make it harder to realize how the logging values are treated.
* | | Merge pull request #8042 from zx2c4-forks/jd/networkctl-typeZbigniew Jędrzejewski-Szmek2018-02-081-32/+11
|\ \ \ | | | | | | | | networkd: fixup networkctl type display
| * | | networkd: clean up link_get_type_string returnsJason A. Donenfeld2018-01-291-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's cleaner and more consistent to actually return what we were planning on returning. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
| * | | networkd: clean up link_get_type_stringJason A. Donenfeld2018-01-291-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | The return value is always ignored, so get rid of it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
| * | | networkd: simplify and display all devtypesJason A. Donenfeld2018-01-291-20/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every place the kernel actually calls SET_NETDEV_DEVTYPE, it's adding a piece of information that looks useful and relevant for us to use. So let's use it when it's there. The previous matching based on the corresponding ARPHRD didn't really make much sense. The more sensible logic for getting a textual representation of the link type is to see if the kernel supplies a devtype. If it does, great. If not, then we can fall back on the ARPHRD, as before. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
| * | | networkd: display wireguard devtypeJason A. Donenfeld2018-01-291-7/+15
| | |/ | |/| | | | | | | | | | | | | | | | It's not useful to simply show "none", when we have more interesting information to display. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* | | man: "reboot" to "power off" in poweroff.target (#8124)Faalagorn2018-02-071-1/+1
| | | | | | | | | Changed "reboot" to "power off" in poweroff.target description. It was most likely copied and pasted from the reboot.target below, compare with e.g. halt.target