Debian Bug report logs - #45961
adding password box support to whiptail

version graph

Package: whiptail; Maintainer for whiptail is Alastair McKinstry <mckinstry@debian.org>; Source for whiptail is src:newt.

Reported by: Joey Hess <joey@kitenet.net>

Date: Sat, 25 Sep 1999 07:18:07 UTC

Severity: normal

Fixed in version newt/0.50-1

Done: Enrique Zanardi <ezanard@debian.org>

Bug is archived. No further changes may be made.

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>:
Bug#45961; Package whiptail. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joey@kitenet.net>:
New Bug report received and forwarded. Copy sent to Enrique Zanardi <ezanard@debian.org>. Full text and rfc822 format available.

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

From: Joey Hess <joey@kitenet.net>
To: submit@bugs.debian.org
Subject: adding password box support to whiptail
Date: Sat, 25 Sep 1999 00:16:58 -0700
Package: whiptail
Version 0.30-1

For what I'm doing with debconf, it would be very useful if whiptail had an
option to prompt the user for a password, without echoing what they typed.
So, I added one. Here's the patch.


Only in newt-0.30: .depend
Only in newt-0.30: button.o
Only in newt-0.30: buttonbar.o
Only in newt-0.30: checkbox.o
diff -ur old/newt-0.30/dialogboxes.c newt-0.30/dialogboxes.c
--- old/newt-0.30/dialogboxes.c	Sat Sep 25 00:14:24 1999
+++ newt-0.30/dialogboxes.c	Sat Sep 25 00:12:15 1999
@@ -128,6 +128,7 @@
 int inputBox(char * text, int height, int width, poptContext optCon, 
 		int flags, char ** result) {
     newtComponent form, entry, okay, cancel, answer, tb;
+    int pFlag = (flags & FLAG_PASSWORD) ? NEWT_FLAG_HIDDEN : 0;
     char * val;
     int rc = DLG_OKAY;
     int top;
@@ -138,7 +139,7 @@
 
     form = newtForm(NULL, NULL, 0);
     entry = newtEntry(1, top + 1, val, width - 2, &val, 
-			NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT);
+			NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT | pFlag);
 
     newtFormAddComponents(form, tb, entry, NULL);
 
Only in newt-0.30: dialogboxes.c~
diff -ur old/newt-0.30/dialogboxes.h newt-0.30/dialogboxes.h
--- old/newt-0.30/dialogboxes.h	Sat Jan  3 15:00:28 1998
+++ newt-0.30/dialogboxes.h	Sat Sep 25 00:15:01 1999
@@ -11,6 +11,7 @@
 #define FLAG_NOCANCEL 		(1 << 1)
 #define FLAG_SCROLL_TEXT 	(1 << 2)
 #define FLAG_DEFAULT_NO 	(1 << 3)
+#define FLAG_PASSWORD		(1 << 4)
 
 #define DLG_ERROR		-1
 #define DLG_OKAY		0
Only in newt-0.30: dialogboxes.h~
Only in newt-0.30: dialogboxes.o
Only in newt-0.30: entry.o
Only in newt-0.30: form.o
Only in newt-0.30: grid.o
Only in newt-0.30: label.o
Only in newt-0.30: libnewt.a
Only in newt-0.30: libnewt.so.0.30
Only in newt-0.30: listbox.o
Only in newt-0.30: newt.o
Only in newt-0.30: scale.o
Only in newt-0.30: scrollbar.o
Only in newt-0.30: shared
Only in newt-0.30: test.o
Only in newt-0.30: testgrid
Only in newt-0.30: testgrid.o
Only in newt-0.30: testing
Only in newt-0.30: textbox.o
Only in newt-0.30: whiptail
diff -ur old/newt-0.30/whiptail.1 newt-0.30/whiptail.1
--- old/newt-0.30/whiptail.1	Sat Sep 25 00:14:24 1999
+++ newt-0.30/whiptail.1	Sat Sep 25 00:13:45 1999
@@ -40,7 +40,8 @@
 .LP
 .BR yes/no " box," " menu" " box," " input" " box,"
 .BR message " box," " text" " box," " info" " box,"
-.BR checklist " box," " radiolist" " box, and" " gauge" " box."
+.BR checklist " box," " radiolist" " box" " gauge" " box, and"
+.BR password " box."
 .SH OPTIONS
 .TP
 .B \-\-clear
@@ -142,6 +143,14 @@
 can be fitted in the dialog box, the input field will be scrolled. On exit,
 the input string will be printed on
 .IR stderr "."
+.TP
+.BI \-\-passwordbox " text height width [init]"
+.RB "A " password " box is similar to an input box, except the text the user"
+enters is not displayed. This is useful when prompting for passwords or other
+sensative information. Be aware that if anything is passed in "init", it
+will be visible in the system's process table to casual snoopers. Also, it
+is very confusing to the user to provide them with a default password they
+cannot see. For these reasons, using "init" is highly discouraged.
 .TP
 .BI \-\-textbox " file height width"
 .RB A " text" " box lets you display the contents of a text file in a"
Only in newt-0.30: whiptail.1~
diff -ur old/newt-0.30/whiptail.c newt-0.30/whiptail.c
--- old/newt-0.30/whiptail.c	Sat Sep 25 00:14:24 1999
+++ newt-0.30/whiptail.c	Fri Sep 24 23:50:35 1999
@@ -14,7 +14,8 @@
 #include "newt.h"
 
 enum mode { MODE_NONE, MODE_INFOBOX, MODE_MSGBOX, MODE_YESNO, MODE_CHECKLIST,
-		MODE_INPUTBOX, MODE_RADIOLIST, MODE_MENU, MODE_GAUGE, MODE_TEXTBOX };
+		MODE_INPUTBOX, MODE_RADIOLIST, MODE_MENU, MODE_GAUGE,
+  	        MODE_TEXTBOX, MODE_PASSWORDBOX};
 
 #define OPT_MSGBOX 		1000
 #define OPT_CHECKLIST 		1001
@@ -26,6 +27,7 @@
 #define OPT_GAUGE	 	1007
 #define OPT_INFOBOX	 	1008
 #define OPT_TEXTBOX	    1009
+#define OPT_PASSWORDBOX		1010
 
 static void usage(void) {
     fprintf(stderr, "whiptail: bad parametrs (see man whiptail(1) for details)\n");
@@ -291,6 +293,7 @@
 	    { "textbox", '\0', 0, 0, OPT_TEXTBOX },
 	    { "title", '\0', POPT_ARG_STRING, &title, 0 },
 	    { "yesno", '\0', 0, 0, OPT_YESNO },
+      	    { "passwordbox", '\0', 0, 0, OPT_PASSWORDBOX },
 	    { 0, 0, 0, 0, 0 } 
     };
     
@@ -320,6 +323,11 @@
 	    mode = MODE_TEXTBOX;
 	    break;
 
+	  case OPT_PASSWORDBOX:
+	    if (mode != MODE_NONE) usage();
+	    mode = MODE_PASSWORDBOX;
+	    break;
+	  
 	  case OPT_RADIOLIST:
 	    if (mode != MODE_NONE) usage();
 	    mode = MODE_RADIOLIST;
@@ -360,7 +368,7 @@
     }
 
     if (mode == MODE_NONE) usage();
-
+    
     if (!(text = poptGetArg(optCon))) usage();
 
     if ( mode == MODE_TEXTBOX )
@@ -418,6 +426,12 @@
 	if (!rc) fprintf(stderr, "%s", result);
 	break;
 
+      case MODE_PASSWORDBOX:
+        rc = inputBox(text, height, width, optCon, flags | FLAG_PASSWORD,
+		      &result);
+      	if (!rc) fprintf(stderr, "%s", result);
+      	break;
+      
       case MODE_MENU:
 	rc = listBox(text, height, width, optCon, flags, &result);
 	if (!rc) fprintf(stderr, "%s", result);
Only in newt-0.30: whiptail.c~
Only in newt-0.30: whiptail.o
Only in newt-0.30: whiptcl.o
Only in newt-0.30: whiptcl.so
Only in newt-0.30: windows.o


Reply sent to Enrique Zanardi <ezanard@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Joey Hess <joey@kitenet.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

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

From: Enrique Zanardi <ezanard@debian.org>
To: 45961-close@bugs.debian.org
Subject: Bug#45961: fixed in newt 0.50-1
Date: 15 Oct 1999 18:59:50 -0000
We believe that the bug you reported is fixed in the latest version of
newt, which has been installed in the Debian FTP archive:
newt-tcl_0.50-1_i386.deb
  to dists/potato/main/binary-i386/interpreters/newt-tcl_0.50-1.deb
libnewt-dev_0.50-1_i386.deb
  to dists/potato/main/binary-i386/devel/libnewt-dev_0.50-1.deb
newt_0.50.orig.tar.gz
  to dists/potato/main/source/devel/newt_0.50.orig.tar.gz
  replacing newt_0.30.orig.tar.gz
whiptail_0.50-1_i386.deb
  to dists/potato/main/binary-i386/base/whiptail_0.50-1.deb
  replacing whiptail_0.30-1.deb
newt_0.50-1.diff.gz
  to dists/potato/main/source/devel/newt_0.50-1.diff.gz
  replacing newt_0.30-1.diff.gz
newt_0.50-1.dsc
  to dists/potato/main/source/devel/newt_0.50-1.dsc
  replacing newt_0.30-1.dsc
python-newt_0.50-1_i386.deb
  to dists/potato/main/binary-i386/interpreters/python-newt_0.50-1.deb
libnewt0_0.50-1_i386.deb
  to dists/potato/main/binary-i386/base/libnewt0_0.50-1.deb

Note that this package is not part of the released stable Debian
distribution.  It may have dependencies on other unreleased software,
or other instabilities.  Please take care if you wish to install it.
The update will eventually make its way into the next released Debian
distribution.

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 45961@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Enrique Zanardi <ezanard@debian.org> (supplier of updated newt 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-----

Format: 1.6
Date: Tue,  5 Oct 1999 23:47:17 +0100
Source: newt
Binary: libnewt0 python-newt newt-tcl libnewt-dev whiptail
Architecture: source i386
Version: 0.50-1
Distribution: unstable
Urgency: low
Maintainer: Enrique Zanardi <ezanard@debian.org>
Description: 
 libnewt-dev - Developer's toolkit for newt windowing library
 libnewt0   - Not Erik's Windowing Toolkit - text mode windowing with slang
 newt-tcl   - A newt module for Tcl.
 python-newt - A newt module for Python.
 whiptail   - Displays user-friendly dialog boxes from shell scripts.
Closes: 24972 31246 36435 37032 38602 41304 43427 44754 45955 45961 46951
Changes: 
 newt (0.50-1) unstable; urgency=low
 .
   * new upstream version (Closes: #43427, #45955).
   * linked to slang 1.3 (Closes: #46951)
   * stripped debugging symbols from libnewt.a (Closes: #31246).
   * whiptail is on its own base package (Closes: #36435).
   * fixed documentation bug about "--clear" (Closes: #24972).
   * newtRedrawHelpLine() now test for length before memcpy'ng
   (Closes: #37032, #38602)
   * manpage updated to describe new options (Closes: #41304).
   * fixed typo in whiptail output (Closes: #44754).
   * added support for "password boxes". Patch by Joey Hess
   <joey@kitenet.net> (Closes: #45961).
Files: 
 c92abed82d02f8b438af63269e4ecadb 659 devel Optional newt_0.50-1.dsc
 8b0863a511557094d2f1ce3a6dbdc5cd 93475 devel Optional newt_0.50.orig.tar.gz
 5e7ae7af5787078cfbd987aad236cbce 16805 devel Optional newt_0.50-1.diff.gz
 4d340eca32b16c404bcbb1844cc7ac86 45470 devel Optional libnewt-dev_0.50-1_i386.deb
 e6b6cd9c4b82a704692c76ac85dc938c 29510 base Required libnewt0_0.50-1_i386.deb
 6bd110385821c1f41048d0c77a96deaf 13866 base Required whiptail_0.50-1_i386.deb
 915ce1b186e81cb94a2189277d676829 9962 devel Optional newt-tcl_0.50-1_i386.deb
 547438f98aa528e8ce12e3db5154fd7f 15358 devel Optional python-newt_0.50-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBN/+c/NhitnKXtoflAQHmaAQAqIxMJYq+0Wm4CBbxzUqsfuTIw7olauSy
ylBxZ9ynDa6F20X7oQKWridzQy/as0Nay2i5+iXcbfGcT6OObE4L2I03lNH/qd6B
eIHhSNOWDTccGvwBdkTV23t/pYgKb/PAxMbI55Iaz8gs5ePrVow6Uk4llDG9bWfy
zeVULJTP5S4=
=mSPb
-----END PGP SIGNATURE-----



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 09:56:51 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.