getRealUserID calls getuid to obtain the real UserID
associated with the current process.
Moduleunix-2.8.7.0Haskell2010
System.Posix.User.ByteString
POSIX user/group support
- 2 types
- 18 values
- Packageunix-2.8.7.0
- Exports20
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceByteString.hsc
User environment
0 declarationsQuerying the user environment
getRealGroupID calls getgid to obtain the real GroupID
associated with the current process.
getEffectiveUserID calls geteuid to obtain the effective
UserID associated with the current process.
getEffectiveGroupID calls getegid to obtain the effective
GroupID associated with the current process.
getGroups calls getgroups to obtain the list of
supplementary GroupIDs associated with the current process.
getLoginName calls getlogin to obtain the login name
associated with the current process.
getEffectiveUserName gets the name
associated with the effective UserID of the process.
The group database
Constructors
GroupEntrygroupName :: ByteStringThe name of this group (gr_name)
groupPassword :: ByteStringThe password for this group (gr_passwd)
groupID :: GroupIDThe unique numeric ID for this group (gr_gid)
groupMembers :: [ByteString]A list of zero or more usernames that are members (gr_mem)
Instances3Eq, Read, Show
Eq GroupEntryDefined in unix-2.8.7.0 · System.Posix.User.CommonRead GroupEntryDefined in unix-2.8.7.0 · System.Posix.User.CommonShow GroupEntryDefined in unix-2.8.7.0 · System.Posix.User.Common
getGroupEntryForID gid calls getgrgid_r to obtain
the GroupEntry information associated with GroupID
gid. This operation may fail with isDoesNotExistError
if no such group exists.
getGroupEntryForName name calls getgrnam_r to obtain
the GroupEntry information associated with the group called
name. This operation may fail with isDoesNotExistError
if no such group exists.
getAllGroupEntries returns all group entries on the system by
repeatedly calling getgrent
The user database
Constructors
UserEntryuserName :: ByteStringTextual name of this user (pw_name)
userPassword :: ByteStringPassword -- may be empty or fake if shadow is in use (pw_passwd)
userID :: UserIDNumeric ID for this user (pw_uid)
userGroupID :: GroupIDPrimary group ID (pw_gid)
userGecos :: ByteStringUsually the real name for the user (pw_gecos)
homeDirectory :: ByteStringHome directory (pw_dir)
userShell :: ByteStringDefault shell (pw_shell)
getUserEntryForID uid calls getpwuid_r to obtain
the UserEntry information associated with UserID
uid. This operation may fail with isDoesNotExistError
if no such user exists.
getUserEntryForName name calls getpwnam_r to obtain
the UserEntry information associated with the user login
name. This operation may fail with isDoesNotExistError
if no such user exists.
getAllUserEntries returns all user entries on the system by
repeatedly calling getpwent
Modifying the user environment
setUserID uid calls setuid to set the real, effective, and
saved set-user-id associated with the current process to uid.
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.
setGroups calls setgroups to set the list of
supplementary GroupIDs associated with the current process.