diff options
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | packaging/freebsd/files/patch-etclocation | 4 | ||||
-rwxr-xr-x | packaging/freebsd/pkg-install | 2 | ||||
-rwxr-xr-x | src/monkeysphere-server | 4 |
4 files changed, 9 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog index fa905d3..300175d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ monkeysphere (0.20-1) UNRELEASED; urgency=low [ Jameson Graef Rollins ] * clean up Makefile to generate more elegant source tarballs. + + [ Daniel Kahn Gillmor ] + * ensure that tempdirs are properly created, bail out otherwise instead + of stumbling ahead. -- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Thu, 30 Oct 2008 15:03:23 -0400 diff --git a/packaging/freebsd/files/patch-etclocation b/packaging/freebsd/files/patch-etclocation index 0100a9c..2ab3ac0 100644 --- a/packaging/freebsd/files/patch-etclocation +++ b/packaging/freebsd/files/patch-etclocation @@ -6,8 +6,8 @@ index c001f2d..d33fd36 100644 # authorized_keys file. '%h' will be replaced by the home directory # of the user, and %u will be replaced by the username of the user. # For purely admin-controlled authorized_user_ids, you might put them --# in /etc/monkeysphere/authorized_user_ids/%u -+# in /usr/local/etc/monkeysphere/authorized_user_ids/%u +-# in /etc/monkeysphere/authorized_user_ids/%u, for instance. ++# in /usr/local/etc/monkeysphere/authorized_user_ids/%u, for instance. #AUTHORIZED_USER_IDS="%h/.monkeysphere/authorized_user_ids" # Whether to add user controlled authorized_keys file to diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install index d7e4dbe..70d37b5 100755 --- a/packaging/freebsd/pkg-install +++ b/packaging/freebsd/pkg-install @@ -65,7 +65,7 @@ POST-INSTALL) install -d -o monkeysphere -g monkeysphere -m 700 "$VARLIB"/gnupg-authentication ln -sf "$ETCDIR"/gnupg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf - chown monkeysphere:monkeysphere "$VARLIB"/gnupg-authentication/gpg.conf + install -d "$VARLIB"/tmp "$VARLIB"/authorized_keys monkeysphere-server diagnostics ;; diff --git a/src/monkeysphere-server b/src/monkeysphere-server index 5f0cb73..e78903b 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -134,7 +134,7 @@ show_server_key() { # dumping to a file named ' ' so that the ssh-keygen output # doesn't claim any potentially bogus hostname(s): - tmpkey=$(mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX) + tmpkey=$(mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX) || failure "Could not create temporary directory!" gpg_authentication "--export $fingerprint" | openpgp2ssh "$fingerprint" 2>/dev/null > "$tmpkey/ " echo -n "ssh fingerprint: " (cd "$tmpkey" && ssh-keygen -l -f ' ' | awk '{ print $2 }') @@ -180,7 +180,7 @@ update_users() { log verbose "----- user: $uname -----" # make temporary directory - TMPLOC=$(mktemp -d ${MSTMPDIR}/tmp.XXXXXXXXXX) + TMPLOC=$(mktemp -d ${MSTMPDIR}/tmp.XXXXXXXXXX) || failure "Could not create temporary directory!" # trap to delete temporary directory on exit trap "rm -rf $TMPLOC" EXIT |