allowing expiration dates with strings longer than one digit (e.g. "10m" meaning...
[monkeysphere.git] / src / common
index 6fc5f3318d10dc39f4482ddf6efccea44003d7f5..b57b721bee797d6ad7b21cd9daaf93d42b08555c 100644 (file)
@@ -115,7 +115,7 @@ translate_ssh_variables() {
 
 # 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