]> andersk Git - gssapi-openssh.git/blobdiff - openssh/sshpty.c
Import of OpenSSH 3.4p1
[gssapi-openssh.git] / openssh / sshpty.c
index a7e7e27693bb856c0849cdfeee6c2a5e1e42f2d1..64ac4e5994fa8d636431b88d043c561217c9030f 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshpty.c,v 1.4 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: sshpty.c,v 1.7 2002/06/24 17:57:20 deraadt Exp $");
 
 #ifdef HAVE_UTIL_H
 # include <util.h>
@@ -343,9 +343,8 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
        if (fd < 0)
                error("open /dev/tty failed - could not set controlling tty: %.100s",
                    strerror(errno));
-       else {
+       else 
                close(fd);
-       }
 #endif /* _CRAY */
 }
 
@@ -356,6 +355,7 @@ pty_change_window_size(int ptyfd, int row, int col,
        int xpixel, int ypixel)
 {
        struct winsize w;
+
        w.ws_row = row;
        w.ws_col = col;
        w.ws_xpixel = xpixel;
@@ -393,13 +393,13 @@ 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 || st.st_uid == 0))
-                               error("chown(%.100s, %d, %d) failed: %.100s",
-                                   ttyname, pw->pw_uid, gid,
+                           (st.st_uid == pw->pw_uid || st.st_uid == 0))
+                               error("chown(%.100s, %u, %u) failed: %.100s",
+                                   ttyname, (u_int)pw->pw_uid, (u_int)gid,
                                    strerror(errno));
                        else
-                               fatal("chown(%.100s, %d, %d) failed: %.100s",
-                                   ttyname, pw->pw_uid, gid,
+                               fatal("chown(%.100s, %u, %u) failed: %.100s",
+                                   ttyname, (u_int)pw->pw_uid, (u_int)gid,
                                    strerror(errno));
                }
        }
This page took 0.089391 seconds and 4 git commands to generate.