This fixes a bug that allows others to write to remote users pseudo 
terminals. Looking at the revision 1.29 commit message and thread[2] 
that led to this bug I'm pretty sure that it wasn't intended to be this 
way.

[1] https://marc.info/?t=140913893700009&r=1&w=2

Index: sshpty.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sshpty.c,v
retrieving revision 1.29
diff -u -p -r1.29 sshpty.c
--- sshpty.c    3 Sep 2014 18:55:07 -0000       1.29
+++ sshpty.c    30 Jul 2015 10:31:30 -0000
@@ -142,7 +142,7 @@ pty_setowner(struct passwd *pw, const ch
        /* Determine the group to make the owner of the tty. */
        grp = getgrnam("tty");
        gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
-       mode = (grp != NULL) ? 0622 : 0600;
+       mode = (grp != NULL) ? 0620 : 0600;
 
        /*
         * Change owner and mode of the tty as required.

Reply via email to