]> andersk Git - openssh.git/commitdiff
- OpenBSD CVS Sync
authormouring <mouring>
Sun, 22 Jul 2001 20:36:57 +0000 (20:36 +0000)
committermouring <mouring>
Sun, 22 Jul 2001 20:36:57 +0000 (20:36 +0000)
   - markus@cvs.openbsd.org 2001/07/18 21:10:43
     [sshpty.c]
     pr #1946, allow sshd if /dev is readonly

ChangeLog
sshpty.c

index 08d5e9f91ae435274b3434d7194505602b9b095b..90bf9cbd5b0d8a8d26aef95ff90bbf157b07aeff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
         Added openbsd-compat/bsd-cray.c.  Rest will be merged after
         approval.  Selective patches from William L. Jones 
         <jones@mail.utexas.edu> 
+ - OpenBSD CVS Sync
+   - markus@cvs.openbsd.org 2001/07/18 21:10:43
+     [sshpty.c]
+     pr #1946, allow sshd if /dev is readonly
 
 20010719
  - (tim) [configure.in] put inet_aton back in AC_CHECK_FUNCS.
index 4083e249f2852907238b7ece94c52e2733edc465..6f97f38ed8da69b7c72bccb018df2837e16aab88 100644 (file)
--- a/sshpty.c
+++ b/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 $");
 
 #ifdef HAVE_UTIL_H
 # include <util.h>
@@ -321,7 +321,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));
This page took 0.058004 seconds and 5 git commands to generate.