diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-06-23 21:42:50 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-06-23 21:42:50 +0000 |
commit | 8ada5d0d0daabc238b86dab64066353937ff22e8 (patch) | |
tree | 87df61f2b81313af82f96fb81a3ab0c070485b98 /sshpty.c | |
parent | e23f4a3d28b8d788faca546e7b52e37aaad99c32 (diff) |
- deraadt@cvs.openbsd.org 2002/06/23 21:06:13
[sshpty.c]
KNF
Diffstat (limited to 'sshpty.c')
-rw-r--r-- | sshpty.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: sshpty.c,v 1.5 2002/06/23 03:30:58 deraadt Exp $"); | 15 | RCSID("$OpenBSD: sshpty.c,v 1.6 2002/06/23 21:06:13 deraadt Exp $"); |
16 | 16 | ||
17 | #ifdef HAVE_UTIL_H | 17 | #ifdef HAVE_UTIL_H |
18 | # include <util.h> | 18 | # include <util.h> |
@@ -343,9 +343,8 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
343 | if (fd < 0) | 343 | if (fd < 0) |
344 | error("open /dev/tty failed - could not set controlling tty: %.100s", | 344 | error("open /dev/tty failed - could not set controlling tty: %.100s", |
345 | strerror(errno)); | 345 | strerror(errno)); |
346 | else { | 346 | else |
347 | close(fd); | 347 | close(fd); |
348 | } | ||
349 | #endif /* _CRAY */ | 348 | #endif /* _CRAY */ |
350 | } | 349 | } |
351 | 350 | ||
@@ -356,6 +355,7 @@ pty_change_window_size(int ptyfd, int row, int col, | |||
356 | int xpixel, int ypixel) | 355 | int xpixel, int ypixel) |
357 | { | 356 | { |
358 | struct winsize w; | 357 | struct winsize w; |
358 | |||
359 | w.ws_row = row; | 359 | w.ws_row = row; |
360 | w.ws_col = col; | 360 | w.ws_col = col; |
361 | w.ws_xpixel = xpixel; | 361 | w.ws_xpixel = xpixel; |
@@ -393,7 +393,7 @@ pty_setowner(struct passwd *pw, const char *ttyname) | |||
393 | if (st.st_uid != pw->pw_uid || st.st_gid != gid) { | 393 | if (st.st_uid != pw->pw_uid || st.st_gid != gid) { |
394 | if (chown(ttyname, pw->pw_uid, gid) < 0) { | 394 | if (chown(ttyname, pw->pw_uid, gid) < 0) { |
395 | if (errno == EROFS && | 395 | if (errno == EROFS && |
396 | (st.st_uid == pw->pw_uid || st.st_uid == 0)) | 396 | (st.st_uid == pw->pw_uid || st.st_uid == 0)) |
397 | error("chown(%.100s, %u, %u) failed: %.100s", | 397 | error("chown(%.100s, %u, %u) failed: %.100s", |
398 | ttyname, pw->pw_uid, gid, | 398 | ttyname, pw->pw_uid, gid, |
399 | strerror(errno)); | 399 | strerror(errno)); |