summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-01-11 06:22:19 +0800
committerKay Sievers <kay@vrfy.org>2014-01-11 06:22:19 +0800
commit5eecd85f15d35198807e6cd4b5ca5ec7dfdb11b3 (patch)
tree964f35f00c3973944c35f64a49ae794e0ea2502e /src
parent3860bb6dbfb3dfe70cef33823661145dcc5b864c (diff)
Revert "bus: export bus address also when compiled without kdbus"
This reverts commit 9130f2128b64de19a3b7d6db7e0d371adfd296c2. It's too early to do that. For now we should only "break" the --enable-kdbus case, not the normal one.
Diffstat (limited to 'src')
-rw-r--r--src/login/pam-module.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index ea606b7fc9..e76fef8001 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -169,28 +169,22 @@ static int export_legacy_dbus_address(
uid_t uid,
const char *runtime) {
+#ifdef ENABLE_KDBUS
_cleanup_free_ char *s = NULL;
int r;
-#ifdef ENABLE_KDBUS
if (asprintf(&s, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT,
(unsigned long) uid, runtime) < 0) {
pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
return PAM_BUF_ERR;
}
-#else
- if (asprintf(&s, UNIX_USER_BUS_FMT, runtime) < 0) {
- pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
- return PAM_BUF_ERR;
- }
-#endif
r = pam_misc_setenv(handle, "DBUS_SESSION_BUS_ADDRESS", s, 0);
if (r != PAM_SUCCESS) {
pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
return r;
}
-
+#endif
return PAM_SUCCESS;
}