Created
January 14, 2015 22:45
-
-
Save nakal/c1540df4da97af4e4fea to your computer and use it in GitHub Desktop.
PAM authentication test in Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Posix.PAM | |
main = do | |
res <- authenticate "system" "user" "pass" | |
case res of | |
Left a -> putStrLn $ "error: " ++ pamCodeToMessage a | |
Right () -> putStrLn "success" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment