blob: 420d2107fa17f7411ff780c0da712065e7d30c12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import System.Posix
main = do
root <- getUserEntryForName "root"
putStrLn (ue2String root)
root' <- getUserEntryForID (userID root)
putStrLn (ue2String root')
if homeDirectory root == homeDirectory root' &&
userShell root == userShell root'
then putStrLn "OK"
else putStrLn "Mismatch"
ue2String ue = concat [name, ":", show uid, ":", show gid]
where name = userName ue
uid = userID ue
gid = userGroupID ue
|