summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsecrets/enrol.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/secrets/enrol.sh b/secrets/enrol.sh
index 2f1d61e..8174d6f 100755
--- a/secrets/enrol.sh
+++ b/secrets/enrol.sh
@@ -69,6 +69,8 @@ esac
[[ "${pub}" =~ ^age1[0-9a-z]+$ ]] || die "the new key's public half doesn't look like one: ${pub:-nothing}; no key made"
chmod 600 "${tmp}"
echo "${pub}" > "${identity_pub}.tmp"
+# Whatever the umask (sg gives 002): the key it names must be the one here.
+chmod 644 "${identity_pub}.tmp"
mv "${identity_pub}.tmp" "${identity_pub}"
mv "${tmp}" "${identity}"
>&2 echo "szecret: enrolled; add this machine's public key to cloud-setup's szecret/hosts:"