summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-23 21:42:50 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-23 21:42:50 +0000
commit8ada5d0d0daabc238b86dab64066353937ff22e8 (patch)
tree87df61f2b81313af82f96fb81a3ab0c070485b98 /sshpty.c
parente23f4a3d28b8d788faca546e7b52e37aaad99c32 (diff)
downloadopenssh-git-8ada5d0d0daabc238b86dab64066353937ff22e8.tar.gz
- deraadt@cvs.openbsd.org 2002/06/23 21:06:13
[sshpty.c] KNF
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sshpty.c b/sshpty.c
index ce64e7a0..89447fbd 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshpty.c,v 1.5 2002/06/23 03:30:58 deraadt Exp $");
+RCSID("$OpenBSD: sshpty.c,v 1.6 2002/06/23 21:06:13 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,7 +393,7 @@ 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))
+ (st.st_uid == pw->pw_uid || st.st_uid == 0))
error("chown(%.100s, %u, %u) failed: %.100s",
ttyname, pw->pw_uid, gid,
strerror(errno));