Debian Bug report logs - #153984
dialog: abuse of stderr for return values a fundamental misdesign

version graph

Package: dialog; Maintainer for dialog is Santiago Vila <sanvila@debian.org>; Source for dialog is src:dialog.

Reported by: Joey Hess <joeyh@debian.org>

Date: Sat, 20 Jul 2002 02:03:02 UTC

Severity: normal

Tags: upstream

Fixed in version dialog/0.9b-20020814-1

Done: Santiago Vila <sanvila@debian.org>

Bug is archived. No further changes may be made.

Forwarded to Thomas Dickey <dickey@invisible-island.net>

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <ezanard@debian.org>, Santiago Vila <sanvila@debian.org>, newt@packages.qa.debian.org, dialog@packages.qa.debian.org:
Bug#153628; Package whiptail, dialog. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
New Bug report received and forwarded. Copy sent to Enrique Zanardi <ezanard@debian.org>, Santiago Vila <sanvila@debian.org>, newt@packages.qa.debian.org, dialog@packages.qa.debian.org. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: whiptail: abuse of stderr for return values a fundamental misdesign
Date: Fri, 19 Jul 2002 22:03:53 -0400
Package: whiptail, dialog
Version: 0.50.17-9.5
Severity: normal

whiptail and dialog pervert stderr as a channel to use to output the
string the user enters into an --inputbox. This is a fundamental
misdesign of the programs. It makes it, I have found, impossible to use
these programs robustly in a core system component (see debconf) which
runs in a myriad of diverse circumstances.

There are many ways that whiptail or dialog could fail, return a
standard exit code, and emit something to stderr that is not user input.
These include:

  * being run on a terminal that the underlying library does not support
    (TERM=dumb, or TERM=emacs, or TERM=unset or TERM=something weird),
    and the curses/slang library dies with a exit code that happens to
    match one of dialog's regular codes, after printing a long message
    to stderr
  * segfaulting

It's impossible for a program that runs whiptail or dialog to reliably
detect these types of failures, and this can result in it getting all
kinds of error messages where it expected user input. For example, see
bug #153122.

There are something like 252 other file descriptors that whiptail and
dialog could use to return a string to the calling program, other than
stderr. Use of a higher fd could be turned on with a switch, to preseve
backwards compatability. There are myriad other forms of unix IPC that
could be used instead, as well.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux silk 2.4.18 #1 Thu Jun 13 15:43:08 EDT 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages whiptail depends on:
ii  libc6                        2.2.5-4     GNU C Library: Shared libraries an
ii  libnewt0                     0.50.17-9.5 Not Erik's Windowing Toolkit - tex
ii  libpopt0                     1.6.2-7     lib for parsing cmdline parameters
ii  slang1                       1.4.4-7.2   The S-Lang programming library - r




Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <ezanard@debian.org>, Santiago Vila <sanvila@debian.org>, newt@packages.qa.debian.org, dialog@packages.qa.debian.org:
Bug#153628; Package whiptail, dialog. Full text and rfc822 format available.

Acknowledgement sent to Santiago Vila <sanvila@unex.es>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <ezanard@debian.org>, Santiago Vila <sanvila@debian.org>, newt@packages.qa.debian.org, dialog@packages.qa.debian.org. Full text and rfc822 format available.

Message #10 received at 153628@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Joey Hess <joeyh@debian.org>, <153628@bugs.debian.org>, <control@bugs.debian.org>
Cc: Enrique Zanardi <newt@packages.qa.debian.org>, Snatiago Vila <dialog@packages.qa.debian.org>
Subject: Re: #153628: whiptail: abuse of stderr for return values a fundamental misdesign
Date: Tue, 23 Jul 2002 16:33:19 +0200 (CEST)
clone 153628 -1
reassign 153628 whiptail
reassign -1 dialog
retitle -1 dialog: abuse of stderr for return values a fundamental misdesign
thanks

Ok, #153628 will be the whiptail bug, and whatever results from the
clone command will be the dialog bug. I prefer it this way because
whiptail and dialog have different upstream maintainers.




Bug 153628 cloned as bug 153984. Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `whiptail, dialog' to `dialog'. Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. Full text and rfc822 format available.

Changed Bug title. Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Santiago Vila <sanvila@unex.es>:
You have marked Bug as forwarded. Full text and rfc822 format available.

Message #19 received at 153984-forwarded@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Thomas Dickey <dickey@invisible-island.net>
Cc: 153984-forwarded@bugs.debian.org, Joey Hess <joeyh@debian.org>
Subject: Bug#153984: dialog: abuse of stderr for return values a fundamental misdesign (fwd)
Date: Tue, 23 Jul 2002 17:10:55 +0200 (CEST)
Hello.

I've received the following bug report from Joey Hess, debconf maintainer:

---------- Begin bug report -----------

whiptail and dialog pervert stderr as a channel to use to output the
string the user enters into an --inputbox. This is a fundamental
misdesign of the programs. It makes it, I have found, impossible to use
these programs robustly in a core system component (see debconf) which
runs in a myriad of diverse circumstances.

There are many ways that whiptail or dialog could fail, return a
standard exit code, and emit something to stderr that is not user input.
These include:

  * being run on a terminal that the underlying library does not support
    (TERM=dumb, or TERM=emacs, or TERM=unset or TERM=something weird),
    and the curses/slang library dies with a exit code that happens to
    match one of dialog's regular codes, after printing a long message
    to stderr
  * segfaulting

It's impossible for a program that runs whiptail or dialog to reliably
detect these types of failures, and this can result in it getting all
kinds of error messages where it expected user input. For example, see
bug #153122.

There are something like 252 other file descriptors that whiptail and
dialog could use to return a string to the calling program, other than
stderr. Use of a higher fd could be turned on with a switch, to preseve
backwards compatability. There are myriad other forms of unix IPC that
could be used instead, as well.




Message #20 received at 153984-forwarded@bugs.debian.org (full text, mbox):

From: "Thomas E. Dickey" <dickey@herndon4.his.com>
To: Santiago Vila <sanvila@unex.es>
Cc: Thomas Dickey <dickey@invisible-island.net>, <153984-forwarded@bugs.debian.org>, Joey Hess <joeyh@debian.org>
Subject: Re: Bug#153984: dialog: abuse of stderr for return values a fundamental misdesign (fwd)
Date: Tue, 23 Jul 2002 12:05:24 -0400 (EDT)
On Tue, 23 Jul 2002, Santiago Vila wrote:

He could use --stdout (but I'm told there are problems with that for some
getty variations).  It's possible to add an option using dup2 to get a
particular file-descriptor...

> Hello.
>
> I've received the following bug report from Joey Hess, debconf maintainer:
>
> ---------- Begin bug report -----------
>
> whiptail and dialog pervert stderr as a channel to use to output the
> string the user enters into an --inputbox. This is a fundamental
> misdesign of the programs. It makes it, I have found, impossible to use
> these programs robustly in a core system component (see debconf) which
> runs in a myriad of diverse circumstances.
>
> There are many ways that whiptail or dialog could fail, return a
> standard exit code, and emit something to stderr that is not user input.
> These include:
>
>   * being run on a terminal that the underlying library does not support
>     (TERM=dumb, or TERM=emacs, or TERM=unset or TERM=something weird),
>     and the curses/slang library dies with a exit code that happens to
>     match one of dialog's regular codes, after printing a long message
>     to stderr
>   * segfaulting
>
> It's impossible for a program that runs whiptail or dialog to reliably
> detect these types of failures, and this can result in it getting all
> kinds of error messages where it expected user input. For example, see
> bug #153122.
>
> There are something like 252 other file descriptors that whiptail and
> dialog could use to return a string to the calling program, other than
> stderr. Use of a higher fd could be turned on with a switch, to preseve
> backwards compatability. There are myriad other forms of unix IPC that
> could be used instead, as well.
>
>

-- 
T.E.Dickey <dickey@herndon4.his.com>
http://invisible-island.net
ftp://invisible-island.net




Tags added: upstream Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Joey Hess <joeyh@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #27 received at 153984-close@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@debian.org>
To: 153984-close@bugs.debian.org
Subject: Bug#153984: fixed in dialog 0.9b-20020814-1
Date: Sun, 29 Sep 2002 09:17:10 -0400
We believe that the bug you reported is fixed in the latest version of
dialog, which is due to be installed in the Debian FTP archive:

dialog_0.9b-20020814-1.diff.gz
  to pool/main/d/dialog/dialog_0.9b-20020814-1.diff.gz
dialog_0.9b-20020814-1.dsc
  to pool/main/d/dialog/dialog_0.9b-20020814-1.dsc
dialog_0.9b-20020814-1_i386.deb
  to pool/main/d/dialog/dialog_0.9b-20020814-1_i386.deb
dialog_0.9b-20020814.orig.tar.gz
  to pool/main/d/dialog/dialog_0.9b-20020814.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 153984@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated dialog package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 29 Sep 2002 14:46:18 +0200
Source: dialog
Binary: dialog
Architecture: source i386
Version: 0.9b-20020814-1
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanvila@debian.org>
Changed-By: Santiago Vila <sanvila@debian.org>
Description: 
 dialog     - Displays user-friendly dialog boxes from shell scripts
Closes: 153984
Changes: 
 dialog (0.9b-20020814-1) unstable; urgency=low
 .
   * New upstream release, there is --output-fd now (Closes: #153984).
     See inputbox4 and inputbox5 in /usr/share/doc/dialog/examples.
   * Standards-Version: 3.5.7.
Files: 
 856f26fcf8fdf28af68c99585bdda537 628 misc optional dialog_0.9b-20020814-1.dsc
 4dc6753c7d5cda88714409737f605435 204959 misc optional dialog_0.9b-20020814.orig.tar.gz
 36d5dff8a66517e82c47f8f454a9b41b 5768 misc optional dialog_0.9b-20020814-1.diff.gz
 4dccdf50039d8169de97b5a138acbfd3 109224 misc optional dialog_0.9b-20020814-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9lvbhd9Uuvj7yPNYRApxoAKCHXWPDYlKM0XcjsP74Zshef7BIcQCfadWK
CWINEvl64EkdRPwV/6/pOMM=
=4BKF
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 08:36:40 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.