diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2010-03-16 16:33:48 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2010-03-16 16:59:26 -0700 |
commit | 34b9c0e02bc2d36da2c8c5ee468b2a2d63914610 (patch) | |
tree | adcc96a0d4afed4b3f2632c9b79b7b95b8fbc4b3 | |
parent | afc752d1c483e77de9aa3cb9532a67d95fd27dd9 (diff) |
Reject PAM conversation calls after login dialog is closed
Based on patch suggested by Bjoern A. Zeeb <bzeeb+patch@zabbadoz.net>
to fix http://bugs.freedesktop.org/show_bug.cgi?id=10522
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r-- | greeter/greet.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/greeter/greet.c b/greeter/greet.c index 1afe2f1..778c525 100644 --- a/greeter/greet.c +++ b/greeter/greet.c @@ -342,6 +342,8 @@ CloseGreet (struct display *d) XSetAccessControl (dpy, DisableAccess); } XtDestroyWidget (toplevel); + toplevel = NULL; + login = NULL; /* child of toplevel, which we just destroyed */ ClearCloseOnFork (XConnectionNumber (dpy)); XCloseDisplay (dpy); Debug ("Greet connection closed\n"); @@ -707,6 +709,11 @@ static int pamconv(int num_msg, m = (struct pam_message *)*msg; r = *response; + if (login == NULL) { + status = PAM_CONV_ERR; + goto pam_error; + } + for (i = 0; i < num_msg; i++ , m++ , r++) { char *username; int promptId = 0; |