URL: <https://savannah.gnu.org/bugs/?67527>
Summary: Add portable PAM conversation callback prototype for
Solaris and Linux
Group: GNU Screen
Submitter: psumbera
Submitted: Wed 17 Sep 2025 08:08:56 AM UTC
Category: Build/Install
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: 5.0.1
Fixed Release: None
Planned Release: None
Work Required: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 17 Sep 2025 08:08:56 AM UTC By: Petr Sumbera <psumbera>
On Linux, <security/pam_appl.h> defines the conv member of struct pam_conv
as:
int (*conv)(int num_msg,
const struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr);
but on Solaris the system header declares:
int (*conv)(int num_msg,
struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr);
Note the missing const qualifier on the msg parameter.
Projects that implement a single conversation function therefore receive a
compiler warning or error on one of the two platforms.
Following proposed patch resolves the issue:
--- screen-5.0.1/socket.c
+++ screen-5.0.1/socket.c
@@ -1154,7 +1154,12 @@ AddStr(prompt);
}
#if ENABLE_PAM
-static int screen_conv(int num_msg, const struct pam_message **msg,
+#if defined(__sun) || defined(__sun__) /* Solaris */
+# define PAM_MSG_CONST
+#else /* Linux, *BSD, etc. */
+# define PAM_MSG_CONST const
+#endif
+static int screen_conv(int num_msg, PAM_MSG_CONST struct pam_message **msg,
struct pam_response **resp, void *data)
{
(void)num_msg; /* unused */
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67527>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
