summaryrefslogtreecommitdiff
path: root/pam.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-15 09:16:06 +0100
committerGitHub <noreply@github.com>2019-01-15 09:16:06 +0100
commit56b672a16c248c268fde17243a914a3bcfa4ac47 (patch)
tree01a33b3422b9d17ad3b63fb4decb972876210f88 /pam.c
parentfcf1bd4ebea97ae6ecd30e4f4e0c526b405b871a (diff)
parente3935ad1431623b5e3966e95cd75b45e7e00e278 (diff)
Merge pull request #7 from RedSoxFan/remove-wlroots
Implement logging and remove wlroots dependency
Diffstat (limited to 'pam.c')
-rw-r--r--pam.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pam.c b/pam.c
index e48056f..805817a 100644
--- a/pam.c
+++ b/pam.c
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <wlr/util/log.h>
+#include "log.h"
#include "swaylock.h"
void initialize_pw_backend(void) {
@@ -43,15 +43,15 @@ bool attempt_password(struct swaylock_password *pw) {
int pam_err;
if ((pam_err = pam_start("swaylock", username,
&local_conversation, &local_auth_handle)) != PAM_SUCCESS) {
- wlr_log(WLR_ERROR, "PAM returned error %d", pam_err);
+ swaylock_log(LOG_ERROR, "PAM returned error %d", pam_err);
}
if ((pam_err = pam_authenticate(local_auth_handle, 0)) != PAM_SUCCESS) {
- wlr_log(WLR_ERROR, "pam_authenticate failed");
+ swaylock_log(LOG_ERROR, "pam_authenticate failed");
goto fail;
}
// TODO: only call pam_end once we succeed at authing. refresh tokens beforehand
if ((pam_err = pam_end(local_auth_handle, pam_err)) != PAM_SUCCESS) {
- wlr_log(WLR_ERROR, "pam_end failed");
+ swaylock_log(LOG_ERROR, "pam_end failed");
goto fail;
}
clear_password_buffer(pw);