[BACK]Return to sshpty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshpty.c between version 1.1.4.2 and 1.1.4.3

version 1.1.4.2, 2001/05/07 21:09:38 version 1.1.4.3, 2001/09/27 00:15:43
Line 264 
Line 264 
   
         /*          /*
          * Change owner and mode of the tty as required.           * Change owner and mode of the tty as required.
          * Warn but continue if filesystem is read-only and the uids match.           * Warn but continue if filesystem is read-only and the uids match/
            * tty is owned by root.
          */           */
         if (stat(ttyname, &st))          if (stat(ttyname, &st))
                 fatal("stat(%.100s) failed: %.100s", ttyname,                  fatal("stat(%.100s) failed: %.100s", ttyname,
Line 272 
Line 273 
   
         if (st.st_uid != pw->pw_uid || st.st_gid != gid) {          if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
                 if (chown(ttyname, pw->pw_uid, gid) < 0) {                  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",                                  error("chown(%.100s, %d, %d) failed: %.100s",
                                       ttyname, pw->pw_uid, gid,                                        ttyname, pw->pw_uid, gid,
                                       strerror(errno));                                        strerror(errno));

Legend:
Removed from v.1.1.4.2  
changed lines
  Added in v.1.1.4.3