Re: Entering Passwords
Posted in 1992
>Subject: Entering Passwords >Date: Tue, 10 Mar 92 9:27:19 PST >From: uunet!pdx.csd.mot.com!jmn (Jim Nielsen) >X-Informix-List-Id: <list.940> > >I have an application where one function from the ring menu has the potential >to destroy civilization as we know it. In order to ensure that it is executed >only with the approval of the commander-in-chief, the users would like to >have it password protected. > >I have been looking for some mechanism to allow entry of the password without >displaying on the screen. > >I have done this in countless other languages and environments very easily >but I am drawing a blank in 4GL. I feel like an idiot because it seems >like it should be so obvious. Any suggestions (about the password) would be >appreciated. >Thanks. > >-- >Jim Nielsen >jmn@pdx.csd.mot.com . . . tektronix!reed!cvedc!mcspdx!jmn Assuming you have 4.10, the INVISIBLE attribute works, as in the example code in the shell archive below. I tested this on a Sun Sparcstation running SunOS 4.1.1 and I4GL-RDS 4.10.UC1. If it is relevant, I had TERM=sun-cmd and was using system supplied termcap files (not /usr/informix/etc/termcap), so it should work OK on any terminal. Yours, Jonathan Leffler (johnl@obelix.informix.com) : "@(#)shar.sh 1.8" #! /bin/sh # # This is a shell archive. # Remove everything above this line and run sh on the resulting file. # If this archive is complete, you will see this message at the end: # "All files extracted" # # Created: Wed Mar 11 09:47:08 GMT 1992 by johnl at Informix Software Ltd. # Files archived in this archive: # fff.4gl # fff.per # #-------------------- if [ -f fff.4gl -a "$1" != "-c" ] then echo shar: fff.4gl already exists else echo 'x - fff.4gl (235 characters)' sed -e 's/^X//' >fff.4gl <<'SHAR-EOF' Xmain X X define X u CHAR(8), X p CHAR(8) X X open window w at 2, 2 X with form "fff" X attribute (border, form line first) X X options input wrap X X input u, p from formonly.* X X close window w X X display "u = ", u X display "p = ", p X Xend main SHAR-EOF chmod 644 fff.4gl if [ `wc -c <fff.4gl` -ne 235 ] then echo shar: fff.4gl unpacked with wrong size fi # end of overwriting check fi #-------------------- if [ -f fff.per -a "$1" != "-c" ] then echo shar: fff.per already exists else echo 'x - fff.per (159 characters)' sed -e 's/^X//' >fff.per <<'SHAR-EOF' Xdatabase formonly Xscreen X{ X XUser Name [f000 ] XPassword [f001 ] X X} X Xend X Xattributes X Xf000 = formonly.username; Xf001 = formonly.password, INVISIBLE; X Xend SHAR-EOF chmod 644 fff.per if [ `wc -c <fff.per` -ne 159 ] then echo shar: fff.per unpacked with wrong size fi # end of overwriting check fi echo All files extracted exit 0