summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-01-21bus: implement synchronous message calls via kernel ioctlLennart Poettering
2014-01-21libsystemd: split up into subdirsTom Gundersen
We still only produce on .so, but let's keep the sources separate to make things a bit less messy.
2014-01-21libsystemd-dhcp: revert merge into libsystemdTom Gundersen
Unlike the other merged libs, the rest of libsystemd will never depend on sd-dhcp-client, so there is no reason not to keep it separate.
2014-01-20Revert "sd-bus: let sd_bus_call() use the synchronous kdbus method"Kay Sievers
This reverts commit 021b89861d0b1defcbd6ba71d1aaf6271785a942. Something is not quite right, "KillUnit" sent from systemctl is not handled correctly and shutdown has problems.
2014-01-20logind: introduce session "positions"David Herrmann
logind has no concept of session ordering. Sessions have a unique name, some attributes about the capabilities and that's already it. There is currently no stable+total order on sessions. If we use the logind API to switch between sessions, we are faced with an unordered list of sessions we have no clue of. This used to be no problem on seats with VTs or on seats with only a single active session. However, with the introduction of multi-session capability for seats without VTs, we need to find a way to order sessions in a stable way. This patch introduces session "positions". A position is a simple integer assigned to a session which is never changed implicitly (currently, we also don't change it explicitly, but that may be changed someday). For seats with VTs, we force the position to be the same as the VTnr. Without VTs, we simply find the lowest unassigned number and use it as position. If position-assignment fails or if, for any reason, we decide to not assign a position to a session, the position is set to 0 (which is treated as invalid position). During session_load() or if two sessions have the same VTnr, we may end up with two sessions with the same position (this shouldn't happen, but lets be fail-safe in case some other part of the stack fails). This case is dealt with gracefully by ignoring any session but the first session assigned to the position. Thus, session->pos is a hint, seat->positions[i] is the definite position-assignment. Always verify both match in case you need to modify them! Additionally, we introduce SwitchTo(unsigned int) on the seat-dbus-API. You can call it with any integer value != 0 and logind will try to switch to the request position. If you implement a compositor or any other session-controller, you simply watch for ctrl+alt+F1 to F12 and call SwitchTo(Fx). logind will figure a way out deal with this number. For convenience, we also introduce SwitchToNext/Previous(). It should be called on ctrl+alt+Left/Right (like the kernel-console used to support). Note that the public API (SwitchTo*()) is *not* bound to the underlying logic that is implemented now. We don't export "session-positions" on the dbus/C API! They are an implementation detail. Instead, the SwitchTo*() API is supposed to be a hint to let logind choose the session-switching logic. Any foreground session-controller is free to enumerate/order existing sessions according to their needs and call Session.Activate() manually. But the SwitchTo*() API provides a uniform behavior across session-controllers. Background: Session-switching keys depend on the active keymap. The XKB specification provides the XKB_KEY_XF86Switch_VT_1-12 key-symbols which have to be mapped by all keymaps to allow session-switching. It is usually bound to ctrl+alt+Fx but may be set differently. A compositor passes any keyboard input to XKB before passing it to clients. In case a key-press invokes the XKB_KEY_XF86Switch_VT_x action, the keypress is *not* forwarded to clients, but instead a session-switch is scheduled. This actually prevents us from handling these keys outside of the session. If an active compositor has a keymap with a different mapping of these keys, and logind itself tries to catch these combinations, we end up with the key-press sent to the compositor's clients *and* handled by logind. This is *bad* and we must avoid this. The only situation where a background process is allowed to handle key-presses is debugging and emergency-keys. In these cases, we don't care for keymap mismatches and accept the double-event. Another exception is unmapped keys like PowerOff/Suspend (even though this one is controversial).
2014-01-20exec: introduce PrivateDevices= switch to provide services with a private /devLennart Poettering
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.
2014-01-20sd-dhcp-client: refactor state machine checkUmut Tezduyar Lindskog
2014-01-20systemctl: skip native unit file handling if sysv file handling already ↵Lennart Poettering
handled everything Issue pointed out by Colin Guthrie.
2014-01-19sd-bus: let sd_bus_call() use the synchronous kdbus methodDaniel Mack
2014-01-19bus-kernel: move bus_kernel_make_messageDaniel Mack
This makes future commits more readable.
2014-01-19networkd: use 'up'/'down' rather than 'on'/'off'Tom Gundersen
2014-01-18networkd: dhcp - by default ignore the MTUTom Gundersen
2014-01-18sd-dhcp-client: refactor client_{free,new}Tom Gundersen
Make them more simiar to sd_bus and friends. Also factor out the event attachment. In the future, we will likely want to support external main-loops, so this is a first step. For the time being, we are still requiring an sd_event to be attached though.
2014-01-18sd-resolv: declare functions from .h publicDaniel Buch
2014-01-18sd-resolve: rename get_next() and get_n_queries() + cleanupDaniel Buch
2014-01-18sd-resolve: Allocate objects with new()Daniel Buch
2014-01-18sd-resolve: get rid of sd_resolve_freeanswer()Daniel Buch
2014-01-18sd-dhcp-client/networkd: add domainname supportTom Gundersen
2014-01-18networkd: don't hard depend on system busTom Gundersen
We may not have a dbus daemon in the initrd (until we can rely on kdbus). In this case, simply ignore any attempts at using the bus. There is only one user for now, but surely more to come. In order to work reliably in the real root without kdbus, but at the same time don't delay boot when kdbus is in use, order ourselves after dbus.service.
2014-01-18networkd: resolv.conf - reword commentTom Gundersen
Take into account that users may want to use resolvconf(8), or similar. Also, avoid repeated calls to fputs().
2014-01-18libsystemd: sync kdbus.hDaniel Mack
2014-01-17sd-resolve: rename structs to fit coding-style e.g 'struct MixedCase'Daniel Buch
lets get this right once, and if not for all, atleast for now :) So comments and input about nameing is very welcome. Cheers
2014-01-17sd-resolve: get rid of _t post-fixes for sd_ objectsDaniel Buch
We dont want _t prefixes, right?
2014-01-17bus: Fix read_word_le() functionLukasz Skalski
2014-01-17libsystemd: rename LIBSYSTEMD_BUS to LIBSYSTEMDTom Gundersen
2014-01-17bus: update kdbus.h (ABI break)Kay Sievers
2014-01-16networkd: resolv.conf - extend the comment a bitTom Gundersen
2014-01-16sd-dhcp-client: minor style fixesTom Gundersen
Also introduce a cleanup macro for DHCPLease
2014-01-16sd-dhcp-client: refactor DNS supportTom Gundersen
Rather than keeping an array of pointers to addresses, just keep an array of addresses.
2014-01-16sd-dhcp-client/networkd: add transient hostname supportTom Gundersen
2014-01-16networkd: dhcp - only set the MTU option onceTom Gundersen
Only set MTU request when creating the dhcp client, not every time it is restarted.
2014-01-16networkd: link - only save original MTU when necessaryTom Gundersen
2014-01-16networkd: improve loggingTom Gundersen
2014-01-16bus: fix issue with reference countingZbigniew Jędrzejewski-Szmek
b7fc42e03 introduced a regression.
2014-01-16bus: break reference cycle between bus and messagesZbigniew Jędrzejewski-Szmek
Previously (6ee4f99 bus: break reference cycle between bus and messages) I committed the test code, but not the actual fix :)
2014-01-16sd-dhcp-client/networkd: add interface MTU supportTom Gundersen
2014-01-16sd-rtnl: only alter link flags when reqeusted toTom Gundersen
2014-01-16sd-dhcp-client: fix memory corruptionTom Gundersen
2014-01-15event: extend priority raneg to 64bitLennart Poettering
The kdbus prioq logic will use 64bit prios too, so let's keep this similar in style. Using 64bit here has the advantage, that pointers and pretty much anything else can be mapped naturally to priorities if so desired.
2014-01-15systemctl: introduce new "import-environment" commandLennart Poettering
This may be used in graphical session start-up scripts to upload environment variables such as $DISPLAY into the systemd manager easily.
2014-01-15logind: get rid of X11 display socket symlinkLennart Poettering
X11 never made use of it anyway and it's probably better to just push $DISPLAY into the systemd daemon from gnome-session (or equivalent program) than to change libX11 to look for this socket. In particular since we won't need this for Wayland anyway and we shouldn't add infrastructure for stuff that's on its way out anyway.
2014-01-15Revert "Revert "coredumpctl: in case of error free pattern after print""Lukas Nykryn
In the case of the error set_consume will free the pointer 'pattern' which is later used in log_error. Either we should stop priniting that or use simple set_put and free pattern manually. This reverts commit ece6b8fd5bbc1fee16f652e680e3033f2f3efc4a.
2014-01-14sd-resolv: rename to sd-resolveTom Gundersen
Lennart pointed out that we were misspelling 'resolve'. Let's not repeat the mistakes of 'umount' and 'resolv.conf'.
2014-01-14Revert "coredumpctl: in case of error free pattern after print"Zbigniew Jędrzejewski-Szmek
This reverts commit cf50a55277ee432e1217ad894afcbd9a664ff96c. set_consume frees on error.
2014-01-14coredumpctl: in case of error free pattern after printLukas Nykryn
2014-01-14sd-resolv: remove left-over commentTom Gundersen
We are anyway breaking the API by renaming everything, so that is not a concern.
2014-01-14sd-resolv: require SOCK_CLOEXECTom Gundersen
2014-01-14sd-resolv: rename old asyncns variablesDaniel Buch
2014-01-14sd_resolv: Rename structs- and function names to sd_resolvDaniel Buch
2014-01-14bus: update kdbus.h (ABI break)Kay Sievers