summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2013-11-20core: convert PID 1 to libsystemd-busLennart Poettering
This patch converts PID 1 to libsystemd-bus and thus drops the dependency on libdbus. The only remaining code using libdbus is a test case that validates our bus marshalling against libdbus' marshalling, and this dependency can be turned off. This patch also adds a couple of things to libsystem-bus, that are necessary to make the port work: - Synthesizing of "Disconnected" messages when bus connections are severed. - Support for attaching multiple vtables for the same interface on the same path. This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus calls which used an inappropriate signature. As a side effect we will now generate PropertiesChanged messages which carry property contents, rather than just invalidation information.
2013-11-20install: use const where we canLennart Poettering
2013-11-18Remove duplicate includesKarel Zak
2013-11-18use #pragma once instead of foo*foo define guardsShawn Landden
2013-11-17core/socket: fix SO_REUSEPORTShawn Landden
2013-11-17core/socket: use _cleanup_free_Shawn Landden
2013-11-16Fix RemainAfterExit services keeping a hold on consoleOlivier Brunel
When a service exits succesfully and has RemainAfterExit set, its hold on the console (in m->n_on_console) wasn't released since the unit state didn't change.
2013-11-15core: some more _cleanup_free_Zbigniew Jędrzejewski-Szmek
2013-11-14loopback-setup: move to rtnlTom Gundersen
This should be equivalent to the old behavior.
2013-11-13Fix possible lack of status messages on shutdown/rebootOlivier Brunel
Since 31a7eb86 the output on console can be disabled to avoid colliding with gettys. However, it could also lead to a lack of messages during shutdown/reboot.
2013-11-13Only disable output on console during boot if neededOlivier Brunel
If there are no more jobs on console, no need/we shouldn't disable output.
2013-11-10analyze: plot the time spent setting up security modulesThomas Hindoe Paaboel Andersen
2013-11-09systemd: fix memory leak in cgroup codeZbigniew Jędrzejewski-Szmek
If the unit already was in the hashmap, path would be leaked.
2013-11-08shutdown: unify handling of reboot() syscall a bitLennart Poettering
2013-11-08Remove dead code and unexport some callsLennart Poettering
"make check-api-unused" informs us about code that is not used anymore or that is exported but only used internally. Fix these all over the place.
2013-11-08manager: configurable StartLimit default valuesLukas Nykryn
https://bugzilla.redhat.com/show_bug.cgi?id=821723
2013-11-07core: fix require $XDG_RUNTIME_DIRKay Sievers
$ sudo dracut -f Trying to run as user instance, but $XDG_RUNTIME_DIR is not set. /usr/lib/dracut/modules.d/98systemd/module-setup.sh: line 10: ((: >= 198 : syntax error: operand expected (error token is ">= 198 ")
2013-11-07udevadm-settle: add missing braceZbigniew Jędrzejewski-Szmek
2013-11-07core: require $XDG_RUNTIME_DIR to be set for user instancesMantas Mikulėnas
It seems that some places use /run otherwise, which isn't going to work.
2013-11-07Support additional argument in rebootWaLyong Cho
reboot syscall can be performed with an additional argument. In some systems this functionality can be useful to modify the mode of the next boot performed by the bootloader.
2013-11-06active: rework make_socket_fd() to be based on socket_address_listen()Lennart Poettering
Among other things this makes sure we set SO_REUSEADDR which is immensely useful.
2013-11-06clients: various simplificationsLennart Poettering
2013-11-06Comment spelling fixes.David Strauss
2013-11-06util: unify reading of /proc/cmdlineLennart Poettering
Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
2013-11-06shutdown: trim the cgroup tree on loop iterationLennart Poettering
This way we leave the cgroup empty before exiting in a container which makes sure the container manager will get cgroup notification event https://bugs.freedesktop.org/show_bug.cgi?id=68370 https://bugzilla.redhat.com/show_bug.cgi?id=988883
2013-11-06cgroup: run PID 1 in the root cgroupLennart Poettering
This way cleaning up the cgroup tree on shutdown is a lot easier since we are in the root dir. Also PID 1 was previously artificially placed in system.slice, even though our rule actually was not to have processes in slices. The root slice otoh is magic anyway, so having PID 1 in there sounds less surprising. Of course, this means that PID is scheduled against the three top-level slices.
2013-11-05Configurable Timeouts/Restarts default valuesOleksii Shevchuk
https://bugs.freedesktop.org/show_bug.cgi?id=71132 Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec configuration options to manager configuration file.
2013-11-02detect_virtualization() returns NULL; pass empty string to dbusKay Sievers
2013-10-29strv: introduce new strv_from_stdarg_alloca() macro to generate a string ↵Lennart Poettering
array from stdarg function parameters This allows us to turn lists of strings passed in easily into string arrays without having to allocate memory.
2013-10-22systemd: use unit name in PrivateTmp directoriesZbigniew Jędrzejewski-Szmek
Unit name is used whole in the directory name, so that the unit name can be easily extracted from it, e.g. "/tmp/systemd-abcd.service-DEDBIF1". https://bugzilla.redhat.com/show_bug.cgi?id=957439
2013-10-21silent a few more gcc warningsKay Sievers
2013-10-21build-sys: use -Og instead of -O0 to catch warningsKay Sievers
$ touch src/core/dbus.c; make CFLAGS=-O0 make --no-print-directory all-recursive Making all in . CC src/core/libsystemd_core_la-dbus.lo CCLD libsystemd-core.la $ touch src/core/dbus.c; make CFLAGS=-Og make --no-print-directory all-recursive Making all in . CC src/core/libsystemd_core_la-dbus.lo src/core/dbus.c: In function 'init_registered_system_bus': src/core/dbus.c:798:18: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized] dbus_free(id); ^ CCLD libsystemd-core.la -Og Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.
2013-10-21bus: initialize variable, now that we might skip debug loggingKay Sievers
2013-10-21bus: remove static introspection file exportKay Sievers
2013-10-19mount/service: drop FsckPassNo supportTom Gundersen
We now treat passno as boleans in the generators, and don't need this any more. fsck itself is able to sequentialize checks on the same local media, so in the common case the ordering is redundant. It is still possible to force an order by using .d fragments, in case that is desired.
2013-10-16macro: clean up usage of gcc attributesLennart Poettering
Always use our own macros, and name all our own macros the same style.
2013-10-14list: make our list macros a bit easier to use by not requring type spec on ↵Lennart Poettering
each invocation We can determine the list entry type via the typeof() gcc construct, and so we should to make the macros much shorter to use.
2013-10-13manager: connect to private bus even if $DBUS_SESSION_BUS_ADDRESS is not setMantas Mikulėnas
Because that's exactly the kind of situation where the private bus is necessary.
2013-10-13Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek
2013-10-13Make sure that we don't dereference NULLZbigniew Jędrzejewski-Szmek
The code was actually safe, because b should never be null, because if rvalue is empty, a different branch is taken. But we *do* check for NULL in the loop above, so it's better to also check here for symmetry.
2013-10-13Introduce _cleanup_fdset_free_Zbigniew Jędrzejewski-Szmek
2013-10-13drop-ins: check return valueZbigniew Jędrzejewski-Szmek
If the function failed, nothing serious would happen because unlink would probably return EFAULT, but this would obscure the real error and is a bit sloppy.
2013-10-13ModernizationZbigniew Jędrzejewski-Szmek
Fixes minor leak in error path in device.c.
2013-10-13Never call qsort on potentially NULL arraysZbigniew Jędrzejewski-Szmek
This extends 62678ded 'efi: never call qsort on potentially NULL arrays' to all other places where qsort is used and it is not obvious that the count is non-zero.
2013-10-11smack: minimize ifdef use, and move all labeling to smack-util.cKay Sievers
2013-10-10security: missing header inclusionsLennart Poettering
2013-10-10security: rework selinux, smack, ima, apparmor detection logicLennart Poettering
Always cache the results, and bypass low-level security calls when the respective subsystem is not enabled.
2013-10-09Smack: Test if smack is enabled before mountingAuke Kok
Since on most systems with xattr systemd will compile with Smack support enabled, we still attempt to mount various fs's with Smack-only options. Before mounting any of these Smack-related filesystems with Smack specific mount options, check if Smack is functionally active on the running kernel. If Smack is really enabled in the kernel, all these Smack mounts are now *fatal*, as they should be. We no longer mount smackfs if systemd was compiled without Smack support. This makes it easier to make smackfs mount failures a critical error when Smack is enabled. We no longer mount these filesystems with their Smack specific options inside containers. There these filesystems will be mounted with there non-mount smack options for now.
2013-10-09core: unify the way we denote serialization attributesLennart Poettering
2013-10-07systemd: serialize/deserialize forbid_restart valueSylvia Else
The Service type's forbid_restart field was not preserved by serialization/deserialization, so the fact that the service should not be restarted after stopping was lost. If a systemctl stop foo command has been given, but the foo service has not yet stopped, and then the systemctl --system daemon-reload was given, then when the foo service eventually stopped, systemd would restart it. https://bugs.freedesktop.org/show_bug.cgi?id=69800