Sascha:
I don't believe GDM provides any sort of "failed login hook" that could be used generically. You could get this to work if you modified the source code to make it function the way you describe. To do this, I'd just change the function which is talking to PAM to add the hook. For example, in the gdm_verify_user function in daemon/verify-pam.c if using GDM 2.20 or earlier. Similar code is in GDM head in the daemon/gdm-session-worker.c file.Its a pitty. I'm going to test it. But generally I would like to avoid building my own gdm instead of using the gdm from my distribution.Would it make sense to send out an enhancement request for that?
You can file an enhancement request at bugzilla.gnome.org, and if you have a patch that implements your proposal that would make it easier to review and possibly get upstream. One issue to consider is that GDM 2.20 and earlier is a completely different codebase than later versions of GDM. So, probably make sense to get this working with the latest version of GDM if you want the change to go upstream. Brian