diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-07-18 21:10:44 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-07-18 21:10:44 +0000 |
commit | d48c49c913f673e76b8a0292de805cf40daab69f (patch) | |
tree | 24e0b5197e765ce2f6a46d50a58a5745e506ade5 /usr.bin/ssh | |
parent | 266d36032c6d26661a6be7c5e14a29120c215814 (diff) |
pr #1946, allow sshd if /dev is readonly
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshpty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshpty.c b/usr.bin/ssh/sshpty.c index d0f255436ed..bfd6653d334 100644 --- a/usr.bin/ssh/sshpty.c +++ b/usr.bin/ssh/sshpty.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshpty.c,v 1.1 2001/03/04 01:46:30 djm Exp $"); +RCSID("$OpenBSD: sshpty.c,v 1.2 2001/07/18 21:10:43 markus Exp $"); #include <util.h> #include "sshpty.h" @@ -272,7 +272,8 @@ pty_setowner(struct passwd *pw, const char *ttyname) if (st.st_uid != pw->pw_uid || st.st_gid != gid) { if (chown(ttyname, pw->pw_uid, gid) < 0) { - if (errno == EROFS && st.st_uid == pw->pw_uid) + if (errno == EROFS && + (st.st_uid == pw->pw_uid || st.st_uid == 0)) error("chown(%.100s, %d, %d) failed: %.100s", ttyname, pw->pw_uid, gid, strerror(errno)); |