X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fshare%2Fma%2Fsetup;h=6969d71dd4954f59b2905c28e95612218494db2e;hb=88b19565bced6d9ec9b035d1f9fe51ce6567923b;hp=a829a9845294dce1a614cc1707486f4ec3a0fad9;hpb=ebb12157ce060b27c2740e9bef241ce4a74aff70;p=monkeysphere.git diff --git a/src/share/ma/setup b/src/share/ma/setup index a829a98..6969d71 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 <