summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2015-04-29sd-bus: drop bus parameter from message callback prototypeLennart Poettering
This should simplify the prototype a bit. The bus parameter is redundant in most cases, and in the few where it matters it can be derived from the message via sd_bus_message_get_bus().
2015-04-29core: annotate event sourcesTom Gundersen
2015-04-28service: make restart logic a bit easier to understandLennart Poettering
2015-04-28exit-status: introduce common exit_status_set_test() call for testing exit ↵Lennart Poettering
status set membership
2015-04-28scope: use correct enum typeThomas Hindoe Paaboel Andersen
2015-04-28unit: Drop unused variablesMartin Pitt
src/core/unit.c: In function 'unit_coldplug': src/core/unit.c:2884:18: warning: unused variable 'i' [-Wunused-variable] Iterator i; ^ src/core/unit.c:2883:15: warning: unused variable 'other' [-Wunused-variable] Unit *other; ^
2015-04-28core: when we cannot add PID to a scope cgroup, log about itLennart Poettering
Also, place the scope unit in failed state.
2015-04-27core: coldplug all units which participate in jobs during coldpluggingIvan Shapovalov
This is yet another attempt to fix coldplugging order (more especially, the problem which happens when one creates a job during coldplugging and it references a not-yet-coldplugged unit). Now we forcibly coldplug all units which participate in jobs. This is a superset of previously implemented handling of the UNIT_TRIGGERS dependencies, so that handling is removed. http://lists.freedesktop.org/archives/systemd-devel/2015-April/031212.html https://bugs.freedesktop.org/show_bug.cgi?id=88401 (once again)
2015-04-24core: minor simplificationLennart Poettering
2015-04-24unit: don't add automatic dependencies on device units if they aren't supportedLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031187.html
2015-04-24manager: don't fail fatally if we cannot coldplug a unitLennart Poettering
It's better to continue as good as we can, than to totally fail. Hence, let's log about the failure and continue.
2015-04-24core: always coldplug units that are triggered by other units before thoseLennart Poettering
Let's make sure that we don't enqueue triggering jobs for units before those units are actually fully loaded. http://lists.freedesktop.org/archives/systemd-devel/2015-April/031176.html https://bugs.freedesktop.org/show_bug.cgi?id=88401
2015-04-24core: return 0 from device_serialize()Daniel Mack
Fixes: CC src/core/libsystemd_core_la-device.lo src/core/device.c: In function 'device_serialize': src/core/device.c:169:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
2015-04-24Revert "core: do not spawn jobs or touch other units during coldplugging"Lennart Poettering
This reverts commit 6e392c9c45643d106673c6643ac8bf4e65da13c1. We really shouldn't invent external state keeping hashmaps, if we can keep this state in the units themselves.
2015-04-24device: rework how we enter tentative stateLennart Poettering
This reworks how we enter tentative state and does so only when a device was previously not announced via udev. The previous check actually just checked whether a new state bit was set, which is not correct. Also, to be able to reliably maintain the tentative state across daemon reloads, we need to serialize and deserialize it.
2015-04-24service: improve readability, by reducing line-breaksLennart Poettering
2015-04-23core: fix parsing of mount flagsLennart Poettering
As reported my Maciej Wereski: http://lists.freedesktop.org/archives/systemd-devel/2015-February/028320.html
2015-04-23core: downgrade warning about duplicate device namesLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031094.html
2015-04-23core: explicitly specify credentials for direct connections, tooLennart Poettering
So far we authenticate direct connections primarily at connection time, but let's also do this for each method individually, by attaching the creds we need for that right away.
2015-04-22kmod-setup: load ip_tables kmod at bootLennart Poettering
The module is currently no auto-loadable (and this is unlikely to change anytime soon, given it's API is via getsockopt/setsockopt). It is needed by networkd and nspawn currently. Users who really don't like the module to be loaded have the option to blacklist it still, or not compile it at all. But for all others this should make things work out-of-the-box.
2015-04-21automount: remove unused variableThomas Hindoe Paaboel Andersen
2015-04-21build-sys: move systemd.pc from pkgconfiglibdir back into pkgconfigdatadirLennart Poettering
The original idea of systemd.pc was to contain arch-independent system and systemd information. By exposing libdir as part of the fields (added in eb39a6239c631873db62f6a942e6cb3dab0a2db4), it started to carry arch-dependent data, thus breaking multilib systems. It was then moved to pkgconfiglibdir to deal with this (in aec432c6134146e138124c4130be2ee89dca07fa), but actually the right approach is to simply not include libdir in the .pc file at all. THis patch hence more or less reverts both commits again, and moves the .pc file back into pkgconfigdatadir. As alternative for querying the systems primary libdir there's now "systemd-path system-library-arch", hence a more correct alternative exists for querying this variable from the .pc file.
2015-04-21core: make unit deserialization more defensiveLennart Poettering
2015-04-21automount: various smaller fixesLennart Poettering
2015-04-21automount: add expire supportMichael Olbrich
2015-04-21service: transition through SIGKILL states only when SIGKILL is enabledLennart Poettering
If there's no remaining process to kill, skip the SIGKILL states if SIGKILL is disabled. Effectively this doesn't change much since if there's nothing to kill with SIGTERM or SIGABRT then there's also nothing to kill with SIGKILL. However, this avoids confusion with the state engine jumping through SIGKILL states for no reason...
2015-04-21service: timeout on SIGABRT should also be considered an error to rememberLennart Poettering
2015-04-21service: make more use of IN_SET() macroLennart Poettering
2015-04-21service: list states always in the same orderLennart Poettering
2015-04-21service: make kill operation mapping explicitLennart Poettering
2015-04-21sd-bus: when augmenting creds, remember which ones were augmentedLennart Poettering
Also, when we do permissions checks using creds, verify that we don't do so based on augmented creds, as extra safety check.
2015-04-16core: fix spurious warning about cpuacct-usage-base deserializationZbigniew Jędrzejewski-Szmek
The key was parsed properly, but the warning was still generated.
2015-04-14selinux: use different log priorites for log messagesZbigniew Jędrzejewski-Szmek
When selinux calls our callback with a log message, it specifies the type as AVC or INFO/WARNING/ERROR. The question is how to map this to audit types and/or log priorities. SELINUX_AVC maps to AUDIT_USER_AVC reasonably, but for the other messages we have no idea, hence we use AUDIT_USER_AVC for everything. When not using audit logging, we can map those selinux levels to LOG_INFO/WARNING/ERROR etc. Also update comment which was not valid anymore in light of journald sucking in audit logs, and was actually wrong from the beginning — libselinux uses the callback for everything, not just avcs. This stemmed out of https://bugzilla.redhat.com/show_bug.cgi?id=1195330, but does not solve it.
2015-04-11shared: add terminal-util.[ch]Ronny Chevalier
2015-04-10shared: add process-util.[ch]Ronny Chevalier
2015-04-10shared: add formats-util.hRonny Chevalier
2015-04-10dbus: typo fix in logThomas Hindoe Paaboel Andersen
2015-04-10core: set_put never returns -EEXISTRonny Chevalier
When the value is already there it returns 0. Also add a test to ensure this
2015-04-09util: add shell_maybe_quote() call for preparing a string for shell cmdline ↵Lennart Poettering
inclusion If necessary the passed string is enclosed in "", and all special characters escapes. This also ports over usage in bus-util.c and job.c to use this, instead of a incorrect local implementation that forgets to properly escape.
2015-04-08IndentationZbigniew Jędrzejewski-Szmek
2015-04-08core/automount: beef up error messageZbigniew Jędrzejewski-Szmek
This should not happen... but when it does more information is nice.
2015-04-07device: remove unused null checkThomas Hindoe Paaboel Andersen
We dereference the variable right before the null check. We never reach this point with a null value anyway so let's just remove it.
2015-04-07socket: minor modernizationsLennart Poettering
2015-04-07path-util: fix more path_is_mount e792e890f falloutLennart Poettering
2015-04-07util: rework cunescape(), improve error handlingLennart Poettering
Change cunescape() to return a normal error code, so that we can distuingish OOM errors from parse errors. This also adds a flags parameter to control whether "relaxed" or normal parsing shall be done. If set no parse failures are generated, and the only reason why cunescape() can fail is OOM.
2015-04-07core: fix mount setup to work with non-existing mount pointsDavid Herrmann
We must not fail on ENOENT. We properly create the mount-point in mount-setup, so there's really no reason to skip the mount. Make sure we just skip the mount on unexpected failures or if it's already mounted.
2015-04-07core: mount-setup: handle non-existing mountpoints gracefullyDaniel Mack
Commit e792e890f ("path-util: don't eat up ENOENT in path_is_mount_point()") changed path_is_mount_point() so it doesn't hide -ENOENT from its caller. This causes all boots to fail early in case any of the mount points does not exist (for instance, when kdbus isn't loaded, /sys/fs/kdbus is missing). Fix this by returning 0 from mount_one() if path_is_mount_point() returned -ENOENT.
2015-04-06util: rework rm_rf() logicLennart Poettering
- Move to its own file rm-rf.c - Change parameters into a single flags parameter - Remove "honour sticky" logic, it's unused these days
2015-04-05service: remove unnecessary forward declareThomas Hindoe Paaboel Andersen
2015-04-01mount: fix up wording in the commentMichal Sekletar