summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13867 from keszybz/man-conditionYu Watanabe2019-10-301-1/+1
|\ | | | | Refactor description of conditons
| * shared: small typoZbigniew Jędrzejewski-Szmek2019-10-281-1/+1
| |
* | Merge pull request #13864 from fbuihuu/no-more-swap-autoactivationZbigniew Jędrzejewski-Szmek2019-10-295-23/+12
|\ \ | | | | | | No more swap autoactivation
| * | core: drop 'wants' parameter from unit_add_node_dependency()Franck Bui2019-10-285-18/+8
| | | | | | | | | | | | | | | Since Wants dependency is no more automagically added to swap and mount units, this parameter is no more used hence this patch drops it.
| * | swap: do not make swap units wanted by its device unit anymoreFranck Bui2019-10-281-6/+5
| | | | | | | | | | | | | | | | | | It was done for mount units already (see commit 142b8142d7bb84f07). For the same reasons and for consistency we should also stop activating automagically swaps when their device is hot-plugged.
* | | network-generator: Add missing help for --rootDavid Pedersen2019-10-291-0/+1
|/ /
* | Merge pull request #13423 from pwithnall/12035-session-time-limitsZbigniew Jędrzejewski-Szmek2019-10-286-18/+90
|\ \ | | | | | | Add `RuntimeMaxSec=` support to scope units (time-limited login sessions)
| * | pam_systemd: Forward systemd.runtime_max_sec setting to session scopePhilip Withnall2019-10-281-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow earlier PAM modules to set `systemd.runtime_max_sec`. If they do, parse it and set it as the `RuntimeMaxUSec=` property of the session scope, to limit the maximum lifetime of the session. This could be useful for time-limiting login sessions, for example. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #12035
| * | scope: Support RuntimeMaxSec= directive in scope unitsPhilip Withnall2019-10-285-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just as `RuntimeMaxSec=` is supported for service units, add support for it to scope units. This will gracefully kill a scope after the timeout expires from the moment the scope enters the running state. This could be used for time-limited login sessions, for example. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #12035
| * | scope: Refactor timer handling on coldplugPhilip Withnall2019-07-291-5/+17
| | | | | | | | | | | | | | | | | | | | | Factor it out into a helper function which is a bit easier to expand in future. This introduces no functional changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * | shared: Factor out bus_append_scope_property() for scopesPhilip Withnall2019-07-291-4/+12
| | | | | | | | | | | | | | | | | | | | | This introduces no functional changes, but will make some upcoming changes a little clearer. Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * | dbus-scope: Factor out common UNIT(s) castPhilip Withnall2019-07-291-4/+5
| | | | | | | | | | | | | | | | | | This introduces no functional changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | | modules-load: do not fail service if modules are not presentZbigniew Jędrzejewski-Szmek2019-10-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is pretty common for the service to fail in the initramfs (for example because certain modules have not been copied over or haven't been built yet in case of dkms modules). This seems to be more trouble than it is worth. Let's change the service to simply log any missing modules at error level, but not fail the whole service. https://bugzilla.redhat.com/show_bug.cgi?id=1254340
* | | Merge pull request #13844 from keszybz/resolved-proprtiesYu Watanabe2019-10-289-19/+42
|\ \ \ | | | | | | | | Emit dbus PropertyChanged notifications for systemd-resolved
| * | | resolved: emit change for CurrentDNSServerZbigniew Jędrzejewski-Szmek2019-10-252-1/+4
| | | |
| * | | resolved: emit change for LLMNRHostnameZbigniew Jędrzejewski-Szmek2019-10-252-2/+6
| | | |
| * | | resolved: send out notifications about DNS propertyZbigniew Jędrzejewski-Szmek2019-10-254-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notifications are only sent for the top object, and not for individual links. This should be enough for the most obvious cases where somebody just cares about the effective set of servers. Fixes #13721.
| * | | resolved: make two functions staticZbigniew Jędrzejewski-Szmek2019-10-252-5/+2
| | | |
| * | | resolved: one less {}Zbigniew Jędrzejewski-Szmek2019-10-251-2/+1
| | | |
| * | | resolved: avoid allocationZbigniew Jędrzejewski-Szmek2019-10-254-8/+7
| | | | | | | | | | | | | | | | While at it, constify the argument.
* | | | pid1: order .automount units after local-fs-pre.targetZbigniew Jędrzejewski-Szmek2019-10-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the bug: > According to the documentation of systemd.automount if the automoint point is > automagically created if it doesn't exist yet. This ofcourse means the > filesystem underneath has to be writable, which for / means not only does > -.mount need to be started but also systemd-remount-fs.service has to be run, > which isn't guaranteed by the default automount dependencies. > > For .mount units there is an automatic default After= dependency on > local-fs-pre.target, would probably make sense to do the same for automount > units to avoid it failing on the corner-case where it has to create directory. Fixes #13306.
* | | | Merge pull request #13635 from fbuihuu/no-aliases-with-enableZbigniew Jędrzejewski-Szmek2019-10-282-3/+5
|\ \ \ \ | |_|_|/ |/| | | man: alias names can't be used with enable command
| * | | shared/install: failing with -ELOOP can be due to the use of an alias in ↵Franck Bui2019-09-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | install_error() -ELOOP can happen also when enabling an alias name (which is admittedly useless since the unit it belongs to was already enabled) so let's mention this possibility when reporting the corresponding error.
| * | | shared/install: fix error codes returned by install_context_apply()Franck Bui2019-09-241-1/+1
| | | |
* | | | shared/sleep-config: two more error handling fixes, use structured ↵Zbigniew Jędrzejewski-Szmek2019-10-251-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | initialization CID#1406472.
* | | | shared/sleep-config: fix error handling for openZbigniew Jędrzejewski-Szmek2019-10-251-3/+2
| | | | | | | | | | | | | | | | CID#1406472.
* | | | fileio: introduce read_full_virtual_file() for reading virtual files in ↵Franck Bui2019-10-253-5/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sysfs, procfs Virtual filesystems such as sysfs or procfs use kernfs, and kernfs can work with two sorts of virtual files. One sort uses "seq_file", and the results of the first read are buffered for the second read. The other sort uses "raw" reads which always go direct to the device. In the later case, the content of the virtual file must be retrieved with a single read otherwise subsequent read might get the new value instead of finding EOF immediately. That's the reason why the usage of fread(3) is prohibited in this case as it always performs a second call to read(2) looking for EOF which is subject to the race described previously. Fixes: #13585.
* | | | Merge pull request #13682 from ↵Zbigniew Jędrzejewski-Szmek2019-10-253-120/+237
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | zachsmith/systemd-sleep-prefer-resume-over-priority systemd-sleep: prefer resume device or file
| * | | systemd-sleep: improve /proc/swaps open fail messageZach Smith2019-10-241-1/+1
| | | |
| * | | systemd-sleep: always prefer resume device or fileZach Smith2019-10-243-119/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change checks each swap partition or file reported in /proc/swaps to see if it matches the values configured with resume= and resume_offset= kernel parameters. If a match is found, the matching swap entry is used as the hibernation location regardless of swap priority.
* | | | network: support matching based on wifi interfece typeYu Watanabe2019-10-2515-30/+6635
| | | |
* | | | various tools: be more explicit when a glob is passed when not supportedZbigniew Jędrzejewski-Szmek2019-10-257-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=1763488: when we say that 'foo@*.service' is not a valid unit name, this is not clear enough. Let's include the name of the operation that does not support globbing in the error message: $ build/systemctl enable 'foo@*.service' Glob pattern passed to enable, but globs are not supported for this. Invalid unit name "foo@*.service" escaped as "foo@\x2a.service". ...
* | | | resolved: set stream type during DnsStream creationDan Streetman2019-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DnsStreamType was added to track different types of DNS TCP streams, instead of refcounting all of them together. However, the stream type was not actually set into the stream->type field, so while the reference count was correctly incremented per-stream-type, the reference count was always decremented in the cleanup function for stream type 0, leading to underflow for the type 0 stream (unsigned) refcount, and preventing new type 0 streams from being created. Since type 0 is DNS_STREAM_LOOKUP, which is used to communicate with upstream nameservers, once the refcount underflows the stub resolver no longer is able to successfully fall back to TCP upstream lookups for any truncated UDP packets. This was found because lookups of A records with a large number of addresses, too much to fit into a single 512 byte DNS UDP reply, were causing getaddrinfo() to fall back to TCP and trigger this bug, which then caused the TCP fallback for later large record lookups to fail with 'connection timed out; no servers could be reached'. The stream type was introduced in commit: 652ba568c6624bf40d735645f029d83d21bdeaa6
* | | | Merge pull request #13836 from systemd/assert-cleanups-and-constificationYu Watanabe2019-10-2515-121/+101
|\ \ \ \ | | | | | | | | | | Assert cleanups and constification
| * | | | sd-dhcp-client: do not call assert in public functionsassert-cleanups-and-constificationZbigniew Jędrzejewski-Szmek2019-10-241-5/+5
| | | | |
| * | | | sd-dhcp-client: remove unnecessary cleanup functionZbigniew Jędrzejewski-Szmek2019-10-241-5/+2
| | | | | | | | | | | | | | | | | | | | https://github.com/systemd/systemd/pull/13663#discussion_r335327099
| * | | | sd-netlink: constify object pointers passed to gettersZbigniew Jędrzejewski-Szmek2019-10-247-83/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sd-netlink is not public yet, so we can change the interface. I did not touch interfaces of functions like sd_netlink_wait() and sd_rtnl_message_new_link() which do not modify the object that is passed in, because in the future we might want to change the code to e.g. take a reference to the parent object or otherwise require a non-const reference.
| * | | | sd-device: allow sd_device_get_devtype to be called with NULL arg and do not ↵Zbigniew Jędrzejewski-Szmek2019-10-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assert We shouldn't call assert() on user-specified arguments in public functions. While at it, let's return 1 if the type exists, and 0 otherwise.
| * | | | Move PLYMOUTH_SOCKET define to def.h and nuke plymouth-util.hZbigniew Jędrzejewski-Szmek2019-10-245-10/+7
| | | | | | | | | | | | | | | | | | | | Let's not have a file with a single define.
| * | | | Remove unused plymouth_running() functionZbigniew Jędrzejewski-Szmek2019-10-243-14/+0
| | | | |
* | | | | machine-id-setup: avoid unexpected abortingChen Qi2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code should not be reached 'Unhandled option' at src/machine-id-setup/machine-id-setup-main.c:97, function parse_argv(). Aborting. Aborted This behaviour is not good and will confuse user. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
* | | | | basic/fs-util: change CHASE_OPEN flag into a separate output parameterZbigniew Jędrzejewski-Szmek2019-10-2433-180/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chase_symlinks() would return negative on error, and either a non-negative status or a non-negative fd when CHASE_OPEN was given. This made the interface quite complicated, because dependning on the flags used, we would get two different "types" of return object. Coverity was always confused by this, and flagged every use of chase_symlinks() without CHASE_OPEN as a resource leak (because it would this that an fd is returned). This patch uses a saparate output parameter, so there is no confusion. (I think it is OK to have functions which return either an error or an fd. It's only returning *either* an fd or a non-fd that is confusing.)
* | | | | test-socket-util: avoid writing past the defined bufferZbigniew Jędrzejewski-Szmek2019-10-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .sun_path has 108 bytes, and we'd write a string of 108 bytes + NUL. I added this test, but I don't know what it was supposed to test. Let's just remove. Fixes #13713. CID#1405854.
* | | | | networkctl: introduce reconfigure methodYu Watanabe2019-10-241-20/+67
| | | | |
* | | | | networkctl: use format_ifname_full()Yu Watanabe2019-10-241-12/+6
| | | | |
* | | | | networkctl: fix error messageYu Watanabe2019-10-241-1/+2
| | | | |
* | | | | format-util: introduce format_ifname_full()Yu Watanabe2019-10-242-3/+24
| | | | |
* | | | | network: introduce Reconfigure() bus methodYu Watanabe2019-10-246-5/+46
| | | | |
* | | | | network: include netinet/in.h to fix build errorYu Watanabe2019-10-241-0/+1
| | | | |
* | | | | networkctl: add reload commandYu Watanabe2019-10-241-0/+24
| | | | |