summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* core: Remove explicit Plymouth integrationJasper St. Pierre2015-03-16
| | | | | | | | | | | | | | | | | | | | | Even if plymouth is running, it might have not displayed the splash yet, so we'll see a few lines on fbcon when we should have otherwise had nothing. Plymouth integration was added to systemd in commit 6faa11140bf776cdaeb8d22d01816e6e48296971. That same day, Plymouth got systemd integration [0]. As such, the Plymouth integration has always been obsolete, and was probably only for older Plymouth's. But I can't imagine anybody running a Plymouth from 2011 with a systemd from 2015. Remove the Plymouth/systemd integration, and let Plymouth's code tell systemd to print the details. [0] http://cgit.freedesktop.org/plymouth/commit/?id=537c16422cd49f1beeaab1ad39846a00018faec1 Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Cc: Daniel Drake <dsd@endlessm.com> Cc: Ray Strode <rstrode@redhat.com>
* core: don't change removed devices to state "tentative"Martin Pitt2015-03-16
| | | | | | | | | | | | Commit 628c89c introduced the "tentative" device state, which caused devices to go from "plugged" to "tentative" on a remove uevent. This breaks the cleanup of stale mounts (see commit 3b48ce4), as that only applies to "dead" devices. The "tentative" state only really makes sense on adding a device when we don't know where it was coming from (i. e. not from udev). But when we get a device removal from udev we definitively know that it's gone, so change the device state back to "dead" as before 628c89c.
* Add (void) where we don't care about return valueZbigniew Jędrzejewski-Szmek2015-03-15
|
* core: remove useless debug messageZbigniew Jędrzejewski-Szmek2015-03-15
| | | | | | | | | | Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null)
* core: do not use quotes around virt and archZbigniew Jędrzejewski-Szmek2015-03-14
| | | | | Quotes are useful when the string can contain spaces or be otherwise confusing. Not possible with those two.
* core: remove left-over debug messageZbigniew Jędrzejewski-Szmek2015-03-14
|
* service: don't add After= dependencies on .busname units if kdbus support is ↵Michael Biebl2015-03-14
| | | | disabled
* core: check asprintf return valueZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1261729.
* core: print warning on invalid swap pri= fieldZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1264371.
* core: one more (void)Zbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #996308.
* core: explicitly ignore failure during cleanupZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1237550.
* core: don't wait for reply if writing to pipe failsZbigniew Jędrzejewski-Szmek2015-03-13
| | | | | | | This shouldn't really happen, but it's seems cleaner to continue on error. CID #1237552.
* core: either ignore or handle mount failuresZbigniew Jędrzejewski-Szmek2015-03-13
| | | | | | | | /dev/pts/ptmx is as important as /dev/pts, so error out if that fails. Others seem less important, since the namespace is usable without them, so ignore failures. CID #123755, #123754.
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-13
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* core: ignore any issues with setting time on jobs_in_progress_event_sourceZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1237559.
* core: issue error on oom we can do nothing aboutZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1287142.
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-13
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* core: add missing words to my fix of explanation of associativityTom Gundersen2015-03-12
|
* core: fix cgroups-agent match for kdbusDavid Herrmann2015-03-11
| | | | | | On kdbus, we get cgroups-agent messages via the system bus, not the private systemd socket. Therefore, we must install the match properly or we will never receive cgroup notifications.
* core: rewind message before forwarding itDavid Herrmann2015-03-11
| | | | | | Forwarding messages that are not rewinded will drop data. Fix this for cgroups-agent messages that we might remarshal before forwarding to the system bus.
* core: fix explanation of associativityTom Gundersen2015-03-11
|
* machine-id-setup: simplificationsLennart Poettering2015-03-10
|
* add REMOTE_ADDR and REMOTE_PORT for Accept=yesShawn Landden2015-03-10
|
* Introduce loop_read_exact helperZbigniew Jędrzejewski-Szmek2015-03-09
| | | | | | | | Usually when using loop_read(), we want to read the full buffer. Add a helper that mirrors loop_write(), and returns 0 when full buffer was read, and an error otherwise. Use -ENODATA for the short read, to distinguish it from a read error.
* core/load-fragment: safe_close() protects errnoZbigniew Jędrzejewski-Szmek2015-03-07
|
* core/dbus-manager: remove dead checkZbigniew Jędrzejewski-Szmek2015-03-07
| | | | CID #1257766.
* core: do not spawn jobs or touch other units during coldpluggingIvan Shapovalov2015-03-07
| | | | | | | | | | | | | Because the order of coldplugging is not defined, we can reference a not-yet-coldplugged unit and read its state while it has not yet been set to a meaningful value. This way, already active units may get started again. We fix this by deferring such actions until all units have been at least somehow coldplugged. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=88401
* Allow up to 4096 simultaneous connectionsHannes Reinecke2015-03-04
| | | | | | | | | On large system we hit the limit on 512 simultaneous dbus connections, resulting in tons of annoying messages: Too many concurrent connections, refusing This patch raises the limit to 4096.
* Do not advertise .d snippets over main config fileZbigniew Jędrzejewski-Szmek2015-03-03
| | | | | | | | | | For daemons which have a main configuration file, there's little reason for the administrator to use configuration snippets. They are useful for packagers which need to override settings, but we shouldn't advertise that as the main way of configuring those services. https://bugs.freedesktop.org/show_bug.cgi?id=89397
* core: expose consumed CPU time per unitLennart Poettering2015-03-02
| | | | | | This adds support for showing the accumulated consumed CPU time per-unit in the "systemctl status" output. The property is also readable via the bus.
* core: downgrade unit type not supported messageUmut Tezduyar Lindskog2015-03-01
| | | | | | | Otherwise every daemon reload prints out warnings like: systemd[1]: Unit type .busname is not supported on this system. systemd[1]: Unit type .swap is not supported on this system.
* core: fix return value on OOMThomas Hindoe Paaboel Andersen2015-02-28
|
* core: rework device state logicLennart Poettering2015-02-28
| | | | | | | | | | | | | This change introduces a new state "tentative" for device units. Device units are considered "plugged" when udev announced them, "dead" when they are not available in the kernel, and "tentative" when they are referenced in /proc/self/mountinfo or /proc/swaps but not (yet) announced via udev. This should fix a race when device nodes (like loop devices) are created and immediately mounted. Previously, systemd might end up seeing the mount unit before the device, and would thus pull down the mount because its BindTo dependency on the device would not be fulfilled.
* core: emit changes for NFailedUnits propertyLucas De Marchi2015-02-26
| | | | | | | By notifying the clients when this property is changed it's possible to allow "system health monitor" tools to get transitions like running<->degraded. This is an alternative to send changes on the SystemState property since the latter is more difficult to derive.
* unit: When stopping due to BindsTo=, log which unit caused itColin Walters2015-02-26
| | | | | | | | | | | I'm trying to track down a relatively recent change in systemd which broke OSTree; see https://bugzilla.gnome.org/show_bug.cgi?id=743891 Systemd started to stop sysroot.mount, and this patch should help me debug why at least. While we're here, "break" on the first unit we find that will deactivate, as there's no point in further iteration.
* unit: use weaker dependencies between mount and device units in --user modeLennart Poettering2015-02-25
| | | | | | | | When running in user mode unmounting of mount units when a device vanishes is unlikely to work, and even if it would work is already done by PID 1 anyway. HEnce, when creating implicit dependencies between mount units and their backing devices, created a Wants= type dependency in --user mode, but leave a BindsTo= dependency in --system mode.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* core, shared: in deserializing, match same files reached via different pathsMichal Schmidt2015-02-20
| | | | | | | | | | | | | | | | | | | | | | | When dbus.socket is updated like this: -ListenStream=/var/run/dbus/system_bus_socket +ListenStream=/run/dbus/system_bus_socket ... and daemon-reload is performed, bad things happen. During deserialization systemd does not recognize that the two paths refer to the same named socket and replaces the socket file with a new one. As a result, applications hang when they try talking to dbus. Fix this by finding a match not only when the path names are equal, but also when they point to the same inode. In socket_address_equal() it is necessary to move the address size comparison into the abstract sockets branch. For path name sockets the comparison must not be done and for other families it is redundant (their sizes are constant and checked by socket_address_verify()). FIFOs and special files can also have multiple pathnames, so compare the inodes for them as well. Note that previously the pathname checks used streq_ptr(), but the paths cannot be NULL. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1186018
* everywhere: remove configurability of sysv runlevel to target mappingLennart Poettering2015-02-18
| | | | | | | | | | | | | | | With this change runlevel 2, 3, 4 are mapped to multi-user.target for good, and 5 to graphical.target. This was already the previous mapping but is now no longer reconfigurable, but hard-coded into the core. This should generally simplify things, but also fix one bug: the sysv-generator previously generated symlinks to runlevel[2-5].target units, which possibly weren't picked up if these aliases were otherwise only referenced by the real names "multi-user.target" and "graphical.target". We keep compat aliases "runlevel[2345].target" arround for cases where this target name is explicitly requested.
* core: rework policykit hookupLennart Poettering2015-02-18
| | | | | | | | | - Always issue selinux access check as early as possible, and PK check as late as possible. - Introduce a new policykit action for altering environment - Open most remaining bus calls to unprivileged clients via PK
* logind: open up most bus calls for unpriviliged processes, using PolicyKitLennart Poettering2015-02-18
| | | | | | Also, allow clients to alter their own objects without any further priviliges. i.e. this allows clients to kill and lock their own sessions without involving PK.
* core: make RuntimeDirectory honor SELinux labelsZbigniew Jędrzejewski-Szmek2015-02-14
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1192726
* include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen2015-02-12
| | | | | | include-what-you-use automatically does this and it makes finding unnecessary harder to spot. The only content of poll.h is a include of sys/poll.h so should be harmless.
* Add missing includes in header filesThomas Hindoe Paaboel Andersen2015-02-12
| | | | | This fixes various issues found by globally reordering the include sections of all .c files.
* exec: also evaluate working_directory_missing_ok when not applying chrootsLennart Poettering2015-02-12
|
* core: disarm shutdown watchdog if we fail to set timeoutLennart Poettering2015-02-12
| | | | | | | Better safe than sorry, if drivers are stupid, and reset immediately on device closing if the timeout could not be initialized. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777735
* core: don't fail to run services in --user instances if $HOME is missingLennart Poettering2015-02-12
| | | | | | | | Otherwise we cannot even invoke systemd-exit.service anymore, thus not even exit. https://bugs.freedesktop.org/show_bug.cgi?id=83100 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759320
* core: don't watch for socket events when service is in SERVICE_STOPLennart Poettering2015-02-11
| | | | | | | | If a service has an ExecStop= program that uses the socket the service was activated by to tell it to terminate, then that should not be used as trigger to start the service again. http://lists.freedesktop.org/archives/systemd-devel/2015-February/028058.html
* core: correct a log messageLennart Poettering2015-02-11
| | | | | The log message talks specifically about services, though it actually applies to any kind of unit.
* core: remove unneeded <libgen.h> includeCristian Rodríguez2015-02-11
| | | | execute.c only uses basename (the GNU version in <string.h>)