From: Mark Wooding Date: Sun, 2 Dec 2012 15:44:47 +0000 (+0000) Subject: keyfunc.sh.in, ktype.*: Make nub creation the job of `c_genkey'. X-Git-Tag: 0.99.3~2 X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-keys/commitdiff_plain/28bb1ec395f56d0b6fe7d2904b5c59c7cbddab87 keyfunc.sh.in, ktype.*: Make nub creation the job of `c_genkey'. This means that we can stop worrying about the permissions on the file, and the duplicated calls to `makenub' can disappear. --- diff --git a/keyfunc.sh.in b/keyfunc.sh.in index f257bb9..c8a6073 100644 --- a/keyfunc.sh.in +++ b/keyfunc.sh.in @@ -437,7 +437,7 @@ $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" diff --git a/ktype.gnupg b/ktype.gnupg index 18a17a9..c24492f 100644 --- a/ktype.gnupg +++ b/ktype.gnupg @@ -91,7 +91,6 @@ EOF k_generate () { base=$1 nub=$2 - makenub >"$nub" initdir "$base" { cat <"$nub" k_public "$base" "$nub" >"$base/pub" }