Skip to content

Instantly share code, notes, and snippets.

@nakal
Created January 14, 2015 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakal/c1540df4da97af4e4fea to your computer and use it in GitHub Desktop.
Save nakal/c1540df4da97af4e4fea to your computer and use it in GitHub Desktop.
PAM authentication test in Haskell
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