Write password file
authorAdam Chlipala <adamc@hcoop.net>
Sat, 8 Dec 2007 20:21:18 +0000 (20:21 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sat, 8 Dec 2007 20:21:18 +0000 (20:21 +0000)
app/app.sml

index 96d9f47..7345bbf 100644 (file)
@@ -144,7 +144,14 @@ fun apply {name, rname, gname, email, forward, uses, other, paypal, checkout} =
                                        mwrite passwd;
                                        mwrite ("\n")),
                             id) then
-                   SOME unix_passwd
+                   let
+                       val outf = TextIO.openOut (OS.Path.joinDirFile {dir = "/var/lib/portal",
+                                                                        file = name})
+                   in
+                       TextIO.output (outf, unix_passwd);
+                       TextIO.closeOut outf;
+                       SOME unix_passwd
+                   end
                else
                    NONE
            end