X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=inline;f=src%2Fshare%2Fma%2Fsetup;h=034f0471bbc980f5985e676ee4cbbcdd4dbd84e5;hb=770f45b0c1d72a1bb89fd98fe070a6dfdcc4c0bf;hp=944bb4d8cf139273ecab799380b1781ab0863269;hpb=6b09adf78d79ea76849a43f4af4335a7a89b10c7;p=monkeysphere.git diff --git a/src/share/ma/setup b/src/share/ma/setup index 944bb4d..034f047 100644 --- a/src/share/ma/setup +++ b/src/share/ma/setup @@ -12,14 +12,18 @@ # version 3 or later. setup() { - # make the core and the sphere: - mkdir -p ${SYSDATADIR}/authentication - mkdir -p ${GNUPGHOME_SPHERE} - mkdir -p ${GNUPGHOME_CORE} + # make all needed directories + mkdir -p "${MADATADIR}" + mkdir -p "${MATMPDIR}" + mkdir -p "${GNUPGHOME_CORE}" + chmod 700 "${GNUPGHOME_CORE}" + mkdir -p "${GNUPGHOME_SPHERE}" + chmod 700 "${GNUPGHOME_SPHERE}" + mkdir -p "${MADATADIR}"/authorized_keys # deliberately replace the config files via truncation # FIXME: should we be dumping to tmp files and then moving atomically? - cat >${GNUPGHOME_CORE}/gpg.conf <"${GNUPGHOME_CORE}"/gpg.conf <${GNUPGHOME_SPHERE}/gpg.conf <"${GNUPGHOME_SPHERE}"/gpg.conf <