summaryrefslogtreecommitdiff
path: root/src/login/pam-module.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-08 19:49:49 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-08 19:49:49 +0100
commit8159d91a9c92aaee66d450ab0daff88f6e1a42b3 (patch)
tree6ae75c9eef3043f7dda284864dae6d67c92f1534 /src/login/pam-module.c
parent94676f3e9352cbf1f72e0a512ee0d2ed83ff676d (diff)
bus: port remaining code over to use bus_error_message()
Diffstat (limited to 'src/login/pam-module.c')
-rw-r--r--src/login/pam-module.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index f469244118..1975d8038d 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -40,6 +40,7 @@
#include "def.h"
#include "socket-util.h"
#include "fileio.h"
+#include "bus-error.h"
static int parse_argv(pam_handle_t *handle,
int argc, const char **argv,
@@ -355,11 +356,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
remote_host,
0);
if (r < 0) {
- pam_syslog(handle, LOG_ERR, "Failed to communicate with systemd-logind: %s", strerror(-r));
- if (error.name || error.message)
- pam_syslog(handle, LOG_ERR, "systemd-logind returned %s: %s",
- error.name ?: "unknown error",
- error.message ?: "no message");
+ pam_syslog(handle, LOG_ERR, "Failed to create session: %s", bus_error_message(&error, r));
return PAM_SYSTEM_ERR;
}
@@ -482,11 +479,7 @@ _public_ PAM_EXTERN int pam_sm_close_session(
id);
if (r < 0) {
pam_syslog(handle, LOG_ERR,
- "Failed to release session: %s", strerror(-r));
- if (error.name || error.message)
- pam_syslog(handle, LOG_ERR, "systemd-logind returned %s: %s",
- error.name ?: "unknown error",
- error.message ?: "no message");
+ "Failed to release session: %s", bus_error_message(&error, r));
r = PAM_SESSION_ERR;
goto finish;