summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-07-20 10:07:26 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-11-08 08:02:57 +0100
commit3bc7e320b47d360d54e77cda02a0f6aeae7bce19 (patch)
tree6f6ecc6e57671d931233a5eb48ba002e7f2f0a60 /src/login
parent0f0857b9478c382b392cdf970e4d188df8b0da9c (diff)
pam_elogind: drop setting DBUS_SESSION_BUS_ADDRESS
Since D-Bus 1.9.14 (2015-03-02) dbus looks in $XDG_RUNTIME_DIR/bus for the system bus on its own, hence we can finally drop setting this environment variable. gdbus since glib 2.45.3 (June 2015) also supports it. Closes: #87 Sigend-off-by: Sven Eden <sven.eden@prydeworx.com>
Diffstat (limited to 'src/login')
-rw-r--r--src/login/pam_elogind.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/login/pam_elogind.c b/src/login/pam_elogind.c
index c55066e23..c4550d35b 100644
--- a/src/login/pam_elogind.c
+++ b/src/login/pam_elogind.c
@@ -160,40 +160,6 @@ static int get_seat_from_display(const char *display, const char **seat, uint32_
return 0;
}
-static int export_legacy_dbus_address(
- pam_handle_t *handle,
- uid_t uid,
- const char *runtime) {
-
- _cleanup_free_ char *s = NULL;
- int r = PAM_BUF_ERR;
-
- /* FIXME: We *really* should move the access() check into the
- * daemons that spawn dbus-daemon, instead of forcing
- * DBUS_SESSION_BUS_ADDRESS= here. */
-
- s = strjoin(runtime, "/bus");
- if (!s)
- goto error;
-
- if (access(s, F_OK) < 0)
- return PAM_SUCCESS;
-
- s = mfree(s);
- if (asprintf(&s, DEFAULT_USER_BUS_ADDRESS_FMT, runtime) < 0)
- goto error;
-
- r = pam_misc_setenv(handle, "DBUS_SESSION_BUS_ADDRESS", s, 0);
- if (r != PAM_SUCCESS)
- goto error;
-
- return PAM_SUCCESS;
-
-error:
- pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
- return r;
-}
-
static int append_session_memory_max(pam_handle_t *handle, sd_bus_message *m, const char *limit) {
uint64_t val;
int r;
@@ -372,10 +338,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
}
}
- r = export_legacy_dbus_address(handle, pw->pw_uid, rt);
- if (r != PAM_SUCCESS)
- return r;
-
return PAM_SUCCESS;
}
@@ -604,10 +566,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
return r;
}
}
-
- r = export_legacy_dbus_address(handle, pw->pw_uid, runtime_path);
- if (r != PAM_SUCCESS)
- return r;
}
if (!isempty(seat)) {