projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'jamie/master'
[monkeysphere.git]
/
src
/
common
diff --git
a/src/common
b/src/common
index 6fc5f3318d10dc39f4482ddf6efccea44003d7f5..1e8f23c0ca97de6ed2c17b98ecc40e0661ce68bd 100644
(file)
--- a/
src/common
+++ b/
src/common
@@
-115,7
+115,7
@@
translate_ssh_variables() {
# test that a string to conforms to GPG's expiration format
test_gpg_expire() {
# test that a string to conforms to GPG's expiration format
test_gpg_expire() {
- echo "$1" | egrep -q "^[0-9][mwy]?$"
+ echo "$1" | egrep -q "^[0-9]
+
[mwy]?$"
}
# check that a file is properly owned, and that all it's parent
}
# check that a file is properly owned, and that all it's parent
@@
-563,6
+563,11
@@
process_known_hosts() {
hosts=$(meat "$KNOWN_HOSTS" | cut -d ' ' -f 1 | grep -v '^|.*$' | tr , ' ' | tr '\n' ' ')
hosts=$(meat "$KNOWN_HOSTS" | cut -d ' ' -f 1 | grep -v '^|.*$' | tr , ' ' | tr '\n' ' ')
+ if [ -z "$hosts" ] ; then
+ log "no hosts to process."
+ return
+ fi
+
# take all the hosts from the known_hosts file (first
# field), grep out all the hashed hosts (lines starting
# with '|')...
# take all the hosts from the known_hosts file (first
# field), grep out all the hashed hosts (lines starting
# with '|')...
@@
-697,6
+702,11
@@
process_authorized_user_ids() {
log "processing authorized_user_ids file..."
log "processing authorized_user_ids file..."
+ if ! meat "$authorizedUserIDs" ; then
+ log "no user IDs to process."
+ return
+ fi
+
nline=0
# extract user IDs from authorized_user_ids file
nline=0
# extract user IDs from authorized_user_ids file