chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix service file to match installed elogind binary location
[elogind.git]
/
src
/
login
/
pam_elogind.c
diff --git
a/src/login/pam_elogind.c
b/src/login/pam_elogind.c
index 4f023640f6517f953a74d4036e27604677b06f2f..402885d7e9d6a3742319706052cc671a7486da17 100644
(file)
--- a/
src/login/pam_elogind.c
+++ b/
src/login/pam_elogind.c
@@
-36,7
+36,7
@@
#include "def.h"
#include "fd-util.h"
#include "fileio.h"
#include "def.h"
#include "fd-util.h"
#include "fileio.h"
-#include "format
s
-util.h"
+#include "format-util.h"
#include "hostname-util.h"
#include "login-util.h"
#include "macro.h"
#include "hostname-util.h"
#include "login-util.h"
#include "macro.h"
@@
-186,7
+186,7
@@
static int export_legacy_dbus_address(
* daemons that spawn dbus-daemon, instead of forcing
* DBUS_SESSION_BUS_ADDRESS= here. */
* daemons that spawn dbus-daemon, instead of forcing
* DBUS_SESSION_BUS_ADDRESS= here. */
- s = strjoin(runtime, "/bus"
, NULL
);
+ s = strjoin(runtime, "/bus");
if (!s)
goto error;
if (!s)
goto error;
@@
-232,9
+232,11
@@
_public_ PAM_EXTERN int pam_sm_open_session(
assert(handle);
assert(handle);
+#if 0 /// with elogind, it is always a "logind system".
/* Make this a NOP on non-logind systems */
if (!logind_running())
return PAM_SUCCESS;
/* Make this a NOP on non-logind systems */
if (!logind_running())
return PAM_SUCCESS;
+#endif // 0
if (parse_argv(handle,
argc, argv,
if (parse_argv(handle,
argc, argv,
@@
-244,7
+246,11
@@
_public_ PAM_EXTERN int pam_sm_open_session(
return PAM_SESSION_ERR;
if (debug)
return PAM_SESSION_ERR;
if (debug)
+#if 0 /// This is pam-elogind, not pam-systemd
pam_syslog(handle, LOG_DEBUG, "pam-systemd initializing");
pam_syslog(handle, LOG_DEBUG, "pam-systemd initializing");
+#else
+ pam_syslog(handle, LOG_DEBUG, "pam-elogind initializing");
+#endif // 0
r = get_user_data(handle, &username, &pw);
if (r != PAM_SUCCESS) {
r = get_user_data(handle, &username, &pw);
if (r != PAM_SUCCESS) {
@@
-259,7
+265,11
@@
_public_ PAM_EXTERN int pam_sm_open_session(
* leave. */
pam_get_item(handle, PAM_SERVICE, (const void**) &service);
* leave. */
pam_get_item(handle, PAM_SERVICE, (const void**) &service);
+#if 0 /// Actually it is elogind-user with elogind.
if (streq_ptr(service, "systemd-user")) {
if (streq_ptr(service, "systemd-user")) {
+#else
+ if (streq_ptr(service, "elogind-user")) {
+#endif // 0
_cleanup_free_ char *rt = NULL;
if (asprintf(&rt, "/run/user/"UID_FMT, pw->pw_uid) < 0)
_cleanup_free_ char *rt = NULL;
if (asprintf(&rt, "/run/user/"UID_FMT, pw->pw_uid) < 0)