summaryrefslogtreecommitdiff
path: root/src/login/pam_elogind.c
Commit message (Collapse)AuthorAge
* Prep v236 : Add missing SPDX-License-Identifier (5/9) src/loginSven Eden2018-03-26
|
* Prep v235: Fix pam_elogindSven Eden2017-09-01
|
* pam_logind: skip leading /dev/ from PAM_TTY field before passing it onLennart Poettering2017-08-09
| | | | | | | | | Apparently, PAM documents that the PAM_TTY should come with a /dev prefix, but we don't expect it so far, except that Wayland ends up setting it after all, the way the docs suggest. Hence, let's simply drop the /dev prefix if it is there. Fixes: #6516
* Prep v235: Add missing includes and dependencies.Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (6/10) [src/login]Sven Eden2017-08-14
|
* Prep 234: Rename pam-systemd to pam-elogind in pam module init log message.Sven Eden2017-07-26
|
* Rename formats-util.h to format-util.hZbigniew Jędrzejewski-Szmek2017-07-17
| | | | | | We don't have plural in the name of any other -util files and this inconsistency trips me up every time I try to type this file name from memory. "formats-util" is even hard to pronounce.
* tree-wide: drop NULL sentinel from strjoinZbigniew Jędrzejewski-Szmek2017-07-17
| | | | | | | | | | | | | This makes strjoin and strjoina more similar and avoids the useless final argument. spatch -I . -I ./src -I ./src/basic -I ./src/basic -I ./src/shared -I ./src/shared -I ./src/network -I ./src/locale -I ./src/login -I ./src/journal -I ./src/journal -I ./src/timedate -I ./src/timesync -I ./src/nspawn -I ./src/resolve -I ./src/resolve -I ./src/elogind -I ./src/core -I ./src/core -I ./src/libudev -I ./src/udev -I ./src/udev/net -I ./src/udev -I ./src/libelogind/sd-bus -I ./src/libelogind/sd-event -I ./src/libelogind/sd-login -I ./src/libelogind/sd-netlink -I ./src/libelogind/sd-network -I ./src/libelogind/sd-hwdb -I ./src/libelogind/sd-device -I ./src/libelogind/sd-id128 -I ./src/libelogind-network --sp-file coccinelle/strjoin.cocci --in-place $(git ls-files src/*.c) git grep -e '\bstrjoin\b.*NULL' -l|xargs sed -i -r 's/strjoin\((.*), NULL\)/strjoin(\1)/' This might have missed a few cases (spatch has a really hard time dealing with _cleanup_ macros), but that's no big issue, they can always be fixed later.
* Ensure kdbus isn't used (#3501)Dave Reisner2017-06-16
| | | | | | | | Delete the dbus1 generator and some critical wiring. This prevents kdbus from being loaded or detected. As such, it will never be used, even if the user still has a useful kdbus module loaded on their system. Sort of fixes #3480. Not really, but it's better than the current state.
* tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhereLennart Poettering2017-06-16
| | | | | | | | | | The macro determines the right length of a AF_UNIX "struct sockaddr_un" to pass to connect() or bind(). It automatically figures out if the socket refers to an abstract namespace socket, or a socket in the file system, and properly handles the full length of the path field. This macro is not only safer, but also simpler to use, than the usual offsetof() + strlen() logic.
* Prep v229: Remove remaining emacs settings [4/6] src/loginSven Eden2017-05-17
|
* Prep v229: Add missing fixes from upstream [4/6] src/loginSven Eden2017-05-17
|
* tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easyLennart Poettering2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLIB has recently started to officially support the gcc cleanup attribute in its public API, hence let's do the same for our APIs. With this patch we'll define an xyz_unrefp() call for each public xyz_unref() call, to make it easy to use inside a __attribute__((cleanup())) expression. Then, all code is ported over to make use of this. The new calls are also documented in the man pages, with examples how to use them (well, I only added docs where the _unref() call itself already had docs, and the examples, only cover sd_bus_unrefp() and sd_event_unrefp()). This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we tend to call our destructors these days. Note that this defines no public macro that wraps gcc's attribute and makes it easier to use. While I think it's our duty in the library to make our stuff easy to use, I figure it's not our duty to make gcc's own features easy to use on its own. Most likely, client code which wants to make use of this should define its own: #define _cleanup_(function) __attribute__((cleanup(function))) Or similar, to make the gcc feature easier to use. Making this logic public has the benefit that we can remove three header files whose only purpose was to define these functions internally. See #2008.
* Prep v228: Add remaining updates from upstream (3/3)Sven Eden2017-04-26
| | | | | Apply remaining fixes and the performed move of utility functions into their own foo-util.[hc] files on the rest of elogind.
* [4/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* Prep v226: Apply missing fixes and changes to src/loginSven Eden2017-03-14
|
* login: support user-bus on dbus1David Herrmann2017-03-14
| | | | | | | | | | | | | | | | | | | | | | dbus-1.10 was just released, including systemd units to run `dbus-daemon --session` as systemd user unit. This allows using a user-bus with dbus1, just like we do per default with kdbus. All the dbus libraries have already been fixed long ago to use the user-bus as default. Hence, there's no need to set DBUS_SESSION_BUS_ADDRESS= if we use the user-bus. However, gdm and friends continue to spawn a session bus if this variable is not set (instead of checking for the existence of the user-bus). Hence, we force the user-bus, if it is available, in pam_elogind. Once gdm and friends are fixed, we can continue to drop this again. However, that might take a while. With this in place, all that is needed to make the user-bus work is: `systemctl --global enable dbus.socket` If dbus.socket is not enabled, the legacy session-bus is still used. Based on a patch by: Jan Alexander Steffens <jan.steffens@gmail.com>
* logind: fail on CreateSession if already in sessionDavid Herrmann2017-03-14
| | | | | | | | | | | Right now, if you're already in a session and call CreateSession, we return information about the current session of yours. This is highy confusing and a nasty hack. Avoid that, and instead return a commonly known error, so the caller can detect that. This has the side-effect, that we no longer override XDG_VTNR and XDG_SEAT in pam_systemd, if you're already in a session. But this sounds like the right thing to do, anyway.
* sd-bus: introduce new sd_bus_flush_close_unref() callLennart Poettering2017-03-14
| | | | | | | | | | | | | | | | sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush() (which writes all unwritten messages out) + sd_bus_close() (which terminates the connection, releasing all unread messages) + sd_bus_unref() (which frees the connection). The combination of this call is used pretty frequently in systemd tools right before exiting, and should also be relevant for most external clients, and is hence useful to cover in a call of its own. Previously the combination of the three calls was already done in the _cleanup_bus_close_unref_ macro, but this was only available internally. Also see #327
* pam_systemd: Properly check kdbus availabilityJan Alexander Steffens (heftig)2017-03-14
| | | | | This properly avoids setting DBUS_SESSION_BUS_ADDRESS if kdbus is loaded (or built into the kernel) but not wanted.
* turn kdbus support into a runtime optionKay Sievers2017-03-14
| | | | | | | | | | | | | ./configure --enable/disable-kdbus can be used to set the default behavior regarding kdbus. If no kdbus kernel support is available, dbus-dameon will be used. With --enable-kdbus, the kernel command line option "kdbus=0" can be used to disable kdbus. With --disable-kdbus, the kernel command line option "kdbus=1" is required to enable kdbus support.
* util: split all hostname related calls into hostname-util.cLennart Poettering2017-03-14
|
* pam_system: use (void) to silence coverityZbigniew Jędrzejewski-Szmek2017-03-14
| | | | CID #996284.
* shared: add terminal-util.[ch]Ronny Chevalier2017-03-14
|
* shared: add formats-util.hRonny Chevalier2017-03-14
|
* Rename systemd-logind to logind.Ricardo Wurmus2015-08-15
|
* pam_elogind compilingAndy Wingo2015-04-08