summaryrefslogtreecommitdiff
path: root/src/shared/def.h
Commit message (Collapse)AuthorAge
* journal: guarantee async-signal-safety in sd_journald_sendvZbigniew Jędrzejewski-Szmek2014-01-27
| | | | | | | | | | | | | | | | | | signal(7) provides a list of functions which may be called from a signal handler. Other functions, which only call those functions and don't access global memory and are reentrant are also safe. sd_j_sendv was mostly OK, but would call mkostemp and writev in a fallback path, which are unsafe. Being able to call sd_j_sendv in a async-signal-safe way is important because it allows it be used in signal handlers. Safety is achieved by replacing mkostemp with open(O_TMPFILE) and an open-coded writev replacement which uses write. Unfortunately, O_TMPFILE is only available on kernels >= 3.11. When O_TMPFILE is unavailable, an open-coded mkostemp is used. https://bugzilla.gnome.org/show_bug.cgi?id=722889
* exec: introduce PrivateDevices= switch to provide services with a private /devLennart Poettering2014-01-20
| | | | | | Similar to PrivateNetwork=, PrivateTmp= introduce PrivateDevices= that sets up a private /dev with only the API pseudo-devices like /dev/null, /dev/zero, /dev/random, but not any physical devices in them.
* Move bus path definitions to def.hZbigniew Jędrzejewski-Szmek2014-01-02
|
* def: lower exit-on-idle timeLennart Poettering2013-12-19
|
* localed: match converted keymaps before legacyZbigniew Jędrzejewski-Szmek2013-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, X11 keymap fr-pc105-oss would be converted to fr, even though fr-oss exists. Now, if /usr/lib/kbd/keymaps/xkb/<layout>[-<variant>].map[.gz] exists, <layout>[-<variant>] will be used as the console keymap, falling back to the legacy mappings otherwise. % sudo localectl set-x11-keymap pl pc105 % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: pl (was pl2 before) X11 Layout: pl X11 Model: pc105 % sudo localectl set-x11-keymap fr pc105 oss % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: fr-oss (was fr before) X11 Layout: fr X11 Model: pc105 X11 Variant: oss % sudo localectl set-x11-keymap fr pc105 % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: fr X11 Layout: fr X11 Model: pc105 % sudo localectl set-x11-keymap gb % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: gb (was uk before) X11 Layout: gb
* manager: configurable StartLimit default valuesLukas Nykryn2013-11-08
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=821723
* Support additional argument in rebootWaLyong Cho2013-11-07
| | | | | | 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.
* Verify validity of session name when received from outsideZbigniew Jędrzejewski-Szmek2013-09-16
| | | | Only ASCII letters and digits are allowed.
* manager: Do not handle SIGKILL since we can notChengwei Yang2013-06-06
| | | | | | | | | | | | | | | | | | | | | | | This is a minor fix because it's not a major issue, this fix just avoid to get EINVAL error from sigaction(2). There are two signals can not handled at user space, SIGKILL and SIGSTOP even we're PID 1, trying to handle these two signals will get EINVAL error. There are two kinds of systemd instance, running as system manager or user session manager, apparently, the latter is a general user space process which can not handle SIGKILL. The special pid 1 also can not do that refer to kernel/signal.c:do_sigaction(). However, pid 1 is unkillable because the kernel did attach SIGNAL_UNKILLABLE to it at system boot up, refer to init/main.c:start_kernel() --> rest_init() --> kernel_thread() --> kernel_init() --> init_post() current->signal->flags |= SIGNAL_UNKILLABLE
* use #pragma once instead of foo*foo #define guardsShawn Landden2012-07-19
| | | | | | | | | | | | | | | | | #pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported in other compilers. I've been using and maintaining (rebasing) this patch for a while now, as it annoyed me to see #ifndef fooblahfoo, etc all over the place, almost arrogant about the annoyance of having to define all these names to perform a commen but neccicary functionality, when a completely superior alternative exists. I havn't sent it till now, cause its kindof a style change, and it is bad voodoo to mess with style that has been established by more established editors. So feel free to lambast me as a crazy bafoon. v2 - preserve externally used headers
* core: make systemd.confirm_spawn=1 actually workLennart Poettering2012-06-26
| | | | | | This adds a timeout if the TTY cannot be acquired and makes sure we always output the question to the console, never to the TTY of the respective service.
* move remainig shared stuff to shared/Kay Sievers2012-04-12