Changelog since HylaFAX 4.2.3
+* fix a Solaris compile error due to PAM_CONV_AGAIN (15 Dec 2005)
* fix Solaris 9 compile error due to PAM (15 Dec 2005)
* all Mainpine boards no longer identified as the DUO+
2-port model (5 Dec 2005)
return PAM_CONV_ERR;
if (password == NULL)
- return PAM_CONV_AGAIN;
+ /*
+ * Solaris doesn't have PAM_CONV_AGAIN defined.
+ */
+ #ifdef PAM_CONV_AGAIN
+ return PAM_CONV_AGAIN;
+ #else
+ return PAM_CONV_ERR;
+ #endif
replies=(struct pam_response*)calloc(num_msg, sizeof(struct pam_response));
int pamret;
- pamret = pam_set_item(pamh, PAM_CONV, &conv);
+ /*
+ * Solaris has proprietary pam_[sg]et_item() extension.
+ * Sun defines PAM_MSG_VERSION therefore is possible to use
+ * it in order to recognize the extensions of Solaris
+ */
+ #ifdef PAM_MSG_VERSION
+ pamret = pam_set_item(pamh, PAM_CONV, (const void *)&conv);
+ #else
+ pamret = pam_set_item(pamh, PAM_CONV, &conv);
+ #endif
if (pamret == PAM_SUCCESS)
pamret = pam_authenticate(pamh, 0);
state |= S_PRIVILEGED;
char *newname=NULL;
-
- pamret = pam_get_item(pamh, PAM_USER, (const void **)&newname);
+
+ /*
+ * Solaris has proprietary pam_[sg]et_item() extension.
+ * Sun defines PAM_MSG_VERSION therefore is possible to use
+ * it in order to recognize the extensions of Solaris
+ */
+ #ifdef PAM_MSG_VERSION
+ pamret = pam_get_item(pamh, PAM_USER, (void **)&newname);
+ #else
+ pamret = pam_get_item(pamh, PAM_USER, (const void **)&newname);
+ #endif
if (pamret == PAM_SUCCESS && newname != NULL)
the_user = strdup(newname);