summaryrefslogtreecommitdiff
path: root/src/login
AgeCommit message (Collapse)Author
2013-11-21logind,machined,run: properly invoke StartTransientUnit() bus callLennart Poettering
2013-11-21bus: rework message handlers to always take an error argumentLennart Poettering
Message handler callbacks can be simplified drastically if the dispatcher automatically replies to method calls if errors are returned. Thus: add an sd_bus_error argument to all message handlers. When we dispatch a message handler and it returns negative or a set sd_bus_error we send this as message error back to the client. This means errors returned by handlers by default are given back to clients instead of rippling all the way up to the event loop, which is desirable to make things robust. As a side-effect we can now easily turn the SELinux checks into normal function calls, since the method call dispatcher will generate the right error replies automatically now. Also, make sure we always pass the error structure to all property and method handlers as last argument to follow the usual style of passing variables for return values as last argument.
2013-11-21bus: let's simplify things by getting rid of unnecessary bus parametersLennart Poettering
2013-11-21bus: add API calls to escape string components of objects pathsLennart Poettering
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-18Remove duplicate includesKarel Zak
2013-11-18use #pragma once instead of foo*foo define guardsShawn Landden
2013-11-18remove unused variablesThomas Hindoe Paaboel Andersen
2013-11-13logind: create the session fifo before saving the session fileThomas Hindoe Paaboel Andersen
If the session fifo is not created the session state written to the session file is "closing". This caused the lock screen in gnome-shell to go into a loop trying to find the active session. The problem was introduced in the sd-bus port in cc3773810855956bad92337cee8fa193584ab62e Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71525
2013-11-12uaccess: Add new DRM render nodesKristian Høgsberg
2013-11-12bus: introduce concept of a default bus for each thread and make use of it ↵Lennart Poettering
everywhere We want to emphasize bus connections as per-thread communication primitives, hence introduce a concept of a per-thread default bus, and make use of it everywhere.
2013-11-12bus: introduce concept of a "default" event loop per-thread and make use of ↵Lennart Poettering
it everywhere Try to emphasize a bit that there should be a mapping between event loops and threads, hence introduce a logic that there's one "default" event loop for each thread, that can be queried via "sd_event_default()".
2013-11-12bus: rename sd_bus_send_with_reply_and_block() to sd_bus_call()Lennart Poettering
The call is one of the most important ones we expose, where we place major emphasis on. We should make sure to give it a short, memorable name.
2013-11-10button: don't exit if we cannot handle a button pressLennart Poettering
2013-11-08bus: port remaining code over to use bus_error_message()Lennart 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-07inhibit: more conversions to use bus_log_parse_error()Lennart Poettering
2013-11-07bus: log message parsing errors everywhere with a generalized ↵Lennart Poettering
bus_log_parse_error()
2013-11-07polkit: don't spawn local client if we access a remote systemLennart Poettering
2013-11-07loginctl: convert to sd-busSimon Peeters
NOTE: the show-* subcommands do not print some properties: this are those with types like (so), a(so), (uo),... we need to fix this, but I'm not sure how
2013-11-07pam: the DECIMAL_STR_MAX macro is awesome, let's use itLennart Poettering
2013-11-06pam_systemd: dup the fd received from logindZbigniew Jędrzejewski-Szmek
Otherwise sd_bus_message cleanup would close it.
2013-11-07pam: externally our booleans are ints, not unsignedsLennart Poettering
2013-11-07socket: rework things to have only one sockaddr formatterLennart Poettering
2013-11-07pam_systemd: pass 'unsigned' instead of 'bool' to sd_bus_message_read()Kay Sievers
2013-11-06pam_systemd: port to libsystemd-busZbigniew Jędrzejewski-Szmek
2013-11-06systemd_pam: treat debug as debug=1 and parse all paramsZbigniew Jędrzejewski-Szmek
systemd_pam would ignore all params after the first invalid one. Instead ignore just this one, and parse the rest. There's just one now, but as a matter of principle ;) Also, allow debug as an alias for debug=1, and don't treat invalid debug= options as fatal.
2013-11-06clients: unify how we invoke getopt_long()Lennart Poettering
Among other things this makes sure we always expose a --version command and show it in the help texts.
2013-11-06inhibit: don't return error code on --helpLennart Poettering
2013-11-06machined: keep track of the initial leader PID of a machineLennart Poettering
This way we can without races always determine the machine for a leader PID. This allows machine managers to query the machine for a forked off container/VM without a race where the child might already have died before we could read the cgroup information from /proc/$PID/cgroup.
2013-11-05login: port test-inhibit to libsystemd-busKay Sievers
2013-11-05logind: add virtual object paths that always can be used to refer to the ↵Lennart Poettering
callers session, user, seat or machine object This way clients can skip invoking GetSessionByPID() for their own PID or a similar call to access these objects.
2013-11-05logind: automatically determine client side PID if GetSessionByPID() is ↵Lennart Poettering
called with a PID == 0
2013-11-05logind: fix serialization for PrepareForSleep booleanLennart Poettering
2013-11-05logind: fix serialization of ListInhibitors() requestLennart Poettering
2013-11-05logind: expose linger state on User objectLennart Poettering
2013-11-05logind: fix serialization of ListSeats() bus callLennart Poettering
2013-11-05logind: port logind to libsystemd-busLennart Poettering
2013-11-05user-sessions: modernizationsLennart Poettering
2013-10-30general: various cleanupsLennart Poettering
2013-10-22inhibit: port to sd-busTom Gundersen
2013-10-15logind: allow unprivileged session-device accessDavid Herrmann
The session-device/control API was introduced for unprivileged device access from within a session. Add the required dbus policy to the default logind policies. Note: logind validates that only root and the user of a session can use the API. Furthermore, only a single API user gets access at a time.
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-13Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek
2013-10-13Fix write-only use of a few variablesZbigniew Jędrzejewski-Szmek
Since the invention of read-only memory, write-only memory has been considered deprecated. Where appropriate, either make use of the value, or avoid writing it, to make it clear that it is not used.
2013-10-10login: make sd_session_get_vt() actually workDavid Herrmann
We use VTNR, not VTNr as key. Until now sd_session_get_vt() just returns an error.
2013-10-10login: fix invalid free() in sd_session_get_vt()David Herrmann
We need to clear variables markes as _cleanup_free_. Otherwise, our error-paths might corrupt random memory.
2013-10-04logind: fix bus introspection data for TakeControl()Lennart Poettering
2013-10-03execute: more debugging messagesZbigniew Jędrzejewski-Szmek
2013-10-01logind: remove fbdev session-device supportDavid Herrmann
fbdev does not support access-handover so it is quite useless to route it through logind. If compositors want to use it they ought to open it themselves. It's highly recommended to be ignored entirely, though. fbdev is about to be deprecated in the kernel.