summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
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
2015-04-01mount: don't run quotaon only for network filesystemsLukas Nykryn
If you have for example ext4 on iscsi devices it is possible to setup qoutas there. Unfortunately, because such fstab entry contains _netdev, systemd will not add dependency to quotaon.service.
2015-03-31nspawn: change filesystem type from "bind" to NULL in mount() syscallsIago López Galeiras
Try to keep syscalls as minimal as possible.
2015-03-21core: make SELinux enable/disable check symmetricZbigniew Jędrzejewski-Szmek
We'd use the generic check for disable, and a unit-file-specific one for enable. Use the more specific one both ways. systemd[1]: SELinux access check scon=system_u:system_r:systemd_timedated_t:s0 tcon=system_u:system_r:init_t:s0 tclass=system perm=disable path=(null) cmdline=/usr/lib/systemd/systemd-timedated: -13 systemd[1]: SELinux access check scon=system_u:system_r:systemd_timedated_t:s0 tcon=system_u:object_r:systemd_unit_file_t:s0 tclass=service perm=enable path=/usr/lib/systemd/system/systemd-timesyncd.service cmdline=/usr/lib/systemd/systemd-timedated: -13 https://bugzilla.redhat.com/show_bug.cgi?id=1014315
2015-03-16core/namespace: fix path sortingMichal Schmidt
The comparison function we use for qsorting paths is overly indifferent. Consider these 3 paths for sorting: /foo /bar /foo/foo qsort() may compare: "/foo" with "/bar" => 0, indifference "/bar" with "/foo/foo" => 0, indifference and assume transitively that "/foo" and "/foo/foo" are also indifferent. But this is wrong, we want "/foo" sorted before "/foo/foo". The comparison function must be transitive. Use path_compare(), which behaves properly. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1184016
2015-03-16core: Remove explicit Plymouth integrationJasper St. Pierre
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>
2015-03-16core: don't change removed devices to state "tentative"Martin Pitt
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.
2015-03-15Add (void) where we don't care about return valueZbigniew Jędrzejewski-Szmek
2015-03-15core: remove useless debug messageZbigniew Jędrzejewski-Szmek
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)
2015-03-14core: do not use quotes around virt and archZbigniew Jędrzejewski-Szmek
Quotes are useful when the string can contain spaces or be otherwise confusing. Not possible with those two.
2015-03-14core: remove left-over debug messageZbigniew Jędrzejewski-Szmek
2015-03-14service: don't add After= dependencies on .busname units if kdbus support is ↵Michael Biebl
disabled
2015-03-13core: check asprintf return valueZbigniew Jędrzejewski-Szmek
CID #1261729.
2015-03-13core: print warning on invalid swap pri= fieldZbigniew Jędrzejewski-Szmek
CID #1264371.
2015-03-13core: one more (void)Zbigniew Jędrzejewski-Szmek
CID #996308.
2015-03-13core: explicitly ignore failure during cleanupZbigniew Jędrzejewski-Szmek
CID #1237550.
2015-03-13core: don't wait for reply if writing to pipe failsZbigniew Jędrzejewski-Szmek
This shouldn't really happen, but it's seems cleaner to continue on error. CID #1237552.
2015-03-13core: either ignore or handle mount failuresZbigniew Jędrzejewski-Szmek
/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.
2015-03-13Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek
We were using a space more often than not, and this way is codified in CODING_STYLE.
2015-03-13core: ignore any issues with setting time on jobs_in_progress_event_sourceZbigniew Jędrzejewski-Szmek
CID #1237559.
2015-03-13core: issue error on oom we can do nothing aboutZbigniew Jędrzejewski-Szmek
CID #1287142.
2015-03-13tree-wide: there is no ENOTSUP on linuxDavid Herrmann
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2015-03-12core: add missing words to my fix of explanation of associativityTom Gundersen
2015-03-11core: fix cgroups-agent match for kdbusDavid Herrmann
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.
2015-03-11core: rewind message before forwarding itDavid Herrmann
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.
2015-03-11core: fix explanation of associativityTom Gundersen
2015-03-10machine-id-setup: simplificationsLennart Poettering
2015-03-10add REMOTE_ADDR and REMOTE_PORT for Accept=yesShawn Landden
2015-03-09Introduce loop_read_exact helperZbigniew Jędrzejewski-Szmek
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.
2015-03-07core/load-fragment: safe_close() protects errnoZbigniew Jędrzejewski-Szmek
2015-03-07core/dbus-manager: remove dead checkZbigniew Jędrzejewski-Szmek
CID #1257766.
2015-03-07core: do not spawn jobs or touch other units during coldpluggingIvan Shapovalov
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
2015-03-04Allow up to 4096 simultaneous connectionsHannes Reinecke
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.
2015-03-03Do not advertise .d snippets over main config fileZbigniew Jędrzejewski-Szmek
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
2015-03-02core: expose consumed CPU time per unitLennart Poettering
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.
2015-03-01core: downgrade unit type not supported messageUmut Tezduyar Lindskog
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.
2015-02-28core: fix return value on OOMThomas Hindoe Paaboel Andersen