|
|
1bb595 |
From 26c794da31c215fef3e41429f6f13afdaf349bee Mon Sep 17 00:00:00 2001
|
|
|
1bb595 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
1bb595 |
Date: Wed, 3 Jun 2020 20:35:04 +0200
|
|
|
1bb595 |
Subject: [PATCH 21/22] pam_sss: add SERVICE_IS_GDM_SMARTCARD
|
|
|
1bb595 |
|
|
|
1bb595 |
Resolves: https://github.com/SSSD/sssd/issues/5190
|
|
|
1bb595 |
|
|
|
1bb595 |
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
|
|
|
1bb595 |
---
|
|
|
1bb595 |
src/sss_client/pam_sss.c | 4 +++-
|
|
|
1bb595 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
1bb595 |
|
|
|
1bb595 |
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
|
|
|
1bb595 |
index 69b440774..7e59f0487 100644
|
|
|
1bb595 |
--- a/src/sss_client/pam_sss.c
|
|
|
1bb595 |
+++ b/src/sss_client/pam_sss.c
|
|
|
1bb595 |
@@ -71,6 +71,8 @@
|
|
|
1bb595 |
#define DEBUG_MGS_LEN 1024
|
|
|
1bb595 |
#define MAX_AUTHTOK_SIZE (1024*1024)
|
|
|
1bb595 |
#define CHECK_AND_RETURN_PI_STRING(s) ((s != NULL && *s != '\0')? s : "(not available)")
|
|
|
1bb595 |
+#define SERVICE_IS_GDM_SMARTCARD(pitem) (strcmp((pitem)->pam_service, \
|
|
|
1bb595 |
+ "gdm-smartcard") == 0)
|
|
|
1bb595 |
|
|
|
1bb595 |
static void logger(pam_handle_t *pamh, int level, const char *fmt, ...) {
|
|
|
1bb595 |
va_list ap;
|
|
|
1bb595 |
@@ -2580,7 +2582,7 @@ static int pam_sss(enum sss_cli_command task, pam_handle_t *pamh,
|
|
|
1bb595 |
return PAM_AUTHINFO_UNAVAIL;
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
- if (strcmp(pi.pam_service, "gdm-smartcard") == 0
|
|
|
1bb595 |
+ if (SERVICE_IS_GDM_SMARTCARD(&pi)
|
|
|
1bb595 |
|| (flags & PAM_CLI_FLAGS_REQUIRE_CERT_AUTH)) {
|
|
|
1bb595 |
ret = check_login_token_name(pamh, &pi, retries,
|
|
|
1bb595 |
quiet_mode);
|
|
|
1bb595 |
--
|
|
|
1bb595 |
2.21.3
|
|
|
1bb595 |
|