portal: return success/failure of changing vmail password
[hcoop/domtool2.git] / src / main-portal.sml
index 068d16c..bed2064 100644 (file)
@@ -49,10 +49,10 @@ val _ =
            in
                case (oldpasswd, newpasswd) of
                    (SOME oldpasswd, SOME newpasswd) => 
            in
                case (oldpasswd, newpasswd) of
                    (SOME oldpasswd, SOME newpasswd) => 
-                   Main.requestPortalPasswdMailbox {domain = domain,
-                                                    user = user,
-                                                    oldpasswd = String.substring (oldpasswd, 0, size oldpasswd - 1),
-                                                    newpasswd = String.substring (newpasswd, 0, size newpasswd - 2)}
+                   OS.Process.exit (Main.requestPortalPasswdMailbox {domain = domain,
+                                                                     user = user,
+                                                                     oldpasswd = String.substring (oldpasswd, 0, size oldpasswd - 1),
+                                                                     newpasswd = String.substring (newpasswd, 0, size newpasswd - 1)})
                    | _ => die "Invalid input"
            end
       | _  => die "Invalid command-line arguments"
                    | _ => die "Invalid input"
            end
       | _  => die "Invalid command-line arguments"