Rewrite pam module in C
issue