]> andersk Git - openssh.git/blobdiff - auth-rsa.c
- Update to latest OpenBSD CVS:
[openssh.git] / auth-rsa.c
index 955532ce4442ee5e16b7dafa939e57c888180500..2dcfd749d824a73e50949ea26fed760f6adebe2b 100644 (file)
@@ -415,7 +415,22 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
                                                packet_send_debug("Your host '%.200s' is not permitted to use this key for login.",
                                                get_canonical_hostname());
                                                xfree(patterns);
+                                               /* key invalid for this host, reset flags */
                                                authenticated = 0;
+                                               no_agent_forwarding_flag = 0;
+                                               no_port_forwarding_flag = 0;
+                                               no_pty_flag = 0;
+                                               no_x11_forwarding_flag = 0;
+                                               while (custom_environment) {
+                                                       struct envstring *ce = custom_environment;
+                                                       custom_environment = ce->next;
+                                                       xfree(ce->s);
+                                                       xfree(ce);
+                                               }
+                                               if (forced_command) {
+                                                       xfree(forced_command);
+                                                       forced_command = NULL;
+                                               }
                                                break;
                                        }
                                        xfree(patterns);
This page took 0.139831 seconds and 4 git commands to generate.