Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ssh back out the previous change. We really don'...



details:   https://anonhg.NetBSD.org/src/rev/09046ff80b7b
branches:  trunk
changeset: 538233:09046ff80b7b
user:      manu <manu%NetBSD.org@localhost>
date:      Tue Oct 15 15:33:04 2002 +0000

description:
back out the previous change. We really don't want to enable login on a
mode 666 tty.
In order to use sshd logins with a read-only /dev, the administrator has to
make the tty mode 600 root/wheel before the partition gets read-only.

diffstat:

 crypto/dist/ssh/sshpty.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r 9dbc34c532bc -r 09046ff80b7b crypto/dist/ssh/sshpty.c
--- a/crypto/dist/ssh/sshpty.c  Tue Oct 15 15:19:02 2002 +0000
+++ b/crypto/dist/ssh/sshpty.c  Tue Oct 15 15:33:04 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sshpty.c,v 1.7 2002/10/15 15:19:02 manu Exp $  */
+/*     $NetBSD: sshpty.c,v 1.8 2002/10/15 15:33:04 manu Exp $  */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -289,8 +289,7 @@
        if ((st.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO)) != mode) {
                if (chmod(ttyname, mode) < 0) {
                        if (errno == EROFS &&
-                           ((st.st_mode & (S_IRGRP | S_IROTH) == 0) ||
-                           st.st_uid == pw->pw_uid || st.st_uid == 0))
+                           (st.st_mode & (S_IRGRP | S_IROTH)) == 0)
                                error("chmod(%.100s, 0%o) failed: %.100s",
                                    ttyname, mode, strerror(errno));
                        else



Home | Main Index | Thread Index | Old Index