Haskell Hierarchical Libraries (unix package)ContentsIndex
System.Posix.User
Portability non-portable (requires POSIX)
Stability provisional
Maintainer libraries@haskell.org
Contents
User environment
Querying the user environment
The group database
The user database
Modifying the user environment
Description
POSIX user/group support
Synopsis
getRealUserID :: IO UserID
getRealGroupID :: IO GroupID
getEffectiveUserID :: IO UserID
getEffectiveGroupID :: IO GroupID
getGroups :: IO [GroupID]
getLoginName :: IO String
getEffectiveUserName :: IO String
data GroupEntry = GroupEntry {
groupName :: String
groupID :: GroupID
groupMembers :: [String]
}
getGroupEntryForID :: GroupID -> IO GroupEntry
getGroupEntryForName :: String -> IO GroupEntry
data UserEntry = UserEntry {
userName :: String
userID :: UserID
userGroupID :: GroupID
homeDirectory :: String
userShell :: String
}
getUserEntryForID :: UserID -> IO UserEntry
getUserEntryForName :: String -> IO UserEntry
setUserID :: UserID -> IO ()
setGroupID :: GroupID -> IO ()
User environment
Querying the user environment
getRealUserID :: IO UserID
getRealGroupID :: IO GroupID
getEffectiveUserID :: IO UserID
getEffectiveGroupID :: IO GroupID
getGroups :: IO [GroupID]
getLoginName :: IO String
getEffectiveUserName :: IO String
The group database
data GroupEntry
Constructors
GroupEntry
groupName :: String
groupID :: GroupID
groupMembers :: [String]
getGroupEntryForID :: GroupID -> IO GroupEntry
getGroupEntryForName :: String -> IO GroupEntry
The user database
data UserEntry
Constructors
UserEntry
userName :: String
userID :: UserID
userGroupID :: GroupID
homeDirectory :: String
userShell :: String
getUserEntryForID :: UserID -> IO UserEntry
getUserEntryForName :: String -> IO UserEntry
Modifying the user environment
setUserID :: UserID -> IO ()
setGroupID :: GroupID -> IO ()
Produced by Haddock version 0.6