9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "rob pike, esq." <rob@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: [9fans] retry with aescbc
Date: Tue, 15 Oct 2002 22:05:15 -0400	[thread overview]
Message-ID: <e36524949cde2a3e066e97ed9045e6b8@plan9.bell-labs.com> (raw)

auth/aescbc detects a bad password but generates output anyway, so
if you use it as a μsecstore you'll be disappointed the first time
you type a bad password. that is, if you
	auth/aescbc -d < lib/factotum.aes > /mnt/factotum/ctl
and get the password wrong, factotum will get delivered garbage.
here's a clumsy wrapper that addresses the issue; perhaps someone
else will find a better way.  (the need for $result is due to a
buglet in rc regarding $status at the top of a while loop.)

	# retry until good password
	ramfs -m /n/kremvax >[2] /dev/null #suppress unmount message
	result = 'failed to authenticate'
	while(~ $result *'failed to authenticate'*){
		auth/aescbc -d < lib/factotum.aes > /n/kremvax/factotum
		result = $status
	}
	cp /n/kremvax/factotum /mnt/factotum/ctl
	unmount /n/kremvax

aescbc is a little too liberal with the exit string 'failed to
authenticate' but i've asked ehg to tighten it up.

-rob


             reply	other threads:[~2002-10-16  2:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-16  2:05 rob pike, esq. [this message]
2002-10-16  2:48 rob pike, esq.
2002-10-18  2:59 ` Micah Stetson
2002-10-16  8:29 Charles Forsyth
2002-10-16  8:49 Charles Forsyth
2002-10-18  3:02 Russ Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e36524949cde2a3e066e97ed9045e6b8@plan9.bell-labs.com \
    --to=rob@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).