At some point, we may include a fully commented example of a module in this document. For now, we point the reader to these two locations in the public CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pam/Linux-PAM/modules/pam_permit/
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pam/Linux-PAM/modules/pam_deny/