Safe HaskellSafe

System.Posix.PAM

Synopsis

Documentation

isSuccess :: PamRetCode -> Bool Source #

isSuccess responseCode checks if responseCode is equal to PamSuccess, i.e. checking if the account check/authentication succeeded

whenSuccess :: MonadIO m => PamRetCode -> m PamRetCode -> m PamRetCode Source #

whenSuccess responseCode action returns action if responseCode is PamSuccess, otherwise returns responseCode

authenticate :: MonadIO m => String -> String -> String -> m PamRetCode Source #

authenticate service user password attempts to authenticate user and password with PAM using service to determine which file in etcpam.d to use

checkAccount :: MonadIO m => String -> String -> m PamRetCode Source #

checkAccount service user checks if user is a valid user. service is is the service name given to PAM (see authenticate)

pamCodeToMessage :: PamRetCode -> String Source #

pamCodeToMessage responseCode returns a description of responseCode in the context of PAM

pamCodeToCDefine :: PamRetCode -> String Source #

pamCodeToMessage responseCode returns the name of the define used in C to represent responseCode

pamCodeDetails :: PamRetCode -> (String, String) Source #

pamCodeDetails responseCode returns a tuple of the name of the C define and a description of responseCode