chiark / gitweb /
Directory claiming and ephemeral filesystems.
[distorted-keys] / cryptop.recover
old mode 100644 (file)
new mode 100755 (executable)
index f661569..26142e9
@@ -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