-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Haskell binding for C PAM API
--
-- This package provides PAM interface for Haskell programs. It contains
-- subset of C PAM API bindings. The bindings don't include functions for
-- writing PAM modules.
@package pam
@version 0.1
module System.Posix.PAM.Internals
data CPamMessage
CPamMessage :: CInt -> CString -> CPamMessage
msg_style :: CPamMessage -> CInt
msg :: CPamMessage -> CString
data CPamResponse
CPamResponse :: CString -> CInt -> CPamResponse
resp :: CPamResponse -> CString
resp_retcode :: CPamResponse -> CInt
data CPamConv
CPamConv :: FunPtr (CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt) -> Ptr () -> CPamConv
conv :: CPamConv -> FunPtr (CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt)
appdata_ptr :: CPamConv -> Ptr ()
type ConvFunc = CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt
mkconvFunc :: ConvFunc -> IO (FunPtr ConvFunc)
type CPamHandleT = ()
c_pam_start :: CString -> CString -> Ptr CPamConv -> Ptr (Ptr CPamHandleT) -> IO CInt
c_pam_end :: Ptr CPamHandleT -> CInt -> IO CInt
c_pam_authenticate :: Ptr CPamHandleT -> CInt -> IO CInt
c_pam_acct_mgmt :: Ptr CPamHandleT -> CInt -> IO CInt
instance Show CPamMessage
instance Eq CPamMessage
instance Show CPamResponse
instance Eq CPamResponse
instance Show CPamConv
instance Eq CPamConv
instance Storable CPamConv
instance Storable CPamResponse
instance Storable CPamMessage
module System.Posix.PAM.Types
data PamMessage
PamMessage :: String -> PamStyle -> PamMessage
pmString :: PamMessage -> String
pmStyle :: PamMessage -> PamStyle
data PamStyle
PamPromptEchoOff :: PamStyle
PamPromptEchoOn :: PamStyle
PamErrorMsg :: PamStyle
PamTextInfo :: PamStyle
-- |
-- http:www.kernel.orgpublinuxlibspamLinux-PAM-htmladg-interface-of-app-expected.html#adg-pam_conv
-- - resp_code member in C sturct is unused and should be set to zero,
-- that's why there is no code field in the haskell data type
data PamResponse
PamResponse :: String -> PamResponse
data PamRetCode
PamSuccess :: PamRetCode
PamRetCode :: Int -> PamRetCode
data PamFlag
PamFlag :: Int -> PamFlag
type PamConv = Ptr () -> [PamMessage] -> IO [PamResponse]
data PamHandle
PamHandle :: Ptr () -> FunPtr (CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt) -> PamHandle
cPamHandle :: PamHandle -> Ptr ()
cPamCallback :: PamHandle -> FunPtr (CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt)
instance Show PamStyle
instance Eq PamStyle
instance Show PamMessage
instance Eq PamMessage
instance Show PamResponse
instance Eq PamResponse
instance Show PamRetCode
instance Eq PamRetCode
instance Show PamHandle
instance Eq PamHandle
module System.Posix.PAM.LowLevel
retCodeFromC :: CInt -> PamRetCode
retCodeToC :: PamRetCode -> CInt
responseToC :: PamResponse -> IO CPamResponse
messageFromC :: CPamMessage -> IO PamMessage
cConv :: (Ptr () -> [PamMessage] -> IO [PamResponse]) -> CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt
pamStart :: String -> String -> (PamConv, Ptr ()) -> IO (PamHandle, PamRetCode)
pamEnd :: PamHandle -> PamRetCode -> IO PamRetCode
pamAuthenticate :: PamHandle -> PamFlag -> IO PamRetCode
pamAcctMgmt :: PamHandle -> PamFlag -> IO PamRetCode
module System.Posix.PAM
authenticate :: String -> String -> String -> IO (Either Int ())
checkAccount :: String -> String -> IO (Either Int ())
pamCodeToMessage :: Int -> String
pamCodeToCDefine :: Int -> String
pamCodeDetails :: Int -> (String, String)