diff options
| author | Igor Soarez <igor@soarez.org> | 2026-11-18 17:27:24 +0000 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-11-18 17:27:24 +0000 |
| commit | bb723d867c380ef56917dc4c7836d33b940c6a69 (patch) | |
| tree | e625b54ac011c06079ace3250bda9bea726828bb /secrets | |
| parent | 8f818a64f2f0f3a833fc842d52a675358ec64c9c (diff) | |
szecret enrol: identity.pub 644 whatever the umask
Diffstat (limited to 'secrets')
| -rwxr-xr-x | secrets/enrol.sh | 2 |
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:" |
