diff options
| author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-02-14 11:58:47 +0000 |
|---|---|---|
| committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-03-05 19:45:24 +0000 |
| commit | 7d8deab2c421c563ab11a55e623ed48109e237af (patch) | |
| tree | a11aa2b64d9ba96cb20d117820f2c6aa0eaedca3 /usr/src/cmd/zlogin | |
| parent | 8950e535f42dd006f8cfb2122c94f6b7557757e0 (diff) | |
| download | illumos-joyent-7d8deab2c421c563ab11a55e623ed48109e237af.tar.gz | |
12306 XPG4v2 slave pty behaviour should generally be disabled
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/zlogin')
| -rw-r--r-- | usr/src/cmd/zlogin/zlogin.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/usr/src/cmd/zlogin/zlogin.c b/usr/src/cmd/zlogin/zlogin.c index dff46227f2..e942e66e71 100644 --- a/usr/src/cmd/zlogin/zlogin.c +++ b/usr/src/cmd/zlogin/zlogin.c @@ -24,7 +24,7 @@ * Copyright (c) 2014 Gary Mills * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2019 Joyent, Inc. - * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. */ /* @@ -115,8 +115,6 @@ static int pollerr = 0; static const char *pname; static char *username; -extern int __xpg4; /* 0 if not an xpg4/6-compiled program */ - /* * When forced_login is true, the user is not prompted * for an authentication password in the target zone. @@ -770,16 +768,8 @@ process_output(int in_fd, int out_fd) cc = read(in_fd, ibuf, ZLOGIN_BUFSIZ); if (cc == -1 && (errno != EINTR || dead)) return (-1); - if (cc == 0) { - /* - * A return value of 0 when calling read() on a terminal - * indicates end-of-file pre-XPG4 and no data available - * for XPG4 and above. - */ - if (__xpg4 == 0) - return (-1); - return (0); - } + if (cc == 0) + return (-1); /* EOF */ if (cc == -1) /* The read was interrupted. */ return (0); |
