summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJameson Rollins <jrollins@finestructure.net>2010-10-17 21:40:35 -0400
committerJameson Rollins <jrollins@finestructure.net>2010-10-17 21:40:35 -0400
commit04e5bfbca3e81744b1858823c6d6653274e78ccb (patch)
tree938e81e5b14be8cd2679f5569e5ac59b645561e6 /src
parent9ab747779e56b4dbc51ef5b46136f967b584ffe0 (diff)
fixed bug in remove_monkeysphere_lines function
it was matching MonkeySphere strings as full lines and therefore not actually removing monkeysphere lines. I'm not sure exactly why, upon further consideration, why we actually need to be removing all monkeysphere lines in update_authorized_keys.
Diffstat (limited to 'src')
-rw-r--r--src/share/common4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/share/common b/src/share/common
index 34ac52d..5486eaa 100644
--- a/src/share/common
+++ b/src/share/common
@@ -376,8 +376,8 @@ remove_monkeysphere_lines() {
tempfile=$(mktemp "${file}.XXXXXXX") || \
failure "Could not make temporary file '${file}.XXXXXXX'."
- egrep -v '^MonkeySphere[[:digit:]]{4}(-[[:digit:]]{2}){2}T[[:digit:]]{2}(:[[:digit:]]{2}){2}$' \
- "$file" >"$tempfile"
+ egrep -v ' MonkeySphere[[:digit:]]{4}(-[[:digit:]]{2}){2}T[[:digit:]]{2}(:[[:digit:]]{2}){2} ' \
+ "$file" >"$tempfile" || true
cat "$tempfile" > "$file"
rm "$tempfile"
}