X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fma%2Fsetup;h=0cd92e0d8bc87134df43ec1d84dc5247805eebe2;hb=07316c65eb5302a1d5385301876be7971e26fd1f;hp=a829a9845294dce1a614cc1707486f4ec3a0fad9;hpb=ebb12157ce060b27c2740e9bef241ce4a74aff70;p=monkeysphere.git diff --git a/src/share/ma/setup b/src/share/ma/setup index a829a98..0cd92e0 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 <