pam_get_item() problems

Jason Gerfen jason.gerfen at scl.utah.edu
Wed Nov 17 16:06:14 UTC 2004


Could you show me an example of a proper conversion function?

Jason DiCioccio wrote:

>Greetings!
>
>On Wed, 17 Nov 2004 08:43:47 -0700, Jason Gerfen
><jason.gerfen at scl.utah.edu> wrote:
>  
>
>>I am looking for assistance using the pam_get_item() function.
>>According to the pam module writters guide on kernel.org I should use
>>pam_get_item() as the following:
>>
>>extern int pam_get_item( const pam_handle_t *pamh,
>>                                              int item_type,
>>                                              const void **item );
>>
>>As you can see in the code below it should retrieve the password entered
>>during login and store it in the const void **password variable.  But
>>what happens is it completely crashes the display manager.  I don't get
>>it, I have looked at other people's source (pam_krb5afs.c for example)
>>and they are calling the pam_get_item() function in much the same way
>>and yet it isn't crashing their display.  Am I missing something or over
>>looking a compile option perhaps?  Any help is greatly appreciated.
>>    
>>
>
>You need to use a conversation function first.  Take a look at some of
>the code you  were looking at before and look for where they call
>theri conversation functions.  You need to initiate a 'conversation'
>with the calling program in order to receive the auth token.  You then
>use pam_set_item to set PAM_AUTHTOK.
>
>I hope this made sense.  I ran into this same issue before and it was
>driving me nuts :)
>
>Regards,
>-JD-
>
>_______________________________________________
>Pam-list mailing list
>Pam-list at redhat.com
>https://www.redhat.com/mailman/listinfo/pam-list
>  
>


-- 
Jason Gerfen
Student Computing
Marriott Library
801.585.9810
jason.gerfen at scl.utah.edu

"And remember... If the ladies
 don't find you handsome, they
 should at least find you handy..."
             ~The Red Green show




More information about the Pam-list mailing list