[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Compiling Linux-PAM on Solaris



Alex Stewart wrote:
I'm looking to port the Linux-PAM package (or at least some portions of it) to
Solaris 8/10 (more specifically, port the modules so that they can work with Solaris
libpam) in order to be able to use a couple of the provided PAM modules on
some of our Solaris systems.

One thing to be wary of is that LinuxPAM and Solaris' PAM handle the conversation structs differently.

This means that if any of the modules return more than one conversation item and don't take the double-reference precaution mentioned in the link (I don't know if either is the case for the modules that ship with LinuxPAM) then there's a pretty good chance that your PAM apps will segfault.

http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/mwg-expected-by-module-item.html#mwg-pam_conv

[quote]
In passing, it is worth noting that there is a descrepency between the way Linux-PAM handles the const struct pam_message **msg conversation function argument from the way that Solaris' PAM (and derivitives, known to include HP/UX, are there others?) does. Linux-PAM interprets the msg argument as entirely equivalent to the following prototype const struct pam_message *msg[] (which, in spirit, is consistent with the commonly used prototypes for argv argument to the familiar main() function: char **argv; and char *argv[]). Said another way Linux-PAM interprets the msg argument as a pointer to an array of num_meg read only 'struct pam_message' pointers. Solaris' PAM implementation interprets this argument as a pointer to a pointer to an array of num_meg pam_message structures.
[/quote]

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]