X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fma%2Fsetup;h=f59187b8447bbfab4205e4e4bcfe2a4328f12eae;hb=a2a3d02d1aaf2d3dae3afea90c85cd6ca9f7ce4d;hp=a829a9845294dce1a614cc1707486f4ec3a0fad9;hpb=ebb12157ce060b27c2740e9bef241ce4a74aff70;p=monkeysphere.git diff --git a/src/share/ma/setup b/src/share/ma/setup index a829a98..f59187b 100644 --- a/src/share/ma/setup +++ b/src/share/ma/setup @@ -12,77 +12,97 @@ # 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 <