I am working on a centOS 5.5 OS.
It shows error that /security/pam_appl.h and /security/misc.h file is missing.
Actually my rshd.c does not load
You need the rpm for pam-devel, available for CentOS here. Alternatively, you can download pam from here and install it locally.
Edit: To compile it, this works fine on my system:
wget http://linux-pam.org/library/Linux-PAM-1.1.6.tar.bz2
tar xvjf Linux-PAM-1.1.6.tar.bz2
cd Linux-PAM-1.1.6/
./configure --prefix=$HOME/local
make && make install
If it does not, please report the compiler errors.