From a5d96721e78a06f7dd55071ff3ae61370e00324c Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 19 Feb 2009 00:14:20 -0500 Subject: moved directory for monkeysphere-generated authorized_keys files back to its old location at /var/lib/monkeysphere/authorized_keys --- src/share/ma/setup | 2 +- src/share/ma/update_users | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/share/ma') diff --git a/src/share/ma/setup b/src/share/ma/setup index 6969d71..248406f 100644 --- a/src/share/ma/setup +++ b/src/share/ma/setup @@ -19,7 +19,7 @@ setup() { chmod 700 "${GNUPGHOME_CORE}" mkdir -p "${GNUPGHOME_SPHERE}" chmod 700 "${GNUPGHOME_SPHERE}" - mkdir -p "${MADATADIR}"/authorized_keys + mkdir -p "${SYSDATADIR}"/authorized_keys # deliberately replace the config files via truncation # FIXME: should we be dumping to tmp files and then moving atomically? diff --git a/src/share/ma/update_users b/src/share/ma/update_users index e9e3cc6..092d108 100644 --- a/src/share/ma/update_users +++ b/src/share/ma/update_users @@ -35,7 +35,7 @@ MODE="authorized_keys" GNUPGHOME="$GNUPGHOME_SPHERE" # the authorized_keys directory -authorizedKeysDir="${MADATADIR}/authorized_keys" +authorizedKeysDir="${SYSDATADIR}/authorized_keys" # check to see if the gpg trust database has been initialized if [ ! -s "${GNUPGHOME}/trustdb.gpg" ] ; then -- cgit v1.2.3 From 6a7b42ec39aad2e774255b875af7ab40e80bb872 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 19 Feb 2009 00:35:50 -0500 Subject: catch pipe failures more cleanly during key import --- src/share/ma/add_certifier | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/share/ma') diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index 2f29759..7c1441c 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -84,7 +84,8 @@ if [ -f "$keyID" ] ; then # + failure 'could not read key from '\''/root/dkg.gpg'\''' # + echo 'could not read key from '\''/root/dkg.gpg'\''' - keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ ) + keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ ) || \ + failure "There were no gpg keys in the file." if [ -z "$keyID" ] || [ $(echo "$keyID" | wc -l) -ne 1 ] ; then failure "There was not exactly one gpg key in the file." fi -- cgit v1.2.3 From 68299f9faebcf3c54382aca3d662b35172f6a968 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 19 Feb 2009 00:37:10 -0500 Subject: clean up failure message --- src/share/ma/add_certifier | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/share/ma') diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index 7c1441c..b917a74 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -85,7 +85,7 @@ if [ -f "$keyID" ] ; then # + echo 'could not read key from '\''/root/dkg.gpg'\''' keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ ) || \ - failure "There were no gpg keys in the file." + failure "There were no gpg keys in the file $keyID." if [ -z "$keyID" ] || [ $(echo "$keyID" | wc -l) -ne 1 ] ; then failure "There was not exactly one gpg key in the file." fi -- cgit v1.2.3