summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-11event: hook up sd-event with the service watchdog logicLennart Poettering
Adds a new call sd_event_set_watchdog() that can be used to hook up the event loop with the watchdog supervision logic of systemd. If enabled and $WATCHDOG_USEC is set the event loop will ping the invoking systemd daemon right after coming back from epoll_wait() but not more often than $WATCHDOG_USEC/4. The epoll_wait() will sleep no longer than $WATCHDOG_USEC/4*3, to make sure the service manager is called in time. This means that setting WatchdogSec= in a .service file and calling sd_event_set_watchdog() in your daemon is enough to hook it up with the watchdog logic.
2013-12-11event: when handling SIGCHLD of a child process only reap after dispatching ↵Lennart Poettering
event source That way the even source callback is run with the zombie process still around so that it can access /proc/$PID/ and similar, and so that it can be sure that the PID has not been reused yet.
2013-12-11bus: kdbus - skip only STARTER and IN_QUEUE names for NameOwnerChangedKay Sievers
2013-12-10activate: clean up inherited descriptorsZbigniew Jędrzejewski-Szmek
> [simon@troela server]$ /usr/lib/systemd/systemd-activate -l 9000 main.js > Assertion 'fd == 3 + count' failed at src/activate/activate.c:115, > function open_sockets(). Aborting. > Aborted (core dumped) > after a bit debuging i found the problem: > slim appears to leak an fd into all of its children: > stat /proc/14004/fd/3 (14004 is the pid a random process in my session) > File: '/proc/14004/fd/3' -> '/var/log/slim.log' systemd-activate should be robust against the shell (or anything else) leaking descriptors. Now everything except stdin/stdout/stderr and received sockets will be closed.
2013-12-10Update README with test/ requirementsZbigniew Jędrzejewski-Szmek
2013-12-10journald: malloc less when streaming messagesZbigniew Jędrzejewski-Szmek
2013-12-11ptyfwd: Don't set the output prop of stdin, nor the input props of stdout.Luke Shumaker
It was calling cfmakeraw(3) on the properties for STDIN_FILENO; cfmakeraw sets both input and output properties. If (and only if) stdin and stdout are the same device is this correct. Otherwise, we must change only the input properties of stdin, and only the output properties of stdout.
2013-12-11ptyfwd: Set the size of the PTY base on the size of stdout, not stdin.Luke Shumaker
2013-12-10core: fix Unit.SetProperties argument parsingDavid Herrmann
SetProperties has signature "ba(sv)", but the bus_unit_set_properties() helper already does a enter_container('a', "sv") so we have to skip it in bus_unit_method_set_properties().
2013-12-10bus: do not dispatch incoming method calls that are broacasted to vtablesLennart Poettering
2013-12-10bus: don't generate assert warnings when we detach a detached bus from an eventLennart Poettering
2013-12-10update TODOLennart Poettering
2013-12-10core: epoll and signalfd has been moved into sd event loopShawn Landden
2013-12-10fix scan-build issuesThomas Hindoe Paaboel Andersen
The static analyzer scan-build had a few issues with analysing parts of systemd. gpt-auto-generator.c: scan-build could not find blkid.h. Whether it should be blkid.h or blkid/blkid.h seems to depend on the version used. We already use blkid/blkid.h in udev-builtin-blkid.c so it seems safe to use that here too. Makefile.am: Moved some -D's from CFLAGS to CPPFLAGS. I also simplified them a bit and got rid of a left over DBUS_CFLAGS. test-cgroup-mask.c/test-sched-prio.c A variable was added to store the replaced TEST_DIR. When wrapped in an assert_se TEST_DIR was not replaced in the logged error. While not an issue introduced in this patch we might as well fix it up while we are here.
2013-12-10bus: generate debug messages when we cannot deliver messages via kdbusLennart Poettering
2013-12-10bus: when we _unref() a NULL pointer, don't use assert_return()Lennart Poettering
We support unreffing NULL pointers just fine and we shouldn't pay the _unlikely_() price for it, not get a debug message if we do, hence let's not use assert_return() here.
2013-12-10bus: Add bus_kernel_monitor functionLukasz Skalski
2013-12-10hashmap: make gcc shut up on old glibcs that lack getauxval()Lennart Poettering
2013-12-10journald: use a bit more cleanup magic!Lennart Poettering
2013-12-10Revert "libsystemd-bus: use assert_return"Lennart Poettering
This reverts commit f7e2bd5a8070ba86cba6bcbf7d1c9a8173d846d4. Most of these checks are not programming errors, but happen during normal runtime. For example bus_kernel_pop_memfd() is called all the time on non-kdbus systems and is supposed to quickly fail if kdbus is not available. However, assert_return() makes this failure expensive, and hence has no place here. With the most recent change to assert_return() it will even log a debug message, which should never happen here.
2013-12-10Revert "systemd: add a start job for all units in SYSTEMD_[USER_]WANTS="Lennart Poettering
This reverts commit e775289d56ace2f8d23e62ed79316d71332d6d05. We really should let the dependency logic add jobs for dependencies here rather than manually adding in jobs, overtaping the real problem.
2013-12-10util: check for overflow in greedy_realloc()Lennart Poettering
2013-12-10bus: update kdbus.hKay Sievers
2013-12-10core/manager: remove infinite loopShawn Landden
2013-12-10macro: log assertion at debug level in assert_return()Lennart Poettering
2013-12-10bus: introduce new SD_BUS_VTABLE_HIDDEN flag for vtable membersLennart Poettering
When this flag is set then its member will not be shown in the introspection data. Also, properties with this flag set will not be included in GetAll() responses.
2013-12-10bus: introduce "trusted" bus concept and encode access control in object vtablesLennart Poettering
Introduces a new concept of "trusted" vs. "untrusted" busses. For the latter libsystemd-bus will automatically do per-method access control, for the former all access is automatically granted. Per-method access control is encoded in the vtables: by default all methods are only accessible to privileged clients. If the SD_BUS_VTABLE_UNPRIVILEGED flag is set for a method it is accessible to unprivileged clients too. By default whether a client is privileged is determined via checking for its CAP_SYS_ADMIN capability, but this can be altered via the SD_BUS_VTABLE_CAPABILITY() macro that can be ORed into the flags field of the method. Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED and SD_BUS_VTABLE_CAPABILITY() for controlling write access to them. Note however that read access is unrestricted, as PropertiesChanged messages might send out the values anyway as an unrestricted broadcast. By default the system bus is set to "untrusted" and the user bus is "trusted" since per-method access control on the latter is unnecessary. On dbus1 busses we check the UID of the caller rather than the configured capability since the capability cannot be determined without race. On kdbus the capability is checked if possible from the attached meta-data of a message and otherwise queried from the sending peer. This also decorates the vtables of the various daemons we ship with these flags.
2013-12-10libudev: hwdb - use libudev not systemd loggingKay Sievers
2013-12-10test: wrap $LOOPDEV in quotesZbigniew Jędrzejewski-Szmek
Otherwise things go awry if it is not set ('[ -b ]' is not the same as '[ -b "" ]'!).
2013-12-10test: rework run_qemuRonny Chevalier
It tries to find a suitable QEMU binary and will use KVM if present. We can now configure QEMU from outside with 4 variables : - $QEMU_BIN : path to QEMU's binary - $KERNEL_APPEND : arguments appended to kernel cmdline - $KERNEL_BIN : path to a kernel Default /boot/vmlinuz-$KERNEL_VER - $INITRD : path to an initramfs Default /boot/initramfs-${KERNEL_VER}.img - $QEMU_SMP : number of CPU simulated by QEMU. Default 1 (from Alexander Graf's script: http://www.spinics.net/lists/kvm/msg72389.html)
2013-12-10test: fix TEST-02-CRYPTSETUPRonny Chevalier
missing generate_module_dependencies call which prevents dm_mod and dm_crypt modules to be loaded
2013-12-10Bring bootchart code in line with CODING_STYLEDan McGee
Use double and not float, as there is little to no benefit.
2013-12-10Ensure unit is journaled for short-lived or oneshot processesDan McGee
In the time it takes to process incoming log messages, the process we are logging details for may exit. This means the cgroup data is no longer available from '/proc'. Unfortunately, the way the code was structured before, we never log _SYSTEMD_UNIT if we don't have this cgroup information. Add an else if case that allows the passed in unit_id to be logged even if we couldn't capture cgroup information. This ensures a command like `journalctl -u run-XXX` will return all log messages from a oneshot process.
2013-12-10update README to not suggest that systemd works without procfsShawn Landden
2013-12-10hwdb: Update database of Bluetooth company identifiersMarcel Holtmann
2013-12-10correct name of Tajik kbd layout in kbd-model-mapAdam Williamson
2013-12-10drop several entries from kbd-model-map whose kbd layouts do not existAdam Williamson
kbd-model-map was generated from system-config-keyboard's keyboard_models.py. Several of the kbd layouts referred in that file do not exist and, so far as I can tell, never did. I believe these entries existed simply to provide the xkb configuration information for those layouts, and there never were matching kbd entries; the kbd names were entirely notional, to satisfy the need for some entry or other in that field. For systemd, the only function of kbd-model-map is to 'match' kbd and xkb configurations, so it does not make any sense to maintain entries for cases where only one or the other exists in this context.
2013-12-10man: improve wording and comma usage in systemd.journal-fields(7)Jason St. John
Improve wording under "Description" and "_KERNEL_DEVICE="
2013-12-09libsystemd-bus: use assert_returnLukasz Skalski
2013-12-09kernel-install: fix help outputSébastien Luttringer
Kernel install doesn't need the second argument on his command line when removing. This is correctly documented in the man page.
2013-12-10test: add gvariant test for empty messagesLennart Poettering
2013-12-10bus: properly handle empty messagesLennart Poettering
2013-12-10bus: empty gvariant arrays should at least get size 1Lennart Poettering
2013-12-10bus: it's OK to send messages with an empty payload but non-empty signatureLennart Poettering
THis might happen when sending arrays with 0 enttries, hence this is not an indication for a problem.
2013-12-10bus: update kdbus.hLennart Poettering
2013-12-10bus: make gcc shut upLennart Poettering
2013-12-10update TODOLennart Poettering
2013-12-10bus: beef up zero copy test caseLennart Poettering
2013-12-10bus: only accept gvariant native endian messages via kdbusLennart Poettering
2013-12-10bus: fix rewinding in gvariant messagesLennart Poettering