7199N/AFrom 1ca93c6cf2f4710895caf1f13b38dcb2a46bf688 Mon Sep 17 00:00:00 2001
7199N/AFrom: Alan Coopersmith <alan.coopersmith@oracle.com>
7199N/ADate: Tue, 29 Dec 2015 12:26:03 -0800
7199N/ASubject: [PATCH 03/19] solaris pam
7199N/A
7199N/AFix compiler complaints due to different types between Solaris & Linux PAM:
7199N/A
7199N/Adaemon/gdm-session-worker.c: In function 'gdm_session_worker_get_username':
7199N/Adaemon/gdm-session-worker.c:611:9: warning: passing argument 3 of
7199N/A 'pam_get_item' from incompatible pointer type [enabled by default]
7199N/A if (pam_get_item (worker->priv->pam_handle, PAM_USER, &item) == PAM_SUCCESS) {
7199N/A ^
7199N/AIn file included from daemon/gdm-session-worker.c:40:0:
7199N/A/usr/include/security/pam_appl.h:167:1: note: expected 'void **' but
7199N/A argument is of type 'const void **'
7199N/A pam_get_item(
7199N/A ^
7199N/A
7199N/Adaemon/gdm-session-worker.c: In function 'gdm_session_worker_initialize_pam':
7199N/Adaemon/gdm-session-worker.c:1200:31: warning: assignment from incompatible
7199N/A pointer type [enabled by default]
7199N/A pam_conversation.conv = (GdmSessionWorkerPamNewMessagesFunc) gdm_session_worker_pam_new_messages_handler;
7199N/A ^
7199N/A
7199N/A(split out of Desktop gate patch gdm-03-sdtlogin.diff since it's unrelated)
7199N/A---
7199N/A daemon/gdm-session-worker.c | 14 ++++++++++++--
7199N/A 1 file changed, 12 insertions(+), 2 deletions(-)
7199N/A
7199N/Adiff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
7199N/Aindex 3b10940..291caad 100644
7199N/A--- a/daemon/gdm-session-worker.c
7199N/A+++ b/daemon/gdm-session-worker.c
7199N/A@@ -37,6 +37,12 @@
7199N/A #include <grp.h>
7199N/A #include <pwd.h>
7199N/A
7199N/A+#if __sun
7199N/A+#define GDM_PAM_QUAL
7199N/A+#else
7199N/A+#define GDM_PAM_QUAL const
7199N/A+#endif
7199N/A+
7199N/A #include <security/pam_appl.h>
7199N/A
7199N/A #ifdef HAVE_LOGINCAP
7199N/A@@ -205,7 +211,7 @@ static void worker_interface_init (GdmDBusWorkerIface *iface);
7199N/A
7199N/A
7199N/A typedef int (* GdmSessionWorkerPamNewMessagesFunc) (int,
7199N/A- const struct pam_message **,
7199N/A+ GDM_PAM_QUAL struct pam_message **,
7199N/A struct pam_response **,
7199N/A gpointer);
7199N/A
7199N/A@@ -604,7 +610,11 @@ static gboolean
7199N/A gdm_session_worker_get_username (GdmSessionWorker *worker,
7199N/A char **username)
7199N/A {
7199N/A+#ifdef __sun
7199N/A+ gpointer item;
7199N/A+#else
7199N/A gconstpointer item;
7199N/A+#endif
7199N/A
7199N/A g_assert (worker->priv->pam_handle != NULL);
7199N/A
7199N/A@@ -860,7 +870,7 @@ get_friendly_error_message (int error_code)
7199N/A
7199N/A static int
7199N/A gdm_session_worker_pam_new_messages_handler (int number_of_messages,
7199N/A- const struct pam_message **messages,
7199N/A+ GDM_PAM_QUAL struct pam_message **messages,
7199N/A struct pam_response **responses,
7199N/A GdmSessionWorker *worker)
7199N/A {
7199N/A--
7199N/A2.7.4
7199N/A