[Checkins] SVN: cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py Do not spew tracebacks to auth.log when config file is incomplete.

Marius Gedminas cvs-admin at zope.org
Mon Oct 8 12:20:42 UTC 2012


Log message for revision 127932:
  Do not spew tracebacks to auth.log when config file is incomplete.

Changed:
  U   cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py

-=-
Modified: cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py	2012-10-08 12:20:30 UTC (rev 127931)
+++ cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py	2012-10-08 12:20:39 UTC (rev 127932)
@@ -183,7 +183,13 @@
         LOG.debug('Start authentication via Google PAM: %s, %s',
                   self.flags, self.argv)
 
-        # 0. We do not authenticate exlcuded users.
+        if (not self.config.has_option(SECTION_NAME, 'domain') or
+            not self.config.has_option(SECTION_NAME, 'admin-username') or
+            not self.config.has_option(SECTION_NAME, 'admin-password')):
+                LOG.info('Google PAM not configured')
+                return self.pamh.PAM_IGNORE
+
+        # 0. We do not authenticate excluded users.
         if self.config.has_option(SECTION_NAME, 'excludes'):
             excluded = [
                 user.strip()



More information about the checkins mailing list