HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

  • Packageunix-2.8.8.0
  • Exports20
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceByteString.hsc

User environment

Querying the user environment

valuegetGroups :: IO [GroupID]

getGroups calls getgroups to obtain the list of supplementary GroupIDs associated with the current process.

The group database

datadata GroupEntry
#

Constructors

Instances3Eq, Read, Show

The user database

datadata UserEntry
#

Constructors

Instances3Eq, Read, Show
  • Eq UserEntryDefined in unix-2.8.8.0 · System.Posix.User.Common
  • Read UserEntryDefined in unix-2.8.8.0 · System.Posix.User.Common
  • Show UserEntryDefined in unix-2.8.8.0 · System.Posix.User.Common

Modifying the user environment

valuesetUserID :: UserID -> IO ()

setUserID uid calls setuid to set the real, effective, and saved set-user-id associated with the current process to uid.

valuesetGroupID :: GroupID -> IO ()

setGroupID gid calls setgid to set the real, effective, and saved set-group-id associated with the current process to gid.

setEffectiveUserID uid calls seteuid to set the effective user-id associated with the current process to uid. This does not update the real user-id or set-user-id.

setEffectiveGroupID uid calls setegid to set the effective group-id associated with the current process to gid. This does not update the real group-id or set-group-id.

valuesetGroups :: [GroupID] -> IO ()

setGroups calls setgroups to set the list of supplementary GroupIDs associated with the current process.