summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/common12
-rwxr-xr-xsrc/monkeysphere4
-rwxr-xr-xsrc/monkeysphere-server11
3 files changed, 13 insertions, 14 deletions
diff --git a/src/common b/src/common
index d7caefd..914c800 100755
--- a/src/common
+++ b/src/common
@@ -14,8 +14,8 @@
# managed directories
ETC="/etc/monkeysphere"
export ETC
-LIB="/var/lib/monkeysphere"
-export LIB
+CACHE="/var/cache/monkeysphere"
+export CACHE
########################################################################
failure() {
@@ -312,13 +312,13 @@ process_known_hosts() {
# update an authorized_keys file after first processing the
# authorized_user_ids file
update_authorized_keys() {
- local cacheDir
local msAuthorizedKeys
local userAuthorizedKeys
+ local cacheDir
- cacheDir="$1"
- msAuthorizedKeys="$2"
- userAuthorizedKeys="$3"
+ msAuthorizedKeys="$1"
+ userAuthorizedKeys="$2"
+ cacheDir="$3"
process_authorized_ids "$AUTHORIZED_USER_IDS" "$cacheDir"
diff --git a/src/monkeysphere b/src/monkeysphere
index aaeda11..5d865c9 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -35,8 +35,8 @@ Monkeysphere client tool.
subcommands:
update-known_hosts (k) [HOST]... update known_hosts file
- update-authorized_keys (a) update authorized_keys file
update-userids (u) [USERID]... add/update userid
+ update-authorized_keys (a) update authorized_keys file
gen-ae-subkey (g) KEYID generate an 'ae' capable subkey
help (h,?) this help
@@ -170,7 +170,7 @@ case $COMMAND in
userAuthorizedKeys=${USER_CONTROLLED_AUTHORIZED_KEYS/\%h/"$HOME"}
# update authorized_keys
- update_authorized_keys "$userKeysCacheDir" "$msAuthorizedKeys" "$userAuthorizedKeys"
+ update_authorized_keys "$msAuthorizedKeys" "$userAuthorizedKeys" "$userKeysCacheDir"
;;
'update-userids'|'u')
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index a109cf5..0ff06af 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -129,7 +129,6 @@ GNUPGHOME=${GNUPGHOME:-"$MS_HOME"/gnupg}
KEYSERVER=${KEYSERVER:-subkeys.pgp.net}
REQUIRED_KEY_CAPABILITY=${REQUIRED_KEY_CAPABILITY:-"e a"}
USER_CONTROLLED_AUTHORIZED_KEYS=${USER_CONTROLLED_AUTHORIZED_KEYS:-%h/.ssh/authorized_keys}
-STAGING_AREA=${STAGING_AREA:-"$LIB"/stage}
export GNUPGHOME
@@ -150,8 +149,8 @@ case $COMMAND in
log "----- user: $uname -----"
AUTHORIZED_USER_IDS="$MS_HOME"/authorized_user_ids/"$uname"
- cacheDir="$STAGING_AREA"/"$uname"/user_keys
- msAuthorizedKeys="$STAGING_AREA"/"$uname"/authorized_keys
+ msAuthorizedKeys="$CACHE"/"$uname"/authorized_keys
+ cacheDir="$CACHE"/"$uname"/user_keys
# make sure authorized_user_ids file exists
if [ ! -s "$AUTHORIZED_USER_IDS" ] ; then
@@ -166,7 +165,7 @@ case $COMMAND in
fi
# update authorized_keys
- update_authorized_keys "$cacheDir" "$msAuthorizedKeys" "$userAuthorizedKeys"
+ update_authorized_keys "$msAuthorizedKeys" "$userAuthorizedKeys" "$cacheDir"
done
log "----- done. -----"
@@ -199,9 +198,9 @@ case $COMMAND in
failure "you must specify at least one userid."
fi
AUTHORIZED_USER_IDS="$MS_HOME"/authorized_user_ids/"$uname"
- userKeysCacheDir="$STAGING_AREA"/"$uname"/user_keys
+ cacheDir="$CACHE"/"$uname"/user_keys
for userID ; do
- update_userid "$userID" "$userKeysCacheDir"
+ update_userid "$userID" "$cacheDir"
done
;;