From fbc20c5c8e1bd1088fdb3fb5cd2cb074f4807346 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 17 May 2008 11:40:33 +0200 Subject: [PATCH] Fuzz with the shell in ud-replicate's sshkeys part --- ud-replicate | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ud-replicate b/ud-replicate index f148bf6..56dbbd2 100755 --- a/ud-replicate +++ b/ud-replicate @@ -78,12 +78,10 @@ ln -sf `pwd -P`/ssh-rsa-shadow /etc/ssh ln -sf `pwd -P`/ssh_known_hosts /etc/ssh if [ -e ${HOST}/ssh-keys.tar.gz ]; then - export TMPDIR='/tmp/' + export TMPDIR='/tmp/' tempdir=$(mktemp -d) - old=$(pwd -P) - cd $tempdir && tar -xf ${old}/${HOST}/ssh-keys.tar.gz - cd $old - mkdir userkeys 2> /dev/null || true + (cd $tempdir && tar -xf ${old}/${HOST}/ssh-keys.tar.gz) + ! [ -d userkeys ] || mkdir userkeys chmod 755 $tempdir rsync -a --delete-after $tempdir/ userkeys/ fi -- 2.20.1