  /* check whether given key is in .ssh/authorized_keys* */
  int
  user_key_allowed(struct passwd *pw, Key *key)
-@@ -268,6 +354,15 @@ user_key_allowed(struct passwd *pw, Key *key)
+@@ -268,6 +359,15 @@ user_key_allowed(struct passwd *pw, Key *key)
  	file = authorized_keys_file2(pw);
  	success = user_key_allowed2(pw, key, file);
  	xfree(file);

+	default:
+		debug3("user_key_found_by_script: script pid %d", pid);
+
+		close(pipe_out[1]);
+
+		if (waitpid(pid, &exit_code, 0) < 0) {
+			error("waitpid(): %s", strerror(errno));
+		}
+		else if (WIFEXITED(exit_code) && WEXITSTATUS(exit_code) == 0) {
+			int amt_read = read(pipe_out[0], line, sizeof(line) - 1);
+			line[amt_read] = ' ';
+			line[amt_read + 1] = 0;

+{
+	pid_t pid;
+	char line[SSH_MAX_PUBKEY_BYTES];
+	int pipe_in[2];
+	int pipe_out[2];
+	int exit_code = 1;
+	int success = 0;
+	FILE *f;
+	//mysig_t oldsig;
+
+	pipe(pipe_in);
+	pipe(pipe_out);
+
+	//oldsig = signal(SIGCHLD, SIG_IGN);
+	temporarily_use_uid(pw);
+
+	debug3("user_key_found_by_script: executing %s", file);
