Guest User

Untitled

a guest
Aug 28th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Elegant system calls in haskell
  2. module Kerberos where
  3.  
  4. system :: String -> IO ExitCode
  5. -- system is loaded through imports
  6.  
  7. type Username = String
  8. type Password = String
  9.  
  10. kerberosValidate :: Username -> Password -> IO Bool
  11. kerberosValidate username password = fmap (== ExitSuccess) $
  12. system $ "echo " ++ password ++ " | kinit " ++ username
Add Comment
Please, Sign In to add comment