/usr/share/doc/pam-devel/html
NameSizeModeActions
adg-author.html30980644editdlrm
adg-copyright.html36240644editdlrm
adg-example.html36760644editdlrm
adg-files.html22390644editdlrm
adg-glossary.html32860644editdlrm
adg-interface-by-app-expected.html624720644editdlrm
adg-interface-of-app-expected.html84570644editdlrm
adg-interface-programming-notes.html26140644editdlrm
adg-interface.html50190644editdlrm
adg-introduction-description.html33730644editdlrm
adg-introduction-synopsis.html26830644editdlrm
adg-introduction.html20640644editdlrm
adg-libpam-functions.html134490644editdlrm
adg-libpam_misc.html34210644editdlrm
adg-overview.html83570644editdlrm
adg-porting.html43060644editdlrm
adg-security-conv-function.html23460644editdlrm
adg-security-library-calls.html32030644editdlrm
adg-security-resources.html29030644editdlrm
adg-security-service-name.html45350644editdlrm
adg-security-user-identity.html55120644editdlrm
adg-security.html38240644editdlrm
adg-see-also.html22140644editdlrm
Linux-PAM_ADG.html86130644editdlrm
Linux-PAM_MWG.html88030644editdlrm
mwg-author.html30750644editdlrm
mwg-copyright.html36030644editdlrm
mwg-example.html20050644editdlrm
mwg-expected-by-module-item.html464570644editdlrm
mwg-expected-by-module-other.html83520644editdlrm
mwg-expected-by-module.html41170644editdlrm
mwg-expected-of-module-acct.html61870644editdlrm
mwg-expected-of-module-auth.html109680644editdlrm
mwg-expected-of-module-chauthtok.html79770644editdlrm
mwg-expected-of-module-overview.html64370644editdlrm
mwg-expected-of-module-session.html71260644editdlrm
mwg-expected-of-module.html43740644editdlrm
mwg-introduction-description.html39710644editdlrm
mwg-introduction-synopsis.html20280644editdlrm
mwg-introduction.html20320644editdlrm
mwg-see-also.html22310644editdlrm
mwg-see-options.html29960644editdlrm
mwg-see-programming-libs.html30150644editdlrm
mwg-see-programming-sec.html91410644editdlrm
mwg-see-programming-syslog.html47410644editdlrm
mwg-see-programming.html30780644editdlrm
Edit: /usr/share/doc/pam-devel/html/mwg-see-programming-syslog.html (4741B)
5.2. Use of syslog(3)

5.2. Use of syslog(3)

Only rarely should error information be directed to the user. Usually, this is to be limited to sorry you cannot login now type messages. Information concerning errors in the configuration file, /etc/pam.conf, or due to some system failure encountered by the module, should be written to syslog(3) with facility-type LOG_AUTHPRIV.

With a few exceptions, the level of logging is, at the discretion of the module developer. Here is the recommended usage of different logging levels:

  • As a general rule, errors encountered by a module should be logged at the LOG_ERR level. However, information regarding an unrecognized argument, passed to a module from an entry in the /etc/pam.conf file, is required to be logged at the LOG_ERR level.

  • Debugging information, as activated by the debug argument to the module in /etc/pam.conf, should be logged at the LOG_DEBUG level.

  • If a module discovers that its personal configuration file or some system file it uses for information is corrupted or somehow unusable, it should indicate this by logging messages at level, LOG_ALERT.

  • Shortages of system resources, such as a failure to manipulate a file or malloc() failures should be logged at level LOG_CRIT.

  • Authentication failures, associated with an incorrectly typed password should be logged at level, LOG_NOTICE.