chiark / gitweb /
extract-profile: Add manpage.
[distorted-keys] / keyfunc.sh.in
index 704122bfcd2ebce4fe4e5c470fcfdc40ed13521f..dca8deef9b0545527f07c44d330a4f5e970087f9 100644 (file)
@@ -425,19 +425,20 @@ c_genkey () {
   ## options to the key type.
 
   ## Set options and check them.
+  kopt_owner=$kowner kopt_label=$klabel
   setprops "option" kopt_ "$@"
   checkprops "option" kopt_ "$k_genopts"
 
   ## Create directory structure and start writing metadata.
   rm -rf "$kdir.new"
   mkdir -m755 -p "$kdir.new"
-  case "$knub" in */*) mkdir -m700 -p "${knub%/*}" ;; esac
+  case "$knub" in */*) mkdir -m755 -p "${knub%/*}" ;; esac
   cat >"$kdir.new/meta" <<EOF
 $profile
 EOF
 
   ## Generate the key.
-  umask=$(umask); umask 077; >"$knub.new"; umask $umask
+  (umask 077; makenub >"$knub.new")
   k_generate "$kdir.new" "$knub.new"
   $hook "$kdir.new" "$knub.new"
 
@@ -726,6 +727,7 @@ $cmds
 EOF
        case $foundp in
          t)
+           usage; echo
            eval help=\$help_$cmdname; echo "$help"
            ;;
          nil)