redundant warning about absent tty
Christian Kurz
shorty at getuid.de
Sun Jan 14 08:28:54 EST 2001
> If ssh is invoked without a tty on stdin, it emits a warning message.
> This is fine, except it *still* emits such a warning message if you
> specify -q (which is supposed to supress warning messages) or -T
> (which explicitly requests that no tty be used on the remote side -
> making it academic whether there is a tty on the local side.)
> The patch below fixes this.
diff -x *~ -ruN openssh-2.3.0p1.deborig/debian/changelog openssh-2.3.0p1/debian/changelog
--- openssh-2.3.0p1.deborig/debian/changelog Sat Jan 13 13:06:14 2001
+++ openssh-2.3.0p1/debian/changelog Sat Jan 13 19:04:09 2001
@@ -1,3 +1,9 @@
+openssh (1:2.3.0p1-1.5.rjk1) unstable; urgency=low
+
+ * Eliminate bogus tty warning messages
+
+ -- Richard Kettlewell <rjk at greenend.org.uk> Sat, 13 Jan 2001 18:53:27 +0000
+
openssh (1:2.3.0p1-1.5) unstable; urgency=high
* Fixed now also the problem with sshd used as default ipv4 and
@@ -448,5 +454,4 @@
Local variables:
mode: debian-changelog
-add-log-mailing-address: "phil at hands.com"
End:
diff -x *~ -ruN openssh-2.3.0p1.deborig/ssh.c openssh-2.3.0p1/ssh.c
--- openssh-2.3.0p1.deborig/ssh.c Sat Oct 28 04:19:58 2000
+++ openssh-2.3.0p1/ssh.c Sat Jan 13 18:57:53 2001
@@ -517,15 +517,16 @@
if (buffer_len(&command) == 0)
tty_flag = 1;
+ /* force */
+ if (no_tty_flag)
+ tty_flag = 0;
/* Do not allocate a tty if stdin is not a tty. */
if (!isatty(fileno(stdin))) {
- if (tty_flag)
+ if (tty_flag
+ && options.log_level > SYSLOG_LEVEL_QUIET)
fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n");
tty_flag = 0;
}
- /* force */
- if (no_tty_flag)
- tty_flag = 0;
/* Get user data. */
pw = getpwuid(original_real_uid);
Do you really think that such a patch should be applied to openssh or
not? I think about not applying but rejecting it since this is a change
of behaviour is not very good. Please let me know your opinion. Thanks.
Ciao
Christian
--
Debian Developer and Quality Assurance Team Member
1024/26CC7853 31E6 A8CA 68FC 284F 7D16 63EC A9E6 67FF 26CC 7853
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 242 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010113/1e9a2829/attachment.bin
More information about the openssh-unix-dev
mailing list