X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/distorted-keys/blobdiff_plain/f5d867ffbd455876112df5b5e5ba5092793a8556..c0979a8f5abf02b454aee797e2aa028360186cc4:/cryptop.recover?ds=sidebyside diff --git a/cryptop.recover b/cryptop.recover index f661569..26142e9 100755 --- a/cryptop.recover +++ b/cryptop.recover @@ -38,11 +38,15 @@ key=$1 recov=$2 parse_keylabel "$key" if [ ! -d $kdir ]; then echo >&2 "$quis: unknown key \`$key'"; exit 1; fi checkword "recovery key label" "$recov" +case $kowner in + $USERV_USER) ;; + *) echo >&2 "$quis: you're not the owner of key \`$key'"; exit 1 ;; +esac mktmp nubid=$(cat $kdir/nubid) readmeta $kdir -read_profile "$profile" +read_profile $kowner "$profile" if [ -f $knub ]; then nubbin=$(nubid <$knub) case "$nubbin" in