From 2beb9ebbf99b4556cc501c07f5bb715cf748d657 Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Wed, 28 Aug 2024 09:59:07 +0800 Subject: [PATCH] fix(sagent): secure file location --- tools/sagent.sh | 3 ++- tools/test.zsh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/sagent.sh b/tools/sagent.sh index 083ef4e..9b317a3 100755 --- a/tools/sagent.sh +++ b/tools/sagent.sh @@ -61,7 +61,8 @@ reset() all() { - local agent_file="/tmp/piv-agent-$(whoami)" + test -d ~/.ssh || mkdir ~/.ssh + local agent_file=~/.ssh/agent-$(whoami) if [[ -f $agent_file ]]; then source $agent_file > /dev/null else diff --git a/tools/test.zsh b/tools/test.zsh index 8e98efe..4d3813c 100644 --- a/tools/test.zsh +++ b/tools/test.zsh @@ -49,7 +49,7 @@ alias p114 alias cbds which riot sagt -test -f "/tmp/piv-agent-$(whoami)" +test -f ~/.ssh/agent-$(whoami) gbes || which gbes # check update