git: cef2fa92dcb3 - stable/12 - Apply tentative fix for clang 11 warning in pam_exec(8):

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 22 Dec 2021 10:06:37 UTC
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=cef2fa92dcb3157d93b9f85f24c0d8aab38ed578

commit cef2fa92dcb3157d93b9f85f24c0d8aab38ed578
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2020-08-06 19:31:52 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-12-22 10:01:30 +0000

    Apply tentative fix for clang 11 warning in pam_exec(8):
    
    lib/libpam/modules/pam_exec/pam_exec.c:222:56: error: format specifies type 'char *' but the argument has type 'const void *' [-Werror,-Wformat]
                   if (asprintf(&envstr, "%s=%s", pam_item_env[i].name, item) < 0)
                                             ~~                         ^~~~
    
    (cherry picked from commit 228005931ca9c800e306e7b7d4aa0803197fea7d)
---
 lib/libpam/modules/pam_exec/pam_exec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libpam/modules/pam_exec/pam_exec.c b/lib/libpam/modules/pam_exec/pam_exec.c
index dc4a47e22c08..d54487e6fc4e 100644
--- a/lib/libpam/modules/pam_exec/pam_exec.c
+++ b/lib/libpam/modules/pam_exec/pam_exec.c
@@ -216,7 +216,8 @@ _pam_exec(pam_handle_t *pamh,
 		pam_err = pam_get_item(pamh, pam_item_env[i].item, &item);
 		if (pam_err != PAM_SUCCESS || item == NULL)
 			continue;
-		if (asprintf(&envstr, "%s=%s", pam_item_env[i].name, item) < 0)
+		if (asprintf(&envstr, "%s=%s", pam_item_env[i].name,
+		    (const char *)item) < 0)
 			OUT(PAM_BUF_ERR);
 		envlist[envlen++] = envstr;
 		envlist[envlen] = NULL;