Blame SOURCES/0009-pam_sss_gss-KRB5CCNAME-may-be-NULL.patch

c74abc
From 0eae7db9e06645ef88d0cf15672770776293edb5 Mon Sep 17 00:00:00 2001
c74abc
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
c74abc
Date: Mon, 23 May 2022 11:05:01 +0200
c74abc
Subject: [PATCH] pam_sss_gss: KRB5CCNAME may be NULL
c74abc
c74abc
Resolves: https://github.com/SSSD/sssd/issues/6180
c74abc
c74abc
:fixes: A regression in pam_sss_gss module causing a failure if
c74abc
  KRB5CCNAME environment variable was not set was fixed.
c74abc
c74abc
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
c74abc
Reviewed-by: Sumit Bose <sbose@redhat.com>
c74abc
(cherry picked from commit 9aad30711a5928f0e8a3627305b6449291de507f)
c74abc
---
c74abc
 src/sss_client/pam_sss_gss.c | 3 ++-
c74abc
 1 file changed, 2 insertions(+), 1 deletion(-)
c74abc
c74abc
diff --git a/src/sss_client/pam_sss_gss.c b/src/sss_client/pam_sss_gss.c
c74abc
index 51047efc3..77a58e4cf 100644
c74abc
--- a/src/sss_client/pam_sss_gss.c
c74abc
+++ b/src/sss_client/pam_sss_gss.c
c74abc
@@ -492,7 +492,8 @@ static errno_t sss_cli_getenv(const char *variable_name, char **_value)
c74abc
 {
c74abc
     char *value = getenv(variable_name);
c74abc
     if (value == NULL) {
c74abc
-        return ENOENT;
c74abc
+        *_value = NULL;
c74abc
+        return EOK;
c74abc
     }
c74abc
 
c74abc
     *_value = strdup(value);
c74abc
-- 
c74abc
2.34.3
c74abc