*/
#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>
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
strerror(errno));
- else {
+ else
close(fd);
- }
#endif /* _CRAY */
}
int xpixel, int ypixel)
{
struct winsize w;
+
w.ws_row = row;
w.ws_col = col;
w.ws_xpixel = xpixel;
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));
}
}