From bb5db320096229bb43ae2b9a868ebca25b104389 Mon Sep 17 00:00:00 2001 From: Guilherme Rambo Date: Mon, 23 Sep 2019 16:36:48 -0400 Subject: [PATCH] Improved error handling --- watchid-pam-extension.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/watchid-pam-extension.swift b/watchid-pam-extension.swift index 9303dbf..f10d272 100644 --- a/watchid-pam-extension.swift +++ b/watchid-pam-extension.swift @@ -36,7 +36,9 @@ public func pam_sm_authenticate(pamh: pam_handler_t, flags: Int, argc: Int, argv defer { semaphore.signal() } if let error = error { - fputs("\(error.localizedDescription)\n", stderr) + fputs("\(error.localizedDescription)\n", stderr) + result = PAM_IGNORE + return } result = success ? PAM_SUCCESS : PAM_AUTH_ERR