pam_get_data() can get data when using in SSHD

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

 



Hi all,

I met a problem when using the pam_set_data()/pam_get_data() to pass
data between PAM hooks. The two functions are ok when I tested my PAM
module with a simple PAM-aware application, in which data  (string
type) can be exchanged between different PAM hooks. However, when I
plug it in SSHD as a authentication module, the pam_get_data() said it
can not get data from a given name, which is used to set data by
pam_set_data().

I don't know what is wrong with PAM module. The simple PAM-aware
application written by me is just a process and one thread, whereas
SSHD  forked several threads. So I guessed maybe the difference
between them is that PAM module is loaded by different SSHD threads.
This makes pam_get_data() in one of thread can not get data from
pam_set_data() of another thread. For example, SSHD forked a thread1
to do authentication, which call the hook in PAM module, and set data
by pam_set_data().  Then another thread, thread2, forked by SSHD wants
to get  that data by pam_get_data() before opening session. Since they
owned different thread spaces, data can be passed from thread1 to
thread2.  I don't know whether my analysis is right. Maybe some one
can share his/her brain with me.

If above analysis is correct, what I can do to deal with it? Could
anybody give me some advices?


Thanks in advances.



Best Regards,

Iam

_______________________________________________
Pam-list mailing list
Pam-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux