summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-08-15 13:02:05 -0700
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-08-15 13:02:05 -0700
commit8cf936aa9d62f6e8655904375a2d8217f559947a (patch)
treecd0f9e92c93431c9bfa492bfc9d17b1298803351 /src/common
parente693947aa628b32d4f50c3d5d67db6f41932a2be (diff)
more work on hostname add/revoke
Diffstat (limited to 'src/common')
-rw-r--r--src/common13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/common b/src/common
index 17955a7..34c86cb 100644
--- a/src/common
+++ b/src/common
@@ -69,11 +69,12 @@ file_hash() {
md5sum "$1" 2> /dev/null
}
-# convert escaped characters from gpg output back into original
-# character
-# FIXME: undo all escape character translation in with-colons gpg output
-unescape() {
- echo "$1" | sed 's/\\x3a/:/g'
+# convert escaped characters in pipeline from gpg output back into
+# original character
+# FIXME: undo all escape character translation in with-colons gpg
+# output
+gpg_unescape() {
+ sed 's/\\x3a/:/g'
}
# remove all lines with specified string from specified file
@@ -398,7 +399,7 @@ process_user_id() {
continue
fi
# if the user ID does not match, skip
- if [ "$(unescape "$uidfpr")" != "$userID" ] ; then
+ if [ "$(echo "$uidfpr" | gpg_unescape)" != "$userID" ] ; then
continue
fi
# if the user ID validity is not ok, skip