summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authordjm <djm>2001-12-21 03:45:46 +0000
committerdjm <djm>2001-12-21 03:45:46 +0000
commitabd462aa49be81ecf4729790ff6a91a81e501a6f (patch)
treed7c956c31c02dae8baeecf14d2ab4a3a9b1fe921 /sshpty.c
parent15ef3fc274faa1d459ec08e4d1d373129499bff9 (diff)
downloadopenssh-abd462aa49be81ecf4729790ff6a91a81e501a6f.tar.gz
- deraadt@cvs.openbsd.org 2001/12/19 07:18:56
[auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h] [auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c] [cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c] [match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c] [servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c] [sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c] [sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config] [ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c] basic KNF done while i was looking for something else
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sshpty.c b/sshpty.c
index e1e60314..71c48b57 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshpty.c,v 1.3 2001/07/22 21:32:27 markus Exp $");
+RCSID("$OpenBSD: sshpty.c,v 1.4 2001/12/19 07:18:56 deraadt Exp $");
#ifdef HAVE_UTIL_H
# include <util.h>
@@ -156,7 +156,7 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
*ttyfd = open(name, O_RDWR | O_NOCTTY);
if (*ttyfd < 0) {
error("Could not open pty slave side %.100s: %.100s",
- name, strerror(errno));
+ name, strerror(errno));
close(*ptyfd);
return 0;
}
@@ -328,7 +328,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
fd = open(_PATH_TTY, O_WRONLY);
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
- strerror(errno));
+ strerror(errno));
else {
close(fd);
}
@@ -339,7 +339,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
void
pty_change_window_size(int ptyfd, int row, int col,
- int xpixel, int ypixel)
+ int xpixel, int ypixel)
{
struct winsize w;
w.ws_row = row;
@@ -378,15 +378,15 @@ 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 &&
+ 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,
- strerror(errno));
+ ttyname, pw->pw_uid, gid,
+ strerror(errno));
else
fatal("chown(%.100s, %d, %d) failed: %.100s",
- ttyname, pw->pw_uid, gid,
- strerror(errno));
+ ttyname, pw->pw_uid, gid,
+ strerror(errno));
}
}
@@ -395,10 +395,10 @@ pty_setowner(struct passwd *pw, const char *ttyname)
if (errno == EROFS &&
(st.st_mode & (S_IRGRP | S_IROTH)) == 0)
error("chmod(%.100s, 0%o) failed: %.100s",
- ttyname, mode, strerror(errno));
+ ttyname, mode, strerror(errno));
else
fatal("chmod(%.100s, 0%o) failed: %.100s",
- ttyname, mode, strerror(errno));
+ ttyname, mode, strerror(errno));
}
}
}