- switch (si->unlock_state)
- {
- case ul_fail:
- fprintf (stderr, "%s: auth/input incorrect!%s\n", blurb(),
- (caps_p ? " (CapsLock)" : ""));
- break;
- case ul_cancel:
- fprintf (stderr, "%s: input cancelled.\n", blurb()); break;
- case ul_time:
- fprintf (stderr, "%s: input timed out.\n", blurb()); break;
- case ul_finished:
- fprintf (stderr, "%s: input finished.\n", blurb()); break;
- default: break;
- }
-
-#ifdef HAVE_SYSLOG
- if (si->unlock_state == ul_fail)
- {
- /* If they typed a password (as opposed to just hitting return) and
- the password was invalid, log it.
- */
- struct passwd *pw = getpwuid (getuid ());
- char *d = DisplayString (si->dpy);
- char *u = (pw && pw->pw_name ? pw->pw_name : "???");
- int opt = 0;
- int fac = 0;
-
-# ifdef LOG_PID
- opt = LOG_PID;
-# endif
-
-# if defined(LOG_AUTHPRIV)
- fac = LOG_AUTHPRIV;
-# elif defined(LOG_AUTH)
- fac = LOG_AUTH;
-# else
- fac = LOG_DAEMON;
-# endif
-
- if (!d) d = "";
- openlog (progname, opt, fac);
- syslog (LOG_NOTICE, "FAILED LOGIN %d ON DISPLAY \"%s\", FOR \"%s\"",
- si->unlock_failures, d, u);
- closelog ();
- }
-#endif /* HAVE_SYSLOG */
-
- if (si->unlock_state == ul_fail)
- XBell (si->dpy, False);
-
- if (si->unlock_state == ul_success && si->unlock_failures != 0)
- {
- if (si->unlock_failures == 1)
- fprintf (real_stderr,
- "%s: WARNING: 1 failed attempt to unlock the screen.\n",
- blurb());
- else
- fprintf (real_stderr,
- "%s: WARNING: %d failed attempts to unlock the screen.\n",
- blurb(), si->unlock_failures);
- fflush (real_stderr);
-
- si->unlock_failures = 0;
+ switch (si->unlock_state) {
+ case ul_cancel:
+ fprintf (stderr, "%s: input cancelled.\n", blurb()); break;
+ case ul_time:
+ fprintf (stderr, "%s: input timed out.\n", blurb()); break;
+ case ul_finished:
+ fprintf (stderr, "%s: input finished.\n", blurb()); break;
+ default: break;