Use pwgen instead of apg
authorAdam Chlipala <adamc@hcoop.net>
Sat, 24 Nov 2007 16:09:36 +0000 (16:09 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sat, 24 Nov 2007 16:09:36 +0000 (16:09 +0000)
app/app.sml

index fde065e..96d9f47 100644 (file)
@@ -98,14 +98,14 @@ type application = { name : string, rname : string, gname : string option, email
 
 fun randomPassword () =
     let
-       val proc = Unix.execute ("/usr/bin/apg", ["/usr/bin/apg", "-n", "1", "-m", "10"])
+       val proc = Unix.execute ("/usr/bin/pwgen", ["-cCnB", "8", "1"])
     in
        case TextIO.inputLine (Unix.textInstreamOf proc) of
-           NONE => raise Fail "Couldn't execute apg"
+           NONE => raise Fail "Couldn't execute pwgen"
          | SOME line =>
            case String.tokens Char.isSpace line of
                [s] => s
-             | _ => raise Fail "Couldn't parse output of apg"
+             | _ => raise Fail "Couldn't parse output of pwgen"
     end
 
 val allLower = CharVector.map Char.toLower