[PATCH] openssh-3.5p1: restore SIGTTOU in readpassphrase()

Buck Huppmann buckh at pobox.com
Wed Feb 5 01:54:23 EST 2003


this line seemed to have been dropped somewhere b/w 3.1 and 3.5

--- openssh-3.5p1/openbsd-compat/readpassphrase.c.orig  Tue Sep 10
20:29:13 2002
+++ openssh-3.5p1/openbsd-compat/readpassphrase.c       Tue Feb  4
08:30:06 2003
@@ -152,6 +152,7 @@
        (void)sigaction(SIGTERM, &saveterm, NULL);
        (void)sigaction(SIGTSTP, &savetstp, NULL);
        (void)sigaction(SIGTTIN, &savettin, NULL);
+       (void)sigaction(SIGTTOU, &savettou, NULL);
        if (input != STDIN_FILENO)
                (void)close(input);
 

believe it or not, on Solaris 2.6 to 9 when running the csh, ssh
never gets a SIGTTIN in readpassphrase() if it's in the background,
so it needs to restore the SIGTTOU handler before it resends itself
SIGTTOU in order to protect a user from himself if he does this:

	% ssh foo at bar blurfl &
	[1] 27315
	% Password: 
	Password: 
	Password: 
	Password: 
	Password: 
	Password: 
	Password: 
	Password: 
	Password: 
	Password: 

that's assuming it somehow manages to buy a SIGTTOU, which it does
in our case. (i have no idea how, since i can't see that TOSTOP is
set, no how)




More information about the openssh-unix-dev mailing list