Linux/Solaris PAM incompatabilities

Brian Parent bparent at calvin.ucsd.edu
Sat Nov 20 10:30:50 EST 2004


I'm having trouble compiling openssh 3.9p1 on Linux.

The problem appears to be the difference in the way the pam_get_item
function is declared on Linux vs. Solaris.

on Linux: 2.4.21-20.ELsmp in /usr/include/security/_pam_types.h:

	extern int pam_get_item(const pam_handle_t *pamh, int item_type,
				const void **item);

on Solaris 8 in /usr/include/security/pam_appl.h:

	extern int
	pam_get_item(
		const pam_handle_t *pamh,       /* PAM handle */
		int item_type,                  /* Type of object - see below */
		void ** item                    /* Address of place to put pointer */
						/*   to object */
	);


This is how a call looks in auth-pam.c in 3.9p1:

	pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user);

Solaris compiles fine, Linux is unhappy.

In auth-pam.c in 3.8.1p1, the call looks like:

	pam_get_item(sshpam_handle, PAM_USER, (const void **)&pam_user);

which makes Linux happy, but Solaris won't compile.

I can go through the code and doctor it with ifdefs but I figured this
may have already been dealt with in a clean way by the developers.
Or maybe I'm missing a config flag (though I've looked).




More information about the openssh-unix-dev mailing list